BRI configuration for zapcard, no need to define it as a custom E1 anymore.
git-svn-id: http://voip.null.ro/svn/yate@2620 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
184021d1b4
commit
5c06add1f9
|
@ -41,7 +41,7 @@
|
|||
; The errors controlled by this mask are 1: RX buffer overrun 2: HDLC Align error
|
||||
; Maximum value 255
|
||||
; Defaults to 255 if missing or invalid
|
||||
; Ignored if type is not E1 or T1
|
||||
; Ignored if type is not E1, T1 or BRI
|
||||
; This option can be overriden in span sections
|
||||
;errormask=255
|
||||
|
||||
|
@ -68,6 +68,7 @@
|
|||
; Allowed values:
|
||||
; E1, T1: E1/T1 signalling. Circuits belonging to this span can be
|
||||
; configured as voice circuits or signalling only (SS7, ISDN etc) circuits
|
||||
; BRI: ISDN BRI signalling. Circuits are voice and signaling
|
||||
; FXO: This group's circuits are telephone sets linked to telephone exchanges
|
||||
; FXS: This group's circuits are telephone exchanges linked to telephone sets
|
||||
; Defaults to E1 if missing or invalid
|
||||
|
@ -86,7 +87,7 @@
|
|||
; sigchan: integer: The circuit used for signalling (D-channel)
|
||||
; Numbers greater then circuit count (circuit count defaults to 31 for E1 and
|
||||
; to 24 for T1) are not allowed
|
||||
; Defaults to 16 for E1 and to 24 for T1
|
||||
; Defaults to 16 for E1, 24 for T1 and 3 for BRI
|
||||
; Ignored if type is FXS/FXO
|
||||
;sigchan=16
|
||||
|
||||
|
@ -98,7 +99,7 @@
|
|||
; then circuit count are not allowed. Circuit count defaults to 31 for E1
|
||||
; and to 24 for T1. For FXS/FXO spans the channel count is detected from the list)
|
||||
; E.g. 1-15.17-31 or 1-23 or 1.2.3-15.17.18-30.31
|
||||
; If missing, will be computed from type (E1: 1-15.17-31, T1: 1-23, FXO/FXS: 1)
|
||||
; If missing, will be computed from type (E1: 1-15.17-31, T1: 1-23, BRI: 1-2, FXO/FXS: 1)
|
||||
;voicechans=1-15.17-31
|
||||
|
||||
; dtmfdetect: boolean: Set/reset DTMF detection on each zaptel channel used by
|
||||
|
|
|
@ -213,6 +213,7 @@ public:
|
|||
DChan,
|
||||
E1,
|
||||
T1,
|
||||
BRI,
|
||||
FXO,
|
||||
FXS,
|
||||
Control,
|
||||
|
@ -791,6 +792,7 @@ static TokenDict s_types[] = {
|
|||
MAKE_NAME(DChan),
|
||||
MAKE_NAME(E1),
|
||||
MAKE_NAME(T1),
|
||||
MAKE_NAME(BRI),
|
||||
MAKE_NAME(FXO),
|
||||
MAKE_NAME(FXS),
|
||||
MAKE_NAME(Control),
|
||||
|
@ -1557,7 +1559,7 @@ void* ZapInterface::create(const String& type, const NamedList& name)
|
|||
}
|
||||
|
||||
// Check span type
|
||||
if (devType != ZapDevice::E1 && devType != ZapDevice::T1) {
|
||||
if (devType != ZapDevice::E1 && devType != ZapDevice::T1 && devType != ZapDevice::BRI) {
|
||||
Debug(&plugin,DebugWarn,"Section '%s'. Can't create D-channel for type='%s'",
|
||||
config->c_str(),sDevType.c_str());
|
||||
return 0;
|
||||
|
@ -1565,8 +1567,21 @@ void* ZapInterface::create(const String& type, const NamedList& name)
|
|||
// Check channel
|
||||
String sig = config->getValue("sigchan");
|
||||
unsigned int count = (devType == ZapDevice::E1 ? 31 : 24);
|
||||
if (!sig)
|
||||
sig = (devType == ZapDevice::E1 ? 16 : 24);
|
||||
if (sig.null()) {
|
||||
switch (devType) {
|
||||
case ZapDevice::E1:
|
||||
sig = 16;
|
||||
break;
|
||||
case ZapDevice::T1:
|
||||
sig = 24;
|
||||
break;
|
||||
case ZapDevice::BRI:
|
||||
sig = 3;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
unsigned int code = (unsigned int)sig.toInteger(0);
|
||||
if (!(sig && code && code <= count)) {
|
||||
Debug(&plugin,DebugWarn,"Section '%s'. Invalid sigchan='%s' for type='%s'",
|
||||
|
@ -1805,6 +1820,11 @@ bool ZapSpan::init(ZapDevice::Type type, unsigned int offset,
|
|||
voice = "1-23";
|
||||
chans = 24;
|
||||
break;
|
||||
case ZapDevice::BRI:
|
||||
if (!voice)
|
||||
voice = "1-2";
|
||||
chans = 3;
|
||||
break;
|
||||
case ZapDevice::FXO:
|
||||
case ZapDevice::FXS:
|
||||
digital = false;
|
||||
|
@ -1935,6 +1955,7 @@ ZapCircuit::ZapCircuit(ZapDevice::Type type, unsigned int code, unsigned int cha
|
|||
|
||||
switch (type) {
|
||||
case ZapDevice::E1:
|
||||
case ZapDevice::BRI:
|
||||
m_format = ZapDevice::Alaw;
|
||||
break;
|
||||
case ZapDevice::T1:
|
||||
|
@ -2053,6 +2074,7 @@ bool ZapCircuit::updateFormat(const char* format, int direction)
|
|||
switch (m_device.type()) {
|
||||
case ZapDevice::E1:
|
||||
case ZapDevice::T1:
|
||||
case ZapDevice::BRI:
|
||||
case ZapDevice::FXS:
|
||||
case ZapDevice::FXO:
|
||||
if (f == ZapDevice::Alaw || f == ZapDevice::Mulaw)
|
||||
|
|
Loading…
Reference in New Issue