[asterisk-users] Asterisk as an IVR solution

Al Baker bwentdg at pipeline.com
Fri Jul 11 01:05:22 CDT 2008


SO does that mean that if he used BACKGROUND is a SubRoutine  he would
get the "correct" or "desired" action , from his point of view? It would 
jump to the "1" Extension in the SUBROUTINE ?

Tilghman Lesher wrote:
> 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.
>
>   



More information about the asterisk-users mailing list