0
votes

Consider the following asterisk dialplan. After the last sound file is played it hangs up immediately and the waitexten timeout parameter seems to be ignored. The behaviour I am trying to achieve is to wait a given number of seconds after the last sound file is completed to get a response and then hang up. The last sound file says "Dial * to hear these options again". If I set the waitexten timeout to say 60, it hangs up before the sound files are played. A shorter time allows them all to be played but then it hangs up immediately. Any suggestions for handling this a better way are welcome

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

console output

  == 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 [email protected] 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 [email protected] - 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
Show your verbose logs of execution mainmenu context, please.sattellite
Edited question to include console output.markhorrocks
Try to replace first Background with Playbacksattellite

1 Answers

2
votes

I assume that you have a problem like in this topic Asterisk,SIP Retransmission timeout. Try to solve the problem with the NAT settings or firewall.

In this answer propose to set canreinvite=no in sip.conf.