Thursday, March 25, 2010

Mobicents Based IM Service with outsourced Billing Using Ericsson Charging SDK

Abstract - Mobicents is a Java based platform that implements the JAIN SLEE standard that delivers a wide range of multimedia services for various application domains. It is an umbrella name for a set of enablers that includes presence, media services, sip servlets and diameter, besides a JAIN SLEE server which provides the application execution environment. The power of the platform comes from its focus on enablers that can then be utilised to develop complex services. This is enhanced by its emphasis on open standards such as those that are being standardised by bodies such as the IETF, 3GPP, ETSI TISPAN and ITU. In this example, the Mobicents SIP function will be used along with a diameter stack to implement a relatively simple billing system for billing SIP based instant messages. Mobicents will be used here as a diameter client which communicates with a diameter server in the form of the Ericsson diameter emulator.


Design

SIP Portion

JAIN SLEE is an event based architecture that allows for service development to be based on an hierarchical and priority based model that defines a root service building block (SBB) which is linked to one or more child nodes (child SBBs). When a root SBB registers for certain events, such as SIP events, the SLEE event router delivers those events, either those from external resources such as SIP softphone running on s user's computer, or those that are generated by itself, to that root SBB. The root SBB can then dispatch that event or a new event to one of its children for further processing. The hierarchical design of the SIP based portion of the service is illustrated below:
Figure 1. Service Design showing root node and children

Diameter Portion

The diameter support in Mobicents is composed of a Diameter stack, a mulitplexer and message validator. The stack is the most important aspect of the diameter infrastructure as the stack provides the mechanisms necessary for message sending and receiving, peer management and session management. The multiplexer allows multiple applications to share a single diameter instance. Lastly, the message validator validates the messages that are sent or received to ensure that they are formatted appropriately. The Mobicents Diameter environment is summarised in the figure below:

Figure 2. Mobicents Diameter environment. Source: [1]

Ericsson Diameter Emulator

The third piece of the puzzle consists of the Ericsson emulator which is a java based implemenation of the diameter protocol.  The emulator is designed to behave in a similar manner to Ericsson's PPS 3.6 system which is a prepaid commercial system developed by Ericsson. Any system which interacts with the emulator properly is guaranteed to work with the commercial version. Ericsson also released an SDK which exposes an API for programmers to use in order to develop Diameter clients or servers of their own quickly.

Outline of the system

With our root SBB and children it is possible to locate user's locations and use the SIP proxy to send messages to SIP endpoints. The Diameter function can be used to implement a Diameter client for sending Accounting requests and receiving accouting answers. The figure below gives an outline of the desired system:

Figure 3. Outline of the system showing main entities.

The system in action

Step 1: We register two SIP clients to the Mobicents SIP Registrar.

Step 2: Using one SIP client, we send a SIP instant message (MESSAGE) to the second SIP client, indicating the caller's URI

Step 3: The SIP MESSAGE is intercepted by the root SBB as configured. The root SBB extracts the callee's SIP URI from the FromHeader in the SIP message and sends a Diameter Accounting Request (ACR) to the Diameter server, inducating the user's MISDN and the service details which will be matched against a tarriff database on the Diameter server.

Step 4: The Diameter server receives the ACA and examines the request. If all is well, the server will respond with an Accounting Answer (ACA) with a 2001 response code (DIAMETER_SUCCESS) to the root SBB. Otherwise, the server may send an error message or a negative 4241 response code (INSUFFICIENT_BALANCE).

Step 5: At the root SBB, the Diameter response is examined. If the result is positive, the root SBB attaches the SIP proxy so that the message can be sent to the callee. If a negative response is received, a SIP message is routed back to the caller indicating the nature of the error.


Conclusion


Mobicents, as a heterogeneous services platform, allows developers to build services based on technology enablers that can be deployed independently or in concert with each other to provide complex services. The emphasis on open source and open standards allows for ease of use and interoperability with other implementations, which makes it easy to tie into existing solutions a customer may already have. The example described here is not complex, but shows what can be done when enablers are pooled together to build intersting services.

No comments: