Overview
This tutorial will walk you through configuring FreePBX to configure extensions, create dial patterns, add in an external SIP trunk, and provision SIP phones.
Before beginning this tutorial you should have access to a DHCP server with configurable options, an instance of FreePBX running (physical or virtual) and a Cisco phone flashed to SIP (this write-up uses a 7941).
Configuring Up Your DHCP Server
Dependent on your home network, this part will either be super easy or a touch more complicated. When your phone picks up a DHCP lease it will be looking for option 150 to direct it to the TFTP server (in this case the FreePBX server). The precise mechanics of how you do it depends on your network, but configure DHCP to direct option 150 to the IP address of your FreePBX server.
Technically speaking option 150 is for a list of TFTP servers; option 66 can be used for a singular TFTP server. If you want to differentiate the TFTP server from the call manager, you can set option 120.
Technically speaking option 150 is for a list of TFTP servers; option 66 can be used for a singular TFTP server. If you want to differentiate the TFTP server from the call manager, you can set option 120.
TFTP Server
If you're builidng out your server using the FreePBX ISO (discussed below) you can ignore this section. If you're configuring your server ontop of a vanilla CentOS installation, you may need to allow TFTP traffic (UDP port 69) through your firewall. To do so issue the following command:
firewall-cmd --permanent --zone=public --allow-port=69/udp
FreePBX
For this tutorial I used the pre-built FreePBX ISO, stable release 6.12.65 with FreePBX 12 and Asterisk 11. I had tried it with release 6.12.65 with FreePBX 13 and Asterisk 12 but had issues configuring the OSS EndPoint module we will use later in the tutorial.
Another option in getting FreePBX installed is to do it yourself through a vanilla CentOS (or other Linux) installation.
Post-installation, all of the FreePBX configuration will be done through the web GUI. You can directly access it through your web browser by heading to the server's IP address. Before we get started make sure you have logged in once to setup your username and password.
Another option in getting FreePBX installed is to do it yourself through a vanilla CentOS (or other Linux) installation.
Post-installation, all of the FreePBX configuration will be done through the web GUI. You can directly access it through your web browser by heading to the server's IP address. Before we get started make sure you have logged in once to setup your username and password.
Free PBX Module Configuration
Before we start to configure anything, there are some module modifications that will need to be made. The order in which you do these steps matters, so pay attention.
- Go to the Module Admin page (Admin > Module Admin)
- Remove the REST Phone Applications module
- Remove the End Point Manager module
- Click the Unsupported button and then click the Check Online button
- Under connectivity, install the OSS EndPoint module
- Expand the module's menu, click Download and Install
- At the bottom of the page click the Process button
- Click the red Apply Config button at the top of the page
We're not doing anything with the OSS EndPoint module just yet, hang tight for a minute!
Extension Setup
To setup extensions for our phone system we're going to navigate to the extensions page (Applications > Extensions). Generic Chain SIP Device should be preselected in the dropdown menu, so go ahead and click the Submit button.
You'll notice that there are a TON of fields that populate. For the extent of this write-up we're only going to focus on the following fields:
- User Extension : The internal extension we're setting up
- Value : 1001 (or you can pick a different extension scheme)
- Display Name : Who this extension belongs to, what the internal called ID will say
- Value : Nathan
- NAT Mode : This is used if the phones are in a NAT environment and the Asterisk server is outside the network with a public IP
- Value : No (this tutorial assumes that all devices are in the same LAN)
- For more information on NAT Mode checkout this article.
- Secret : The Cisco 794Xs tend to be picky when it comes to long secret strings, I've had the best luck chopping down the randomly generated string to 9 characters. It isn't an exact science though.
Once all of these fields are configured, click Submit at the bottom of the page. You'll be redirected back to the main extensions page. Click the red Apply Config button at the top of the screen.
OSS EndPoint Template Configuration
You'll notice that if you were to plug your Cisco phone into the network at this point in our configuration, it would return a message that it hasn't been provisioned. The Cisco phones need an XML configuration file to learn the different settings it needs to communicate with our PBX.
While these files can be written by hand, it's much easier to use a tool to dynamically generate them. For that we'll be using OSS EndPoint Manager that we enabled a few sections ago.
Under Connectivity > OSS Endpoint Package Manager click the Check for Updates button. After it reloads you should get a page listing different phone vendors, click the Install button for Cisco/Linksys.
Again, when the page reloads scroll down to Cisco/Linksys and select the template for your phone model (I used a Cisco 7941G flashed with SIP firmware 9.N.N, so I enabled 7941-9.X)
Phone Provisioning
With everything setup it is time to provision the phone itself. Under Connectivity > OSS Endpoint Device List) input the phone's MAC address in the appropriate field, select Cisco/Linksys as the Brand, 7941-9.X as the Model of Phone, line 1 as the line we're setting up, 1001 as the extension number, and Custom... as the template. Click the Add button, and that's it.
Over the next few weeks I'll be posting follow up tutorials on configuring a SIP trunk and other FreePBX/VoIP related topics.
Conclusion
With all of this up and configured you should now be able to plug your phone in and it should be registered with the FreePBX server. If you have any questions leave a comment below.Over the next few weeks I'll be posting follow up tutorials on configuring a SIP trunk and other FreePBX/VoIP related topics.