I am trying to use the redirect instruction to take the customer and worker into a conference call in that is of fixed length (using timeLimit) but is variable in the sense that the timeLimit is determined by calling another function.
I am having issues understanding the documentation regarding this instruction. I know I must pass a call_sid and a url, but is the call sid the sid of the customers call to my number or the conference call I will redirect to and if it is the customer's call_sid how do I get it.
Also with the twiml url is this what I use to redirect the customer or worker to the call?
And where in this step would I create the conference call?
As you can see I'm lost regarding the API and would appreciate any guidance on where to look. EDIT CODE:
exports.handler = function(context, event, callback) {
callback(null, {"instruction": "redirect",
"call_sid": "I DONT KNOW WHAT GOES HERE",
"url": "I DONT KNOW WHAT GOES HERE",
});
};
This is my assignment callback url but I don't know what the last two arguments are exactly asking for. This is the doc I'm using for reference at the bottom of the page https://www.twilio.com/docs/taskrouter/handle-assignment-callbacks