I use Asterisk 16.4.1 and am trying to adjust the outgoing dialplan to have some one touch features. I am having some trouble understanding my options here.
First what I am trying to accomplish. When I make an outgoing call and want to transfer to another employee, if the caller presses 1-5, I would like it to blind transfer to a local extension that relates to the number dialed.
Then if the call goes to voicemail, I want to be able to press either 8 or 9 and have it do a blind transfer. If it is 8, use the AMD() to wait for the voicemail to finish, then leave a recorded message in English. If it is 9, do the same but play it in Spanish.
When I use the U Argument for gosub(), it disconnects the caller from the call as soon as it connects. With that I don’t seem to be able to talk to the people I am calling. Not sure if Macro() does the same since it is deprecated.
I tried the F Argument, which would work for playing a single message when I disconnect, but not sure how to add in the AMD() to it’s process
[subTransfer]
exten => s,n,Read(OPTION-1,,1)
exten => s,n,GotoIf($[${OPTION-1}=1]?Dial-User1,${EXTEN},1)
exten => s,n,GotoIf($[${OPTION-1}=2]?Dial-User2,${EXTEN},1)
...
exten => s,n,GotoIf($[${OPTION-1}=8]?Leave-English-Voicemail,${EXTEN},1)
exten => s,n,GotoIf($[${OPTION-1}=9]?Leave-Spanish-Voicemail,${EXTEN},1)
[Outbound-Dial]
exten = _X.,1,Dial(SIP/${EXTEN:${GLOBAL(TRUNKMSD)}}@peer.sipProvider.co,,TU(Transfer))
I want to keep the myself (the caller) on the line until I press one of those buttons
I tried using applicationmap, but while it seems it should be what I am looking for, it can’t find the BlindTransfer app. When I do regular Transfer like this:
features.conf
[applicationmap]
testfeature => 9,callee/caller,Transfer,9 ;Play tt-monkes to callee if *9 was pressed - use 'callee' or 'caller'
extensions.conf
===========
[Outbound-Dial]
same = n,Set(__DYNAMIC_FEATURES=testfeature)
exten = _X.,1,Dial(SIP/${EXTEN:${GLOBAL(TRUNKMSD)}}@peer.sipProvider.co,,Tt)
[Local]
include = Internal-Setup
exten = _NXXXXXX,1,Goto(Outbound-Dial,1256${EXTEN},1)
exten = _256NXXXXXX,1,Goto(Outbound-Dial,1${EXTEN},1)
exten = _1256NXXXXXX,1,Goto(Outbound-Dial,${EXTEN},1)
exten = 9,1,Background(tt-monkes)
Only the caller can hear it, the callee gets nothing. I also tried the other options I saw in the documentation self/callee
and peer
but those broke it.