[asterisk-bugs] [Asterisk 0013425]: One-touch parking results in stuck/deadlocked channel if parked channel hangs up while announcement still being played

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Oct 3 15:26:07 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13425 
====================================================================== 
Reported By:                mdu113
Assigned To:                jpeeler
====================================================================== 
Project:                    Asterisk
Issue ID:                   13425
Category:                   Resources/res_features
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!): 141028 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-09-04 16:08 CDT
Last Modified:              2008-10-03 15:26 CDT
====================================================================== 
Summary:                    One-touch parking results in stuck/deadlocked
channel if parked channel hangs up while announcement still being played
Description: 
This is a continuation of issue 11979. I discovered it just after I
reported everything's fine and that issue got closed. I don't see a way to
re-open it, probably because I'm not the original reporter, so I'm opening
a new issue.
The setup is exactly as I described in 11979:
- features.conf:
[featuremap]
parkcall => *30                ; Park call (one step parking)

[applicationmap]
park_caller => *33,peer/callee,AGI,park.agi|park_caller
park_callee => *33,peer/caller,AGI,park.agi|park_callee

The scenario:
2 SIP endpoints: xyz011101(polycom 501) calls xyz110001(cisco 7960), call
is connected (through FastAGI application), then I dial *30 on xyz011101 to
park the peer and hangup the peer (xyz110001) while announcement being
played to xyz011101. The result is xyz011101 is stucked. It appears in
channel list after I hang it up on the phone and sometimes (intermittently)
asterisk crashes or deadlocks after that.
Here's the console output:
    -- Executing [1100 at xyz:1] Set("SIP/xyz011101-081e15f8",
"TIMEOUT(absolute)=10800") in new stack
    -- Channel will hangup at 2008-09-04 23:48:14 UTC.
    -- Executing [1100 at xyz:2] AGI("SIP/xyz011101-081e15f8",
"agi://devel.acecape.com") in new stack
    -- AGI Script Executing Application: (SetCallerPres) Options:
(allowed_passed_screen)
    -- AGI Script Executing Application: (Set) Options:
(CALLERID(name)=Unknown)
    -- AGI Script Executing Application: (Set) Options:
(CALLERID(num)=Unknown)
    -- AGI Script Executing Application: (Dial) Options:
(SIP/xyz110001|180|Kk)
    -- Called xyz110001
    -- SIP/xyz110001-081e2b88 is ringing
    -- SIP/xyz110001-081e2b88 answered SIP/xyz011101-081e15f8
    -- Started music on hold, class 'default', on channel
'SIP/xyz110001-081e2b88'
  == Parked SIP/xyz110001-081e2b88 on 701 at parkedcalls. Will timeout back
to extension [xyz] , 1 in 600 seconds
    -- <SIP/xyz011101-081e15f8> Playing 'digits/7' (language 'en')
    -- Stopped music on hold on SIP/xyz110001-081e2b88
  == SIP/xyz110001-081e2b88 got tired of being parked
  == CDR on channel 'SIP/xyz110001-081e2b88' lacks end
  == CDR on channel 'SIP/xyz110001-081e2b88' lacks end
[Sep  4 16:48:21] WARNING[24101]: res_features.c:1846 do_parking_thread:
Whoa, failed to remove the extension!
    -- <SIP/xyz011101-081e15f8> Playing 'digits/0' (language 'en')
    -- <SIP/xyz011101-081e15f8> Playing 'digits/1' (language 'en')
    -- Added extension 'isk/var/lib/asterisk/sounds/digits/en/1.al'
priority 1 to parkedcalls
At this point I hangup xyz011101 and do "show channels":
webdevel*CLI> show channels
Channel              Location             State   Application(Data)
SIP/xyz011101-081e15 s at xyz:1              Up     
Dial(SIP/xyz110001|180|Kk)
1 active channel
1 active call
A few minutes later asterisk crashed
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0013493 In some cases parking extension isn't r...
child of            0013251 [branch] endbeforehexten=yes is useless...
====================================================================== 

---------------------------------------------------------------------- 
 (0093132) jpeeler (administrator) - 2008-10-03 15:26
 http://bugs.digium.com/view.php?id=13425#c93132 
---------------------------------------------------------------------- 
mdu113: Has to do with which thread has control of the channel. Asterisk is
written in such a way as each thread expects full control of the channel.
In this case (but similar to the other parking fix), the control of the
channel is being passed to the parking thread. If a masquerade were not
done (you witnessed this) the two threads could potentially fight over the
same channel. If one were to create a channel for no reason and then
masquerade it, odd things could happen such as a channel not getting hung
up.

aragon: Pretty sure that is a separate issue. The original reported issue
has already been solved, but another issue was also mentioned and will be
committed shortly. Should have probably been in a separate bug report so
this one could be closed already. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-10-03 15:26 jpeeler        Note Added: 0093132                          
======================================================================




More information about the asterisk-bugs mailing list