Hello Joel,

I did a quick look into the code, this is basically unchanged since 2008. I also tested 5.2.3, it shows the same behavior.

NOTICE: {1 1 REGISTER 363545605-1445114084-1880652839} <script>: [DEBUG] Au=82621@116.203.XXX.XXX au=<null> aU=<null> fU=82621 fu=sip:82621@116.203.XXX.XXX -

root@sip:~# kamcmd core.version
kamailio 5.2.3 (x86_64/linux)  

I certainly would make more sense in a way like it is documented. Can you easily check an older version?

Cheers,

Henning

Am 08.08.19 um 21:48 schrieb Joel Serrano:
Hi,

Testing on latest master deb nightly build from last night I've noticed that when $au is not available, $Au is being set to $fu (uri) instead of $fU (username).

Docs: https://www.kamailio.org/wiki/cookbooks/devel/pseudovariables

...
$Au - Acc username: username for accounting purposes. It's a selective pseudo variable (inherited from acc module). It returns auth username ($au) if exists or From username ($fU) otherwise.
...

I have the following log in several places in a test box:

xlog("L_NOTICE", "[DEBUG] Au=$Au au=$au aU=$aU fU=$fU fu=$fu - \n");

And when I run through them (on both request and reply routes) I get the following:

Aug  8 14:37:43 csbc01 csbc[9478]: NOTICE: {1 21564 REGISTER d8df9be1-1702e20b@A.B.C.D} <script>: [DEBUG] Au=1002366@some.domain au=<null> aU=<null> fU=1002366 fu=sip:1002366@some.domain -

Aug  8 14:37:43 csbc01 csbc[9479]: NOTICE: {1 21565 REGISTER d8df9be1-1702e20b@A.B.C.D} <script>: [DEBUG] Au=1002366@some.domain au=1002366 aU=1002366 fU=1002366 fu=sip:1002366@some.domain -

Aug  8 14:37:43 csbc01 csbc[9484]: NOTICE: {2 21565 REGISTER d8df9be1-1702e20b@A.B.C.D} <script>: [DEBUG] Au=1002366@some.domain au=<null> aU=<null> fU=1002366 fu=sip:1002366@some.domain -

Those 3 logs belong to the same flow from different places in the config script.

I would expect $Au to never have a "@some.domain" in it, so I assume in some place the replacement is not being done with $fU but with $fu.

@Devs: I'm happy to create a GH issue for tracking etc if required, please let me know!

Cheers, 
Joel.




_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- 
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://skalatan.de/services