Gabriel Afana
2004-Dec-25 02:36 UTC
[Asterisk-Users] Dynamic extensions without using DynExtenDB?
Hi, Am using Asterisk to call peoples phone as part of a service of my website. It will call people for various things...one of them to tell people sports scores. I am using several sound files to piece together a dynamic message saying who played and what the score was. The problem is that I can hardcode the sound files that are needed to play and it works fine, but I cannot hardcode the extensions.conf file with the new sound files to play for every game. I need a way to create dynamic extensions so when it dials out, it will be playing back the correct sound files for the current game being played. I've looked at the DynExtenDB, but that wont work well because every time a call is initiated, it loads the extension. Thats not practical because if the system needs to call 500 people right at the end of the game, its going to take too much overhead just to load and unload the extension for every call. I am thinking now just to load the extensions through MySQL and have an "extensions reload" command sent the CLI for Asterisk so my backend system can update mysql and then reload the extensions on Asterisk when a call needs to be made with new sport scores. I think that idea will work...but does anybody know of a better way to do it? P.S. I know I can reload the extensions by typing "extensions reload" in the CLI, but is there a command line command I can run that will do it without having to login? It will make my scripting job a lot easier if I can just have a perl scrip run something like system("/usr/sbin/asterisk -r extensions reload") Thanks! Gabe -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20041225/934fba57/attachment.htm
Peter Svensson
2004-Dec-25 04:22 UTC
[Asterisk-Users] Dynamic extensions without using DynExtenDB?
On Sat, 25 Dec 2004, Gabriel Afana wrote:> I've looked at the DynExtenDB, but that wont work well because every > time a call is initiated, it loads the extension. Thats not practical > because if the system needs to call 500 people right at the end of the > game, its going to take too much overhead just to load and unload the > extension for every call. > > I am thinking now just to load the extensions through MySQL and have > an "extensions reload" command sent the CLI for Asterisk so my backend > system can update mysql and then reload the extensions on Asterisk when > a call needs to be made with new sport scores.Have you considered using agi instead of a lot of extensions? Especially with fastagi it may be an easier route to go.> P.S. I know I can reload the extensions by typing "extensions reload" > in the CLI, but is there a command line command I can run that will do > it without having to login? It will make my scripting job a lot easier > if I can just have a perl scrip run something like > system("/usr/sbin/asterisk -r extensions reload")asterisk -rx "extensions reload" Peter
Matthew Boehm
2004-Dec-26 09:22 UTC
[Asterisk-Users] Dynamic extensions without using DynExtenDB?
Just upgrade to most recent CVS and use RealTime Extensions. Works fantastic and is built-in to asterisk core code. -Matthew ----- Original Message ----- From: Gabriel Afana To: asterisk-users@lists.digium.com Sent: Saturday, December 25, 2004 3:36 AM Subject: [Asterisk-Users] Dynamic extensions without using DynExtenDB? Hi, Am using Asterisk to call peoples phone as part of a service of my website. It will call people for various things...one of them to tell people sports scores. I am using several sound files to piece together a dynamic message saying who played and what the score was. The problem is that I can hardcode the sound files that are needed to play and it works fine, but I cannot hardcode the extensions.conf file with the new sound files to play for every game. I need a way to create dynamic extensions so when it dials out, it will be playing back the correct sound files for the current game being played. I've looked at the DynExtenDB, but that wont work well because every time a call is initiated, it loads the extension. Thats not practical because if the system needs to call 500 people right at the end of the game, its going to take too much overhead just to load and unload the extension for every call. I am thinking now just to load the extensions through MySQL and have an "extensions reload" command sent the CLI for Asterisk so my backend system can update mysql and then reload the extensions on Asterisk when a call needs to be made with new sport scores. I think that idea will work...but does anybody know of a better way to do it? P.S. I know I can reload the extensions by typing "extensions reload" in the CLI, but is there a command line command I can run that will do it without having to login? It will make my scripting job a lot easier if I can just have a perl scrip run something like system("/usr/sbin/asterisk -r extensions reload") Thanks! Gabe ------------------------------------------------------------------------------ _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20041226/e16740aa/attachment.htm