Auto Re-Provisioning Polycom Phones

By · Published · asterisk

At dealnews, as I've written before, we run Asterisk as our telephone system. I find it to be a pretty good solution to our telecom needs: we have multiple offices and several home-based users.

And, for the most part, for hard telephones, we use Polycoms. We run mostly IP-330s, with a couple of IP-4000s and a few new IP-331s. We also have softphones, a couple of PAP2s and a couple of old Grandstreams from our original Asterisk deployment in 2007 that I'm desperately trying to get out of circulation. But it's mostly Polycoms.

Recently, I changed how we were doing provisioning. I'll write a more in-depth post about this later, but the short of it is that since Polycom phones use XML for their configuration information, we now generate them dynamically instead of creating a configuration file. It's what I should have done back in 2007 when we bought our first round of Polycoms.

But this presented me with a problem: how do I re-provision the older phones - some of which I don't have easy physical access to (at least that doesn't involve an airplane ride) - to use the new configuration system?

In doing some research, I discovered that Polycom allows you to set, via certain commands, the provisioning server from within a config. With this information, I crafted a custom re-provisioning config that looks like this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
  <device device.set="1" 
  device.dhcp.bootSrvUseOpt.set="1"       device.dhcp.bootSrvUseOpt="2""1""0" 
  device.prov.serverType.set="1"        device.prov.serverType="2" 
  device.prov.serverName.set="1"        device.prov.serverName="server"/> 

And included it at the top of the 000000000000.cfg file (one of the default files downloaded by each Polycom phone):

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 

Then, using Asterisk, I issue the check-config command:

asterisk*CLI> sip notify polycom-check-cfg peer

The phone should reboot, pick up its new config, then reboot again with with proper new provisioning information from the new provisioning provider.

Next post, I'll show you how to use PHP and mod_rewrite to eliminate the need for per-phone config files.

( Comments )

Did something I wrote help you out?

That's great! I don't earn any money from this site - I run no ads, sell no products and participate in no affiliate programs. I do this solely because it's fun; I enjoy writing and sharing what I learn.

All the same, if you found this article helpful and want to show your appreciation, here's my wishlist.

Related Posts

Automatically Provisioning Polycom Phones

Slides from my talk at PHP Appalachia

comments powered by Disqus