Where Can I find some info on Codec ? All I have read seems NOT to deal deeply with CODECS
Is there a way toi know which CODEC a communication is using ?
TYpically, I have a VOIP provider using differnet CODECs, My Asterisk Server is using some of them, and my VOIP phone can use some of them…
What si the rule to know which codec they wull use ??
That seems to me important to know. For instance, if I am using a specific MOH… which version should I use ?
The previous post is correct, however, the codec order is only set in the general section of the sip.conf file. The order is ignored on the individual host config (unless that has changed recently)
The phones negotiate in the order of preference listed in the general section. So they’ll try Alaw first. Assuming they both support it, the connection is made. If either one doesn’t, the next codec is tried and so on.
If you want to force gsm, simply have gsm enable in the phone section for the given account.
So to recap, codec preference order is set in the general section of sip.conf. A subset is specified for each phone/account entry
So, gsm only
disallow=all ;no codec is allowed
allow=gsm ; gsm codec allowed
Specifing codecs is different depending on whether its a set or you are registering to a ITSP or other *
A set is contolled by what is in its section and what IT wants order wise.
For example a Cisco ATA186 will always use ulaw if it is allowed in its section. no matter the order set in any conf file. Where as other sets will use the codecs in order of what is set in the user section. ie if alaw is first it will use alaw which goes against what is documented on the wiki.
If you look at the sip debug you will see the negotition going on.
You can set the general section to disallow=all and just use the individual sections. This isnt a good idea though but I have found that the order here does not affect Cisco and Aastra sets and ATAs, Budgtone the order can be set from the admin page of the unit.
It is worth checking how your sets and peers behave and then setting the conf files to reflect what you want.