aboutsummaryrefslogtreecommitdiffstats
path: root/channels/sig_pri.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-08-18 07:50:07 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-08-18 07:50:07 +0000
commite12c5b73febc676aa1d3772ddbd7e91cca21cfeb (patch)
treedb8af1a1e6c05c8fdb7ab947c35b9249fd6cd2b7 /channels/sig_pri.c
parent9d3010f7099eb17ce2772171126f87c340f3ba27 (diff)
Merged revisions 282608 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r282608 | tilghman | 2010-08-18 02:49:04 -0500 (Wed, 18 Aug 2010) | 16 lines Merged revisions 282607 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r282607 | tilghman | 2010-08-18 02:43:14 -0500 (Wed, 18 Aug 2010) | 9 lines 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 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@282609 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/sig_pri.c')
-rw-r--r--channels/sig_pri.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/channels/sig_pri.c b/channels/sig_pri.c
index 6878d81e8..1b493e114 100644
--- a/channels/sig_pri.c
+++ b/channels/sig_pri.c
@@ -5917,7 +5917,20 @@ int sig_pri_call(struct sig_pri_chan *p, struct ast_channel *ast, char *rdest, i
l = NULL;
n = NULL;
if (!p->hidecallerid) {
- l = ast->connected.id.number.valid ? ast->connected.id.number.str : NULL;
+ if (ast->connected.id.number.valid) {
+ /* If we get to the end of this loop without breaking, there's no
+ * calleridnum. This is done instead of testing for "unknown" or
+ * the thousands of other ways that the calleridnum could be
+ * invalid. */
+ for (l = ast->connected.id.number.str; l && *l; l++) {
+ if (strchr("0123456789", *l)) {
+ l = ast->connected.id.number.str;
+ break;
+ }
+ }
+ } else {
+ l = NULL;
+ }
if (!p->hidecalleridname) {
n = ast->connected.id.name.valid ? ast->connected.id.name.str : NULL;
}