UP | HOME

GNU SIP Witch

Table of Contents

The goal is to test gnu sip witch. More info here : . It's an old project but it could be good to test it. And moreover the GNU Free Call Project is so important in my eyes.

1. Installing

The source can be find here :

Just download it and untar it:

wget
tar -xvf 

If you read the README file you will see that the project requies some libraries. Install them (on a Debian) :

sudo apt update
sudo apt install -y libucommon-dev

you also need to install libexosip which unfortunately wasn't available in my distro so I built and installed it :

wget
https://download.savannah.gnu.org/releases/exosip/libexosip2-4.1.0.tar.gz
tar -xvf libexosip2-4.1.0.tar.gz rm libexosip2-4.1.0.tar.gz cd
libexosip2-4.1.0/ # exosip relies on osip sudo apt install -y
libosip2-dev ./configure make sudo make install

I used exosip 4.1.0 eventhoug more recent version exists because the last version of sipwitch is from 2015… Now check libexosip libs are installed :

ls -l /usr/local/lib

OK, so we have libucomm, osip and exosip. We can now build sip witch :

cd ../sipwitch ./configure make sudo make install # necessary to
creates the necessary links and cache to the most # recent shared
libraries sudo ldconfig

Wow ! now check it's installed :

ls -l /usr/local/bin sipw --version

1.1. Usage

the installation provides different binaries :

  • sipcontrol
  • sipmonitor
  • sippasswd
  • sipquery
  • sipreg
  • sipstorm
  • sipw

and also their manuals :

man sipw

The manual says sipw is the deamon program. You can start it manually but the installation provided an init script inside /etc/init.d/.

The init script tells us few things :

  1. you have a /etc/default/sipwitch environment file for configuration.
  2. it seems you can control the deamon via a FIFO file located /var/run/sipwitch/control

But in fact there is a very traditional /etc/sipwitch.conf with the current configuration, neat!

It's pretty straight forward. And you can find more information here.

So in order to start sipw deamon I wrote this simple systemd service instead of using the init.d bash script:

[Unit]
Description=GNU SIPWitch
After=network-online.target

[Service]
Type=exec
User=sipw
Group=sipw
EnvironmentFile=-/etc/default/sipwitch
ExecStart=/usr/local/sbin/sipw -f $OPTIONS

[Install]
WantedBy=multi-user.target

I also created a sipw user and group and set its home directory to /var/lib/sipwitch.

Don't forget to set the owners :

chown sipw:sipw /var/lib/sipwitch

I also set the OPTIONS variable to the following in /etc/default/sipwitch:

OPTIONS="--public --configpath /etc/sipwitch.conf -x 9"

After that I could start sipwitch and change my password :

systemctl start sipwitch.service
sippasswd

FYI, sipwitch automatically creates a user for your current user, and sippasswd allows you to change your password.

After that you can try your user with any SIP phone. Me I used Linphone.

I also tried to setup two settings :

<peering>x.x.x.x</peering> <!-- my public ipv4 address -->
<routing>
        <redirect pattern="501" target="sip:[email protected]"/>
</routing>

The routing rule is working when I dial 501 sipwitch forwards the SIP INVITE to the target that should be a clock VoIP Application (check there). However because my setup is behind NAT the SIP INVITE is forwarded with private ipv4 addresses in SDP and in SIP Headers which obviously fails the call. I hoped the peering settings was there for that. This is where I'm confused with sipwitch. It's supposed to be a peer-to-peer application, where sipwitch instances can talk to each other with SIP. So is the peering settings made for that ? Can SIPWitch peer only with SIPWitch or with any SIP capable server ?

Ok I will stop here with sipwitch. The whole project is interesting, but seems dead, last commits were years ago. I didn't try to contact developers so I'm deeply sorry if I am wrong here… If anyone has more informations on the peer to peer concept of sipwitch I would really appreciate it.

Author: PapaDragon

Created: 2025-11-16 Sun 17:46

Validate