Wednesday, October 19, 2011

Blind Transfer and Ring back in Elastix

The followings apply to Elastix 2.0.0-36 &  Asterisk on CentOS release 5.5.

In Elastix, we can perform blind transfer and ring back us if the transferee does not answer.  Note that here assumes you are transferring call using Asterisk feature, not the IP phone's own transfer function.  

Firstly, we have to setup a TRANSFER_CONTEXT.  Dialplan execution will jump to here on transfer.

TRANSFER_CONTEXT = blindxfer_ringback

Next, we make use of the BLINDTRANSFER variable to ring back in the context [blindxfer_ringback]

; the destination ext should not have vm enabled
exten => _X.,1,NOOP(${BLINDTRANSFER})
exten => _X.,n,set(timeoutd=15) ; set timeout in seconds to dial the transferee
exten => _X.,n,set(extLeng=${LEN(${EXTEN})})
exten => _x.,n,dial(local/${EXTEN}@from-internal,${timeoutd})
exten => _X.,n,Gotoif($["${DIALSTATUS}" = "ANSWER"]?hangup:callback)
; strip the 'SIP/' and ring back
exten => _X.,n(callback),dial(local/${BLINDTRANSFER:4:${extLeng}}@from-internal,,tr)
exten => _X.,n(hangup),hangup()

How does it work
  1. During a conversation, when you want to transfer caller, you press '##' followed by the transferee extension and '#'.
  2. You can hangup your phone.
  3. The caller now hears music while being connected to the transferee.
  4. If the transferee does not answer, Asterisk will ring back you.
Asterisk feature
The '##' is the key sequence to initiate blind transfer in Asterisk.  You can verify the actual sequence defined in your Elastix.

  1. PBX>PBX Configuration>Feature Codes
  2. Or you can check it in CLI.
*CLI> features show
Builtin Feature           Default Current
---------------           ------- -------
Pickup                    *8      *8
Blind Transfer            #       ##


  1. This comment has been removed by the author.

  2. This comment has been removed by the author.

  3. Yes. Thanks for spotting the typo. After correcting it, they work for you now?

  4. hi, pls check that /etc/asterisk/globals_custom.conf
    TRANSFER_CONTEXT = blindxfer_ringback is defined. Also, your asterisk log could help to show where it goes wrong.

  5. hi, in CLI> dialplan show blindxfer_ringback. It should show what extensions will land in this context.

  6. Hi , Thank you . It work great but only one small issu. My setup is in french but
    whit your code , when a transfer call on vm , the voice switch in English.
    My phone extension is 2XX and voicemail is 3xx . do you have an idea ?


  8. I just know about Asterisk. Thanks for sharing ....

    Regards too from Tangki Fiberglass and jual septic tank

  9. This was very useful, I have been trying to figure out how to help with lost transfers (especially since my company is used to more traditional PBX in Asia).

    Appreciate your blog, the info regarding utf-8 was also quite helpful. Keep it up!


  10. Thank you very much for your information.
    Australia ETA/eVisitor Visa
    is quiet easy to apply online from Singapore,
    Malaysia, United Kingdom, United States, Canada, France and including all others ETA Eligible Countries from our website.

  11. This comment has been removed by the author.