Setup Automatic Polycom provisioning on Asterisk GUI

The details necessary to enable Polycom provisioning from the ‘Users’ tab of the Asterisk 2.0 GUI.  By default auto-provisioning will not work out of the box.  You would think when the GUI is installed that it would be setup as well, considering that you have the option to enter a MAC address in the user extension creation process.

Asterisk 1.6 installation automatically creates Polycom template files in the, ‘/var/lib/asterisk/phoneprov/'folder.  These template files feed Asterisk variables as directed in the, ‘/etc/asterisk/phoneprove.conf’ file.

The first step, is to add an entry to the ‘/etc/asterisk/http.conf’.  This instruct’s asterisk to make ‘/var/lib/asterisk/phoneprov’ available to the built-in Web Server at, ‘http://127.0.0.1:8088/phoneprov’.  This is the address we will program our Polycom phones to use when attempting to pull their XML configuration files.

/etc/asterisk/http.conf

       [general]
       enabled=yes
       bindaddr=0.0.0.0
       enablestatic=yes
   
       [post_mappings]
       ;
       ; In this example, if the prefix option is set to “asterisk”, then using the
       ; POST URL: /asterisk/uploads will put files in /var/lib/asterisk/uploads/.
       ;
       uploads = /var/lib/asterisk/uploads/
       phoneprov = /var/lib/asterisk/phoneprov/    

Lets check to make sure that the http server is up and well.  Notice ‘/phoneprov’ directory is available.

*CLI> http show status
HTTP Server Status: Prefix:
Server Enabled and Bound to 0.0.0.0:8088
Enabled URI’s:
/httpstatus => Asterisk HTTP General Status /phoneprov/… => Asterisk HTTP Phone Provisioning Tool /manager => HTML Manager Event Interface /rawman => Raw HTTP Manager Event Interface /static/… => Asterisk HTTP Static Delivery /mxml => XML Manager Event Interface
Enabled Redirects: None. *CLI>

Edit the ‘/etc/asterisk/modules.conf’ file to ensure that the res_phoneprov module is being loaded by asterisk.  Add ‘load => res_phoneprov.so’.

/etc/astersik/modules.conf

[modules]
autoload=yes
preload => func_strings.so
noload => pbx_gtkconsole.so
load => res_musiconhold.so
;
; Load one of: chan_oss, alsa, or console (portaudio).
; By default, load chan_oss only (automatically).
;
noload => chan_alsa.so
;noload => chan_oss.so
;noload => chan_console.so
load => res_phoneprov.so
We must now create the directory where our Polycom firmware will reside. This directory must be named, ‘configs’ and must reside in the ‘/var/lib/asterisk/phoneprov’. If you want to change this you must edit the options in, ‘/etc/asterisk/phoneprov.conf’ file.
cd /var/lib/asterisk/phoneprov/
ls
000000000000.cfg  000000000000-directory.xml  000000000000-phone.cfg  polycom.xml
mkdir configs
ls
000000000000.cfg  000000000000-directory.xml  000000000000-phone.cfg  configs  polycom.xml     

Download Polycom firmware for your specific model to the newly created ‘configs' directory.  The Polycom SoundPoint IP phone download page can be found here: http://www.polycom.com/support/voice/index.html
In my case I was using an IP 335 model.

cd configs
wget http://downloads.polycom.com/voice/voip/sp_ss_sip/spip_ssip_vvx_3_2_3_release_sig_split.zip
unzip spip_ssip_vvx_3_2_3_release_sig_split.zip     

Now that we have our Asterisk configuration and firmware we are ready to add a user entry through the Asterisk GUI 2.0. Login with your admin/password (the one added to manager.conf). Click on the ‘Users’ tab. Add a SIP user (you'll need a default Dial Plan first). Enter the MAC Address of the Polycom phone in the ‘MAC’ field. Remember to use lower case letters, you can find the MAC/Serial No. on the back of most Polycom Soundpoint IP SIP phones.

Remember to configure your phone for HTTP provisioning.  At boot, enter the setup menu with the default ‘456′ password.  Navigate to the ‘Server Menu’ section.  Select HTTP as ‘Server Type’.  For server type in the Asterisk server address with ‘:8088/phoneprov’ appended.  So for example, ‘http://10.100.32.50:8088/phoneprov/’.