[asterisk-users] Asterisk variable for SIP context
Eric "ManxPower" Wieling
eric at fnords.org
Tue Dec 9 18:36:20 CST 2008
Mike wrote:
> Sure, that works too, but I needed access to context taken from the sip
> entry because I needed to goto(${that_context}), and that context varies
> depending on the phone used.
>
> This is when setting __TRANSFER_CONTEXT in my cookie cutter really
> big/complexe/database driven extension. I get
> __TRANSFER_CONTEX=transfer_context, but once in [transfer_context] I send
> the call to the right specific context using a Goto cmd.
>
> Else I would need to replicate that big extension for each of those outgoing
> context, which is, from a coding perspective, error prone when modifications
> are made later.
Can't you do a Set(ORIG_CONTEXT=${CONTEXT}) or
Set(__ORIG_CONTEXT=${CONTEXT}) (syntax before 1.6, see upgrade.txt for
the 1.6 format) before your Goto.
More information about the asterisk-users
mailing list