[asterisk-users] Automatic provisioning of Sipura handsets (was: A linksys SPA921 behind NAT and firewall)

Luki lugosoft at gmail.com
Sun Oct 21 15:30:35 CDT 2007


> I'd like to be able to templatize a server, add a bunch of new handsets
> into sip.conf and extensions.conf, and then plug the phones into a
> network and have some DHCP and/or TFTP "glue" logic that sees the DHCP
> or TFTP request, and from it generates a boot file (an .XML file) and a
> response parameter list for DHCP... populates a file into the /tftpboot/
> directory, etc.

Here's how you do it.

1) In the DHCP server's config (dhcpd.conf) you specify the IP of the
TFTP server:
option tftp-server-name "66.55.44.33";
This can be a remote server, as long as it's accessible by the device.

2) The factory settings on the Sipura devices (ATAs and phones) have
/spa$PSN.cfg in the Provisioning profile rule, so the device will
connect the TFTP server you specify and will try to retrieve that
file, i.e. ftfp://66.55.44.33/spa942.cfg for the SPA-942 in this
example.

3) This file contains very minimal information, which tells the device
where to download its final configuration from. This can be a remote
http server so you can maintain the configs on one central server.
Example:

<flat-profile>
 <Profile_Rule ua="na">
   http://YOUR.HTTP.PROVISIONING.SERVER.HOST/$MA.bin
 </Profile_Rule>
</flat-profile>

4) The device will then connect via HTTP and will try to retrieve for
configuration for its MAC address. Since it's a HTTP request, you can
generate the provisioning data on the fly (even from the a database),
either in XML format or in compiled format if you have the Sipura
compiler.

The above works just fine and very reliably. We have disabled periodic
resync as the Sipura phones seem to reboot sometimes for no good
reason when they apply the "new" but unchanged profile. If there is a
config change, we just push it on the phone with SIP NOTIFY option.

--Luki



More information about the asterisk-users mailing list