Ticket #2510 (closed Bugs: fixed)

Opened 2 years ago

Last modified 2 years ago

Directed Call Pickup **EXT only works for default context

Reported by: Jynger Assigned to:
Priority: major Milestone: 2.5
Component: Feature Code Admin Version: 2.3.1
Keywords: app-pickup Cc:
Confirmation: Need Feedback SVN Revision (if applicable):
Backend Engine: Asterisk 1.4.x Backend Engine Version:

Description (Last modified by p_lindheimer)

1. When ext1 calls ext2 then ext3 can call **ext2 to pickup the call - works fine. 2. When inbound call from IAX2 trunk calls ext2 then ext3 can call **ext2 to pickup the call - does not work, pickup fails with error: app_directed_pickup.c:159 pickup_exec: No target channel found for ext2

I think problem is that the code:

[app-pickup]
include => app-pickup-custom
exten => _**.,1,Noop(Attempt to Pickup ${EXTEN:2} by ${CALLERID(num)})
exten => _**.,n,Pickup(${EXTEN:2})

that code is only able to pickup calls on 'from-internal' context, if call context='from-did-direct' the pickup fails.

Change History

02/07/08 09:12:04 changed by p_lindheimer

  • priority changed from blocker to major.
  • confirmation changed from Unreviewed to Need Feedback.
  • description changed.
  • milestone changed from Cut Line to 3.0.

is this related to reports of people's in-ability to pickup calls from ringgroups? If some people would like to experiment with proposed solutions to this we would be very happy to review those and determine if something could be incorporated into the dialplan.

Looks like there is some good data here:

http://www.voip-info.org/wiki/view/Asterisk+cmd+Pickup

so maybe try putting "@from-internal" assuming it digs through the included contexts, or use the example and try one context after another (of the obvious ones), or for 1.4 base, maybe the PICKUPMARK variable.

Anyhow - please help provide this testing so we can look at addressing the problem.

Moving to next milestone for now but a good solution could clearly be put in the current release.

02/15/08 08:45:02 changed by cell

Change the line

exten => _**.,n,Pickup(${EXTEN:2})

to

exten => _**.,n,Pickup(${EXTEN:2}@from-did-direct)

in extensions_additional.conf did the trick for me. Now pickup is working ok, but only for external calls. Internal still doesn't work. They (internal) won't work from begining, i think here the problem is the installed CustomContexts.

02/15/08 12:02:42 changed by Jynger

What I did was to add following to '/etc/asterisk/extensions_custom.conf'

[app-pickup-custom]
exten => _**.,3,Pickup(${EXTEN:2}@from-did-direct)

That way first will be executed the local pickup (actually i think it will try to pickup the 'default' extension that can be set from the GUI 'general settings' page) from 'extensions_additional.conf' and if not found any will be picked up from-did-direct.

02/17/08 14:05:38 changed by paulv

The fix posted by Jynger works like a champ. Directed call pickup is now working on my system. Thanks!

02/26/08 01:53:28 changed by cell

BTW, for FreePBX 2.4 the same solution is needed, add @from-did-direct to '/etc/asterisk/extensions_custom.conf'

02/26/08 08:16:13 changed by p_lindheimer

  • status changed from new to closed.
  • resolution set to fixed.

try new framework r5726

02/26/08 08:17:01 changed by p_lindheimer

  • status changed from closed to reopened.
  • resolution deleted.

oops - wrong ticket

03/01/08 14:21:42 changed by adeel

Using * 1.4.8 with fpbx 2.4.0, i can't get directed call pickup working at all. The way the call is being routed is the following:

incoming call on a ZAP line to an IVR. The IVR sends the call to either a ring group or specific extension, at which point, the directed call pickup is tried and fails. I've tried doing the above suggested approach, but that just returns:

[Mar  1 16:13:43] NOTICE[11577]: chan_sip.c:13977 handle_request_invite: Nothing to pick up for c4701140fde04978@192.168.0.110
    -- Executing [**8378@from-internal:1] NoOp("SIP/8379-b673f6e8", "Attempt to Pickup 8378 by 8379") in new stack
    -- Executing [**8378@from-internal:2] Pickup("SIP/8379-b673f6e8", "8378") in new stack
[Mar  1 16:14:00] NOTICE[941]: app_directed_pickup.c:159 pickup_exec: No target channel found for 8378.
    -- Executing [**8378@from-internal:3] Pickup("SIP/8379-b673f6e8", "8378@ext-local") in new stack
[Mar  1 16:14:00] NOTICE[941]: app_directed_pickup.c:159 pickup_exec: No target channel found for 8378.
    -- Executing [**8378@from-internal:4] Pickup("SIP/8379-b673f6e8", "8378@from-internal") in new stack
[Mar  1 16:14:00] NOTICE[941]: app_directed_pickup.c:159 pickup_exec: No target channel found for 8378.
    -- Executing [**8378@from-internal:5] Pickup("SIP/8379-b673f6e8", "8378@default") in new stack
[Mar  1 16:14:00] NOTICE[941]: app_directed_pickup.c:159 pickup_exec: No target channel found for 8378.
    -- Executing [**8378@from-internal:6] Pickup("SIP/8379-b673f6e8", "8378@from-trunk") in new stack
[Mar  1 16:14:00] NOTICE[941]: app_directed_pickup.c:159 pickup_exec: No target channel found for 8378.
    -- Executing [**8378@from-internal:7] Pickup("SIP/8379-b673f6e8", "8378") in new stack
[Mar  1 16:14:00] NOTICE[941]: app_directed_pickup.c:159 pickup_exec: No target channel found for 8378.
    -- Executing [**8378@from-internal:8] Pickup("SIP/8379-b673f6e8", "8378@from-internal") in new stack
[Mar  1 16:14:00] NOTICE[941]: app_directed_pickup.c:159 pickup_exec: No target channel found for 8378.
  == Auto fallthrough, channel 'SIP/8379-b673f6e8' status is 'UNKNOWN'

Doing a show channels produces the following output:

Channel              Location             State   Application(Data)             
SIP/8379-08282c80    8379@from-internal:1 Ringing AppDial((Outgoing Line))      
Zap/5-1              s@macro-dial:7       Up      Dial(SIP/8379||trw)           
2 active channels
1 active call

I'm using all SIP phones (polycom 601's & 330's) and in * 1.2, I was able to get the call pickup working. Any thoughts would be greatly appreciated

03/12/08 20:48:29 changed by mmastera

I have a temporary workaround for the inability to pickup a call placed to a ring group. You don't need to add the code listed above for this to work...instead of specifying a particular extension for the pickup, use the ring group number instead. for example if ext 301 is in a ring group and I dial **301 to pick up the ringing call it will fail (with or without the code above). To successfully pickup the call, dial **600 (or whatever ring group number is ringing) and it will work.

Still very interested in being able to pickup a ring group call by specifying an extension of a ringing phone...

03/18/08 07:06:36 changed by zeus

This is not a directed pickup, this is a group pickup, same as *8. The problem after Jynger's fix is directed pickup (**ext) in ring groups.

(follow-up: ↓ 15 ) 04/15/08 06:48:42 changed by cell

Found on freepbx forum what worked perfectly for me, including with CustomContexts. So, I changed app-pickup with:

[app-pickup]
include => app-pickup-custom
exten => _**.,1,Noop(Attempt to Pickup ${EXTEN:2} by ${CALLERID(num)})
exten => _**.,n,SET(GLOBAL(PICKUPMARK)=${EXTEN:2})[[BR]] exten => _**.,n,Pickup(${EXTEN:2}@PICKUPMARK)

and all was ok.

(follow-up: ↓ 13 ) 04/15/08 09:41:31 changed by zeus

I tested it and i have the same result. It does not work when i try to pickup a call from a ring group.

Thanks for your reply.

(in reply to: ↑ 12 ) 04/15/08 12:21:37 changed by Jynger

I guess that is because when pickup from ring group you have EXTEN:2 set to ringing extension number, but to pick up the call it should be set ringgroup number instead. Like extension 204 is member of ringigngroup 602, then when 204 rings, your channel shows something like:

SIP/204-08d00d88     602@from-internal:1  Ringing

but when you dial 204 directly your channel shows:

SIP/204-08d00d88     204@from-internal:1  Ringing

so when app-pickup executes Attempt to Pickup ${EXTEN:2}@from-internal it should try to pickup 602 instead of ${EXTEN:2} that is 204 ---- @from-internal no sutch channel.

04/16/08 01:09:06 changed by zeus

You are right about that. The thing is that this is not a directed pickup. It has the same result with *8.

The need for directed pickup is for larger installations with 1> groups. If you have an operator with a console of 64+ extensions (BLF) and the extensions is in 3 groups like sales, support, accounting. In this case when the group sales have 2 incoming calls and the group support have also 2 incoming calls and the operator wants to pick up the call “150” sales then we have a problem.

Of course this can be happen with 1 group also meaning that if we have 2 incoming calls to ext 151 and ext 155 in group 600 then again we have the same problem.

Thanks for your reply Jynger.

(in reply to: ↑ 11 ) 04/29/08 04:10:15 changed by Rocco77

Replying to cell:

Found on freepbx forum what worked perfectly for me, including with CustomContexts. So, I changed app-pickup with: [app-pickup]
include => app-pickup-custom
exten => _**.,1,Noop(Attempt to Pickup ${EXTEN:2} by ${CALLERID(num)})
exten => _**.,n,SET(GLOBAL(PICKUPMARK)=${EXTEN:2})[[BR]] exten => _**.,n,Pickup(${EXTEN:2}@PICKUPMARK)
and all was ok.

I tried the code suggested but with it, the directed pickup **EXT behaves exactly like the "blind" *8 group pickup. So it only APPARENTLY works. To confirm this I've checked that when an extension is ringing, if I dial **WHICHEVEREXT I always pickup the ringing one.

My PARTIAL solution (it doesn't work for extensions ringing for a call to a group or a queue but only for direct calls from other extensions or from dialing during IVR from external) is:

[app-pickup-custom] exten => _**.,3,Pickup(${EXTEN:2}@from-did-direct) exten => _**.,n,Pickup(${EXTEN:2}@from-internal-additional-CUSTOM1) exten => _**.,n,Pickup(${EXTEN:2}@from-internal-additional-CUSTOM2) exten => _**.,n,Pickup(${EXTEN:2}@from-internal-additional-CUSTOM3)

"from-internal-additional-CUSTOMx" are my internal manual custom contexts to allow extensions call with specific trunks. As stated this doesn't work when the extension is ringing for a call to its group or queue.

Can anybody confirm that **EXT = *8 with the "PICKUPMARK" code?

Regards

Rocco77

04/30/08 00:59:43 changed by cell

2 Rocco77: I can confirm that :( Just checked, and it pickup any ringing extension, so **EXT = *8 Your solution work for me, but just for external calls(incoming via sip trunks).

06/17/08 09:36:39 changed by jspuij

I think I found a solution using the PICKUPMARK Variable. It works for ring groups and different contexts. Diff included.

--- functions.inc.old   2008-06-17 18:25:43.000000000 +0200
+++ functions.inc.php   2008-06-17 18:24:35.000000000 +0200
@@ -679,9 +679,9 @@
                                $fclen = strlen($fc_pickup);
                                $ext->add('app-pickup', "_$fc_pickup.", '', new ext_NoOp('Attempt to Pickup ${EXTEN:'.$fclen.'} by ${CALLERID(num)}'));
                                if (strstr($version, 'BRI'))
-                                       $ext->add('app-pickup', "_$fc_pickup.", '', new ext_dpickup('${EXTEN:'.$fclen.'}'));
+                                       $ext->add('app-pickup', "_$fc_pickup.", '', new ext_dpickup('${EXTEN:'.$fclen.'}@PICKUPMARK'));
                                else
-                                       $ext->add('app-pickup', "_$fc_pickup.", '', new ext_pickup('${EXTEN:'.$fclen.'}'));
+                                       $ext->add('app-pickup', "_$fc_pickup.", '', new ext_pickup('${EXTEN:'.$fclen.'}@PICKUPMARK'));
                        }


@@ -923,6 +923,8 @@
                                        if (isset($exten['ringtimer']) && $exten['ringtimer'] != 0)
                                                $ext->add('ext-local', $exten['extension'], '', new ext_setvar('__RINGTIMER',$exten['ringtimer']));

+                                       $ext->add('ext-local', $exten['extension'], '', new ext_setglobalvar('PICKUPMARK',$exten['extension']));
+
                                        $ext->add('ext-local', $exten['extension'], '', new ext_macro('exten-vm',$vm.",".$exten['extension']));
                                        $ext->add('ext-local', $exten['extension'], '', new ext_hangup(''));

06/20/08 07:59:20 changed by zeus

This is not work for me.

I made those changes to functions.inc.php in core module but i see no change. Pickup from ring groups don't work.

Is there any other changes i must do (ex. extensions_override_freepbx.conf)?

Thanks

07/14/08 15:17:23 changed by p_lindheimer

  • status changed from reopened to closed.
  • resolution set to fixed.

r6009, r6010

Here is the issue with all of the these scenarios (PICKUPMARK or not). If the call is coming into a ringgoup, then the extension ringing is going to be the ringgoup number. PICKUPMARK would only allow you to tag a single extension as a member of the ringgoup. Using a scenario where extension 700 is a member of ringgoups 441 and 445, you need dialplan that looks something like this:

exten => **700,1,Pickup(700)                                                                                                                                                  
exten => **700,n,Pickup(700@from-internal)                                                                                                                                    
exten => **700,n,Pickup(700@from-did-direct)                                                                                                                                  
exten => **700,n,Pickup(441@from-internal)                                                                                                                                    
exten => **700,n,Pickup(446@from-internal)                                                                                                                                   
exten => **700,n,Hangup                                                                                                                                                       

Which says try picking up extension 700 in one of it's normal contexts, and failing that, try picking up any call coming into ringgoup 441, then 446 - and if their phone is ringing as a result of one of those ringgroups ringing, it will pick it up.

Now an issue that still remains. Let's say 441 is a ringgoup with a hunt strategy and 446 is a ringgall. A call comes into both ringgoups. 700 starts ringing because of ringgoup 446, but hasn't started ringing yet from the call hitting 441 because another extension earlier in the hunt list is still ringing. You would end up picking up that call instead of the one that came into 446...

Not sure if there is any reasonable way to circumvent that, without changing the call pickup application, and allowing incoming calls to be tagged with multiple extensions so that you could use a PICKUPMARK type approach on ringgoups...

Either way, marking this closed for now but please test the changes and report back in case this is incomplete. We can re-open the ticket if needed.

07/14/08 15:33:30 changed by p_lindheimer

r6011 also