JBalzer
JBalzer

Reputation: 105

Multiple Clients on Twilio Call

I am trying to imitate a hunt-group type of functionality with agents using the Twilio "browser phone" client, where all online agents' phones ring at the same time till one of them picks up.

I have managed to get this to work somewhat: all agent's browser phones ring, and an agent can accept the call and begin the conversation.

What doesn't work is that if Agent A (logged in as "Agent_A") accepts the call, the phone for Agent B ("Agent_B") continues to ring. It seems that the Twilio client should disconnect Agent B's connection at that point or at least send some notification to B that the call has already been accepted, but I have not been able to figure out how to make that happen.

Here is a sample Twiml that starts the multiple calls:

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Dial callerId="5551112233">
    <Client>Agent_A</Client>
    <Client>Agent_B</Client>
  </Dial>
</Response>

Any help would be greatly appreciated.

Upvotes: 1

Views: 1759

Answers (1)

beanserver
beanserver

Reputation: 652

The cancel event should be sent to Agent_B when Agent_A answers. Try implementing the callback described here to receive notification. Also check to make sure you're using the latest version of twilio.js, 1.2 at this time.

<script type="text/javascript" src="//static.twilio.com/libs/twiliojs/1.2/twilio.min.js"></script>

Upvotes: 1

Related Questions