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 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.
Solve NAT issues
- Make sure 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 what settings the User or Provider is requiring 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 Device Settings page.
IMPORTANT: The Drawback is that a call can show as going on forever if the BYE message is lost due to network problems.
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 time of the Session-Expires value (1800/2 = 900 seconds = 15 minutes) to make sure that the SIP session is still 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