[Asterisk-Users] Asterisk RealTime Question, Please help

Benchev bbench at mail.bg
Thu Mar 16 11:08:40 MST 2006


> 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



More information about the asterisk-users mailing list