[asterisk-dev] 0017683 - PRI span and channel information in dialplan
rmudgett at digium.com
Thu Jan 6 15:30:28 CST 2011
> I needed to access the PRI span and channel to do some vodoo in a
> dialplan and I believe there is no other way to access these pieces of
> information easily. I created a patch (see
> https://issues.asterisk.org/view.php?id=17683) to have these variables
> available in-channel. The questions that rose from the patch are:
> - Is there any other way?
> - Are these variables best accessed via CHANNEL or via set variables?
> Just mentioning this on the list to see if there is any interest and
> to get some opinions on the subject.
I think the best way is the CHANNEL() function:
1) The initially requested channel may not be the actual channel used.
2) On BRI spans, the channel can change over the life of the call as the call is placed on and off of hold.
3) Channel variables are static once set.
4) You should be able to externally access the CHANNEL() function value like a channel variable with the AMI GetVar action.
Also the span and channel number is generic for any chan_dahdi channel: CHANNEL(dahdi_span) and CHANNEL(dahdi_channel).
More information about the asterisk-dev