aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-21 22:52:36 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-21 22:52:36 +0000
commited9b68cff937e20a786675d372e527288e8d33f2 (patch)
tree60c0ac1d690777944c08d89ef79fb97e37ef53fd /channels
parent50823f69ae40e35ae43caac94c0e6710e57bdb01 (diff)
Merged revisions 132573 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r132573 | kpfleming | 2008-07-21 17:51:16 -0500 (Mon, 21 Jul 2008) | 10 lines Merged revisions 132571 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r132571 | kpfleming | 2008-07-21 17:45:16 -0500 (Mon, 21 Jul 2008) | 2 lines teach chan_dahdi how to find the D-channel on BRI spans, and don't attempt to use channel 24 as a D-channel on spans of unexpected sizes ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@132574 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_dahdi.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index 3ca6b53f1..50872d1c9 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -7935,11 +7935,19 @@ static int pri_resolve_span(int *span, int channel, int offset, struct dahdi_spa
ast_log(LOG_WARNING, "Unable to use span %d implicitly since it is already part of trunk group %d\n", *span, pris[*span].mastertrunkgroup);
*span = -1;
} else {
- if (si->totalchans == 31) { /* if it's an E1 */
+ if (si->totalchans == 31) {
+ /* E1 */
pris[*span].dchannels[0] = 16 + offset;
- } else { /* T1 or BRI: D Channel is the last Channel */
- pris[*span].dchannels[0] =
- si->totalchans + offset;
+ } else if (si->totalchans == 24) {
+ /* T1 or J1 */
+ pris[*span].dchannels[0] = 24 + offset;
+ } else if (si->totalchans == 3) {
+ /* BRI */
+ pris[*span].dchannels[0] = 3 + offset;
+ } else {
+ ast_log(LOG_WARNING, "Unable to use span %d, since the D-channel cannot be located (unexpected span size of %d channels)\n", *span, si->totalchans);
+ *span = -1;
+ return 0;
}
pris[*span].dchanavail[0] |= DCHAN_PROVISIONED;
pris[*span].offset = offset;