[Asterisk-cvs] asterisk/channels chan_zap.c,1.351,1.352

markster at lists.digium.com markster at lists.digium.com
Sun Oct 3 10:50:49 CDT 2004


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv22079/channels

Modified Files:
	chan_zap.c 
Log Message:
shrink phone number for callerid matching (bug #2562)


Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.351
retrieving revision 1.352
diff -u -d -r1.351 -r1.352
--- chan_zap.c	3 Oct 2004 04:19:58 -0000	1.351
+++ chan_zap.c	3 Oct 2004 14:52:33 -0000	1.352
@@ -5439,6 +5439,8 @@
 			free(chan->cid.cid_name);
 			chan->cid.cid_name = NULL;
 		}
+		if (number)
+			ast_shrink_phone_number(number);
 		if (number && !ast_strlen_zero(number)) {
 			chan->cid.cid_num = strdup(number);
 			chan->cid.cid_ani = strdup(number);
@@ -7571,6 +7573,7 @@
 					pri->pvts[chanpos]->call = e->ring.call;
 					/* Get caller ID */
 					if (pri->pvts[chanpos]->use_callerid) {
+						ast_shrink_phone_number(e->ring.callingnum);
 						strncpy(pri->pvts[chanpos]->cid_num, e->ring.callingnum, sizeof(pri->pvts[chanpos]->cid_num)-1);
 						strncpy(pri->pvts[chanpos]->cid_name, e->ring.callingname, sizeof(pri->pvts[chanpos]->cid_name)-1);
 					} else {




More information about the svn-commits mailing list