[asterisk-dev] RTP early media always sent: by design or not?

Olle E. Johansson oej at edvina.net
Fri Mar 11 00:45:26 CST 2011


11 mar 2011 kl. 06.09 skrev Kirill Katsnelson:

> The scenario is like this:
> * A call is originated via AMI Originate, channel Local/s at local to s at remote
> * s at local is executed, places a call to agent via a Queue.
> * after it is connected, s at remote is executed, and calls a Dial().
> 
> I enable RTP debug to console, I see this right after the Dial sends an INVITE and we receive a 183 with an RTP endpoint (64.XXX.XXX.XXX is the remote end being dialed):
> 
>> Got  RTP packet from    64.XXX.XXX.XXX:19842 (type 00, seq 004261, ts 057920, len 000160)
>> Sent RTP packet to      192.168.0.90:16396 (type 00, seq 025975, ts 057920, len 000160)
>> Got  RTP packet from    192.168.0.90:16396 (type 00, seq 007229, ts 214375541, len 000160)
>> Sent RTP packet to      64.XXX.XXX.XXX:19842 (type 00, seq 001482, ts 214375536, len 000160)
> 
> Even if I set prematuremedia=no for the Dial()'ed peer, RTP is still being sent.
> 
> Is that by design? Why should Asterisk send RTP stream to the remote end before receiving an ACK?

That's according to the RFC. As soon as we send SDP we should be able to receive, as soon as we receive SDP we are allowed to send.

If we receive 183 it actually means that you have early media coming from the other end and we have to relay it.
The prematuremedia setting is just for cases where we had ISDN gear sending empty frames before we actually had any signalling indicating early media.

/O


More information about the asterisk-dev mailing list