miniSIPServer on Ubuntu 22.04

miniSIPServer on Ubuntu 22.04

Ubuntu 22.04 (Jammy Jellyfish) is the latest LTS (long tem support) version, so it is quite important for miniSIPServer to support this version.

We try to install and run miniSIPServer on Ubuntu 22.04, it is very easy! And we are very glad that it is perfect to run miniSIPServer on it. Please refer to the figure below.

miniSIPServer on Ubuntu 22.04
miniSIPServer on Ubuntu 22.04

If you are going to deploy a new VoIP network, it could be a good choice to run miniSIPServer on Ubuntu 22.04.

call tag and cause

call tag and cause

Sometimes, customers want to know some details about history calls, such as who released such calls and why they were released. Because they were not real-time information, we cannot use miniSIPServer trace tool to get the results, so we update CDR function to save more informations for deep research.

In the FCI (Furnish Call/Charge Information) section, we add two parameters “callTag=” and “cause=”. Please refer to the CDR records as below.

FCI parameters
FCI parameters

“callTag=” parameter will be used to save the position where the call is released in miniSIPServer. We can know where and who release the call. For example, the call might be released because it received a BYE message from caller side, and so on. The tag value is an inner value and it will not be published to customers.

“cause=” parameter is used to save the cause value. If miniSIPServer receives 4xx or 5xx messages from the called side, and there is “Reason” header which has ’cause’ parameter, miniSIPServer will use this value to release the call,otherwise, miniSIPServer will use inner cause value. And of course, this parameter will be saved in FCI of CDR records.

call-back service is updated

call-back service is updated

By default, miniSIPServer opens UDP port 5080 to receive call-back message to invoke calls. If miniSIPServer is deployed in public network, it is possible to receive lots of other UDP packages. Of course, we can configure “application server address” for IP address authorization, but unfortunately its default value is blank and it could be dangerous.

So we update call-back service to protect the system and refine its service logic. Please refer to the configuration window firstly.

Call back service configuration
Configuration

(1) The default value of “Application server address” is changed to a local loop address “127.0.0.1”, so outsides UDP packages will be disabled. Of course, we can still keep it to be blank to accept all packages from any address, but we suggest not to do that.

(2) Local listen port can be zero which is used to close UDP socket. If the port is zero, miniSIPServer will disable the whole call-back service since it is impossible to receive any outsides UDP packages now. If you don’t use call-back service, it is better to set it to be zero.

(3) Cancel “external line mode” item. Some cutomers always ask us what it is and always confused with this item. It is just to add ‘out group prefix” automatically before the called numbers in two sessions. In fact, it is not flexible if we want to call local users and outsides users at the same time. So we discard it, if we want to call outsides users, we can add ‘out group prefix’ manually in the REQUEST messages. That means application server should be responsible for the numbers format and dial plan result.

Please refer to call-back service document for more details.

start miniSIPServer on boot (Linux)

start miniSIPServer on boot (Linux)

With old Debian version, we can start miniSIPServer on boot by updating ‘/etc/rc.local’ file. Since most Debian versions have been migrated to systemd, so we have to change to other ways to do that.

The first way is to keep “rc.local”, so we need to enable “rc-local.service” in systemd. This service is disabled by default, we can use command below to activate it.

sudo systemctl enable rc-local

It is not a very good way because we have to update “rc-local.service” to fit miniSIPServer requirements which might affect other applications defined in the same “/etc/rc.local” file.

It is better to define an independent service to start miniSIPServer in systemd. In fact, it is quite easy. Lets explain the details in Raspberry Pi system for example. In this scenario, we will indicate Pi to start miniSIPServer (command line) at boot and the default user is “pi”.

First, please create a “minisipserver.service” file in directory “/lib/systemd/system” with content below.

[Unit]
Description=miniSIPServer
After=network.target mariadb.service
Requires=network.target mariadb.service

[Service]
Type=simple
User=pi
KillMode=process
ExecStart=/opt/sipserver/minisipserver-cli

[Install]
WantedBy=multi-user.target

Then, you can use command to activate this service.

sudo systemctl enable minisipserver

Once “minisipserver.service” is enabled, miniSIPServer (command line) will start up automatically when the system is reboot.

In the “minisipserver.service” file, we can see two important sections, [Unit] and [Service], and we need to describe more details about them.

Unit

(Please click here to get more details about unit section in systemd.)

We care “After=” and “Requires=” parameters.

Since miniSIPServer is a network application, so it requires network is ready and need to be started up after the network.

In our environment, miniSIPServer is connected with Mariadb/MySQL database, so it requires the database is ready too. If you don’t need database, you can remove “mariadb.service” from “After=” and “Requires=” parameters .

Service

(Please click here to get more details about service section in systemd.)

We care “User=” and “ExecStart=” parameters.

“User=” parameter indicate systemd who is trying to run this service and start specific application. Since we are using Raspberry Pi system and the default user is “pi”, we set this parameter to “pi”. You need to change it to your own user name in your own Linux system.

By default, miniSIPServer is installed at “/opt/sipserver” directory and the command line file is “minisipserver-cli”, so we set “ExecStart=” parameter to indicate systemd where to get the executing file and run it.

New CDR format

New CDR format

miniSIPServer old versions save CDR records into some binary files in “AppData/cdr” directory. If you want to check history records, you have to start miniCDR tool to open them. If you want to do more research, you will have to use miniCDR to convert them into CSV format files.

Now miniSIPServer new version ( I mean V39 or newer) will save CDR records into CSV files directly. Of course, all these .csv files are still stored in “AppData/cdr” directory. Since .csv files are text format, you can use any text tools, such as notepad in Windows and Gedit in Linux, to open them. If you have Excel, you can use it to open and analyze these CDR files directly too.

And miniCDR is upgraded at the same time to be able to process previous .cdr files and new .csv files.

Optimization: load IVR-XML files into memory

Optimization: load IVR-XML files into memory

In most scenarios, the size of IVR-XML files are very small, only several KB, so it is no problem to read these files from hard disk when processing an incoming call to trigger IVR service. But if there are heavy workloads, for example, huge concurrent calls to trigger IVR services, miniSIPServer has to read these files from hard disk frequently. Obviously, it will affect server’s performance.

So we try to optimize this and load all IVR-XML files into memory. If the file is not modified, IVR service will read it from memory directly. If the file is modified, miniSIPServer will reload it into memory automatically.

That means all IVR operations will be processed in memory and will never visit hard disk if the files are not modified. With this optimization, miniSIPServer will be faster than before.

Run miniSIPServer on Debian 11 (Bullseye)

Run miniSIPServer on Debian 11 (Bullseye)

Debian 11 (Bullseys) was released at August 14th, 2021. It is the latest stable version and very important for business deployment. So we run miniSIPServer on this system and make some tests. The result is perfect!

It is no problem to run miniSIPServer on Debian 11. You can refer to online document for more details about how to run miniSIPServer on Linux systems.

run miniSIPServer on Debian 11
run miniSIPServer on Debian 11
FREE version

FREE version

Today we add a new version (for 5 clients) into miniSIPServer lines. This version is FREE! That means you don’t need a license and don’t warry about expired problem.

This “5 clients” version is perfect for small VoIP delpoyment, such as family communication, testing and so on. You don’t need to pay a cent to get full VoIP functions. Of course, the clients are limited to be no more than 5 clients.

In another way, free versions are not available for commercial usage.

Hope you can enjoy it!

Relay video streams

Relay video streams

With previous versions, if you want to configure miniSIPServer to relay media streams, miniSIPServer will only relay audio streams and discard video streams.

It is because video streams require much more bandwidth and calculation capability. Some devices cannot support that. But more and more customers require us to refine it to relay video streams at the same time since most devices are more powerful and they have enough bandwidth.

It seems reasonable and we think we need upgrade miniSIPServer to fit such requirements.

So the latest versions (build 20210604) are released. If miniSIPServer is trying to relay media streams, it will relay audio streams and video streams together.

You don’t need change your configuration. And please pay attention to your device capability and bandwidth.

An interesting feature

An interesting feature

Sometimes, we want to know the details of real-time call status, such as who is calling, how many incoming calls, and so on. In fact, miniSIPServer has a real-time CDR window which can display CDR records just finished their calls. That means the real-time CDR window only has a half real-time function, and it cannot display the details of calls which are still in calling status.

Obviously, we think we need to upgrade such windows to display more details. And here we get:

Real-time CDR window
Truly real-time CDR window

In the new window, the call which has been released or disconnected is in gray. If the call is calling, it will be in black. When the called party is ringing, it will be changed to be in blue. Once the called party answers the call, it will be red immediately.

So you can get real-time status of all concurrent calls. That’s interesting.

Of course, you need to configure miniSIPServer to display real-time CDR and what kinds of CDR should be generated. Please click menu “data / system / call detail record” and get configuration below.

CDR configuration items
CDR items

Most important, you need to configure “generate fail call CDR” and “show real-time CDR information” items. Please visit manual document for more details about other items.