No inbound calls, suspected firewall issue

Hello, how is everyone doing? I need some help setting up some firewall rules on opnsense to allow my freepbx server to allow inbound/outbound calls for my freepbx system.

I’ve created some NAT rules which I’ve attached below, when I try and dial my phone number it seems no calls hit my freepbx server which is firewall rule issue, when I use an echo test on my IP phone to my freepbx server it works fine.

Thanks, Leprejohn

Looks similar to mine but I’m using an alias and have a NAT outbound rule, everything is working great once I added the NAT rule.

Thanks for this but just a stupid question when you added the outbound NAT as I know you are using alias, what should I put for my source/destination address.

My SIP trunk provider have provided me with their IP ranges so I can lock down my rules, once I actually get get my inbound calls working

Source should be the PBX IP, destination should be the VOIP provider’s IPs. I put them in an alias for easy management.

Here’s the source documentation I followed: pfSense Configuration Recipes — Configuring NAT for a VoIP PBX | pfSense Documentation

Great thank you. I’ve never used alias before, in opnsense would I select network as my alias? See below:

If they have a range do networks, something like If it’s a single host (likely), do just that IP.

I have and they list it as hosts.

I have two ranges a /26 and a /27 range

In that case do network

Great thank you, so I created the rule however I was still not getting any inbound calls to my freepbx server:

So I’m going to rebuild my trunk, inbound/outbound rules in freePBX encase I missed something

I believe the port needs to be static as otherwise it’ll go outbound on a port not 5060 which can cause your VOIP provider not to connect.

Hi Gsrfan01, I’ve edit my rules to include 5160 aswell as 5060 (my chansip is set to 5160 and pjsip is 5060).

I’ve set the trunking up as a chansip as that is the setup guide my VOIP provider had listed however I’m still having issues with calls hitting my server, when I dial my number it doesn’t ring and nothing is appearing on my freepbx console

Go to Reports → Asterisk Info

Scroll down to Registries and take a look at those, you should see something like this

Is your SIP trunk listed as “registered”

My SIP isn’t registered however it does state on their wiki that this is normal see below:

Can you call outbound? When I was setting it up before everything was working I could call outbound, it would ring, but no audio would go over either line. Then after 10-15 seconds it would hang up.

Since everything is working internally, I’d say it’s something with either the NAT, or port forwarding. You’d also want to make sure that the firewall on FreePBX is good.

I’m unable to make outbound calls I get an error from PBX to say that call can’t be completed check number and dial again

What do your outbound settings look like?

Hi please see the below:

I’ve got a bunch more dial patterns, I’m US based so these may not be applicable to you. I don’t think your dial pattern has enough numbers to be an outside dial, but I could be wrong based on your location.

So I was following the wiki guide created by my SIP provider, I set most of mine on my trunk:

This is what I followed when I first set this system up, Chris goes through every step in detail. The only specific information I followed for for my SIP trunk.