918
hp OpenCall SS7 pl atform Application Developer’s Guide For Release 3.1 on Linux  Second Edition Manufacturing Part Number: 5971- 3502 E0103

Hp Ocmp Ss7 API Dev Guide

Embed Size (px)

Citation preview

 Second Edition
E0103
ii
Notice
The information contained in this document is subject to change without notice.
Hewlett-Packard makes no warranty of any kind with regard to this material,
including, but not limited to, the implied warranties of merchantability and fitness
for a particular purpose. Hewlett-Packard shall not be liable for any errors contained
herein, or for incidental or consequential damages in connection with the furnishing,
 performance or use of this material.
© 2003 Copyright Hewlett Packard Development Company, L.P.
Reproduction, adaptation or translation without prior written permission is
 prohibited, except as allowed under the copyright laws.
Printing History
Hewlett-Packard Company
Development Software. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Loopback Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Categories of API. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Stack and Management APIs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
HP OpenCall SS7 Stack APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
MTP3/M3UA API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
SCCP API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
TCAP API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
ISUP API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
TUP API. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Application Guardian. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Virtual Point Codes (VPC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Virtual Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
OAM API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
SCCP API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
SIGTRAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
2. General System Guidelines
Optimizing OS Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Contents
iv
Using LANs with GDI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Compiling and Linking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
3. General API Guidelines
Designing for Threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Scheduling SS7 Connections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Receiving Signaling Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Sending Signaling Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Rescheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
TCAP API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
SCCP API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Examining Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Contents
v
MTP Level 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
MTP Level 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
MTP Level 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Stream Control Transport Protocol (SCTP) Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Features of MTP3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Creating MTP3 Stack Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Scheduling MTP3 Stack Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
MTP3 Primitives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Sending MSUs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Using the MTP3 API Shared Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Creating MTP3 Stack Connections with SS7_xifcreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Scheduling MTP3 Stack Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
SS7_ifselectmask(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
select() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
SS7_ifcnxhandler() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Closing MTP3 Stack Connections with SS7_ifclose() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Tuning MTP3 IPC Buffers with SS7_ifctrl() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
MTP3 API Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
SCCP Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Connectionless Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Segmentation/Reassembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Creating SCCP Stack Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Scheduling SCCP Stack Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
SCCP Primitives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
SCCP Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Using the SCCP API Shared Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Creating SCCP Stack Connections Using SS7_xifcreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Scheduling SCCP Stack Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
SS7_ifselectmask(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
select() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
SS7_ifcnxhandler() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Closing SCCP Stack Connections Using SS7_ifclose() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Controlling the SCCP Using SS7_ifctrl() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
SCCP Addressing and Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
SCCP Addressing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Routing with Local GT Translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Incoming Routing Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Routing with Local GT Translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Return Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
Signaling Point Prohibited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Signaling Point Allowed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Signaling Point Congested . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Subsystem Status Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Local Subsystem In Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Subsystem Status Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
SCCP Tutorial Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
General Description of TCAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Component Sublayer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Transaction Sublayer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Dialogue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Transaction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Hybrid Stacks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Message Priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Take-over of TCAP Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Using ITU-T White Book TCAP for ITU-T Blue Book 
TCAP Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
How to Use the TCAP API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
If TC-user, Use Invoke and Dialogue ids. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
If TR-user, then... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Using the TCAP Component Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Allocate, Fill, Allocate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Storing the Components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Contents
ix
Releasing Buffers and Components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
Receiving TCAP Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Creating TCAP Stack Connections Using TCX_open() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
Example: Creating a TC-user Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Scheduling TCAP Stack Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
TCX_select_mask() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
select() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
TCX_cnx_handler() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Using the Component Sublayer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Invoke ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Dialogue ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Creating a Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
Storing the Components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
tcx_component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
tc_component_type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
TCX_alloc_component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
TCX_alloc_buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Passing a Component to the Component Sublayer 
Using TCX_put_component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
TCX_free_components () . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
TCX_flush_components (). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
TCX_free_buffer() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
Primitive Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
TCX Primitive Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
Sublayer Using TCX_send() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
Example: Using TCX_send () . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
Sublayer Using TCX_recv() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Extracting Components Using TCX_get_component(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Using the Transaction Sublayer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
Component Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
Transaction Handling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
Sublayer Using TLX_send() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Sublayer Using TLX-recv(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Example: Closing a TC-user Connection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Component Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Setting Dialogue ID Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Simultaneous Dialogues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Transaction Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
TCX_control(): Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
GDI Access (Application Interface Layer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
GDI Connectivity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
TCAP Tutorial Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
TcapClient.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
TcapServer.c. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Building IN Message Sets Over the HP OpenCall SS7 TCAP API . . . . . . . . . . . . . . . . . . . . . . . . 262
7. Using the TCAP Application Message Dispatcher
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Header File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
TCAProuter_init() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
TCAProuter_application_activate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
TCAProuter_application_deactivate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
TCAProuter_incoming_message(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
TCAProuter_shutdown() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
Partitioning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
Dispatching Algorithms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
Tracing and Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Principles of Stack Traces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Trace Function Prototype. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
When to Use the Trace Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Guidelines for Developing the Customer-Supplied Shared Library . . . . . . . . . . . . . . . . . . . . . . . . 283
Designing for Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Designing in Accordance with Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Header File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
File Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
C. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
Ensuring HA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Possible Plug-in Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
What is Supplied in the PIC Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
What the User Must Develop. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Role of Each Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Benefits of the PIC Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Summary of PIC Framework Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
User Plug-in Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
Registry API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
Using Command Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
How the Plug-in Should Manage Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
Plug-in Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
Contents
xiv
HA Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
Connection Enabling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
PCA Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
Object Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
Server Setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
Server Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
Server Opening . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
Server Closing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
Session Reject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
Types of PCA Payload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
PCA_Message Internal Structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
Structure of PIC APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
Plug-in Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
User Plug-in Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
User Plug-in Shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
The Plug-in Registry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
SS7 OA&M Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
OA&M APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
OA&M Entities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
Issuing OA&M Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
Creating MTP and SCCP OA&M Connections using SS7_xifcreate . . . . . . . . . . . . . . . . . . . . . . . 390
Scheduling MTP and SCCP OA&M Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
SS7_ifselectmask(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
select() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
SS7_ifcnxhandler() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
Contents
xvi
MTP3 Entity Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
Rules for Creating and Manipulating MTP3 Entities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
Addressing MTP3 Entities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
Sending MTP3 OA&M Requests using MTPL3_oamcmd() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
Response to Expect from an MTPL3 OA&M Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
Collecting MTP3 OA&M Statistics Using MTPL3_oamstat() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
Report Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
Response to Expect When You Collect MTP3 OA&M Statistics . . . . . . . . . . . . . . . . . . . . . . . . 405
Receiving MTP3 OA&M Command and Statistic Notifications
Using MTPL3_oamrecv() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406
Response to Expect When You Use the MTPL3_oamrecv() Command . . . . . . . . . . . . . . . . . . . 406
SCCP OA&M Entities and Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
SCCP Entity Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
Rules for Creating and Manipulating SCCP Entities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410
Addressing SCCP Entities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410
Sending SCCP OA&M Requests Using SCCP_oamcmd(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413
Response to Expect When You Send an SCCP OA&M Request . . . . . . . . . . . . . . . . . . . . . . . . 413
Collecting SCCP OA&M Statistics Using SCCP_oamstat(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414
Report Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414
Response to Expect When You Collect SCCP OA&M Statistics . . . . . . . . . . . . . . . . . . . . . . . . 416
Receiving SCCP OA&M Command and Statistic Notifications
Using SCCP_oamrecv(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
Response to Expect When You Use the SCCP_oamrecv() Command . . . . . . . . . . . . . . . . . . . . 417
Closing MTP and SCCP OA&M Connections Using SS7_close(). . . . . . . . . . . . . . . . . . . . . . . . . 419
Using TCAP OA&M Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
Opening a TCAP OA&M Connection Using TCX_open(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
Scheduling TCAP OA&M Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
TCX_select_mask() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
select() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
TCX_cnx_handler() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
Contents
xvii
12. Using the ISUP API
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
General Application Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449
Creating and Opening a Probe Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
Creating a Probe Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
Opening a Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452
Scheduling Probe Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
Criteria for Choosing to Implement the Activity Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
How to use the Activity Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
Redefining the Activity Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
Exchanging Messages via Probe Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466
Closing and Destroying a Probe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467
Close() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467
Destroy() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467
Acknowledgment Primitives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486
State Machine Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488
Message Classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511
Creating Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517
Partial Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518
Assigning Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522
Sending Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524
Queued Messages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526
Receiving Messages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527
Casting Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527
Queued Indications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528
Return Status Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532
Supported Parameters List. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536
How HP OpenCall SS7 ISUP Tracks Circuit State Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548
Developing a Circuit Update Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549
Propagating States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549
Synchronizing States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550
Recovering States. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552
Interaction Scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558
MTP3 Interaction Handling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559
DPC States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563
Generic ISUP Message Handling (State-machine Probe) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569
Generic ISUP Message Handling (Bypass Probe). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570
Generic ISUP Circuit Group Message Handling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571
ANSI Based HP OpenCall SS7 ISUP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572
ITU-T Based HP OpenCall SS7 ISUP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573
CFN and UCIC Message Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574
CFN Sending . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574
CFN Receipt. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574
UCIC Sending . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574
UCIC Receipt. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574
Segmentation - ITU-T 93, 97, ETSI-V2 Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576
Segmentation for Outgoing Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576
Reassembly of Incoming Messages - Normal Case. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577
Reassembly of Incoming Messages -Failure Case 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577
Reassembly of Incoming Messages -Failure Case 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578
Handling Unrecognized Messages -
ITU97 Mode for ITU-T Based HP OpenCall SS7 ISUP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580
Contents
xxi
16. ISUP Call Control - Procedures Common to ANSI and ITU-T
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583
Call Setup Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585
SETUP Request Locally Refused by HP OpenCall SS7 ISUP . . . . . . . . . . . . . . . . . . . . . . . . . . 585
SETUP Request - Dual Seizure Case 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586
SETUP Request - Dual Seizure Case 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587
SETUP Request - Failure to Receive ACM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588
Incoming Call Setup with Immediate Release. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589
Successful Call Setup for Incoming Side. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589
Call Release . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591
Incoming Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594
Circuit Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596
Reset from Network - Successful Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597
Reset from Application - Successful Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598
Circuit Group Reset from Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599
 Normal Case. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599
Failure Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 600
Double Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601
Information Exchange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603
Solicited Information Exchange - Failure Case 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604
Solicited Information Exchange - Failure Case 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605
Unsolicited Information Exchange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 606
Suspend/Resume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608
Pass Along Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611
Continuity Check Request with IAM or CCR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613
Contents
xxii
Continuity Check on the Previous Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616
Facility Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620
Circuit Blocking from a Network - Normal Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621
Circuit Blocking from User - Normal Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621
Circuit Unblocking from a Network - Normal Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622
Circuit Unblocking from User - Normal Case. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622
Circuit Unblocking from a Network on Reception of an IAM . . . . . . . . . . . . . . . . . . . . . . . . . . 623
Circuit Blocking during Setup Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623
Circuit Group Blocking/Unblocking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625
Group Blocking from Network -
 Normal Case. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 627
- From User - Normal Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 628
Group Unblocking from Network-
Circuit Group Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632
Circuit Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642
18. ISUP Call Control - Procedures Specific to ANSI
Call Setup Without ACM Reception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648
Call Release . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649
Contents
xxiii
Circuit Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653
- Failure to Receive RLC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653
Circuit Group Reset from User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655
 Normal Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655
Circuit Reservation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656
Circuit Reservation from Network - T_CRA Expiry. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657
Suspend/Resume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 658
Continuity Check Request with IAM or CCR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661
Continuity Check on this Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661
Continuity Check Request with CRM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672
Continuity Check on this Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672
19. ISUP Call Control - Procedures Specific to ITU-T
Successful Call Setup for Outgoing Side. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678
Call Setup Including ACM Reception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678
Use of the CON Message. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679
Use of the SAM Message. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 680
Call Release . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682
Circuit Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685
- Failure to Receive RLC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685
Circuit Group Reset from USER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687
 Normal Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687
Continuity Check on this Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 692
Facility Request, Facility Accepted, Facility Reject Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704
Contents
xxiv
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 708
Circuit Blocking from a Network - Normal Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 709
Circuit Blocking from User - Normal Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 710
Circuit Unblocking from Network - Normal Case. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711
Circuit Unblocking from User - Normal Case. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711
Circuit Unblocking from a Network on Reception of an IAM . . . . . . . . . . . . . . . . . . . . . . . . . . 712
Circuit Blocking during Setup Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 713
Circuit Group Blocking/Unblocking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 714
Group Blocking (Maintenance Oriented)
Group Blocking (Hardware Oriented) from Network -
 Normal Case. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 716
Group Blocking (Hardware Oriented)
Group Unblocking (Maintenance Oriented)
Group Unblocking (Hardware Oriented)
Group Unblocking (Maintenance Oriented)
Group Unblocking (Hardware Oriented)
Group Blocking (Maintenance Oriented)
Group Blocking (Hardware Oriented)
Circuit Group Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725
Circuit Group Query from Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 726
A. ISUP Library Values
ITU-T - based HP OpenCall SS7 ISUP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 734
B. TUP Addendum
Functionality Identical to HP OpenCall SS7 ISUP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742
Functionality Not Identical to HP OpenCall SS7 ISUP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742
Flavors Supported by HP OpenCall SS7 TUP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 743
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 745
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 745
Object Orientation Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 747
Using the API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 748
Initializing the IsupMgr Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 748
Creating and Opening a Probe Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 748
Scheduling Probe Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 749
Exchanging Messages via Probe Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 749
Closing and Destroying a Probe Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 749
Receiving Notifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 749
HP OpenCall SS7 TUP Message Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 766
Contents
xxvi
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 785
Managing Circuit States. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 788
Introduction to TUP Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 792
Supported Finite State Machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 792
Interaction Scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 793
Generic Primitive Processing (State Machine Probe) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 794
Generic Primitive Processing (Bypass Probe) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 794
Generic TUP Message Handling (State Machine Probe). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 794
Generic TUP Message Handling (Bypass Probe) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 794
Generic TUP Circuit Group Message Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 795
Call Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 798
Use of FOT Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 879
TUP Tutorial Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 880
Using State-machine Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 880
Using Bypass Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 880
Contents
xxviii
  xxix
Preface
This guide contains guidelines for developing applications for HP OpenCall SS7
 platforms.
About This Guide
Purpose
The purpose of this guide is to describe how to develop applications to run on top of
the HP OpenCall SS7 software. Refer to this guide for:
• General guidelines for developing applications and using the APIs supplied
with the HP OpenCall SS7 software.
• Using the following APIs:
 — Level 3 (MTP3/M3UA) API
• Using the PIC/AG to develop user plug-in (shared library)s.
• Guidelines for developing applications and using the API supplied with the
HP OpenCall SS7 ISUPand HP Opencall SS7 TUP software.
• Opening, closing, and using connections to the ISUP/TUP library.
• Creating, handling, and exchanging standard ANSI and ITU-T messages.
• ISUP/TUP FSMs, interaction with the MTP layer, and segmentation
mechanisms.
• ISUP/TUP call setup and call teardown procedures and circuit maintenance
 processes.
xxx
The contents and structure of this guide are as follows:
Chapter Contents
Introduces the APIs provided by HP OpenCall SS7. A general
description of the HP OpenCall SS7 stack versions is also included.
Chapter 2, “General System
Guidelines.”
Gives guidelines to help you develop applications to run on top of the
HP OpenCall SS7 platform. Following these guidelines will ensure
that the applications will inter-operate correctly and efficiently with
the individual sub-systems of the HP OpenCall SS7 platform.
Chapter 3, “General API
Introduces the general concepts and mechanisms that must be used
when developing applications. These guidelines are applicable to each
HP OpenCall SS7 API, and must be read in association with the
following API chapters.
(MTP3/M3UA) API.”
Describes the Level 3 API and the functions that applications can use
to exchange signaling information with the SS7 stack. The guidelines
in this chapter will ensure that the application correctly uses the Level
3 API. The same Level 3 API is used whether the Level 3 protocol is
MTP3 (SS7) or M3UA (SIGTRAN).
Chapter 5, “Using the SCCP
API.”
Describes the SCCP API and the functions that the application can use
to exchange signalling information with the SS7 stack. The guidelines
in this chapter will ensure that the application correctly communicates
with the SCCP API.
API.”
Describes the TCAP API and the functions that the application can use
to establish and maintain TCAP dialogues with a remote TCAP user.
Chapter 7, “Using the TCAP
Application Message
Chapter 8, “PIC/AG -
(Plug-In Container/Application Guardian) is used to run a user plug-in
(shared library).
the PCA API.”
Describes how to use the PCA API to develop a user plug-in (shared
library) to run with the Application Guardian.
  xxxi
the PIC APIs.”
Describes how to use the PIC APIs to develop a user plug-in (shared
library) to run with the Application Guardian.
Chapter 11, “Using the OA&M
API.”
Describes the Operation, Administration & Maintenance (OA&M)
functions that applications can use to manage the MTP2, MTP3, SCCP
and TCAP processes in the SS7 Stack.
Chapter 12, “Using the ISUP
API.”
Describes how to open, close and use an SS7 stack connection via the
HP OpenCall SS7 ISUP API.
Chapter 13, “Exchanging ISUP
Describes how to create, manipulate and exchange standard ANSI and
ITU-T messages. It also describes the primitives provided for
IsupSMProbe and IsupBPProbe objects.
Chapter 15, “Introduction to
interaction with the MTP layer and segmentation mechanisms.
Chapter 16, “ISUP Call
Describes how HP OpenCall SS7 ISUP behaves when controlling call
setup and call teardown procedures that are common to ANSI and
ITU-T.
Describes how HP OpenCall SS7 ISUP behaves when controlling call
setup and call teardown procedures that are specific to ANSI.
Chapter 19, “ISUP Call
Describes how HP OpenCall SS7 ISUP behaves when controlling call
setup and call teardown procedures that are specific to ITU-T.
Chapter 17, “ISUP Circuit
Chapter 20, “ISUP Circuit
Appendix A, “ISUP Library
Values.”
Lists the AdditionalInfo values that can be returned by the ISUP
Library in certain ANSI and ITU-T -based scenarios.
Chapter Contents
Describes HP Opencall SS7 TUP. It describes the differences between
HP Opencall SS7 TUP and HP OpenCall SS7 ISUP.
Chapter Contents
Associated Documentation
The following guides are on the HP OpenCall SS7 3.1 on Linux CD-ROM:
Table 1 Guides on the HP OpenCall SS7 3.1 on Linux CD-ROM
 HP OpenCall SS7 Application
 Developer’s Guide
Describes the HP OpenCall SS7 APIs. In particular, it describes how to
design and develop user applications to run on ISUP or TUP.
 HP OpenCall SS7
Conformance and Compliance
 protocols.
 HP OpenCall SS7 Glossary Defines terms used in the documentation set.
 HP OpenCall SS7 Operations
Guide
Describes how to install and configure the platform and SS7 network,
how to start, stop and monitor the platform, and how to use the platform
management tools. The guide also includes SS7 hardware (TSC and
TSU) installation and maintenance procedures, as well as platform
expansion procedures.
It contains information on the SS7 Monitor, configuration files, and the
SNMP traps generated by the platform.
 HP OpenCall SS7 TSU and
TSC Starter Sheet 
standards for TSUs and TSCs.
 HP OpenCall SS7
 HP OpenCall SS7 Welcome
xxxiv
The following guides are available but are not on the HP OpenCall SS7 3.1 on
Linux CD-ROM:
 packages, the servers supported, the Linux distributions
supported and the associated patches (if any).
 HP OpenCall SS7 Software Installation
QuickStart Guide
HP OpenCall SS7 version 3.1 on Linux from scratch.
The procedure in this guide applies if the platform has
never had HP OpenCall SS7 installed.
  xxxv
Your feedback on these manuals is very important to us.
You can contact us by e-mail at the following address:
[email protected]
Hewlett-Packard Company,
1 Introduction to HP OpenCall SS7 APIs
This chapter describes the APIs provided by HP OpenCall SS7. A general
description of the HP OpenCall SS7 stack versions is also included.
Introduction to HP OpenCall SS7 APIs
HP OpenCall SS7 Developer’s Environment
Chapter 136
HP OpenCall SS7 Developer’s Environment
The HP OpenCall SS7 software is available as a runtime environment or as a
developer’s environment. The HP OpenCall SS7 developer’s environment allows
the development and testing of applications on top of the SS7 stack. These
applications can be deployed on the HP OpenCall SS7 environment software while
remaining independent of the platform configuration.
Development Software
In the development environment, the SS7 Stack and management libraries are
accessible via the HP OpenCall SS7 Application Programming Interfaces (APIs),
thus allowing the development of C/C++ applications. The APIs provide a
transparent interface, shielding applications from the underlying network
 procedures and the platform architecture.
Figure 1-1 Development Platform
Chapter 1 37
Loopback Testing
Once an application has been developed, it can be tested on the development
 platform using loopback testing. The advantage of loopback testing is that SS7
network access connections are not necessary.
However, for applications that use the lower MTP levels, a limited number of
network access links must be used.
NOTE ISUP loopback can only be used when CIC-based distribution is disabled.
Introduction to HP OpenCall SS7 APIs
HP OpenCall SS7 APIs
Application Programming Interfaces (APIs) provide applications with access to the
HP OpenCall SS7 platform libraries and the SS7 network. These APIs support the
management and protocol services required to achieve SS7 connectivity.
Categories of API
The HP OpenCall SS7 APIs can be divided into three main categories:
• SS7 APIs
Each protocol level is accessible via its dedicated API, such as the
MTP3/M3UA, SCCP, ISUP, TUP and TCAP APIs. In the case of TCAP, the
stack’s default round robin algorithm (for load sharing when there are several
users connected on the same SSN) can be replaced by a user algorithm using the
TCAP Application Message Dispatcher.
Operations, Administration and Maintenance (OA&M) services of MTP, SCCP
and TCAP are accessible via their respective OA&M APIs.
• Application Guardian API
By using the Application Guardian, user applications can benefit from the High
Availability facilities of HP OpenCall SS7.
An application can use a single API (either an SS7 Stack or an SS7 Management
API) or simultaneously use multiple APIs.
Permission to Access HP OpenCall SS7
Only members of the group ocadmin. can access the HP OpenCall SS7 APIs. To
allow access, you do not need to change a user’s account, you just add the user to the
list of members of the group ocadmin.
For a developer, who does not need to operate the platform, membership can be
defined as secondary. For an operator, who needs to operate the platform, the user’s
 primary group must be ocadmin.
See also the group(4) and password(4) man pages.
Introduction to HP OpenCall SS7 APIs
Stack and Management APIs
OA & M  APIs
HP OpenCall SS7 Stack APIs
Chapter 140
HP OpenCall SS7 Stack APIs
The Stack APIs provide access to the SS7 protocol stack. These APIs allow an
application to request services from the appropriate protocol layer (MTP Level 3,
SCCP or TCAP).
MTP3/M3UA API
MTP3/M3UA Level 3 services are accessible through this API. Using the provided
functions, an application written in C can exchange MSUs with a peer application.
Applications can utilize the functions provided by this API to request services such
as:
• Link Management (MTP3 only).
See Chapter 4, Using the Level 3 (MTP3/M3UA) API,, for a full description.
SCCP API
The SCCP library enhances the transport services of MTP Level 3, and combined
with the MTP library forms the Network Service Part (NSP) which is equivalent to
Layer 3 of the Open Systems Interconnection (OSI) reference model.
Applications written in C can utilize the functions provided by this API to request
SCCP services such as:
• Segmentation/Reassembly
See Chapter 5, Using the SCCP API,, for a full description.
Introduction to HP OpenCall SS7 APIs
HP OpenCall SS7 Stack APIs
Chapter 1 41
TCAP API
The TCAP API allows an application written in C to access either the component or
the transaction sublayer. This enables non-standard TCAP components to use the
HP OpenCall SS7 transaction sublayer.
This API provides functions to request the services of the TCAP library such as:
• Exchange of TCAP components,
For a description, see Chapter 6, Using the TCAP API,.
TCAP Application Message Dispatcher
If several users are connected with the same SSN on the same stack, you can supply
your own algorithm to replace the round-robin algorithm used by default. You do
this using the TCAP Application Message Dispatcher.
The TCAP Application Message Dispatcher has its own API. This API is described
in Chapter 7, Using the TCAP Application Message Dispatcher,.
ISUP API
HP OpenCall SS7 ISUP enables ISUP call control applications to run over SS7
networks. It relies on MTP Level 3 functionality to transfer its messages through the
SS7 network to the destination point code.
For a description, see Chapter 12, Using the ISUP API, and subsequent chapters.
TUP API
HP Opencall SS7 TUP enables TUP call control applications to run over SS7
networks. It relies on MTP Level 3 functionality to transfer its messages through the
SS7 network to the destination point code.
For a description, see Appendix B, “TUP Addendum.”
Introduction to HP OpenCall SS7 APIs
HP OpenCall SS7 Management APIs
Chapter 142
HP OpenCall SS7 Management APIs
The management API is the OA&M (Operations, Administration and Maintenance
API.
This API provides functions for the development and deployment of SS7 Stack and
 platform management applications. The OA&M APIs are provided for each SS7
Stack level (MTP, SCCP and TCAP). They allow applications to access and use the
SS7 management functions such as node configuration, control and surveillance.
See Chapter 11, Using the OA&M API, for a full description.
Introduction to HP OpenCall SS7 APIs
Application Guardian
Application Guardian
By using the Application Guardian feature, user applications can benefit from the
High Availability facilities of the HP OpenCall SS7 product. The application
concerned becomes a user plug-in (shared library). For an introduction to the
Application Guardian, see the HP OpenCall SS7 Welcome Guide.
The Application Guardian has its own APIs.
These APIs are described in Chapter 9, “PIC/AG - Using the PCA API,” and
Chapter 10, “PIC/AG - Using the PIC APIs.”
Introduction to HP OpenCall SS7 APIs
Alias Point Code
Alias Point Code
The Alias Point Code feature allows the HP OpenCall SS7 product itself to be part
of one or more aliases as defined by the Bellcore standard GR-82-CORE Issue 1,
June 1994.
Local Alias
You can define one or more aliases, whose constituents are HP OpenCall SS7 nodes.
An HP OpenCall SS7 node can belong to at most 4 aliases. Therefore, an
HP OpenCall SS7 node can have a maximum of 4 aliases.
Each node of the network can then access the HP OpenCall SS7 node either by
using its LPC or by using one of its aliases. The goal is to allow a remote node to
reach an HP OpenCall SS7 node other than by using its LPC.
The local alias is visible only up to the MTP3 level. The applications above MTP3
are not aware of its existence and just see the LPC.
Figure 1-3 on page 45 shows an example of how an incoming message for an alias is
handled.
The diagram shows a pair of HP OpenCall SS7 nodes (A and B) with an alias c
defined for them.
Step 1. The remote node D sends a message with DPC = c.
Step 2. The STP E selects one of the constituents of the alias (let us say A).
Step 3. E routes the message to A.
Step 4. The message enters the MTP3 level of A with DPC = c.
Step 5. The message exits the MTP3 level of A with DPC = a.
Step 6. The application on A receives the message DPC = a.
The existence of the alias has no effect on outgoing messages from A. Such
messages are sent with OPC = a. The alias c does not appear in such messages.
Introduction to HP OpenCall SS7 APIs
Alias Point Code
Chapter 1 45
Figure 1-3 Example of an Incoming Message for a Local Alias
Introduction to HP OpenCall SS7 APIs
Virtual Point Codes (VPCs) and Virtual Users (VUs)
Chapter 146
Virtual Point Codes (VPCs) and Virtual Users (VUs)
NOTE The VPC and VU features are available only if the signaling network is SS7. These
features are not available if the signaling network is IP (using SIGTRAN).
These features provide the following functionalities:
• On a single node, an SS7 stack can have multiple non-physical point codes
(called VPCs).
• A user application, called a Virtual User (VU), can receive and send traffic
through VPCs, and manage the VPC behavior.
• A user application can bridge a non-SS7 network with an SS7 network.
Two objects are associated with these features:
• a VPC object that must be configured as a new point code.
• a VU object that must be configured as a new local user application.
Virtual Point Codes (VPC)
A VPC is a non-physical point code. The configuration of a VPC consists in the
dynamic configuration of a point code. A maximum of 16 VPCs is allowed on each
HP OpenCall SS7 stack.
Like an Alias Point Code, a VPC is associated with the LPC.
In the case of an incoming MSU containing an Alias Point Code, the alias is
replaced by the LPC (in the MTP routing label) before being given to the user. In the
case of an incoming MSU containing a VPC, the DPC of the MTP Routing Label
remains set to the VPC.
An outgoing MSU with the OPC set to a VPC is sent to the network without any
substitution of the OPC.
Introduction to HP OpenCall SS7 APIs
Virtual Point Codes (VPCs) and Virtual Users (VUs)
Chapter 1 47
Virtual Users
A VU is a user that can be connected to a VPC. The configuration of a VU consists
of the dynamic configuration of a SubSystem Number (SSN) associated with a
VPC. Thus a VU is identified by two values: VPC and SSN.
A maximum of 16 VUs is allowed on each HP OpenCall SS7 stack. Because a VU
application behaves like a local user application, all the SCCP functionalities,
including monitoring, are available for a VU.
OAM API
The OAM API allows configuration of Virtual Point Codes (VPCs) through the
command MTPL3_oamcmd() using the virtual_pc MtpOamObject object.
The OAM API allows configuration and monitoring of VUs using the following
commands SCCP_oamcmd(), SCCP_oamrecv() and SCCP_oamstat() through
the SO_VIRTUAL_USER SccpOamObject object.
SCCP API
The SCCP API allows connection to a Virtual User (VU) using the
ss7_xifcreate() function and the cnx_info  variable which has a specific
add_info field.
Tutorials
The OAM and SCCP specific VPC tutorials show how to use the data structures and
the functions of the OAM and SCCP APIs.
To use the OAM tutorials, execute the cc_oam makefile. This creates an executable
file OAM. Execute this file without arguments to see how to use the program.
To use the SCCP VPC tutorials, execute the cc_sccp_vpc makefile. This creates
two executables: SccpClientVpc and SccpServerVpc. Execute these programs
without any arguments to see the available options. Do not forget to set the mode
option (primary or secondary) to connect the tutorial to a Virtual User.
The files cc_sccp_vpc, SccpClientVpc.c and SccpServerVpc.c are located
in the /opt/OC/tutorials directory.
Virtual Point Codes (VPCs) and Virtual Users (VUs)
Chapter 148
CAUTION If you want to change a makefile or a tutorial supplied with HP OpenCall SS7, you
must first copy it to your own working directory. You must not change the sources
supplied with the HP OpenCall SS7 product in the directories in which they are
delivered.
HP OpenCall SS7 on Linux
Chapter 1 49
SIGTRAN
References to SIGTRAN, M3UA, and SCTP in this guide are not relevant to
HP OpenCall SS7 3.1 on Linux.
File Names and Path Names
Some system path names and file names are different depending on your Linux
distribution. Table 1-1 on page 49 gives some examples of files/path names.
NOTE The contents of this table is indicative and non-exhaustive.
To find the exact file/path name, you must refer to the documentation accompanying
your Linux distribution. The Linux document that you should consult depends on
the context (for example, “LAN Configuration”, “system log files”).
Table 1-1 File/Path Names
 Network configuration and host names. You should use the SystemConfigurator tool.
SNMP Agent   /etc/snmp/snmpd.conf
Log Files   /var/log/messages
HP OpenCall SS7 on Linux
Chapter 150
2 General System Guidelines
This chapter gives guidelines to help you develop applications to run on top of the
HP OpenCall SS7 platform. Following these guidelines will ensure that applications
will inter-operate correctly and efficiently with the individual sub-systems of the
HP OpenCall SS7 platform.
Development Guidelines
Chapter 252
Development Guidelines
Application must integrate with the HP OpenCall SS7 components, so that they run
seamlessly as one homogenous unit. Therefore, all test and validation procedures
should be applied to the platform as a whole, and not solely to the application.
Designing for System Predictability
The platform as a whole should behave in a predictable fashion under all possible
operating conditions. It must respond to requests from the SS7 network within
 pre-defined and predictable time limits that are within the range of 0.5 second to 1
second. Operating within this range allows the operating system to behave
 predictability even though it is not a real time operating system.
Designing for System Performance
Telecommunications application performance can be defined as “the optimal use of
computing resources to produce the call control and signalling transactions for
which the application has been designed”. The best way of measuring performance
is against the quantification of resource usage (CPU usage, main memory, I/O,
network) required to process each unit of work; for example, transactions.
Techniques for Performance Optimization
The hints below are provided to assist you in obtaining optimum performance for
HP OpenCall SS7 platform applications. The list will help you identify key areas for
optimization.
• Minimize the number of process switches that you have implied in the
 performance path.
• Pay particular attention to the Inter-Process Communication (IPC) part of
application as this is always the most critical in terms of system performance.
• Allocate all dynamic objects into a free pool at startup and use them from there,
as required.
General System Guidelines
Optimizing OS Performance
Chapter 2 53
Optimizing OS Performance
The main causes of poor performance leading to unpredictable system response are
due to access contention of memory and CPU resources.
You can use the real time features of the OS scheduler to manage system
 performance, but you should use this with caution as many processes in the
HP OpenCall SS7 platform need easy access to processing resources (see “Platform
and User Application Scheduling” on page 55).
A better way to ensure predictable and optimized performance is to avoid resource
access contention by following these guidelines:
• Always keep total CPU usage below 85% and keep spare CPU resources to
minimize any CPU resource access contention.
• Do not try to increase the priority of an application process with nice, rtprio 
or rtsched.
• Make sure you have sufficient physical memory for all HP OpenCall SS7 and
application processes. For a Front End running HP OpenCall SS7 processes
only, with no application processes, 128 MB is the recommended minimum for
the system. The recommended minimum per stack is also 128 MB. The system
must have at least twice as much swap memory (also known as virtual memory)
as physical memory.
• Design and implement proactive overload handling mechanisms which will
avoid the platform limiting the throughput due to it delaying the scheduling
 processes (that is, 100% CPU usage).
• Minimize the number of processes involved in the performance path.
• Beware of the effect of buffered I/Os. See the product Release Notes.
• Avoid swapping end monitor swap usage.
• Avoid dynamic memory allocation in application processes. Even when all the
memory leaks are eliminated, the fragmentation effect can cause the process
memory consumption to increase with time.
• When using a FE/BE topology it is preferable to use high speed LANs such as
FDDI or 100BASE-T.
General System Guidelines
System Test and Validation
Follow the procedures below during the testing and validation of applications, to
ensure that they will operate correctly with the HP OpenCall SS7 platform.
Load the HP OpenCall SS7 platform with the operational and logging configuration
that you are going to use. At the maximum traffic load, check the following:
• The CPU usage must always be less than 85%.
For a multiprocessor platform, the CPU usage of the processor running
HP OpenCall SS7 must be less than 85%.
• The HP OpenCall SS7 platform must respond to STLM messages in less than
40 ms. This can be measured using an SS7 tester such as an HP 37900 analyzer.
• Ensure that the HP OpenCall SS7 platform mechanism is functioning correctly:
 — No erroneous switchovers due to heartbeat losses should be detected,
 — The FTC must have sufficient CPU to function correctly,
See the section below on “Platform and User Application Scheduling”.
• No swapping should occur on the system.
General System Guidelines
Chapter 2 55
On the HP OpenCall SS7 system it is important that:
• the application scheduling be done in only one main loop
• all HA processes have a fair share of the CPU time available
NOTE It is especially important that HA processes (such as the SS7 stack) have enough
 processing power and have CPU access in real-time when they need it. This is
 because a system of heartbeats is used to detect failure; a process that is not
scheduled cannot send heartbeats, and so will be detected as dead by the system.
These constraints are also normally true for application processes, which must
 process SS7 messages in a timely fashion. The HP OpenCall SS7 Stack API also
generates heartbeats to monitor connections. The stack API clears the connection
from its end if the heartbeats are not received. If the connection closes it is up to the
application to close the connection on the application end. To keep the connection
open, regularly call the API.
The HP OpenCall SS7 processes are configured with a priority level which ensures
the correct operation of the platform. These preset default values should not  be
changed.
Although the SS7_Stack process is given a high priority (20), it is self-regulating.
SS7_Stack monitors its connection with an application in order not to overflow it,
and if it sees that an application cannot process its buffer it will relinquish some of
its share of CPU.
Using LANs with GDI
The Generic Data Interface (GDI) allows TCAP to run over TCP. This allows TCAP
applications to communicate using an IP network.
GDI supports one or two signaling LANs. Each LAN interface used by a system
must  be configured on a different subnet.
LANs used by GDI must be dedicated to GDI. The IP addresses of GDI signaling
LAN cards should not be configured in the /etc/hosts configuration file because
GDI LANs are identified in HP OpenCall SS7 by their IP addresses (the IP
addresses are configured in the SS7 Stack Monitor). Declaring these addresses in
/etc/hosts or any other name resolution service (such as DNS) will cause the
system to use these addresses for non-GDI traffic.
General System Guidelines
Compiling and Linking
Chapter 2 57
Compiling and Linking
C Language
Compiling and Linking in a Single Command (C)
To compile and link a C program in a single command line, you use:
gcc -D_GNU_SOURCE -fexceptions -pthread -Wall -I/opt/OC/include -o foo foo.c
-L/opt/OC/lib -lSS7utilXXX
Compiling Only (C)
gcc -D_GNU_SOURCE -fexceptions -pthread -Wall -I/opt/OC/include -c foo.c
Linking Only (C)
gcc -fexceptions -pthread foo.o -o foo -L/opt/OC/lib -lSS7utilXXX
where XXX = WBB, AAA, WAA, or ABB.
C++ Language
Compiling and Linking in a Single Command (C++)
To compile and link a C++ program in the same command line, you use:
g++ -fexceptions -pthread -Wall -I/opt/OC/include -o foo foo.c -L/opt/OC/lib
-lSS7utilXXX
General System Guidelines
Compiling and Linking
g++ -F_GNU_SOURCE -fexceptions -pthread -Wall -I/opt/OC/include -c foo.c
Linking Only (C++)
g++ -D_GNU_SOURCE -fexceptions -pthread -Wall foo.o -o foo -I/opt/OC/include
-L/opt/OC/lib -lSS7utilXXX
Examples of Compile/Link Commands
There are examples of compile/link commands (appropriate for each
HP OpenCall SS7 API) in the sections listed below.
These examples show a compile and link in a single command. If you want to
compile and link separately, you must adjust these examples using the principles
shown in the sections: “Compiling Only (C)”, “Compiling Only (C++)”, “Linking
Only (C)”, “Linking Only (C++)”.
Level 3 API “Using the MTP3 API Shared Library” on page 84.
SCCP API “Using the SCCP API Shared Library” on page 113.
TCAP API “Using the TCAP API Shared Library” on page 173.
ISUP API “Using the ISUP API Shared Library” on page 435 and “ISUP Makefiles” on
 page 482.
TUP API “Using the TUP API Shared Library” on page 747.
Chapter 3 59
3 General API Guidelines
This chapter introduces the general concepts and mechanisms that must be used
when developing applications. These guidelines are applicable to each
HP OpenCall SS7 API, and must be read in association with the following API
chapters.
Accessing the SS7 Stack 
The aim of an API is to provide applications with SS7 network access while
shielding the architecture of the platform. This abstract view of the platform allows
an application to use the SS7 and management functions without being dependent
on the platform configuration.
An application can access the HP OpenCall SS7 stack locally (if it runs on the FE
server) or remotely (if it runs on the BE server). In both 1-host and 2-host
development platforms, applications and APIs co-exist on the same computer as the
SS7 stack.
Figure 3-1 Local SS7 Stack Access - Architecture
In distributed platforms the user applications run on a back-end (BE) computer and
the SS7 platform runs on the front-end (FE) computer. Applications on the BEs
access the SS7 network via the HP OpenCall SS7 stack(s) located at the FE(s).
General API Guidelines
Figure 3-2 Remote HP OpenCall SS7 Stack Access: Distributed Platform
General API Guidelines
Chapter 362
Remote SS7 access enables all computers to be sized to the needs of the
applications. It also eases application maintenance, since bringing down one BE for
an application upgrade does not affect network service for the remaining
applications. Applications that run on development platforms also run without code
modification on distributed platforms.
Interaction of Multiple APIs
An application can interface with a single API or use multiple APIs. Any API
combination is possible, but the guidelines on scheduling must be observed. See
“Scheduling SS7 Connections” on page 65.
General API Guidelines
Designing for Threads
Chapter 3 63
Designing for Threads
The HP OpenCall SS7 APIs (except the TimerLib) are Posix.1c Thread-Restricted
level B. This means that the interface is not thread-safe, but that it can be used by
any single “dedicated” thread of a multi-threaded application. Every other API that
is Thread-Restricted Level B must be called from the application thread where
HP OpenCall SS7 APIs are called. HP OpenCall SS7 APIs are not cancel-safe or
async-cancel safe. See the OS user manuals for more information about Posix.1c
threads.
The HP OpenCall SS7 APIs are not Async-Signal-Safe (that is, no
HP OpenCall SS7 functions can be called from a Signal Handler execution context).
The HP OpenCall SS7 APIs are neither Cancel-Safe nor Async-Cancel-Safe (that is,
if the thread that uses an HP OpenCall SS7 function is cancelled by another thread,
the HP OpenCall SS7 context is not left in a consistent state).
General API Guidelines
SS7 Connections
Chapter 364
SS7 Connections
Whether the application is remote or local to the HP O