morteza kashani
2008-Oct-21 10:46 UTC
[asterisk-users] [help] Realtime Swich any context dinamically
when i wnat to working with realtime and mysql for any context i have to insert (switch => Realtiem/context at extensions) statment into extensions.conf for example if i want to have 10 context, i have to insert these lines into extension.conf : [context1] switch => Realtiem/context1 at extensions [context2] switch => Realtiem/context2 at extensions [context3] switch => Realtiem/context3 at extensions ................. ................. i want to switch these 10 context whithout insert these 10 lines .... how can i switch any context to real time dinamically ? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20081021/9e613913/attachment.htm
Atis Lezdins
2008-Oct-21 11:27 UTC
[asterisk-users] [help] Realtime Swich any context dinamically
On Tue, Oct 21, 2008 at 1:46 PM, morteza kashani <kashanii at yahoo.com> wrote:> when i wnat to working with realtime and mysql > for any context i have to insert (switch => Realtiem/context at extensions) > statment into extensions.conf > > for example if i want to have 10 context, i have to insert these lines into > extension.conf : > > [context1] > switch => Realtiem/context1 at extensions > > [context2] > switch => Realtiem/context2 at extensions > > [context3] > switch => Realtiem/context3 at extensions > > ................ > > ................ > > i want to switch these 10 context whithout insert these 10 lines .... > > how can i switch any context to real time dinamically ? >Hello, short answer is - you can't. If you really need lot of contexts added, you can place a #exec line in your dialplan, write a script that would do "SELECT DISTINCT context FROM extensions_table" and for each of results print out "switch=>" lines. However you would need to issue "dialplan reload" or AEL reload whenever you add a context. Regards, Atis P.S. try to not post twice :) -- Atis Lezdins, VoIP Project Manager / Developer, atis at iq-labs.net Skype: atis.lezdins Cell Phone: +371 28806004 Cell Phone: +1 800 7300689 Work phone: +1 800 7502835
Terry Wilson
2008-Oct-21 15:38 UTC
[asterisk-users] [help] Realtime Swich any context dinamically
> when i wnat to working with realtime and mysql > for any context i have to insert (switch => Realtiem/ > context at extensions) statment into extensions.confSee http://bugs.digium.com/view.php?id=6019 It looks like this will be available in Asterisk 1.6.1. You can try out the beta if you would like: http://downloads.digium.com/pub/asterisk/asterisk-1.6.1-beta1.tar.gz