asterisk / asterisk

The official Asterisk Project repository.
https://www.asterisk.org
Other
1.97k stars 924 forks source link

[bug]: RTP inactivity monitor hang up calls after 500ms. #710

Closed henlil closed 2 weeks ago

henlil commented 1 month ago

Severity

Major

Versions

18, 20, 21

Components/Modules

res_pjsip_sdp_rtp.c

Operating Environment

N/A

Frequency of Occurrence

Occasional

Issue Description

RTP activity monitor is causing calls to be hung up under certain conditions.

Steps to reproduce: Given rtp_timeout is 10 seconds

  1. Receive a call
  2. Let it ring for a duration longer than 10 seconds.
  3. Answer the call.
  4. Rtp activity started after 500ms but before the 10 second rtp_timeout.

Actual Result: Call was hung up 500ms after answered due to RTP inactivity.

Expected result: Call should not hang up due to RTP inactivity.

Example of the problem: Given rtp_timeout is 10 seconds.

If the call is answered immediately we would have 10 seconds to receive the first rtp before "softhangup" due to rtp inactivity If the call is answered after 5 seconds we would have 5 seconds to receive the first rtp before "softhangup" due to rtp inactivity If the call is answered after 15 seconds we would have 0.5 seconds to receive the first rtp before "softhangup"due to rtp inactivity

Conclusion, it should not matter how long the call was in the ringing state for the rtp timeout logic to trigger the "softhangup".

Relevant log output

No response

Asterisk Issue Guidelines