cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2491
Views
0
Helpful
4
Replies

Jabber Guest iOS - Server is not reachable

tohogue
Level 4
Level 4

Hey Guys,

I am working on an iOS app that uses the Jabber Guest SDK to make a call to an endpoint on my call manager.  While building it i am pointing to the sandbox setup and have tested its connection from my device with another app.

My first view controller has no special code in it, just an image for a background and a button that has a push segue into the jabberGuestViewController.  The app is written entirely in swift.  I do have a bridging header file to import the jabber guest framework into my swift files.  Also I have a single .mm file in the supporting files folder, its blank but its there. I have gone through the troubleshooting steps the jabber guest page but it doesn't talk about this error. 

When I get the error which says "No Server Connection  The Jabber Guest server is not reachable"  the console shows "2014-08-18 15:30:25.652 AppName[1342:60b] Reachability Flag Status: -R -----l- networkStatusForFlags"

Here is the code from my JabberGuestViewController.swift file:

import UIKit

class JabberGuestViewController: UIViewController, CJGuestCallViewControllerDelegate {

    override func viewDidLoad() {

        super.viewDidLoad()

        //Jabber Server and URI

        let jabberServer = "jabberguestsandbox.cisco.com"

        let uri = "5555"

      

        let callControl = CJGuestCallViewController()

        callControl.serverName = jabberServer

        callControl.toURI = uri

        callControl.delegate = self

        self.navigationController.pushViewController(callControl, animated: true)

      

      

      

        let notificationCenter = NSNotificationCenter.defaultCenter()

        let mainQueue = NSOperationQueue.mainQueue()

        var jabberObserver = notificationCenter.addObserverForName(CJGuestCallErrorNotification, object: nil, queue: mainQueue) { _ in

            println("Jabber Error Triggered")

             }

      

    }

  

    //

    //    override func callFinishedForCallController(callController: CJGuestCallViewController!) {

    //        callController.navigationController.navigationBarHidden = false

    //        callController.navigationController.popViewControllerAnimated(true)

//

   }

}

Anyone have any ideas?

Thanks!

4 Replies 4

oliviers
Cisco Employee
Cisco Employee

Thomas-

Do you see any other diagnostic output in XCode's console if you debug you app live? The SDK does have an API that can be leveraged to retrieve diag files, but it's just easier to pull from the console.

steve

Hey Steve,

When I run the app on the iPad connected to Xcode i get this error when ever I try to connect to a call using Jabber Guest:

2014-08-18 15:30:25.652 AppName[1342:60b] Reachability Flag Status: -R -----l- networkStatusForFlags

The app will go to the Call View Controller and will ask me to accept the license for the video like you would expect but it just can't connect to the server. 

Tom

Tom-

I will contact you via email on how to proceed next. When we reach resolution, we'll update the thread here so others can see as well.

Turns out the issue was a button was triggering a segue defined on a Storyboard that led to a view controller object that was of the CJGuestCallController class. This is fine to do, but you need to prepare the segue to provide the data (servername, uri) for the CJGuestCallController.

You'll need to name the segue ("StartJG" in this example) on the Storyboard and in the originating view controller, add something like the following (this is for Swift)...

override func prepareForSegue(segue: UIStoryboardSegue!, sender: AnyObject!) {

        if ( segue.identifier == "StartJG"){

        println("prep for segue")

            let callControl: CJGuestCallViewController = segue.destinationViewController as CJGuestCallViewController

            callControl.serverName = "jabberguestsandbox.cisco.com"

            callControl.toURI = "5555"

            callControl.delegate = self

        }

    }

Also, to return control to the originating view controller when the call is done, make sure the originating view controller is a delegate of CJGuestCallViewController and and this (again, this is the Swift code)...

func callFinishedForCallController(callController: CJGuestCallViewController!) {

        callController.navigationController.navigationBarHidden = false

        callController.navigationController.popViewControllerAnimated(true)

        }