Homepage
 
Search
ERICSSON GLOBAL
Charging enabled on OS level 
*
 
Membership
Membership
Get knowledge, support and experience in our free developer program.
Log in
User name
Password

Tuesday, January 4, 2005

Many real-time applications that require charging functionality run directly on the operating system (OS) in C or C++ languages (especially for Unix). For example, an IP-telephony-gateway application in Unix C needs to charge subscribers for the service units used. The problem in enabling charging in such applications is that the Charging Diameter API is only for Java and runs on a JVM instead of directly on a Unix OS.

JNI is the technology for bridging Java and native C/C++. Most of the technical literature available on the web talks about using JNI to bridge from Java to C/C++, but there is very little information on using JNI to bridge from C/C++ to Java. Almost all the mobile-internet-service-enabler APIs that exist today are in Java. It is therefore important to show a solution for using the service-enabler APIs for mobile internet with C/C++. This is a typical case for server-side mobile-internet applications.
This complementary development kit (CDK) provides a reference implementation for developing real-time charging-based applications on the Unix environment, using Ericsson's Diameter Charging SDK, written in Java. We have chosen the ANSI C language for the purpose of this demonstration. Cygwin software has been used to emulate the Unix environment over the Windows platform and Java Native Interface has been used for interfacing C language with the Charging Diameter API running on Java virtual machine.

The CDK includes the architectural overview of JNI technology, a demo application for a charging use case (Direct Debit based on Events), the source code for the application, installation instructions, getting started, step-by-step description of JNI code, documentation of important JNI APIs, JNI differences for C and C++, and conclusions about JNI. The demo application written in C language provides the same features as DirectDebitExample1.java that comes in the Charging SDK (examples folder).  Together, this bundle is called "Charging In Unix C" CDK.
As this solution is seldom found on the web, this CDK is an important integration demonstration, which can be applied to save the existing investments made in developing the native applications in other languages. In this CDK, we use the Charging Diameter use-case API through JNI, but the knowledge from this CDK can be very useful for interfacing other mobile-internet service-enabler APIs with native applications. This kit is primarily intended for programmers and other related communities who have a reasonable level of experience in C language, and want to use Ericsson's Charging SDK to build charging-based applications in C language. If you are not familiar with Charging, PPS, or Diameter, refer to the Charging section on the Ericsson Mobility World portal.

In order to execute the charging application provided with the CDK, you need:

  • Microsoft Windows 2000 Server or Professional 
  • Java Development Kit 1.4 or later.

By Rehman Adil, Research Engineer

January 4, 2005
Size: 175 kB

Last published February 17, 2007
News and articles
October 13, 2008
October 13, 2008
Marc's column
Looking at trends in multimedia apps market.
Tools and documentation