jhester at digium.com Guest
|
Posted: Thu Aug 20, 2015 12:10 pm Post subject: [asterisk-users] ${MACRO_CONTEXT} for Subroutines |
|
|
On Thu, Aug 20, 2015 at 10:52 AM, Bastian Schern <ml04@reventix.de (ml04@reventix.de)> wrote:
Howdy
Due to the nature of GoSub() vs. Macro() there is no built in channel variable which carries
that information with a GoSub(). Devs keep me honest here.
If the subroutine needs to know what part of dialplan the channel came from I recommend
sending the information as an ARG in the nested set of parenthesis when executing the
GoSub() application.
exten => _7XXX,1,GoSub(subDialer,begin,1(${CONTEXT}))
[subDialer]
exten => begin,1,Verbose(0, This subroutine was executed from the ${ARG1} context.)
--
Justin Hester
Digium, Inc. · Technical Trainer
445 Jan Davis Drive NW · Huntsville, AL 35806 · USA
ph: +1 256 428 6238
Check us out at: https://www.digium.com · http://asterisk.org |
|