]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't warn on callerid when completely text, instead of numeric with localdialplan...
authorTilghman Lesher <tilghman@meg.abyt.es>
Wed, 18 Aug 2010 07:43:14 +0000 (07:43 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Wed, 18 Aug 2010 07:43:14 +0000 (07:43 +0000)
(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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@282607 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_dahdi.c

index fb45564e3d546bff3b6ee1eb6fbb02371c4c1d2a..820a1c8c3acde89ce5dfa8cf5c1f06679f826f26 100644 (file)
@@ -3601,7 +3601,16 @@ static int dahdi_call(struct ast_channel *ast, char *rdest, int timeout)
                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;
                        }