Troubleshooting Pickup()/PickupChan()

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

Troubleshooting Pickup()/PickupChan()

Postby redwolf890 » Wed Jun 13, 2012 8:32 am

I'm working on directed call pickup and can correctly route the requisite feature code on the channel of the line trying to remote pickup to a context that tries to do a Pickup()/PickupChan(). It seems no matter what I try I get the following error:
Code: Select all
app_directed_pickup.c:374  No target channel found for SIP/103


In my specific scenario I have extension 104 call 103 and extension 110 attempts to do the pickup. The pickup/pickupchan command is called from 110's channel.

These are some things I've tried. In an attempt to just get something to work I even just put in string literals:
Code: Select all
exten => _**., n, Pickup(103)
exten => _**., n, Pickup(SIP/103)
exten => _**., n, Pickup(SIP/103@mydomain)
exten => _**., n, PickupChan(103)
exten => _**., n, PickupChan(SIP/103)
exten => _**., n, PickupChan(SIP/103@mydomain)


How can I better debug this? 104 and 103 are softphones, so I'm not sure if that has an impact, or if phones have to be provisioned in a specific way to be able to do Pickup()/PickupChan(). I haven't provided many details because I'm uncertain what info would be helpful. I'll add more as needed. Thanks in advance for any solutions.
redwolf890
Oldsterisk
 
Posts: 105
Joined: Tue Oct 25, 2011 9:50 am

Re: Troubleshooting Pickup()/PickupChan()

Postby david55 » Wed Jun 13, 2012 8:56 am

Only the first example is valid, although you are also allowed to specify a context.

For PickupChan, assuming the bad practice of making sip.conf sections match extension names, you would need
SIP/103-xxxxxxx, where xxxxxxxx can only be found out at run time.

centos*CLI> core show application Pickup
centos*CLI>
-= Info about application 'Pickup' =-

[Synopsis]
Directed Call Pickup

[Description]
Pickup([extension[@context][&extension2@[context]...]]): This application can
pickup any ringing channel that is calling the specified extension. If no
context is specified, the current context will be used. If you use the special
string "PICKUPMARK" for the context parameter, for example 10@PICKUPMARK,
this application tries to find a channel which has defined a ${PICKUPMARK}
channel variable with the same value as "extension" (in this example, "10").
When no parameter is specified, the application will pickup a channel matching
the pickup group of the active channel.
centos*CLI> core show application PickupChan
centos*CLI>
-= Info about application 'PickupChan' =-

[Synopsis]
Pickup a ringing channel

[Description]
PickupChan(channel[&channel...]): This application can pickup any ringing chan
nel
david55
Moves Like Spencer
 
Posts: 7740
Joined: Fri Sep 26, 2008 5:03 am

Re: Troubleshooting Pickup()/PickupChan()

Postby redwolf890 » Wed Jun 13, 2012 9:44 am

You mention the first example being valid. Since it's valid but still fails, is there a good way to backtrace why? I've raised core set verbose and debug as high as they can reasonably be set (without drowning in noise) and am not seeing anything that explains why the target channel cannot be found for extension 103.

Secondly, as you indicate I have to pass the channel identified to PickupChan (SIP/103-xxxxxxxx), is there some way in the dialplan (maybe with HASH?) that I can look this up?

Thanks again David.
redwolf890
Oldsterisk
 
Posts: 105
Joined: Tue Oct 25, 2011 9:50 am

Re: Troubleshooting Pickup()/PickupChan()

Postby david55 » Wed Jun 13, 2012 11:14 am

Probably the wrong context.

You would have to capture the channel name in a global variable.
david55
Moves Like Spencer
 
Posts: 7740
Joined: Fri Sep 26, 2008 5:03 am

Re: Troubleshooting Pickup()/PickupChan()

Postby redwolf890 » Wed Jun 13, 2012 11:47 am

Are you saying I'm calling Pickup in the wrong context?
redwolf890
Oldsterisk
 
Posts: 105
Joined: Tue Oct 25, 2011 9:50 am

Re: Troubleshooting Pickup()/PickupChan()

Postby david55 » Wed Jun 13, 2012 11:53 am

You may need to explicitly specify a context.
david55
Moves Like Spencer
 
Posts: 7740
Joined: Fri Sep 26, 2008 5:03 am

Re: Troubleshooting Pickup()/PickupChan()

Postby redwolf890 » Wed Jun 13, 2012 12:27 pm

Is there some setting somewhere in a .conf I have to turn on to enable this feature? Also, would it matter the phone I'm trying to intercept incoming call from is a soft phone?
redwolf890
Oldsterisk
 
Posts: 105
Joined: Tue Oct 25, 2011 9:50 am

Re: Troubleshooting Pickup()/PickupChan()

Postby redwolf890 » Wed Jun 13, 2012 1:56 pm

Solved. What was happening was that I was doing Pickup() in a different context than where the incoming call was being handled. Because of this, I had to set PICKUPMARK where the incoming call was happening. I set it it to <sip_user>.<sip_domain>. However, if my feature codes context the match I was trying to get in Pickup was <extension #>.<sip_domain>. Since there was no match, no channel was picked up. So to solve this problem I just changed ${HASH(phone,sip_user)} to ${HASH(extension,number)} at the incoming call where PICKUPMARK was set.

One thing worth noting is that if I just tried to set PICKUPMARK to the extension number it failed. Every single time. The Pickup() application simply could not match to a channel if I just supplied with an extension. This is the reason why I had to postpend the sip_domain.
redwolf890
Oldsterisk
 
Posts: 105
Joined: Tue Oct 25, 2011 9:50 am


Return to Asterisk Support

Who is online

Users browsing this forum: No registered users and 11 guests