Technical Helpweb

Dialogic® Distributed Signaling Interface (DSI) - Signaling and SS7 Products

How a Dialogic® Global Call application can read the SS7 ISUP or TUP message that triggered a GCEV_ event.

Introduction:

This article supplements information in the Dialogic® Global Call SS7 Technology Guide and provides details about how an application can use gc_GetSigInfo( ) to retrieve the full content (message type and all parameters) of the ISUP (or TUP) message that triggered a GCEV_  termination event.

Procedure:

1:  Set the maximum number of messages that can be stored in the cyclic buffer (This step is described in the Dialogic® Global Call SS7 Technology Guide).

The maximum number of messages that can be stored in the cyclic buffer is configured using the gc_SetParm( ) function, specifying the GCPR_RECEIVE_INFO_BUF parameter. There is one cyclic buffer for each circuit. 

Since, by default, the cyclic buffer is configured to store 0 (zero) messages, an application that wishes to use the gc_GetSigInfo( ) function must set the GCPR_RECEIVE_INFO_BUF parameter for each line device. For most uses of this mechanism, a cyclic buffer depth of 8 messages should be sufficient

Sample code excerpt (where dev is the Global Call line device handle):
GC_PARM gcs7_parm; 
gcs7_parm.intvalue = 8;


if(gc_SetParm(dev,GCPR_RECEIVE_INFO_BUF,gcs7_parm)!=GC_SUCCESS){
// print_GC_error( dev, "gc_SetParm");
}
else {
// LOG_TRACE(dev, "gc_SetParm( )");
}

2:  Call gc_GetSigInfo( ), using the S7_SIGINFO_BLK structure, upon GCEV_ event retrieval.

Sample code excerpt (where metaevt is the METAEVENT structure associated with the retrieved GCEV_ event, and dev is the Global Call line device handle):
char buffer[350]; // Should be enough to hold the Global Call SS7 SIGINFO header + any ISUP message 
S7_SIGINFO_BLK *blk_p = (S7_SIGINFO_BLK *)buffer;
blk_p->length = 350;
int t_res = gc_GetSigInfo(dev, buffer, 0, &metaevt);
if(t_res == 0){
// LOG_TRACE(dev, "gc_GetSigInfo() succeeded: length of SigInfo block [%d]; ISUP primitive [%d]", blk_p->length, blk_p->prim);
Parse(blk_p);
} else {
//print_GC_error( dev, "gc_GetSigInfo");

3:  It is then up to the user application to parse the retrieved data.

Here is a sample implementation of a parsing function:
static void Parse(S7_SIGINFO_BLK *a_blk_p) 
{
printf("gc_GetSigInfo() succeeded: length of SigInfo block [%d]; ISUP primitive [%d]\n", a_blk_p->length, a_blk_p->prim);
S7_IE *t_data_p = &a_blk_p->data;
int t_CurrIESize = sizeof(S7_IE) - 1 + t_data_p->length;
int t_BytesLeft = a_blk_p->length-2;
while((t_BytesLeft >= sizeof(S7_IE)) && (t_BytesLeft >= t_CurrIESize)){
unsigned char t_ByteValue;
unsigned short t_ShortValue;
unsigned int t_IntValue;
printf("Found parameter %d [0x%x]; length=%d; ", t_data_p->parm, t_data_p->parm, t_data_p->length);
switch(t_data_p->length){
case 0:
printf("Parsing error: length=0\n");
break;
case 1:
t_ByteValue = t_data_p->value;
memcpy(&t_ByteValue, &t_data_p->value, 1);
printf("value = [0x%x]\n", t_ByteValue);
break;
case 2:
memcpy(&t_ShortValue, &t_data_p->value, 2);
printf("value = [0x%x]\n", t_ShortValue);
break;
case 4:
memcpy(&t_IntValue, &t_data_p->value, 4);
printf("value = [0x%x]\n", t_IntValue);
break;
default: //more
// eventually write suitable code here to print data for IE of 3 bytes or of more than
// 4 bytes of length ...
break;
}
//next step
t_BytesLeft -= t_CurrIESize;
t_data_p = (S7_IE*)((char*)t_data_p + t_CurrIESize);
t_CurrIESize = sizeof(S7_IE) - 1 + t_data_p->length;
}


Product List
Dialogic® Global Call SS7 Software

Glossary of Acronyms / Terms
SS7 - Signaling System 7
ISUP - ISDN User Part 
TUP - Telephony User Part
GC/SS7 - Glocal Call for SS7 Technology
IE - Information Element

Related Documentation

Dialogic® Global Call SS7 Technology Guide:
http://www.dialogic.com/manuals/docs/globalcall_for_ss7_v5.pdf






Feedback

Please rate the usefulness of this page:  
0 - not useful at all
1 - potentially useful
2 - quite useful
3 - very useful
4 - exactly the information I needed     

Please enter a comment about this page: