Alvaro
Alvaro

Reputation: 511

How to notify the device that is doing the Voice-Call that the call is CONNECTED in Twilio Voice-SDK

I´m using the new Voice-SDK to make calls with Twilio. I set my backEnd and the connection is fine. I receive the notification in the "To" device and everything runs normal. But when I accept the call in the "To" Device, I cannot connect with my "From" device. It makes the call, the receiver receives the call, but when I accept the call, the Call-Maker continues with the tone. I don´t know if I have to notify something to the call-maker in the OutGoingCallConnectedListener. (I´m loging my OutGoingCall getting my outgoingcall.getState() and it is CONNECTED so everything is fine, but it just doesn't work)

Any help is appreciated.

Upvotes: 0

Views: 93

Answers (1)

philnash
philnash

Reputation: 73029

Twilio developer evangelist here.

Thanks for providing some of your code. It is hard to tell exactly what went on in your refactoring, but from what you have supplied it looks as though you aren't passing the event listener to activeIncomingCall.accept.

In the original quickstart application, when calling accept you pass an instance of an IncomingCall.Listener, unless you've moved your call to acceptIncomingCall to within the listener itself, then passing this is going to pass the current instance of the VoiceActivity.

Take a look at the quickstart implementation of the VoiceActivity, particularly the implementation of the IncomingCall.Listener and compare with your code.

Let me know if that helps at all.

Upvotes: 1

Related Questions