Calls Drop After 30 Seconds¶
Symptom: every call (or specific calls) cuts off at exactly 30 seconds, sometimes 31. Both sides connected, audio flowing — and then silence + drop.
The "exactly 30 seconds" pattern is diagnostic — it's an RTP timeout firing.
Most Likely Causes¶
rtp_timeoutset to 30 on the endpoint, AND RTP is one-way or asymmetric (the timer fires when no media is received).- Carrier-side session timer — some carriers mandate a SIP session refresh; if it doesn't happen, they hang up at their timeout.
- NAT timer on a router/firewall mid-path expires UDP state.
- Phone keepalive interval too long, NAT pinhole closes.
Diagnose¶
# Look at the SIP flow:
sngrep -d any
# Open the call. Around the 30-sec mark, who sends the BYE?
# - From PBX with reason "RTP Timeout" → endpoint rtp_timeout firing.
# - From carrier with cause 102 / Timer Expired → carrier session timer.
# - From phone → phone-side timer.
# Check endpoint settings:
asterisk -rx "pjsip show endpoint <ext>"
# Look at rtp_timeout, rtp_timeout_hold, timers.
Fix¶
- Endpoint rtp_timeout firing because RTP truly is broken: fix the RTP path (see One-Way Audio).
- Endpoint rtp_timeout firing because of legitimate silence (long hold): raise the value or use
rtp_timeout_holdseparately. User Attributes → Extensions →→ Advanced → RTP Timeout = 0 disables it (only do this if you trust the network). - Carrier session timer: enable session timers on the trunk. Trunk Attributes → Trunks →
→ PJSIP Advanced → Session Timers = Yes with a min/max around 600/1800 seconds. - NAT timer: lower the SIP keepalive on phones/softphones to 30 seconds. UnifiedBX softphone has this in account settings.
When to Escalate¶
Drops at exactly 30 every time, all settings correct, all sides confirmed sending RTP. Could be an upstream firewall enforcing a 30s UDP rule. Capture pcaps on both ends and compare; missing packets only mid-path = upstream firewall is the culprit.