[asterisk-dev] Codec Negotiation in Asterisk

Kevin P. Fleming kpfleming at digium.com
Wed Feb 8 08:52:13 MST 2006

Ravi Shankar wrote:

> But if the phone A had chosen GSM then there is no transcoding required. 
> So I guess if Asterisk on its invite message to Phone A had put GSM as 
> its first priority then there wouldn't have been a need for transcoding.

Asterisk is supposed to do that already. If it is not doing so, that is 
a bug.

> I am new to Asterisk development and I'm not sure on what basis asterisk 
> decides to send all the configured codec instead of filtering it out 
> based on the incoming SDP.

The incoming SDP is not relevant. Asterisk is not a proxy, and does not 
behave like one. The two channels are entirely independent, and may not 
even be SIP on both sides (in which case there is no 'incoming SDP').

Each call is negotiated separately, except for prioritizing the incoming 
format in the outgoing INVITE if the outgoing peer is configured to 
support it.

More information about the asterisk-dev mailing list