Philipp von Klitzing
2010-Jun-15 16:09 UTC
[asterisk-users] Unable to pickup an extension, tryi
Hi!> How to do this ?? > To proceed with your answer on PICKUPMARK, where do I put this ???Look at the example for Asterisk 1.4 on this page: http://www.voip-info.org/wiki/view/Asterisk+cmd+Pickup Philipp
Philipp, I have read this wiki, but I still don't know how to implement it in my example... The wiki says : exten => 1234,1,Set(__PICKUPMARK=1234) So how do I do this with my dialplan : exten => s,n,Dial(${SIPaccounts},${timeout}) or translated : exten => s,n,Dial(SIP/testcorp1&SIP/testcorp2) Can you give me the exact syntax?? Because I really can not filter this from the wiki. Looking forward to your answer, thx ! Jonas. On 06/15/2010 06:09 PM, Philipp von Klitzing wrote:> Hi! > > >> How to do this ?? >> To proceed with your answer on PICKUPMARK, where do I put this ??? >> > Look at the example for Asterisk 1.4 on this page: > http://www.voip-info.org/wiki/view/Asterisk+cmd+Pickup > > Philipp >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100615/9dee45d8/attachment.htm
exten => **XX --> This is a local extension, a certain phone which is monitored with BLF-lights. So if I press the button I want the phone call that made this phone ring, not another phone. exten => 1234567,n,Set(_PICKUPMARK=${EXTEN:5}) --> If I set the PICKUPMARK-variable the same as the DID that is called, how can I know which DID that is set in the context [example-pickup] ?? My phone, who tries to do the pickup, creates a new channel, and the PICKUPMARK-channel variable is of course not inherited to this newly created channel... Jonas. On 06/17/2010 06:44 PM, Philipp von Klitzing wrote:> Do this, for example: > > >> exten => 1234567,1,NoOp() >> exten => 1234567,n,Set(_PICKUPMARK=${EXTEN:5}) >> exten => 1234567,n,Dial(SIP/IPphone-1) >> >> exten => 3456789,1,NoOp() >> exten => 3456789,n,Set(_PICKUPMARK=${EXTEN:5}) >> exten => 3456789,n,Dial(SIP/IPphone-2) >> >> [example-pickup] >> exten => **XX,1,NoOp() >> exten => **XX,n,Pickup(${EXTEN:2}@PICKUPMARK) >>-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100617/87044781/attachment.htm
The inherent problem with this is that you might have 10(100) incoming calls. The assignment of PICKUPMARK is dynamic, but the pickup is static. You might use a GLOBAL variable to set PICKUPMARK like this: [sub-settings] exten => start,1,NoOp() exten => start,n,Set(_PICKUPMARK=${CALLNUM}) Exten => start,n,Set(GLOBAL(CALLNUM)=${CALLNUM} +1) exten => start,n,Return() [example-pickup] exten => **XX1,1,NoOp() exten => **XX1,n,Pickup(1 at PICKUPMARK) exten => **XX2,1,NoOp() exten => **XX2,n,Pickup(2 at PICKUPMARK) You would have to set CALLNUM initially and limit it, but you could use this to pickup X calls. _____ From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Jonas Kellens Sent: Thursday, June 17, 2010 12:39 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Unable to pickup an extension exten => start,n,Set(_PICKUPMARK=${CALLERID(num)}) In your example this means that the calling number (for example 3291234567 in Belgium or 49215790657 in Germany) will be set as PICKUPMARK. If I want to pick up Phone-1 which rings on an incoming call, how can I know on which incoming number the call was made ?? exten => **XX1,n,Pickup(4001 at PICKUPMARK) This needs to be more dynamic as I have multiple lines and multiple users... Jonas. On 06/17/2010 06:17 PM, Danny Nicholas wrote: If you stand on one foot, this might work: (assumes you get CALLERID(num) to be 4001 for IPphone1 and 4002 for IPphone2; In my shop DAHDI-1 is 4001 and DAHDI-2 is 4002) [sub-settings] exten => start,1,NoOp() exten => start,n,Set(_PICKUPMARK=${CALLERID(num)}) exten => start,n,Return() [example-pickup] exten => **XX1,1,NoOp() exten => **XX1,n,Pickup(4001 at PICKUPMARK) exten => **XX2,1,NoOp() exten => **XX2,n,Pickup(4002 at PICKUPMARK) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100617/8e3b4843/attachment.htm
Hi!> exten => **XX > > --> This is a local extension, a certain phone which is monitored with > BLF-lights. So if I press the button I want the phone call that made this > phone ring, not another phone.This is NOT a local extension: It is a special local PICKUP extension (you even named it "[example-pickup]"). So, in order to pickup an inbound call that has been placed to ...67 you need to dial **67. Small note for SNOM phones: Those can be configured to prefix a monitored extions (67) with f.e. "**" so that the phone dials **67 when pressing a blinking BLF button.> exten => 1234567,n,Set(_PICKUPMARK=${EXTEN:5}) > > --> If I set the PICKUPMARK-variable the same as the DID that is called, > how can I know which DID that is set in the context [example-pickup] ?? > My phone, who tries to do the pickup, creates a new channel, and the > PICKUPMARK-channel variable is of course not inherited to this newly > created channel...I am not sure I got your question, but the phone the does the pickup does not need to worry about inheritance of the PICKUPMARK variable - it _sets_ that variable itself (see code for **XX) and then ask Asterisk to search for a corresponding chanel with that value that is currently in RINGING state. The variable inheritance only matters for the device that is being called, in this case "IPphone-1", because that is the phone that you want to relieve of its inbound caller. In general: PICKUPMARK is for "directed pickup" where you know exactly which call you want. Look at *8 undirected pickup (and pickup groups) if you just want to "catch whatever just started calling me". Philipp