[Asterisk-Dev] setvar(SIP_CODEC) bug?

John Todd jtodd at loligo.com
Mon Oct 27 18:48:17 MST 2003


>	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)


JT



More information about the asterisk-dev mailing list