FreePBX 2.11 Guide: Inbound calls

Because our VOIP phone system is on the internet there is no geographical restrictions. That means we can purchase a telephone number in any country, and forward the calls to our FreePBX system. Many countries allow anyone to purchase a number in that country, some, such as France, place restrictions that you have to prove you are a resident in that country.

We are going to set up a phone number on our system from UKDDI, currently you can get free UK geographic numbers here.

These telephone numbers are referred to as “DDI numbers” or “DID numbers” depending on which country you are from!

Not working?

There’s no denying that setting up an inbound number can be frustrating sometimes. If you’re a SysAdminMan customer and have set up an inbound number that’s not working then just open a support ticket and we’ll have a look why.

If you’re not a SysAdminMan customer then there’s a couple of troubleshooting guides here –

Sending the call to our FreePBX system

There are 2 different ways this could happen and will depend on which call provider you are using. The 2 different methods are –

  • Our trunk “registered” with the call provider. This tells the call provider what IP to send the calls to
  • We enter a SIP URI in the call providers control panel telling it where to send the calls.

If you enter a SIP URI in your call providers control panel I suggest keeping the number the same as the DDI number you purchased. For example if you purchased the number 441604123123 and your FreePBX server IP address is I would suggest setting to SIP URI to send the call to as SIP:[email protected]

Setting up our number in UKDDI

Here’s our number set up in UKDDI. We are entering a SIP URI and forwarding the call to our FreePBX server IP. Notice I am keeping the number in the SIP URI the same as my DDI number, that’s important later on

UKDDI telephone number

UKDDI telephone number

Setting up our trunks

The first thing we need to do is tell FreePBX/Asterisk what IP addresses incoming calls could be coming from. It is possible to allow all IP addresses to send calls to your system (anonymous SIP), but you don’t want to do that for security reasons.

You may not need to add additional trunks if you are using the same provider for incoming and outgoing calls.

I know that calls from UKDDI could come from one of 2 different IP addresses – &, you may need to ask your call provider what IPs calls could come from.

We tell FreePBX/Asterisk to allow calls from these 2 IP addresses by setting up 2 SIP trunks

UKDDI trunk

UKDDI trunk

UKDDI trunk

UKDDI trunk

Setting up the Inbound Route

The Inbound Route is where we tell FreePBX what to do with a call that arrives at the system.  As a first initial test I always put the call through to music-on-hold. This is better than going to an extension because if the call doesn’t work you won’t know if it’s an issue with the DDI number or the extension. This way we are just dealing with one of them.

Select Connectivity / Inbound Routes from the main menu

FreePBX Inbound Routes

FreePBX Inbound Routes

Now we create the inbound route. The description can be anything, the the DID Number should match the number we forwarded the call to. Setting the destination to “Terminate Call/Put caller on hold forever” will mean that the caller should hear the on-hold music. Don’t forget to Submit, then Apply the config

Inbound Route

Inbound Route

Once the inbound route is working correctly we can change the call destination to our extension.

3 thoughts on “FreePBX 2.11 Guide: Inbound calls

  1. Wycito

    Now that was really useful, seems obvious once you understand it but took me a while to find, cheers, you made my day.
    Have setup as well IPKALL the same way by looking at the log and finding what IP address IPKALL sends with their calls 🙂

  2. Mauricio T.

    Hello, I read your quick explanation and it si well explain and useful. I encounter an issue with my FreePBX setup. My issue is as follows:
    I have notice when checking the CEL table, that every call that rings is labeled as “ANSWER” and when the call is picked up it also labels it as “ANSWER”. I was wondering if you have a tutorial or know of some guides that I can take a look at to solve this. To clarify I want my call track to say only “ANSWER” when the call is picked up.

    Thanks for you time,

    Mauricio Torrejon

Comments are closed.