[asterisk-dev] Dial 'd' option improvement

Mark Murawski markm at intellasoft.net
Wed Jul 14 15:51:07 CDT 2010


  Excellent information.  It does indeed change exten/context/priority.  
My calls are hung up by the end of the agi script so I never noticed 
this behavior until today when I started playing with digit interrupt in 
Dial().  I was getting thrown out of my AGI script and into the target 
context when interrupting Dial().

I think it's very advantageous to have ways to bail from applications 
via digit press while still maintaining control of the dialplan via agi.

Upon doing some experiments I've noticed the following:
While in AGI
- Digit interrupt from within Background() will not change 
exten/context/priority
- Digit interrupt from within Dial() *will* change exten/context/priority

You can maintain dialplan control when bailing from Dial() via digit 
press, if you quickly restore the exten/context/priority after Dial() 
returns.  But this seems to be a bit of a hack... and is not consistent 
with how Background() handles digit interrupt while running in AGI.


-Mark



On 07/14/2010 04:29 PM, Tim Ringenbach wrote:
> On Wed, Jul 14, 2010 at 12:23 PM, Mark Murawski<markm at intellasoft.net>  wrote:
>> When using Dial from AGI, ${EXITCONTEXT} only is used for digit matching, and control returns to the agi script... so having any extens defined in the exit context is pretty useless in this case.  What I'm proposing is moving EXITCONTEXT to an option parameter such as d[([digits][@context])].
> I don't have a strong opinion on your proposed change, but I wanted to
> point out one thing:
>
> I don't think that's completely true. I haven't tested this case, but
> most things that do a Goto while you're in an AGI do set a new
> context, extension and priority, it's just that you're in the agi
> still so you don't execute them until the AGI completes. It's
> effectively the same as using the agi commands "set extension", "set
> context" and "set priority". And you can see that this has happened by
> asking for the EXTEN variable and notices that it's changed.
>
> --Tim
>



More information about the asterisk-dev mailing list