<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello,</p>
<p>in KEMI you can do:</p>
<p>KSR.setdsturi(<a class="moz-txt-link-rfc2396E" href="sip:_IP_OR_DOMAIN_:_PORT_;transport=tcp">"sip:_IP_OR_DOMAIN_:_PORT_;transport=tcp"</a>);</p>
<p>KSR.tm.t_relay()<br>
</p>
I will review what tm functions are not exported yet and add those
that are still relevant. In Kamailio we had the t_relay_to(...),
which allow setting the transport in the parameter, the variants for
t_relay_to_tcp/tls/... were retrieve via tm branch and I haven't use
them.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<div class="moz-cite-prefix">On 28.09.18 12:07, Ivan Ribakov wrote:<br>
</div>
<blockquote type="cite"
cite="mid:B72306CC-B08E-42E7-B62A-1919CB200387@zaleos.net">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<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="" moz-do-not-send="true">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=""
moz-do-not-send="true">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="" moz-do-not-send="true">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=""
moz-do-not-send="true">sr-users@lists.kamailio.org</a><br
class="">
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br class="">
</blockquote>
<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio World Conference -- <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a>
Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a></pre>
</body>
</html>