I am using the IVR sample script found here:https://www.twilio.com/docs/howto/ivrs-call-screening-and-recordingLet's say that someone calls and connects to agent 1, if the agent reject's the call, it then hangs up the person who called (which is pointless). I want to redirect that person if the agent doesn't pick up or the agent rejects the line to a voicemail twimlet (http://twimlets.com/voicemail?Email=my%40email.com&). I know that this should be easy to do but I am having a hard time figuring out where to add the twimlet,<redirect>http://twimlets.com/voicemail?Email=my%40email.com&</redirect>
I think a good place to look for this might be in the OpenVbx project.
This is their link http://www.openvbx.org/.
In the source code, I would direct you to have a look at the Dial applet server side implementation.
a basic version of steps would be this.
When dialling an agent instead of only dialling one agent, you dial a list, group or department of agents, you can implement your own logic here. I would suggest taking a careful look at how the whisper functionality was written, basically from it you can see that an agent is required to accept the call with interaction by pressing a button, this helps if you agents devices that you are placing calls to, are perhaps mobile devices and go into voicemail. In the end, while you are dialling more than one agent, the first agent to pickup the call is the agent who will be connected to the caller. The rest of the dial attempts will be cancelled for you.
The source code for the project resides here https://github.com/twilio/OpenVBX
while the source code is in PHP, with Twilio it is luckily very easy to see how one would convert this to other languages. You could also simply get the project running and look at the Twiml that is generated when dialling for example and use that as guidance for your own solution.
Related
We have set-up our Flex, and stuck on one of the last steps. We are a small office, and have a main number that clients call us on. If they ask for a specific employee, more importantly, if the specific employee is required to answer the client issue, and they are marked UNAVAILABLE, it doesn't appear we have access to send the call to voicemail (the transfer button is grayed out).
Is there a work around? A way to direct call the VM? Do we need to tweak our flow? If not, it appears we need to be logged in 24/7 to have access to VM's. A fairly inefficient and expensive option.
OK, I think I know what the issue is. A call comes through to one agent in Flex, but they need to transfer it to the other agent. If the other agent is also available, they can transfer the call no problem. If the other agent is not available, you would like to transfer the call to that agent's voicemail, but there's no way to do that right now.
The issue is that Flex is built around available agents and doesn't have voicemail built in. You've added voicemail as part of the Studio Flow, but this is not integrated to the Flex interface at all.
I would solve this with a Flex plugin that does a couple of things:
Add a button to the agent transfer list for unavailable agents to send to their voicemail.
That button would trigger a request to a Twilio Function, sending it the Call's Sid and the agent you want to transfer to.
The Function could then use the calls API to update the call, redirecting it to the existing voicemail handlers that you have for your agents.
I'm afraid I don't have example code for this plugin, but there is great documentation on building Flex plugins that you can follow to get up to speed.
Requirement
Our business requires us to expand the functionality of the transfer feature that is already built in to
Twilio Flex.
What exists today
Today's functionality (out of the box) is partially what we need with the Actions.TransferTask functions. The issue with this is that when we choose an agent to cold transfer to, and they're not available, the call gets put back in to a queue and picked up by the next available agent. This seems completely counter intuitive to how I would expect it to work as I would expect that call to go to voicemail if the agent is unable to pick up.
What we tried
We have logged a support ticket with Twilio to no avail. Any attempts to use the StartConferenceCall won't work because we're on an active call. Twilio functions' Dial doesn't seem to work as I don't seem to have access to my current call. (Dial is meant for calls that are about to happen?) But Dial seems to be the only process that allows digits to be passed. Therefore, conferences & participants don't seem to be the answer either.
What we do have though is a phone number that will end up in our primary work flow and if the incoming number is the aforementioned number, we skip the voice prompts, accept digits and redirect to the agent. This part works.
What we need
We're looking for a Twilio function or plugin Action (or some other method that I'm unaware of) that can cold transfer a call to another agent with no over flow to a queue (let it get picked up by voicemail).
All is using cell phone, no soft phones.
I am trying to created a flow where a customer calls in, All the agents that are available will have their phone ringing. The first agent that answers, all other dials are disconnected. Later, during the call, the agent will need to add one or more other agent to participate in the call.
As far as I can see the response to the customer call should be a Twiml on the lines:
<Dial><Conference>My Conf</Conference></Dial>
But what should I add to this so it calls (for example) three more agents, and hangup on the other agents after the first one answers? Something like this (this does not work):
<Response>
<Dial><Conference>My Conf</Conference></Dial>
<Dial callerId="+1888XXXXXXX">
<Number>111-987-6543</Number>
<Number>222-987-6543</Number>
<Number>333-987-6543</Number>
</Dial>
</Response>
The approach above won't work well in production. When an agent is on a call, future calls will still be sent to all agents and that Agent on the call's voice mail will pick up.
Look at Twilio Task Router for a way to properly assign calls to agents. Task Router has an SDK which you can use to allow agents to go online. Agents are assigned to Task Queues which allow proper routing. If an agent is on a call, Task Router will not attempt to assign them another call.
You can also handle conference events with Task Router.
When a customer dials my Twilio number, I need Twilio to first try to call my PBX system. Currently using 3CX. If the call is not answered by a person, I need to find a way to send that call back to Twilio and go to another resource. For my purposes, that resource is Twilio AutoPilot.
Basically, if a human doesn't answer the phone, I want the robot to try and help the customer instead.
The only thing I've been able to come up with so far is to create another Twilio number and have that number be the fallback within the PBX. The problem with that solution is with Twilio, you cannot mask the number to match the CallerID of the customer calling in, and I would really like to be able to know that number. Also you are creating 2 call paths, which could make this an expensive option.
The only other solution I could think of, which would use 3 calls paths, would be to use another provider that does allow me to mask the caller id, and then send that to the Twilio number.
I am not a programmer, I have basic coding knowledge, but just barely.
Any help would be appriciated. Thanks
You can use Programmable Voice with a SIP Dial to initially contact your PBX (it will appear the same way an Elastic SIP Trunk call will appear to your PBX). The easiest way is to use the Connect Call to Widget in Studio. If that call fails, say 3CX returns a 404 - Not Found, Studio can continue to the next Widget via the Connected Call Ended path which can then perform additional steps of your choosing. The CallerID is maintained this way as well.
Elastic SIP Trunking is not designed for this particular call flow but rather a simple conduit from/to the PSTN.
Happy Path
Fallback Path
I am trying to create an attended transfer using Twilio.
The flow I would like is as follows:
1. Existing call with two legs (client side, agent side)
2. Using API put Client on HOLD and put Agent 1 in Conference
3. Using API Put Agent 2 into same Conference
4. Agent 1 and Agent 2 can speak without Client hearing
5. Using API add Client to Conference
6. Client, Agent 1 and Agent 2 can speak together
7. Using API Agent 1 can be disconnected from the call
Is it possible to do this?
Or do we need to create a conference for all our inbound and outbound calls?
(even though only about 5% of our calls get transferred)
Twilio developer evangelist here.
You can definitely do this. It might be easier to do this from the context of a conference in the first place, as you can take advantage of putting conference participants on hold.
To do it from a regular call to start with, you would want to redirect one of the agent or caller to new TwiML and then make sure the other leg of the call had somewhere to continue to with the existing TwiML. It's probably easier to transfer the agent's call with the REST API and then make sure that the TwiML you originally return to the user continues to place them into a queue using <Enqueue> that you can then call them out of later, or simply a looping <Play>.
Let me know if that helps at all.