iosiphoneswiftquickbloxquickblox-android

QuickBlox : didReceiveNewSession Method is not gettimg called in swift


I am working in one of the video calling Project in SWIFT language with Quickblox sdk.i am trying to make call with another user with its quickbloxid. but when i start call from one of the device to another device. the didReceiveNewSession delegate method is not getting called on another device and the log appears with error message of service not available. please let me know where i ma doing mistake. thanks in Advance.

QBRTCClient.instance().addDelegate(self) 

func didReceiveNewSession(session: QBRTCSession!, userInfo: Dictionary<NSObject, AnyObject>!)
    {
        print("received call")

    }

func session(session: QBRTCSession!, connectedToUser userID: NSNumber!) {
         AppSingletonObj.showAlert("", messsage: "connectedToUser Delegate caled")
    }

    func session(session: QBRTCSession!, disconnectedByTimeoutFromUser userID: NSNumber!) {
          AppSingletonObj.showAlert("", messsage: "disconnectedByTimeoutFromUser Delegate caled")
    }

    func session(session: QBRTCSession!, hungUpByUser userID: NSNumber!, userInfo: [NSObject : AnyObject]!) {
        AppSingletonObj.showAlert("", messsage: "hungUpByUser Delegate caled")
    }


    func session(session: QBRTCSession!, initializedLocalMediaStream mediaStream: QBRTCMediaStream!) {
          mediaStream.videoTrack.videoCapture = self.cameraCapture
        AppSingletonObj.showAlert("", messsage: "initializedLocalMediaStream Delegate caled")
    }


    func session(session: QBRTCSession!, rejectedByUser userID: NSNumber!, userInfo: [NSObject : AnyObject]!) {
        AppSingletonObj.showAlert("", messsage: "rejectedByUser Delegate caled")
    }

    func session(session: QBRTCSession!, startedConnectingToUser userID: NSNumber!) {
         AppSingletonObj.showAlert("", messsage: "startedConnectingToUser Delegate caled")
    }

    func session(session: QBRTCSession!, userDidNotRespond userID: NSNumber!) {
        AppSingletonObj.showAlert("", messsage: "userDidNotRespond Delegate caled")
    }

    func session(session: QBRTCSession!, connectionClosedForUser userID: NSNumber!) {
        AppSingletonObj.showAlert("", messsage: "connectionClosedForUser Delegate caled")
    }

    func session(session: QBRTCSession!, disconnectedFromUser userID: NSNumber!) {
        AppSingletonObj.showAlert("", messsage: "disconnectedFromUser Delegate caled")
    }


    func session(session: QBRTCSession!, updatedStatsReport report: QBRTCStatsReport!, forUserID userID: NSNumber!) {
        AppSingletonObj.showAlert("", messsage: "updatedStatsReport Delegate caled")
    }

    func session(session: QBRTCSession!, receivedRemoteVideoTrack videoTrack: QBRTCVideoTrack!, fromUser userID: NSNumber!) {
          AppSingletonObj.showAlert("", messsage: "receivedRemoteVideoTrack Delegate caled")
    }

    func session(session: QBRTCSession!, connectionFailedForUser userID: NSNumber!) {
        AppSingletonObj.showAlert("", messsage: "connectionFailedForUser Delegate caled")
    }

    func session(session: QBRTCSession!, acceptedByUser userID: NSNumber!, userInfo: [NSObject : AnyObject]!) {
        AppSingletonObj.showAlert("", messsage: "acceptedByUser Delegate caled")
    }

Solution