Linksys SPA9xx IP Phone Autoconfiguration System
CESNET technical report 7/2008
PDF format
Michal Petrovič
Received 27.11.2008
Abstract
Autoconfiguration System is intended for automated installation of certain types of 9xx range IP phones by Linksys. It allows multiple phones to be installed without consuming the time of administrators usually required to install the phones.
Keywords: SIP, IP telephony, SER, OpenSER, Linksys
1 Linksys SPA9xx IP Phones
The Autoconfiguration System is intended for automated installation of certain types of 9xx range IP phones by Linksys. It allows multiple phones to be installed without consuming the time of administrators usually required to install the phones.
| Type | No. of RJ-45 Ports | No. of Phone Lines |
|---|---|---|
| SPA921 | 1 | 1 |
| SPA922 | 2 | 1 |
| SPA941 | 1 | 4 |
| SPA942 | 2 | 4 |
| SPA962 | 2 | 6 |
Table 1. IP Phone Models Supported
2 Autoconfiguration System Components
The Autoconfiguration System consists of several parts:
Web-based administration interface used to initialize configuration
LDAP server providing user-specific information used by the Web interface
DHCP server assigning IP addresses dynamically from a reserved range
TFTP server sharing typical configurations to be downloaded by IP phones when they start up for the first time, and also specific configurations for individual phones
MySQL database storing information on SIP user accounts
Request Tracker used to track domain name and IP assignments
SIP phones offering the Provisioning feature
3 Autoconfiguration System Principles
Thanks to the extended functionality of firmware versions 5.1.9 and newer, it is possible to rely on additional information provided by DHCP servers, namely supplying TFTP server addresses (1). A TFTP server can provide a provisional “initial” configuration (2) referring the IP Phone (3) to a specific configuration. The whole Autoconfiguration System relies on information entered into the Web Interface consisting of a simple form (1, 2) used to register users (3) and generate configuration files to be stored on the TFTP server (4). Once the registration form is filled in, the Web Interface also submits a request for an IP address and a domain name to the Request Tracker (5). Subsequently, appropriate records are created in DHCP and DNS (6, 7). The IP phone can be connected to the network after the message “registration is successful” was send to user.
Figure 1. Autoconfiguration System Components Diagram
4 Web Interface for Administration
Initially, it is necessary to specify the login name of the user (as registered in Orion – the university-wide information system) whose IP Phone we want to configure automatically. A simple form follows with most fields pre-filled with information acquired from the LDAP server based on the login name provided earlier. The Administrator actually only needs to fill in the passwords for the user's SIP account. MAC addresses have to be specified for hardware phones, SW IP phones do not require that. Other fields are optional, however it is advisable to fill them in since they provide references to other information systems. These include records such as the IP Phone serial number, domain name (hostname), inventory number, or user permission settings.
Figure 2. Registration Form Example
The form has been slightly modified for use at the University of West Bohemia. SIP Passwords are generated automatically (though it is possible to change them) since they are only used to configure the IP phones and users do not need to know them. Besides that, the IP phone MAC address and serial number can be now filled in semi-automatically using a bar code scanner. This minimizes the risk of typing errors. All Linksys phones carry appropriate bar codes printed on the outside of their packaging so that it is not even necessary to unwrap them.
5 DHCP Server Configuration
Every IP Phone must be registered in DHCP and DNS services to obtain IP address automatically. The whole Autoconfiguration System relies strongly on DHCP records extended with optional attributes – so called DHCP Options. The number of the relevant attribute is 66 “tftp-server-name” and it contains the IP address of a TFTP server. For example, using the dhcpd.conf configuration file in Linux, the appropriate record looks like this:
subnet 192.168.1.0 netmask 255.255.255.0 {
option tftp-server-name "192.168.1.1";
...
}
6 TFTP Server Configuration
The TFTP Server needs to be set up to listen and receive data on UDP port 69. The root TFTP directory contains the initial configuration file used to instruct each IP phone to download its specific configuration. The initial configuration file's name follows the spa<type>.cfg pattern (for example, Linksys SPA922 would require a file named spa922.cfg). IP phones select their specific configurations referring to MAC addresses stored in the $MA format. For example, a specific configuration for a phone whose MAC address is 001122334455 will be found in a file named spa001122334455.cfg, which is referred to in the initial configuration file as /spa$MA.cfg. Other formats may also be used to store MAC addresses. For example, referring the phone to /spa$MAC.cfg will make it look for a file named spa00:11:22:33:44:55.cfg.
The contents of the initial file:
<flat-profile>
<Profile_Rule ua="na">
tftp://tftpserver.domain/config/spa$MA.cfg
</Profile_Rule>
<Resync_Periodic ua="na">
5
</Resync_Periodic>
</flat-profile>
7 MySQL Server
The whole Autoconfiguration System cooperates with an OpenSER 1.3 VoIP exchange, which uses a MySQL database to store its configuration. Once the administrator submits a registration form, the registration systems creates the requested user account in the MySQL database and generates the specific configuration file. This allows the Autoconfiguration System to be used with any PBX relying on MySQL to store user account information. User-specific configuration files are generated using a template containing the complete configuration information for an IP phone. The generator simply adds user-related data and stores the resulting XML under the appropriate name.
8 Cooperating with the Request Tracker
The final task the Autoconfiguration System fulfills is submitting requests to Request Tracker. DNS and DHCP administrators process such requests and provide DHCP configurations assigning the given IP addresses to phones depending on their MAC addresses. Registration also involves DNS records, which allow the IP addresses to be translated into domain names. When generating requests, newly registered users are given as requestors, which allows them to be notified once the requests for DNS and DHCP registration have been processed.
9 Conclusion
This Technical Report discusses IP telephony implementation as used by the University of West Bohemia in Pilsen. Similar approach may be taken to implement IP telephony in other medium and large organizations. The Autoconfiguration System can easily run on a single server, and the DNS and DHCP registration phases can be automated. More information about autoconfiguration system and examples are available at http://sip.cesnet.cz.