[asterisk-dev] (ASTERISK-19336) h exten is not run in the context that calls a AEL macro

Mark Murawski markm-lists at intellasoft.net
Wed Feb 22 16:35:31 CST 2012


I agree.  This is not a bug.

 >>      -- Executing [h at testmacro:1] NoOp("SIP/trunk-00000002", "h 
catched in testmacro - OK!") in new stack

Looks like the h exten executed exactly where it should have.

Only the inner-most h will execute on hangup.

You can check out my hangup handlers patch at 
https://reviewboard.asterisk.org/r/1230/

I'm getting back in the swing of things in my development, so this and 
other projects will be committed within the next month.


On 02/22/12 15:38, Johan Wilfer wrote:
> I've noticed that the h exten isn't executed if using AEL and a call is
> currently in a macro. (ASTERISK-19336)
>
> Maybe I was unclear in the bugreport, but I described two scenarios.
> 1) ael context with h-exten (not executed on hangup) calling macro
> 2) ael context with h-exten (not executed on hangup) calling macro with
> catch h { ... } (executed on hangup)
>
> The issue was closed, refering to scenario 2.
>
> Can this issue be reopened? Because in scenario 1 not a single h-exten
> is executed..
>
> Thanks!
>
> /Johan
>
>
> -------- Ursprungligt meddelande --------
> Ämne: 	[JIRA] Closed: (ASTERISK-19336) h exten is not run in the context
> that calls a AEL macro
> Datum: 	Fri, 10 Feb 2012 08:36:19 -0600 (CST)
> Från: 	Matt Jordan (JIRA) <noreply at issues.asterisk.org>
> Till: 	johan at wilfer.se
>
>
>
>       [https://issues.asterisk.org/jira/browse/ASTERISK-19336?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel  ]
>
> Matt Jordan closed ASTERISK-19336.
> ----------------------------------
>
>      Resolution: Not A Bug
>
> Only one hangup handler will ever be called.  The hangup handler that is called will be the one closest in scope to the current location of the executing call.
>
> Note that there is a proposed feature that would allow for a stack of hangup handlers to be called; however, that would be a new feature and not a bug.
>
>>  h exten is not run in the context that calls a AEL macro
>>  --------------------------------------------------------
>>
>>                  Key: ASTERISK-19336
>>                  URL:https://issues.asterisk.org/jira/browse/ASTERISK-19336
>>              Project: Asterisk
>>           Issue Type: Bug
>>       Security Level: None
>>           Components: PBX/pbx_ael
>>     Affects Versions: 1.8.9.2
>>             Reporter: Johan Wilfer
>>
>>  I expect the h exten to be run both in the macro catch-block and in the context calling the macro. This is not the case.
>>  The following code:
>>  {code:xml}
>>    context conference {
>>      incoming =>  {
>>        &testmacro();
>>      }
>>      h =>  {
>>        Noop(Called from the context that invokes the macro - THIS DOESN'T WORK);
>>      }
>>    }
>>    macro testmacro() {
>>      Noop(Running testmacro!);
>>      Wait(20);
>>      catch h {
>>        Noop(h catched in testmacro - OK!);
>>      }
>>    }
>>  {code}
>>  Creates this output:
>>  {code:xml}
>>      -- Executing [incoming at conference:1] Gosub("SIP/trunk-00000002", "testmacro,~~s~~,1") in new stack
>>      -- Executing [~~s~~@testmacro:1] NoOp("SIP/trunk-00000002", "Running testmacro!") in new stack
>>      -- Executing [~~s~~@testmacro:2] Wait("SIP/trunk-00000002", "20") in new stack
>>    == Spawn extension (testmacro, ~~s~~, 2) exited non-zero on 'SIP/trunk-00000002'
>>      -- Executing [h at testmacro:1] NoOp("SIP/trunk-00000002", "h catched in testmacro - OK!") in new stack
>>  {code}
>>  The h-exten in the calling context is never called..
>>  The issue is the same with 1.6.2.20, and it's also the same if you remove the "catch h { ... } "-block in the macro - the context that calls the macro never executes it's h-exten.
>
> --
> This message is automatically generated by JIRA.
> For more information on JIRA, see:http://www.atlassian.com/software/jira
>
>
>
> This body part will be downloaded on demand.





More information about the asterisk-dev mailing list