Asterisk RTP Keepalive
This guide explains the configuration required on an Asterisk PBX to prevent One-Way Voice during call forwarding. The guide refers to Asterisk version 13.18.3.
Initial Situation
The Asterisk PBX offers the possibility to forward a call to an external phone number. In this process, an outgoing call is initiated by the PBX and connected to the incoming call.
To ensure that the media stream is continuously established through NAT and firewall, and to prevent silent calls, it may be necessary to force the media ports of Asterisk to remain open.
To open such a port for outgoing connections, the Asterisk PBX must send an “RTP-Comfort-Noise”.
With the following example configuration, the Asterisk PBX sends “RTP-Comfort-Noise” after one second, ensuring that
an outgoing connection can be established without an incoming media stream.
Configuration
The necessary configuration is performed in the configuration file (.conf),
where the audio codecs for outgoing calls are defined (in the standard configuration, this is “pjsip.conf”).
The following example may differ from your Asterisk configuration.
Add a line with “rtp_keepalive=1” in the audio settings under the section where you also define outgoing calls.
At the specified interval (1 = 1 second), Asterisk sends “RTP-Comfort-Noise”.
