[SR-Users] Forcing outbound transport to TCP

Ivan Ribakov i.ribakov at zaleos.net
Fri Sep 28 10:07:09 CEST 2018


I’m new to Kamailio and currently evaluating it’s capabilities. One of the things I would like to be able to do is to change outbound message transport based on some dynamic logic. 

Kamailio setup: I’m running on a setup from this guide - http://kamailio.org/docs/tutorials/5.1.x/kamailio-install-guide-git/ <http://kamailio.org/docs/tutorials/5.1.x/kamailio-install-guide-git/> and using default configuration file.

In a basic scenario of one2one call, I was able to make Kamailio to forward INVITE to callee over TCP by issuing a REGISTER request with “transport=tcp” parameter. Although it worked, as far as I understand that means all communication with the callee will be happening over TCP. I would like to be able to change transport dynamically so looking for a way to do that from config file.

I tried modifying $ru/$du in the following manner, but it didn’t seem to work. 

# default config content
if (is_method("INVITE")) {
        setflag(FLT_ACC); # do accounting
	# added to try to force TCP transport
        $du = $du + ";transport=tcp";
}

Any pointers as to how can I modify the outbound message transport? Do I need to use some extra modules or can it be achieved with a basic setup?

Thanks in advance,
Ivan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180928/e0cb1440/attachment.html>


More information about the sr-users mailing list