Leverage Web 2.0 Technology with SIP on S60 Smartphones : Page 2
Not sure how to bring the Web 2.0 experience to smartphones? S60 smartphones now support SIP technology, which enables community-based services and convergence.
by Nitin Mittal
Feb 9, 2007
Page 2 of 3
Using SIP on S60 Figure 2 shows how S60 3rd Edition supports both Java (JSR 180) and C++ APIs for SIP development. The development processes for developing C++ and Java-based SIP applications are shown in Figure 3 and Figure 4, respectively. The SIP C++ development process differs slightly between early S60 2nd Edition devices and later 2nd Edition devices and also faces source and binary compatibility breaks on S60 3rd Edition devices.
Figure 2. SIP on S60: S60 3rd Edition supports both Java and C++ APIs.
A typical SIP implementation separates the user interface and engine, like most S60 native applications, but usually splits the engine further into two sub-enginesone for SIP-based negotiation and event handling, and the other for application-specific data communication. The SIP engine you build has to be tailored to your needs. For example, if you are developing a VOIP, multimedia sharing, or PoC application, you should implement the Offer Answer model as specified in RFC 3264, and use S60's transaction level SIP APIs. Development of a typical SIP application on S60 would require:
Basic SIP protocol knowledge
Complementing of pre-initialized SIP messages provided by the API with service-specific headers and content
Encoding and decoding of message bodies, for instance the SDP content body describes application identity, port, protocol, and media codec support.
Management of negotiated media channels, for instance, the establishment and teardown of specific UDP/TCP connections
Management of event subscriptions and instant messages, for example, creating and parsing SUBSCRIBE, NOTIFY, and MESSAGE messages.
S60 SIP Application Behavior
SIP applications on S60 can be triggered to start by an incoming SIP message. As all SIP messages are received on the same port on S60 device, the platform provides the framework for client resolution. C++ developers need to develop a client resolution plug-in, whereas Java developers use the Push Registry to register (statically or dynamically) the content type the application is willing to accept. The Accept-Contact header must be sent in the SIP request for client resolution in Java SIP applications, whereas, on for native SIP applications, it is recommended but not there are also few other options:
Message content type
Application identity, media type, and codec support for RTP (real-time transport protocol) described by SDP (session-description protocol)
SIP's SUBSCRIBE message's Event header
Both C++ and Java applications usually use SIP profiles, which provide the necessary settings to register with IMS or SIP networks, as well as define some SIP stack-related behavior. One SIP Profile can be used by different SIP applications or each application can have its own. The SIP Profile can only be provisioned over the air on S60 devices with Nokia VoIP 2.0 and has to be entered manually on others. The information in the profile usually consists of the following:
Service Profile, IETF or 3GPP (IMS) Mode: This does not really impact the developer as the APIs are mode agnostic. The SIP stack takes care of the mode specific authentication during the registration process, addition of 3GPP related headers and such. Developers are recommended to simply ‘enable’ the SIP profile through their C++ or Java code.
Access Point: This is used for SIP communication and the same could be used for the application data communication channel, usually established after the SIP INVITE handshake. The Access Point could be GPRS, 3G, or Wifi-based, depending on the support on the device.
SIP User Name: This is the SIP identity used by remote SIP applications to communicate with the application's associated with the profile.
Compression Mode: Set at On/Off, this is used to compress SIP messages.
Registration mode: Set at When needed/Always On. If set to Always On, then the profile registers upon phone boot up and the associated applications can be reached even when they are not running.
Security Mode: Set to On/Off. If security is on, then the registrar server must support Sec-Agree specified in RFC 3329.
Proxy Server and Registrar Server: These settings usually point to the same server and if unknown, could be set to 0.0.0.0, so that the SIP stack can do a DHCP based look up.