I've always been scared by the classic telephony. It is like some kind of secret knowledge. It is transmitted only from mouth to mouth, from teacher to student. And despite all the attempts to stay away from her, by the will of fate I threw my whole body into the embrasure of the PBX, E1, and other CO-trunks there.

Before I already wrote about setting up PBX
IP Office 500 . Since then, a lot of time slots have been released and I have a new task: set up a trunk between two PBXs (Definity and IP Office) and make city calls through this transit possible.
Interested in secret knowledge please
')
Avaya Definity PBX is our old guest with a good hundred numbers for the three organizations of the holding. Until now, I managed to get rid of only by adding new internal numbers and changing the order of the call.
The PBX was connected through a composite channel with two Ethernet-E1 transforms. In addition to the complex configuration of such a connection and opaque logic, this caused a number of difficulties and problems.
1) A very long time waiting for the connection with the subscriber.
2) There are only 12 time slots in the stream and, accordingly, only 12 possible simultaneous calls. This is due to the characteristics of the transit cisco router.
3) When the channel drops, except for the local network, telephony also stops working.
4) Complex debugging process and a large number of failure nodes.
But not so long ago, it was necessary to purchase another IP Office for the organization and, for financial and technical reasons, it was decided to connect it with a trunk to Definity. In addition, it makes it possible to hypothetically adjust a single numbering plan for all organizations of the holding.
At the same time, it was decided to switch this PBX but a new stream, and leave the old transit only for local telephony.
So, the final scheme will look like this:

And the setting will actually be made from scratch. So let's go this way together, colleagues?
I
Let's start with connecting to the operator.
The first thing we need to do is put the E1 boards in the PBX Definity. It supports hot swapping, so by checking the position of the dip switches, you can safely stick them into a working station.
Dip-switch two. One of them we indicate the type of physical line: coaxial or twisted pair. As a rule, this is still a twisted pair and therefore choose 120 ohms.
The second indicates the standard of work of E1 / T1, respectively 32/24 channels. Of course, Russia uses E1 - 32 channels.
We take two streams from the operator, respectively, we need 2 boards. Immediately after the boards took up space in their slots through Avaya Terminal Emulator, the
#list conf all command can be used to
verify that the PBX saw them:

At this stage, you can make a physical connection. Regardless of which board is worth: digital or analog ports on 24 lines, E1 with four wires or Ethernet, the connector is universal: 50-pin. I call it amphenol, although I am not sure that this term does not mean only a telephone jack.
For E1, a pair of 23.48 is used for transmission and 22.47 for reception. This can be easily verified by connecting the LED to the Tx transmission pairs. It is necessary to connect the transfer of the operator to our reception and vice versa: our transfer to their reception.

The next step is to add the ds1 interface.
#add ds1 xxx with the following parameters
xxx is the board number, in our case it is 01b06
You may need to perform
#ch sync if you are configuring a PBX for the first time.
Since we are connecting to the operator, then most likely, in the
Connect parameter you should specify the network. In general, one should, of course, find out all these parameters from the operator.
If everything is done right at this stage, then the
# test board xxx command, where
xxx is the board number, should return
PASS for all tests.
FAIL on test 138 means the absence of a signal at the reception.
As you know, the 16th time slot
E1 is used for signaling, because the next step is to set up a signal group.
#add sig next
The last two digits of the
Primary D-Channel are the number of the time slot in the stream.
Avaya does not require you to specify the trunk group number (especially since we do not yet have one). But it is better to do it in order to avoid various problems (parameter
Trunk Group for Channel Selection )
Check the status of the signal group with the following commands.
#test sig xTests must produce a
PASS or
ABORT result.
ABORT is not a sign of a problem, but only indicates the inapplicability of this test. If the result of the FAIL test is very likely, we can say that the matter is in the
Connect settings - for example, the
Network or
Line-side is on both stations
#status sig xSignal group must have
in-service status
Now everything is ready to configure the trunk group, which will be used to transfer calls.
But first you need to check your numbering plan. It must contain the number dac.
#disp dial
In our case, this is a number starting at 7 and consisting of 3 digits.
It is this number that should be indicated on the first page of the
#add trunk next command
.
Important parameters are underlined.
Starting with the 4th page, the time slots used in the trunk are indicated here. This is quite a flexible mechanism: you can make several trunks in one stream, breaking the stream, and you can combine several streams into one trunk. We have just the second case, since it is possible up to 50 simultaneous calls. Therefore, I add all 60 time slots of two E1 streams to one trunk group, with the exception of service 16 and 32.

So, now we already have a full-fledged connection with the operator, it remains to receive city numbers from him, as well as to indicate how our internal numbers will call to the city.
II
Let's start with outgoing numbers.
That's what we need to do for this.
First, create a
route-pattern . With its help we will set where and according to what rules the call will be redirected.
Since the connection to the operator, this is actually the default route for our calls, we will not cheat anything:

Now let's turn to a very important setting element: the
ARS routing algorithm - Automatic Route Selection.
It is
configured by two commands:
#ch ars analisys and
#ch ars digit .
In my case, the output of the
#ch ars analisys command looks like this:

In essence, this means that all calls with called numbers that satisfy the following patterns must be sent to route-pattern 2, which is trunk group 4, as we set up above.
The
#ch isdn public command will help configure the rules for matching internal numbers to city numbers, in other words, AON.

This entry means that for all three-digit internal numbers starting with 1, the city number will be 2390013 and it will be sent to trunk group 4, and for number 102 it will be a separate number 2390012
Actually, the six-digit numbers and “2” are indicated here, because in this format the number is expected by the operator, this should also be clarified in advance with the representatives.
If you specify an invalid number or invalid trunk group here, the call will be rejected.
If the PBX is configured for the first time, then you need to specify in the number plan the access code to the routing algorithm. Usually it is "9". Yes, yes, this is the same “nine” that you constantly have to dial if you are using a PBX.

As a matter of fact, these settings will already be enough to make an outgoing call.
III
With incoming numbers a little more complicated.
The first thing that needs to be done is to specify in the settings of the trunk group that the prefix “9 *” is added to the number of the dialed phone (specifically the city). That is, someone dialed the number 390045, along the routes of the operator, this number comes to our PBX to trunk group number 4, and here it is indicated that the symbols “9 *” should be added to the number. “9” means that the call must be sent to the routing algorithm. We will configure the routing rule a little later.
This is done on the third page of
#ch trunk
In the trunk group setting, you can specify that this happens with all incoming, and you can set specific number patterns, as I have done (six-digit numbers starting with 390, 396, 680).
Next, we configure the routing algorithm for incoming calls. This is done with the command
#ch ars digit
Initially, the “*” is not forgotten, then we indicate that out of 7 characters of the number we delete all 7 and insert 3 digits of the internal number and send it immediately to the extention, that is, the phone. As a result, it turns out that the call that came to the number 390013 is redirected to the internal 110.
Now you can make incoming calls.
IV
Well, it remains to learn how to skip calls through a trunk group on the IPO500.
Physically, everything is connected very simply. The pairs on Definity are the same, on the IPO these are the 9th and / or 10th ports 1.2-4.5. Of course, we connect the reception to the transfer.
Until the routing setup, everything is done in the same way with amendments to the board number, the number of time slots and sequence numbers of parameters. It is necessary to indicate only one difference: in the DS1 settings, we specify not the
network , but the
line-side .
IPO
How the IPO is configured, you can find out from my previous
article , here I will only give a screenshot of the settings page:


If everything is configured correctly, the indicator on the E1 card in Definity should turn yellow and turn green on the IP Office:

In addition, we will immediately configure
incoming calls to IPO:


And
outgoing . Here again, remember that the number must be specified in the format in which the operator is waiting for him.


These settings on the IP Office is enough.
Now dodgy with Definity
Since we now have several trunks, we need to come up with a certain identifier for the new trunk, which at the same time will be a prefix for city numbers, defining which route pattern should be inserted into it. Take, for example, the prefix "10". That is, the call that comes to the number 680053 will be processed by the routing algorithm and the number is changed to 10680053.
Naturally, you need to add a new route-pattern, in which we will configure a new trunk group, as well as the removal of two characters - the same prefix so that the number gets IPO pristine-free.

Next we will add the prefix and process the call:


Voila:

Now I will say about what I rested with my forehead and broke more than one spear.
After all the settings, outgoing calls did not work. On the Definity traces, nothing was visible on this trunk. Tracing to IP Office shows that the call is sent to the 1st line with Outgoing Group ID 701, but “Cause = 34, No cct / chan available” comes in response, which means that there are no channels available for a call. Long long ineffectual debugging, but only the advice of a friend helped. It turns out, going back to what I said at the beginning of the article, you need to configure the number of the trunk group in the signal group. That was the whole problem. The situation was complicated by the fact that for other trunks configured on the PBX, this parameter was not specified.
For this coming. For download
link