FreePBX - Basic Resources

Hi Experts,

I have successfully installed FreePBX on Debian by following this tutorial here but having great difficulty in configuring the server and know it's due to my lack of knowledge in the basics of telephony networking. I have a copy of Asterisk The Definitive Guide  and have read the first  5 chapters but the information seems to be over my head. Can you please help provide some guidance on some basic resources I should look at before diving back into the Asterisk guide?

My aim at this time is to just perform a simple test and understand the basics of how telephony networking works.

Many thanks,
Ronniel Allan CastanitoIT ManagerAsked:
Who is Participating?
José MéndezConnect With a Mentor Commented:
My recommendation would be to use this softphone:

You can run 2 instances of the same software, and make it register to different accounts to Asterisk so you can call one instances from the other. Now in the web interface:

Go to Applications -> Extensions -> Add extension
Add a 'password' in the field marked 'secret'
The 'username' is the extension number, which is set when you choose 'add extension'

Now in Blink, press CTRL+P and add a new account with those 2 values so you can register one instance of the phone. Repeat these steps to provision the second instance.

In Asterisk's CLI (rasterisk command on your Linux shell), you can monitor your phone registration by running the command <sip show peers>
MazdajaiConnect With a Mentor Commented:
Have you confirm that everything is installed correctly? If you are new to Asterisk, you can login to the GUI and look around. After that you can starting hacking the config file on terminal.

Resources to perform a quick SIP / call test -
Frosty555Connect With a Mentor Commented:
Knowing how Asterisk works is pretty important, but FreePBX is a graphical interface that wraps asterisk and implements it in a certain way. You can use it while having very little knowledge of Asterisk at all, but swimming through it's user interface can be difficult because there are so many pieces to configure.

So, I know this is going to be a long post but here's my general "checklist" off the top of my head for setting up a new FreePBX server and making it do something useful:

Initial Setup of FreePBX

Install FreePBX Distro onto your server
Configure network (e.g. set a static IP address)
Create a "Generic SIP Device" extension (Application->Extensions), set the "User extension", "Display Name", "Secret" options, leave everything else default. This will be the extension that your phone uses
Go to Settings->Asterisk SIP Settings, and configure NAT by providing your LAN subnet and your WAN IP address in the NAT Settings section. You will need this for when you try to hook the PBX up to a voip service provider later. If you have a dynamic IP address you will need to get yourself a account and a dynamic hostname
Apply config by clicking the red "apply config" button

Setting up an IP Telephone

Set up an SIP-based IP telephone to connect to Asterisk. When configuring the phone, use the extension # as your user ID and the extension secret as the password.  Connect only on your LAN using LAN IP addresses, don't try to make anything work over the Internet, yet. If you don't have an IP phone you can use yet, buy one that claims to support Asterisk such as the Digium D40, or you can use a software-based phone such as X-Lite for windows, or Media5-fone for iPhone or Android. Stay away from STUN or SRV
If you get your phone connected successfully and it looks like it is registering, make a test call to the echo test by dialing *43, or a test call to announce your extension number by calling *65
In FreePBX, go to Reports->Asterisk Info to see information about the registered SIP extensions. Go to Report->Asterisk Logfiles to look at the debug log, which will become your best friend for figuring out why stuff isn't working

At this point, hopefully you have a working phone that can talk to Asterisk! Hooray!

But how do you make the asterisk server talk to the outside world, e.g. place actual telephone calls via the PSTN? That's harder. Here are the general things you need to have configured:

Setting up a VoIP Service Provider

Add a "Built-in System Recording" (Admin->System Recordings->Built In Recording), I like to add the "en/demo-congrats" system recording since it's a nice long "congratulatory" message that makes me feel good
Create an "Announcement" (Application->Announcement) that plays the demo-congrats system recording, then terminates the call. You will be able to test incoming calls by making this announcement play
Set up port forwarding on your router to forward TCP+UDP 4569, TCP+UDP 5060-5069, and UDP 10000-20000 to your Asterisk server IP address. You will need this for the third party VoIP service provider to work
Sign up for a VoIP service provider that specifically provides SIP trunking services that claim to be compatible with Asterisk. I personally use because they are pay-as-you-go and provide actual instructions specifically for FreePBX. Order a DID (telephone number) with the VoIP provider for incoming calls.
Set up a Trunk  in FreePBX for your VoIP service provider. Go to Connectivity->Trunks. Setup instructions vary wildly depending on your VoIP provider. Refer to the instructions and contact their technical support if you have trouble.
Set up an inbound route (Connectivity->Inbound Route), specify the Description only, and leave the DID blank so that it matches all incoming telephone numbers and set the destination to be the Demo-Congrats Announcement
Set up an outbound route (Connectivity->Outbound Route), make sure to specify a Dial Pattern. Use the Dial patterns wizard dropdown to make a "Local 7/10 digit" pattern to match standard american telephone numbers to dial out to the VoIP provider. Select the trunk you created as the destination for the Outbound Route.

In theory, you should be able to now place outbound calls using your telephone, and when you dial the DID you ordered, you should hear the Demo-Congrats announcement.

NOW you're ready to actually play with FreePBX and make it to some neat stuff (like ringing the extensions, setting up an IVR, ring groups, paging, phone provisioning etc.)
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

Frosty555Connect With a Mentor Commented:
Some things to AVOID, at least for now until you are more experience and comfortable with FreePBX.

This stuff is great once you know what you're doing, but for now it just throws extra hurdles inbetween you and a working setup:

Don't try to provision phones via the OSS Endpoint Configuration Manager Provisioning is meant to make your life easier when you have dozens or hundreds of phones to configure. It's vendor specific, and difficult to do initially. Don't bother with it for now. Manually configure your phones for now.
Don't try to connect your phone to your extension over the Internet - Trying to make all the NAT stuff and port forwarding work properly with SIP is hard, and you run into issues with your ISP. Don't try and make that work just yet
Don't try to connect analog bell equipment to the PBX. Do not attempt to use an Analog Telephone Adapter (ATA), FXO gateway, FXS gateway, or line cards. Stay away from Dahdi, and analog telephone equipment until you are comfortable with making the IP stuff work
Stay away from wireless networks. Do everything with wired cables - your PC, your PBX, and your phones should all be connected via good quality wired cables connected directly to your network switch or router.
Stay away from non-SIP-compliant plugins and connectors . Don't attempt to connect Skype, Google Voice etc. to FreePBX. It's not supported.
Prepare to spend a bit of money. You need good network equipment, you need a couple of IP phones, you need a VoIP service provider who offers decent technical support. You need a server with reasonably decent hardware inside to run FreePBX. Telephony costs money, you will have to spend a bit of money to do anything interesting with Asterisk.
Don't worry about fancy phone features - things like Speed Dial, Call transfers, conferences, call forwarding, one-touch voicemail keys, Message-Waiting-Indicator and stutter-tone for Voicemail, Busy-Lamp-Field, intercom/paging, and phonebooks are all fancy features that every phone vendor implements differently. It's hit and miss with FreePBX and there's a lot of little settings to tweak to make the phone work perfectly. It's okay if the little features on your phone aren't working perfect yet, don't let that get in the way of you making the PBX itself do other more useful stuff.
Ronniel Allan CastanitoIT ManagerAuthor Commented:
OMG!! I love you guys..!! Just logged in and pleasantly greeted with a wealth of guidance and information. I'll try my best to digest as much as possible in the mean time and will post back shortly.
Ronniel Allan CastanitoIT ManagerAuthor Commented:
Hi Experts, I have been able to successfully perform a test call using the Blink sotfphones as suggested by willlywilburwonka. I really appreciate the long list of dos and don'ts provided by Frosty555 as I no doubt was going to tick off some of the don'ts but was saved in the nick of time.

My question is on progressing forward. I came across a forum stating that the Asterisk The Definitive Guide shouldn't be used with FreePBX as editing the config files directly would crash the FreePBX gui if one is not careful.

So that leads me to the question, do I need a gui at all or should I just use Asterisk in its purest form? Just thinking about hooking Asterisk up with MySQL seems like a daunting task.

Should I persist with my current book - Asterisk The Definitive Guide?

You thoughts would be highly valued.

José MéndezConnect With a Mentor Commented:
Ricky, in my humble opinion, you should learn Asterisk by itself. If you administer if through FreePBX you may not get to really understand the interconnection of the configuration files. But if you get to master how the internals work, you can then move forward to a front end like FreePBX, Elastix or such.

I personally do not like  any GUI option. I don't find them flexible enough, and you always end up needing a console to restart things or monitor things. My preferred administration method is using a good old Putty session, WinSCP to list the remote files in the Asterisk server, and Notepadd++ to remotely edit the configuration files (it has a plugin to connect to a remote server and pull the files from it).

ATDG is a great book. I would also recommend you this one:

Practical Asterisk 1.4 and 1.6 From Beginner to Expert

The SQL connection shouldn't be so hard. You configured Blink in no time already! Eventually you will get there with My SQL. May I know what type of project is this? Personal for home use? Learning? College? Work?
Ronniel Allan CastanitoIT ManagerAuthor Commented:
Hi willlywilburwonka, thank you for your lightning fast reply!! I was leaning towards what you have said. I guess taking short cuts don't really turn out to be all that short in the long run.

To answer your question, I am co-running a small 3 person cpa firm but have always been an IT enthusiast (going all the way back to my high school days). Always loved working with computers and all IT related. I still don't know why I didn't go down that path. I guess I listened to too many wrong advice and should have followed my heart.

An opportunity to build a PBX for the firm came up and I couldn't resist. I made a case to take up the challenge and here I am. It's really an excuse to escape the accounting world and into the IT world. Haha..
José MéndezCommented:
Oh my Gosh, I feel you there... I kind of stepped a similar path, although I did end up in the IT world as a profession.

If computers and such prove to be a passion for you, yeah, totally dedicate more time to it!!!

Are those 3 persons all accountants? I am assuming you are one them. Just to have an idea of the features that could help you guys be more efficient.
Ronniel Allan CastanitoIT ManagerAuthor Commented:
Oh wow! That's very reassuring to know I'm not the only one out there.. Haha..

Yep, I think I dedicate more time to computers than I do to my accounting profession. It's just hard dedicating to both discipline at the moment as I currently have a young family. I think I might have to choose one way or the other soon.

Accounting is where I make a living but don't think I can do the same with IT.

Yes we are all accountants. I'm the only crazy one trying to do both.
José MéndezCommented:
Wow.... that is a great decision getting closer.  Hope you choose the best for you and your family!

Here is a list of features you may be interested on:

For starters, my recommendation would be to get the following going, I assume your partners will be testing how good the telephony system is going to be?:

- Transfers
- Music on Hold
- Outbound calling
- Inbound call coverage (what happens if all 3 of you are busy and there are incoming calls)
- Voicemail

You get these 5 going all edges rounded up, you'll feel some progress and your partners will feel this is going somewhere. Let me know if you agree, will be more than happy to assist. We have much in common!

Ronniel Allan CastanitoIT ManagerAuthor Commented:
I totally agree with you. Getting those features going will definitely justify my time spent on the project. Haha..

Just to reiterate your point before I close this out and start a new thread is that you would recommend me building asterisk without the gui and connect it to mysql manually for voicemail purposes.

Just thinking out loud now.. This would allow me to truly understand how the system works and if upgrades or faults occurs in the future I would understand what's going on and be able to troubleshoot it more easily. The intimate knowledge of asterisk would also allow me to easily use FreePBX in the future if I so choose to but be able to do so with a higher level of control. I think this is along the same line as your previous post?

Once again, I really appreciate everyones help and guidance in here. It's beyond words the level of generosity within the IT community.
José MéndezCommented:
Spot on!

Let me know somehow if you get stuck at some point along the way, I might be able to further assist. To be honest, I have not tried a database with Asterisk, but the ATDG seems to be fairly thorough on that topic. Personally, I would use Postgres just because that is the DBMS I am learning about right now.

Best regards!
Ronniel Allan CastanitoIT ManagerAuthor Commented:
Thank you all very much!!

I just want to comment on this idea of trying to set up Asterisk from scratch.

That's a hard road to go down. Asterisk is quite complicated, and telephony concepts are often quite a foreign thing to wrap your head around. Learning is is well worth it and will put you on the path to becoming a true telephony expert - but it will take some time and I think playing in FreePBX to start off is a better idea.

FreePBX is to Asterisk kind of like what cPanel is to Apache. And IMHO it is much easier to learn Apache after you've played in cPanel a little bit.

It's easier to learn how to build your own car AFTER you have mastered the concepts of what a car is, what it does, and generally how to use it.

Basically, FreePBX is a layer on-top of Asterisk that helps you to configure it, it auto-generates the config files based on what you enter into the GUI. This does mean you can't manually edit the config files - they'll get overwritten next time you hit "Apply Config" in FreePBX. But FreePBX does provide lots of places where you can add custom configuration if desired. Many of the Asterisk config files include a "xxxxx_custom.conf" file where you can insert your own custom configuration if desired.

But really, 99% of the "normal" Business PBX tasks that you would want Asterisk to do somebody has already thought it out and implemented it about as good as it can be done in FreePBX. There's a whole community of people solving the problems you are sure to run into.

Knowing the Asterisk foundation concepts will greatly help you *understand* how FreePBX is doing things, which will help you use FreePBX more effectively and to debug problems when you find them.  And if you ever want to build something truly custom (e.g. a custom voice-based product that does something special and different from the normal tasks of a traditional business telephone system), then truly understanding Asterisk and hand crafting your extensions.conf will be the only way to do it.

But, I think that these are fairly advanced tasks for later which you will be better suited to tackle when you have already poked around in FreePBX and explored its features a bit.
Ronniel Allan CastanitoIT ManagerAuthor Commented:
Hi Frosty555, thanks for your input. I appreciate you taking the time to write and offer some advice. I agree with both you and willlywilburwonka points. Each having its own advantages and disadvantages.

My plan at the moment is to put together a very basic system from scratch, just for learning purposes. Once I understand how it's all configured, I will then switch to FreePBX to setup the system that will be in production.

Or am I just wasting my time and should just stick to one or the other?
José MéndezCommented:
Like Frosty said, Asterisk is complicated. But:

-  I don't think it is that much complicated, Ricky has already gotten far enough in a few days.

- There is plenty of help out in the Internet if you wish to keep going and learning (like EE)

- Ricky's case is the perfect scenario to start understanding VOIP concepts due to its simplicity

- Really complex VOIP concepts such as QoS and SIP will not be easier whether he decides to use FreePBX or pure Asterisk. Those will still require direct troubleshooting from the console and there is nothing FreePBX can do to alleviate diagnosing such problems. To illustrate: lets says there is a problem with the media negotiation in a call between a phone and an ITSP SIP trunk provider. You'll have to analyze the SIP messaging whether you want it or not. This is inherent to VOIP, and as such, FreePBX doesn't provide a way to easily understand how to fix that scenario or any other similar one.

- Hiding its complexity actually keeps you away from really mastering and understanding the beast inside.

- If you get to learn how to administer the software as if it was any other Linux software, you'll also have the benefit that all the hassle will groom you as a better Linux administrator

Now, I do think you should test how to accomplish the same things you have already accomplished in your production environment, by using FreePBX or Elastix in a test machine, so that you get a feeling of the product and decide by yourself..

Just my 2 cents.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.