Good day to all! For several years now I have been doing IP telephony and began to notice that although the Internet is full of information, I’m talking not only about the Russian segment, but sometimes you can find the right one only on some “abandoned forum”, otherwise it’s not at all. If there is a lot of information about IP telephony and the sip protocol itself, then there is no data on how the IP-PBX software is built, how it is tested and debugged, or it is, but written in such a language that only someone who has been years old can understand works in this area.

I decided to fill in these gaps and contribute, for beginners this information will be informative and useful, more experienced users can emphasize something new for themselves, in any case we will all be in the black. I have big plans at the moment - to write a series of posts, summarizing my knowledge, for obvious reasons I will not upload assemblies, virtual machines, etc. The most important thing is to direct it, and the walker will find his way.

Perhaps the lyrics are enough, let's start as always with theory. Since this post will be read by users with different levels of knowledge, I’ll try to put it all short and clearly.


A software IP-PBX is an automatic telephone exchange based on the IP protocol, the “brain” of which is special software that implements voice switching (in this case, voice packets) and other services provided to subscribers.

Now let's see how it all works, I’ll immediately make a reservation in detail, I won’t take it, it will take a very long time, and therefore there will be some incorrectness and omissions.

The subscriber picks up the phone and enters the number, an alarm is activated immediately, which will control the voice stream transmission session, for this there are a number of protocols from which two SIP and H.323 can be distinguished. At the moment, SIP has gained great popularity and in this post it will be considered. Further, we assume that using the SIP protocol a logical connection was established between subscribers, and then a voice is needed.

The subscriber speaks into the receiver - his voice is encoded using a software or hardware codec into a set of bits. Codec - voice compression algorithm, the simplest and most common PCMA. Then these bits are sent using the RTP protocol to the addressee.

To summarize all of the above, then we have the SIP protocol that controls the communication session, it includes the SDP protocol, which describes the session (used and available codecs and other information), these protocols are packed into TCP or UDP transport and using IP sent in the indicated direction. As soon as a logical connection is established, the voice is compressed using the codec and packed in RTP and sent to the addressee using the IP protocol.

Now let's try to answer the main question, who controls all this? Software switch or softswitch for short is the “brain” of a software IP-PBX that manages all internal and external interactions. Softswitch is well known to us, everyone has heard about Asterisk and Freeswitch. There are paid, there are free, there are with a graphical interface, there are without.

In Figure 1, I depicted a block diagram of a software IP-PBX, but consider it in more detail. First of all, it is an operating system (OS), it must be compatible with hardware, have the necessary repositories and be convenient for work. We will not talk about hardware, let it be a server. Based on the wishes of the customer (TK), the “brain” of our IP-PBX is selected - Softswitch, it can be the same Asterisk or Freeswitch or Softswitch written by hand. In the figure, I divided Softswitch and software, in fact it can be one application, it all depends on the requirements of the customer, you can take a ready-made, the same Freeswitch, write a program that will manage it and also implement additional functionality. Everything is clear with the Web server, we need a layer between the http client and Softswitch. Well, and accordingly the database, we will not constantly rewrite the configuration files. The OS gives us the environment to work, it is also necessary to write additional drivers if you want to connect FXO and E1 boards.

Figure 1.IP-PBX Software Flowchart

Now you can exhale, the described theory is very compressed, but is needed for further understanding of the material.

Sipp and StarTrinity SIP Tester

A few weeks ago the task was set - to test the load that our software IP-PBX can withstand. After a long search, I came across a free Sipp call generator and paid StarTrinity SIP Tester. Below I will briefly describe the capabilities of these applications.

Perhaps I'll start with the simplest - with StarTrinity SIP Tester. The application works only under Windows, has a huge number of features, user registration, act as a registration server, send outgoing calls with many parameters, receive incoming calls and send specified messages, in fact you can write the script yourself and the application will help you with this. But all the functionality is the topic of a separate post, we need the most basic thing for work - the ability to send calls at a given interval, without forgetting about RTP. And now the most important thing is that this application is paid, but the developers also provide a free slightly stripped-down version, but in fact even a stripped-down version can be used if you are smart.

The free version allows you to make 150 calls, while there can be 50 simultaneous connections. But after the reboot, the counter is reset and you can send calls again. Figure 2 and 3 show the StarTrinity SIP Tester application, we can see what address, to which number, from whom, what codec, interval and other information about calls. It is also worth noting that there is a Web interface and the ability to make scripts myself, but what I didn’t like is that you can’t do scripts with the wrong parameters.

Figure 2. Paid version of StarTrinity SIP Tester

Figure 3. StarTrinity SIP Tester Free Version

If StarTrinity SIP Tester is a beautiful graphical interface that is ready to work out of the box, then Sipp presented itself to me as a kind of “monster”, which you need to download, compile, add the necessary packages. But as it turned out, you should not be afraid of this, the developers left an excellent guide on the site that describes the installation process and the features of this application. They immediately warn you that it takes several days to learn how to write scripts, but this is a plus, you will thoroughly understand the sip protocol itself and examine its fields. A few words, there are built-in scripts, they sent and accepted the most common calls, we are still looking for the rest on the Internet, some users are sharing, but I had to sit to study the specifications and write my scripts. Sipp is available on both Windows and Linux, but it works more stable under Linux.

Now to the point, allocating a machine only for Sipp is expensive, we take and make a virtual machine, I use VirtualBox under Ubuntu, I have no problems. Installed in accordance with the guide, go to the application folder and run the application with the necessary keys.

Figure 4. Sipp Call Generator

I will not describe the functionality of Sipp, it is similar to StarTrinity SIP Tester, which application is better, there is no definite answer, I came to the conclusion that they complement each other perfectly.

Load testing

Now we know what a software IP-PBX is and how it works, we also know the functionality of call generators.

Again, when testing, we must understand the operation mode of the IP-PBX software: proxy mode (RTP + signaling is proxied), half-proxy (only the signaling is proxied), request redirection (message 300). It will depend on whether we need to enable RTP in some scenarios or not. In Figure 5, I sketched a few test cases.

Option 1 - we test the software IP-PBX in transit mode, for this we need two different PCs. We assign a route to the PBX, respectively, from one Sipp/StarTrinity SIP Tester we generate calls to another Sipp/StarTrinity SIP Tester.I’ll tell you right away that I didn’t try to generate calls with StarTrinity SIP Tester on Sipp (or per revolution), but purely in theory they should be fully compatible.

Option 2 - we test the software IP-PBX in transit mode, for this we need two different PCs. We register a route on the PBX, respectively, from one Sipp/StarTrinity SIP Tester we generate calls to Asterisk. For Asterisk, I use the VirtualBox virtual machine under Ubuntu, I have no problems. In the Asterisk dialplan, write the following:


When calling this number, Asterisk answers and sends all the received voice back.

Figure 5. Equipment configuration options for stress testing

Option 3 - we test the software IP-PBX in the terminal station mode, for this we need one PC and IP-phones, we set the auto answer on the phones. We register IP phones at the PBX, respectively, from one Sipp/StarTrinity SIP Tester we generate calls from them.

Option 4 - we test the software IP-PBX in the terminal station mode, for this we need one PC and analog SLTs. We set up analogue TAs on the PBX, respectively, from one Sipp/StarTrinity SIP Tester we generate calls to them. As far as I know, but I have not encountered it, there are certain devices that connect to analog lines and can be programmed, for example, to pick up the phone when you call, but if there is no such possibility, you will have to manually pick up the handsets.

That's all, of course, on the IP-PBX software, turn on the logs, or display the console with debugging and look at the errors that have occurred. So you can determine the limit of performance and failure. By the way, advice, install Wireshark, tshark, tcpdump on the virtual machine, so you can monitor and analyze all traffic on your interface in real time.


To summarize, we superficially got acquainted with the construction of a software IP-PBX and Sipp and StarTrinity SIP Tester call generators and learned to simulate the load. If you think carefully, then using these call generators you can safely test the entire Sip stack.

That's all for today, I'm waiting for your comments and remarks, if you want to share your experience, then I will be only glad.



2.StarTrinity SIP Tester
3.Books and other information .