[Home]

Summary:ASTERISK-15946: Specifying return_context for ParkAndAnnounce affects 'h' exten behavior
Reporter:Mark Murawski (kobaz)Labels:
Date Opened:2010-04-15 10:32:41Date Closed:2011-07-26 15:23:18
Priority:MinorRegression?No
Status:Closed/CompleteComponents:PBX/pbx_config
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:sip peer 210 context = cos_internal+local+ld+intl

I have the following dialplan:

context cos_internal+local+ld+intl {
 includes {
   services;
 }

 h => {
   GoSub(dialOut,h,1);
 }
}

context services {
 10 => {
   ParkAndAnnounce(,90,Console/dsp,park_timeout);
   // ParkAndAnnounce(,90,Console/dsp); // use this instead and flow is correct
   Hangup();

park_timeout:
  NoOp();
 }
}

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

Bad execution behavior... note that h@dialOut starts processing on line 2

 == Using SIP RTP CoS mark 5
   -- Executing [10@cos_internal+local+ld+intl:1] ParkAndAnnounce("SIP/210-00000008", ",90,Console/dsp,park_timeout") in new stack
   -- Dial Tech,String: (Console,dsp)
   -- Return Context: (cos_internal+local+ld+intl,10,3) ID: 210
   -- Started music on hold, class 'default', on channel 'SIP/210-00000008'
 == Parked SIP/210-00000008 on 2621@parkedcalls. Will timeout back to extension [cos_internal+local+ld+intl] 10, 3 in 90 seconds
   -- Added extension '2621' priority 1 to parkedcalls (0x853d2f8)
   -- Call Parking Called, lot: 2621, timeout: 90000, context: park_timeout
[Apr 15 11:29:15] WARNING[11972]: channel.c:4034 ast_request: No channel type registered for 'Console'
[Apr 15 11:29:15] NOTICE[11972]: channel.c:3845 __ast_request_and_dial: Unable to request channel Console/dsp
[Apr 15 11:29:15] WARNING[11972]: app_parkandannounce.c:141 parkandannounce_exec: PARK: Unable to allocate announce channel.
 == Spawn extension (cos_internal+local+ld+intl, 10, 3) exited non-zero on 'Parked/SIP/210-00000008<ZOMBIE>'
   -- Executing [h@cos_internal+local+ld+intl:1] Gosub("Parked/SIP/210-00000008<ZOMBIE>", "dialOut,h,1") in new stack
   -- Executing [h@dialOut:2] AGI("Parked/SIP/210-00000008<ZOMBIE>", "agi://127.0.0.1:2000") in new stack
   -- <Parked/SIP/210-00000008<ZOMBIE>>AGI Script agi://127.0.0.1:2000 completed, returning 0

-----------------
Replace the ParkAndAnnounce... and here is what happens:

 == Using SIP RTP CoS mark 5
   -- Executing [10@cos_internal+local+ld+intl:1] ParkAndAnnounce("SIP/210-00000009", ",90,Console/dsp") in new stack
   -- Dial Tech,String: (Console,dsp)
   -- Return Context: (cos_internal+local+ld+intl,10,1) ID: 210
   -- Started music on hold, class 'default', on channel 'SIP/210-00000009'
 == Parked SIP/210-00000009 on 2621@parkedcalls. Will timeout back to extension [cos_internal+local+ld+intl] 10, 1 in 90 seconds
   -- Added extension '2621' priority 1 to parkedcalls (0x8514790)
   -- Call Parking Called, lot: 2621, timeout: 90000, context: (null)
[Apr 15 11:32:01] WARNING[12143]: channel.c:4034 ast_request: No channel type registered for 'Console'
[Apr 15 11:32:01] NOTICE[12143]: channel.c:3845 __ast_request_and_dial: Unable to request channel Console/dsp
[Apr 15 11:32:01] WARNING[12143]: app_parkandannounce.c:141 parkandannounce_exec: PARK: Unable to allocate announce channel.
 == Spawn extension (cos_internal+local+ld+intl, 10, 1) exited non-zero on 'Parked/SIP/210-00000009<ZOMBIE>'
   -- Executing [h@cos_internal+local+ld+intl:1] Gosub("Parked/SIP/210-00000009<ZOMBIE>", "dialOut,h,1") in new stack
   -- Executing [h@dialOut:1] Set("Parked/SIP/210-00000009<ZOMBIE>", "ARGS="module=CallRouter,action=DialHangup"") in new stack
   -- Executing [h@dialOut:2] AGI("Parked/SIP/210-00000009<ZOMBIE>", "agi://127.0.0.1:2000") in new stack
   -- <Parked/SIP/210-00000009<ZOMBIE>>AGI Script agi://127.0.0.1:2000 completed, returning 0


Comments:By: Mark Murawski (kobaz) 2010-04-15 10:38:39

It looks like it has to do with the fallback offset:

Will timeout back to extension [cos_internal+local+ld+intl] 10, 3
 versus
Will timeout back to extension [cos_internal+local+ld+intl] 10, 1

so it's setting some internal return position... and the return position is not reset when it hits 'h'

the 3 is the start of park_timeout:... which is on line 3... (the comment is ignored)
so that makes sense, since it can fallback to the park timeout label after the timeout is hit... but... the timeout line number should not be applied to running 'h'

By: Mark Murawski (kobaz) 2010-04-15 10:43:26

Something like that... it doesn't exactly match up with the 3 versus the 1, but there's an issue in there somewhere.

By: Russell Bryant (russell) 2011-07-26 15:23:10.988-0500

Per the Asterisk maintenance timeline page at http://www.asterisk.org/asterisk-versions maintenance (bug) support for the 1.4 and 1.6.x branches has ended. For continued maintenance support please move to the 1.8 branch which is a long term support (LTS) branch. For more information about branch support, please see https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions

If this is still an issue, please open a new issue so it can be re-triaged appropriately. Thanks!