I think I have solved with the following code:

_*8X! => {
   PickUpChan(SIP/${EXTEN:2});
   Hangup();
}

thanks


From: Alessio 
Sent: Friday, July 22, 2011 11:27 AM
To: asterisk-users@lists.digium.com 
Subject: [asterisk-users] Pickup(${EXTEN:2}); not works from outside


Hi!
I'm using ael language and I need to pick up a call from outside to an internal 
number.
for example:

i'm 120 
the phone 100 rings, it's a call from outside.
now I pick up the call with: *8100
and I would expect to answer the call but the response is Declined
the Puckup code is below:

_*8X! => {
Pickup(${EXTEN:2});
Hangup();
}

 
the problem is if an another number ( 130) calls the phone 120 and I pick up 
with *8100, this works!
I respond to the caller 130.

I tried this code below:

_*8X! => {
    SET(GLOBAL(PICKUPMARK)=${EXTEN:2});
    Pickup(${EXTEN:2}@PICKUPMARK);
}


but if I type the number *8101 or *8104 or *8103 I always answer the call for 
the number 100.

I hope I was clear
I'm sorry for my english.
Thanks


--------------------------------------------------------------------------------


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to