diff options
author | bbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-09 18:50:13 +0000 |
---|---|---|
committer | bbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-09 18:50:13 +0000 |
commit | 12ad49e444d6108b7312a46b389090d51b670a7f (patch) | |
tree | fe20338149990fed28e3936bbbd7162e69d1f938 /channels/chan_dahdi.c | |
parent | f8d0dcac122feafe9ebd0aba502263f829c77667 (diff) |
Fixes an issue with dialplan pattern matching where the specificity for pattern ranges and pattern special characters was inconsistent.
(closes issue #16903)
Reported by: Nick_Lewis
Patches:
pbx.c-specificity.patch uploaded by Nick Lewis (license 657)
Tested by: Nick_Lewis
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@285710 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_dahdi.c')
-rw-r--r-- | channels/chan_dahdi.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index fb45564e3..8026ca574 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -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; } @@ -7372,7 +7381,7 @@ static int dahdi_indicate(struct ast_channel *chan, int condition, const void *d ast_debug(1,"Received AST_CONTROL_PROGRESS on %s\n",chan->name); #ifdef HAVE_PRI p->digital = 0; /* Digital-only calls isn't allows any inband progress messages */ - if (!p->progress && ((p->sig == SIG_PRI) || (p->sig == SIG_BRI) || (p->sig == SIG_BRI_PTMP)) + if (!p->progress && !p->alerting && ((p->sig == SIG_PRI) || (p->sig == SIG_BRI) || (p->sig == SIG_BRI_PTMP)) && p->pri && !p->outgoing) { if (p->pri->pri) { if (!pri_grab(p, p->pri)) { @@ -13542,7 +13551,7 @@ static void *pri_dchannel(void *vpri) } break; case PRI_EVENT_CONFIG_ERR: - ast_log(LOG_WARNING, "PRI Error on span %d: %s\n", pri->trunkgroup, e->err.err); + ast_log(LOG_WARNING, "PRI Error on span %d: %s\n", pri->span, e->err.err); break; case PRI_EVENT_RESTART_ACK: chanpos = pri_find_principle(pri, e->restartack.channel); |