[Asterisk-Dev] setvar(SIP_CODEC) bug?

Luis Benavente luisbe at bts-usa.com
Tue Oct 28 07:38:13 MST 2003


On Mon, 2003-10-27 at 20:48, John Todd wrote:
> >	I've posted this problem a week ago in the users list, I apologize for
> >bringing it back, but I'm still stuck on it.
> >
> >	I have a 7960 phone that is using g729 as preferred codec, I want to
> >change the codec to g711 when the call is going out through the zaptel
> >interface.
> >
> >	These are my config files:
> >
> >== sip.conf ==
> >[7601]
> >type=friend
> >username=7601
> >secret=7601
> >host=dynamic
> >canreinvite=yes
> >context=intern
> >mailbox=301
> >disallow=all
> >allow=g729
> >allow=ulaw
> >
> >== extensions.conf ==
> >exten => 17862862222,1,setvar(SIP_CODEC=g711)
> >exten => 17862862222,2,Dial(${TRUNK}/${EXTEN})
> >
> >	The following debug shows that the setvar application is executed, and
> >looking at the code in chan_sip.c, * will send an answer with the proper
> >codec (g711), but the call never gets answered because when * executes
> >ast_set_read_format and ast_set_write_format in channel.c, it seems that
> >the variable has not been updated there. Asterisk doesn't find a way to
> >translate from/to g729 and drops the call.
> >
> >	I don't know if this could be a bug or simply I'm missing something
> >here.
> >
> >	Thank you for any help you can provide.
> [snip]
> 
> Luis -
>    Try:
> 
> exten => 17862862222,1,setvar(SIP_CODEC=alaw)
> 
Oops! I'm sorry, It was a fat finger copying from the file to the mail. I've tried the new config with no luck.

Any ideas?

Luis


> JT
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev
-- 
Luis Benavente <luisbe at bts-usa.com>




More information about the asterisk-dev mailing list