Soporte & Consultoria

Soporte Remoto y Consultoria skype : ambiorixg12.
Nota no se brinda ningun tipo de consulta o soporte fuera del blog de forma gratuita

viernes, 10 de junio de 2016

Adding Listen, Whisper, and Barge to FreePBX or Asterisk

Adding Listen, Whisper, and Barge to FreePBX or Asterisk

If you are running a call center on FreePBX or Asterisk, most likely you will want the ability to listen in on agents calls, also known as joining multiple calls, or connected two calls to a manager, or other variations of barging in on a bridged channel.
For the purpose of this article, we will define manager as the callee who is the spying channel, agent who is the spied-on channel, and client who is the bridged channel / 3rd party. We define listen, whisper, and barge as follows:
Listen: Monitor an agents call. The manager can hear both the agent and client channels, but no-one can hear the manager.
Whisper:  Whisper to the agent. The manager can hear both the agent and client channels, and the agent can also hear the manager, but the client can only hear the agent, hence “whisper.”
Barge: Barge in on both channels. The manager channel is joined onto the agent and client channels, and all parties can hear each other. Be warned, if the original agent leaves the call, the call is dropped. This is not a 3-way call.
(However you can barge in, and when comfortable, initiate a 3way call to your extension so you can continue the call without the agent. This procedure varies from client to client (soft/hard phones))
One more note: We can also provide 3-way calling [live transfer] services on the server side, however this is outside the scope of this document. Please contact us for details.

Enough chit-chat, let’s get to the dialplan!
Note: In newer versions of FreePBX, custom includes are disabled by default.
This means that the new “ext-local-custom” or “from-internal-custom” context’s that we just created won’t be imported into the PBX “Brain”. To fix this, go to :
Settings->Advanced Settings
Find the “Dialplan and Operational” section, and change Disable -custom Context Includes?to False.
Be sure to click on the little checkbox that appears to the right to save the setting, then Apply Settings to rebuild the files. This is required or else the ext-local-custom context that we add won’t be included into the engine.

exten => _*222x.#,1,Macro(user-callerid,)
exten => _*222x.#,n,Answer
exten => _*222x.#,n,NoCDR
exten => _*222x.#,n,Wait(1)
exten => _*222x.#,n,ChanSpy(sip/${EXTEN:4},q)
exten => _*222x.#,n,Hangup
exten => _*223x.#,1,Macro(user-callerid,)
exten => _*223x.#,n,Answer
exten => _*223x.#,n,NoCDR
exten => _*223x.#,n,Wait(1)
exten => _*223x.#,n,ChanSpy(sip/${EXTEN:4},qw)
exten => _*223x.#,n,Hangup

exten => _*224x.#,1,Macro(user-callerid,)
exten => _*224x.#,n,Answer
exten => _*224x.#,n,NoCDR
exten => _*224x.#,n,Wait(1)
exten => _*224x.#,n,ChanSpy(SIP/${EXTEN:4},qB)
exten => _*224x.#,n,Hangup
For custom solutions, or troubleshooting support, call us @ 888.235.o5o5
If you found this useful, please donate $5, $10, or $25:

Let’s break it down:
Dialing *222970 would initiate listen on channel 970. *224401 would barge in on 401’s call speaking to both parties.
We start by finding (or adding) the ext-local-custom context, and declaring: exten => _*222x.# which will catch calls going to *222 followed by a sequence of numbers.
We define the first line with priority 1, and initiate Macro(user-callerid,) which basically sets the environment and loads up details about the extension, like caller id, and display name.
On the 2nd and subsequent lines, we start them the same way, and instead set priorty to n, this will let asterisk generate priorities automatically, so you don’t always have to change each priority just to add new code.
Expert Tip: We could have used same => n,Answer() and continued to use same. This is shorthand that was added later to asterisk, and just simplifies it that much more.
We answer the call on priority 2, then we tell asterisk’s cdr_mysql module not to store this “call” as a CDR record.
We wait a second with Wait(1) to give everything time to get ready, then we initialize the ChanSpy app. There are various options you can use, we chose q (which prevents “SIP.6626″ or whatever from being spoken when you start spying.) w, which is “whisper mode”, and B which is barge. Do not get this confused with b (lowercase) which is for only joining bridged calls.
Lastly we hangup to prevent a floating channel, and we’re done!
Contact me: robert {-at-} ezpcweb {dot} com
To order a commercial feature, or to order a custom feature, call us at: 888.235.o5o5
If you found this useful, please consider sending a donation, I wouldn’t be asking if I didn’t think it was fair.
I give away these tools that are highly valuable for free, so if you can afford to do so, please donate towards web costs, and other endeavors.

No hay comentarios:

Publicar un comentario