MACRO_CONTEXT Equivalent For GoSub

Home » Asterisk Users » MACRO_CONTEXT Equivalent For GoSub
Asterisk Users 2 Comments

Is there an equivalent of MACRO_CONTEXT for a GoSub? Looking for a way to determine the name of the calling context.

2 thoughts on - MACRO_CONTEXT Equivalent For GoSub

  • 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

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

    Mitch