Cannot make SIP call with 2.3 SIP API.

712 views
Skip to first unread message

Bandi Hegedus

unread,
Mar 18, 2011, 6:10:37 AM3/18/11
to android-platform
Hello,

I've been trying to place some SIP calls with the new SIP API that
comes with Android 2.3.

I've followed the steps related at http://developer.android.com/guide/topics/network/sip.html,
and tested the http://developer.android.com/resources/samples/SipDemo/index.html
from samples.

For testing I've used an account from JustVoip.

As a result I receive "android.net.sip.SipException: Failed to create
SipSession; network unavailable?" for both of the applications(mine,
and the SipDemo from samples) when I call
sipManager.makeAudioCall(localProfile, targetProfile, mySipListener,
30);.

For localProfile I have used the following settings:
SipProfile.Builder sipProfileBuilder = new Builder("<myUser>",
"sip.justvoip.com");
sipProfileBuilder.setPassword("<myPass>");
sipProfileBuilder.setAutoRegistration(true);
sipProfileBuilder.setPort(5060);
sipProfileBuilder.setProtocol("UDP");

For targetProfile I have used:
sipProfileBuilder = new Builder("sip:<targetUser/
PhoneNumber>@sip.justvoip.com");


Note that I have made sure all the required permissions are located in
my manifest, and I've also tested the JustVoip account with the built
in internet call function of my Nexus One (it has official 2.3.3).

Has anyone else faced this problem? If so, is there some workaround
for this problem, or am I missing something here?

Thanks in advance,
Bandi

Bandi Hegedus

unread,
Mar 18, 2011, 10:55:28 AM3/18/11
to android-...@googlegroups.com
I found the problem. 

The correct usage of SipProfile.Builder in the JustVoip context is:

SipProfile.Builder sipProfileBuilder = new Builder("<userName>", "justvoip.com");
        sipProfileBuilder.setPassword("<pass>");
        sipProfileBuilder.setAutoRegistration(true);
        sipProfileBuilder.setPort(5060);
        sipProfileBuilder.setProtocol("UDP");
        sipProfileBuilder.setOutboundProxy("sip.justvoip.com");
        SipProfile profile = sipProfileBuilder.build();

Case closed. :D
Reply all
Reply to author
Forward
0 new messages