[asterisk-users] Detecting Transfer

Brent Davidson brent at texascountrytitle.com
Tue Sep 15 16:44:52 CDT 2009


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?

Thanks,
Brent



More information about the asterisk-users mailing list