so, the flow is, I call enqueue Twiml verb. It creates a task and assigning to a specific agent. I have a task router callback on reservation.accepted event. I got it, but once I update a customer call with Stream Twiml - it's removing a customer from the conference which Flex creates. I'd like to avoid it somehow. To avoid that I update a customer participant with end_conference_on_exit: false attribute. Then I update a customer call with Stream and Dial.conference to get a customer back to a conference which I do not like. Is there any easier way to implement it ?
Twilio developer evangelist here.
Updating a call like that will always take it out of it's current TwiML flow and you would have to redirect back to where it was, like you have already implemented.
I know this is not starting the stream after the task is accepted, but I think the best way to implement this right now is to use the fork stream Studio widget directly before the send to Flex widget in the Studio Voice IVR flow.
Related
I have implemented warm transfer in the my application (C#) but I have to extend it.
Below is my new use case:
Customer calls to our Twilio number. That Twilio number is assigned to a department in our database. Based on that number I retrieve all agents in that department. So, I want this call to go to all the agents in that department and all agents can see an incoming call on their screen.
How can I make a call to multiple agents on their 'client id' (they have generated their capability token with)?
PS: I can't use dial because dial is used for conference once agent picks up the call, I have to do something in CallResource.Create() function in C#
Twilio developer evangelist here.
If you can't do this via <Dial>, you need to loop through all the numbers you want to call within your C# code, calling CallResource.Create() for each of them.
Note, you will likely want to setup to receive statusCallback webhooks so that you can complete the other calls if someone has answered.
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.
Why twilio not provide a hold option as like their mute option?
It doesn't make sense, to use a API to do this option because it just like the mute option except it needs Hold music to be played during for caller.
Any solution? or update?
as for a solution, I would understand that an agent is only dealing with a single call at any one time, so having to place a caller on hold, should be pretty simply, you could simply take the call and place it into a conference where you can play the music of your choice. You could use the agent name perhaps and add hold to it to easily get the agent back to the call in the conference, so perhaps creating a conference in such a way, where the agent name is agent1, the conference name could be agent1hold. Once the agent has finished with that which he was busy with when placing the call on hold in the first place, he could simply dial back into the conference. you would need to make sure that you setup the conference correctly so that if the caller has to be placed on hold again, and the agent exits the conference, that the conference is not terminated.
Megan from Twilio here.
Basic hold functionality can be handled via modifying live calls:
https://www.twilio.com/docs/api/rest/change-call-state
An example in Python where you would use the URL parameter directing the caller to some TwiML to <Play> the caller some hold music. You easily give this a try by hosting the TwiML with Twimlbin.
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient
# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACCOUNT_SID"
auth_token = "AUTH_TOKEN"
client = TwilioRestClient(account_sid, auth_token)
call = client.calls.update("CALL_SID", url="YOUR_TWIMLBIN_URL",
method="POST")
And some examples of working with other scenarios involving <Conference> can be found on our blog.
In Java: https://www.twilio.com/blog/2015/08/how-to-warm-transfer-a-call-with-java-and-twilio-voice.html
In Python: https://www.twilio.com/blog/2015/09/warm-phone-call-transfers-with-python-flask-and-twilio-voice.html
I am using Twlio Client for my application.
I want to notify agent when any caller comes in Queue.
Right now I am calling Rest API Method for Dequeue first member of the queue on every 5 second.
but It is having some performance issues.
Is there any way to notify agent when caller enters in queue?
Twilio evangelist here.
I think a lot of this depends on the specific experience you want to give your agents.
The simplest solution could be to leverage the part of your application that generates the TwiML containing the <Enqueue> verb (putting the caller into the queue). As part of that generation process you could add some code that uses a technology like socket.io or signalr to sent a real-time notification to the browser client telling the agent that a new caller has just been enqueued.
Hope that helps.
We are setting up a call center using Twilio.
At the end of the greetings and menus, our users are redirected to a queue waiting for the next available agent.
We would like the system to:
- Call automatically the next available agent. This is to prevent the agent from dialing the queue to know if users are waiting.
- Be able to change the order of the queue. Our users have different priorities.
How can we get this done? What are the best practices?
FYI: We are using PHP, TWIML and we DO NOT have our own IPBX (Not able to use SIP Protocol).
Thanks,
Dimitri
Twilio evangelist here.
There are a few ways you could do this, but my suggestion would be to use the action attribute of the Enqueue verb.
The action attribute lets you tell Twilio about a URL that you want it to request when a caller leaves the Queue. As part of this request, Twilio will pass you a parameter named QueueSid. Using the QueueSid, you can make a request to Queues endpoint in the Twilio API, see if the current_size of the Queue is greater than zero, and if it is initiate a call out to the next available agent.
Hope that helps.