Summary:ASTERISK-12828: Dial with timeout 0 places a call and immediately cancels it.
Reporter:Atis Lezdins (atis)Labels:
Date Opened:2008-10-06 10:14:55Date Closed:2008-10-14 18:47:12
Versions:Frequency of
Description:Dial should either place a call with no timeout, or don't place it at all.

Asterisk 1.6.0


[Oct  6 07:26:59] VERBOSE[10657] logger.c:     -- Executing [21174@local_dial:88] Dial("SIP/90221-08460530", "SIP/90139,0,gtU(agent_call_answer^21174)") in new stack
[Oct  6 07:26:59] DEBUG[10657] chan_sip.c: Initializing initreq for method INVITE - callid 16863c3272e8556b2374575f75129990@
[Oct  6 07:26:59] VERBOSE[10657] logger.c: Reliably Transmitting (NAT) to
INVITE sip:90139@ SIP/2.0
Via: SIP/2.0/UDP;branch=z9hG4bK18eee87f;rport
Max-Forwards: 70
From: "TEST Working Place 221" <sip:21169@>;tag=as4150e010
To: <sip:90139@>
Contact: <sip:21169@>
Call-ID: 16863c3272e8556b2374575f75129990@
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.0
Date: Mon, 06 Oct 2008 14:26:59 GMT
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 469

o=root 461344733 461344733 IN IP4
s=Asterisk PBX 1.6.0
c=IN IP4
t=0 0
m=audio 41756 RTP/AVP 0 3 8 112 5 10 7 111 9 101
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:112 AAL2-G726-32/8000
a=rtpmap:5 DVI4/8000
a=rtpmap:10 L16/8000
a=rtpmap:7 LPC/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -

[Oct  6 07:26:59] DEBUG[10657] chan_sip.c: Trying to put 'INVITE sip' onto UDP socket destined for
[Oct  6 07:26:59] VERBOSE[10657] logger.c:     -- Called 90139
[Oct  6 07:26:59] WARNING[10657] app_dial.c: Invalid timeout specified: '0'
[Oct  6 07:26:59] DEBUG[10657] rtp.c: Channel '<unspecified>' has no RTP, not doing anything
[Oct  6 07:26:59] DEBUG[10657] channel.c: Hanging up channel 'SIP/90139-082c67d0'
[Oct  6 07:26:59] DEBUG[10657] chan_sip.c: Hangup call SIP/90139-082c67d0, SIP callid 16863c3272e8556b2374575f75129990@
[Oct  6 07:26:59] DEBUG[10657] chan_sip.c: update_call_counter(90139) - decrement call limit counter on hangup
[Oct  6 07:26:59] DEBUG[31332] app_queue.c: Device 'SIP/90139' changed to state '1' (Not in use)
[Oct  6 07:26:59] DEBUG[10657] chan_sip.c: Acked pending invite 102
[Oct  6 07:26:59] DEBUG[10657] chan_sip.c: Stopping retransmission on '16863c3272e8556b2374575f75129990@' of Request 102: Match Found
[Oct  6 07:26:59] VERBOSE[10657] logger.c: Reliably Transmitting (NAT) to
CANCEL sip:90139@ SIP/2.0
Via: SIP/2.0/UDP;branch=z9hG4bK18eee87f;rport
Max-Forwards: 70
From: "TEST Working Place 221" <sip:21169@>;tag=as4150e010
To: <sip:90139@>
Call-ID: 16863c3272e8556b2374575f75129990@
CSeq: 102 CANCEL
User-Agent: Asterisk PBX 1.6.0
Content-Length: 0

Comments:By: Leif Madsen (lmadsen) 2008-10-14 11:42:36

Assigning this issue to file as he is probably the best to move this issue forward. I realize he is quite busy, so this issue may take longer to resolve than is typical with him. Please reassign if necessary. Thanks!

By: Mark Michelson (mmichelson) 2008-10-14 18:44:36

I am taking the reins on this one. Even though it's totally invalid behavior, I'm not willing to change 1.4 or 1.6.0 even though the change seems to be very logical. Instead, I will add the behavior change to trunk and 1.6.1 so that an invalid timeout will translate to mean no timeout.

By: Digium Subversion (svnbot) 2008-10-14 18:47:10

Repository: asterisk
Revision: 149279

U   trunk/CHANGES
U   trunk/apps/app_dial.c

r149279 | mmichelson | 2008-10-14 18:47:10 -0500 (Tue, 14 Oct 2008) | 7 lines

When specifying an invalid timeout to Dial, take it
to mean that no timeout is desired.

(closes issue ASTERISK-12828)
Reported by: atis