<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hello,</p>
    <p>you should use the format with userid and timestamp only for
      authentication username, not for From/To URI username. These are
      two different fields and they accept different formats, one is set
      in Proxy-/Authorization header and one in From/To SIP URI, the
      latter must follow the grammar for SIP URI username.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="moz-cite-prefix">On 04.04.22 17:31, Luciano Motti wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAJgOYG_QPXcFQuOF5kO-rpNsue8Kok7kz9r7UvjdwRHC9ZS3ow@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr"><span style="color:rgb(0,0,0)">Hi!</span>
        <div style="color:rgb(0,0,0)"><br>
        </div>
        <div style="color:rgb(0,0,0)">I was able to successfully use the
          auth_ephemeral module on my environment:</div>
        <div style="color:rgb(0,0,0)">Kamailio > Asterisk > ARI</div>
        <div style="color:rgb(0,0,0)"><br>
        </div>
        <div style="color:rgb(0,0,0)">I ran into a problem with ARI,
          where Asterisk wouldn't send the complete from URI to ARI
          program, just the first part (timestamp), and the most
          important part (the username) isn't forwarded.</div>
        <div style="color:rgb(0,0,0)"><br>
        </div>
        <div style="color:rgb(0,0,0)">For example:</div>
        <div style="color:rgb(0,0,0)">Kamailio username: 1649106119:1001</div>
        <div style="color:rgb(0,0,0)">Asterisk only forwards 1649106119
          to ARI, which makes it impossible for me to track the user.</div>
        <div style="color:rgb(0,0,0)"><br>
        </div>
        <div style="color:rgb(0,0,0)">So I planned on using the
          deprecated username_format from Auth Ephemeral module:</div>
        <div style="color:rgb(0,0,0)"><a
href="https://kamailio.org/docs/modules/4.1.x/modules/auth_ephemeral.html#auth_eph.p.username_format"
            target="_blank" moz-do-not-send="true"
            class="moz-txt-link-freetext">https://kamailio.org/docs/modules/4.1.x/modules/auth_ephemeral.html#auth_eph.p.username_format</a><br>
        </div>
        <div style="color:rgb(0,0,0)"><br>
        </div>
        <div style="color:rgb(0,0,0)">By switching the timestamp with
          the username, my problems would be fixed.</div>
        <div style="color:rgb(0,0,0)"><br>
        </div>
        <div style="color:rgb(0,0,0)">After setting the variable, and
          trying to register on Kamailio with username 1001:1649106119,
          I get an error message: SIP/2.0 400 Bad From URI</div>
        <div style="color:rgb(0,0,0)"><br>
        </div>
        <div style="color:rgb(0,0,0)">Am I doing something wrong?</div>
        <div style="color:rgb(0,0,0)"><br>
        </div>
        <div style="color:rgb(0,0,0)">Thanks!</div>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * <a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
  * <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>
    <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 Advanced Training - Online
  * <a class="moz-txt-link-freetext" href="https://www.asipto.com/sw/kamailio-advanced-training-online/">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
  </body>
</html>