Getting Kamailio to Register to a remote SIP server

Looks like I need to try to understand what http://blog.miconda.eu/2010/10/best-of-new-in-kamailio-310-10.html is on about and how to use it.

I notice it says towards the bottom "The documentation for uac module is available at: http://kamailio.org/docs/modules/stable/modules_k/uac.html"

A pity that results in an HTTP response 404 Not Found… :(

Oh well, let's see what we can do anyway…

Apparently you can "configure your SIP proxy to register to other SIP servers for incoming calls. You have to load uac module and add records to uacreg table."

Okay, so let's add loadmodule "uac.so" to /etc/kamailio/kamailio.cfg and restart:

root@SystemY:/etc/kamailio# /etc/init.d/kamailio status
[FAIL] Status of Kamailio SIP Server: :[....] kamailio is not running ... failed!

root@SystemY:/etc/kamailio# grep uac /var/log/kamailio.log 

Mar  1 22:52:13 SystemY /usr/sbin/kamailio[26865]: ERROR: uac [uac.c:278]: mod_init(): 'append_fromtag' RR param is not enabled! - required by AUTO restore mode
Mar  1 22:52:13 SystemY /usr/sbin/kamailio[26865]: ERROR: <core> [sr_module.c:968]: init_mod(): Error while initializing module uac (/usr/lib/x86_64-linux-gnu/kamailio/modules/uac.so)

Hm, so, not so simple then…

So, where are we supposed to enable this "append_fromtag" RR param…?

http://kamailio.org/docs/modules/4.4.x/modules/rr.html#append-fromtag-id tells us that "the default value is 1 (yes)" - which doesn't appear to be true, judging from the above error message.

However, searching for "append_fromtag" in /etc/kamailio/* shows us:

./kamailio.cfg:modparam("rr", "append_fromtag", 0)

So, the "default" has been over-ridden (by the default configuration file…!?) - let's change that and try another restart…

root@SystemY:/etc/kamailio# /etc/init.d/kamailio status
[ ok ] Status of Kamailio SIP Server: :[....] kamailio is running.

Ah, much better :)

So, can we now register to a remote server?

Adding the parameters shown into MySQL and then restarting Kamailio results in no noticeable attempt in the log file to register, and no result on the remote server.

Wireshark also confirms that there is no attempt to register to the remote server. Something else must be needed to tell Kamailio that "I've given you these registration parameters; I'd like you to use them, please".

To be continued…


Go up
Return to main index.