Our evaluation of Android Gingerbread's native SIP with the Nexus S - PART 2
Early this year, we wrote a blog post entitled Our evaluation of Android Gingerbread's native SIP calling with the Nexus S. We ran Android's native SIP client through a series of tests and discovered several interoperability issues with OnSIP. Here are the issues we ran into back in January:
- The auth user name is not configurable, which is required for registration. [RFC 3261 Section 22.1]
- Proxy authentication is not supported, whih is required for calls to the PSTN. [RFC 3261 Section 22.3]
- SIP Replaces header is not supported, which is required for attended transfers. [RFC 3891]
- INVITES without SDP are not supported, which is required for music on hold. [RFC 3261 Section 13.3.1.3]
We're happy to report that we got a response from a member of the Android SIP team:

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.
We redid our tests and had no issues easily configuring an OnSIP account (#1. The auth user name is not configurable, which is required for registration.). We were also able to dial PSTN numbers (#2. Proxy authentication is not supported, which is required for calls to the PSTN.). I will note that there still doesn't seem to be support for calling SIP addresses without first associating them with your contacts. The native SIP client also only works over Wifi (but you can root your Android and download a custom app as a workaround - not for everyone), and there is no transfer functionality. You can add calls when you're already on the line with someone and start a conference, but transfer isn't supported.
It's understandable that the SIP replaces header is not supported (#3. SIP Replaces header is not supported, which is required for attended transfers), but it would be very cool if they added this.
We do, however, insist that rejecting re-invites when the INVITE does not contain the Session Description Protocol, or SDP, is still an issue that needs to be addressed (#4. INVITES without SDP are not supported, which is required for music on hold).
From Erick J, one of our engineers:
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:
13.2.1 Creating the Initial INVITE
... In this specification, offers and answers can only appear in INVITE requests and responses, and ACK. The usage of offers and answers is further restricted. For the initial INVITE transaction, the rules are:
o The initial offer MUST be in either an INVITE or, if not there, in the first reliable non-failure message from the UAS back to the UAC. In this specification, that is the final 2xx response.
o If the initial offer is in an INVITE, the answer MUST be in a reliable non-failure message from UAS back to UAC which is correlated to that INVITE. For this specification, that is only the final 2xx response to that INVITE. That same exact answer MAY also be placed in any provisional responses sent prior to the answer. The UAC MUST treat the first session description it receives as the answer, and MUST ignore any session descriptions in subsequent responses to the initial INVITE.
o If the initial offer is in the first reliable non-failure message from the UAS back to UAC, the answer MUST be in the acknowledgement for that message (in this specification, ACK for a 2xx response).
And then later
13.3.1 Processing of the INVITE ...
If the INVITE does not contain a session description, the UAS is being asked to participate in a session, and the UAC has asked that the UAS provide the offer of the session. It MUST provide the offer in its first non-failure reliable message back to the UAC. In this specification, that is a 2xx response to the INVITE.
And then even later
14.1 UAC Behavior
The same offer-answer model that applies to session descriptions in INVITEs (Section 13.2.1) applies to re-INVITEs.
...
Of course, a UAC MAY send a re-INVITE with no session description, in which case the first reliable non-failure response to the re-INVITE will contain the offer (in this specification, that is a 2xx response).
We're thrilled that the Android SIP team has been working on improving their built in SIP client in Gingerbread. It's gotten to the point where you don't even need to download a SIP client to make and receive Internet calls, and that's very exciting. Thanks for taking some feedback from the little guys, and keep up the good work.
What does this mean for you?
If you're running Gingerbread 2.3.3 or later, you have a built-in SIP client in your phone, which makes VoIP that much more accessible. Think of it as another phone within your phone that doesn't use your cellular minutes, and isn't limited by international borders. If VoIP and SIP are completely foreign to you, you can get started immediately by creating an OnSIP account for your business or creating a personal 'Get on SIP' account for yourself.


Comments
Aaron Clauson (not verified)
Wed, 05/11/2011 - 18:35
Music On Hold
While you are right about that INVITEs without SDP conform with RFC3261 why would you use such a obscure mechanism for music on hold? It's just asking for trouble. In the same vein your use of auth user names is a hassle for end users and has a negligible impact as far as security goes.
Erick J Johnson
Thu, 05/12/2011 - 01:02
re: Music on Hold
Hi Aaron, Before I explain the decisions surrounding our music on hold server and auth usernames, let me reiterate that the implementation aspects of our service are not the relevant point we are focusing on in our review of the gingerbread SIP stack. We understand very well that there is more than one way to implement a service. We very well understand that sending
407 Proxy Authentication Requiredresponses on calls to toll services is NOT the only way to access the PSTN. Likewise for music on hold, we have never said that our way is the only way. What we are saying is that we have implemented our services on top of valid SIP signaling constructs and we expect these signaling patterns to work. The point is aimed at the matter that the core SIP RFC clearly defines the signaling mechanisms of the protocol; correct and consistent support of these mechanisms is at the heart of any robust implementation. It is in our best interest as a SIP service provider and in our customers' best interests to have all the major SIP stack implementations conforming to the spec as best as possible. This is what ensures that an internet service remains interoperable between clients and servers and leaves consumers with the widest freedom of choice when it comes to end user devices. It's also the only way that open protocol services can succeed. Imagine if all end users needed to understand why feature `W` on user agent `X` doesn't work with service `Y` every time they call user `Z`... that would be a terrible state of affairs and everyone would just go sign up for Skypeosoft* accounts. Unfortunately, however, that is nearly a reality in the current SIP world. SIP is a difficult protocol to implement and all stacks need to be vetted. We are trying our best to report the bugs we find to remove these corner case caveats. We try to go even further than just reporting. When relevant, we submit patches to projects like OpenSIPs, Freeswitch, Asterisk, SIPCommunicator, SIP Droid... and many other SIP and non SIP related projects in order to advance the state of the open standard communication world. Also, please don't misunderstand me here - I am positive that we have bugs both known and unknown in our SIP services. When users and non-users alike inform us of the bugs in the implementations of RFCs that we claim to support... we don't simply ask "well what's the use case for this feature?". We ask, "is this valid according to the spec?". If it's valid, and we're doing it wrong - then we try to do it right. We expect the same of others. I'm going to continue beating a dead horse to make sure my meaning is clear... let's create a simple related scenario, I'm just going to borrow this obscure but useful scenario from HTTP for discussion purposes.. We rely on major web servers implementing HTTP completely and uniformly. Imagine if Apache decided it was unnecessary to implement support for the obscure header/value pairExpects: 100 Continue. If that were the case then browsers would not be able to perform the valid request laid out in the scenario. However - there would be no indication ahead of time to the browser to NOT make the request in such a manner... that browser/server pair would be at a stand still - and it would more than likely leave users confused and frustrated with the browser vendor. Now, who has the bug to patch here? The server that does not implement a required portion of the spec or the browser that utilizes a valid but less used signaling mechanism? Obviously the server maintainers should have the work to do in this case because they are violating the specification that they claim to support. As with all other devices that we come across, we ran the Android phone through a simple set of call scenarios to analyze the traces. We found a portion of the RFC that it claims to support that didn't work. Period. Ok back to your question... music on hold implementation and auth usernames... maybe I'll just write these up in a blog post sometime soon.---
Erick J
Junction Networks Engineer
* Thanks to Leo for that name
Guest (not verified)
Tue, 06/14/2011 - 22:23
Hi Erick, I am from the
Hi Erick, I am from the Android SIP team (the same person who responded to your post last time). We're working on the next iteration of SIP stack for our next release and I have some questions for you. Could you private message me please? Thanks,
Erick J Johnson
Thu, 06/16/2011 - 11:03
Hi
I replied to you via the email address associated with this post. You may also feel free to contact me at erick <at> junctionnetworks.com. Cheers,
---
Erick J
Junction Networks Engineer
Erick J Johnson
Tue, 05/17/2011 - 00:06
Maybe I'll write these up...
See http://www.onsip.com/blog/erick/2011/05/17/music-on-hold-and-the-sip-off...
---
Erick J
Junction Networks Engineer
druce (not verified)
Thu, 05/12/2011 - 17:08
works
have been using Nexus S with Androd 2.3.4 for about a week making and receiving calls to the PSTN, haven't noticed any issues. upgrade link and instructions below http://www.bgr.com/2011/04/29/android-2-3-4-available-to-nexus-s-owners-... http://androidadvices.com/nexus-s-steps-install-android-gingerbread-os/
Greg W. (not verified)
Fri, 06/03/2011 - 19:35
sip uri
I can confirm that with Android 2.3.3 you can call via sip uri. Make a new contact (or edit existing), and select "Add more information" and select "Other" and select "Internet Call" Yes, they hide it well. Type in the sip uri and save the contact. Now just call that contact and it will dial the sip uri.
Guest (not verified)
Fri, 09/16/2011 - 11:03
2.3.4 registration lost
HI, I tested with 2.3.4 Dialer Sip Client with sipgate.com and freephoneline.ca. It seems NAT is working fine with outgoing/incoming both ok. However, after a while, registration to sipgate.com lost and later, registration to freephoneline.ca lost as well. this can be seen on those Web portal. I tried both "keepalive" (Auto or Always on) and doesn't work still. While, Csipsimple doesn't have this problem at all. The registration timer is 900s and 1800s accordingly. Hope Google can address this issue soon. tks peng
Schreiber (not verified)
Tue, 09/27/2011 - 08:22
SIP Clients in all Gingerbread 2.3.3 ?
Does this mean that all mobiles which have 2.3.3 do have a sip client? Just now tried the Huawei Ideos X3 which has 2.3.3 and do nor find any sip client.
Add new comment