Call hangs after 15 minutes
The switch may not be responding to the SIP re-INVITE.
Some providers perform a SIP re-INVITE every 15 minutes for any active calls. It's a way of checking if the call is indeed still active. If an appropriate 200 OK is not received back, they disconnect the call.
POSSIBLE CAUSES/SOLUTIONS
Change Provider
Change the Provider and check if the issue is gone to confirm the origin of the problem.
Canreinvite setting
Set canreinvite to yes in the Device's Edit window.
UDP fragmentation
Oversized UDP packets (>1500) may be dropped at some point. That prevents the oversized Re-Invite packets from reaching the system, halting the call.
More details and how to test here: Re-INVITE UDP fragmentation
Solve NAT issues
- Make sure the network is configured properly, and all packets reach the Softswitch.
- Do pcap capture and analyze the logs.
- check the domain in the request URI
- check if Public IP addresses are placed in SIP headers
Adjust session timers
In the Device or Provider settings page, you can change these parameters:
session-timers
session-expires
session-minse
session-refresher
Check which settings the User or Provider requires and set them accordingly.
Disable session timers (not recommended)
In the general section in /etc/asterisk/sip.conf: session-timers=refuse
It can be done per Device on the Device Settings page.
IMPORTANT: The Drawback is that a call can appear to run forever if the BYE message is lost due to network issues.
MicroSIP example
Example lines from MicroSIP invite:
Supported: replaces, 100rel, timer, norefersub Session-Expires: 1800 Min-SE: 90 User-Agent: MicroSIP/3.21.6
By default, this means that MOR should send a re-INVITE after half the Session-Expires value (1800/2 = 900 seconds = 15 minutes) to ensure the SIP session remains active.
If we can see from the SIP trace that microSIP does not respond to MOR ReINVITES (and then MOR drops the call), you can try the following in the device settings that represent the SIP device:
a) Set SIP Session Refresher: to UAC (default is UAS). This means that microSIP will send re-INVITES to MOR; maybe this will work better. (Under MicroSIP's Devices settings)
b) Another approach is to set the SIP Session Timers to refuse