[Asterisk-bugs] [Asterisk 0009491]: Directed Pickup won't grab group calls - no target channel found

noreply at bugs.digium.com noreply at bugs.digium.com
Sat Jul 14 06:58:57 CDT 2007


The following issue has been REOPENED. 
====================================================================== 
http://bugs.digium.com/view.php?id=9491 
====================================================================== 
Reported By:                jamesb63
Assigned To:                file
====================================================================== 
Project:                    Asterisk
Issue ID:                   9491
Category:                   Applications/app_directed_pickup
Reproducibility:            always
Severity:                   trivial
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.4.2  
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        No 
Request Review:              
====================================================================== 
Date Submitted:             04-06-2007 09:26 CDT
Last Modified:              07-14-2007 06:58 CDT
====================================================================== 
Summary:                    Directed Pickup won't grab group calls - no target
channel found
Description: 
If A directly calls C, B can execute Pickup(C) and it works successfully

If, however, A calls a number which calls a group of extensions (eg C, D
and E), B cannot pickup any of the ringing extensions

This was found because my setup involves a call targeting handsets in my
office room at home but I don't want them ringing say in the bedroom across
the hall but I want to be able to pick up the call remotely.

Normal pickup does work though.



====================================================================== 

---------------------------------------------------------------------- 
 jamesb63 - 07-14-07 06:58  
---------------------------------------------------------------------- 
Sorry I didn't get back to everybody on this, i've been away for quite a
while and haven't been able to participate.

In current version of SVN r75108M, app_directed_pickup still fails
normally.

I did some digging around to ensure I had the right configuration etc and
found a note on voip-info by Roberto at:
http://www.voip-info.org/wiki/view/Asterisk+cmd+Pickup

Which talked about a problem in the logic of the can_pickup() function

I've modified his example accordingly to the current source, compiled it
and it works IF you include a context in the Pickup() command.

Here is the patch:

---- CUT ----
Index: app_directed_pickup.c
===================================================================
--- app_directed_pickup.c       (revision 75159)
+++ app_directed_pickup.c       (working copy)
@@ -83,7 +83,8 @@
 /* Helper function that determines whether a channel is capable of being
picked up */
 static int can_pickup(struct ast_channel *chan)
 {
-       if (!chan->pbx && (chan->_state == AST_STATE_RINGING ||
chan->_state == AST_STATE_RING))
+       //if (!chan->pbx && (chan->_state == AST_STATE_RINGING ||
chan->_state == AST_STATE_RING))
+        if (chan && (!chan->pbx))
                return 1;
        else
                return 0;
---- CUT ----

The pickup context in my AEL config now looks like:

context pickup {
  _**[1-468]. => {
    Pickup(${EXTEN:2}@internal_all);
    HangUp();
  };
}

"internal_all" being the context in which a person to person dialed call
places itself, however, the pseudo-context "PICKUPMARK" does not work and
just produces the ubiquitous "no target channel" error.

So, partial problem solved (or at least I think).

If I call a DID which lands in a different context, I can't direct pickup
the ringing extension still though - D'OH! 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
07-14-07 06:58  jamesb63       Note Added: 0067380                          
======================================================================




More information about the asterisk-bugs mailing list