### Description
Testing on latest master deb nightly build (`5.3.0~dev7+0~20190904005559.1479+buster`) I've noticed that `$Au` is not being set correctly, at least according to my tests.
>From the documentation (https://www.kamailio.org/wiki/cookbooks/devel/pseudovariables#au_-_acc_user…):
_$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 statement in several places in a test box:
xlog("L_NOTICE", "[DEBUG] Au=$Au au=$au aU=$aU ar=$ar fU=$fU fu=$fu - \n");
And when I run through them I get the following:
Initial log (at the beginning of request_route):
```
Sep 5 01:54:39 csbc01 csbc[20380]: NOTICE: {1 1 REGISTER f597522fd7e52fe99f2a54a834101efa@0:0:0:0:0:0:0:0} <script>: [DEBUG] Au=1063362(a)some.domain au=<null> aU=<null> ar=<null> fU=1063362 fu=sip:1063362@some.domain -
```
After a 401 challenge, the following log statements look like this one:
```
Sep 5 01:54:40 csbc01 csbc[20385]: NOTICE: {1 2 REGISTER f597522fd7e52fe99f2a54a834101efa@0:0:0:0:0:0:0:0} <script>: [DEBUG] Au=1063362(a)some.domain au=1063362 aU=1063362 ar=custom-realm fU=1063362 fu=sip:1063362@some.domain -
```
At this point I would expect `$Au` to not have the `@domain` part in it.
And strangely, after an `auth_check()`, it changes again:
```
Sep 5 01:54:40 csbc01 csbc[20385]: NOTICE: {1 2 REGISTER f597522fd7e52fe99f2a54a834101efa@0:0:0:0:0:0:0:0} <script>: [DEBUG] Au=1063362@custom-realm au=1063362 aU=1063362 ar=custom-realm fU=1063362 fu=sip:1063362@some.domain -
```
>From that point onward, it no longer has the domain and now contains the realm.
I believe both these behaviors are incorrect, or at least they don't match what the documentation says.
### Troubleshooting
@henningw commented about this in the email thread I started:
_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(a)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_
### Reproduction
Print `$Au` in logs before challenge, after a successful auth, and after an `auth_check()`
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
root@csbc01:/etc/kamailio# kamailio -v
version: kamailio 5.3.0-dev7 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 8.3.0
root@csbc01:/etc/kamailio#
```
* **Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `uname -a`)
-->
```
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2056
Module: kamailio
Branch: master
Commit: bda770e57200aba4118803a6d332f2440fb0a540
URL: https://github.com/kamailio/kamailio/commit/bda770e57200aba4118803a6d332f24…
Author: Vicente Hernando <vhernando(a)systemonenoc.com>
Committer: Vicente Hernando <vhernando(a)systemonenoc.com>
Date: 2019-09-05T15:32:04+02:00
call_obj: software license.
---
Modified: src/modules/call_obj/call_obj_mod.c
Modified: src/modules/call_obj/cobj.c
Modified: src/modules/call_obj/cobj.h
---
Diff: https://github.com/kamailio/kamailio/commit/bda770e57200aba4118803a6d332f24…
Patch: https://github.com/kamailio/kamailio/commit/bda770e57200aba4118803a6d332f24…
---
diff --git a/src/modules/call_obj/call_obj_mod.c b/src/modules/call_obj/call_obj_mod.c
index 72307e2d86..c136de58e8 100644
--- a/src/modules/call_obj/call_obj_mod.c
+++ b/src/modules/call_obj/call_obj_mod.c
@@ -1,3 +1,25 @@
+/*
+ * CALL_OBJ module
+ *
+ * Copyright (C) 2017-2019 - Sonoc
+ *
+ * This file is part of Kamailio, a free SIP server.
+ *
+ * Kamailio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version
+ *
+ * Kamailio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
#include <inttypes.h>
diff --git a/src/modules/call_obj/cobj.c b/src/modules/call_obj/cobj.c
index cf014b659f..e330a79978 100644
--- a/src/modules/call_obj/cobj.c
+++ b/src/modules/call_obj/cobj.c
@@ -1,3 +1,26 @@
+/*
+ * CALL_OBJ module
+ *
+ * Copyright (C) 2017-2019 - Sonoc
+ *
+ * This file is part of Kamailio, a free SIP server.
+ *
+ * Kamailio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version
+ *
+ * Kamailio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
/**
* Functionality of call_obj module.
*/
diff --git a/src/modules/call_obj/cobj.h b/src/modules/call_obj/cobj.h
index 85aaab6a69..09417da203 100644
--- a/src/modules/call_obj/cobj.h
+++ b/src/modules/call_obj/cobj.h
@@ -1,3 +1,26 @@
+/*
+ * CALL_OBJ module
+ *
+ * Copyright (C) 2017-2019 - Sonoc
+ *
+ * This file is part of Kamailio, a free SIP server.
+ *
+ * Kamailio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version
+ *
+ * Kamailio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
/**
* Header for functionality of Call Object module.
*/
Hello,
the formal notification that the development for the next major version
5.3.0 is now frozen. The focus has to be on testing the master branch.
Also, the master branch should not get commits with new features till
the branch 5.3 is created, expected to happen in 2-4 weeks, a matter of
how testing goes on. Meanwhile, the commits with new features in the C
code can be pushed to personal branches, pull requests can still be
done, but they will be merged after branching 5.3.
Can still be done commits with documentation improvements, enhancements
to related tool (e.g., kamctl, kamcmd) and exporting missing KEMI
functions to the modules already exporting most of the other functions
(done for previous releases, because likely that was a fail to notice,
all functions should be exported for a module at the same time).
Once the branch 5.3 is created, new features can be pushed again to
master branch as usual. From that moment, the v5.3.0 should be out very
soon, time used for further testing but also preparing the release of
packages.
If someone is not sure if a commit brings a new feature, just make a
pull request and it can be discussed there on github portal or via
sr-dev mailing list.
A summary of what is new in upcoming 5.3 is collected at:
* https://www.kamailio.org/wiki/features/new-in-5.3.x
Upgrade guidelines will be collected at:
* https://www.kamailio.org/wiki/install/upgrade/5.1.x-to-5.3.0
Everyone is more than welcome to contribute to the above wiki pages,
especially to the upgrade guidelines, to help everyone else during the
migration process from v5.2.x to 5.3.x.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda