[Home]

Summary:ASTERISK-17086: timeout parameter always honoured when no response to signalling
Reporter:Bruce McAlister (asgaroth)Labels:
Date Opened:2010-12-09 08:13:25.000-0600Date Closed:2011-06-07 14:05:18
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_dial
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) Re_asterisk-users_Correct_operation_of_timout_parameter_for_dialapplication.txt
Description:When a sip phone is not responding to invites on an outbound call, the dial application still waits the duration of timeout before continuing with dialplan execution. I was under the impression that app_dial would timeout on the signalling prior to the timeout parameter specified in the dial parameter.

For example, consider the following dialplan:

exten => 111,1),Dial(SIP/phone1,30,tg)
exten => 111,n,NoOp(DialStatus=${DIALSTATUS})
exten => 111,n,GotoIf($[${DIALSTATUS} = CHANUNAVAIL]?unavail)
exten => 111,n,GotoIf($[${DIALSTATUS} = NOANSWER]?unavail)
exten => 111,n,GotoIf($[${DIALSTATUS} = BUSY]?busy)
exten => 111,n,GotoIf($[${DIALSTATUS} = CONGESTION]?busy)
exten => 111,n(unavail), Goto(voice-mail,vmu-phone1,1)
exten => 111,n(busy), Goto(voice-mail,vmb-phone1,1)

Under normal operation the originating caller is passed through to voicemail. However, if/when the device is not responding to invites, for whatever reason, the dial application waits 30 seconds before setting the DIALSTATUS to NOANSWER.

Would it be possible to have the dial application timeout on no response to INVITES prior to the actual timeout value specified on the dial?

****** STEPS TO REPRODUCE ******

Create extensions as:

exten => 111,1),Dial(SIP/phone1,30,tg)
exten => 111,n,NoOp(DialStatus=${DIALSTATUS})
exten => 111,n,GotoIf($[${DIALSTATUS} = CHANUNAVAIL]?unavail)
exten => 111,n,GotoIf($[${DIALSTATUS} = NOANSWER]?unavail)
exten => 111,n,GotoIf($[${DIALSTATUS} = BUSY]?busy)
exten => 111,n,GotoIf($[${DIALSTATUS} = CONGESTION]?busy)
exten => 111,n(unavail), Goto(voice-mail,vmu-phone1,1)
exten => 111,n(busy), Goto(voice-mail,vmb-phone1,1)

dial the destination phone that may be, for example, blocked by a firewall due to NAT issue's, or down due to a broadband or equivilent fault.

****** ADDITIONAL INFORMATION ******

I have logged this issue as per recommendation by Tilghman via the asterisk user's mailing list, see attached email.
Comments:By: Clod Patry (junky) 2010-12-09 12:56:28.000-0600

what about if you have qualify=yes for that phone?

By: Leif Madsen (lmadsen) 2010-12-16 10:13:56.000-0600

I would actually expect this, as it would only timeout after over a minute:

1: 1 second
2: 2 seconds (3 seconds elapsed)
3: 4 seconds (7 seconds elapsed)
4: 8 seconds (15 seconds elapsed)
5: 16 seconds (31 seconds elapsed)
6: 32 seconds (63 seconds elapsed)

I'm pretty sure Asterisk attempts to retransmit the INVITE 6 times, doubling the amount of time it waits for the INVITE response. (At least this is how it used to work).

If you set the timeout in Dial() to something like 120, I would guess it would rollover after 63 seconds.

I think you need to use session-timers in order to get around this issue.

By: Leif Madsen (lmadsen) 2010-12-16 10:23:47.000-0600

After discussing in #asterisk-bugs others agree this is a configuration issue.