Is it possible to modify the statusCallback, statusCallbackEvent and statusCallbackMethod of the live call ?
I've used this article as a reference https://www.twilio.com/docs/voice/modify-live-calls
In the article, it said you can POST to update the live call but when I tried to update the statusCallback URL, it's not working. There is nothing trigger new statusCallback URL when the call end.
My use case is to
I know that I can set the statusCallback URL in phone number page for inbound call and in Twiml App page for outbound call. But there are 2 problems with that.
(eg. ${BASE_URL}/voice/:conferenceKey/call/callback)
I'm using NodeJS and here is the example code I used to update the statusCallback. I've also double check that call_sid is matched with live call sid.
return client.calls(call_sid)
.update({
statusCallback: `${process.env.API_HOST}/voice/${conferenceKey}/call/callback`,
statusCallbackMethod: 'POST',
statusCallbackEvent: ['answered', 'completed'],
});
Any help is appreciated, thanks! :)
Twilio developer evangelist here.
The only things you can update for a call that's in progress are the current URL (redirect the call to new TwiML) or the status (set to complete to end the call). You can't update the statusCallback URL during a call.
If your calls are going to a conference, then might conference statusCallback events help?