[asterisk-users] Transfer_CONTEXT behaviour

Steve Davies davies147 at gmail.com
Thu Apr 15 09:43:54 CDT 2010


On 15 April 2010 14:11, Jared Smith <jsmith at digium.com> wrote:
> On Thu, 2010-04-15 at 13:59 +0100, Steve Davies wrote:
>> Let us then assume that the contexts are configured in the config files as:
>>     IAX/1234: context=external
>>     SIP/100: context=default
>>     SIP/101: context=superuser
>>     SIP/102: context=local
>>
>
> It's early and my brain hasn't fully engaged this morning, but couldn't
> you just do something like "setvar=_TRANSFER_CONTEXT=default" in the
> definition of user 100 in sip.conf, and
> "setvar=_TRANSFER_CONTEXT=superuser" in the definition of 101, and so
> forth?
>
> That way, it would get set on the incoming call from that particular
> user, and be inherited by the spawned call.  Am I missing something
> obvious?

I'll have to give that a go. Is there something similar available for
all of the other Channel technologies, or at least for DAHDI and IAX?

Is TRANSFER_CONTEXT copied to a bridged channel under any
circumstances? I would be concerned that when Dial() bridges a call,
it will incorrectly copy this variable onto another channel. Basically
if I dial out of an IAX channel to a 3rd party with a very permissive
TRANSFER_CONTEXT on the calling channel, I do not want to accidentally
grant permissions to a remote stranger!

Thanks,
Steve



More information about the asterisk-users mailing list