[Home]

Summary:ASTERISK-15393: [patch] call pickup can pickup caller instead of callee
Reporter:Nico Kooijman (syspert)Labels:
Date Opened:2010-01-04 10:22:38.000-0600Date Closed:2010-01-14 12:06:37.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:PBX/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) bug16539.patch
( 1) pickcaller.patch
Description:When dialing an outside trunk and on another phone a call-pickup (*8) is done the function find_channel_by_group returns a channel with state RING and the caller is transferred.

Instead of only returning a channel with the state RINGING and when found returning the channel of the callee the function can return randomly the caller and callee (when multiple phones are used)
Comments:By: Leif Madsen (lmadsen) 2010-01-04 10:25:25.000-0600

I think I understand what you're saying, but I'd like to be clear.

Are you stating that if you make an outbound call, and while it is ringing the outside line, if someone in the office dials *8 for call pickup, it will pick up your outbound call?

By: Nico Kooijman (syspert) 2010-01-05 01:18:39.000-0600

Yes, correct, phone a is calling to an outside line, phone b dial *8 and phone a is stopped while phone a hears a ringing tone. :)

By: Leif Madsen (lmadsen) 2010-01-05 08:39:56.000-0600

Marking this as Confirmed as you have a patch, but I'd like a couple of developers to review it to see if there is any regressions that could be caused by that change. I'd like to know why the original RING state was added as that may be necessary for some other functionality.

Thanks!

By: Nico Kooijman (syspert) 2010-01-05 17:11:51.000-0600

We are running 1.2 now, but also the code there looks for RING and RINGING. I think the way the logic has changed on how the channels are ordered in memory. IE phone A calls B and phone C dial *8 : everything works correctly (A is connected with C), but when phone C calls B and A dial *8 Phone A is connected to B.

Your welcome.

By: Jeff Peeler (jpeeler) 2010-01-12 12:36:05.000-0600

This actually appears to be a mistake just like 14206. I've attached a patch that solves the observed pickup issue for me.

By: Nico Kooijman (syspert) 2010-01-14 08:11:26.000-0600

Patch tested and solves the problem

By: Digium Subversion (svnbot) 2010-01-14 12:06:36.000-0600

Repository: asterisk
Revision: 240179

U   trunk/main/channel.c

------------------------------------------------------------------------
r240179 | jpeeler | 2010-01-14 12:03:31 -0600 (Thu, 14 Jan 2010) | 12 lines

Fix broken call pickup

The problem was the OUTGOING flag was not getting set properly on the channel,
resulting in pickup failing as ast_read thought the call was inbound. Refer to
170393 for a more verbose description as this is the same exact change.

(closes issue ASTERISK-15393)
Reported by: syspert
Patches:
     bug16539.patch uploaded by jpeeler (license 325)
Tested by: syspert

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=240179