Next Topic

Previous Topic

Home

Book Contents

Book Index

How MonTel uses trunk routes

Trunk routes are the general grouping of phone trunk lines on a PABX. A trunk line means connections two exchanges, where a telehone system is consider a private exchange, so for out purposes the trunk line is a line from the telephone system to the telephone central office of telephone exchange.

The telephone system or PABX (for here on just PABX) may assign a number or a name to each group of trunk lines, for example a PRA ISDN channel (of 20 lines) might be trunk route 1 and a group of say 4 PSTN lines might be trunk route 2. In this simple case the MonTel PABX driver for that PABX system would just return trunk routes of 1 and 2.

You could use the TrunkRouteNames setting in the PABX.INI file to directly name these (using up to 4 characters), for example, TrunkRouteNames = TR1, TR2 or more accurately TrunkRouteNames = ISDN, PSTN.

The Trunk routes should be interpreted by the Drivers to return the actual value supplied by the PABX or if it is a string value, an attempt should be made to translate that into a matching number. PSTN will be 1 and ISDN 2. If the call in an internal call then the trunk route should correspond to the internal trunk value, which is set to 26 (above the expected values for trunk routes). Where possible trunk routes should be in the range 1 to 23, and correspond to to the following values.

TR_NONE 0

TR_ISDN 1

TR_PSTN 2

TR_USER1 1

TR_USER2 2

TR_USER3 3

TR_USER4 4

TR_USER5 5

TR_USER6 6

TR_USER7 7

TR_USER8 8

TR_USER9 9

TR_USER10 10

TR_USER11 11

TR_USER12 12

TR_USER13 13

TR_USER14 14

TR_USER15 15

TR_USER16 16

TR_USER17 17

TR_USER18 18

TR_USER19 19

TR_USER20 20

TR_USER21 21

TR_USER22 22

TR_USER23 23

TR_ISDN_DATA 24

TR_INTERNAL_DATA 25

TR_INTERNAL 26

TR_FAXSERVICE 27

TR_UNKNOWN -1

If TrunkRouteNames is not set, MonTel defaults to using the following values:

TR_NONE " - " or a blank space

TR_ISDN "ISDN"

TR_PSTN "PSTN"

TR_INTERNAL "INT " or a blank space

TR_ISDN_DATA "IDAT"

TR_INTERNAL_DATA "INTD"

TR_FAXSERVICE "FAX "

TR_UNKNOWN "ukwn" or " ? "

TR_USER3 through TR_USER23 nnn- (where n is the trunk route number)

Note that TR_ISDN and TR_PSTN correspond to TR_USER1 and TR_USER2. So it is possible to change TR_ISDN and TR_PSTN trunks to some other name using the TrunkRouteNames setting if the driver is showing these incorrectly.

In some PABXs however, things are not so easy, as the trunk routes are assigned rather arbitrary and high number. In one real world system there were three trunk routes, a PSTN trunk_route (or group) named 398, an ISDN named 399 and some other (rarely used internal) route numbered 469. It would not be practical to map to the TrunkRouteNames settings directly, and besides the PABX.INI file supports up to 254 characters, not values. To get around this problem we use TrunkRouteKeys.

In this case we would set TrunkRouteKeys = 399,398,469. This way we can set TrunkRouteNames = ISDN, PSTN, UNKW and when a trunk route of 399 appears is is given the ordinal number of 1, which maps to ISDN. This virtual number we call the Trounk route key, so in our example 398 has a trunk route key of 2. If we don't specify the trunk route key, then it defaults to the same value as the trunk route sent from the PABX driver up to a maximum value of 24. So in effect the default TrunkRouteKeys setting is 1,2,3,4 .. 23,24. Since the trunk route is often programmed into the PABX on a site by site basis, any translation cannot be handled by the driver, and so may need to be performed in the MonTel with TrunkRouteKeys. The call records will be stored with the original trunk route, and only the MonTel server or client will use the trunk route keys values to do the translation (should they exist). For this reason, PABX installers should not change the trunk route value or name in a PABX with out consideration of how this would affect historical call records, and MonTel installers should not change TrunkRouteKeys for the same reason.

In version 2.12.1 onwards of MonTel, you can use multiple rate tables in the setting TrunkRouteRateTables. If we use TrunkRouteRateTables = tbcompq, tbcomp -- then MonTel will search through the list loading each unique table into memory one, and then remembers the position it occupies in the table as a trunk route key number. If a trunk route has a trunk route key then it will look for the rate code shown in that position, if not, then it will look for a rate code that corresponds to the trunk route number. In either or any case if it can't find a matching rate code in the TrunkRouteRateTables list then it will use the default, which is the entry in MonTelRateTableFile.

------------------------------