9

I am using Twilio new voice SDK for iOS i.e Twilio programmable voice SDK I have successfully implemented for making outgoing call but not able to end call. In the Twilio SDK there is method of disconnect()

so i have implemented

var outgoingCall:TVOOutgoingCall?
outgoingCall?.disconnect() 

For ending a call it is not giving any error but not ending call, Please give any suggestion.

Hasya
  • 9,792
  • 4
  • 31
  • 46
Dilip Dubey
  • 485
  • 2
  • 11
  • That's the correct method, so I'm not sure what's going on. Is there anything logged or an error thrown at all? Do you definitely have an instance of `outgoingCall` when you are calling `disconnect` on it? – philnash Nov 25 '16 at 12:42
  • when i implementing a call on my side I'm getting voice message application error has occurred and on the other side voice message saying you successfully make your first call press key to continue and call drops automatically. – Dilip Dubey Nov 25 '16 at 14:27
  • I was having the similar problem. I had showed the calling view only after successful connection (by checking in delegate) . – Ajit Satarkar Nov 30 '16 at 09:42

1 Answers1

0

SWIFT 3.0

if (self.call != nil && self.call?.state == .connected) {
        self.call?.disconnect()
    }

Check if call object is not null and call state.

krish
  • 3,856
  • 2
  • 24
  • 28