[asterisk-users] Asterisk as an IVR solution

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Thu Jul 10 20:07:36 CDT 2008


On Thursday 10 July 2008 19:13:50 Douglas Garstang wrote:
> It's a known problem.
>
> If you call Background() in a macro, then Asterisk will look for the
> extensions to jump to in the CALLING Macro/context and NOT the Macro that
> the Background() app was called in.

I wouldn't call it a known problem.  It works precisely as it was designed to
work.  It may not work the way that you want it to, but it works like a Macro:
an independent set of instructions, with substitution, that acts as if it were
invoked inline with the calling location.  That is why Background will match
in the context of the calling location: it acts like it never left that
original context (and, in a way, it really didn't).

Subroutines are a different beast, and they are available with the Gosub/
Return set of routines in app_stack.so.

-- 
Tilghman



More information about the asterisk-users mailing list