mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@132571 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -7089,10 +7089,19 @@ static int pri_resolve_span(int *span, int channel, int offset, DAHDI_SPANINFO *
|
||||
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 {
|
||||
} 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;
|
||||
|
Reference in New Issue
Block a user