Provisioning with Snom Phones
Contents
Provisioning FusionPBX with Snom Phones
These instruction are meant for the "CentOS 6.2 with PostgreSQL 9.1" installation script. It may work with other installs as well.
Instructions for installing FusionPBX with CentOS 6.1 and PostgresSQL 9.1 can be found at:
http://wiki.fusionpbx.com/index.php/CentOS_6.2_with_PostgreSQL
This article is originally written by Dar @ Helia in July 2012
Introduction
FusionPBX provides functionality to generate provisioning files for phones. In this article we will be talking about Snom phones however templates exist for other phones as well.
Provisioning Templates
There are a number of provisioning templates available. We at Helia upload our custom templates at time of install and make any customer changes as required directly using Dreamweaver or Filezilla. Dreamweaver and Filezilla have the ability to manage files over SSH so makes updating the files a bit easier. If you do use these tools and create a new file, make sure you update the owner of the files to apache:apache. By default a new file created when you're root has an owner:group of root:root.
Provisioning templates can be found on the file system at: /var/www/html/fusionpbx/includes/templates/provision
These templates allow for variables to be added for required items like phone account username and password, but also parameters custom to your deployment. The files you find in the provisioning templates folder include examples to follow.
Custom Provisioning Variables
At Helia, we add SNMP and custom phone administration passwords to our deployments. There are variables needed for this that is not included as part of the default install. We add this to our systems using a post install script where other Helia specific items are modified or added. The additional provisioning variables we add are:
- Phone Password - SNMP Trusted Address
To add a "Phone Password" variable in FusionPBX:
1. Log in and go to System > Variables
2. Look for a group called Provision and click the "+" on the right. If there is no Provision group, select the "+" in the top right of the page.
3. On the "Variable Add" page add in the following items:
Name> phone_password
Value> my_secure_password
Category> Provision
If a Provision category doesn't exist then select "Other". Set the custom category field to: Provision
Enabled> true
Description> Admin password on the hardware phone, set via the provisioning file. This will be the password used to access the web interface on a phone (assuming the provisioning template includes it)
4. Click the Save button in the lower right
To add a "SNMP Trusted Address" variable in FusionPBX
5. Find the group called Provision and click the "+" on the right
6. On the "Variables Add" page add in the following items:
Name> snmp_trusted_address
Value> 192.168.0.1/24
Category> Provision
Enabled> true
Description> The trusted address range for SNMP requests. This is in the format required by Snom but may work for other brands as well. Ensure the address matches your internal IP range where SNMP requests will be made from
7. Click the Save button in the lower right
Editing a Provisioning Template
As noted above, provisioning templates can be edited directly from the filesystem using tools like Dreamweaver and Filezilla. They can also be edited directly in the FusionPBX web interface, if you are part of the SuperAdmins group.
To edit a provision template:
1. Select Advanced > Provision Editor from the menu
2. Navigate to Files > Snom > 820 and select {v_mac}.xml from the file tree to the left.
The Snom 820 is a deprecated phone. However at the time of this writing, it is the only Snom template available by default. Helia will endevour to have our Snom template submitted to the source tree and be included with new installs.
At this point I'm assuming you are familiar with XML. Also these instruction are specific to Snom ver 8.x firmware.
3. Ensure there isn't a node named snmp_trusted_address. If there is, just edit the value. If there isn't, add the following xml to the settings > phone-settings branch:
<snmp_trusted_addresses perm="">{snmp_trusted_addresss}</snmp_trusted_addresses>
4. Ensure there isn't a node named http_pass. If there is, just edit the value. If there isn't, add the following xml to the settings > phone-settings branch:
<http_pass perm="RW">{phone_password}</http_pass>
5. Ensure there isn't a node named admin_mode_password. If there is, just edit the value. If there isn't, add the following xml to the settings > phone-settings branch:
<admin_mode_password perm="">{phone_password}</admin_mode_password>
Setting Up a Phone Account for Provisioning
Before you add phone accounts for provisioning, ensure there are appropriate provisioning templates for each of the phone you intend to deploy and that they have been added to the templates/provisioning folder.
1. Select Accounts > Phones from the menu
2. Select the "+" add button in the top right
3. The Mac address must be in the format xx-xx-xx-xx-xx-xx. We use a barcode scanner and scan the mac in and then manually type the "-" in afterwards. For this example we will be using the MAC address: 00041326B92B. The mac address will need to be entered as: 00-04-13-26-B9-2B
4. The template is the other important piece of info. Select the appropriate template for your phone.
5. Click the Save button in the lower right.
6. From the Accounts menu, select Extensions and select an extension to be provisioned.
7. Scroll down to find a section called "Phone Provisioning". Select 00-04-13-26-B9-2B from the drop down box and select line number as 1. Support for additional lines is defined by the provisioning template. Check the template to see if other lines are supported.
8. Find the field named "Effective Caller ID Name" This field is used for the {v_line1_displayname} variable used to set the Line Display Name in the provisioning file and on the phone. Enter in the appropriate phone name.
9. Select the "Save" button in the lower right.
The provisioning template can be tested by opening up a web browser and entering the provisioning url. The provisioning url is:
http://voice.example.com/fusionpbx/app/provision/index.php?mac=00041326B92B
Of course replace the mac address and domain with your own.
Using the Provisioining URL to Manually Set Up a Snom Phone
Snom like most IP phone has a web admin interface to configure and monitor the phone. As of this writing, we're using the Snom 8.7.x firmware branch.
1. To find the IP address of the phone, press the menu button on the phone (on the 7XX or 8XX series, or the settings button on the 3xx series) and press "4" for network then "1" for IP Settings and at the DHCP screen, press "X" for no. The IP address will appear on the screen.
2. Type the IP address into your web browser and select "Setup > Advanced" from the left menu and select the "Update" tab from the top.
3. Under "Update Policy", select "Update Automatically"
4. Under "Setting URL" add in the setting URL as:
http://www.example.com/fusionpbx/app/provision/index.php?mac={mac}
The hostname should be replaced with your FusionPBX domain name. Note that we have replaced the domain name with {mac}. This is a special Snom variable to put the phones Mac address in without having to specify it.
5. Select the "Apply" button and then the "Reboot" button and confirm to reboot the phone.
When the phone reboots, it will be provisioned with your appropriate settings
Using DHCP Option 66 to Deploy the Phone
DHCP is an excellent option for phones deployed in a local office. Your Snom phone can be removed from its box and simply plugged into the network. All the setting will be retrieved from the server. Be careful to not open up your FusionPBX to the internet though. Someone who knows your url and a MAC address of a phone can easily retrieve your phone settings including its password.
Each DHCP Server is different. At Helia we use Cradlepoint MBR 1400 and Cradlepoint MBR 95. Each of these allow you to setup DHCP option 66. Setting up DHCP directly on the voice server is also an option.
1. On the Cradlepoint MBR 1400 router, select "Network Settings" and " WiFi / Local Networks".
2. Select the appropriate "Local IP Networks", and select the "Edit" button.
3. On the "Local Network Editor" window, select the "DHCP Server" tab
4. Ensure the "DHCP Enable" checkbox is checked and click the "Add" button to add an option.
5. For "option" select "66 Server Name" and for the value, add the provisioning URL:
http://www.example.com/fusionpbx/app/provision/index.php?mac={mac}
The hostname should be replaced with your FusionPBX domain name. Note that we have replaced the domain name with {mac}. This is a special Snom variable to put the phones Mac address in without having to specify it.
With the DHCP information added, the provisioning template will be applied to the phone next time it fetches a new IP address - usually on its next reboot.