Académique Documents
Professionnel Documents
Culture Documents
CBOSS Oy
2015
CBOSS rtBilling. Real-Time Billing System. Hot Billing API Programmer's Reference Guide Release 21.00.00
Copyright ©2005- 2015 CBOSS Oy. All rights reserved
This document contains information relevant as of the documents creation date. CBOSS Oy does not warrant that this document has
no misprints or omissions. CBOSS Oy reserves the right to modify the document without prior notification.
No part of this document may be reproduced or transferred in any form or by any means without prior permission in writing from
CBOSS Oy. rtBilling is a registered trademark of CBOSS Oy. CBOSSbcc is a registered trademark of CJSC CBOSS. These
trademarks are the intellectual property of CBOSS Oy and CJSC CBOSS and are protected by applicable legislation.
All other products or company names are used for reference only and may be proprietary to their respective holders.
Confidential
Table of contents
Introduction...........................................................................................................6
1. Overview of Hot Billing API...............................................................................8
2. Event descriptions.............................................................................................9
2.1 SMS-MO events.....................................................................................9
2.1.1 Required fields................................................................................9
2.1.2 Optional fields.................................................................................9
2.2 SMS-MT events....................................................................................10
2.2.1 Required fields..............................................................................10
2.2.2 Optional fields...............................................................................11
2.3 Time-based data events.......................................................................12
2.3.1 Required fields..............................................................................12
2.3.2 Optional fields...............................................................................12
2.4 Volume-based data events..................................................................13
2.4.1 Required fields..............................................................................13
2.4.2 Optional fields...............................................................................14
2.5 Application events................................................................................14
2.5.1 Required fields..............................................................................14
2.5.2 Optional fields...............................................................................15
2.6 Voice-MO events..................................................................................16
2.6.1 Required fields..............................................................................16
2.6.2 Optional fields...............................................................................16
2.7 Voice-MT events..................................................................................17
2.7.1 Required fields..............................................................................17
2.7.2 Optional fields...............................................................................18
3. Interface description........................................................................................20
3.1 Data structures.....................................................................................20
3.1.1 File header structure xdr_header_type.........................................20
3.1.2 Hot Billing data structure xdr_info_type........................................20
3.2 Function calls and usage.....................................................................25
Confidential
4
3.2.1 XDR_open_file()...........................................................................25
3.2.2 XDR_write_file()............................................................................25
3.2.3 XDR_close_file()...........................................................................25
3.2.4 XDR_cv_to_timeval()....................................................................25
3.2.5 XDR_convert_string_timeval()......................................................26
Appendix A: Examples........................................................................................27
Revisions.............................................................................................................30
Confidential
Send us your comments
CBOSS rtBilling 21.00.00. Real-Time Billing System. Hot Billing API.
Programmer's Reference Guide. Revision 1.0
We welcome your comments and suggestions on the quality and usefulness of this publication.
Your feedback is an important part of the information used for revision.
If you find any errors or have any suggestions for improvement, please let us know. Please
specify the document in question, chapter, section and page number. You can contact us by
using either of the following methods:
▪ In case of an error: send a trouble ticket to technical support
▪ In case of improvements: send an e-mail to Publications@cboss.fi
Confidential
Introduction
Purpose
The purpose of this document is to define the usage of rtBilling Hot Billing API.
Intended audience
This guide is intended for customer and third party developers.
What is new?
In rtB20.00.00, the following changes have taken place:
LTE Rel 10 enhancements to 3GPP Diameter:
▪ rat_type and tai_location added to 3.1.2 Hot Billing data structure xdr_info_type
▪ a_switch_id_type: id types list updated
Structure
Introduction highlights the audience for which this document is intended, an abbreviations list
and the notation conventions used in creating this guide.
Chapter 1, Overview of Hot Billing API gives a brief introduction to Hot Billing API.
Chapter 2, Event description describes Hot Billing API events.
Chapter 3, Interface description describes the data structures and function calls.
Acronyms
Acronym Description
API Application Programming Interface
APN Access Point Name
FRS Feature Requirements Specification
GMT Greenwich Mean Time
GSM Global System for Mobile communications
HPLMN Home Public Land Mobile Network
IN Intelligent Network
MG Management Gateway
MSISDN Mobile Station ISDN Number
SCP Service Control Point
SDR Service Detail Record
SP Service Provider
SPE Subscriber Provisioning Environment
Confidential
7 Introduction
Acronym Description
SPid Service Provider ID
SQL Structured Query Language
TP Transaction Processor
UTC Coordinated Universal Time
Notation conventions
The following summarises the notation conventions for syntax presentation in this guide.
General styles in use:
Notation conventions for on-screen computer output, user input, code excerpts and so on:
Punctuation
Parentheses, commas, semicolons, and other symbols must be entered as they appear in the
guide.
Confidential
1. Overview of Hot Billing API
Hot Billing API consists of I/O interface library and accompanied structure definitions. This
library provides a simple file-based interface for hot billing event production.
Prerequisites
Hot Billing API requires that Informix C-ISAM 7 has been installed in the development
environment.
Confidential
2. Event descriptions
This chapter describes the required and optional field values of each event.
Confidential
10 Event descriptions
Confidential
11 Event descriptions
Confidential
12 Event descriptions
Confidential
13 Event descriptions
Confidential
14 Event descriptions
nw_bearer_id_value char[20] Bearer Capability or Bearer Service Code value used in the
network
bearer_capability char[5] Default = 0. Used if feature BEARERCAPABILITY is off. If
BEARERCAPABILITY is on, then use either
bearer_capability or
nw_bearer_id_type and nw_bearer_id_value
Confidential
15 Event descriptions
Confidential
16 Event descriptions
Confidential
17 Event descriptions
▪ 1 Cell ID
▪ 2 GT address
▪ 3 MSCID
cell_id char [32] Cell identifier
destination_address_type char[5] Destination address type
▪ 0 Any address
▪ 2 APN
See section 3.1.2 for more values
roaming_indicator char[5] ▪ 0 not roaming
▪ 1 roaming
Default = 0. If not given, the HPLMN value from the switch
location table is used to determine roaming
time_offset long Default = time offset of MG local time from UTC
start_time timeval Default = current time
end_time timeval Default = start time + duration
original_file_id char[80] If you want to have the file name in the CDRs, you must enter
it here
answer_time timeval The time when the call was answered. Does not affect rating
if duration is given
nw_bearer_id_type char[5] Defines the type of the bearer identification. The values are:
▪ 0 = Network Bearer ID is a textual ID, e.g. data9600
(default)
▪ 1 = Network Bearer ID is Bearer Capability
▪ 2 = Network Bearer ID is Bearer Service Code
nw_bearer_id_value char[20] Bearer Capability or Bearer Service Code value used in the
network
bearer_capability char[5] Default = 0. Used if feature BEARERCAPABILITY is off. If
BEARERCAPABILITY is on, then use either
bearer_capability or
nw_bearer_id_type and nw_bearer_id_value.
Confidential
18 Event descriptions
Confidential
19 Event descriptions
Confidential
3. Interface description
Confidential
21 Interface description
Confidential
22 Interface description
Confidential
23 Interface description
Confidential
24 Interface description
Confidential
25 Interface description
3.2.1 XDR_open_file()
This function is used to open the output file and initialize header and default values.
3.2.2 XDR_write_file()
This function writes single hot billing event to file opened with XDR_open_file() function. It
should be called as many times as set in header record_count
3.2.3 XDR_close_file()
After all records have been written, use XDR_close_file() to close file and free internal
buffers.
3.2.4 XDR_cv_to_timeval()
This function converts given time values to timeval structure used in hot billing record.
Confidential
26 Interface description
3.2.5 XDR_convert_string_timeval()
This function converts given time string to timeval structure used in hot billing record.
Confidential
Appendix A: Examples
Makefile
#
PROG = postp
SRCS = postp.c
OBJS = $(SRCS:.c=.o)
LDFLAGS = -L../lib
all : $(PROG)
$(PROG) : $(OBJS)
postp.o : Makefile
clean:
postp.c
/*
Confidential
28 Appendix A: Examples
*/
#include <stdio.h>
#include <string.h>
#include "xdr_info_type.h"
#include "xdr_file_api.h"
int
xdr_info_type xdr,
defvalues = { XDR_INFO_VERSION };
xdr_header_type header = {
XDR_HEADER_VERSION,
"XDR",
};
short status;
long index = 0;
xdr.version = XDR_INFO_VERSION;
xdr.record_number = index++;
Confidential
29 Appendix A: Examples
if (XDR_write_file(&xdr, &status) != 0) {
/* error on data */
break;
if (index > 1)
break;
XDR_close_file(&status);
return 0;
Confidential
Revisions
Revision 1.0
Dated 08.01.15
Confidential