This post is now outdated. Please check out our follow-up to this: Android SIP update, published 05/11/11.
About a month ago, I wrote a blog post Google announces native SIP internet calling with Gingerbread. We were excited to see the announcement, but I couldn't suppress my inner skeptic when I read that support for the platform's SIP and internet calling features on devices would be determined by manufacturers and associated carriers. 
We got our hands on the Nexus S, and here are some of our initial thoughts on Google's native mobile internet calling:
To make an internet call, you must first have contacts with SIP addresses because the native dialer only allows you to input 10 digit numbers. The Nexus S also does not allow you to do transfers when you're on an internet call. You can have 2 calls up at once, switch between them, and merge them; but, the transfer function is nowhere to be found. I also found that if you have simultaneous internet calls going, and you hang up on one of them, the other call hangs up soon after.
We decided to run the native SIP client on the Nexus S through a full lab test, and here's what we found... This gets a bit technical: In summary, Android 2.3 provides basic SIP functionality, but does not yet implement enough SIP features to support interoperability with OnSIP. The four main issues for OnSIP interoperability are as follows:
- The auth user name is not configurable, which is required for registration.
- Proxy authentication is not supported, which is required for calls to the PSTN.
- SIP Replaces header is not supported, which is required for attended transfers.
- INVITES without SDP are not supported, which is required for music on hold.
1) SIP Authentication username not configurable - RFC 3261 Section 22.1
The Android 2.3 supplants the authorization user name with the AOR username. This means that only users who have the same authentication and AOR usernames will register with OnSIP. The inability to configure an authentication username is extremely limiting and is effectively incompatible with OnSIP.
View the trace [click again to close]
U 2010/12/21 11:32:31.160178 71.249.175.83:2383 -> 66.227.100.25:5060REGISTER sip:example.onsip.com SIP/2.0.Call-ID: f1f909d3174c410134097f2f2e38b53d@192.168.0.168.CSeq: 5347 REGISTER.From: "example_eric_5" <sip:example_eric_5@example.onsip.com:5060>;tag=3630188527.To: "example_eric_5" <sip:example_eric_5@example.onsip.com:5060>.Via: SIP/2.0/UDP 192.168.0.168:51092;branch=z9hG4bK4ed62ced6f77cf495e764bde0095f0dc373237;rport.Max-Forwards: 70.User-Agent: SIPAUA/0.1.001.Contact: *.Expires: 0.Content-Length: 0..U 2010/12/21 11:32:31.160732 66.227.100.25:5060 -> 71.249.175.83:2383SIP/2.0 401 Unauthorized.Call-ID: f1f909d3174c410134097f2f2e38b53d@192.168.0.168.CSeq: 5347 REGISTER.From: "example_eric_5" <sip:example_eric_5@example.onsip.com:5060>;tag=3630188527.To: "example_eric_5" <sip:example_eric_5@example.onsip.com:5060>;tag=75d09fb22ceadb40012c6e771a69dc74.c2ad.Via: SIP/2.0/UDP 192.168.0.168:51092;received=71.249.175.83;branch=z9hG4bK4ed62ced6f77cf495e764bde0095f0dc373237;rport=2383.WWW-Authenticate: Digest realm="jnctn.net", nonce="4d10d6bd000031429ac074b20519c6f6a156383d5d4e1479", qop="auth".Server: OpenSIPS (1.5.3-notls (x86_64/linux)).Content-Length: 0..U 2010/12/21 11:32:31.242388 71.249.175.83:2383 -> 66.227.100.25:5060REGISTER sip:example.onsip.com:5060;maddr=sip.onsip.com SIP/2.0.Call-ID: f1f909d3174c410134097f2f2e38b53d@192.168.0.168.CSeq: 5348 REGISTER.From: "example_eric_5" <sip:example_eric_5@example.onsip.com:5060>;tag=3630188527.To: "example_eric_5" <sip:example_eric_5@example.onsip.com:5060>.Via: SIP/2.0/UDP 192.168.0.168:51092;branch=z9hG4bK408faa97bf307d460023b00b9e181534373237;rport.Max-Forwards: 70.User-Agent: SIPAUA/0.1.001.Contact: *.Expires: 0.Authorization: Digest username="example_eric_5",realm="jnctn.net",nonce="4d10d6bd000031429ac074b20519c6f6a156383d5d4e1479",uri="sip:example.onsip.com:5060;maddr=sip.onsip.com",response="a03acc1b26eb5893ab10efd260171e64",qop=auth,cnonce="xyz",nc=00000001.Content-Length: 0..U 2010/12/21 11:32:31.244088 66.227.100.25:5060 -> 71.249.175.83:2383SIP/2.0 200 OK.Call-ID: f1f909d3174c410134097f2f2e38b53d@192.168.0.168.CSeq: 5348 REGISTER.From: "example_eric_5" <sip:example_eric_5@example.onsip.com:5060>;tag=3630188527.To: "example_eric_5" <sip:example_eric_5@example.onsip.com:5060>;tag=75d09fb22ceadb40012c6e771a69dc74.fd25.Via: SIP/2.0/UDP 192.168.0.168:51092;received=71.249.175.83;branch=z9hG4bK408faa97bf307d460023b00b9e181534373237;rport=2383.Server: OpenSIPS (1.5.3-notls (x86_64/linux)).Content-Length: 0..
2) SIP Proxy-to-User Authentication - RFC 3261 Section 22.3
When Android 2.3 receives the 407 Proxy Authentication Required, it should, if it is able, re-originate the request with the proper credentials. It does not. As OnSIP utilizes this method, services that require authentication (e.g. calling the PSTN) do not work.
We use the authentication request to determine whom to bill. Blocking outbound calls to the PSTN may be an intentional move by Google as it makes it more difficult, although not much more difficult, for people to circumvent cell phone carriers and cut them out of the money loop entirely. If you do not want cell phone carriers' getting any of your money on outbound PSTN calls, there are always downloadable SIP clients, like Bria.
View the trace
U 2010/12/21 12:40:26.005991 71.249.175.83:2992 -> 66.227.100.25:5060INVITE sip:18003569377@example.onsip.com SIP/2.0.Call-ID: 93d6e58bd7662b65c33c2e617aff225a@192.168.0.168.CSeq: 4605 INVITE.From: "example_eric_5" <sip:example_eric_5@example.onsip.com:5060>;tag=3390355169.To: <sip:18003569377@example.onsip.com>.Via: SIP/2.0/UDP 192.168.0.168:42756;branch=z9hG4bK55d4080a3ac9d663afbf7c0e3f0bd6db373231;rport.Max-Forwards: 70.Contact: "example_eric_5" <sip:example_eric_5@192.168.0.168:42756;transport=udp>.Content-Type: application/sdp.Content-Length: 299..v=0.o=- 1292953224992 1292953224993 IN IP4 192.168.0.168.s=-.c=IN IP4 192.168.0.168.t=0 0.m=audio 57466 RTP/AVP 96 97 3 0 8 127.a=rtpmap:96 GSM-EFR/8000.a=rtpmap:97 AMR/8000.a=rtpmap:3 GSM/8000.a=rtpmap:0 PCMU/8000.a=rtpmap:8 PCMA/8000.a=rtpmap:127 telephone-event/8000.a=fmtp:127 0-15.U 2010/12/21 12:40:26.007718 66.227.100.25:5060 -> 71.249.175.83:2992SIP/2.0 100 Giving a try.Call-ID: 93d6e58bd7662b65c33c2e617aff225a@192.168.0.168.CSeq: 4605 INVITE.From: "example_eric_5" <sip:example_eric_5@example.onsip.com:5060>;tag=3390355169.To: <sip:18003569377@example.onsip.com>.Via: SIP/2.0/UDP 192.168.0.168:42756;branch=z9hG4bK55d4080a3ac9d663afbf7c0e3f0bd6db373231;rport=2992;received=71.249.175.83.Server: OpenSIPS (1.5.3-notls (x86_64/linux)).Content-Length: 0..U 2010/12/21 12:40:26.011112 66.227.100.25:5060 -> 71.249.175.83:2992SIP/2.0 407 Proxy Authentication Required.Call-ID: 93d6e58bd7662b65c33c2e617aff225a@192.168.0.168.CSeq: 4605 INVITE.From: "example_eric_5" <sip:example_eric_5@example.onsip.com:5060>;tag=3390355169.To: <sip:18003569377@example.onsip.com>;tag=941e907f341f73f47cc36f41836b2bab.e951.Via: SIP/2.0/UDP 192.168.0.168:42756;received=71.249.175.83;branch=z9hG4bK55d4080a3ac9d663afbf7c0e3f0bd6db373231;rport=2992.Proxy-Authenticate: Digest realm="jnctn.net", nonce="4d10e6a8000017a529fae2efbe3d2250af2793fd54fe9d2d", qop="auth".Server: OpenSIPS (1.5.3-notls (x86_64/linux)).Content-Length: 0..U 2010/12/21 12:40:26.079655 71.249.175.83:2992 -> 66.227.100.25:5060ACK sip:18003569377@example.onsip.com SIP/2.0.Call-ID: 93d6e58bd7662b65c33c2e617aff225a@192.168.0.168.Max-Forwards: 70.From: "example_eric_5" <sip:example_eric_5@example.onsip.com:5060>;tag=3390355169.To: <sip:18003569377@example.onsip.com>;tag=941e907f341f73f47cc36f41836b2bab.e951.Via: SIP/2.0/UDP 192.168.0.168:42756;branch=z9hG4bK55d4080a3ac9d663afbf7c0e3f0bd6db373231;rport.CSeq: 4605 ACK.Content-Length: 0.
3) SIP “Replaces” header not supported - RFC 3891
Android 2.3 does not support the SIP Replaces header. Because OnSIP utilizes this header during attended transfers, Android 2.3 cannot function as the target of attended transfers. Instead, the native app treats the transferee’s call as an additional call. Support for the Replaces header is not a core SIP requirement, but it is a requirement for OnSIP to support attended transfers.
View the trace
U 2010/12/21 12:52:21.045538 66.227.100.25:5060 -> 71.249.175.83:2992INVITE sip:example_eric_5@192.168.0.168:42756;transport=udp;aor=example_eric_5%40example.onsip.com SIP/2.0.Record-Route: <sip:66.227.100.25;lr;ftag=361CC16C-36B217CD;nc=1;did=0ba.6354ac77;ns=1>.Via: SIP/2.0/UDP 66.227.100.25;branch=z9hG4bK58c6.a27890b7.0.Via: SIP/2.0/UDP 192.168.0.187:5060;rport=2536;received=71.249.175.83;branch=z9hG4bK7984f2d6B1EA97A7.From: "Lab 550" <sip:eric@example.onsip.com>;tag=361CC16C-36B217CD.To: <sip:9103@example.onsip.com;user=phone>.CSeq: 1 INVITE.Call-ID: 98d29950-21cc1a11-926d422a@192.168.0.187.Contact: <sip:eric*71.249.175.83!2536_n@66.227.100.25;gr>.Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER.User-Agent: PolycomSoundPointIP-SPIP_550-UA/3.2.3.1734.Accept-Language: en.Supported: 100rel,replaces.Allow-Events: talk,hold,conference.Max-Forwards: 69.Content-Type: application/sdp.Content-Length: 249..v=0.o=- 1167614228 1167614228 IN IP4 192.168.0.187.s=Polycom IP Phone.c=IN IP4 192.168.0.187.t=0 0.a=sendrecv.m=audio 2268 RTP/AVP 9 0 8 127.a=rtpmap:9 G722/8000.a=rtpmap:0 PCMU/8000.a=rtpmap:8 PCMA/8000.a=rtpmap:127 telephone-event/8000.U 2010/12/21 12:52:21.442312 71.249.175.83:2992 -> 66.227.100.25:5060SIP/2.0 180 Ringing.Record-Route: <sip:66.227.100.25;lr;ftag=361CC16C-36B217CD;nc=1;did=0ba.6354ac77;ns=1>.Via: SIP/2.0/UDP 66.227.100.25;branch=z9hG4bK58c6.a27890b7.0,SIP/2.0/UDP 192.168.0.187:5060;rport=2536;received=71.249.175.83;branch=z9hG4bK7984f2d6B1EA97A7.From: "Lab 550" <sip:eric@example.onsip.com>;tag=361CC16C-36B217CD.To: <sip:9103@example.onsip.com;user=phone>;tag=2751295785.CSeq: 1 INVITE.Call-ID: 98d29950-21cc1a11-926d422a@192.168.0.187.Content-Length: 0..U 2010/12/21 12:52:23.831854 71.249.175.83:2992 -> 66.227.100.25:5060SIP/2.0 200 OK.Record-Route: <sip:66.227.100.25;lr;ftag=361CC16C-36B217CD;nc=1;did=0ba.6354ac77;ns=1>.Via: SIP/2.0/UDP 66.227.100.25;branch=z9hG4bK58c6.a27890b7.0,SIP/2.0/UDP 192.168.0.187:5060;rport=2536;received=71.249.175.83;branch=z9hG4bK7984f2d6B1EA97A7.From: "Lab 550" <sip:eric@example.onsip.com>;tag=361CC16C-36B217CD.To: <sip:9103@example.onsip.com;user=phone>;tag=2751295785.CSeq: 1 INVITE.Call-ID: 98d29950-21cc1a11-926d422a@192.168.0.187.Contact: "example_eric_5" <sip:example_eric_5@192.168.0.168:42756;transport=udp>.Content-Type: application/sdp.Content-Length: 181..v=0.o=- 1292953940399 1292953942754 IN IP4 192.168.0.168.s=-.c=IN IP4 192.168.0.168.t=0 0.m=audio 14570 RTP/AVP 0 127.a=rtpmap:0 PCMU/8000.a=rtpmap:127 telephone-event/8000.U 2010/12/21 12:52:23.884494 66.227.100.25:5060 -> 71.249.175.83:2992ACK sip:example_eric_5@71.249.175.83:2992;transport=udp SIP/2.0.Record-Route: <sip:66.227.100.25;lr;ftag=361CC16C-36B217CD;did=0ba.6354ac77;nc=1;ns=1>.Via: SIP/2.0/UDP 66.227.100.25;branch=z9hG4bK58c6.a27890b7.2.Via: SIP/2.0/UDP 192.168.0.187:5060;rport=2536;received=71.249.175.83;branch=z9hG4bK259b4fdbB1E82764.From: "Lab 550" <sip:eric@example.onsip.com>;tag=361CC16C-36B217CD.To: <sip:9103@example.onsip.com;user=phone>;tag=2751295785.CSeq: 1 ACK.Call-ID: 98d29950-21cc1a11-926d422a@192.168.0.187.Contact: <sip:eric*71.249.175.83!2536_n@66.227.100.25;gr>.Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER.User-Agent: PolycomSoundPointIP-SPIP_550-UA/3.2.3.1734.Accept-Language: en.Max-Forwards: 69.Content-Length: 0..U 2010/12/21 12:52:25.796875 66.227.100.25:5060 -> 71.249.175.83:2992INVITE sip:example_eric_5@192.168.0.168:42756;transport=udp;aor=example_eric_5%40example.onsip.com SIP/2.0.Record-Route: <sip:66.227.100.25;lr;ftag=66d9d53b;nc=1;did=6d1.b323beb6;ns=1>.Via: SIP/2.0/UDP 66.227.100.25;branch=z9hG4bK461d.f3f98ba1.0.Via: SIP/2.0/UDP 192.168.0.182:37328;received=71.249.175.83;branch=z9hG4bK-d8754z-82bf74668678df79-1---d8754z-;rport=2575.Max-Forwards: 69.Contact: <sip:eric.1*71.249.175.83!2575_n@66.227.100.25;gr>.To: <sip:9103@example.onsip.com;user=phone>.From: "Eric Eyebeam"<sip:eric.1@example.onsip.com>;tag=66d9d53b.Call-ID: YjM3ZWVlNTNlMDk3NTNiY2IzMDhlNGVkMzliNWM4MzA..CSeq: 1 INVITE.Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO.Content-Type: application/sdp.User-Agent: eyeBeam release 1104g stamp 54686.Referred-By: <sip:eric@example.onsip.com>.Replaces: 98d29950-21cc1a11-926d422a@192.168.0.187;to-tag=2751295785;from-tag=361CC16C-36B217CD.Content-Length: 238..v=0.o=- 5 2 IN IP4 192.168.0.182.s=CounterPath eyeBeam 1.5.c=IN IP4 192.168.0.182.t=0 0.m=audio 21706 RTP/AVP 0 8 18 3 101.a=fmtp:18 annexb=yes.a=fmtp:101 0-15.a=rtpmap:18 G729/8000.a=rtpmap:101 telephone-event/8000.a=sendrecv.U 2010/12/21 12:52:25.938949 71.249.175.83:2992 -> 66.227.100.25:5060SIP/2.0 180 Ringing.Record-Route: <sip:66.227.100.25;lr;ftag=66d9d53b;nc=1;did=6d1.b323beb6;ns=1>.Via: SIP/2.0/UDP 66.227.100.25;branch=z9hG4bK461d.f3f98ba1.0,SIP/2.0/UDP 192.168.0.182:37328;received=71.249.175.83;branch=z9hG4bK-d8754z-82bf74668678df79-1---d8754z-;rport=2575.To: <sip:9103@example.onsip.com;user=phone>;tag=3289256833.From: "Eric Eyebeam" <sip:eric.1@example.onsip.com>;tag=66d9d53b.Call-ID: YjM3ZWVlNTNlMDk3NTNiY2IzMDhlNGVkMzliNWM4MzA..CSeq: 1 INVITE.Content-Length: 0..U 2010/12/21 12:52:30.217889 71.249.175.83:2992 -> 66.227.100.25:5060SIP/2.0 200 OK.Record-Route: <sip:66.227.100.25;lr;ftag=66d9d53b;nc=1;did=6d1.b323beb6;ns=1>.Via: SIP/2.0/UDP 66.227.100.25;branch=z9hG4bK461d.f3f98ba1.0,SIP/2.0/UDP 192.168.0.182:37328;received=71.249.175.83;branch=z9hG4bK-d8754z-82bf74668678df79-1---d8754z-;rport=2575.To: <sip:9103@example.onsip.com;user=phone>;tag=3289256833.From: "Eric Eyebeam" <sip:eric.1@example.onsip.com>;tag=66d9d53b.Call-ID: YjM3ZWVlNTNlMDk3NTNiY2IzMDhlNGVkMzliNWM4MzA..CSeq: 1 INVITE.Contact: "example_eric_5" <sip:example_eric_5@192.168.0.168:42756;transport=udp>.Content-Type: application/sdp.Content-Length: 198..v=0.o=- 1292953944899 1292953949154 IN IP4 192.168.0.168.s=-.c=IN IP4 192.168.0.168.t=0 0.m=audio 46194 RTP/AVP 0 101.a=rtpmap:0 PCMU/8000.a=rtpmap:101 telephone-event/8000.a=fmtp:101 0-15.U 2010/12/21 12:52:30.369798 66.227.100.25:5060 -> 71.249.175.83:2992ACK sip:example_eric_5@71.249.175.83:2992;transport=udp SIP/2.0.Record-Route: <sip:66.227.100.25;lr;ftag=66d9d53b;did=6d1.b323beb6;nc=1;ns=1>.Via: SIP/2.0/UDP 66.227.100.25;branch=z9hG4bK461d.f3f98ba1.2.Via: SIP/2.0/UDP 192.168.0.182:37328;received=71.249.175.83;branch=z9hG4bK-d8754z-f6d249364b361c1e-1---d8754z-;rport=2575.Max-Forwards: 69.Contact: <sip:eric.1*71.249.175.83!2575_n@66.227.100.25;gr>.To: <sip:9103@example.onsip.com;user=phone>;tag=3289256833.From: "Eric Eyebeam"<sip:eric.1@example.onsip.com>;tag=66d9d53b.Call-ID: YjM3ZWVlNTNlMDk3NTNiY2IzMDhlNGVkMzliNWM4MzA..CSeq: 1 ACK.User-Agent: eyeBeam release 1104g stamp 54686.Content-Length: 0..U 2010/12/21 12:52:30.719283 71.249.175.83:2992 -> 66.227.100.25:5060INVITE sip:eric*71.249.175.83!2536_n@66.227.100.25;gr SIP/2.0.Via: SIP/2.0/UDP 192.168.0.168:42756;branch=z9hG4bKb7911f4899c27804722792fdd517694d373231.CSeq: 1 INVITE.From: <sip:9103@example.onsip.com;user=phone>;tag=2751295785.To: "Lab 550" <sip:eric@example.onsip.com>;tag=361CC16C-36B217CD.Call-ID: 98d29950-21cc1a11-926d422a@192.168.0.187.Max-Forwards: 70.Contact: <sip:192.168.0.168:42756;transport=udp>.Route: <sip:66.227.100.25;lr;ftag=361CC16C-36B217CD;nc=1;did=0ba.6354ac77;ns=1>.Content-Type: application/sdp.Content-Length: 210..v=0.o=- 1292953940399 1292953949643 IN IP4 192.168.0.168.s=-.c=IN IP4 192.168.0.168.t=0 0.a=sendonly.m=audio 14570 RTP/AVP 0 127.a=rtpmap:0 PCMU/8000.a=rtpmap:127 telephone-event/8000.a=fmtp:127 0-15.U 2010/12/21 12:52:30.720123 66.227.100.25:5060 -> 71.249.175.83:2992SIP/2.0 100 Giving a try.Via: SIP/2.0/UDP 192.168.0.168:42756;branch=z9hG4bKb7911f4899c27804722792fdd517694d373231;rport=2992;received=71.249.175.83.CSeq: 1 INVITE.From: <sip:9103@example.onsip.com;user=phone>;tag=2751295785.To: "Lab 550" <sip:eric@example.onsip.com>;tag=361CC16C-36B217CD.Call-ID: 98d29950-21cc1a11-926d422a@192.168.0.187.Server: OpenSIPS (1.5.3-notls (x86_64/linux)).Content-Length: 0..U 2010/12/21 12:52:30.786264 66.227.100.25:5060 -> 71.249.175.83:2992SIP/2.0 200 OK.Via: SIP/2.0/UDP 192.168.0.168:42756;rport=2992;received=71.249.175.83;branch=z9hG4bKb7911f4899c27804722792fdd517694d373231.From: <sip:9103@example.onsip.com;user=phone>;tag=2751295785.To: "Lab 550" <sip:eric@example.onsip.com>;tag=361CC16C-36B217CD.CSeq: 1 INVITE.Call-ID: 98d29950-21cc1a11-926d422a@192.168.0.187.Contact: <sip:eric*71.249.175.83!2536_n@66.227.100.25;gr>.Record-Route: <sip:66.227.100.25;lr;ftag=2751295785;did=0ba.6354ac77;nc=1;ns=1>.Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER.Supported: 100rel,replaces.User-Agent: PolycomSoundPointIP-SPIP_550-UA/3.2.3.1734.Accept-Language: en.Content-Type: application/sdp.Content-Length: 201..v=0.o=- 1167614228 1167614229 IN IP4 192.168.0.187.s=Polycom IP Phone.c=IN IP4 192.168.0.187.t=0 0.a=recvonly.m=audio 2268 RTP/AVP 0 127.a=rtpmap:0 PCMU/8000.a=rtpmap:127 telephone-event/8000.U 2010/12/21 12:52:30.898488 71.249.175.83:2992 -> 66.227.100.25:5060ACK sip:eric*71.249.175.83!2536_n@66.227.100.25;gr SIP/2.0.Call-ID: 98d29950-21cc1a11-926d422a@192.168.0.187.CSeq: 1 ACK.Via: SIP/2.0/UDP 192.168.0.168:42756;branch=z9hG4bKbe205318aac2bc695e0c2688d47f7d21373231.From: <sip:9103@example.onsip.com;user=phone>;tag=2751295785.To: "Lab 550" <sip:eric@example.onsip.com>;tag=361CC16C-36B217CD.Max-Forwards: 70.Route: <sip:66.227.100.25;lr;ftag=361CC16C-36B217CD;nc=1;did=0ba.6354ac77;ns=1>.Content-Length: 0..U 2010/12/21 12:52:35.083058 66.227.100.25:5060 -> 71.249.175.83:2992BYE sip:example_eric_5@71.249.175.83:2992;transport=udp SIP/2.0.Record-Route: <sip:66.227.100.25;lr;ftag=66d9d53b;did=6d1.b323beb6;nc=1;ns=1>.Via: SIP/2.0/UDP 66.227.100.25;branch=z9hG4bK161d.98a23f36.0.Via: SIP/2.0/UDP 192.168.0.182:37328;received=71.249.175.83;branch=z9hG4bK-d8754z-6b3ee7348bdeee32-1---d8754z-;rport=2575.Max-Forwards: 69.Contact: <sip:eric.1*71.249.175.83!2575_n@66.227.100.25;gr>.To: <sip:9103@example.onsip.com;user=phone>;tag=3289256833.From: "Eric Eyebeam"<sip:eric.1@example.onsip.com>;tag=66d9d53b.Call-ID: YjM3ZWVlNTNlMDk3NTNiY2IzMDhlNGVkMzliNWM4MzA..CSeq: 2 BYE.User-Agent: eyeBeam release 1104g stamp 54686.Reason: SIP;description="User Hung Up".Content-Length: 0..U 2010/12/21 12:52:35.435725 71.249.175.83:2992 -> 66.227.100.25:5060SIP/2.0 200 OK.Via: SIP/2.0/UDP 66.227.100.25;branch=z9hG4bK161d.98a23f36.0,SIP/2.0/UDP 192.168.0.182:37328;received=71.249.175.83;branch=z9hG4bK-d8754z-6b3ee7348bdeee32-1---d8754z-;rport=2575.To: <sip:9103@example.onsip.com;user=phone>;tag=3289256833.From: "Eric Eyebeam" <sip:eric.1@example.onsip.com>;tag=66d9d53b.Call-ID: YjM3ZWVlNTNlMDk3NTNiY2IzMDhlNGVkMzliNWM4MzA..CSeq: 2 BYE.Content-Length: 0..U 2010/12/21 12:52:36.381897 66.227.100.25:5060 -> 71.249.175.83:2992BYE sip:71.249.175.83:2992;transport=udp SIP/2.0.Record-Route: <sip:66.227.100.25;lr;ftag=361CC16C-36B217CD;did=0ba.6354ac77;nc=1;ns=1>.Via: SIP/2.0/UDP 66.227.100.25;branch=z9hG4bK28c6.7d31ca77.0.Via: SIP/2.0/UDP 192.168.0.187:5060;rport=2536;received=71.249.175.83;branch=z9hG4bK2d4310c3F1E7C00C.From: "Lab 550" <sip:eric@example.onsip.com>;tag=361CC16C-36B217CD.To: <sip:9103@example.onsip.com;user=phone>;tag=2751295785.CSeq: 2 BYE.Call-ID: 98d29950-21cc1a11-926d422a@192.168.0.187.Contact: <sip:eric*71.249.175.83!2536_n@66.227.100.25;gr>.User-Agent: PolycomSoundPointIP-SPIP_550-UA/3.2.3.1734.Accept-Language: en.Max-Forwards: 69.Content-Length: 0..U 2010/12/21 12:52:36.788061 71.249.175.83:2992 -> 66.227.100.25:5060SIP/2.0 200 OK.Via: SIP/2.0/UDP 66.227.100.25;branch=z9hG4bK28c6.7d31ca77.0,SIP/2.0/UDP 192.168.0.187:5060;rport=2536;received=71.249.175.83;branch=z9hG4bK2d4310c3F1E7C00C.From: "Lab 550" <sip:eric@example.onsip.com>;tag=361CC16C-36B217CD.To: <sip:9103@example.onsip.com;user=phone>;tag=2751295785.CSeq: 2 BYE.Call-ID: 98d29950-21cc1a11-926d422a@192.168.0.187.Content-Length: 0..
4) Rejecting INVITE without session offer - RFC 3261 Section 13.3.1.3
Android 2.3 rejects re-invites when the INVITE does not contain the Session Description Protocol, or SDP. OnSIP Music on Hold utilizes this functionality. In the following SIP trace, a Polycom 550 attempts to place Android 2.3 on hold (where we re-invited for our Hold Music) and Android 2.3 rejects the call with a 486 Busy Here.
View the trace
U 2010/12/21 12:43:47.076475 66.227.100.25:5060 -> 71.249.175.83:2992INVITE sip:example_eric_5@192.168.0.168:42756;transport=udp;aor=example_eric_5%40example.onsip.com SIP/2.0.Record-Route: <sip:66.227.100.25;lr;ftag=3C64CCE4-306A6C85;nc=1;did=641.8646e2e7;ns=1>.Via: SIP/2.0/UDP 66.227.100.25;branch=z9hG4bK4e16.fee86501.0.Via: SIP/2.0/UDP 192.168.0.187:5060;rport=2536;received=71.249.175.83;branch=z9hG4bK4c48b07e79CCCF0F.From: "Lab 550" <sip:eric@example.onsip.com>;tag=3C64CCE4-306A6C85.To: <sip:9103@example.onsip.com;user=phone>.CSeq: 1 INVITE.Call-ID: a905e478-7a2a02f9-6188c2d2@192.168.0.187.Contact: <sip:eric*71.249.175.83!2536_n@66.227.100.25;gr>.Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER.User-Agent: PolycomSoundPointIP-SPIP_550-UA/3.2.3.1734.Accept-Language: en.Supported: 100rel,replaces.Allow-Events: talk,hold,conference.Max-Forwards: 69.Content-Type: application/sdp.Content-Length: 249..v=0.o=- 1167613714 1167613714 IN IP4 192.168.0.187.s=Polycom IP Phone.c=IN IP4 192.168.0.187.t=0 0.a=sendrecv.m=audio 2256 RTP/AVP 9 0 8 127.a=rtpmap:9 G722/8000.a=rtpmap:0 PCMU/8000.a=rtpmap:8 PCMA/8000.a=rtpmap:127 telephone-event/8000.U 2010/12/21 12:43:47.774861 71.249.175.83:2992 -> 66.227.100.25:5060SIP/2.0 180 Ringing.Record-Route: <sip:66.227.100.25;lr;ftag=3C64CCE4-306A6C85;nc=1;did=641.8646e2e7;ns=1>.Via: SIP/2.0/UDP 66.227.100.25;branch=z9hG4bK4e16.fee86501.0,SIP/2.0/UDP 192.168.0.187:5060;rport=2536;received=71.249.175.83;branch=z9hG4bK4c48b07e79CCCF0F.From: "Lab 550" <sip:eric@example.onsip.com>;tag=3C64CCE4-306A6C85.To: <sip:9103@example.onsip.com;user=phone>;tag=4232299113.CSeq: 1 INVITE.Call-ID: a905e478-7a2a02f9-6188c2d2@192.168.0.187.Content-Length: 0..U 2010/12/21 12:43:50.242039 71.249.175.83:2992 -> 66.227.100.25:5060SIP/2.0 200 OK.Record-Route: <sip:66.227.100.25;lr;ftag=3C64CCE4-306A6C85;nc=1;did=641.8646e2e7;ns=1>.Via: SIP/2.0/UDP 66.227.100.25;branch=z9hG4bK4e16.fee86501.0,SIP/2.0/UDP 192.168.0.187:5060;rport=2536;received=71.249.175.83;branch=z9hG4bK4c48b07e79CCCF0F.From: "Lab 550" <sip:eric@example.onsip.com>;tag=3C64CCE4-306A6C85.To: <sip:9103@example.onsip.com;user=phone>;tag=4232299113.CSeq: 1 INVITE.Call-ID: a905e478-7a2a02f9-6188c2d2@192.168.0.187.Contact: "example_eric_5" <sip:example_eric_5@192.168.0.168:42756;transport=udp>.Content-Type: application/sdp.Content-Length: 181..v=0.o=- 1292953426571 1292953429008 IN IP4 192.168.0.168.s=-.c=IN IP4 192.168.0.168.t=0 0.m=audio 37392 RTP/AVP 0 127.a=rtpmap:0 PCMU/8000.a=rtpmap:127 telephone-event/8000.U 2010/12/21 12:43:50.294597 66.227.100.25:5060 -> 71.249.175.83:2992ACK sip:example_eric_5@71.249.175.83:2992;transport=udp SIP/2.0.Record-Route: <sip:66.227.100.25;lr;ftag=3C64CCE4-306A6C85;did=641.8646e2e7;nc=1;ns=1>.Via: SIP/2.0/UDP 66.227.100.25;branch=z9hG4bK4e16.fee86501.2.Via: SIP/2.0/UDP 192.168.0.187:5060;rport=2536;received=71.249.175.83;branch=z9hG4bK6daf5243D842058C.From: "Lab 550" <sip:eric@example.onsip.com>;tag=3C64CCE4-306A6C85.To: <sip:9103@example.onsip.com;user=phone>;tag=4232299113.CSeq: 1 ACK.Call-ID: a905e478-7a2a02f9-6188c2d2@192.168.0.187.Contact: <sip:eric*71.249.175.83!2536_n@66.227.100.25;gr>.Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER.User-Agent: PolycomSoundPointIP-SPIP_550-UA/3.2.3.1734.Accept-Language: en.Max-Forwards: 69.Content-Length: 0..U 2010/12/21 12:43:51.992439 66.227.100.25:5060 -> 71.249.175.83:2992INVITE sip:example_eric_5@71.249.175.83:2992;transport=udp SIP/2.0.Record-Route: <sip:66.227.100.25;lr;ftag=3C64CCE4-306A6C85;did=641.8646e2e7;nc=1;ns=1>.Via: SIP/2.0/UDP 66.227.100.25;branch=z9hG4bK1e16.081deb64.0.Via: SIP/2.0/UDP 192.168.0.187:5060;rport=2536;received=71.249.175.83;branch=z9hG4bK8b6f66ed2040C6A6.From: "Lab 550" <sip:eric@example.onsip.com>;tag=3C64CCE4-306A6C85.To: <sip:9103@example.onsip.com;user=phone>;tag=4232299113.CSeq: 2 INVITE.Call-ID: a905e478-7a2a02f9-6188c2d2@192.168.0.187.Contact: <sip:eric*71.249.175.83!2536_n@66.227.100.25;gr>;+sip.rendering="no".Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER.User-Agent: PolycomSoundPointIP-SPIP_550-UA/3.2.3.1734.Accept-Language: en.Supported: 100rel,replaces.Allow-Events: talk,hold,conference.Max-Forwards: 69.Content-Length: 0..U 2010/12/21 12:43:52.233532 71.249.175.83:2992 -> 66.227.100.25:5060SIP/2.0 486 Busy here.Via: SIP/2.0/UDP 66.227.100.25;branch=z9hG4bK1e16.081deb64.0,SIP/2.0/UDP 192.168.0.187:5060;rport=2536;received=71.249.175.83;branch=z9hG4bK8b6f66ed2040C6A6.From: "Lab 550" <sip:eric@example.onsip.com>;tag=3C64CCE4-306A6C85.To: <sip:9103@example.onsip.com;user=phone>;tag=4232299113.CSeq: 2 INVITE.Call-ID: a905e478-7a2a02f9-6188c2d2@192.168.0.187.Content-Length: 0..U 2010/12/21 12:43:52.233649 66.227.100.25:5060 -> 71.249.175.83:2992ACK sip:example_eric_5@71.249.175.83:2992;transport=udp SIP/2.0.Via: SIP/2.0/UDP 66.227.100.25;branch=z9hG4bK1e16.081deb64.0.From: "Lab 550" <sip:eric@example.onsip.com>;tag=3C64CCE4-306A6C85.Call-ID: a905e478-7a2a02f9-6188c2d2@192.168.0.187.To: <sip:9103@example.onsip.com;user=phone>;tag=4232299113.CSeq: 2 ACK.Max-Forwards: 70.User-Agent: OpenSIPS (1.5.3-notls (x86_64/linux)).Content-Length: 0..
So what have we learned today? Native SIP support in Android 2.3 in its current form is fine if you just want to make/receive SIP calls. Additional features for business users will require some updates to the software.
Comments
Mark Murphy (not verified)
Wed, 01/05/2011 - 20:15
Filed as issues
I have taken the liberty of filing your four points as issues on the public issue tracker. #3 I filed as a feature request, the others as bugs, since it appears that Android 2.3 incompletely supports the SIP spec, from what I can decipher of what you have here. You can find the issues on http://b.android.com as 13740 through 13743.
Leo Zheng
Thu, 01/06/2011 - 11:03
Thanks
We'll be keeping an eye on those.
Curly (not verified)
Sat, 01/15/2011 - 02:47
More observations
Hi Leo, thank you for posting this excellent article. I hope the Nexus S / Android 2.3 SIP stack implementation improves because I found that using Google's very own Google Voice with the Nexus S SIP settings configured to use SIP via Gizmo5 and Google Voice, along with the Nexus S as a speaker phone, people who I would speak with would complain that they couldn't hear the beginning of what I was stating every time I would begin to speak. This may be more of a Nexus S speaker phone / microphone issue and might have nothing to do with the SIP stack implementation. However, I also have an unlocked Nokia E71 (with the Symbian SIP stack implementation) to compare with (am about to do this). That being said and done, have you tested OnSIP with the Nexus S / Android 2.3 with its built-in SIP stack on calls using the Nexus S as a speakerphone? What about latency issues? note: I'm grandfathered into the legacy via Gizmo5 SIP service which Google no longer is accepting signups for (after Google acquired Gizmo5). This isn't to take anything away from OnSIP, but in the philosophy of being "open" (open source, open protocols), we all need to keep Google in check especially since Google (particularly with Nexus devices) purports open standards. Thank you for keeping Google on its toes! -Curly
Guest (not verified)
Tue, 02/01/2011 - 06:36
Codec and latency
Hi, I wish to know the LATENCY with Speex codec at 8kbps and 16kbps Also wish to know why XMPP-Jingle-VoIP isn't implemented yet on gTalk ? Cheers, Guillermo
Frank Shearar (not verified)
Fri, 02/04/2011 - 07:58
Rejecting bodiless INVITEs
It looks like Gingerbread's badly misinterpreting that INVITE: it's treating the INVITE as a new call (486 Busy Here), but it's clearly an in-dialog INVITE. So either it will reject other in-dialog INVITEs (like renegotiating media) or it's returning the incorrect Status-Code, which should be 488 Not Acceptable Here. (See section 14.2)
Guest (not verified)
Sun, 02/20/2011 - 00:27
is there a way that someone could re-engineer this native sip
Hi Leo read your post, and loved the commentary that you gave on this sip stack that google announced for android. I must admit when I heard about this, I thought wow, google and the mobile carriers are going to actually free people up on minutes as this would allow informed people the ability to make free calls through there mobile networks on there phone but I guess i didn't see the fine print that the sip stack would be kept in check by manufacturers and mobile phone companies, as I thought we would get a full sip stack that allowed us to do fully compatible conference calling and not just one on one, also thought that we would be able to call pstn from sip but as your article pointed out they blocked that feature and as another person commented; why haven't they allowed the calling feature in gtalk for android mobile devices. All in all as I am fed up with this mockery of google or the mobile phone companies for not implementing a fully capable sip stack that allows you the full capabilities of a sip phone, is there a way that someone would be able to take gingerbread source and re-engineer sip stack to have full capabilities of a sip phone, or is it possible to take the sip stack and have it engineered with sipdroid or another sip phone app as the native sip phone built into the core of android and is always on, like lets say the native sip on nokia devices.
Guest (gggirlgeek) (not verified)
Sun, 02/20/2011 - 09:40
Sad because Nokia smart
Sad because Nokia smart phones' new native sip client works wonderfully (I have 5530 with custom C6 firmware.) Android phone's are much more advanced than Symbian. It is obvious Google either does not want the feature or is bowing to pressure from cell providers. (Even iPhone has better apps for this.) Even more humorous: T-mobile stuck a new feature on my G2 -- Wifi Calling. It is simply a setting to reroute your calls to your personal internet service rather than their cell phone network -- supposedly to give you phone access in dead zones, which it does. This saves them bandwidth and money. But they still charge you for normal cell phone minutes! (Some carries even charge you a monthly fee for the "convenience.") But of course they don't share these profits with the ISP who's actually providing the connection. What a tease. What a rip-off! Somebody is bound to hack these settings, in a custom Rom, to allow you to add your own Voip service. Hint hint, modders!
Guest (not verified)
Mon, 02/21/2011 - 01:16
thats the thing though,
thats the thing though, modders/developers who create custom roms might be put at a risk b/c if they do change the sip stack for gingerbread to be a fully functional sip, with sip capabilities with no restrictions, then the carriers might come down on google for making android OS open source and allowing for modders to do that, and can say that they are losing money b/c custom roms allow free calling through internet which they have been trying to block for years. So its a thin line, that i understand, but i don't think cell phone companies should have so much power to influence google on what to do with there own OS, if android users want a feature it should not be a cell phone company who decides whether or not that feature is included in the OS. It should be the people/end users b/c they are the ones paying the cell phone companies not the other way around.
Guest (not verified)
Tue, 05/10/2011 - 16:42
"and can say that they are
"and can say that they are losing money b/c custom roms allow free calling through internet which they have been trying to block for years" They don't have a right to block it. Data is data.
Kirn Gill (not verified)
Sun, 05/08/2011 - 12:33
T-Mobile's Wi-Fi calling isn't SIP
T-Mobile's Wi-Fi calling isn't SIP, it's GAN (Generic Access Network), which is essentially the GSM protocol used with the GSM/UMTS cell network, but over IP. Custom mods would be useless to include custom addresses for the GAN server because the new server needs to fake enough of the GSM core network to trick the phone and the SIM card, as well as authenticate the SIM. This would also require access to the Ki authentication and encryption key stored in the SIM, which is quite a feat on it's own (The SIM is designed to not give out the Ki code)
sirrix (not verified)
Mon, 02/28/2011 - 18:28
Well I've just got SIP
Well I've just got SIP calling running on my Nexus One and I think it's markedly better than you're making it out to be. For starters, you don't need to have any SIP numbers - I can call anyone in the US. How? It's a little bit of a workaround, but you can add a GIZMO SIP number to the phones your Google Voice account will call when you have an incoming call. Once you add that, add the same SIP number to your phone in 2.3's call settings. Now, set up Google Voice on the website to ring both your cell number and your GIZMO number for every incoming call. When you're on wifi, now EVERY incoming call will be a free internet call. Further, if you are on wifi, just go to the Google Voice website from your phone (or PC) and select your GIZMO number as the number on which to call you. Like I said it's a little bit of a workaround, but not enough of a deterrent for me to not be doing it on all halfway-lengthy calls! Essentially, while I'm at home or work, where I'm making most calls anyway, they'll all be free. Excellent upgrade, if you ask me.
Guest (not verified)
Tue, 03/22/2011 - 01:57
In response to the original blog post
I'm from the Android SIP team, we implemented the SIP stack in Gingerbread. I'd just like to point out that of the 4 complaints you raised, 1 & 2 have been fixed in Gingerbread 2.3.3 release update. We have noted 3 & 4 and are considering it. #3 is not a part of the RFC 3261 spec, and so it wasn't originally implemented. #4 as far as we could tell is only proposed under 3725, and there's been no agreement on how to handle 3rd party call control. If there is and you can show it's been ratified as the industry standard, we'd be glad to add it to the support. @another commenter who complained Google blocks sip->pstn calling, this is not true. Gingerbread fully supports pstn termination, as long as your SIP provider supports it. Most SIP providers will charge a fee however, but as long as you pay the fee you should be able to call anyone you want. We've made lots of international calls during our testing and have found no problems.
Erick J Johnson
Tue, 05/10/2011 - 18:26
re: In response to the original blog post
Hi Guest, Glad you stopped by - thanks for reading the post and we're really excited to hear that you guys implemented the work for responding to 407 and configurable auth usernames - that's fantastic. Re: #3 we completely understand that if you guys don't claim to support rfc 3891 (replaces header) then you just don't support it - C'est la vi - however it would be pretty cool if you did ;) Re: #4 perhaps our music on hold implementation has lead to a misunderstanding. The fact that we're using the INVITE w/out SDP signaling mechanism for a MOH implementation is not the issue. The signaling mechanism itself is a legitimate offer/answer model explicitly defined in RFC 3261. The relevant section is quoted here:
And then later
And then even later
By all means feel free to contact us in the future - and thanks again for replying to the post.
---
Erick J
Junction Networks Engineer
Usman (not verified)
Fri, 05/20/2011 - 17:34
Sip Incoming has a problem on android
I dont know if many of the people have come accross this problem. I have configured a sipgate.co.uk account to my htc desire s. Outgoing seems to work fabulously well but my incoming dies after exact ten minutes. I have tried everything to my knowldege about sip and internet callings and login and authorization codes that i could use but ... the incoming dies after some time. This means my incoming pstn number goes offline and my sip is only active for outgoing and not for incoming. Hopefully, someone from android or htc can rescue the situation. thanks
Guest (not verified)
Tue, 05/24/2011 - 19:05
Android 2.3.3 Sip
Google has done a great work. Regardless to Sip configuration it would also recommended that we can change the Codec (PCMA,PCMU,Speex,GSM etc.)in the stack. For me, it's not working when my WiFi .-) connection is slowly around 64 Kb/s. Dear Guest, you are a Developer from Google. Can you explain how to config this in a file ore some other settings, to resolve my problem. thx
Guest with andr... (not verified)
Fri, 06/03/2011 - 23:08
Hi read your comment and
Hi read your comment and wanted to let you know if you have a root enabled device you can actually use the native sip integration over 3g and wifi, if you know about roms and rooted device you can problem change the sip stack your self or head over to xda developers forum and ask some how to change the sip stack to your liking.
marca56 (not verified)
Fri, 07/01/2011 - 20:10
codec and echo cancelation support
Hi, a few questions... 1. is there any echo cancelation support in the current 2.3.4 implementation? 2. will you support any wide-band codecs like G.722? Thanks. marc.
Guest (not verified)
Thu, 09/22/2011 - 21:26
Sprint blocks voip and
Sprint blocks voip and instead routes calls through their network therefore using minutes instead of data. Any way around that?
mike@junctionne...
Fri, 09/23/2011 - 11:42
Confirmation
Do you have any packet traces to prove it? This would be big news if it can be substantiated.
Add new comment