RTPHOLDTIMEOUT is not working properly

I have set rtptimeout to 1 and when I set rtpholdtimeout less then 6 it works fine but if I increase it the call does not hangup atleast approx for 10 minutes. Why? Is it a bug? I am using asterisk 10.0.1.

Very few people with have investigated this option in detail as it a fallback measure that is only useful when you have a network outage (or a broken softphone).

Actually, I can think of a reason. The typical RTCP interval is 5 seconds. For normal use, RTPHOLDTIMEOUT should be set higher than this, so that calls will not dropped simply because they are on hold, and there is no RTP.

I have tested many times with the same situation setting rtpholdtimeout to 6, Every time call gets disconnected after different time. The time varies from 4sec to more than 5 minutes. Can you tell me when actually it starts counting 6 sec?

I imagine it is reset on receiving an RTP or RTCP packet for the session. If you need any more detail, you should read the source code.

Given that UDP is an unreliable protocol, your observed protocol seems quite reasonable. 6 is radically different from the value in the sample configuration file.

Yeah, that’s right, I have seen by sip debugging that when I RTP packets arrive it takes much time to hang.
Yes 300 is given in sample file but if I will set it to 300 then imagine how long will it take to hang while it is taking more than 5 min on the value of 6.

I would hope it would take many years. The value is chosen to avoid false positives accidentally tearing down viable calls.