Summary:ASTERISK-18904: Parking timeout does not go to parkedcallstimeout
Reporter:David Cunningham (dcunningham)Labels:
Date Opened:2011-11-21 22:14:31.000-0600Date Closed:2011-11-29 13:45:06.000-0600
Versions: Frequency of
Environment:Centos 5.7Attachments:
Description:In Asterisk when a parked call times out it does not go to parkedcallstimeout when it should. Instead it continues the previous context (in our case called parkedcalls), but in features.conf comebacktoorigin = no.
Could someone please help?

Here is the relevant part of the Asterisk console log:

   -- Executing [*7@parkedcalls:2] SetMusicOnHold("Local/*7@parkedcalls-a6e2;2", "7") in new stack
   -- Executing [*7@parkedcalls:3] Park("Local/*7@parkedcalls-a6e2;2", "") in new stack
 == Parked Local/*7@parkedcalls-a6e2;2 on 701 (lot default). Will timeout back to extension [parkedcalls] s, 1 in 30 seconds
   -- Added extension '701' priority 1 to parkedcalls
   -- <Local/*7@parkedcalls-a6e2;2> Playing 'digits/7.gsm' (language 'en')
<Local/*7@parkedcalls-a6e2;1>AGI Rx << SET VARIABLE MACRO_RESULT ""
<Local/*7@parkedcalls-a6e2;1>AGI Tx >> 200 result=1
   -- <Local/*7@parkedcalls-a6e2;1>AGI Script agi:// completed, returning 0
   -- <Local/*7@parkedcalls-a6e2;2> Playing 'digits/0.gsm' (language 'en')
   -- <Local/*7@parkedcalls-a6e2;2> Playing 'digits/1.gsm' (language 'en')
   -- Started music on hold, class '7', on Local/*7@parkedcalls-a6e2;2
 == Spawn extension (parkedcalls, s, 1) exited non-zero on 'Parked/Local/*7@parkedcalls-a6e2;2<ZOMBIE>'
   -- Stopped music on hold on Local/1000103@product-phone-8d56;2
   -- <Local/*7@from-internal-6335;1> Playing 'beep.gsm' (language 'en')
 == Spawn extension (product-phone, 1000103, 3) exited non-zero on 'Transfered/Local/1000103@product-phone-8d56;2<ZOMBIE>'
   -- Stopped music on hold on Local/*7@parkedcalls-a6e2;2
 == Timeout for Local/*7@parkedcalls-a6e2;2 parked on 701 (default). Returning to parkedcalls,s,1
   -- Executing [s@parkedcalls:1] Goto("Local/*7@parkedcalls-a6e2;2", "park-dial,s,1") in new stack
   -- Goto (park-dial,s,1)
[Nov 22 15:01:19] WARNING[25416]: pbx.c:4971 __ast_pbx_run: Channel 'Local/*7@parkedcalls-a6e2;2' sent into invalid extension 's' in context 'park-dial', but no invalid handler
   -- Executing [h@from-internal:1] AGI("Local/*7@from-internal-6335;2", "agi://") in new stack

Here's the relevant part of the dial plan:
exten => _*X, 1, Answer
exten => _*X, 2, SetMusicOnHold(${PRODUCT-MUSIC})
exten => _*X, 3, Park
exten => s, 1, Goto(park-dial,s,1)

exten => s, 1, AGI(agi://
exten => h, 1, AGI(agi://
Comments:By: Richard Mudgett (rmudgett) 2011-11-22 11:50:57.284-0600

Park seems to be unable to find the real channel parking the call.

How many layers of local channels are involved?

You might need to use the /b option on the local channel.

You might need to put a wait(1) after the Answer or let Park answer the call to give time for the answer to percolate back to the real channel.

By: David Cunningham (dcunningham) 2011-11-22 17:29:54.938-0600

I'm not sure what you mean by the layers, or where to put the 'b' option.

However we changed the Answer to Answer(10) and this appears to have fixed it. We will confirm with the customer and let you know.

By: Richard Mudgett (rmudgett) 2011-11-22 18:11:57.704-0600

The "layers" of local channels was referring to a chain of local channels:
SIP/100 -- Local/A -- Local/B -- ... -- Park

The Local channel options are specified with the dial application:

See https://wiki.asterisk.org/wiki/display/AST/Local+Channel+Modifiers