Reputation: 3
I am referring to the example code here.
I am able to get the client running, task is assigned and reservation created and accepted as well. But then the call is not connected and the client keeps listening the default waiting tune.
I have tried reservation.dequeue()
and reservation.call()
but to no avail.
I am using Python-flask and twilio library 6.3.0. Any help would be great.
Upvotes: 0
Views: 274
Reputation: 73027
Twilio developer evangelist here.
From the comments, you are looking to answer this call within the browser.
You do need to include the Twilio Client JS for this, alongside the TaskRouter JS. Check out the quick start on using Twilio Client to get familiar with it.
In order to connect up TaskRouter and Twilio Client you don't need to combine the tokens. What you do need to do is set your worker's contact_uri
attribute to "client:" + YOUR_CLIENTS_NAME
(for example { "contact_uri": "client:Bob" }
).
Then when your worker dequeues the assignment, Twilio will look at the worker's contact_uri
address and route the call there.
Let me know if this helps at all.
Upvotes: 1