<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">How would one achieve the same using KEMI? I can see there is a KSR.tm module - <a href="https://kamailio.org/docs/tutorials/devel/kamailio-kemi-framework/modules/#tm" class="">https://kamailio.org/docs/tutorials/devel/kamailio-kemi-framework/modules/#tm</a> which has “t_relay()” function but it has no “t_relay_to_tcp()”.</div><br class=""><div><blockquote type="cite" class=""><div class="">On 28 Sep 2018, at 11:22, Ivan Ribakov <<a href="mailto:i.ribakov@zaleos.net" class="">i.ribakov@zaleos.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Thanks Daniel!<br class=""><br class="">route[RELAY] section is what I’ve been looking for! <br class="">I knew about t_relay_to_tcp() function but placing it directly in the end of “request_route” block lead to undesirable behaviour which made me think it’s not what I needed.<br class=""><br class=""><blockquote type="cite" class="">On 28 Sep 2018, at 10:40, Daniel Tryba <<a href="mailto:d.tryba@pocos.nl" class="">d.tryba@pocos.nl</a>> wrote:<br class=""><br class="">On Fri, Sep 28, 2018 at 10:07:09AM +0200, Ivan Ribakov wrote:<br class=""><blockquote type="cite" class="">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.<br class=""></blockquote>...<br class=""><blockquote type="cite" class="">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?<br class=""></blockquote><br class="">You can do this by explicitly calling t_relay_to_tcp() instead of<br class="">t_relay().<br class=""><br class="">For example I modified route[RELAY] for a specific destination that<br class="">wants TCP for large INVITEs.<br class=""><br class="">if($avp(dispatcherid)=="1" && $ml>1249)<br class="">{<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>if(!t_relay_to_tcp())<br class=""><span class="Apple-tab-span" style="white-space:pre">  </span>{<br class=""><span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span>if(!t_relay())<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>{<br class=""><span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>sl_reply_error();<br class=""><span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span>}<br class=""><span class="Apple-tab-span" style="white-space:pre">      </span>}<br class="">}<br class="">else<br class="">{<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>if(!t_relay())<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>{<br class=""><span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span>sl_reply_error();<br class=""><span class="Apple-tab-span" style="white-space:pre">      </span>}<br class="">}<br class=""><br class=""><br class="">_______________________________________________<br class="">Kamailio (SER) - Users Mailing List<br class=""><a href="mailto:sr-users@lists.kamailio.org" class="">sr-users@lists.kamailio.org</a><br class="">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users<br class=""></blockquote><br class=""></div></div></blockquote></div><br class=""></body></html>