Allow overriding the controller's starting circuit number.
For MGCP allow overriding offset, increment and start per span in template. git-svn-id: http://yate.null.ro/svn/yate/trunk@4331 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
a46a709e5e
commit
9e8e92eae0
|
@ -158,17 +158,24 @@
|
|||
; E.g. 1-15.17-31 or 1-23 or 1.2.3-15.17.18-30.31
|
||||
;voicechans=
|
||||
|
||||
; chans: int: Number of PSTN circuits to create in span
|
||||
; chans: integer: Number of PSTN circuits to create in span
|
||||
; Defaults to 1 or highest voicechan declared
|
||||
;chans=1
|
||||
|
||||
; offset: int: Offset of circuit code relative to start in span
|
||||
; offset: integer: Offset of circuit code relative to start in span
|
||||
; The parameter offset_NAME_OF_SPAN overrides this (useful for templates)
|
||||
;offset=0
|
||||
|
||||
; start: integer: Absolute start of circuits numbers, ignore group's start
|
||||
; Default is offset + group's current start
|
||||
; The parameter start_NAME_OF_SPAN overrides this (useful for templates)
|
||||
;start=
|
||||
|
||||
; increment: integer: How much will increment this span the circuit number in
|
||||
; the group it belongs to
|
||||
; Defaults to 32 if chans is 30 or 31 (E1), 24 if chans is 23 (T1), number of
|
||||
; circuits in all other cases
|
||||
; The parameter increment_NAME_OF_SPAN overrides this (useful for templates)
|
||||
;increment=
|
||||
|
||||
; clearconn: bool: Clear all connections of remote endpoints when initialized
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
[general]
|
||||
; This section configures common settings and defaults for all interfaces
|
||||
|
||||
; buflen: int: Size of data buffer in bytes
|
||||
; buflen: integer: Size of data buffer in bytes
|
||||
;buflen=160
|
||||
|
||||
; idlevalue: int: Byte value to use as filler when no data is available
|
||||
; idlevalue: integer: Byte value to use as filler when no data is available
|
||||
;idlevalue=255
|
||||
|
||||
; priority: keyword: Data thread priority: normal, high, highest
|
||||
|
@ -19,8 +19,17 @@
|
|||
; interfaces (like D channels) and voice circuit groups (B channels)
|
||||
; The buflen, idlevalue and priority can be overriden in each section
|
||||
|
||||
; span: int: TDM span number as configured in wanrouter configuration
|
||||
; span: integer: TDM span number as configured in wanrouter configuration
|
||||
;span=1
|
||||
|
||||
; type: keyword: Type of the interface, one of: E1, T1, NET, CPE
|
||||
;type=E1
|
||||
|
||||
; start: integer: Absolute start of circuits numbers, ignore group's start
|
||||
; Default is group's start
|
||||
;start=
|
||||
|
||||
; increment: integer: How much will increment this span the circuit number in
|
||||
; the group it belongs to
|
||||
; Defaults to 32 for E1, 24 for T1, 3 for BRI
|
||||
;increment=
|
||||
|
|
|
@ -67,6 +67,10 @@
|
|||
; Defaults to 0 if missing or invalid
|
||||
;offset=
|
||||
|
||||
; start: integer: Absolute start of circuits numbers, ignore group's start
|
||||
; Default is offset + group's current start
|
||||
;start=
|
||||
|
||||
; increment: integer: How much will increment this span the circuit number in
|
||||
; the group it belongs to
|
||||
; Defaults to 32 for E1, 24 for T1
|
||||
|
|
|
@ -84,6 +84,10 @@
|
|||
; if this value is invalid (not an integer or less then 0)
|
||||
;offset=
|
||||
|
||||
; start: integer: Absolute start of circuits numbers, ignore group's start
|
||||
; Default is group's current start
|
||||
;start=
|
||||
|
||||
; 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
|
||||
|
|
|
@ -956,7 +956,10 @@ bool MGCPSpan::init(const NamedList& params)
|
|||
if (range.count())
|
||||
m_count = range[range.count()-1];
|
||||
m_count = config->getIntValue("chans",m_count);
|
||||
cicStart += config->getIntValue("offset");
|
||||
cicStart += config->getIntValue(("offset_"+*sect),
|
||||
config->getIntValue("offset"));
|
||||
cicStart = config->getIntValue(("start_"+*sect),
|
||||
config->getIntValue("start",cicStart));
|
||||
|
||||
if (!m_count)
|
||||
return false;
|
||||
|
@ -971,7 +974,8 @@ bool MGCPSpan::init(const NamedList& params)
|
|||
m_increment = 32;
|
||||
break;
|
||||
}
|
||||
m_increment = config->getIntValue("increment",m_increment);
|
||||
m_increment = config->getIntValue(("increment_"+*sect),
|
||||
config->getIntValue("increment",m_increment));
|
||||
m_rtpForward = config->getBoolValue("forward_rtp",!(m_fxo || m_fxs));
|
||||
m_sdpForward = config->getBoolValue("forward_sdp",false);
|
||||
m_bearer = lookup(config->getIntValue("bearer",s_dict_payloads,-1),s_dict_gwbearerinfo);
|
||||
|
|
|
@ -1198,7 +1198,8 @@ bool TdmSpan::init(TdmDevice::Type type,
|
|||
|
||||
if (!digital)
|
||||
m_increment = chans = count;
|
||||
unsigned int start = params.getIntValue("start",0);
|
||||
m_increment = config.getIntValue("increment",m_increment);
|
||||
unsigned int start = config.getIntValue("start",params.getIntValue("start",0));
|
||||
// Create and insert circuits
|
||||
unsigned int added = 0;
|
||||
DDebug(m_group,DebugNote,
|
||||
|
|
|
@ -1444,7 +1444,9 @@ bool WpSpan::init(const NamedList& config, const NamedList& defaults, NamedList&
|
|||
// Type depending data: channel count, samples, circuit list
|
||||
String type = params.getValue("type",config.getValue("type"));
|
||||
String cics = params.getValue("voicechans",config.getValue("voicechans"));
|
||||
unsigned int offs = params.getIntValue("offset",config.getIntValue("offset",0));
|
||||
unsigned int start = params.getIntValue("offset",config.getIntValue("offset",0));
|
||||
start += params.getIntValue("start");
|
||||
start = config.getIntValue("start",start);
|
||||
m_samples = params.getIntValue("samples",config.getIntValue("samples"));
|
||||
int idleValue = 0xd5; // A-Law idle code
|
||||
if (type.null())
|
||||
|
@ -1497,7 +1499,7 @@ bool WpSpan::init(const NamedList& config, const NamedList& defaults, NamedList&
|
|||
if (!m_buflen)
|
||||
m_buflen = 160;
|
||||
// Channels
|
||||
if (!createCircuits(params.getIntValue("start") + offs,cics)) {
|
||||
if (!createCircuits(start,cics)) {
|
||||
Debug(m_group,DebugNote,
|
||||
"WpSpan('%s'). Failed to create voice chans (voicechans=%s) [%p]",
|
||||
id().safe(),cics.safe(),this);
|
||||
|
|
|
@ -2058,7 +2058,7 @@ bool ZapSpan::init(ZapDevice::Type type, unsigned int offset,
|
|||
if (!digital)
|
||||
m_increment = chans = count;
|
||||
m_increment = config.getIntValue("increment",m_increment);
|
||||
unsigned int start = params.getIntValue("start",0);
|
||||
unsigned int start = config.getIntValue("start",params.getIntValue("start",0));
|
||||
|
||||
// Create and insert circuits
|
||||
unsigned int added = 0;
|
||||
|
|
Loading…
Reference in New Issue