(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
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;
}