Hello All, I am just looking into Asterisk as a viable voicemail solution for our phone service. In order to use it though I will need to make extensions.conf dynamic (ie. Via MySQL). Is this possible? I've found the following information on this subject: http://www.voip-info.org/wiki-Asterisk+extensions+from+mysql <http://www.voip-info.org/wiki-Asterisk+extensions+from+mysql> However, this is not a fully dynamic function. It requires me to pull the mysql database every so often (presumably via cron) and then restart asterisk after updating extensions.conf. Is it possible to setup asterisks so that extensions.conf is fully dynamic via a MySQL database? Thanks for the help!! Regards, Darren Nay dnay@ionosphere.net <mailto:dnay@ionosphere.net> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20040315/d9959f29/attachment.htm
Darren Nay wrote:> Hello All, > > > > I am just looking into Asterisk as a viable voicemail solution for our phone > service. In order to use it though I will need to make extensions.conf > dynamic (ie. Via MySQL). Is this possible? >Sure.. Set up the database as you see documented. You can schedule this up to once a minutes using crontab. Setting something like this in your /etc/crontab should do it nicely.... */5 * * * * root /usr/local/sbin/update-voicemail 2>&1 > /var/log/vm.log NOTE: You can increase the frequency by using */3 or */1. */5 means every 5 minutes. */3 means every 3 minutes. Then make /usr/local/sbin/update-voicemail look like: #!/bin/bash /path/to/retrieve_extensions_from_mysql.pl /usr/sbin/asterisk -rx "extensions reload" Next, make the script executable #chmod +x /usr/local/sbin/update-voicemail This is not totally dynamic, but it ought to be close enough. You could make this completely dynamic using a trigger. Tony Wasson> > I've found the following information on this subject: > > http://www.voip-info.org/wiki-Asterisk+extensions+from+mysql > <http://www.voip-info.org/wiki-Asterisk+extensions+from+mysql> > > > > However, this is not a fully dynamic function. It requires me to pull the > mysql database every so often (presumably via cron) and then restart > asterisk after updating extensions.conf. > > > > Is it possible to setup asterisks so that extensions.conf is fully dynamic > via a MySQL database? > > > > Thanks for the help!! > > > > Regards, > > > > Darren Nay > > dnay@ionosphere.net <mailto:dnay@ionosphere.net> > > > >
You can load dynamic extensions with DynExtenDb module to add to your asterisk! You can also insert your sip.conf configuration into a Mysql or a Postgre database and run Perl script to (re)create the file each time you make a change. Here is the best way to get succeed : http://www.voip-info.org/wiki-Asterisk+configuration+from+database Ignace
On Monday 15 March 2004 17:28, Darren Nay wrote:> I am just looking into Asterisk as a viable voicemail solution for > our phone service. In order to use it though I will need to make > extensions.conf dynamic (ie. Via MySQL). Is this possible?Not yet, although you can do something similar by using the Eval and Exec applications. Eval has been committed to CVS; Exec is still being pondered on the bugtracker. You should be able to use these two applications to produce a static dialplan, which pulls applications and arguments from a database in real time, then executes them. -Tilghman