[asterisk-bugs] [Asterisk 0010623]: Application Pickup() "PICKUPMARK" string is not working!

noreply at bugs.digium.com noreply at bugs.digium.com
Sat Sep 1 15:21:08 CDT 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=10623 
====================================================================== 
Reported By:                ygor
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   10623
Category:                   Applications/app_directed_pickup
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.11  
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             08-31-2007 16:58 CDT
Last Modified:              09-01-2007 15:21 CDT
====================================================================== 
Summary:                    Application Pickup() "PICKUPMARK" string is not
working!
Description: 
I have several trunks, each one directed to a context in my PBX.

When I execute Pickup(${EXTEN:2}@CONTEXT-XXX) to te right context ( in
which the call has been received ), the Pickup() works.

When I execute the Pickup(${EXTEN:2}) without any context or
Pickup(${EXTEN:2}@PICKUPMARK), I get the error message:

[Aug 31 18:52:56] NOTICE[6694]: app_directed_pickup.c:159 pickup_exec: No
target channel found for 2102.

I think that PICKUPMARK should scan the channels for one or the first
context in which this extension is active and Pickup this extension on the
matched context.

The same flaw has been reproduced on Asterisk 1.4.10.1 

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

---------------------------------------------------------------------- 
 ygor - 09-01-07 15:21  
---------------------------------------------------------------------- 
2102 is one extension...

The entry call contexts are: callin, zap-in, sip-in & disa-in, they are
related with the call source so PICKUPMARK should assume one of those
CONTEXT names as described on the Pickup() documentation ( show application
PICKUPMARK ), the PICKUPMARK string is a wildcard that scans for the
current ringing channels searching for a ocurrence of the EXTEN and then
gets the first channel and assumes it...

When I do a "show channels" @ Asterisk CLI, I have currently two channels
with the 2102 extension one on Ringing state and another on ring state...
it simply enters from PSTN (zap) or SIP or IAX2 in different contexts and
then they dial to a internal extension depending from the entry route wich
is searched on a database... so on show channels I have a Ringing state
channel with the Application(data): Dial(SIP/1202 at internal) and Location:
01692037158 at zap-in:2 so PICKUPMARK string should of course assume the
"zap-in" value and then it correctly picks the call from PSTN.

I have tested it with hardcoded extensions, one after another, like this:

[pickup-app]
exten = _55.,1,Pickup(${EXTEN:2}@zap-in)
exten = _55.,n,Pickup(${EXTEN:2}@sip-in)
exten = _55.,n,Pickup(${EXTEN:2}@iax-in)
exten = _55.,n,Pickup(${EXTEN:2}@internal)
exten = _55.,n,Hangup

exten = h,1,Hangup

and then it worked but if for example the call enters from iax-in it fails
zap-in and sip-in Pickups and then picks the call up on the iax-in pickup.

So, my whole point is... I want to write the context pickup-app as this:

[pickup-app]
exten = _55.,1,Pickup(${EXTEN:2}@PICKUPMARK)
exten = _55.,1,Hangup

And then it automatically does the scan job for me.

Of course, for my tiny application on this case it should not be hard to
hardcode the extensions, but I have applications with lots of call-entry
contexts for example and it should be painful to write a Pickup() for each
entry context on my dialplan. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
09-01-07 15:21  ygor           Note Added: 0069824                          
======================================================================




More information about the asterisk-bugs mailing list