<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p><br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 30/05/16 16:50, Olle E. Johansson
      wrote:<br>
    </div>
    <blockquote
      cite="mid:710BE5D1-4242-46F9-9251-246D474F9CD9@edvina.net"
      type="cite">
      <pre wrap="">
</pre>
      <blockquote type="cite">
        <pre wrap="">On 30 May 2016, at 15:40, Sergio Serrano <a class="moz-txt-link-rfc2396E" href="mailto:sergio.serrano@avanzada7.com"><sergio.serrano@avanzada7.com></a> wrote:

Hi all,

        I just try integrate Kamailio with external software and We
want taht kamailio doesn't authenticate users. I want that the
autehtication process would be done by external software.  I want To
receive a REGISTER for a user. Then I send a 407 and then when I
receive all paramters for autehtincation(nonce, response, digestURI,
etc, etc etc) send that data to external software and receive if data
is correct, then sent 200 OK and save location in external software. 

Bu t I can see any pseudovariable or enything else to obtain that dato
to provide to external software. Anyone could think that this process
could be done?
</pre>
      </blockquote>
      <pre wrap="">
This is one of the reasons I built  http_client - we fetch the data with
http_client and feed it to the pvar-based authentication.

It’s tricky if you can’t use that since the 200 OK is special and
needs to include all current contacts, not just the recently registred
one. 

So fetch username and pwd from external system or feed external
system with all data to confirm.

</pre>
    </blockquote>
    If the location is saved in the external software, then the Contact
    header(s) for 200ok can be returned in the http response and added
    to the sip reply with append_to_reply(...).<br>
    <br>
    If the location is also saved in kamailio, then it is save(...) that
    generates the 200ok, independent of authentication mechanism. So all
    works fine without need to fetch user/password to use them in
    kamailio.cfg.<br>
    <br>
    For auth in external app - you can get the auth attributes from the
    Proxy-/Authorization header. You can send all that header to the
    external application -- for example, for REGISTER the var
    $hdr(Authorization) will give you those attributes.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a> - <a class="moz-txt-link-freetext" href="http://www.kamailio.org">http://www.kamailio.org</a>
<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></pre>
  </body>
</html>