[asterisk-users] MACRO_CONTEXT equivalent for GoSub

Mitch Claborn mitch_ml at claborn.net
Tue Dec 11 16:49:37 CST 2012


Was looking for 1.8 and above. I ended up doing something similar to 
what you describe.  Not terribly elegant, but it works.


Mitch

On 12/11/2012 04:03 PM, Danny Nicholas wrote:
> You don't state version, but I'm pretty sure this animal doesn't exist.
> What I did in 1.4 was to set a variable before the gosub so I could track
> it.  Something like this
> Exten => s,n,Set(from=foo)
> Exten => s,n,gosub(showfoo,s,1)
> Exten => s,n,Set(from=bar)
> Exten => s,n,gosub(showfoo,s,1)
> [showfoo]
> Exten => s,1,verbose(called from ${from})
> Exten => s,n,return()
>
> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Mitch Claborn
> Sent: Tuesday, December 11, 2012 3:52 PM
> To: asterisk-users at lists.digium.com
> Subject: [asterisk-users] MACRO_CONTEXT equivalent for GoSub
>
> Is there an equivalent of MACRO_CONTEXT for a GoSub?  Looking for a way
> to determine the name of the calling context.
>



More information about the asterisk-users mailing list