[libss7-commits] mattf: trunk r141 - in /trunk: isup.c isup.h libss7.h

SVN commits to the libss7 project libss7-commits at lists.digium.com
Mon Feb 18 15:50:09 CST 2008


Author: mattf
Date: Mon Feb 18 15:50:08 2008
New Revision: 141

URL: http://svn.digium.com/view/libss7?view=rev&rev=141
Log:
Libss7 support for #11964: add the ability to get ORIG_CALLED_NUM

Modified:
    trunk/isup.c
    trunk/isup.h
    trunk/libss7.h

Modified: trunk/isup.c
URL: http://svn.digium.com/view/libss7/trunk/isup.c?view=diff&rev=141&r1=140&r2=141
==============================================================================
--- trunk/isup.c (original)
+++ trunk/isup.c Mon Feb 18 15:50:08 2008
@@ -1484,6 +1484,14 @@
 
 static FUNC_RECV(original_called_num_receive)
 {
+	int oddeven = (parm[0] >> 7) & 0x1;
+
+	isup_get_number(c->orig_called_num, &parm[2], len - 2, oddeven);
+
+	c->orig_called_nai = parm[0] & 0x7f;
+	c->orig_called_pres_ind = (parm[1] >> 2) & 0x3;
+	c->orig_called_screening_ind = parm[1] & 0x3;
+
 	return len;
 }
 
@@ -2558,6 +2566,10 @@
 			e->iam.lspi_scheme = c->lspi_scheme;
 			e->iam.lspi_context = c->lspi_context;
 			strncpy(e->iam.lspi_ident, c->lspi_ident, sizeof(e->iam.lspi_ident));
+			strncpy(e->iam.orig_called_num, c->orig_called_num, sizeof(e->iam.orig_called_num));
+			e->iam.orig_called_nai = c->orig_called_nai;
+			e->iam.orig_called_pres_ind = c->orig_called_pres_ind;
+			e->iam.orig_called_screening_ind = c->orig_called_screening_ind;
 			e->iam.call = c;
 			e->iam.opc = opc; /* keep OPC information */
 			return 0;

Modified: trunk/isup.h
URL: http://svn.digium.com/view/libss7/trunk/isup.h?view=diff&rev=141&r1=140&r2=141
==============================================================================
--- trunk/isup.h (original)
+++ trunk/isup.h Mon Feb 18 15:50:08 2008
@@ -160,6 +160,10 @@
 	int oli_ani2;
 	unsigned int call_ref_ident;
 	unsigned int call_ref_pc;
+	char orig_called_num[ISUP_MAX_NUM];
+	unsigned char orig_called_nai;
+	unsigned char orig_called_pres_ind;
+	unsigned char orig_called_screening_ind;
 	
 	int range;
 	unsigned char status[255];

Modified: trunk/libss7.h
URL: http://svn.digium.com/view/libss7/trunk/libss7.h?view=diff&rev=141&r1=140&r2=141
==============================================================================
--- trunk/libss7.h (original)
+++ trunk/libss7.h Mon Feb 18 15:50:08 2008
@@ -129,6 +129,11 @@
 	unsigned char lspi_context;
 	unsigned char lspi_spare;
 	char lspi_ident[50];
+	/* If orig_called_num contains a valid number, consider the other orig_called* values valid */
+	char orig_called_num[50];
+	unsigned char orig_called_nai;
+	unsigned char orig_called_pres_ind;
+	unsigned char orig_called_screening_ind;
 	int oli_ani2;
 	unsigned int opc;
 	struct isup_call *call;




More information about the libss7-commits mailing list