[asterisk-users] G723 pass-through and codec negotiation

Tim Panton tim at mexuar.com
Mon Nov 20 03:53:22 MST 2006


On 19 Nov 2006, at 19:23, Ray Jackson wrote:

> Hi Andrew,
>
> All that happens is Asterisk sets up the call using G723 as the  
> codec and calls then fail due to transcoding problems (since it  
> cannot encode/decode g723).  The softphone always prefers g723 over  
> gsm, so if you allow both in sip.conf Asterisk always select g723  
> due to the preference of the client.  What I need is for Asterisk  
> to understand what the 'other end' is capable of before selecting a  
> codec. i.e. if the call terminates to the Voicemail then select gsm  
> and do NOT allow g723.  Codec negotiation is usually something that  
> occurs in the call setup between 2 endpoints, but Asterisk seems to  
> do this in isolation for each client without understanding where  
> the call is going first to make that decision.  What I really need  
> is something that forces the 'allow' codecs in the dial plan per  
> call.  Does anybody know if this is this possible?

You might be able to do something with this channel variable (http:// 
www.voip-info.org/wiki-Asterisk+variables) :

${SIP_CODEC}: Used to set the SIP codec for a call (apparently broken  
in Ver 1.0.1, ok in Ver. 1.0.3 & 1.0.4, not sure about 1.0.2)

You would have to make sure you set it before the call is answered  
(ie the RTP streams are set up).

I've never tried it so I have no clue if it works or not!


Tim.

Tim Panton

www.mexuar.net
www.westhawk.co.uk/





More information about the asterisk-users mailing list