[Asterisk-Users] Asterisk RealTime Question, Please help

mkumar at mantragroup.com mkumar at mantragroup.com
Thu Mar 16 22:35:56 MST 2006


Hi Benchev,

Thanks for the reply.

My current setup is exactly similar to which you have suggested. My DID 
numbers
are added or changed very frequently and all the time I have to change some
config file manually and should reload Asterisk or atleast call Extensions
reload. I do want these things to be manual, Can't I have the Asterisk to
directly get the contexts from Mysql DB without giving them in config 
files? If
this is possible then we can have a realtime dynamic Asterisk.

The other approcah can be to match the context itself with some regular
expression. But I do not know how do this or whether this is possible? I will
have a context something like this

[XXXXXXXXXX]
switch => Realtime/@extensions

So all contexts will be directed to Mysql DB matching regex but 
[XXXXXXXXXX] is
not acting as regex as expected it just matches context XXXXXXXXXX.

Please tell me what can I do to solve my problem.

Thanks for your help and time,
Manoj.

Quoting Benchev <bbench at mail.bg>:

>> I need many contexts because I have around 1000 DID's each with 5-10
>> Extensions.
>> These DID numbers are changed or added very frequently and whenever there
>> is a change I have to change Extensions.conf manually. So please tell me
>> how can I do this dynamically without changing Extensions.conf and help me
>> configure Asterisk.
> I presume you have about 1000 DID numbers and each of this numbers 
> may ring to
> 5-10 users of yours, right?
>
> If so, make a context in you extensions.conf and include in it a switch
> like that:
> [ever_changing_dids]
> switch => Realtime/ever_changing_dids at extensions
>
> Now you can insert in your extensions_table imaginary DID 9876543210:
>
> INSERT INTO `extensions_table` VALUES ('', 'ever_changing_dids', 
> '9876543210',
> 1, 'Dial', 'SIP/user1:SIP/user2:SIP/user3:SIP/user4:SIP/user8:SIP/user12|
> 20');
> You can do that for many thousands of DIDs without changing extensions.conf.
>
> Another approach, also no changing the extension.conf:
> [ever_changing_dids]
> #include includes/ever_changing_dids.conf
>
> ever_changing_dids.conf
> exten =>
> 9876543210,1,Dial(SIP/user1&SIP/user2&SIP/user3&SIP/user4&SIP/user8&SIP/user12|
> 20)
> etc...
> However this requires *CLI> reload
>
> Hope I've guessed right.
> Benchev
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>






More information about the asterisk-users mailing list