[Asterisk-Dev] Feature: assigned channel variables - is this reasonable?

Chris A. Icide chris at netgeeks.net
Mon Jul 12 13:06:45 MST 2004


Feature Request:

Each context should have a variables section that allows you to set 
variables for that will be attached to any channel that enters that context.

For example:  Steven's vPBX problem


sip.conf

[vpbx1#user1]
blah, blah, blah
context=vpbx1-user


extensions.conf

[vpbx1-user]

variable => vpbx,1
variable => ld-nufone,0
variable => playswithmonkeys,1

include => one-plus-ld


. . . .

Now any channel entering vpbx1-user will have three variables assigned to 
that channel, and in this case they would be

vpbx1 = 1
ld-nufone = 0
playswithmonkeys = 1

so later on in the dialplan we can always check these variables to make any 
decisions needed.



I know that we could use SetVar in an extension, but what if I have a bunch 
of different extensions in my context, or my context is merely a list of 
includes?  As in the above example, I have a generic one-plus-ld context 
which handles 1 plus us long distance dialing, but I handle users from 
different vpbxs differently, some are sent via a nufone account perhaps (if 
the variable ld-nufone=1)...

I think this would definately work in steve s's issue about vpbx's and 
would help me in a number of situations as well

-Chris




More information about the asterisk-dev mailing list