[asterisk-users] SIP Question - Early audio one-way or 2-way?

Steve Davies davies147 at gmail.com
Fri Aug 31 06:13:46 CDT 2012


On 31 August 2012 07:49, Olle E. Johansson <oej at edvina.net> wrote:
>
> 24 aug 2012 kl. 16:18 skrev Steve Davies <davies147 at gmail.com>:
>
>> Hi SIP Gurus,
>>
>> I've tried to find the relevant RFCs, but am struggling. I can find
>> the odd opinion online, but was wondering if anyone could give a
>> definitive answer.
>>
>> If a SIP call is initiated (INVITE) and receives either a "180 with
>> SDP", or a "183 with SDP", then the remote party will start to send
>> audio for the inband-ringing. Asterisk then passes this audio, and it
>> is correctly heard by the caller.
>>
>> At present, Asterisk will also start to pass back any handset audio in
>> return, in theory allowing a conversation to occur on an unanswered
>> channel if an endpoint were designed to allow this (free phonecalls
>> here we come!).
>>
>> My question:
>>
>> Should:
>> 1) Asterisk block outbound audio between the 183 Progress and the 200
>> OK packets?
>> 2) Replace any outbound audio with silence?
>> 3) Replace outbound audio with a special NULL RTP of some sort? Does that exist?
>> 4) Allow any audio to be sent regardless?
>>
>> I have implemented 1) at present on our test rig, but the lack of
>> outbound RTP causes issues with firewall state not being set-up to
>> allow the inbound audio. I am not sure how hard/easy it would be to do
>> 2) as you'd need to create silence of the correct duration to replace
>> each audio frame.
>>
>> Thoughts please?
>
> First, because of Asterisk's RTP implementation we have to send some RTP packets at this point. You could mute the calling channel before calling and unmute the channel at answer if needed, but normally sending audio won't hurt. A normal user should not be able to send early media on a pstn-like installation where you bill the calls, so there should be little risc of two-way conversations before an answer.
>
> In some cases you have to let the caller send DTMF (the famous fed ex example) in
> early media, so we can't block any media by default in Asterisk.
>
> Using the "r" option in dial causes a lot of issues, since you can still get busy or congestion when you have early media, so that is not a good solution.
>
> /Olle
>

Excellent information as always Olle. Many thanks.

My intention is to make the early-audio prevention in SIP a little
more harsh, such that if SIP receives audio before a 183 or 200 is
received, it is dropped.

This fixes the case where "useless" early-audio is received from a
non-SIP (eg ISDN) technology, and can cause an onward node to
auto-enable early audio mode, causing silent ringing and other broken
behaviours.

Cheers,
Steve



More information about the asterisk-users mailing list