|
NewStandbyTechnique
How Sipdroid maintains Registration
IntroductionWhen Sipdroid was first published the phone had to be woken up by cellular calls to see incoming SIP invites. The reason for this early approach was that the developer version of Cupcake left wireless LAN completely inactive during sleep mode. When Cupcake was finalized wireless LAN and 3G radio still ran while the screen was turned off. We did not change anything to above concept to avoid permanently sending keep alive packets over 3G which would have caused the radio to stay on most of the time thus totally draining the battery within about 15 hours. Although this scheme simplified software design users complained about complicated set-up and call answer. In Sipdroid release 1.0.2 a totally new scheme was introduced. The first developer who mentioned the idea for Sipdroid was John Kielkopf. Later we discovered that there were already several others (e.g. Nokia) who did research in this area before. Sipdroid developers zlabunk and wavehill09 laid more fundaments by adding vibrate and ringtone functionality. NAT traversalMost networks, no matter if LAN, wireless or mobile, today use NAT routers to provide enough addresses to their clients. The NAT proxy cannot keep connections open forever. Depending on protocol type typical timeout values are: (reproduced from here)
TCP timeouts are much longer. So for NAT traversal much less packets have to be sent over TCP compared to UDP. The new techniqueSipdroid now uses TCP for the signaling connection and keeps the corresponding port open. Sipdroid's "mothership" PBXes (we took this nice image from Arnon's blog) had also to be extended because - as most SIP services - it did not support TCP before. So if your service cannot handle SIP over TCP you can use PBXes to translate between the protocols. Most commonly UDP protocol is used to carry SIP signaling and voice packets. However, when SIP was introduced TCP had already been included as an option. Sipdroid now also contains the necessary code to ring and turn on the screen when a call comes in. Dynamic IPWireless LAN routers can change their public IPs without notice. Sipdroid now sends probe packets every minute over WLANs to detect such changes. ResultsStandby times have been measured under the following parameters:
3G offers superior standby performance. Wireless LAN is better when talking. This is supported by Android's default policy switching off Wireless LAN while sleeping. Sipdroid keeps WLAN active while in call. So Sipdroid could maintain its early standby times while extending functionality to a self-contained phone. Implications for the futureMore and more always-on services evolve. At the moment we know of VoIP (of course), the Google services (Mail, IM, Sync), and E-Mail. Although TCP based software does only transmit a few keepalive packets, every service lowers standby time by about 10%. So for the future we want to look for other data activity and piggyback keep alive transmission to them. |