FORUMS
Remove All Ads from XDA

Sipdroid 1.3.x Primer [updated 2010-02-26]

1,860 posts
Thanks Meter: 15
 
By jashsu, Senior Member on 25th February 2010, 08:26 PM
Post Reply Email Thread

Sipdroid 1.3.x Primer



Introduction

This document is a basic guide to getting Sipdroid 1.3.x set up on a typical Android phone in conjunction with Google Voice and Gizmo5/SIPPhone. As the Sipdroid software as well as GV/Gizmo5 are constantly in flux, at times this document may contain some factual errors due to obsoletion. I will try my best to not get lazy and keep it updated, but be forewarned.

The previous version of this primer was written for Sipdroid 0.9.4 and incrementally updated. After a few months without updates, it became terribly obsolete, and instead of going through it to make fixes, I decided to leave it as-is and write a new version with more of an emphasis on Gizmo5/SIPPhone (hereforth "Gizmo5") and Google Voice. Note that at the time of this writing, the Gizmo5 service has been acquired by Google and is not currently accepting new users. It is predicted that Google will relaunch Gizmo5 as a rebranded component in Google Voice, at which time it is likely this primer will become outdated. Until then, enjoy!



Overview of Sipdroid + Gizmo5 + GV

I'm assuming that most of you have an idea of what SIP is and what it can do but i'll do a brief overview so we are all on the same page before we get into the details and instructions. Those of you who just want the meat of the primer can skip to the next section.

SIP is a signalling protocol that allows two or more clients to signal to each other their intent to perform some sort of communication. Commonly the communication is voice over IP ("VOIP"). With the right client software, SIP can be used for initiating a video call, but in our primer we will only cover voice. There are just a few elements in a SIP system. There is client software (what you install on your device), SIP providers (the servers your client software connects to), and there may also be providers that reroute your call into other networks (e.g. into Skype or into the public switched telephony network).

In our primer, Sipdroid is the SIP client which you install on your phone and interact with. Gizmo5 is the SIP provider that Sipdroid will connect to. Gizmo5 will also act as a call-out service (allowing you to call to the public switched telephony network (hereforth "PSTN"). Google Voice is an additional service which will provide you with a DID, a direct inward dialing number. A DID is basically a phone number that someone on the PSTN can dial with a regular telephone that can then be routed to a VOIP call. With all these ingredients, you can therefore create a setup whereby you can: 1) Make and receive calls to other SIP clients for free from your Android phone and 2) Make low cost calls to any number in the world and receive calls for free from anywhere in the world from anyone who calls your US Google Voice number. So let's get started...



Setting Up Gizmo5 and Google Voice

The first thing you will need to do is set up Gizmo5 and Google Voice. Unfortunately, at the time of writing (2010-02-26) Gizmo5 is closed to new members and Google Voice is still invite-only. The only way to get a Gizmo5 account if you do not already have one is to find someone who already has one and convince him/her to let you have or use it. There are many ways to receive an invitation to Google Voice. The standard method would be to request an invitation from Google and wait. Alternately, current users of Google Voice may also have up to 3 invitations they can pass out. You may search some internet forums (such as xda) to find people offering GV invitations. Anecdotally, running the Google Voice app built into the Google Nexus One will also activate GV for you if it is not already activated on your Google account. If you cannot acquire a GV invitation/activation, you can still use Gizmo5 with other DID services like ipkall. If you cannot get a Gizmo5 account then you will have to find another SIP provider. In either case, simply skip the relevant steps in the primer.

Now then, your first order of business is at Gizmo5. Log into https://my.gizmo5.com/ and make a note of your SIP number. Also turn off the voicemail service. We want Google Voice to perform voicemail for us, so we have to make sure that Gizmo5's voicemail isn't going to kick in before Google Voice's voicemail.
Next, open Google Voice. I'm going to assume that you have already set it up and created a Google Voice (DID) number. If you chose to use your own number when you initially set up Google Voice, go and choose a Google Voice number now. Remember that your first GV number is free; changing your GV number afterward will cost USD$10. Now then, click on "Settings" in the upper right corner, then click on the "Add another phone" link.
Enter a name for this phone (e.g. "Gizmo") and the number you copied down from the Gizmo5 page earlier. Choose "Gizmo" as the Phone Type. When you're done, click Save. Note that in order to verify the number is yours, Google Voice will call it and ask you to enter a two digit verification code. You can either perform this step by being logged into Gizmocall (Gizmo5's flash-based browser SIP client) or doing it on your phone after you have set up Sipdroid (further below).
You may also want to make a few changes to some other Google Voice settings as a matter of preference. Here are some useful ones. Voicemail forwarding will send your transcribed Google Voice voicemails to your gmail/email in realtime. SMS forwarding will do the same thing for Google Voice SMSes. Turning off Call Presentation will get your caller on the line with you directly instead of going through the GV call presentation menu. Since it already takes additional time for a SIP call to be connected, this can help you get your call connected before the other party hangs up. Displaying your Google Voice number as the origin for SMS will help your friends identify you by your GV number.


Setting Up Sipdroid

Now that Gizmo5 and GV are set up, you need to set up Sipdroid. On your Android phone's browser, visit http://code.google.com/p/sipdroid/ and tap the link under Featured downloads. When your download is complete, tap the download and select install. If your phone does not have Unknown source installation enabled, it will prompt you to enable this. (It is the Settings>Applications>Unknown Sources checkbox).
Open Sipdroid now. Sipdroid's main screen is not very descriptive at first glance. Press the menu button, then tap Settings. The settings menu is divided into six categories. We will move through them one by one.
Tap SIP Account Settings. Under Authorization Username enter your Gizmo5 username or SIP number. Under Password enter your Gizmo5 password. Under Server enter proxy01.sipphone.com. Finally change the Protocol to TCP. (Hint: If you encounter problems connecting with TCP you can use UDP, but it will cut your battery life significantly.)
Press the back button then tap Call Options. Check off the network types you wish Sipdroid to connect with. In my example I checked off WLAN, 3G and EDGE. Change the Preferred Call Type to Phone.
Press the back button then tap Advanced Options. Set the Earpiece Gain to High (Hint: The correct value for this setting may be a matter of personal preference and phone model. Higher settings may cause the other end to hear echo, so do some experimentation.) Check off Use STUN Server. Under STUN Server name enter stun01.sipphone.com. Note that if you experience trouble sending or receiving calls, you may want to try turning STUN off.
Press the back button then tap Audio Codecs. Tap alaw (64kbit) and select Never.
At this point your Sipdroid should be completely set up. You should have noticed by now that there is now a persistent colored dot indicator in your notification bar. It has three possible states: green to indicate that Sipdroid is connected and operational, yellow to indicate that it is in the process of connecting, and red to indicate that it is not connected and has encountered problems. If your indicator is stuck on yellow or red go back and review that all the settings have been properly set. If it is still unresolved, your 3G and/or wifi network may be blocking SIP traffic. Contact the appropriate network administrator for further assistance.

As long as Sipdroid is active when you shut down or reboot your phone, it will automatically startup and connect when the phone is booted. To turn off Sipdroid, simply press menu from the Sipdroid main screen and tap the Exit option. The colored dot indicator icon should disappear.



Make Test Calls

We will make three types of test calls. First, we will call another SIP device using its SIP address. A SIP address take the form of sip:user@domain or simply user@domain. To make a SIP call, enter the SIP address in the form of user@domain into the entry bar of the Sipdroid main screen and press the return key. For this test we will use echo@proxy01.sipphone.com, which is an automated number run by Gizmo5 for the purpose of testing SIP setups. When the call connects you should see a call indicator in the notification bar, colored emerald to differentiate it from a standard voice call.
After a brief message you will hear Gizmo5's echo test, which will echo back whatever you say. You can use this test to gauge the quality of your SIP connection as well as the latency. If you are connecting over 3G, the latency will be moderate, and the latency over EDGE will be even higher. When you are satisfied with the test, press the back button or drag the green border square down to end the call. Note that pressing the End call button will not end the call. Keep this in mind!

Next, we will make a call to the same service, but instead of using its SIP address, we will use its SIP number. Some SIP users may have both a SIP address and a SIP number, while others may have only one or the other. To call a SIP number, you will need to open your dialer. Press the green call button on your phone or start the Dialer app from the launcher. Enter 17474743246+ (to enter a plus sign, long press the 0 key). Tap the number to dial it. Again you should notice the emerald colored call indicator and hear the Gizmo5 echo test service. Hang up by pressing the back button or dragging the square down.
The + you entered at the end of the number indicates to Sipdroid that you want to make this call using SIP instead of using your standard cellular voice connection (which would use up minutes in accordance with your cellular plan terms). If you accidentally omit the + sign, the call will be attempted as a regular cellular call.

Finally, let's try making a call to a real PSTN phone number. Gizmo5 provides free outbound calling for toll free numbers in the United States (e.g. "1-800 numbers"). From the Android dialer, enter 18005558355+ and tap to call the number using SIP. You should hear Microsoft's Tell Me service, which provides a variety of useful information over the phone. When you are satisfied, hang up the call by pressing the back button or dragging the square down. Another useful automated 800 number is 18004664411+, which you may recognize as the GOOG411 directory service. In order to make a direct call to a non-toll-free number, you will have to deposit some credit into your Gizmo5 account (hint: There is a workaround for making free calls to US numbers which I will cover further down.)
 
 
25th February 2010, 08:29 PM |#2  
jashsu's Avatar
OP Senior Member
Thanks Meter: 15
 
More
Calling Numbers in Your Contact List

Instead of manually entering the number into the dialer, you can call numbers in your contact list using SIP. Note that if the number is not a toll-free number you will need credit in your Gizmo5 account. In your contact list, tap the desired contact to bring up the details. For each phone number the contact has, you will have both a Call and a Text option. In order to perform the call with SIP, tap the Text option. A menu will pop up with three options (possibly more if you have third party SMS apps or the official GV app installed)-- Messaging, Phone Call, and Sipdroid. Select Sipdroid and Sipdroid should perform the call.


The Relationship Between Gizmo5, GV, and the PSTN

This section should help you understand the relationships between Gizmo5, GV, and the PSTN. Let's assume you have a friend who, like you, has a SIP setup using Sipdroid, Gizmo5 and GV. In your contact info for him/her, you have your friend's actual cellular number, GV number, and SIP number.

If you tap on your friend's cellular number...
...and choose the Phone Call option, the call will be connected on both ends using cellular voice. No one will be using SIP, and both people will have cellular minutes deducted.

...and choose the Sipdroid option, the call will be connected on your end using SIP to Gizmo5, which will then route it out to the PSTN and connect to your friend via cellular voice. Your friend will have cell minutes deducted, and you will have Gizmo5 credits deducted.
If you tap on your friend's Google Voice number...
...and choose the Phone Call option, the call will be connected on your end using cellular voice, which will route it over the PSTN to Google Voice, which forwards the call to your friend's Gizmo5 and then via SIP onto his/her phone. Your friend will receive the call for free, and you will have cellular minutes deducted.

...and choose the Sipdroid option, the call will be connected on your end using SIP to Gizmo5, which will then route it out via PSTN to GV, which will then route it using SIP to your friend's Gizmo5. Your friend will receive the call for free, and you will have Gizmo5 credits deducted.
If you tap on your friend's SIP number...
...and choose the Phone Call option, the call will not connect and neither side will be billed.

...and choose the Sipdroid option, the call will be connected on both ends using SIP. The entire call will occur over SIP and thus neither side will have cellular minutes or Gizmo5 credits deducted.


Extra Credit: Free Outbound Calling Via Google Voice

I mentioned earlier that it is possible to make some non-toll-free outbound calls using Google Voice. Google Voice provides free outbound calling to any number within the United States and Canada. This is possible to do with SIP, but the service requires Google Voice to perform the dialing. Normally when performed in the official Google Voice app, this process is transparent. However, the official GV app does not support SIP dialing. In order to perform the call then, you must open the Google Voice webpage in your Android browser and perform a callback. Scroll to the bottom of the webpage, enter the number you wish to call, and click Call. If all is working properly, your phone should receive a SIP call. Answer this call and the number you called should be connected on the other end shortly.
26th February 2010, 03:12 AM |#3  
Junior Member
Thanks Meter: 0
 
More
Thank you so much for this complete guide and I've several questions here.

1.My sipdroid works well with UDP but doesn't work with TCP, any solution?

2.Registration does not complete every time. what does "503 Service Unavailable" mean?

3. Sipdroid will receive call back when I preform a call on my laptop in the google voice page, but never receive call back when I use google voice webpage. Why is it?

4. Is there any app for android can let me making google voice phone calls with gizmo5 service? I've tried guava, gv, google voice but none of these works. I guess its my fault but I just don't know how to solve it.
26th February 2010, 04:06 AM |#4  
jashsu's Avatar
OP Senior Member
Thanks Meter: 15
 
More
Quote:
Originally Posted by lemoncoffeetea

Thank you so much for this complete guide and I've several questions here.

1.My sipdroid works well with UDP but doesn't work with TCP, any solution?

What is your SIP provider/proxy? Not all SIP providers have proxy servers configured to work with TCP. One option for getting TCP to work with a SIP provider that doesn't yet support TCP is to route through pbxes.org

Quote:

3. Sipdroid will receive call back when I preform a call on my laptop in the google voice page, but never receive call back when I use google voice webpage. Why is it?

I don't understand your question. Can you rephrase it?

Quote:

4. Is there any app for android can let me making google voice phone calls with gizmo5 service? I've tried guava, gv, google voice but none of these works. I guess its my fault but I just don't know how to solve it.

Currently you have to use the callback if you want to perform a call through Google Voice.
26th February 2010, 07:27 PM |#5  
Junior Member
Thanks Meter: 0
 
More
Hey man, awesome updated post! But when I set everything up, I am not able to receive calls over 3g data when my screen blacks out (i am assuming that my 3g data is turned off when screen is blacked out as well?) - I can only receive calls when the screen is active. Do you know how to fix this? TIA!
27th February 2010, 05:00 AM |#6  
jashsu's Avatar
OP Senior Member
Thanks Meter: 15
 
More
Quote:
Originally Posted by surfshadow

Hey man, awesome updated post! But when I set everything up, I am not able to receive calls over 3g data when my screen blacks out (i am assuming that my 3g data is turned off when screen is blacked out as well?) - I can only receive calls when the screen is active. Do you know how to fix this? TIA!

What version of Sipdroid are you using? And which version of Android is your phone running? Your 3G data connection should remain active if both of those versions are fairly update. For the record I am using Sipdroid 1.3.14 on Android 1.6 for the above guide.
28th February 2010, 03:27 AM |#7  
Junior Member
Thanks Meter: 0
 
More
Everything is up to date like yours. I am using sipdroid 1.3.14 and running it on my Mytouch 3G (Android 1.6). Not sure if 3g connection drop is the sole issue because the green dot is always there - but even with the green dot present, it won't receive calls when i leave my phone idle for few minutes.
28th February 2010, 08:51 AM |#8  
Junior Member
Thanks Meter: 0
 
More
similar problem as lemoncoffeetea
Awesome post! Thank you.

I have very similar problem as lemoncoffeetea.

Sipdroid will receive call back when I preform a call on my laptop in the google voice page, but never receive call back when I use google voice webpage in my android phone.

In addition, the registration seems not very stable. Sometime the light turns to green, other time become red. When it is red, it either comes out (Timeout), or (503 errors).

Any insight on this?

Thank you very much!
28th February 2010, 01:26 PM |#9  
Retired Moderator
Thanks Meter: 68
 
More
Hey jashsu, awesome guide! This may not be the best place to post this but I've been having problems with sipdroid.

Specifically, any WiFi power saving mode seems to fail. I have Android's wifi sleeping set to never, and then if I check the "Let sipdroid control wifi power" box, sipdroid disconnects after the screen turns off, as well as the phone disconnecting from WiFi.

I believe this is probably related: http://code.google.com/p/sipdroid/wi...andbyTechnique

I'm guessing Gizmo5 doesn't support VoIP over TCP, so the phone needs to wake up often to keep the UDP connection alive? Appreciate any comments
28th February 2010, 03:11 PM |#10  
jashsu's Avatar
OP Senior Member
Thanks Meter: 15
 
More
Quote:
Originally Posted by Gary13579

I'm guessing Gizmo5 doesn't support VoIP over TCP, so the phone needs to wake up often to keep the UDP connection alive? Appreciate any comments

It definitely does, as I am connected to Gizmo5 using TCP right now.

edit: by the way, yes I do notice that setting WiFi to "Always on while plugged in" seems to have no effect. Strange. I'll look into it.
28th February 2010, 03:59 PM |#11  
Junior Member
Thanks Meter: 0
 
More
1. Both TCP and UDP seem both work fine.
2. I cannot use the STUN server. If I do, I cannot hear sound from echo test.
3. (most importantly) my connection to Gismo service through Sipdroid doesn't seem to be very stable. The connection turns RED very frequently - this happens almost everytime I open GV app, or google voice mobile website. (I don't know why)
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes