[asterisk-users] Detecting Transfer

John A. Sullivan III jsullivan at opensourcedevel.com
Tue Sep 15 16:49:41 CDT 2009


On Tue, 2009-09-15 at 16:44 -0500, Brent Davidson wrote:
> Is there a way to detect if a call is a transfer in the dialplan?  Here 
> is my issue:  I have an office with 2 extensions.  Under normal 
> circumstances any call that comes in should ring both extensions.  I 
> accomplish this through a queue.  The problem is that if the call is 
> answered on say extension 11 and the answerer wants to transfer the call 
> to the other phone, extension 10, transferring the call to extension 10 
> puts it back in the queue that again rings both phones.  I want to set 
> the system up so that if the call is a transfer from the other extension 
> it will only ring the phone it's being transferred to.  This is what I'm 
> currently doing (using AEL dialplan):
> 
> 10 => {
>     if ("${CALLERID(num)}" = "11") {
>       &internal-ext(${EXTEN},SIP/${EXTEN});
>     } else {
>       Queue (operator|tTnHr|||30);
>     }
>     Voicemail(10 at internal|u);
>     Hangup;
>   }
>   11 => {
>     if ("${CALLERID(num)}" = "10") {
>       &internal-ext(${EXTEN},SIP/${EXTEN});
>     } else {
>       Queue (operator|tTnHr|||30);
>     }
>     Voicemail(10 at internal|u);
>     Hangup;
>   }
> 
> 
> My only problem is that we have some extension duplication at other 
> offices and it is possible for an extension to come in from another 
> office with the same CallerID Number.
> 
> Is there a better way to do this?
> 
<snip>
We did something very similar with a ring group.  When a call comes in
to the main number, we have it dial ${ALLPHONES} which is
SIP/blah&SIP/blee&SIP/bloo.  When blee transfers to blah, it works just
as expected.  Hope this helps - John
-- 
John A. Sullivan III
Open Source Development Corporation
+1 207-985-7880
jsullivan at opensourcedevel.com

http://www.spiritualoutreach.com
Making Christianity intelligible to secular society




More information about the asterisk-users mailing list