2

I'm stucked trying to register with Jain-Sip. I'm getting this error:

02-08 15:08:24.615  23722-23722/org.vocalia.sipapplication E/SipStack﹕ The Peer SIP Stack: android.gov,nist.javax.sip.SipStackImpl could not be instantiated. Ensure the Path Name has been set

The path name has been set like sipFactory.setPathName("android.gov.nist");.Not sure if this is correct.This is a extract of my code

private void initialize() {
    localIp = getIPAddress(true);//TODO obtener la ip local con la función getIPAddress()
    //Dirección local
    localEndpoint = localIp + ":" + localPort;
    //Direccion del server
    remoteEndpoint = remoteIp + ":" + remotePort;
    //La pila de mensajes SIP
    sipStack = null;
    //SipFactory es una clase singleton(solo puede haber una instancia) cuyas aplicaciones pueden usar
    // un único punto de acceso para obtener implementaciones propietarias de esta especificación.
    sipFactory = SipFactory.getInstance();//Con esto creamos una instancia de SipFactory o si ya existe una accedemos a ella
    sipFactory.setPathName("android.gov,nist");//TODO Si no funciona, probar con "net.iis" o "com.microsoft.go" o "org.w3" o preguntar en vocalia
    Properties properties = new Properties();
    properties.setProperty("android.javax.sip.OUTBOUND_PROXY", remoteEndpoint + "/"
            + transport);//Opcional. Le pasamos la dirección del proxy como ipaddress:port/transport ->p.ej 129.1.22.333:5060/UDP
    properties.setProperty("android.javax.sip.STACK_NAME", "myAndroidSipStack");//Obligatorio. Le ponemos un nombre a la pila, vale cualquiera sin espacios
    try {
        // Creamos el objeto SipStack
        sipStack = sipFactory.createSipStack(properties);
        Log.i("SipStack", "createSipStack " + sipStack);
    } catch (PeerUnavailableException e) {
        e.printStackTrace();//Con esto nos dice la linea donde surge la excepción
        Log.e("SipStack", e.getMessage());
    }

getted from www.telestax.com/jain-sip-stack-for-android/

I have seen other post related like this PeerUnavailableException using JAIN SIP API and the NIST implementation but didn't solve my problem

Any help would be highly appreciated.

Thanks!

Community
  • 1
  • 1
Isaac
  • 1,436
  • 2
  • 15
  • 29

1 Answers1

0

android.gov,nist should be android.gov.nist

Vladimir Ralev
  • 1,371
  • 9
  • 18
  • Thanks, I have changed but and still crashing whit same message. – Isaac Feb 08 '15 at 17:51
  • Maybe I don't have the log4j library correctly configured. Do you know how to do that? – Isaac Feb 08 '15 at 22:33
  • You can see an example of using it at https://github.com/Mobicents/restcomm-android-sdk/blob/master/Examples/JAIN%20SIP/src/org/mobicents/restcomm/android/sdk/impl Make sure you have the stack library from https://mobicents.ci.cloudbees.com/job/JAIN-SIP/lastSuccessfulBuild/artifact/jain-sip/m2/android-jain-sip-ri/target/android-jain-sip-ri-1.2.230.jar in your app – jeand Feb 09 '15 at 16:27