Just had a situation where all inbound calls would disconnect after about 38 seconds. outbound calls were fine. Had the sip provider run a trace on a few test calls and it appears the PBX was sending a “Bye” after about 38 seconds.
Seeing nothing obvious and no recent settings changes I punted an turned off the firewall. The disconnects stopped. Turned on the firewall again and call’s continued to stay up past the 38 second mark.
Not sure what it was or why but it seemed the firewall was causing inbound calls to drop.
The ONLY way for a BYE to be sent to the provider is if Asterisk sends it. There is no way for the firewall to do this, and no way for the firewall to tell Asterisk to do it. I don’t see how this can be a firewall issue.
Thinking further, it could be possible for something (such as the firewall) to interfere with a bridged channel to a trunk call. So if a local extension is on a trunk call, and something caused the local extension channel to drop, then Asterisk would send a BYE to the provider channel. I can’t think of any mechanism that iptables could do that would interrupt a call in progress. If there was a block, it would prevent the call from being set up to begin with, or possibly be set up with no audio.