CreateTransportFailure with PortSip

175 views Asked by At

I am trying to create a basic calling app on Android with PortSip but get an error from the setUser method (error -60098: CreateTransportFailure). I think I've followed all the steps as their sample app, and I've used the same credentials that work with the sample app. I've tried using a different local port (as suggested in another post), but haven't had any success. These are my steps:

context = this.getApplicationContext();
callingSDK = new PortSipSdk();
callingSDK.setOnPortSIPEvent(this);
callingSDK.CreateCallManager(context);

int initStatus = callingSDK.initialize(PortSipEnumDefine.ENUM_TRANSPORT_UDP, 
      "0.0.0.0", 5771, PortSipEnumDefine.ENUM_LOG_LEVEL_DEBUG, LogPath, 200,
      "PortSIP VoIP Calling App", 0, 0, "", "", false);
// initialize returns ECoreErrorNone

callingSDK.setSrtpPolicy(PortSipEnumDefine.ENUM_SRTPPOLICY_NONE);

int licenseStatus = callingSDK.setLicenseKey("PORTSIP_TEST_LICENSE");
// setLicenseKey return ECoreTrialVersionLicenseKey, as expected

int userStatus = callingSDK.setUser(accountName, displayName, authName, password,
      domain, server, 5060, "", 0, null, 5060);
1

There are 1 answers

0
Barry On

Apparently, another factor in this error condition is assuring the app that the appropriate permissions. Adding these to the manifest gets past the issue with setUser.

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />