[Asterisk-Users] Digit detect during a Background() inside a Macro wrongly jumps b ack to the calling context to match digits?

Kris Boutilier Kris.Boutilier at scrd.bc.ca
Fri Aug 27 01:59:22 MST 2004


Alas, the dialplan itself is more complicated than I quoted in the problem
case below: There is an outer context that gathers digits from DID trunks,
pads the patter to comply with the corporate dial plan and then goes into
[macro-process-routing], thus:

[infrom-did]
exten => s,1,DigitTimeout,2                    
exten => s,2,ResponseTimeout,5                  
exten => s,3,Answer
exten => s,4,Ringing

exten => _XXX,1,Macro(process-routing,6${EXTEN}) ; This turns the 3 digits
coming down the DID trunk into 4 digit dialplan numbers

Then, inside [macro-process-routing] there are a reasonably large (<100)
number of different patterns which each handle custom routing strategies for
each DID number - they're seperated out from the [infrom-did] context
because [macro-process-routing] is itself a target for incoming calls from
other internal Asterisk servers, who're using 4 digit dialing. 

Those DIDs with IVRs are intended to be spun off into seperate macros with
self contained logics (such as [macro-6800-interceptor]) so their digit
collection strategies don't collide. However, I'm limited to one IVR at the
moment because the digit collection entries have to be back up in the
[macro-process-routing] routing context.

So, no - unwrapping the submacros isn't really feasable. 
:-)

-----Original Message-----
From: el Flynn [mailto:el_flynn at lanvik-icu.com]
Sent: August 27, 2004 1:38 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [Asterisk-Users] Digit detect during a Background() inside
a Macro wrongly jumps b ack to the calling context to match digits?


Kris Boutilier wrote:
> 
> 	[macro-process-routing]
{clip}
> 
> 	[macro-6800-interceptor]
{clip}
> 	exten => s,4,Background(autoattendant-ivr/grtg-6)
> 

if the 6800-interceptor is only referenced within the process-routing 
macro, and nowhere else in the dialplan, couldn't you just create a new 
context called [6800-interceptor] and change the process-routing macro to:

exten => _6800,1,Goto(6800-interceptor,s,1)

That might work.

Flynn




More information about the asterisk-users mailing list