Software IP-PBX, E1, DSS-1 and stress testing

Good evening everyone! Today I decided to write about testing the DSS-1 protocol in an IP-PBX, let's start, as always, with theory, consider converting messages from SIP to DSS-1, talk about protocol analyzers and finish with load testing.



Introduction



As they say, there is nowhere without theory, 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, which is directly responsible for the establishment of physical connections and the formation of PRI and BRI channels. Basic Rate Interface (BRI) contains 2 B channels 64 kbps and one D-channel 16 kbps, Primary Rate Interface (PRI) contains 30 B channels 64 kbps, D-channel 64 kbps, H-channel 64 kbps. B-channels transmit voice and data, while the H-channel is used to synchronize the terminal equipment, the D-channel is used to transmit data about the established connections (signaling).



The second level is the channel one, at this level the Link Access Protocol - D Channel (LAPD) Q.921 specification works. The LAPD protocol is responsible for the formation of logical channels. Accordingly, after establishing a physical connection, a logical should be established: NETWORK sends a SABME message (Set Asynchronous Balanced Mode Extended), the CPE responds with a UA (Unnumbered Acknowledgment) message for synchronization. After that, the RR exchange (Receiver Ready) must be constantly maintained between NETWORK and CPE devices, and logical channels D and B are established.



The third level is network, at this level we have signaling - the Q.931 protocol, which is transmitted in channel D and data - protocol X.25, is transmitted in channel B.



SIP to DSS-1



Now that we have figured out how the DSS-1 protocol works, let's look at how the SIP protocol is converted to EDSS-1 and vice versa. Figure 1 shows a typical connection setup. As we can see from the figure, SIP and DSS-1 messages are similar.





Figure 1 - SIP to DSS-1 conversion



E1 flow analysis



Now let's talk about how we can analyze the E1 stream. We will not talk about the physics of the flow - its impulse shape, we are only interested in logic. In my practice, it was also such that two PBXs work perfectly over E1 and only by connecting the protocol analyzer we saw errors.

We need an analyzer to display messages from the second and third level protocols, with the help of it we will see signal loss, synchronization failure, and much more. Naturally, on the one hand, we install our PBX, on the other hand, it is desirable to install a serial PBX, we do not need to catch errors for mistakes.



For protocol analysis, Linkbit AnyTest AT1000 or Asterisk + T1 / E1 (PRI) Digital Card can be useful.



Linkbit AnyTest AT1000



I'll tell you a little about Linkbit, in fact it is a hardware-software complex that is an analyzer of digital telephony protocols. It is a set-top box with interfaces that is connected via usb to a computer with installed software.

Supports a large number of protocols and codecs, including the ones of interest to us DSS-1 and SIP.



Figure 2 shows the graphical interface. The graphical interface displays a window with the decryption of DSS-1 and LAPD messages; if necessary, you can disable the display of messages of an uninteresting protocol. Below is the E1 stream with time slots, as we can see in Figure 2, we have 10 time slots occupied (displayed in green), 3 are free (displayed in black), it is worth noting that when we click on the occupied time slot, we can listen to the conversation.





Figure 2 - Analyzer of the Linkbit AnyTest AT1000 protocols



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 you have to tinker a little for Asterisk to see it.



We go into Asterisk debugging and enter the command “pri debug span 1” (indicate the number of your channel) and when entering / leaving we will see a message from the DSS-1 protocol. Accordingly, to see the status of the channels, we can use the “pri show span 1” command. If you want to see the LAPD message, you should use the “pri intense debug span 1” command.





Figure 3 - Debugging Asterisk: DSSS-1 messages





Figure 4 - Debugging Asterisk: displaying time slots



Stress Testing



Option 1



To test a software IP-PBX, we need a serial IP-PBX, Linkbit AnyTest AT1000 is placed in the E1 flow gap, then StarTrinity SIP Tester or Sipp traffic generators are used. We analyze the protocol message using Linkbit AnyTest AT1000.



Option 2



To test a software IP-PBX, we need a serial IP-PBX, Linkbit AnyTest AT1000 is placed in the E1 stream break, then StarTrinity SIP Tester or Sipp traffic generators are used, which make calls to Asterisk (Asterisk picks up the phone and wraps up RTP). We analyze the protocol message using Linkbit AnyTest AT1000.





Figure 6 - Testing options



Option 3



To test a software IP-PBX, we need an Asterisk + T1 / E1 (PRI) Digital Card, an E1 flow analyzer is placed in the break of the E1 stream. Then the StarTrinity SIP Tester or Sipp traffic generators are used, which make calls to Asterisk (Asterisk picks up the phone and wraps up RTP). We analyze the protocol message using Linkbit AnyTest AT1000.



Option 4



To test a software IP-PBX, we need an Asterisk + T1 / E1 (PRI) Digital Card. Then the StarTrinity SIP Tester or Sipp traffic generators are used, which make calls to Asterisk (Asterisk picks up the phone and wraps up RTP). We analyze the message of the protocols using the software capabilities of Asterisk. We analyze the protocol message using Linkbit AnyTest AT1000.





Figure 7 - Testing options



I had several types of checks - the first one occupied 30 channels and set calls at a certain interval so that the stray channel would be engaged in a new one and so on in a circle, the easiest way to do this is using StarTrinity SIP Tester. The second one directed the “shaft” of calls through the stream and watched how the software would react.



Summarizing



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 subtleties of the protocol, but for this there are links with the recommended specifications and literature.



LOADING….



References



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.



All Articles