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
[custom-transfer-ringback]
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,)