Problems when the receiver of the call redirects it to another number
We have built a web dialer that uses the programmable voice service. The service works fine with almost all kinds of flows. We have a client JS dialer that uses your JS SDK, and we have a Java backend service that generates all the TwiML responses needed.
The basic flow is pretty simple: we take the incoming call from the web dialer and route it with the following TwiMl response to the final receiver:
<Response> <Dial action="[ourCallBackURL]" answerOnBridge="true" callerId="..." record="record-from-answer-dual"> <Number statusCallback="..." statusCallbackEvent="initiated ringing answered completed">[number of the reciever]</Number> </Dial> </Response>
Wich works fine and the call is properly routed to the proper phone number.
The problem that we are facing is that when the receiver of the puts the call on hold or redirects you to another number, Twilio is sending us an event to the actions endpoint saying that the has been completed and no further information reaches our backend. So the call get's hanged and never redirected to the new number.
I am sure that there has to be a way to handle these scenarios because they are pretty common when calling numbers with extensions, or commercial numbers where the caller gets redirected to different numbers.
I am guessing that somehow the first finishes and we need to open a second one at the action response. But we don't have enough information at the request to know how to open the second .
Just to make the point trickier, it happens with some kinds of redirects and holds, but not with others.
How can we handle this kind of flows?
- 55 All Categories
- 4 SIGNAL 2021
- 217 Product Discussions
- 9 Community - Announcements
- 2 Changelog
- 4 Forum UI Updates
- 5 Welcome Guide
- 4 Community - Events
- 1 External Community Events
- 2 Twilio Relay Developer Conference 2021 Mega Thread
- 1 TwilioQuest Contest!
- 21 Inspiration
- 11 Community - Other Discussions
- 1 Community- Twilio Startups