Summary:ASTERISK-18273: Orphaned channels after pickup
Reporter:Karsten Wemheuer (kwemheuer)Labels:
Date Opened:2011-08-15 12:15:39Date Closed:2011-08-31 10:20:48
Status:Closed/CompleteComponents:Applications/app_directed_pickup Channels/chan_sip/General
Versions:SVN Frequency of
duplicatesASTERISK-18222 Pickupchan of a local channel segfaults if 2 users pickup at same time
is related toASTERISK-18650 Asterisk hangs after failed directed call pickup attempt, logs show "Fixup failed on channel SIP/xxx, strange things may happen."
is related toASTERISK-18225 SIP channels are getting stuck after picking up calls
Environment:Debian Squeeze, compiled SVN branch 1.8 from source, revision 331772Attachments:( 0) debug.log
( 1) dialplan
( 2) pickup_tech.patch
Description:I can reproduce a situation where one channel gets orphaned after a pickup.

System is asterisk 1.8 from SVN (331772)

I set up a simple environment: 5 SIP-Phones with extensions 101 to 105 (Accounts phone1 to phone5). All phones are in the same Pickup and Callgroup.

Phone3 set up a call to extension 106, which dials phone1&phone2.

On SIP-Phones phone3 and phone4 I dial at the same time "*8" to Pickup the call. One phone gets the call, the other seems to be connected, but there is no audio. After hanging up, the phone, which don't get the call still has on channel in asterisk.
Comments:By: Karsten Wemheuer (kwemheuer) 2011-08-15 12:19:38.861-0500

Debug log

By: Karsten Wemheuer (kwemheuer) 2011-08-15 12:23:33.272-0500

After the Test, one channel gets orphaned:
core show channels
Channel              Location             State   Application(Data)            
SIP/phone5-00000007  106@Standard:1       Up      AppDial((Outgoing Line))      
1 active channel
0 active calls
3 calls processed

By: Karsten Wemheuer (kwemheuer) 2011-08-15 12:25:27.493-0500

Maybe it the issue is related to 18269

By: Alec Davis (alecdavis) 2011-08-23 20:40:33.450-0500

Related issue: ASTERISK-18222

By: Karsten Wemheuer (kwemheuer) 2011-08-24 01:49:48.160-0500

I am not sure, that this issue is related to 18222 because the impact differs. In 18222 there is a crash, in 18273 there is no crash.

After the pickup failed, there is an orphaned channel. The device (in the example above SIP/phone5) is still "in use" and can't be called. The channel can not hung up ("channel request hangup" gives no success). After a restart (core restart now) all is fine again. Because restart is possible, I think this is not a locking issue.

By: Alec Davis (alecdavis) 2011-08-25 07:22:48.011-0500

https://reviewboard.asterisk.org/r/1353/ fixes this.

By: Gregory Hinton Nietsky (irroot) 2011-08-29 08:26:40.053-0500

https://reviewboard.asterisk.org/r/1397/ may fix it also been having the same problem not resolved by 1353.

not related to local channels.

By: Gregory Hinton Nietsky (irroot) 2011-08-29 08:28:59.853-0500

Patch from RB that hopefully kills this problem i am trying to replicate with patch applied please also try.

By: Richard Mudgett (rmudgett) 2011-08-29 18:52:54.505-0500

I have posted review
That implements the fix I outlined in ASTERISK-18222.

By: Gregory Hinton Nietsky (irroot) 2011-08-30 00:52:13.358-0500

Thx Richard got your patch out there testing looks good.

By: Karsten Wemheuer (kwemheuer) 2011-08-30 04:56:15.181-0500

Thanks Richard, Your patch from https://reviewboard.asterisk.org/r/1400/ fixes the issue. No orphaned channels left after pickup.