Kamailio by example - kamalab

1 minute read


kamalab

The goal of this series is to provide practical examples that can be run on your laptop. This Kamailio-by-example lab is called kamalab.

I have created a repository with the configurations used in these articles, allowing you to test and switch Kamailio configs quickly.

Github: marcelofpfelix/kamalab

## Requirements
# docker
# fzf
# parallel

## Preparation
git clone [email protected]:marcelofpfelix/kamalab.git ~/git/marcelofpfelix/kamalab
cd ~/git/marcelofpfelix/kamalab

## Running
./kamalab

Kamailio can also be installed from packages or built from sources, following the official docs.

How it works

A Docker container starts with a ghcr.io/kamailio image. This container shares a volume in /etc/kamailio and uses the entrypoint to start the fzf selected config file: kamailio -u kamailio -DDE -f /etc/kamailio/${file}

After that, parallel runs 2 tasks:

  • tail of docker logs and
  • inotifywait that restarts kamailio on file changes.

This setup allows you to test different configurations easily and see the results in real-time.

Tools

Client UA

There are many ways to test SIP calls, but these are my favorites:

Network

Find more SIP tools in miconda/sip-resources.

Updated:

Leave a Comment