CLI Variable Inheritence

Trying to set a channel variable from the CLI on one channel, then read it in the context from-internal-custom during a transfer of the call that originated on that channel. My understanding is that the __Variable syntax would make the Variable accessible via inheritance on the transfer to channel.

I use this from the CLI …

dialplan set chanvar SIP/asterisk-00000029 __FROMEXTEN 8675309

And view this in my from-internal-custom

exten => _x.,n,NoOp(FROM Channel: ${FROMEXTEN})

I see the channel variable created and set when doing a dialplan show chanvar, but it’s empty when I try to access it in the from-internal-custom context.

Any suggestions would be greatly appreciated. I thought maybe I could use shared variables, but I don’t see any way I can set them through the CLI.

BTW … the reason for setting these through the CLI is that the application developer is not familiar with any other way.

Maybe you should explain the general idea of your goal, because must be a better-easy way to do it fom Dialplan.

As well - what does transfer mean in your scenario? If you do a Dial() after invoking “dialplan set chanvar” it should inherit.

On the other hand, if you do a true SIP attended transfer, asterisk doesn’t even know that you are doing a transfer until after party C has been dialed. That also applies to SIP blind transfer implemented as attended.

Whilst I’m not sure about SIP true blind transfer and the features.conf transfers, I would not be surprised if there was no inheritance there, either.