On Saturday 20 September 2008 17:21:16 George Williams wrote: > I have inherited some code that appears to implement a kluge-y way of > adding and removing extensions, sip devices, and sip registrations > dynamically. > > Yep, you guessed it - it modifies the extensions.conf and sip.conf files, > and then execute script to ask Asterisk to reload the dialplan and the sip > module. > > Is there a better way to do this?
For extensions.conf, I would suggest continuing the present method of keeping the extensions.conf file up to date, but instead of reloading the file, use the Command action of AMI to "dialplan add extension" and "dialplan remove extension". This is, of course, much faster than a complete reload of the dialplan. For sip registrations, however, there is a much better way: dynamic realtime. Add and remove from the database and use the 'sip prune peer' command, again through AMI, to remove registrations, if they are in memory. -- Tilghman _______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2008 - September 22 - 25 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
