Implementing warm transfers programmatically with Taskrouter

271 Views Asked by At

I'm trying to implement warm transfers programmatically with taskrouter (transfer to internal queue, transfer direct to agent).

As I understand, when using the flex UI buttons to transfer, the assigned task gets reset back to reserved and a new reservation is created for the new worker to accept and join the conference.

When implementing cold transfers, the "Enqueue" Twiml can seamlessly handle task creation and worker assignment, however it also completes the initial worker reservation, which is not suitable for warm transfers.

How can I implement a warm transfer that does the following?

  • Reset task assignment status to reserved
  • Create a new reservation linked to the new worker
  • On reservation acceptance, join the already existing conference

Thanks

1

There are 1 best solutions below

1
On

Twilio developer evangelist here.

This flow is best described in a visual form and there is a diagram below:

The important thing here is that you do not work with the original task, but create a new one that can be assigned to a worker or queue. Once that reservation is the accepted, direct the new agent into the existing Conference where the warm transfer can then take place.