Failed to create SipSession; Network unavailable

I downloaded Android SIP Demo in Android Studio. I registered an account on getonsip.com, added it to my phone accounts and confirmed that it works by calling from getonsip.com and from one Android phone to another. All is good so far.

I slightly modified the Java code from the demo to complete getonsip settings:

SipProfile.Builder builder = new SipProfile.Builder(username, domain); builder.setOutboundProxy(proxy); builder.setPassword(password); builder.setAuthUserName(auth); builder.setAutoRegistration(true); builder.setPort(5060); builder.setProtocol("UDP"); sipProfile = builder.build(); 

Then I deployed it to my phone (Galaxy S4, Android 4.4.2 API 19). However, when I try to make it call:

  sipCall = sipManager.makeAudioCall(sipProfile.getUriString(), sipAddress, listener, 30); 

I always get the same error:

 05-14 11:43:13.476 5061-5080/android.SipDemo W/System.errοΉ• android.net.sip.SipException: Failed to create SipSession; network unavailable? 

Other posts on StackOverflow and on the Internet did not help me. I tried adding a 5 second delay before calling, rebooting the phone and changing the destination SIP address to enable sip:<address>@getonsip.com as well as sip:<address>@getonsip.com:5060 , but always the same thing same error message.

Does anyone know how to solve this?

+3
java android sip opensips
May 14 '15 at 15:53
source share

No one has answered this question yet.

See similar questions:

44
Android VoIP Library
3
SIP Registration Error
0
SIPDemo does not send or receive a call
0
Android 2.3 SipDemo Failed to register
0
SipDemo Android cannot accept an incoming call

or similar:

3393
Create ArrayList from Array
3044
Creating a memory leak using Java
2240
How to create an executable dependency JAR using Maven?
1376
How to create java string from file contents?
1315
How to create a file and write it in Java?
907
Failed to load the JNI shared library (JDK)
one
How can I make an outgoing SIP call using Twilio?
one
Mobicents - problem with RestComm
0
Incomings Call with Android Sip stack in Embarcadero C ++ builder
0
Register SIP with PHP script



All Articles