[Home]

Summary:ASTERISK-18559: rtptimeout not working per peer
Reporter:a4101287 (a4101287)Labels:
Date Opened:2011-09-15 07:50:33Date Closed:2011-09-29 07:22:40
Priority:MajorRegression?
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:1.8.6.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Attachments:( 0) bugASTERISK-18559.patch
( 1) bugASTERISK-18559-2.patch
Description:The rtptimeout setting is ignored on a per peer basis.
Commenting the rtptimeout setting in the general section or setting a higher or lower rtptimeout setting in the general section makes no difference.
Comments:By: Leif Madsen (lmadsen) 2011-09-21 09:31:03.979-0500

I checked the documentation (configs/sip.conf.sample) and it does say this should be settable on a global and per-peer basis.

By: a4101287 (a4101287) 2011-09-22 07:46:54.907-0500

[general]
rtptimeout=30

[testuser]
rtptimeout=60

After 2 minutes the user stops sending RTP to Asterisk.
Asterisk doesn't end the call, not after 30 seconds but also not after 60 seconds.
When the user hangs up (BYE) after for example 5 minutes this message is printed:

[Sep 22 14:15:34] NOTICE[10323]: chan_sip.c:25002 check_rtp_timeout: Disconnecting call 'SIP/testuser-0006c662' for lack of RTP activity in 182 seconds
   -- Executing [h@username-dialout:1] NoOp("SIP/testuser-0006c662", "hang up") in new stack

So it looks like Asterisk detects the lack of RTP but doesn't execute a hangup.

By: Gregory Hinton Nietsky (irroot) 2011-09-22 08:19:45.958-0500

problem is in dialog_initialize_rtp it uses the global setting not dialog setting im working on a fix

By: Gregory Hinton Nietsky (irroot) 2011-09-22 08:53:41.396-0500

Attached patch from reviewboard for this bug.

please try it and comment.

https://reviewboard.asterisk.org/r/1452

By: a4101287 (a4101287) 2011-09-22 10:48:20.517-0500

Thanks for the patch!
When test this the only difference i see is NOTICE message is not present any more.
The call is not ended by Asterisk, that's the same.

By: Gregory Hinton Nietsky (irroot) 2011-09-23 04:06:22.823-0500

Hi there set up a test here to see if this works or not [patch applied]

#block all rtp and not sip
iptables -I INPUT -j DROP -s 192.168.150.139 -p udp ! --sport 5060

set my peer rtptimeout to 10s with global of 60s

reload chan_sip

make a call to system i can hear on the device the server has no incoming rtp due to firewall rule above.

[Sep 23 11:01:44] NOTICE[24727]: chan_sip.c:25836 check_rtp_timeout: Disconnecting call 'SIP/0803-00000005' for lack of RTP activity in 12 seconds

By: Gregory Hinton Nietsky (irroot) 2011-09-27 02:12:17.569-0500

Updated patch to work with rtpholdtimeout and rtpkeepalive

By: a4101287 (a4101287) 2011-09-27 09:08:40.865-0500

I guess something went wrong with applying the patch then. I will wait for the next release and see if the bug is fixed.