Introduction

A typical installation of the jtel system consists of one or more telephony and application servers to provide services to its users.

Trunks and Trunk Groups are the logical way telephony resources are organised and connected to the system and it servers.

Trunks

The telephony server provides SIP connectivity at the base level for a certain number of channels. When using SIP, each telephony server has one SIP connection (usually UDP on port 5060), which is capable of addressing any remote telephony service using a domain name or an IP address. This SIP connection is known as a Trunk.

On an ISDN based machine, there may be more than one trunk, for example one for each primary rate connection the system provides. Each of these connections is an individual trunk on a particular server.

Trunks are configured using the System Settings ... Trunks menu, and the following fields are configured:

FieldDescription
MachineIDEach telephony server has a unique ID within each installation. This is assigned in the telephony server system settings menu, under the option "General". As a convention, we recommend that the final number of the IPv4 address is used. This number must match the number assigned in the trunk for the system to be able to select and identify trunks appropriately.
ControllerEach SIP controller has a unique ID. This is configured in the files giAculab.cfg and StdCall_MCP.cfg in the telephony server. In giAculab.cfg numbering starts at 0, wheras in the jtel telephony server, numbering starts with 1. Usually, the SIP provider will be configured as netport 0 in giAculab.cfg and Controller 1 in StdCall_MCP.cfg.
NameThe trunk can be given a descriptive name for identification purposes.

Trunk Groups

Trunk groups affect how numbers are translated when incoming calls are received, and how numbers are translated and various call control parameters are provided, when outgoing calls are made.

When incoming calls are reveived, the first task the system undertakes is to match the incoming call to a particular trunk. This may be used to identify the service number, and the trunk will be used in all further interaction with the telephony layer. When outgoing calls are made, trunk groups are used to select an available server and trunk from those available, and set parameters in the telephony layer (for example SIP header fields) when the call is made.

In a SIP based installation, each trunk will be assigned to one or more trunk groups. In an ISDN based installation, trunk groups may contain more than one trunk. Trunk groups may contain trunks from more than one telephony server, to enable load balancing and selection of trunks for outgoing calls over more than one server.

The following tabs and fields are available:

Master Data

This page contains the parameters for the trunk group, and affects how translation and matching to the trunk group is done. 

The following fields are configured:

FieldDescription
IDAn automatically assigned ID from the system.
NameA descriptive name for the trunk, which is used when selecting the trunk when configurations are made, for example in service numbers.
Incoming Number PatternTrunk groups can be matched based on the called number. For example, 49894614950% would match all incoming calls to the jtel main office in Munich.
SIP Source ServerTrunk groups can alternatively be matched based on the SIP source and destination server in the SIP From: and To: headers. This field affects the From: header match. Any match can be made here, but it is worth checking whether the incoming INVITE messages contain IP addresses or names (DNS) using wireshark.
SIP Destination ServerSee SIP Source server. This field affects the To: header match.
SIP Invited EntityTrunk groups can be matched on the invited entity in the INVITE message line (first line in the INVITE message).
Subscriber Country CodeFor some number translators, the location of the system is used when converting numbers. This parameter is used to match the country code. For example, for jtel, 49 for Germany.
Subscriber Area CodeFor some number translators, the location of the system is used when converting numbers. This parameter is used to match the area code. For example, for jtel, 89 for Munich.
Subscriber PrefixFor some number translators, the location of the system is used when converting numbers. This parameter is used to match the prefix (head number) of the system. For example, for jtel, 4614950, for the head number of the PBX.
Outgoing Trunk Selection Trunk Group for Internal NumbersWhen an active call needs to start a further call (for example, an incoming call to the system results in a call to an agent), the trunk group specified here will be used to make that call, if an internal number is to be called. Internal numbers are identified by the Internal Number Length parameter. It is not recommended to set any other trunk than "Same Group" unless you know exactly what you are going.
Outgoing Trunk Selection Trunk Group for External NumbersWhen an active call needs to start a further call (for example, an incoming call to the system results in a call to an external destination), the trunk group specified here will be used to make that call, if an external number is to be called. External numbers are identified by the Internal Number Length parameter. It is not recommended to set any other trunk than "Same Group" unless you know exactly what you are going.
General access for outbound calls

If this flag is set, this trunk can be matched (by any client) and used to make an outbound call.

This setting should only be applied for systems which are not used by multiple tenants, otherwise tenants may be able to call using another tenant's trunk.

Number Translator - Incoming Caller

All numbers should be translated to E.164 before they can be used in the system internally.

This setting affects how the system translates the From or Calling Party Number into E.164.

For some settings, a converter parameter is required. See below, for a list of available translators.

Number Translator - Incoming Called

This setting affects how the system translates the To or Called Party Number into E.164.

For some settings, a converter parameter is required. See below, for a list of available translators.

Number Translator - Outgoing Caller

This setting affects how the system translates the internal E.164 number back to the format required by the telephony system, when an outgoing call is made. This setting affects the From or Calling Party Number.

For some settings, a converter parameter is required. See below, for a list of available translators.

Number Translator - Outgoing Called

This setting affects how the system translates the internal E.164 number back to the format required by the telephony system, when an outgoing call is made. This setting affects the To or Called Party Number.

For some settings, a converter parameter is required. See below, for a list of available translators.

Outgoing send P-Asserted IdentityIf this option is checked, the SIP header P-Asserted-Identity will be set when an outgoing call is made.
P-Asserted-Identity (Dialler / click to dial - leg to agent)This is the value used for the P-Asserted-Identity field, when calls are made to agents. Please specify a fully qualified SIP URI for die P-Asserted-Identity field, for example "0123456" <sip:0123456@myjtelserver.com>. Typical value: <sip:%P.Asserted.Identity.Number%@myjtelserver>
P-Asserted-Identity (All other cases) This is the value used for the P-Asserted-Identity field, in all other cases. Please specify a fully qualified SIP URI for die P-Asserted-Identity field, for example "0123456" <sip:0123456@myjtelserver>. Typical value: <sip:%IFEQUALSTR(%CALLDIRECTION%,0,%CALLER%,%Service.ServiceNumbersRootNumber_%)%@myjtelserver>
Outgoing send P-Preferred-IdentityIf this option is checked, the SIP header P-Preferred-Identity will be set when an outgoing call is made.
P-Preferred-Identity (Dialler / click to dial - leg to agent)This is the value used for the P-Preferred-Identity field, when calls are made to agents. Please specify a fully qualified SIP URI for die P-Preferred-Identity field, for example "0123456" <sip:0123456@myjtelserver.com>. Typical value: <sip:%P.Preferred.Identity.Number%@myjtelserver>
P-Preferred-Identity (All other cases)This is the value used for the P-Preferred-Identity field, in all other cases. Please specify a fully qualified SIP URI for die P-Preferred-Identity field, for example "0123456" <sip:0123456@myjtelserver>. Typical value: <sip:%IFEQUALSTR(%CALLDIRECTION%,0,%CALLER%,%Service.ServiceNumbersRootNumber_%)%@myjtelserver>
Loopback PreventionWhen the system makes an outgoing call to an agent, SIP history information (SIP history header) is provided if this is setup in the ACD group. If the history information is subsequently detected on an incoming call, then a loop has been produced (by call diversion) in the PBX. The system will reject such calls if this flag is set.
Outside Line PrefixIf the system determines, that an external call is to be made, then this prefix will be applied to the beginning of the number to access an outside line. Note: this is not recommended - the target SIP or telephony system should use E.164 to make routing more transparent.
Internal Number LengthTo distinguish between internal and external numbers, this field is used. Numbers which are longer than this setting are considered external numbers.
Generate Incoming CDRThis field is used to generate CDRs on this trunk, and is not used in standard installations.
Generate Outgoing CDRThis field is used to generate CDRs on this trunk, and is not used in standard installations.

Order of Matching

The following order of matching applies, the first trunk group found applies:

DirectionMatching Order
Inbound

Incoming calls are routed to a particular telephony server by a PBX or SIP entity outside the scope of this document. It is recommended, that when more than one telephony server is present, load sharing between the active servers be configured. Also, it is important to note, that the reception of a TRYING in response to an INVITE does not indicate success, but only that matching process will be initiated. Additional steps should be taken on the providing server to ensure that after a timeout, the call is distributed to another server if at least not a final response, or a RINGING are received. Matching then takes place as follows:

  1. SIP Source and Destination Server
  2. SIP Invented Entity
  3. Number Pattern
  4. Any trunk group where the number pattern is not set, but the Machine ID and Controller match
Outbound

First of all the telephony server is selected according to a "least used but active" convention. This means the telephony server must have set a keep alive timestamp in the system database. The active server with the least number of calls will be used. Next, the trunk group is matched as follows:

  1. Speficic trunk group assigned to the client account,
  2. Any trunk for which outbound general access is set.

Incoming Number Translators

Note - translators which are not documented here should not be used, as they are considered legacy.

TranslatorDescription
Portal Default - treat as ISDNSee ISDN below.
E.164 incomingThe incoming number is already in E.164 format.
E.164 with + incomingThe incoming number is in E.164 format, prefixed with a +.
ISDNThis translator uses the Number Type field to distinguish between subscriber (local), national and international calls, and applies the settings from the coutry code, area code and subscriber prefix to the number as required, to generate an E.164 number.
STARFACECalls from a starface PBX are typically prefixed by a routing parameter in the called party number. This prefix is removed, the result is the called number.
Telephone 0, 00This number translator assumes that all national calls come prefixed with 0, all international with 00, and subscriber calls have no prefix. The appropriate parameters from Country Code, Area Code and Subscriber Prefix are added to the number to generate E.164.
Telephone 00, 000Same as Telephone 0, 00, except with an additional 0 for accessing an outside line prepended to external numbers.
Telephone 90, 900Same as Telephone 0, 00, except with an additional 9 for accessing an outside line prepended to external numbers.

Outgoing Number Translators

TranslatorDescription
Portal Default - treat as E.164See E.164 below
E.164 outgoingThe number is called in E.164 format. For ISDN connections, the number type will be set to international.
ISDNThe number should be dialled in ISDN format. This is the reverse process of the incoming ISDN converter, a match on country code, area code and subscriber prefix determines the number type (international, national or subscriber).
TelephoneThis is the reverse of the incoming Telephone 0, 00 converter.
Telephone with outside line prefixThis is the reverse of the incoming Telephone 00, 000 and Telephone 90, 900 converters. The set outside line prefix will be applied.
Universal FormatterSee below
VOIP - add prefix "sip:" then E.164 number and postfixThis creates a SIP URI from an E.164 number.
VOIP - add prefix "sip:+" then E.164 number and postfixThis creates a SIP URI from an E.164 number with a preceeding plus.

VOIP Telephone - add prefix "sip:" then number in PBX format with prefix (0,00)

This converter matches the country code, area code and subscriber code, and builds a SIP URI accordingly, adding a prefix 0 and 00 as required. The converter parameter is appended (usually the SIP destination server).
VOIP Telephone - add prefix "sip:" then number in PBX format with prefix (0,00), no prefix for internal numbersThis converter matches the country code, area code and subscriber code, and builds a SIP URI accordingly, adding a prefix 0 and 00 as required. Internal numbers (determined by the internal number length parameter) are not prefixed. The converter parameter is appended (usually the SIP destination server).
VOIP Telephone - add prefix "sip:" then number in PBX format with prefix (0, 00,000), no prefix for internal numbersThis converter matches the country code, area code and subscriber code, and builds a SIP URI accordingly, adding a prefix 0, 000 and 000 as required. Internal numbers (determined by the internal number length parameter) are not prefixed. The converter parameter is appended (usually the SIP destination server).

Universal Formatter

The universal formatter can be used to build outgoing numbers based on a format string supplied as a converter parameter. The number type is set to 0 (unknown) by standard, but can also be changed using an appropriate parameter. The following parameters are supported:

ParameterDescription
${CC}The country code
${AC}The area code
${SP}The subscriber prefix
${NUM.E164}The number in E.164 format
${NUM.X164}The number in E.164 format when external, otherwise only the extension number
${NUM.R164}The number in E.164 format, only the extension number when the number to be converted (caller or called) and the called number are internal
${NUM.REL1}The number relative to the location (subscriber)
${NUM.REL2}The number relative to the location (area)
${NUM.REL3}The number relative to the location (country)
${NUM.REL4}The number relative to the location (country), only the extension when the number to be converted is internal
${NUM.REL5}Only the extension when the number to be converted (caller or called) and the called number are internal, otherwise operation as NUM.REL2.
${NUM.REL6}Only the extension when the number to be converted (caller or called) and the called number are internal, otherwise operation as NUM.REL3.
${NUM.LDP}Location destination prefix according to the number type dialled. This can be 0 for national, or 00 for international, depending on what the converter computes.
${NUM.ODP}Outside line prefix.
${NUM.NT}Sets number type to value determined by comparison with country, area and subscriber code
${NUM.PLUS}Adds a plus, but only if the number to be dialled is international (i.e. determined to be international by any of the conversion algorithms above). This is usually best used in combination with ${NUM.E164} or ${NUM.X164}.
${NTU}Set number type to unknown
${NTI}Set number type to international
${NTN}Set number type to national
${NTS}Set number type to subscriber

Universal Formatter Examples

FormatDescription

${NUM.ODP}${NUM.LDP}${NUM.REL4}${NTU}

Format the number with an outside line prefix for external numbers. Add the location destination prefix as computed by the destination number (0 for national, 00 for international). Compute relative to the country, internal numbers will be dialled without a prefix. Set number type to unknown.
sip:${NUM.PLUS}${NUM.X164}@mypbx:5060Dial the number in SIP Format, relative to the PBX system for internal numbers, in E.164 with + for all other numbers. Format the SIP URI with the destination and port provided as static text.


Trunks

This page is used to assign trunks to the trunk group.

When trunk groups are matched, the first criteria is always whether one or more trunks are configured and match on the target telephony server. When an incoming call is received, the Controller and Machine ID are available to the telephony server, which identifies a particular Trunk. Only trunk groups to which this trunk is assigned, will match. When outgoing calls are made, the system will select a telphony server based on a least used algorithm, and a trunk according to the system configuration (general access or a specific trunk assigned to the client account). The telephony server selected must have a trunk available on the trunk group determined to be used, otherwise the outbound call will fail.

  • No labels