Leverage Web 2.0 Technology with SIP on S60 Smartphones

Leverage Web 2.0 Technology with SIP on S60 Smartphones

hinking about developing multiplayer interactive games, multimedia messengers, content-sharing applications, audio/video conferencing applications, or maybe the next cool Web 2.0 application on a smartphone? You might want to consider developing for Nokia’s S60 smartphones and take advantage of the platform’s extensible features and SIP support.

The S60 platform is now in its third edition, bringing SIP support in both IETF and 3GPP modes. IETF SIP support was available on some S60 second edition devices.

SIP Defined
Session Initiation Protocol (SIP) is essentially a text-based request response protocol similar to HTTP used for creating, modifying, and terminating peer-to-peer (P2P) sessions. It is specified in RFC 3261 and has been extended by 3GPP to support the requirements of cellular networks. In a cellular environment?2G, 2.5G, 3G, 3.5G?it is used to communicate with the operators’ IMS (IP Multimedia Subsystem) networks and in a Wi-fi environment it could be used to connect to SIP-based application servers on the Internet. The basic SIP server-side elements allow different kinds of SIP-enabled devices to establish direct connections with each other, bringing about convergence and opening new opportunities for S60 developers.

Figure 1. Overview: The Simplied IMS/SIP Network.

P2P connections cannot be established in most cellular networks without IMS and usually require the development of proprietary session handling protocols and servers. With support for SIP on S60 and IMS in operator networks, it is now possible to have applications communicate in a P2P fashion– even when roaming from one operator network to another. SIP helps reduce the time-to-market of multi-user applications and greatly improves the user experience for such applications.

Figure 1 shows a simplified IMS/SIP network that S60 smartphones use in order to establish a SIP session in a GSM or Wi-fi environment. A registered SIP application is “reachable” by other SIP applications on the network. Its first contact point into the SIP/IMS network is the SIP proxy server or equivalent through which all SIP requests pass. The Registrar server provides the service to store the mapping between the SIP username and the IP address of the device with which it registers. The SIP Proxy and Registrar servers are configured on an S60 device in an SIP profile.

The kinds of services an IMS network could provide are varied: presence, group management, push-to-talk-over cellular (PoC), gaming services?but these specific services depend on applications servers’ integration to the IMS network. However, it is possible for third parties to develop their own services by using standard SIP Servlet APIs or third-party SIP application server environments like Ubiquity.

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-engines?one 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
  • Accept-Contact 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.
  • S60 SIP Application Development Process
    Figure 3 shows the development steps for a S60 C++ SIP application.

    • Carbide.c++ comes in different versions and usually the third party developers need the professional version to be able to make use of the tool for rapid UI development and for on-device debugging. S60 SDKs plugin to the Eclipse-based Carbide.c++ IDE. The SDK provides the emulator where the SIP Profile needs to be setup.
    • Implementing a SIP application in C++ is just like implementing other native C++ applications on S60. It requires SIP-related headers and libraries as well as the implementation of an Client Resolver Ecom plugin to enable SIP stack to forward an incoming SIP essage to the right SIP application. There is a DTD in the SDK that describes the critieria that can be used for resolution.
    • The last two steps are common for any native S60 application, except it is important to note that the SIP API on S60 3rd Edition requires capabilities which can only be granted via Symbian Signing and not simply through self signed certificates. The S60 3rd edition’s security framework requires that you make use of these capabilities.

    In order to test a SIP application against the SIP server emulator, you will have to install the environment on 2 PCs. This is because it is currently only possible for one S60 emulator and one SIP server emulator to communicate with each other on a PC. You need to change the default port (5060) that the SIP server emulator uses because the current S60 emulator also uses port 5060 for SIP communication. You can also use a real SIP server on your network?as long as you configure the emulator’s SIP profile for it.


    Figure 3. The S60 SIP Development Process: The image shows the S60 SIP development process in C++.
     
    Figure 4. The S60 SIP Development Process: The image shows the S60 SIP development process in Java.

    Figure 4 shows the SIP development process using Java on S60.

    • Carbide.j is a plugin to the Eclipse IDE that is used to package and sign a MIDlet as well as manage the various MIDP SDKs. S60 3rd Edition MIDP SDK uses the same S60 and SIP emulators as earlier but integrates into Eclipse and Carbide.j.
    • The Java-based SIP application is developed like other MIDP applications and usually makes use of the Push Registry so that the MIDlet can be started by an incoming SIP message with a unique Accept-Contact header.
    • The last two steps are common to any kind of MIDlet development.

    You can use the S60 emulator and SIP server emulator to test Java SIP applications in a similar way as described earlier. MIDP Java applications are not affected by the S60 3rd Edition’s security framework.

    When Should You Use SIP on S60?
    Currently, third parties should concentrate on using SIP APIs for applications that simply need to establish peer-to-peer sessions, but not implement complicated multimedia sessions. IETF SIP signaling could be enough for most non-multimedia applications, even in an IMS environment. Extended SIP features like those for messaging, event publishing, subscription, and notification are supported and could be used to provide features like game lobbies in multiplayer games?which operators usually request. The SIP extension methods MESSAGE, PUBLISH, SUBSCRIBE, NOTIFY, REFER, and PRACK are all supported on S60 3rd Edition.

    Should You Use the Java or C++ SIP API?
    To answer this question, it’s helpful to analyze the non-SIP related requirements of your application. The C++ API provides more flexibility with client resolution as well as supporting an API to encode and decode SDP?whereas the Java API does not. Java SIP API is good for multiplayer Java games, which have been limited to SMS for peer-to-peer interactions and have required proprietary game servers for real-time gaming. However, the S60 C++ API side provides deeper access to S60’s multimedia features through full-duplex access, direct screen access and better interaction with S60 platform core applications available on all S60 devices.

    Before you start developing your SIP applications, do give some thought to the possible charging models, as these can affect the SIP messaging you will use. Charging in an IMS environment can be:

    • Time-based: Charges are based on the length of time a user consumes various types of media during a multimedia session.
    • Transaction-based: Charges per SIP MESSAGE request
    • Payload based: Charges are based on the content type and size of a SIP message.
    • Subscription-based: Charge is a monthly fee for a presence and gaming service.
    Figure 5. The MBit Network: An S60 SIP-based Web 2.0 application.

    A Web 2.0 Experience
    Figure 5 shows screenshots of an S60 SIP-based Web 2.0 application developed by a Forum Nokia PRO member company, N2N Consulting, using the S60 C++ SIP features.

    The application, called MBit Network, is a peer-to-peer network for S60 smartphones that allows sharing, searching and downloading mobile content, as well as chatting with buddies who share the content on their S60 smartphones.

    The SIP protocol for allows these types of applications to manage the sessions associated with each of the features mentioned above. Groups allow the users to share and search within a group of SIP users. Features such as group management and presence should ideally be provided by SIP-based application servers in the operator’s IMS environment, but they could be developed by third parties as well, if they require servers anyway for managing other tasks.

devx-admin

devx-admin

Share the Post:
Bold Evolution

Intel’s Bold Comeback

Intel, a leading figure in the semiconductor industry, has underperformed in the stock market over the past five years, with shares dropping by 4% as

Semiconductor market

Semiconductor Slump: Rebound on the Horizon

In recent years, the semiconductor sector has faced a slump due to decreasing PC and smartphone sales, especially in 2022 and 2023. Nonetheless, as 2024

Learn Web Security

An Easy Way to Learn Web Security

The Web Security Academy has recently introduced new educational courses designed to offer a comprehensible and straightforward journey through the intricate realm of web security.

Military Drones Revolution

Military Drones: New Mobile Command Centers

The Air Force Special Operations Command (AFSOC) is currently working on a pioneering project that aims to transform MQ-9 Reaper drones into mobile command centers

Tech Partnership

US and Vietnam: The Next Tech Leaders?

The US and Vietnam have entered into a series of multi-billion-dollar business deals, marking a significant leap forward in their cooperation in vital sectors like

Bold Evolution

Intel’s Bold Comeback

Intel, a leading figure in the semiconductor industry, has underperformed in the stock market over the past five years, with shares dropping by 4% as opposed to the 176% return

Semiconductor market

Semiconductor Slump: Rebound on the Horizon

In recent years, the semiconductor sector has faced a slump due to decreasing PC and smartphone sales, especially in 2022 and 2023. Nonetheless, as 2024 approaches, the industry seems to

Elevated Content Deals

Elevate Your Content Creation with Amazing Deals

The latest Tech Deals cater to creators of different levels and budgets, featuring a variety of computer accessories and tools designed specifically for content creation. Enhance your technological setup with

Learn Web Security

An Easy Way to Learn Web Security

The Web Security Academy has recently introduced new educational courses designed to offer a comprehensible and straightforward journey through the intricate realm of web security. These carefully designed learning courses

Military Drones Revolution

Military Drones: New Mobile Command Centers

The Air Force Special Operations Command (AFSOC) is currently working on a pioneering project that aims to transform MQ-9 Reaper drones into mobile command centers to better manage smaller unmanned

Tech Partnership

US and Vietnam: The Next Tech Leaders?

The US and Vietnam have entered into a series of multi-billion-dollar business deals, marking a significant leap forward in their cooperation in vital sectors like artificial intelligence (AI), semiconductors, and

Huge Savings

Score Massive Savings on Portable Gaming

This week in tech bargains, a well-known firm has considerably reduced the price of its portable gaming device, cutting costs by as much as 20 percent, which matches the lowest

Cloudfare Protection

Unbreakable: Cloudflare One Data Protection Suite

Recently, Cloudflare introduced its One Data Protection Suite, an extensive collection of sophisticated security tools designed to protect data in various environments, including web, private, and SaaS applications. The suite

Drone Revolution

Cool Drone Tech Unveiled at London Event

At the DSEI defense event in London, Israeli defense firms exhibited cutting-edge drone technology featuring vertical-takeoff-and-landing (VTOL) abilities while launching two innovative systems that have already been acquired by clients.

2D Semiconductor Revolution

Disrupting Electronics with 2D Semiconductors

The rapid development in electronic devices has created an increasing demand for advanced semiconductors. While silicon has traditionally been the go-to material for such applications, it suffers from certain limitations.

Cisco Growth

Cisco Cuts Jobs To Optimize Growth

Tech giant Cisco Systems Inc. recently unveiled plans to reduce its workforce in two Californian cities, with the goal of optimizing the company’s cost structure. The company has decided to

FAA Authorization

FAA Approves Drone Deliveries

In a significant development for the US drone industry, drone delivery company Zipline has gained Federal Aviation Administration (FAA) authorization, permitting them to operate drones beyond the visual line of

Mortgage Rate Challenges

Prop-Tech Firms Face Mortgage Rate Challenges

The surge in mortgage rates and a subsequent decrease in home buying have presented challenges for prop-tech firms like Divvy Homes, a rent-to-own start-up company. With a previous valuation of

Lighthouse Updates

Microsoft 365 Lighthouse: Powerful Updates

Microsoft has introduced a new update to Microsoft 365 Lighthouse, which includes support for alerts and notifications. This update is designed to give Managed Service Providers (MSPs) increased control and

Website Lock

Mysterious Website Blockage Sparks Concern

Recently, visitors of a well-known resource website encountered a message blocking their access, resulting in disappointment and frustration among its users. While the reason for this limitation remains uncertain, specialists

AI Tool

Unleashing AI Power with Microsoft 365 Copilot

Microsoft has recently unveiled the initial list of Australian clients who will benefit from Microsoft 365 (M365) Copilot through the exclusive invitation-only global Early Access Program. Prominent organizations participating in

Microsoft Egnyte Collaboration

Microsoft and Egnyte Collaboration

Microsoft has revealed a collaboration with Egnyte, a prominent platform for content cooperation and governance, with the goal of improving real-time collaboration features within Microsoft 365 and Microsoft Teams. This

Best Laptops

Top Programming Laptops of 2023

In 2023, many developers prioritize finding the best laptop for programming, whether at home, in the workplace, or on the go. A high-performing, portable, and user-friendly laptop could significantly influence

Renaissance Gaming Magic

AI Unleashes A Gaming Renaissance

In recent times, artificial intelligence has achieved remarkable progress, with resources like ChatGPT becoming more sophisticated and readily available. Pietro Schirano, the design lead at Brex, has explored the capabilities

New Apple Watch

The New Apple Watch Ultra 2 is Awesome

Apple is making waves in the smartwatch market with the introduction of the highly anticipated Apple Watch Ultra 2. This revolutionary device promises exceptional performance, robust design, and a myriad

Truth Unveiling

Unveiling Truths in Bowen’s SMR Controversy

Tony Wood from the Grattan Institute has voiced his concerns over Climate and Energy Minister Chris Bowen’s critique of the Coalition’s support for small modular nuclear reactors (SMRs). Wood points

Avoiding Crisis

Racing to Defy Looming Financial Crisis

Chinese property developer Country Garden is facing a liquidity challenge as it approaches a deadline to pay $15 million in interest associated with an offshore bond. With a 30-day grace

Open-Source Development

Open-Source Software Development is King

The increasingly digital world has led to the emergence of open-source software as a critical factor in modern software development, with more than 70% of the infrastructure, products, and services

Home Savings

Sensational Savings on Smart Home Security

For a limited time only, Amazon is offering massive discounts on a variety of intelligent home devices, including products from its Ring security range. Running until October 2 or while

Apple Unleashed

A Deep Dive into the iPhone 15 Pro Max

Apple recently unveiled its groundbreaking iPhone 15 Pro and iPhone 15 Pro Max models, featuring a revolutionary design, extraordinary display technology, and unrivaled performance. These new models are the first