[Home]

Summary:ASTERISK-11198: Calling Macro after hangup from withing GoSub executes only first priority of macro.
Reporter:Atis Lezdins (atis)Labels:
Date Opened:2008-01-10 08:21:40.000-0600Date Closed:2008-01-10 13:05:06.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_macro
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:This seems to be identical to ASTERISK-7677731 with one exception - on 'h' extension use first GoSub and from within that - Macro

****** ADDITIONAL INFORMATION ******

CLI:
 == Spawn extension (db_ext_queues, 22901, 20) exited non-zero on 'SIP/21157-0820b8f0'
   -- Executing GoTo("SIP/21157-0820b8f0", "hangup_callback|h|1")
   -- Goto (hangup_callback,h,1)
   -- Executing [h@hangup_callback:1] NoOp("SIP/21157-0820b8f0", "-(B)----------------------- context hangup_callback h --------------------------") in new stack
   -- Executing [h@hangup_callback:2] Set("SIP/21157-0820b8f0", "__hangup_callback_type=gosub") in new stack
   -- Executing [h@hangup_callback:3] Set("SIP/21157-0820b8f0", "__hangup_callback=agent_call_end") in new stack
   -- Executing [h@hangup_callback:4] GotoIf("SIP/21157-0820b8f0", "1?5:18") in new stack
   -- Goto (hangup_callback,h,5)
   -- Executing [h@hangup_callback:5] GotoIf("SIP/21157-0820b8f0", "0?6:9") in new stack
   -- Goto (hangup_callback,h,9)
   -- Executing [h@hangup_callback:9] GotoIf("SIP/21157-0820b8f0", "1?10:12") in new stack
   -- Goto (hangup_callback,h,10)
   -- Executing [h@hangup_callback:10] Gosub("SIP/21157-0820b8f0", "agent_call_end|s|1") in new stack
   -- Executing [s@agent_call_end:1] GotoIf("SIP/21157-0820b8f0", "1?2:9") in new stack
   -- Goto (agent_call_end,s,2)
   -- Executing [s@agent_call_end:2] Macro("SIP/21157-0820b8f0", "read_vars") in new stack
   -- Executing [s@macro-read_vars:1] NoOp("SIP/21157-0820b8f0", "-(B)------------------------------------- macro read_vars (SIP/21157-0820b8f0) -----------") in new stack
   -- Executing [s@agent_call_end:3] NoOp("SIP/21157-0820b8f0", "agent_queue: 0") in new stack                                                            

Log:
[Jan 10 05:59:41] VERBOSE[9756] logger.c:     -- Executing GoTo("SIP/21157-0820b8f0", "hangup_callback|h|1")
[Jan 10 05:59:41] VERBOSE[9756] logger.c:     -- Goto (hangup_callback,h,1)
[Jan 10 05:59:41] DEBUG[9756] pbx.c: Launching 'NoOp'
[Jan 10 05:59:41] VERBOSE[9756] logger.c:     -- Executing [h@hangup_callback:1] NoOp("SIP/21157-0820b8f0", "-(B)----------------------- context hangup_call
[Jan 10 05:59:41] DEBUG[9756] pbx.c: Function result is 'gosub'
[Jan 10 05:59:41] DEBUG[9756] pbx.c: Launching 'Set'
[Jan 10 05:59:41] VERBOSE[9756] logger.c:     -- Executing [h@hangup_callback:2] Set("SIP/21157-0820b8f0", "__hangup_callback_type=gosub") in new stack
[Jan 10 05:59:41] DEBUG[9756] pbx.c: Function result is 'agent_call_end'
[Jan 10 05:59:41] DEBUG[9756] pbx.c: Launching 'Set'
[Jan 10 05:59:41] VERBOSE[9756] logger.c:     -- Executing [h@hangup_callback:3] Set("SIP/21157-0820b8f0", "__hangup_callback=agent_call_end") in new stack
[Jan 10 05:59:41] DEBUG[9756] pbx.c: Expression result is '1'
[Jan 10 05:59:41] DEBUG[9756] pbx.c: Launching 'GotoIf'
[Jan 10 05:59:41] VERBOSE[9756] logger.c:     -- Executing [h@hangup_callback:4] GotoIf("SIP/21157-0820b8f0", "1?5:18") in new stack
[Jan 10 05:59:41] VERBOSE[9756] logger.c:     -- Goto (hangup_callback,h,5)
[Jan 10 05:59:41] DEBUG[9756] pbx.c: Expression result is '0'
[Jan 10 05:59:41] DEBUG[9756] pbx.c: Launching 'GotoIf'
[Jan 10 05:59:41] VERBOSE[9756] logger.c:     -- Executing [h@hangup_callback:5] GotoIf("SIP/21157-0820b8f0", "0?6:9") in new stack
[Jan 10 05:59:41] VERBOSE[9756] logger.c:     -- Goto (hangup_callback,h,9)
[Jan 10 05:59:41] DEBUG[9756] pbx.c: Expression result is '1'
[Jan 10 05:59:41] DEBUG[9756] pbx.c: Launching 'GotoIf'
[Jan 10 05:59:41] VERBOSE[9756] logger.c:     -- Executing [h@hangup_callback:9] GotoIf("SIP/21157-0820b8f0", "1?10:12") in new stack
[Jan 10 05:59:41] VERBOSE[9756] logger.c:     -- Goto (hangup_callback,h,10)
[Jan 10 05:59:41] DEBUG[9756] pbx.c: Launching 'Gosub'
[Jan 10 05:59:41] VERBOSE[9756] logger.c:     -- Executing [h@hangup_callback:10] Gosub("SIP/21157-0820b8f0", "agent_call_end|s|1") in new stack
[Jan 10 05:59:41] DEBUG[9756] pbx.c: Expression result is '1'
[Jan 10 05:59:41] DEBUG[9756] pbx.c: Launching 'GotoIf'
[Jan 10 05:59:41] VERBOSE[9756] logger.c:     -- Executing [s@agent_call_end:1] GotoIf("SIP/21157-0820b8f0", "1?2:9") in new stack
[Jan 10 05:59:41] VERBOSE[9756] logger.c:     -- Goto (agent_call_end,s,2)
[Jan 10 05:59:41] DEBUG[9756] pbx.c: Launching 'Macro'
[Jan 10 05:59:41] VERBOSE[9756] logger.c:     -- Executing [s@agent_call_end:2] Macro("SIP/21157-0820b8f0", "read_vars") in new stack
[Jan 10 05:59:41] DEBUG[9756] pbx.c: Launching 'NoOp'
[Jan 10 05:59:41] VERBOSE[9756] logger.c:     -- Executing [s@macro-read_vars:1] NoOp("SIP/21157-0820b8f0", "-(B)------------------------------------- macro
[Jan 10 05:59:41] DEBUG[9756] app_macro.c: Executed application: NoOp
[Jan 10 05:59:41] DEBUG[9756] app_macro.c: Extension s, macroexten s, priority 1 returned normally even though call was hung up
[Jan 10 05:59:41] DEBUG[9756] pbx.c: Function result is '0'
[Jan 10 05:59:41] DEBUG[9756] pbx.c: Launching 'NoOp'
[Jan 10 05:59:41] VERBOSE[9756] logger.c:     -- Executing [s@agent_call_end:3] NoOp("SIP/21157-0820b8f0", "agent_queue: 0") in new stack
[Jan 10 05:59:41] DEBUG[9756] pbx.c: Function result is '0'
Comments:By: Tilghman Lesher (tilghman) 2008-01-10 09:02:56.000-0600

Yes, we know.  Mixing Gosub and Macro is not good.  Please use only one or the other, since the long term plan is to completely replace Macro with Gosub.

By: Atis Lezdins (atis) 2008-01-10 09:15:12.000-0600

For now - that's what i'm doing. However if GoSub is not called from within "h" extension - everything works as expected.

By: Tilghman Lesher (tilghman) 2008-01-10 13:02:38.000-0600

I don't think we're really ever going to fix this.