<div dir="ltr">It worked. <br><div><br></div><div>Thanks a lot!</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 5, 2022 at 5:59 AM Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div>
    <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>On 04.04.22 17:31, Luciano Motti wrote:<br>
    </div>
    <blockquote type="cite">
      
      <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">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></fieldset>
      <pre>__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * <a href="mailto:sr-users@lists.kamailio.org" target="_blank">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 href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <pre cols="72">-- 
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Online
  * <a href="https://www.asipto.com/sw/kamailio-advanced-training-online/" target="_blank">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
  </div>

</blockquote></div>