[Home]

Summary:ASTERISK-09405: rtptimeout parameter non-functional on sip-to-sip
Reporter:Matt Vlasach (mattv)Labels:
Date Opened:2007-05-08 15:47:18Date Closed:2007-08-29 13:20:20
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:I am using a very vanilla version of Asterisk with the 'rtptimeout=5' parameter set in sip.conf under the global section and for respective peers.  I just want to be able to unplug an MTA box connected to the asterisk server and have Asterisk drop the call (and the other bridged leg) after 10 seconds of no data.

Unfortunately, this isn't working.  A little more detail about the enviornment:

I am using MTA boxes to call Asterisk, which is bridging the call to another SIP end point.  There is no authentication or registration required: Asterisk follows a simple dial plan that routes anything sent to it right on to the next SIP device.  That functionality is sound, and normal call functions work perfectly.

However, physically disrupting the ethernet connection on either side of the bridged call does not close the connections, in spite of the rtptimeout parameter specified.  All documentation and troubleshooting  I have found on the web and in the bug tracker have turned up nothing.

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

Upgraded to 1.4.4, same results.  Besides the below two files, I am using default asterisk configuration.

Some relevant configuration:
---------------------
sip.conf:
[general]
bindport=5060                   ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0                ; IP address to bind to (0.0.0.0 binds to all)
context=InfinityRoute
rtptimeout=5
rtautoclear=yes|10

[LA_IAD_1]
type=peer
nat=no
insecure=invite
rtptimeout=5
rtpholdtimeout=10
host=192.168.10.200

=======================
extensions.conf:

[InfinityRoute]
exten => _X.,1,Macro(dialout-trunk2,1,${EXTEN},,)
exten => _X.,n,Macro(dialout-trunk2,2,${EXTEN},,)
exten => _X.,n,Macro(outisbusy,)
; end of [InfinityRoute]

[macro-dialout-trunk2]
exten => s,1,Set(DIAL_TRUNK=${ARG1})
exten => s,n,Set(DIAL_NUMBER=${ARG2})
exten => s,n,Set(DIAL_TRUNK_OPTIONS=${DIAL_OPTIONS}) // will be reset to TRUNK_OPTIONS if not intra-company
exten => s,n,Set(DIAL_TRUNK_OPTIONS=${TRUNK_OPTIONS})
exten => s,n,Set(OUTNUM=${OUTPREFIX_${DIAL_TRUNK}}${DIAL_NUMBER}) ; OUTNUM is the final dial number
exten => s,n,Dial(${OUT_${DIAL_TRUNK}}/${OUTNUM},,${DIAL_TRUNK_OPTIONS}) ; Regular Trunk Dial
... etc ....

==============================
Output while placing a call:
   -- Executing [001@InfinityRoute:1] Macro("SIP/192.168.10.100-b77142d0", "dialout-trunk2|1|001||") in new stack
   -- Executing [s@macro-dialout-trunk2:1] Set("SIP/192.168.10.100-b77142d0", "DIAL_TRUNK=1") in new stack
   -- Executing [s@macro-dialout-trunk2:2] Set("SIP/192.168.10.100-b77142d0", "DIAL_NUMBER=001") in new stack
   -- Executing [s@macro-dialout-trunk2:3] Set("SIP/192.168.10.100-b77142d0", "DIAL_TRUNK_OPTIONS=r") in new stack
   -- Executing [s@macro-dialout-trunk2:4] Set("SIP/192.168.10.100-b77142d0", "DIAL_TRUNK_OPTIONS=") in new stack
   -- Executing [s@macro-dialout-trunk2:5] Set("SIP/192.168.10.100-b77142d0", "OUTNUM=001") in new stack
   -- Executing [s@macro-dialout-trunk2:6] Dial("SIP/192.168.10.100-b77142d0", "SIP/LA_IAD_1/001||") in new stack
   -- Called LA_IAD_1/001
   -- Call on SIP/LA_IAD_1-087d8128 left from hold
   -- SIP/LA_IAD_1-087d8128 is making progress passing it to SIP/192.168.10.100-b77142d0
   -- Call on SIP/LA_IAD_1-087d8128 left from hold
   -- SIP/LA_IAD_1-087d8128 answered SIP/192.168.10.100-b77142d0
   -- Native bridging SIP/192.168.10.100-b77142d0 and SIP/LA_IAD_1-087d8128

[[ At this point calls are connected properly.  If I disconnect the device here, there is no further output ]]

======================
show channels after 60 seconds of being unplugged:

Channel              Location             State   Application(Data)            
SIP/LA_IAD_1-087d812 (None)               Up      Bridged Call(SIP/192.168.10.10
SIP/192.168.10.100-b s@macro-dialout-trun Up      Dial(SIP/LA_IAD_1/001||)      
2 active channels
1 active call


It will stay like this indefinitely, well at least as long as I can stay patient.

Any help would be greatly appreciated!
Comments:By: Joshua C. Colp (jcolp) 2007-05-14 12:04:09

This is a configuration issue. Add canreinvite=no to your sip.conf either in the general section or per device. Right now the audio is being reinvited and going direct, so Asterisk can't keep track of the RTP timeout any longer.

By: Matt Vlasach (mattv) 2007-08-29 06:03:45

I added the canreinvite directive and now a different problem has arisen.  Now I get the following new notices:
   
-- Packet2Packet bridging SIP/10.0.0.210-0838b278 and SIP/LA_IAD_1-08386b00

[Aug 29 03:24:30] NOTICE[1995]: chan_sip.c:15306 do_monitor: 'SIP/10.0.0.210-0838b278' will not be disconnected in 11 seconds because it is directly bridged to another RTP stream

Why are we directly bridging if we have disabled canreinvite?  Shouldn't that be going through Asterisk? Monitoring RTP packets it appears that way, so I guess why is it throwing this error and keeping me from doing a hangup of the call?

Thank you in advance!

By: Digium Subversion (svnbot) 2007-08-29 08:55:53

Repository: asterisk
Revision: 81331

------------------------------------------------------------------------
r81331 | file | 2007-08-29 08:55:49 -0500 (Wed, 29 Aug 2007) | 4 lines

(closes issue ASTERISK-9405)
Reported by: mattv
Make rtp timeouts work even if two RTP streams are directly bridged in the RTP stack.

------------------------------------------------------------------------

By: Digium Subversion (svnbot) 2007-08-29 08:57:55

Repository: asterisk
Revision: 81332

------------------------------------------------------------------------
r81332 | file | 2007-08-29 08:57:54 -0500 (Wed, 29 Aug 2007) | 12 lines

Merged revisions 81331 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81331 | file | 2007-08-29 11:13:55 -0300 (Wed, 29 Aug 2007) | 4 lines

(closes issue ASTERISK-9405)
Reported by: mattv
Make rtp timeouts work even if two RTP streams are directly bridged in the RTP stack.

........

------------------------------------------------------------------------

By: Digium Subversion (svnbot) 2007-08-29 12:54:35

Repository: asterisk
Revision: 81352

------------------------------------------------------------------------
r81352 | murf | 2007-08-29 12:54:32 -0500 (Wed, 29 Aug 2007) | 128 lines

Merged revisions 81326,81332-81335,81341,81343-81345,81347-81348,81350 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r81326 | file | 2007-08-28 20:21:08 -0600 (Tue, 28 Aug 2007) | 2 lines

Add inline function for signed linear subtraction.

................
r81332 | file | 2007-08-29 08:16:07 -0600 (Wed, 29 Aug 2007) | 12 lines

Merged revisions 81331 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81331 | file | 2007-08-29 11:13:55 -0300 (Wed, 29 Aug 2007) | 4 lines

(closes issue ASTERISK-9405)
Reported by: mattv
Make rtp timeouts work even if two RTP streams are directly bridged in the RTP stack.

........

................
r81333 | mmichelson | 2007-08-29 08:19:33 -0600 (Wed, 29 Aug 2007) | 5 lines

Changing a NOTICE to a DEBUG.

(closes issue ASTERISK-10190, reported and patched by junky, with small modification by me)


................
r81334 | file | 2007-08-29 09:19:11 -0600 (Wed, 29 Aug 2007) | 2 lines

Add API calls for iterating through an event. This should allow events to have multiple information elements (while there was nothing preventing it before you could not actually access any except the first one).

................
r81335 | tilghman | 2007-08-29 09:21:10 -0600 (Wed, 29 Aug 2007) | 2 lines

Changed one too many variable settings in issue ASTERISK-9044 (closes issue ASTERISK-10191)

................
r81341 | mmichelson | 2007-08-29 09:57:27 -0600 (Wed, 29 Aug 2007) | 16 lines

Merged revisions 81340 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81340 | mmichelson | 2007-08-29 10:52:42 -0500 (Wed, 29 Aug 2007) | 8 lines

This fix creates a more accurate way of detecting whether realtime members were deleted.
(closes issue 10541, reported by Alric, patched by me)

The REALLY nice things about this patch is that queue members now have a "realtime" field
which will be true if the member is a realtime member. This means we can check this value
prior to certain processing if it should ONLY be done for realtime members.


........

................
r81343 | russell | 2007-08-29 09:59:10 -0600 (Wed, 29 Aug 2007) | 11 lines

Merged revisions 81342 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81342 | russell | 2007-08-29 10:57:29 -0500 (Wed, 29 Aug 2007) | 3 lines

If chan_h323 is not being built, don't use g++ to do the final link of Asterisk.
(in response to a question on the asterisk-dev list)

........

................
r81344 | file | 2007-08-29 10:03:51 -0600 (Wed, 29 Aug 2007) | 2 lines

To keep others happy... revert part of my additions so trunk works.

................
r81345 | file | 2007-08-29 10:07:35 -0600 (Wed, 29 Aug 2007) | 2 lines

This concludes bringing trunk back to a working state.

................
r81347 | mmichelson | 2007-08-29 10:09:02 -0600 (Wed, 29 Aug 2007) | 11 lines

Merged revisions 81346 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81346 | mmichelson | 2007-08-29 11:08:09 -0500 (Wed, 29 Aug 2007) | 3 lines

Changed some tabs to spaces


........

................
r81348 | file | 2007-08-29 10:25:30 -0600 (Wed, 29 Aug 2007) | 2 lines

Return ast_event_get_ie_raw to using an iterator and fix logic in ast_event_iterator_next.

................
r81350 | mmichelson | 2007-08-29 10:39:40 -0600 (Wed, 29 Aug 2007) | 20 lines

Merged revisions 81349 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81349 | mmichelson | 2007-08-29 11:35:29 -0500 (Wed, 29 Aug 2007) | 12 lines

This patch, in essence, will correctly pause a realtime queue member and reflect those
changes in the realtime engine.

(issue ASTERISK-10060, reported by irroot, patch by me)

This patch creates a new function called update_realtime_member_field, which is a generic
function which will allow any one field of a realtime queue member to be updated. This patch
only uses this function to update the paused status of a queue member, but it lays the foundation
for persisting the state of a realtime member the same way that static members' state is maintained
when using the persistentmembers setting


........

................

------------------------------------------------------------------------

By: Joshua C. Colp (jcolp) 2007-08-29 13:20:20

As the commit messages from previous... this has been fixed and as for being bridged directly it is happening in the RTP stack.