[Asterisk-Dev] setvar(SIP_CODEC) bug?

Luis Benavente luisbe at bts-usa.com
Mon Oct 27 15:43:48 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.

> DEBUG[114696]: File chan_sip.c, Line 3898 (check_user): Setting NAT on
RTP to 0
DEBUG[114696]: File chan_sip.c, Line 554 (__sip_ack): Stopping
retransmission on '000b5f80-0a9b22f2-603dfb82-322d96d1 at 192.168.1.13' of
Response 101: Found
DEBUG[114696]: File chan_sip.c, Line 3898 (check_user): Setting NAT on
RTP to 0
DEBUG[114696]: File chan_sip.c, Line 4950 (handle_request): Check for
res for 7601
DEBUG[114696]: File chan_sip.c, Line 980 (find_user): Call from user
'7601' is 1 out of 0
DEBUG[114696]: File chan_sip.c, Line 3345 (build_route): build_route:
Contact hop: sip:7601 at 192.168.1.13:5060    -- Executing
SetVar("SIP/7601-faf0", "SIP_CODEC=g711") in new stack
    -- Executing Dial("SIP/7601-faf0", "Zap/g1/17862862222") in new
stack
DEBUG[278546]: File chan_zap.c, Line 1436 (zt_call): Dialing
'17862862705'
DEBUG[278546]: File chan_zap.c, Line 1482 (zt_call): Deferring
dialing...
    -- Called g1/17862862222
DEBUG[278546]: File chan_zap.c, Line 3208 (zt_exception): Exception on
20, channel 1
DEBUG[278546]: File chan_zap.c, Line 2642 (zt_handle_event): Got event
Wink/Flash(3) on channel 1 (index 0)
DEBUG[278546]: File chan_zap.c, Line 3208 (zt_exception): Exception on
20, channel 1
DEBUG[278546]: File chan_zap.c, Line 2642 (zt_handle_event): Got event
Hook Transition Complete(12) on channel 1 (index 0)
DEBUG[278546]: File chan_zap.c, Line 3107 (zt_handle_event): Got hook
complete in MF FGD, waiting for wink now on channel 1
DEBUG[278546]: File chan_zap.c, Line 3208 (zt_exception): Exception on
20, channel 1
DEBUG[278546]: File chan_zap.c, Line 2642 (zt_handle_event): Got event
Dial Complete(9) on channel 1 (index 0)
DEBUG[278546]: File chan_zap.c, Line 1055 (zt_enable_ec): Enabled echo
cancellation on channel 1
DEBUG[278546]: File rtp.c, Line 1007 (ast_rtp_write): Ooh, format
changed from UNKN to ULAW
DEBUG[278546]: File chan_sip.c, Line 1474 (sip_rtp_read): Oooh, format
changed to 256
NOTICE[278546]: File channel.c, Line 1476 (ast_set_read_format): Unable
to find a path from G729A to ULAW
NOTICE[278546]: File channel.c, Line 1446 (ast_set_write_format): Unable
to find a path from ULAW to G729A
WARNING[278546]: File chan_zap.c, Line 3549 (zt_write): Cannot handle
frames in 256 format
WARNING[278546]: File app_dial.c, Line 318 (wait_for_answer): Unable to
forward voice
DEBUG[278546]: File chan_zap.c, Line 1633 (zt_hangup): Hangup: channel:
1 index = 0, normal = 20, callwait = -1, thirdcall = -1
DEBUG[278546]: File chan_zap.c, Line 1071 (zt_disable_ec): disabled echo
cancellation on channel 1
DEBUG[278546]: File chan_zap.c, Line 2000 (zt_setoption): Set option TDD
MODE, value: OFF(0) on Zap/1-1
DEBUG[278546]: File chan_zap.c, Line 1030 (update_conf): Updated
conferencing on 1, with 0 conference user

-- 
Luis Benavente <luisbe at bts-usa.com>




More information about the asterisk-dev mailing list