[asterisk-commits] tilghman: branch 1.6.2 r282607 - /branches/1.6.2/channels/chan_dahdi.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Aug 18 02:43:23 CDT 2010


Author: tilghman
Date: Wed Aug 18 02:43:14 2010
New Revision: 282607

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=282607
Log:
Don't warn on callerid when completely text, instead of numeric with localdialplan prefixes.

(closes issue #16770)
 Reported by: jamicque
 Patches: 
       20100413__issue16770.diff.txt uploaded by tilghman (license 14)
       20100811__issue16770.diff.txt uploaded by tilghman (license 14)
 Tested by: jamicque

Modified:
    branches/1.6.2/channels/chan_dahdi.c

Modified: branches/1.6.2/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/channels/chan_dahdi.c?view=diff&rev=282607&r1=282606&r2=282607
==============================================================================
--- branches/1.6.2/channels/chan_dahdi.c (original)
+++ branches/1.6.2/channels/chan_dahdi.c Wed Aug 18 02:43:14 2010
@@ -3601,7 +3601,16 @@
 		l = NULL;
 		n = NULL;
 		if (!p->hidecallerid) {
-			l = ast->cid.cid_num;
+			/* If we get to the end of this loop without breaking, there's no
+			 * numeric calleridnum. This is done instead of testing for
+			 * "unknown" or the thousands of other ways that the calleridnum
+			 * could be invalid. */
+			for (l = ast->cid.cid_num; l && *l; l++) {
+				if (strchr("0123456789", *l)) {
+					l = ast->cid.cid_num;
+					break;
+				}
+			}
 			if (!p->hidecalleridname) {
 				n = ast->cid.cid_name;
 			}




More information about the asterisk-commits mailing list