We have an issue with incoming calls dropping after 30 secs.
Our setup has two servers running CentOS and FreePBX, three internet connections with different providers, and a hardware firewall. The firewall sets which connection is used by which server through policy based routing.
Both servers work fine on the two DSL connections, but both have this same issue when using our cable connection (provided by Virgin Media). Outgoing calls are fine, but all incoming calls drop after exactly 30 secs each time. The firewall rules are the same for all connection (e.g. TCP and UDP ports 5060 are forwarded, etc).
A section from the /var/log/asterisk/full log for a call which is cut off is here: http://pastebin.com/brXRTvEV
I also did a tcpdump from the client machine receiving the call through Twinkle softphone, which is here: http://pastebin.com/PQea2mxv
(Both of the above have been sanitised)
The issue affects me using a softphone from a remote location, and people using both softphones and hardware IP phones in the building where the servers are based.
Any ideas what could be causing these calls to cut off?
This is likely a firewall problem or something wrong with the policy based routing. I would guess that UDP is not being forwarded correctly and after 30 seconds with no voice stream the call is being dropped.
To simplify things can you test using only one ISP and no policy based routing?
Unfortunately the Asterisk server is based at a remote location connected to our Firebox there, so at the minute there’s no way to bypass the PBR or firewall (we’d need to go there and connect the server directly to one of the internet connections).
The calls are fine for the 30 secs they’re connected with audio on both ends, if that makes any difference.
I encourage you to search this site for “calls drop after 30 seconds”, you will find a lot of info that might help you troubleshoot.
By default the RTP time is set in Asterisk SIP Setting module at 30 seconds, you can try adjusting that and see if the time changes, that can help you narrow down the issue. It could also be SIP session timers, or your carrier ignoring SIP UPDATE messages.
At the bottom of the SIP Settings module you can add additional settings manually. Try adding disallowed_methods=UPDATE and/or session-timers=refuse and see if those settings make any improvements.
Thanks for your suggestions. I should have pointed out we’re using FreePBX version 18.104.22.168, so some of options you mentioned above aren’t available in through the GUI (and after the outages we’ve had earlier this week, suggesting we run an update on the servers will probably go down like a lead balloon).
I’ve tried adding the disallowed_methods=UPDATE and session-timers=refuse settings into the sip_custom.conf file, but to no avail.
It was a firewall issue. We changed the IP address to another IP in the same range that wasn’t currently in use, and then set up 1-to-1 NAT on the firewall which solved the problem.