[asterisk-users] Inquiry:Asterisk different codec schemes?

Olle E. Johansson oej at edvina.net
Tue Jan 5 02:59:48 CST 2010


4 jan 2010 kl. 14.46 skrev Kevin P. Fleming:

> hadi motamedi wrote:
> 
>> Sorry . I didn't get the point clearly . In the SIP Invite message , it
>> says "my audio endpoint is IP x.x.x.x port x, and I can use codecs
>> A,B,C". The remote endpoint responds with a 200 OK, saying "my audio
>> stream is at IP y.y.y.y port y, and I choose codec B". Can you please do
>> me favor and let me know if my understanding is right or not ?
>> Thank you
> 
> No, you are not understanding the SDP offer/answer model properly. If
> one endpoint offers codecs A, B and C in its SDP, it is willing to
> *receive* media in those formats. The receiver of that offer can choose
> to send media to the offerer in any of those formats, at any time. If
> the answering endpoint includes only codec B in its SDP, then it is
> willing to *receive* only codec B. In that scenario, it is possible for
> media to flow from endpoint 1 to endpoint 2 using codec B, and from
> endpoint 2 to endpoint 1 using codec A (or C), but this will not happen
> if Asterisk is an endpoint in this scenario.
> 
> When Asterisk receives a media frame, if the format of that frame is not
> the format that it is currently sending to the other endpoint, it will
> switch to that format automatically. If it cannot do so because the
> other endpoint did not offer to receive that format, then the call's
> audio will probably fail. This is the reason why I responded before that
> Asterisk does not support asymmetric formats in a media session.
> 
> In reality, it is extremely uncommon for a SIP endpoint to want to send
> media in a format that it is not also willing to receive; in fact, I
> can't say I've ever seen this situation arise in any testing I've done
> or in any issues reported in our issue tracker.

But it's fairly common to have asymmetric media in the call. If the caller offers A, B and C and the callee responds with B, the caller sends B but the callee might send A.

/O


More information about the asterisk-users mailing list