Snom make a range of very good IP telephones that can be provisioned in a variety of ways. The method I prefer is DHCP with an HTTP server, shown here to provision a range of Snom 370 phones. Snom describes how to use dhcpd to provision its phones, but I need to do the same with the excellent dnsmasq, so here goes: First I ensure dnsmasq sets a tag ("snom") for devices with the Ethernet prefix reserved for Snom (Ethernet prefix 00-04-13), and I set option 66 (tftp server) for that tag to the specified URL. (Yes, this is the address of an HTTP server and not a TFTP server -- Snom phones understand the URI and will connect via HTTP.) The reason I prefer HTTP here instead of TFTP is that I'm then able to dynamically assign specific settings to a phone based on its Ethernet address, which is passed to the URL in the mac variable.


Additionally, I want specific phones to have reserved IP addresses, so I'll add a dhcp-host option for dnsmasq to do the reservation:


The tftp-server option (66) will be sent to the phone when it boots. The phone will then contact its provisioning server via HTTP, and the PHP script can then provide the phone with settings. There are dozens and dozens of settings described in the mass deployment PDF as well as in the configuration files section of the Snom wiki, so here just a small example using the PHP script the phone invokes from above:

            print '<?xml version="1.0" encoding="utf-8"?>' . "\n";
        <web_language perm="RW">English</web_language>
        <vol_ringer perm="">14</vol_ringer>
        <user_ringer idx="1" perm="">Ringer8</user_ringer>

Provisioning phones this way (i.e. via DHCP and HTTP) allows for a very flexible setup. Using HTTP instead of TFTP allows me to go a step further and dole out settings dynamically.

Flattr this
DNS, PHP, Voip, snom, dhcp, and dnsmasq :: 22 Jul 2010 :: e-mail


blog comments powered by Disqus