My Twilio
Client js application allows agents to call each other within the browser. The call is working and after accepting the call both agents can then end the call via Twilio.Device.disconnectAll()
. This fires the disconnect callback on both sides allowing updates to the UI.
Cancelling the call from the caller side correctly raises the cancelled event on the dialled side again allowing UI updates.
However I am having trouble updating the UI on the caller side if the dialled agent does not wish to take the call. I have tried the Device.disconnectAll()
and the Connection.reject()
, ignore()
and disconnect()
methods but it raises no events/callback on either side and the call continues to ring.
I presume I am missing a step somewhere. Any advice would be much appreciated.