星号拨号方案 - waitexten立即挂断,不等待

时间:2016-08-03 19:18:00

标签: asterisk

请考虑以下星号拨号方案。播放完最后一个声音文件后,它会立即挂断,并且waitexten超时参数似乎被忽略。我试图实现的行为是在最后一个声音文件完成后等待给定的秒数以获得响应然后挂断。最后一个声音文件说"拨打*再次听到这些选项"。如果我将waitexten超时设置为60,它会在播放声音文件之前挂断。较短的时间允许他们全部播放,但随后立即挂断。欢迎任何有关处理这种更好方法的建议

[mainmenu]
exten => s,1,Wait(0.25)
  same => 2,Answer()
  same => 3,Background(/srv/asterisk/sounds/optionslist)
  same => n,Background(/srv/asterisk/sounds/dial2cs)
  same => n,Background(/srv/asterisk/sounds/dial3ma)
  same => n,Background(/srv/asterisk/sounds/dial4ac)
  same => n,Background(/srv/asterisk/sounds/dial0)
  same => n,Background(/srv/asterisk/sounds/dialstar)
  same => n,WaitExten(20)
exten => 2,1,Goto(cs,2,1)
exten => *,1,Goto(s,3)

控制台输出

  == Using SIP RTP CoS mark 5
    -- Executing [+12345@public:1] Goto("SIP/xxx.pstn.twilio.com-00000044", "mainmenu,s,1") in new stack
    -- Goto (mainmenu,s,1)
    -- Executing [s@mainmenu:1] Wait("SIP/xxx.pstn.twilio.com-00000044", "0.25") in new stack
    -- Executing [s@mainmenu:4] BackGround("SIP/xxx.pstn.twilio.com-00000044", "/srv/asterisk/sounds/dial2cs") in new stack
    -- Executing [s@mainmenu:5] BackGround("SIP/xxx.pstn.twilio.com-00000044", "/srv/asterisk/sounds/dial3ma") in new stack
    -- <SIP/xxx.pstn.twilio.com-00000044> Playing '/srv/asterisk/sounds/dial3ma.slin' (language 'en')
    -- Executing [s@mainmenu:6] BackGround("SIP/xxx.pstn.twilio.com-00000044", "/srv/asterisk/sounds/dial4ac") in new stack
    -- <SIP/xxx.pstn.twilio.com-00000044> Playing '/srv/asterisk/sounds/dial4ac.slin' (language 'en')
    -- Executing [s@mainmenu:7] BackGround("SIP/xxx.pstn.twilio.com-00000044", "/srv/asterisk/sounds/dial0") in new stack
    -- <SIP/xxx.pstn.twilio.com-00000044> Playing '/srv/asterisk/sounds/dial0.slin' (language 'en')
    -- Executing [s@mainmenu:8] BackGround("SIP/xxx.pstn.twilio.com-00000044", "/srv/asterisk/sounds/dialstar") in new stack
    -- <SIP/xxx.pstn.twilio.com-00000044> Playing '/srv/asterisk/sounds/dialstar.slin' (language 'en')
[
[Aug  4 05:03:28] WARNING[2225]: chan_sip.c:4175 retrans_pkt: Retransmission timeout reached on transmission xxx@0.0.0.0 for seqno 5305 (Critical Response) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 32001ms with no response
[Aug  4 05:03:28] WARNING[2225]: chan_sip.c:4204 retrans_pkt: Hanging up call xxx@0.0.0.0 - no reply to our critical packet (see https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions).
  == Spawn extension (mainmenu, s, 8) exited non-zero on 'SIP/xxx.pstn.twilio.com-00000044'

Asterisk 11.7.0~dfsg-1ubuntu1

1 个答案:

答案 0 :(得分:2)

我认为您遇到了与此主题相同的问题Asterisk,SIP Retransmission timeout。尝试使用NAT设置或防火墙解决问题。

在此answer中建议在canreinvite=no中设置sip.conf