Blind Transfer callback if not answered after n time

I would like to know how to get a call back when I do a blind transfer in case the intended extension does not pickup.

For example ext 100 BT to ext 103, ext 103 is busy on another call and after 60 seconds still hasnt answered, call should go back to ext 100 from ext 103 so that ext 100 can talk to the caller and maybe send it again.

How can this be accomplished on v13?


Here’s where park feature comes in.
Take a look at the parking module, see if you can adopt this instead of transferring


When I park a call yes it does the ring back after a predetermined time, BUT I can’t see the call as when I transfer it. When I park it I would have to tell the intended extension “hey there is a call for you on slot 75”, instead of the regular notification that a blind transfer does which is a light flashing until you pickup.

Is there a way to implement Parking calls so that it notifies the intended extension?

Check out the module “Park and announce”

I have to buy it as I’m not licensed. Is there a way to do it with the free version?

Possibly this thread will help: Return blind tranfers when not answered .

I’m not sure what “free” version you are talking about, since FreePBX (on its own) is already free.

On the bright side, there is no functionality in any commercial module that you can’t replicate yourself - all you have to do is write the code and update it every time the system is updated. I figure I could probably write some custom code like that in a few hours, but then again, I’ve been working with Asterisk since the early 2000s. There are people on here that have written and posted code that can do some pretty amazing stuff - maybe you’ll get lucky and someone will write it and post it for you.

This in 5th level wizard stuff - not impossible, but not something I’d cut my teeth on building a custom context.

1 Like

… And in most cases you’ll end up paying less for the commercial module…

1 Like

Any ideas? I have tried a few things and nothing has worked so far.

Any help will be appreciated.


Did you try this suggestion from above?

What things have you tried and how did they fail?

The thread that was there, didn’t help as the call would just drop and not get sent back. I tried asking there and no response so far.

I also added a few codes from the internet and they dont seem to work either.

The code they presented was this:

exten => _X.,1,NoOp(Entering custom-test_transfer)
exten => _X.,n,Set(timeoutd=25) ; set timeout in seconds
exten => _X.,n,Set(extLeng=${LEN(${EXTEN})})
exten => _X.,n,NoOp(The extenlength is ${extLeng})
exten => _X.,n,Dial(Local/${EXTEN}@from-internal,${timeoutd})
exten => _X.,n,Set(CALLERID(name)=RB:${CALLERID(name)})
exten => _X.,n,Dial(Local/${BLINDTRANSFER:4:${extLeng}}@from-internal)
exten => _X.,n,Hangup()`

It actually does transfer the call back to the original extension, but hangs up the call. How can I fix that?

Since you won’t help us help you, here’s the standard explanation:

  • When you ‘blind transfer’ a call, you are no longer involved in the call. That’s what makes it blind. It rings at the remote extension and is processed by that extension. The call follows the rules for that extension, so if the extension says “Drop the call”, the call gets dropped. If the extension says “Drop to voicemail”, the call goes to voice mail. If the extension says “Use FM/FM”, then the follow me rules are applied. Expecting a blind transfer to work some other way is a violation of the rule of least astonishment.

The simplest way to handle this is to use an attended transfer, so you could easily stay on the line and listen for a few seconds and see who is going to answer. Most installations have a rule about picking up the phone on by the second or third ring, so that is reasonably doable.

At this time, there is no facility built into the system to do what you are asking for. If you want to request this as a feature, please feel free - you can submit a feature ticket at the Issues tab at the top.

In addition to these points, there are also ways of doing this using FindMe/FollowMe that might get you where you want to go. For example, something like setting the initial ring time to 20 seconds and adding the receptionist phone into the Follow Me group so that the phone rings back there. There are lots of other things people have tried with some success, but there’s no way to provide all of those to you blindly hoping we hit one you haven’t tried.

As I was typing, you provided the code. That helps.

Where is BLINDTRANSFER getting set?
What is the value of BLINDTRANSFER?
What relationship does the length of the extension have to do with your BLINDTRANSFER variable?

If it was me, I’d be using something like:

exten => _X.,n,Dial(Local/[email protected])

and not have the Reception Number be a variable.

Your logs in /var/log/asterisk/full will be telling you what steps actually were taken by this code so you could troubleshoot it.

For those wanting to know the solution, I found these instructions that work like a charm.

This is from the features request in FreePBX.

UNDER: globals_custom.conf

TRANSFER_CONTEXT = custom-transfer-ringback

UNDER: extensions_custom_conf

exten => _X.,1,NOOP(entering user defined context [custom-transfer-ringback] in extensions_custom.conf)
exten => _X.,n,set(timeoutd=120) ; hard set timeout in seconds
exten => _X.,n,Macro(blkvm-set,) ;block vm
exten => _x.,n,dial(local/${EXTEN}@from-internal,${timeoutd})

; BLINDTRANSFER variable is of the form technology/xxxx-yyyyyy we need only xxxx
exten => _X.,n,Noop(Returning call to channel: ${BLINDTRANSFER})
; cut everything after the - character
exten => _X.,n,set(foo=${CUT(BLINDTRANSFER,-,1)})
; cut everything before the / character
exten => _X.,n,set(cb_exten=${CUT(foo,/,2)})

exten => _X.,n,Gotoif($["${DIALSTATUS}" = “ANSWER”]?hangup)
exten => _X.,n,Set(CALLERID(name)=RB:${CALLERID(name)}) ; prefix CID name with RB to indicate it is a ringback
exten => _X.,n,dial(local/${cb_exten}@from-internal)
exten => _X.,n(hangup),Macro(hangupcall,)
exten => _*X.,1,dial(local/${EXTEN}@from-internal,15)
exten => _*X.,n,Macro(hangupcall,)

1 Like

Thanks for providing the solution!

I have a hiccup using this solution with Park and Yealink Phones
When i have a call and I park it I use a BLF key that transfers the call to 70.
The Parking module then transfers the call again to the next available parking lot.

When the timeout occurs in the script the call gets thrown back to the last extension which is 70
and then it goes in an endless cycle.

Is there any way to use this script for all calls except for Parked calls?


I’d like to point out that nobody will sit there and listen to a phone ring for 120 seconds (2 minutes) without hanging up.

The “easy” way to fix this is to set your “No answer” per extension back to the operator queue.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.