Continueing on from where Part 2 left off, this post will be mostly filled with configuration information used throughout our infrastructure getting it getting for Asterisk.
I left off Part 2 talking about my TFTPd modification that allows me to execture arbitrary commands when a file is requested from my TFTPd server, to explain the rule mentioned in my previous post.
x ^00085D /usr/local/bin/mkaastracfg
the ‘x’ means this is an ‘execute rule’, this is what my patch added. the ‘^00085D’ is the pattern to match, the Aastra phones request a config file named <MAC>.cfg, that 00085D is the OUI prefix for the Aastra phones. Then as you can see it executes my mkaastracfg program, the filename being requested gets passed to mkaastra config as a command line argument, this is how the program collects all the configuration data. The only extra step here is configuring your DHCP server to set option ‘66′ (boot-server) to the IP address of your TFTPd server. If you are using ISC DHCPd you just need to add the following line to your scope.
option tftp-server-name “10.1.0.10″;
This now essentially allowed us to create devices and assign default users to devices inside FreePBX, then plug a brand new right out of the box phone into one of our PoE ports the phone boots up our TFTPd dynamically creates its configuration file when it boots and thats it, the new is up and rocking, no additional configuration required. I also recommend dropping your firmware files on your TFTPd server as well, as your phones will automatically download updates when you place them there.