[Asterisk-Users] Using a variable for EXTEN

Alessio Focardi afoc at interconnessioni.it
Mon Jan 17 04:56:21 MST 2005


Hello Dave,

Monday, January 17, 2005, 12:50:13 PM, you wrote:

DC> On Mon, 2005-01-17 at 12:30 +0100, Alessio Focardi wrote:
>> Hi,
>> 
>> I tried set up a global var for an extension, like this
>> 
>> [globals]
>> 
>> IPPHONES=_3XX
>> 
>> [sip]
>> 
>> exten=>${IPPHONES},1,Answer
>> 
>> What I would like to do is to make a dialplan without fixed extension
>> numbers to change the entire dialplan according to the customer
>> requests: what exten number do you want for your IP Phones ? let me change
>> a variable and we are set!
>> 
>> It seems that this is not supported, am I getting somethig wrong in
>> the syntax? There is another way to accomplish that ?

DC> Works like that for me (tm).  If it's not working look carefully at all
DC> your config files.


I'm doing this using "realtime", so really the dialplan is


[globals]

IPPHONES=_3XX

[sip]

switch=>Realtime/sip


Then in the db I have the extentions using the variable name.

Someone ever tried this with realtime ?


-- 
Best regards,
 Alessio                            mailto:afoc at interconnessioni.it




More information about the asterisk-users mailing list