<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    I don't have the time to look at the code right now, but I remember
    that I still have to tune some matching there, because the local
    port allocated is random by the OS. One of the solutions was to set
    the server name in tls.cfg and then set it via xavp_cfg (see tls
    parameters) before relaying. Another one is to set the port to 0 in
    tls config, so the port is no longer matched.<br>
    <br>
    My plan was to enable matching the ip:port based on a value stored
    in xavp_cfg, but got distracted by other tasks and forgot about it.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 14/10/15 12:40, Pete Kelly wrote:<br>
    </div>
    <blockquote
cite="mid:CAEWH9M8B8NA4HC6-xwZtc+_gEHk6icu-7i_fDK-4mD43KiSY9A@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi
        <div><br>
          I am trying to use the [client] directives in tls.cfg for the
          first time. For my configuration I need to connect to 2
          servers, both via TLS and both using different certs.</div>
        <div><br>
        </div>
        <div>I have defined an entry in tls.cfg like</div>
        <div><br>
        </div>
        <div>[client:<a moz-do-not-send="true"
            href="http://1.2.3.4:5061">1.2.3.4:5061</a>]</div>
        <div>[client:<a moz-do-not-send="true"
            href="http://5.6.7.8:5071">5.6.7.8:5071</a>]</div>
        <div><br>
        </div>
        <div>and I also have an entry in dispatcher tables for each
          server using the URI format</div>
        <div><br>
        </div>
        <div><a class="moz-txt-link-freetext" href="sip:1.2.3.4:5061;transport=tls">sip:1.2.3.4:5061;transport=tls</a></div>
        <div><br>
        </div>
        <div>With this configuration, I expect dispatcher to send
          OPTIONS to each server, and Kamailio to resolve the host in
          dispatcher to the correct client section of tls.cfg and
          negotiate a connection.</div>
        <div><br>
        </div>
        <div>However this is not happening. Dispatcher module is trying
          to send OPTIONS as expected, and it is using TLS as expected
          but it is not using the correct [client] section from tls.cfg.
          Instead it is always falling back to [client:default], and if
          that is not present it then tries to look for some internal
          Kamailio defaults.</div>
        <div><br>
        </div>
        <div>Has anyone come across this issue before? Debug logs don't
          yield anything useful, however my suspicion is that Kamailio
          may be trying to match <a class="moz-txt-link-rfc2396E" href="sip:1.2.3.4:5061;transport=tls">"sip:1.2.3.4:5061;transport=tls"</a> from
          dispatcher module to "<a moz-do-not-send="true"
            href="http://1.2.3.4:5061">1.2.3.4:5061</a>" from tls.cfg.</div>
        <div><br>
        </div>
        <div>Any help or advice would be appreciated</div>
        <div><br>
        </div>
        <div>Regards</div>
        <div>Pete</div>
        <div><br>
        </div>
        <div><br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.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-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Book: SIP Routing With Kamailio - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a></pre>
  </body>
</html>