简体   繁体   中英

PeerUnavailableException using JAIN SIP API

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!

android.gov,nist应该是android.gov.nist

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM