David Gomillion
2005-Feb-08 12:56 UTC
[Asterisk-Users] Polycom/sip.conf/voicemail configurator
I have just created a very rough (read hack-ish) version of a Polycom SIP phone configurator. It allows you to define phones, create registrations, and such. By describing stuff about users, I am attempting to divine what the configuration should be. This is a VERY early first step in that direction. Right now, it: 1. Parses the phone1.cfg file included with whatever version software you use. 2. Reads the phone and registration entries to determine the file names to use, create the registrations, create a customized XML file, generate the sip.conf, and also generate a very basic voicemail.conf file. 3. Generates a random password for both the phone configuration and the sip.conf file (yes, the SAME random password as appropriate, and yes, DIFFERENT passwords for each registration) 4. Outputs 2 files per phone: xxxxxxxxxxxx.cfg, and extensionxxxx.cfg, as well as 3 "global" files: voicemail.conf and sip.conf, and voicemail.conf It is not very powerful right now. It is written wholly in PHP and MySQL (I did it in an afternoon), except for a piece of shell scripting to glue it together and move the files around and stuff. Before I take a couple hours and clean up the code (i.e. remove passwords) I have created some shell scripts to kick off the file generation and then copy the appropriate files where they go. We close at night, so I have the flexibility of pushing all of the files out to the server, sending a reboot to the phones, and reloading Asterisk at night, every night. This means each extension will have a new password each day, but no user will ever know (or need to know) their own password. If there is sufficient interest, I will clean it up and put the files up on a server somewhere. It does not require anything special, but it will be of most interest to those who know a little about PHP, as the [general] section of each of the .conf files is hard-coded right now. I'm planning to put in files that will be parsed, yadda yadda yadda, but I have enough other things on my plate right now. Please respond to me directly if you would have interest in this, as a bunch of "me too"s on the list will do no good but to annoy everyone. If it works out that there's sufficient interest, I will send a single announcement to the list, and put an entry on the WIKI. It only works for polycom phones, so if you don't use a bunch of them, it probably won't be worth your time... Thanks, David Gomillion