Allow specifying a PSTN trunk circuit number offset
git-svn-id: http://voip.null.ro/svn/yate@3168 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
bffac88961
commit
f839f0bc9b
|
@ -67,6 +67,9 @@
|
||||||
; Defaults to the trunk name if missing
|
; Defaults to the trunk name if missing
|
||||||
;voice=
|
;voice=
|
||||||
|
|
||||||
|
; offset: int: Offset of voice circuit codes relative to low level circuit number
|
||||||
|
;offset=0
|
||||||
|
|
||||||
; number: string: Prefix of numbers we accept call setups for, empty to accept all
|
; number: string: Prefix of numbers we accept call setups for, empty to accept all
|
||||||
; Only used by isdn-pri-cpe, makes sense when NET side is Point-to-Multipoint
|
; Only used by isdn-pri-cpe, makes sense when NET side is Point-to-Multipoint
|
||||||
; Setups are ignored if called number is present but doesn't start with this prefix
|
; Setups are ignored if called number is present but doesn't start with this prefix
|
||||||
|
@ -261,6 +264,9 @@
|
||||||
; Defaults to the trunk name if missing
|
; Defaults to the trunk name if missing
|
||||||
;voice=
|
;voice=
|
||||||
|
|
||||||
|
; offset: int: Offset of voice circuit codes relative to low level circuit number
|
||||||
|
;offset=0
|
||||||
|
|
||||||
; strategy: string: The strategy used to allocate voice channels for outgoing calls
|
; strategy: string: The strategy used to allocate voice channels for outgoing calls
|
||||||
; Allowed values:
|
; Allowed values:
|
||||||
; - increment Incremental search an idle channel starting with the last allocated channel
|
; - increment Incremental search an idle channel starting with the last allocated channel
|
||||||
|
|
|
@ -2325,9 +2325,9 @@ SignallingCircuitGroup* SigTrunk::buildCircuits(NamedList& params, const String&
|
||||||
error = "Missing or invalid voice parameter";
|
error = "Missing or invalid voice parameter";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
unsigned int start = params.getIntValue("offset",0);
|
||||||
SignallingCircuitGroup* group =
|
SignallingCircuitGroup* group =
|
||||||
new SignallingCircuitGroup(0,SignallingCircuitGroup::Increment,debugName);
|
new SignallingCircuitGroup(0,SignallingCircuitGroup::Increment,debugName);
|
||||||
unsigned int start = 0;
|
|
||||||
for (ObjList* o = voice->skipNull(); o; o = o->skipNext()) {
|
for (ObjList* o = voice->skipNull(); o; o = o->skipNext()) {
|
||||||
String* s = static_cast<String*>(o->get());
|
String* s = static_cast<String*>(o->get());
|
||||||
if (s->null())
|
if (s->null())
|
||||||
|
|
Loading…
Reference in New Issue