0
votes

I am using Twilio JS Client to answer incoming calls in Twilio. Right now whenever there is an incoming call, I use

<Dial>
  <Client>agent1</Client>
</Dial>

to redirect this incoming call to an agent.

But when there is another incoming call at the same time (Call in ringing state on agent's browser tab) and when I use the same Dial tag with same agent ID, the existing connection is replaced with new connection (The first incoming call is lost and the agent can only answer second incoming call)

Is it how Twilio Dial with client supposed to work? Is there anyway I can ask Twilio not to replace first incoming call?

1

1 Answers

0
votes

Twilio developer evangelist here.

The behaviour for Twilio Client with two incoming calls to the same agent is undefined, so I would try to avoid it. For this, I'd recommend directing your calls and maintaining the status of your agents using TaskRouter.

TaskRouter allows you to build a system where your agents can mark themselves as available to take calls, accept incoming calls rather than just send them through and redirect calls elsehwere (like voicemail) if no agents are available.