[asterisk-users] Codec problems when using G.723
Thomas Winter
thowinter at googlemail.com
Mon Nov 10 10:28:17 CST 2008
On Monday 10 November 2008 16:52, Eric "ManxPower" Wieling wrote:
> Thomas Winter wrote:
> > On Sunday 09 November 2008 20:14, Eric "ManxPower" Wieling wrote:
> >> The best (and maybe only way) is to set your client and your service
> >> provider to only do G.723.
> >
> > Really, thats not the way it should work.
> >
> > How I can find out the codec of an incomming call?
> >
> > Is there any way to use ${SIP_CODEC} to try to change to G.723 and then
> > check success?
> > If OK use provider with only allowed G.723 and if not use provider with
> > allowed alaw and ulaw?
>
> I didn't say that is how it should work. I said that is how it does
> work. No, you cannot change the codec of the incoming call in the
> dialplan. SIP_CODEC only sets the codec for the outgoing leg of the call.
With SIP_CODEC you can change the codec for an incomming call.
[Nov 10 17:21:33] NOTICE[12954]: chan_sip.c:3659 try_suggested_sip_codec:
Changing codec to 'ulaw' for this call because of ${SIP_CODEC} variable
How about:
grep with AGI and AMI sip show channels and find the used codec. (Is there an
better way?)
If found G.723.1 use provider with G.723, if not use provider with alaw and
ulaw
Should work, I will give it a try...
More information about the asterisk-users
mailing list