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:
paulc 2010-04-05 21:55:59 +00:00
parent bffac88961
commit f839f0bc9b
2 changed files with 7 additions and 1 deletions

View File

@ -67,6 +67,9 @@
; Defaults to the trunk name if missing
;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
; 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
@ -261,6 +264,9 @@
; Defaults to the trunk name if missing
;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
; Allowed values:
; - increment Incremental search an idle channel starting with the last allocated channel

View File

@ -2325,9 +2325,9 @@ SignallingCircuitGroup* SigTrunk::buildCircuits(NamedList& params, const String&
error = "Missing or invalid voice parameter";
return 0;
}
unsigned int start = params.getIntValue("offset",0);
SignallingCircuitGroup* group =
new SignallingCircuitGroup(0,SignallingCircuitGroup::Increment,debugName);
unsigned int start = 0;
for (ObjList* o = voice->skipNull(); o; o = o->skipNext()) {
String* s = static_cast<String*>(o->get());
if (s->null())