TUTORIAL Notifiy callers when they are transferred to someone else

woot4fun

New Member
Joined
May 6, 2011
Messages
20
Reaction score
1
When a call falls to the operator, or someone picks up a call not specifically for them, the person who answers will talk to the caller and eventually transfer the call to someone else for handling.

Is it possible to have asterisk say something like "transferring call to extension 1234" automatically when that happens? It provides feedback to the caller and it also gives them the chance to remember the extension that they were transferred to?

This is something my CEO has asked that we make happen.

Looking at the extensions.conf and the things that asterisk can do it is possible, but I don't have the expertise to make it happen by working with the low level configuration files. Is there a module I can load, or setting I can change easily to make this happen? If not where would you direct me to have someone do the low level work?

Thanks in advance..
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
Really depends on how the transfer is done. If you use the transfer button on the endpoints and it does a local transfer, then it's next to impossible since Asterisk has very little idea of the whole transfer process. If you use the DTMF transfer (##), it would be easier, but I don't think it would be really easy.

Not to be rude here, but would it be possible to re-train the phone users to inform the operators what you want Asterisk to do (meaning have them say "I'm transferring you to $Name at ext. 1234") ? Just a thought.
I way overcomplicated things. Thanks to lgaetz who un-complicated it by an order of magnitude, I have code posted later in the thread.
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
A prefix to the extension would do it. Define a feature code prefix such as *444<ext> that announces the ext then goto from-internal,ext,1

Look at you with the elegant solution! :)
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
Here's some (working for me) code because I was curious.
Code:
exten => _*89.,1,Answer()
exten => _*89.,n,Background(pls-wait-connect-call)
exten => _*89.,n,Background(to-extension)
exten => _*89.,n,SayDigits(${EXTEN:3})
exten => _*89.,n,Wait(0.5)
exten => _*89.,n,Goto(from-internal,${EXTEN:3},1)
exten => _*89.,n,Hangup()
Thats *TX then the extension number. The voice says "Please wait while I connect your call to extension 1234" then connects.

Audio file example
 

woot4fun

New Member
Joined
May 6, 2011
Messages
20
Reaction score
1
Thanks Guys... Where do I place this example code so that it doesn't get overwritten by the automatically generated files?
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
In extensions_custom.conf in /etc/asterisk. You want it at the top, but below [from-internal-custom].
 

mainenotarynet

Not really a Guru - Just a long time user
Joined
May 29, 2010
Messages
754
Reaction score
155
Taking this a step further, rossiv, using your code from above:

Code:
[/COLOR][/COLOR]
[COLOR=#141414]exten => _*89.,1,Answer()[/COLOR]
[COLOR=#141414]exten => _*89.,n,Background(pls-wait-connect-call)[/COLOR]
[COLOR=#141414]exten => _*89.,n,Background(to-extension)[/COLOR]
[COLOR=#141414]exten => _*89.,n,SayDigits(${EXTEN:5}) (in my case)[/COLOR]
[COLOR=#141414]exten => _*89.,n,Wait(0.5)[/COLOR]
[COLOR=#141414]exten => _*89.,n,Goto(from-internal,${EXTEN:5},1) (in my case)[/COLOR]
[COLOR=#141414]exten => _*89.,n,Hangup()[/COLOR]
[COLOR=#141414]
how could this be done:
Code:
[/FONT]
[FONT=Consolas]exten => _*89.,1,Answer()[/FONT]
[FONT=Consolas]exten => _*89.,n,Background(pls-wait-connect-call)[/FONT]
[FONT=Consolas]  if voicemail-recorded-name not empty for {EXTEN:5} then[/FONT]
[FONT=Consolas]exten => _*89.,n,background(the word to?)[/FONT]
[FONT=Consolas]exten => _*89.,n,SayVMName(${EXTEN:5})[/FONT]
[FONT=Consolas]exten => _*89.,n,background(at-extension)[/FONT]
[FONT=Consolas]  else[/FONT]
[FONT=Consolas] exten => _*89.,n,Background(to-extension)[/FONT]
[FONT=Consolas]  endif[/FONT]
[FONT=Consolas]exten => _*89.,n,SayDigits(${EXTEN:5})[/FONT]
[FONT=Consolas]exten => _*89.,n,Wait(0.5)[/FONT]
[FONT=Consolas]exten => _*89.,n,Goto(from-internal,${EXTEN:5},1)[/FONT]
[FONT=Consolas]exten => _*89.,n,Hangup()[/FONT]
[FONT=Consolas]







In this way they have a person's name as well at the extension for future reference.
I know that my coding is probably wrong and to use an if>then>else statement may be incorrect or not possible so hope you can help.
It also helps that if a person has no Voicemail or never set up the recorded name that the code doesn't break but if they do have the recorded name done then it can be used.
I'd use this.
 

mainenotarynet

Not really a Guru - Just a long time user
Joined
May 29, 2010
Messages
754
Reaction score
155
Thanks, I added the code to the system and a friend of mine and I tested the workings of it, on a known no VM and a known VM user and it's fine.

I must be interpreting the {EXTEN:3} incorrectly. I am reading it as the extension has 3 digits but the system DOES play all 5 for my system.

What is the 3 used for if not the number of digits>

Thanks again.
 

MGD4me

Guru
Joined
Feb 3, 2009
Messages
505
Reaction score
109
What is the 3 used for if not the number of digits

The 3 refers to the number of digits OFFSET of the actual dialed number. Since you dialed *89 ahead of the desired extension, these 3 digits (*89) will be discarded, leaving only the desired extension number, if I understand this variable correctly.
 
Joined
Nov 14, 2008
Messages
1,398
Reaction score
320
So in one short thread a very useful function was added!!! Lets see more of this kind of thing! I wish we'd see more of these kinds of usability features in Freepbx.
 

mainenotarynet

Not really a Guru - Just a long time user
Joined
May 29, 2010
Messages
754
Reaction score
155
Thanks MGD4me that explaination makes sense now to me - If you look at my original code (minus the extraneous font tags (don't know how they got in there to begin with)) I changed the {EXTEN:3| to an {EXTEN:5} which by your definition would have never worked as the extension it would create would not exsist.

briankelly63 Yes, this is a very useful function for all and I will use it.

But I do see a 'few' caveats now:

1- If a phone (soft or otherwise) does not have a Transfer key then the code needs to be ##*89 the double hash is the keypad in-call transfer code (See call park code (##70) as if you look at call park module you only need to enter the digits. Try this: Pick up phone with no call on it and dial just 70 and you park yourself but if you ##70 with no active call it doesn't work. Now do the ##70 with a call on the line and you transfer the call to the parking lot.

2- If your phone (I have a GS GXP2140) has soft keys and a dedi Transfer key, now if a key can be reprogrammed as a macro (transfer key as ##*89{Prompt for extension} then the transfers will always use the 'NEW' feature instead of having to remember to to it each time. On my GXP2140 (and possibly the 2160 and 2-line 1405) where it has a dedi-transfer key, the 2140/60 does not have a 'soft key' on the screen and the 1405 has 3 keys but is probably not best to have the soft key anyway. so one thing to try to do is to reprogram the transfer key itself (on any phone type which varies brand by brand
 
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top