[Asterisk-Users] Codec negociation (2)

Kevin P. Fleming kpfleming at starnetworks.us
Sat Mar 19 17:01:50 MST 2005


Yves wrote:

> I receive G729 & G723 calls that I send to a provider who can handle 
> both too, is it impossible to tell Asterisk to keep using the same codec 
> for in & out ? It seems that he only follows the codec list in order.

You are correct. Since Asterisk is a UAS/UAC and not a proxy, it 
negotiates both sides of the call independently. Given that, when you 
define a SIP user as allowing both G.729 and G.723, and the phone offers 
both, Asterisk will pick one and move into the dialplan.

However, if your provider's peer entry is also configured to allow both 
G.729 and G.723, things should work fine. By default, Asterisk will 
force a preference to the codec being used by the existing channel, to 
try to avoid transcoding. That means that if you call in using G.729, 
and the peer is set to prefer G.723 normally, Asterisk will still list 
G.729 first in the outgoing INVITE to the peer. As long as the peer 
respects that request, the call should go through without transcoding 
needed.

If you are not experiencing this behavior, then you'll need to post more 
  details and a 'sip debug' trace so we can figure out what's happening.



More information about the asterisk-users mailing list