Deprecated: Hook custom_css_loaded is deprecated since version jetpack-13.5! Use WordPress Custom CSS instead. Jetpack no longer supports Custom CSS. Read the documentation to learn how to apply custom styles to your site: in /var/www/ on line 6031
Kamailio SIP server –

Kamailio SIP server

Today I wanted to test kamailio SIP server but I didn’t have prior experience on this software
and I experienced several problems.

After following the installation manual I created the username rtoo.

root@debian1:~# cat .kamctlrc

root@debian1:~# kamctl add rtoo test123
MySQL password for user 'kamailio@localhost': 
new user 'rtoo' added

so far so good. Then I tried to connect to this server but I got
403 Not relaying” then I put the server in debug mode by adding

#!define WITH_DEBUG

on top of /usr/local/etc/kamailio/kamailio.cfg file and restarted the server

#/etc/init.d/kamailio restart

then I have found that I must add my domain name somewhere in the config.
After this, I added domain as follows in the same config file
and restarted the server again.


Then it worked. However at the very beginning I even got an authentication error like

pre_auth: Credentials with realm not found. 

I don’t know how this error occurred after adding username via CLI. Then I
found the description of the authentication table of kamailio which is subscriber.

mysql> select * from subscriber;
| id | username | domain           | password | email_address | ha1                              | ha1b                             | rpid |
|  4 | rtoo     | | test123  |               | 74f3945dd7123f89761fb59d6708238c | e033a7e663fb83a07f818a093dad953a | NULL |
1 row in set (0.00 sec)

At the URL,
you can see that ha1 and ha1b is an MD5 of some values. According to the
ha1 description, I got the MD5, and updated the subscriber table than it worked.

>>> import hashlib
>>> m = hashlib.md5()
>>> m.update("")
>>> m.hexdigest()

You may not have this error as I didn’t receive it again.

I have found kamailio server quite powerful so far. I hope I will do some test with SRX as well.


About: rtoodtoo

Worked for more than 10 years as a Network/Support Engineer and also interested in Python, Linux, Security and SD-WAN // JNCIE-SEC #223 / RHCE / PCNSE

You have a feedback?

Discover more from

Subscribe now to keep reading and get access to the full archive.

Continue reading