Hi,
Is it possible to set a channel variable in sip.conf?
I have a number of sip phones, and depending on which one makes a call I need to dial out via a different account.
At the moment, every SIP peer has its own context in the dialplan with an entry such as:
exten => _101XX,1,Set(SPACEACCOUNT=${THESPACE_OUT_ACCOUNT2})
exten => _101XX,2,Goto(thespace_dialout_people|${EXTEN}|1)
The macro “thespace_dialout_people” then does the dialling.
This works, but I need to copy the above two lines into each context, changing the account that is copied into the SPACEACCOUNT variable.
It would be much neater to be able to simply:
in every context but for this to work I need some way of being able to pre-set a channel variable in a given context. Is this possible? It would be fine to do this in sip.conf.
Alternatively, is there some magic exten => entry that will always be executed when a call enters a context before the more-accurate exten => _101XX is executed?
Thanks for any ideas!
Giles.