[asterisk-users] Codec negotiation : expecting G726, getting G711a (alaw)

Philipp von Klitzing klitzing at pool.informatik.rwth-aachen.de
Tue Aug 3 06:21:23 CDT 2010


Hi!

> Question 1 :
> [Aug 2 13:56:57] Capabilities: us - 0x90a (gsm|alaw|g726|g729), peer -
> audio=0x808 (alaw|g726)/video=0x0 (nothing), combined - 0x808 (alaw|g726)
> why is combined alaw|g726 and not g726|alaw (reverse) ??

Guess: Here the order presented has no meaning for the order of codec 
negotiation.

> Question 2 :
> why do I see on my Grandstream phone that the codec being used is alaw in
> stead of g726 ??

Because that is what the phone and Asterisk have negotiated. ;-)

> Question 3 :
> How can I get g726 as first preferred codec ??

Which Asterisk version are you using?

* check if you have disallow/allow settings in the [general] section of 
sip.conf. Depending on your Asterisk version only the order in [general] 
would be respected, but not the order in the individual sip peer/user 
definition

* look at the variable SIP_CODEC for the inbound (first) call leg, and in 
Asterisk 1.8 (or 1.6.2?) also at SIP_CODEC_OUTBOUND

* many Asterisk operators have applied the third party "codec negotiation 
patch"

Philipp




More information about the asterisk-users mailing list