FreePBX and

Hi folks - I’m sure you all heard this before - “I’m new to this forum and could use some help!” “I hope I’m in the right place”

Please excuse my ignorance but I am having some trouble understanding how to set up our system. We are presently running Asterisk 1.8 ( recent upgrade from 1.6 ) on Ubuntu server - It kept breaking with every update so I stood up a new server and installed your Distro with Asterisk 10. I really like the GUI approach and my new server seems to running very well. OK - now what? - big question I know - but I do not know how to configure my new system to run with I have my old system still running abd will turn it over to the new as soon as I get it set-up.

So far - all I did was create my extensions and voicemail entries and updated the modules etc etc using the GUI. Where do I enter the data supplied by bandwidth? do I just copy my sip.conf, extensions.conf, etc over from old /etc/asterisk directory to new /etc/asterisk directory? or is the GUI the place to be and not text editors? Our sip.conf file and extensions.conf files have entries for BandwidthIN and OUT with IPs etc. - and we have a number of contexts for IAX2 trunk and other features on our system - I could draw from.

I looked over the various Tabs and Menus in the new GUI and although it looks terrific I am not quite understanding what to do now.

Probably answers all over the net which I have been to too but it’s not making sense to me yet. I was hoping I could samples or examples here.

Thank you - I am really looking forward to using FreePBX.

Your old config files may vary from a different version of asterisk etc. You may wish to recreate your trunk settings to avoid a meltdown…it should only take a few moments…

You should be able to add the trunks via the FreePBX GUI. should provide the configuration details on their site, you may need to login to their customer portal/account. I’m sure if you ask them they’d be more than happy to send you a link/setup guide as well.

I am new too, I just got this running.

Go to connectivity > trunks and add a new one with the info they sent you.

Peer Details:

User Context is the DID they gave you

User Details :

Register string is BLANK

Go to Applications > Extension and add an extension or two
Go to Connectivity Inbound Route and leave everything alone except destination at the bottom - that should be set to your extension for now, probalby set to an IVR later.

Go to Connectivity > outbound routes and add a new one
Everythting is default except the Dial Patterns
Put a “+” No quotes in the prepend field of all patterns
leave the prefix blank and paste “1NXXNXXXXXX” in the “match pattern” field. That will let you get a call out while you ar efiguring what patterns to allow on this trunk.

Then log in to the server via command line and configure postfix for email notifications. More on that at

That should get you started. IVR would be the next stuff to set up once you have extensions working.


Wow - thank you both for the replies and answers. Maybe I am over-complicating this. I have the info from Bandwidth and I’ will apply it via the GUI.

I think part of my issue is that I don’t fully understand some of the format Asterisk uses, i.e. what the “1NXXNXXXXXX” means - chicagorock shows.

I’ll work this today.

Thank you.

We have used for years, and the setup is pretty easy. The one quirk is they like to use E.164 by default, which to most in the US is pretty much unheard of it seems. FreePBX has support for handling this, or you can do like I usually do and just ask them to switch to 10 digit dialing, and then all works normally.

As to the trunks, the only thing we have trunk info wise is info in the peer details, one for east, and a second trunk for west. Just in your outbound routes, call your closest path first, and then followed by the backup. The only difference between east and west are the IP address:


User Details, are left blank, and it works like a charm. We don’t need NAT on our end, so it’s set to no, but that may be different for you, and we also have canreinvite set to know, as phones internal can’t talk directly to outside resources either.

For help on anything in FreePBX, ther is a faint blue circle next to almost every field name. Hover over that on “dial patterns” and it explains the coding for these entries

Yes - I see those - and they do help a bit.

I’m so used to the Command line way that this GUI is throwing me a little. Bandwidth gave me 4 IPs originally on the system we have now it was just a make of editing the sip.conf file and the extensions.conf to show the 2 Incoming and 2 Outgoing IPs ( Alternates ).

I am guessing that in FreePBX I set up 2 Trunks ? one for each IP?

Thank you WB3FFV! We too have been using Bandwidth too and we like it. My issue is more with the FreePBX set up and configurations.

Currently we run Ubuntu with Asterisk 1.8 and use I need to replace that with the FreePBX /CentOS I am now working with.

For some reason - I am having a brain block on how to get our new set-up configured. I have all the data from our present set-up - I have the input from you folks here all good stuff! - But I am not seeing the connection.

I need to put that data into FreePBX GUI; for instance - Under SIP Trunks - I see where to input IP Address etc. for Bandwidth but I don’t understand what to put in the USER Context/ USER Details box in Incoming Settings.

Also - I have an Outbound Bandwidth IP Address I don’t see where that is input - Outbound Routes?

I have 2 addresses from Bandwidth for Incoming ( one’s an Alternate ) and 2 for Outbound ( also an alternate ). Do I create a second set of trunks?

I can’t pull the plug on my present server until I know this one will work - I need to Static the IP on FreePBX server with the IP address I have on my Ubuntu server and shut that one down.

I have other offices to worry about too - they each have their own Asterisk server and I need to make sure we can each dial each other too but hat could wait until I get this one up and running.

Guess I need that AHA! moment to happen.

The second set of peer details is provided in case your provider had discrete servers for inbound and outbound. It’s just a container to group them from a functional perspective. FreePBX creates a separate peer for each of the trunk settings in a single trunk.

OK - a got a little farther with my setup - I was able to attach a sip phone ( SNOM 320) to my switch/server - and it did register - I see it in sip show peers etc. I advised I have 2 servers a live one and a test one ( this one ) so I can configure the new server live.

Anyway when I try to make a call from internal sip phone to my Cell - I get a CLI error saying Extension not found in context “from-internal”.

Not sure where that appears but I do see a context line in my Outgoing Settings PEER Details section of Sip Trunk that reads context=from-trunk.

So - do I change that? or is there somewhere else I should be looking at “context’s” ??

Do you have an outbound route to your trunk that matches the dial pattern?

I set up 2 routes in Connectivity, 1 for inbound and 1 for outbound.
My Inbound is basically all default blank fields except for the Description and the Set Destination on the bottom of page - that says Trunks BandwidthIN ( the trunk I added)
My Outbound Route is Named Outgoing - it has a Route CID ( name on m,y company ) and I added 3 dialing patterns1NXXNXXXXXX, NXXNXXXXXX, and NXXXXXX and in the Trunk Sequence for Matched Routes I put BandwidthIN in the drop down.
I set up 2 SNOM phones attached to the new server which are recognized and can dial each other but that’s it!
FYI my present system ( asterisk 1.8 on Ubuntu ) still wroks using Verizon ISP - this new system I’m trying to set up is on a new Comcast Internet line we are switching over to once I get this working. Don’t know how this plays out with my configuration. Bandwidth says no problem - they are “watching” both our Public IP addresses ( one from each router ) and allowing traffic to each.
I don’t see where or IF I can send up a couple screen shots.

You could post some log output from when you try and make a call.

Ok I will pull some logs… in the meantime, Bandwidth is watching traffic - they say I’m using 10 digit pattern when they say it should be in format. Please send in e.164 format or +1NXX-NXX-NXXX

I don’t fully undertand how to populate my outgoing Trunk Dial pattern.

I have (_____) + _____ | [1NXXNXXXXXX / ____] in there now. Not sure where those characters go.

Hover over the tool tip in outbound routes so you understand “where those characters go”. It is important that you understand and are not just typing jibberish.

For example, N is an integer between 2 and 9, X is an integer between 0 and 9. Since phone numbers can’t start with a 0 or a 1 do you see how these variables are useful in matching dialed digits?

The match field is a mask, the result of a logical AND “this and that” is summed between all characters, if the value is 1 it matches.

Sometimes folks relate to the math easier than the telephony terms.

I’m just not making the connections here - I tried a number of combos and all I get is Cannot complete the number as dialed. I showed the “entry” line earlier - if you could please tell me what I sneed to enter is those fields and do I enter the same for Trunk page and Outbound page- I would be grateful.
I can make internal calls to other extensions but that’s all.

I would send you a pizza if I could.

Use the hover help to understand.
I’m not really contributing anything not told but spelling it out.

Dial patterns are made up like: prepend(insert)/ prefix (to remove|) / pattern
there’s also a ‘/callerID’ but we can ignore that for now.

chicagorock in message #3 actually posted exactly what you need to do

insert a +/remove nothing/match 1NXXNXXXXXX
But you mention two other patterns you wish to accept so also fill in:
insert +1/remove nothing/ match NXXNXXXXXX
insert +1nxx (replace nxx with your area code)/remove nothing/match NXXXXXX

Assuming you put these three patterns in your route, your trunk will just need the resulting +1NXXNXXXXXX to pass along. Notice, you’re not allowing anything like 411 or such.

Take a second and think this through.

You want to prepend the +1 so that goes in the prepend field then you want to match 10 digit dialing so you use NXXXXXXXXX in the match field.

Prepend is what it adds to the front on a match
Prefix is what it strips on a match (must match prefix + match pattern)
CID is what extension it applies to (leave blank for all extensions)

I don’t want to just give you the answer. That isn’t really helping.

That would have to be one awesome pizza, do you know what my rates are?

Call bandwidth, and tell them to switch your lines over to 10 digit both inbound and outbound, from your current setting of e.164, that will make it far easier on you to understand and follow. As SkykingOH said, you can very much make it work with e.164, and you can use the context from-pstn-e164-us to straighten out the caller-id and all for you.

Still it seems the easiest thing, and hey I did it, was just call bandwidth and have them change to using 10 digit, and then things will work as you expect…

Guys - I’m getting it now - I placed a “+” in the prepend field of my dialing rules ans was able to call out!! I didn’t understand exactly what chicagorock in #3 was saying about that “+” sign becasue, to me, I saw the + sign already in the string in the GUI - at least that’s what I thought.

OK we have a working system - time to move on.

I want to thank all of for the input and patience.

This was one of the best “Forum” experiences I’ve had.