Hello,

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.

Cheers,
Daniel

On 04.04.22 17:31, Luciano Motti wrote:
Hi!

I was able to successfully use the auth_ephemeral module on my environment:
Kamailio > Asterisk > ARI

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.

For example:
Kamailio username: 1649106119:1001
Asterisk only forwards 1649106119 to ARI, which makes it impossible for me to track the user.

So I planned on using the deprecated username_format from Auth Ephemeral module:
https://kamailio.org/docs/modules/4.1.x/modules/auth_ephemeral.html#auth_eph.p.username_format

By switching the timestamp with the username, my problems would be fixed.

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

Am I doing something wrong?

Thanks!

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Online
  * https://www.asipto.com/sw/kamailio-advanced-training-online/