Software IP-PBX, E1, DSS-1 and load testing
As the saying goes, without a theory anywhere, although there is plenty of information about the E1 stream and the DSS-1 protocol, I will describe the main points that are important for understanding further material.
DSS-1 has three layers.
The first level is the physical one, it is responsible for directly establishing physical connections and forming PRI and BRI channels. Basic Rate Interface (BRI) contains 2 B channels of 64 kbit/s and one D-channel of 16 kbit/s, Primary Rate Interface (PRI) contains 30 B channels of 64 kbit/s and 2 D-channels of 64 kbit/s. B-channels transmit voice, data, while D-channels are signal. One of the signaling channels serves to synchronize terminal equipment, the other - to transmit data about established connections.
The second level is the channel one, the Link Access Protocol - D Channel (LAPD) specification Q.921 works at this level. The LAPD protocol is responsible for the formation of logical channels. Accordingly, after the physical connection is established, the logical should be established: NETWORK sends a SABME message (Set Asynchronous Balanced Mode Extended), the CPE responds with the UA (Unnumbered Acknowledge) message for synchronization. After that, the RR exchange (Receiver Ready, the receiver is ready) must be constantly supported between the NETWORK devices and the CPE and the logical channels D and B are established.
The third level is network, at this level we have an alarm - Q.931 protocol, which is transmitted in channel D and data - X.25 protocol, is transmitted in channel B.
SIP in DSS-1
Now that we’ve figured out how the DSS-1 protocol works, we’ll look at how SIP is converted to EDSS-1 and vice versa. Figure 1 shows the standard connection setup. As we see from the figure, the SIP and DSS-1 messages are similar.
Figure 1 - Converting SIP to DSS-1
E1 Flow Analysis
Now let's talk about how we analyze the flow of E1. We will not talk about the physics of the flow — its waveform; we are only interested in logic. In my practice, it was such that two automatic telephone exchanges work perfectly on E1 and only after connecting the protocol analyzer did we see errors.
We need an analyzer to display protocol messages of the second and third level, with it we will see a signal loss, a failure of synchronization and much more. Naturally, on the one hand we set up our automatic telephone exchange, on the other hand, it is desirable to install a serial automatic telephone exchange, we don’t need to catch errors for errors.
Linkbit AnyTest AT1000 or Asterisk + T1/E1 (PRI) Digital Card may come in handy for protocol analysis.
Linkbit AnyTest AT1000
I’ll talk a little about Linkbit, in fact it is a hardware-software complex that is an analyzer of digital telephony protocols. It is a prefix with interfaces that connects via usb to a computer with installed software.
It supports a large number of protocols and codecs, including the DSS-1 and SIP that interest us.
Figure 2 shows a graphical interface. The graphical interface displays a window with the decryption of messages DSS-1 and LAPD, if necessary, you can turn off the display of messages not of interest to the protocol. The E1 stream with time slots is displayed below, as we see in Figure 2, we have 10 time slots occupied (displayed in green), 3 are freed (displayed in black), it is worth noting that when we click on a busy time slot, we can listen to the conversation.
Figure 2 - Linkbit AnyTest AT1000 Protocol Analyzer
Asterisk + T1/E1 (PRI) Digital Card
Now let's talk about Asterisk, for work we need T1/E1 (PRI) Digital Cards, which is installed in the PCI Express slot, so we have to tinker a bit for Asterisk to see it.
We go into the Asterisk debugging and enter the command “pri debug span 1” (indicate your channel number) and with incoming/outgoing we will see the message of the DSS-1 protocol. Accordingly, in order to see the status of the channels, we can use the command “pri show span 1”. If you want to see the LAPD message, you should use the command “pri intense debug span 1”.
Figure 3 - Debugging Asterisk: DSSS-1 Messages
Figure 4 - Debugging Asterisk: displaying time slots
To test the software IP-PBX, we need a serial IP-PBX, Linkbit AnyTest AT1000 is put in the E1 stream gap, then StarTrinity SIP Tester or Sipp traffic generators are used. We analyze protocol messages using Linkbit AnyTest AT1000.
To test the software IP-PBX, we need a serial IP-PBX, Linkbit AnyTest AT1000 is put in the E1 stream gap, then StarTrinity SIP Tester or Sipp traffic generators are used, which make calls to Asterisk (Asterisk picks up the phone and wraps RTP). We analyze protocol messages using Linkbit AnyTest AT1000.
Figure 6 - Testing Options
To check the software IP-PBX, we need Asterisk + T1/E1 (PRI) Digital Card. An E1 flow analyzer is placed in the E1 stream gap. Next, StarTrinity SIP Tester or Sipp traffic generators are used, which make calls to Asterisk (Asterisk picks up the phone and wraps RTP). We analyze protocol messages using Linkbit AnyTest AT1000.
To test the software IP-PBX we need Asterisk + T1/E1 (PRI) Digital Card. Next, StarTrinity SIP Tester or Sipp traffic generators are used, which make calls to Asterisk (Asterisk picks up the phone and wraps RTP). We analyze the message of the protocols using the software capabilities of Asterisk. We analyze protocol messages using Linkbit AnyTest AT1000.
Figure 7 - Testing Options
I had several types of checks - the first one I occupied 30 channels and set up calls at a certain interval so that the broken channel would deal with a new one and so on, the easiest way to do this was with the help of StarTrinity SIP Tester. The second one sent the “shaft” of calls through the stream and watched how the software would react.
To summarize, we figured out how the EDSS-1 protocol works, found ways to analyze the protocol messages, and performed stress testing of the software. Of course, in this post there is no description of messages and all the intricacies of the protocol, but for this there are links with recommended specifications and literature.
1.ITU-T Recommendation Q.921 (I.451)
2.ITU-T Recommendation Q.931 (I.451)
3. Goldstein B.S. Access network protocols. Volume 2