FreePBX, pfSense, Site to Multi-Site VPN - Calls Immediately Hang Up

Hi Everyone,
I’ve worked on this issue for 16hrs before posting, so I hope I can supply enough information to help you help me :wink:

Network Configuration is as follows (Corporate HQ AKA CHQ) (Location of FreePBX Server) (Remote Office 1 AKA RO1) (Remote Office 2 AKA RO1)

RO1 and RO2 connect to CHQ via pfSense OpenVPN site to site configuration Peer to Peer UDP IPv4.
All routers, clients, and interfaces are reachable via any other network.

Sip trunk is configured according to Digiums recommendations, and it is up and running.

I have inbound route setup so that when my office number is called, it rings extension 1000, so an attendant can answer the call. FreePBX server is on and Extension 1000 is on Again, these sites are connected via peer to peer openvpn server.

When someone rings our company phone number, Extension 1000 indeed rings, but when its answered, the call immediately hangs up. I have a soft phone app on my android phone, so I tried to setup a different extension, 1001, and changed the inbound route to ring extension 1001 when my company phone number is called. After doing this I tested, and the same exact thing happened. My soft-phone app rang, but when I answered, the call was immediately terminated.

Any ideas?

Have you debugged a call? I’m guessing here but maybe you have a codec mismatch issue? Immediate call hangup is a consequence of codec mistach, among other things.

I’ve statically set the codec of the sip phone to g729 and the sip on freepbx to g729. How do I debug a call?

In the asterisk CLI type sip set debug peer XXX where XXX is the extension that will be receiving the inbound call, for example sip set debug peer 1000
Then make an inbound call and you will see the SIP messages in the CLI. Once the call fails type sip set debug off so the debug is turned off and then you can evaluate the SIP messages to see what’s going on.

When you answer a call on does it work?

Did you add all subnets in asterisk SIP Settings? (restart asterisk after making changes there)

If you did, what ports do you have open to your PBX?

@PitzKey might be on to something.

FreePBX has an integrated firewall. Among other things to look at, you should check the internal blacklist to make sure that your phones haven’t been blocked during your testing. Also, make sure that the phone system has a clean route (check the from console log in) to all of the phones in the remote network. Double check the internal firewall setting to make sure that all of the networking in the local network are whitelisted.

If you “tail -F /var/log/asterisk/full” from the console login (login as ‘root’) and see what happens with the call. If the call isn’t getting processed, it’s either a routing or firewall problem. If the call gets through but rejected, let us know the error message and we can troubleshoot from there.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.