diff options
author | rmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-22 19:32:16 +0000 |
---|---|---|
committer | rmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-22 19:32:16 +0000 |
commit | 2216ce890ca9225aec06db063e90e72ea78259e7 (patch) | |
tree | b1e7acef2bc477c82b841899a0e21848f73d0a87 /channels | |
parent | 2904db462f4fa45bc56b0226c3673ec0d1aef2c9 (diff) |
DNID does not get cleard on a new call when using immediate=yes with ISDN signaling.
When you are using chan_dahdi ISDN signaling with immediate=yes and a call
comes in without a DNID then you get the DNID of a previous call.
Chan_dahdi does not touch the DNID field on a new call if it does not have
a DNID.
Made always copy the DNID from the new call.
The patches backport the relevant changes from trunk -r210387.
(closes issue #17568)
Reported by: wuwu
Patches:
issue17568_v1.4.patch uploaded by rmudgett (license 664)
issue17568_v1.6.2.patch uploaded by rmudgett (license 664)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@278703 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_dahdi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index 760cee23d..419f56d92 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -12966,6 +12966,10 @@ static void *pri_dchannel(void *vpri) } apply_plan_to_number(pri->pvts[chanpos]->rdnis, sizeof(pri->pvts[chanpos]->rdnis), pri, e->ring.redirectingnum, e->ring.callingplanrdnis); + + /* Set DNID on all incoming calls -- even immediate */ + ast_copy_string(pri->pvts[chanpos]->dnid, e->ring.callednum, sizeof(pri->pvts[chanpos]->dnid)); + /* If immediate=yes go to s|1 */ if (pri->pvts[chanpos]->immediate) { ast_verb(3, "Going to extension s|1 because of immediate=yes\n"); @@ -12975,7 +12979,6 @@ static void *pri_dchannel(void *vpri) /* Get called number */ else if (!ast_strlen_zero(e->ring.callednum)) { ast_copy_string(pri->pvts[chanpos]->exten, e->ring.callednum, sizeof(pri->pvts[chanpos]->exten)); - ast_copy_string(pri->pvts[chanpos]->dnid, e->ring.callednum, sizeof(pri->pvts[chanpos]->dnid)); } else if (pri->overlapdial) pri->pvts[chanpos]->exten[0] = '\0'; else { @@ -12983,9 +12986,6 @@ static void *pri_dchannel(void *vpri) pri->pvts[chanpos]->exten[0] = 's'; pri->pvts[chanpos]->exten[1] = '\0'; } - /* Set DNID on all incoming calls -- even immediate */ - if (!ast_strlen_zero(e->ring.callednum)) - ast_copy_string(pri->pvts[chanpos]->dnid, e->ring.callednum, sizeof(pri->pvts[chanpos]->dnid)); /* No number yet, but received "sending complete"? */ if (e->ring.complete && (ast_strlen_zero(e->ring.callednum))) { ast_verb(3, "Going to extension s|1 because of Complete received\n"); |