[Asterisk-cvs] asterisk/channels chan_zap.c,1.313,1.314

malcolmd at lists.digium.com malcolmd at lists.digium.com
Fri Jul 30 14:35:52 CDT 2004


Update of /usr/cvsroot/asterisk/channels
In directory localhost.localdomain:/tmp/cvs-serv726/channels

Modified Files:
	chan_zap.c 
Log Message:
Bug # 2115: Allow Caller TON to be retrieved in the dialplan


Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.313
retrieving revision 1.314
diff -u -d -r1.313 -r1.314
--- chan_zap.c	29 Jul 2004 04:26:42 -0000	1.313
+++ chan_zap.c	30 Jul 2004 18:21:54 -0000	1.314
@@ -443,6 +443,7 @@
 	char language[MAX_LANGUAGE];
 	char musicclass[MAX_LANGUAGE];
 	char callerid[AST_MAX_EXTENSION];
+	int callerton;
 	char lastcallerid[AST_MAX_EXTENSION];
 	char *origcallerid;			/* malloced original callerid */
 	char callwaitcid[AST_MAX_EXTENSION];
@@ -4409,6 +4410,7 @@
 			tmp->callerid = strdup(i->callerid);
 			tmp->ani = strdup(i->callerid);
 		}
+		tmp->callerton = i->callerton;
 		tmp->restrictcid = i->restrictcid;
 		tmp->callingpres = i->callingpres;
 #ifdef ZAPATA_PRI
@@ -7236,6 +7238,8 @@
 							strncpy(pri->pvts[chanpos]->callerid, e->ring.callingnum, sizeof(pri->pvts[chanpos]->callerid)-1);
 					} else
 						pri->pvts[chanpos]->callerid[0] = '\0';
+					/* Caller Type Of Number - used to distinguise NANPA from International */
+					pri->pvts[chanpos]->callerton = ((e->ring.callingplan) >> 4) & 0x7;
 					strncpy(pri->pvts[chanpos]->rdnis, e->ring.redirectingnum, sizeof(pri->pvts[chanpos]->rdnis) - 1);
 					/* If immediate=yes go to s|1 */
 					if (pri->pvts[chanpos]->immediate) {




More information about the svn-commits mailing list