     
     
     // MARK: TVOOutgoingCallDelegate
-    func outgoingCallIsConnecting(_ outgoingCall: TVOOutgoingCall) {
-        NSLog("outgoingCallIsConnecting:")
-    }
-    
     func outgoingCallDidConnect(_ outgoingCall: TVOOutgoingCall) {
         NSLog("outgoingCallDidConnect:")
+        
+        self.outgoingCall = outgoingCall
         
         toggleUIState(isEnabled: false)
         stopSpin()

import PushKit
import TwilioVoiceClient

let baseURLString = <#URL TO YOUR ACCESS TOKEN SERVER#>
let accessTokenEndpoint = "/accessToken"

class ViewController: UIViewController, PKPushRegistryDelegate, TVONotificationDelegate, TVOIncomingCallDelegate, TVOOutgoingCallDelegate {

    // MARK: TVONotificaitonDelegate
    func incomingCallReceived(_ incomingCall: TVOIncomingCall) {
        NSLog("incomingCallReceived:")
        
        if (self.incomingCall != nil || self.outgoingCall != nil) {
            NSLog("Already an active call. Ignoring incoming call from \(incomingCall.from)");
            return;
        }
        
        self.incomingCall = incomingCall;
        self.incomingCall?.delegate = self;

        
        let from = incomingCall.from
        let alertMessage = "From: \(from)"
