<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hello,<br>
      <br>
      On 25/01/2017 00:11, Pranathi Venkatayogi wrote:<br>
    </div>
    <blockquote
      cite="mid:ea9f745ea799457faf9b1e094936b39c@TACEXH01.cyracom.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
      <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;
        font-weight:normal;
        font-style:normal;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;
        font-weight:normal;
        font-style:normal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1123815523;
        mso-list-type:hybrid;
        mso-list-template-ids:-326191912 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span
            style="font-size:11.0pt;font-family:"Calibri",sans-serif">In
            the case below though TLS session is established between
            proxy1 and proxy2, invite is fwded on UDP.<o:p></o:p></span></p>
        <p class="MsoListParagraph"
          style="text-indent:-.25in;mso-list:l0 level1 lfo1"><!--[if !supportLists]--><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif"><span
              style="mso-list:Ignore">1.<span style="font:7.0pt
                "Times New Roman"">     
              </span></span></span><!--[endif]--><span
            style="font-size:11.0pt;font-family:"Calibri",sans-serif">How
            to force Kamailio to use existing tls session to
            communicate? (proxy1)</span></p>
      </div>
    </blockquote>
    <br>
    you can force the destination of a packet with:<br>
    <br>
    $du = <a class="moz-txt-link-rfc2396E" href="sip:ip:port;transport=tls">"sip:ip:port;transport=tls"</a>;<br>
    t_relay();<br>
    <br>
    or use t_relay_to(...) or t_relay_to_tls(...) functions from tm
    module (see its README).<br>
    <br>
    <blockquote
      cite="mid:ea9f745ea799457faf9b1e094936b39c@TACEXH01.cyracom.com"
      type="cite">
      <div class="WordSection1">
        <p class="MsoListParagraph"
          style="text-indent:-.25in;mso-list:l0 level1 lfo1"><span
            style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p></o:p></span></p>
        <p class="MsoListParagraph"
          style="text-indent:-.25in;mso-list:l0 level1 lfo1"><!--[if !supportLists]--><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif"><span
              style="mso-list:Ignore">2.<span style="font:7.0pt
                "Times New Roman"">     
              </span></span></span><!--[endif]--><span
            style="font-size:11.0pt;font-family:"Calibri",sans-serif">What
            is the command to look at if existing tls sessions are
            present from proxy1
            <o:p></o:p></span></p>
        <p class="MsoListParagraph"
          style="margin-left:1.0in;text-indent:-.25in;mso-list:l0 level2
          lfo1">
          <!--[if !supportLists]--><span
            style="font-size:11.0pt;font-family:"Calibri",sans-serif"><span
              style="mso-list:Ignore">a.<span style="font:7.0pt
                "Times New Roman"">     
              </span></span></span><!--[endif]--><span
            style="font-size:11.0pt;font-family:"Calibri",sans-serif">kamcmd
            tls.list does it, but I need one which works from within
            config.</span></p>
      </div>
    </blockquote>
    <br>
    You can execute a RPC command from config file using jsonrpc module
    and then can access the response using a json module like jansson:<br>
    <br>
<a class="moz-txt-link-freetext" href="http://kamailio.org/docs/modules/4.4.x/modules/jsonrpc-s.html#jsonrpc-s.f.jsonrpc_exec">http://kamailio.org/docs/modules/4.4.x/modules/jsonrpc-s.html#jsonrpc-s.f.jsonrpc_exec</a><br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <blockquote
      cite="mid:ea9f745ea799457faf9b1e094936b39c@TACEXH01.cyracom.com"
      type="cite">
      <div class="WordSection1">
        <p class="MsoListParagraph"
          style="margin-left:1.0in;text-indent:-.25in;mso-list:l0 level2
          lfo1"><span
            style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
        <div>
          <div style="border:none;border-top:solid #E1E1E1
            1.0pt;padding:3.0pt 0in 0in 0in">
            <p class="MsoNormal"><b><span
                  style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif">
                Pranathi Venkatayogi
                <br>
                <b>Sent:</b> Tuesday, January 24, 2017 11:02 AM<br>
                <b>To:</b> 'Kamailio (SER) - Users Mailing List'
                <a class="moz-txt-link-rfc2396E" href="mailto:sr-users@lists.sip-router.org"><sr-users@lists.sip-router.org></a><br>
                <b>Subject:</b> How does Kamailio decide which protocol
                to use when fwding to another proxy?<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><span
            style="font-size:11.0pt;font-family:"Calibri",sans-serif">Hi,<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:11.0pt;font-family:"Calibri",sans-serif"> 
            I have two instances of Kamailio acting as edge proxies. One
            on the customer side and one on the agent side.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:11.0pt;font-family:"Calibri",sans-serif"> 
            Like: customer -> proxy1 -> proxy2 -> agent.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:11.0pt;font-family:"Calibri",sans-serif"> 
            Both customer and agent are registered to proxy1/proxy2 via
            TLS.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:11.0pt;font-family:"Calibri",sans-serif"> 
            However when proxy1 forwards to proxy2, it is using UDP. How
            can I force it to use TLS?<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:11.0pt;font-family:"Calibri",sans-serif"> 
            Attached is the result of nslookup on the domain:
            translation.sms-test.cyracom.com.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:11.0pt;font-family:"Calibri",sans-serif">Thanks<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:11.0pt;font-family:"Calibri",sans-serif">Pranathi<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
      </div>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<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 Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - May 8-10, 2017 - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
  </body>
</html>