Browsed by
Tag: pi

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.

miniSIPServer for Raspbian (Stretch)

miniSIPServer for Raspbian (Stretch)

We rebuilt miniSIPServer V32 for the latest Raspbian.

That means only Raspbian (Stretch) will be supported now. If  you are still running MSS on Jessie or older systems, please upgrade Pi before you prepare to upgrade MSS.

If you are still working on Pi1 or Pi2 and don’t want to upgrade Pi, you can still try MSS previous versions. For example:

V31 https://www.myvoipapp.com/download/backup/mss_v31/pi/mss_v31_pi_u20.deb

V30 https://www.myvoipapp.com/download/backup/mss_v30/pi/mss_v30_pi_u20.deb

miniSIPServer V14

miniSIPServer V14

miniSIPServer is upgraded to V14.2 now. With latest versions, following key features are included:

(1) For raspberry Pi. As we know, raspberry Pi is a very small PC run on Debian system, MSS can work on this hardware now. It is very helpful for some small business who dont want to maintain a PC hardware and save many cost.

(2) Provide open API. MSS can start web server and provide open HTTP API . 3rd parties can use this interface to intergrate with their own system. At this time, open API set can support: query MSS version; configure or query details of local users.

(3) Routing group. It is a very helpful feature for customers who have lots of external lines or SIP trunks. They can manage these lines or trunks into different groups for different users or for different calls. The workload of group is in round-robin policy.

Hope you can enjoy our new versions! If you have any questions or suggestions, please feel free to contact us. We are always here for you.