[asterisk-users] Variable Scope Question
Brent Davidson
brent at texascountrytitle.com
Thu Nov 6 10:12:11 CST 2008
If I have a global variable in my dialplan and I change it, does that
change immediately take affect for all calls that are active?
Here is my situation. The company I work for has two office groups that
share a building. The two offices are separate companies but support
one another and want to be able to transfer calls as if they were all on
the same phone system. Each company has 4 incoming voice lines and
calls on those lines should be sent to the appropriate main menu.
As it stands I have a context called internal that defines all of the
internal extensions for both offices then I have two virtually operator
contexts, two virtually identical mainmenu contexts and two virtually
identical admin contexts that allow them to record the appropriate
mainmenu greetings.
What I'd like to do would be to consolidate the mainmenu and operator
contexts and create a CompanyA and CompanyB context that sets a variable
for the appropriate company then jumps into the mainmenu or operator
context carrying that value so the correct greetings are played and the
correct operator extension is used. The variable would need to be one
that only affects the current call and no others since there is the
potential to have 4 calls coming in to each office at the same time.
Any ideas on the best way to handle this?
Thanks,
Brent
More information about the asterisk-users
mailing list