Hi community,
I am preparing a setup of Kamailio with radius accounting on a docker-compose environment.
When configuring the acc_radius module I had to navigate through some old doc by Daniel
and inspecting the code itself. The thing is that it seems working, but not. And, yes, I
already trying without docker :)
Context: two containers, host newtork, to keep it simple
- one with kamailio + modules (acc, acc_radius with rad_cli) + radius client
configuration
- another with freeradius + radius client configuration.
I ensure that all data correspond and radius config is fine and spin them up. Run some
radius commands to test and let's try some accounting...
Executing a failed call and triggering the account flag method, I receive an opaque -1
error from the module:
```
kamailio-1 | 1(20) INFO: {1 22 INVITE yutncivdtflvzga@PT-96} <script>: Initial
requests
kamailio-1 | 1(20) INFO: {1 22 INVITE yutncivdtflvzga@PT-96} <script>: FLAG
FLT_ACC set
kamailio-1 | 1(20) NOTICE: {1 22 INVITE yutncivdtflvzga@PT-96} acc [acc.c:286]:
acc_log_request(): ACC: call missed:
timestamp=1709746392;method=INVITE;from_tag=wvaqi;to_tag=1a86669fc745788378faa461e7993953-78550000;call_id=yutncivdtflvzga@PT-96;code=404;reason=Not
Found;src_user=1000;src_domain=kamailio-local;src_ip=172.20.0.1;dst_ouser=1001;dst_user=1001;dst_domain=kamailio-local
kamailio-1 | 1(20) ERROR: {1 22 INVITE yutncivdtflvzga@PT-96} acc_radius
[acc_radius_mod.c:497]: acc_radius_send_request(): Radius accounting - ERROR - result:
-1
```
Log accounting is working ok, but radius accounting not. Time for troubleshooting.
I tried to enable client debugging, but the module does not respond. So I modify the
source directly... tested with `radclient` , `radtest`, `radsniff`... all seems to work
when trying manually... I also used an internal radcli fuction `rc_check()` and it works.
Meanwhile, I was unable to make it work with the module and the radcli library.
So another log output using internal functions to debug the configuration:
```
kamailio-1 | 0(18) INFO: acc_radius [acc_radius_mod.c:312]: check_cfg(): Clave:
nas-identifier, Valor: radius-wac
kamailio-1 | 0(18) INFO: acc_radius [acc_radius_mod.c:312]: check_cfg(): Clave:
authserver, Valor: radius
kamailio-1 | 0(18) INFO: acc_radius [acc_radius_mod.c:312]: check_cfg(): Clave:
acctserver, Valor: radius
kamailio-1 | 0(18) INFO: acc_radius [acc_radius_mod.c:306]: check_cfg(): Clave: servers,
Valor: /usr/local/etc/radcli/servers - OK file found
kamailio-1 | 0(18) INFO: acc_radius [acc_radius_mod.c:306]: check_cfg(): Clave:
dictionary, Valor: /usr/local/etc/radcli/dictionary - OK file found
kamailio-1 | 0(18) INFO: acc_radius [acc_radius_mod.c:300]: check_cfg(): Clave:
default_realm, Valor: -- not set --
kamailio-1 | 0(18) INFO: acc_radius [acc_radius_mod.c:312]: check_cfg(): Clave:
radius_timeout, Valor: 10
kamailio-1 | 0(18) INFO: acc_radius [acc_radius_mod.c:312]: check_cfg(): Clave:
radius_retries, Valor: 3
kamailio-1 | 0(18) INFO: acc_radius [acc_radius_mod.c:312]: check_cfg(): Clave:
bindaddr, Valor: *
kamailio-1 | 0(18) INFO: acc_radius [acc_radius_mod.c:312]: check_cfg(): Clave:
clientdebug, Valor: 1
kamailio-1 | 0(18) INFO: acc_radius [acc_radius_mod.c:369]: init_acc_rad():
RC_ACCT_INIT: rc_test_config looks good
kamailio-1 | 0(18) INFO: acc_radius [acc_radius_mod.c:375]: init_acc_rad():
RC_ACCT_INIT: Config applyed ok
```
The configuration seems ok, accepted by the library and seems to be applied properly, but
when trying to parse its values... all seems like rubish...
```
kamailio-1 | 0(18) INFO: acc_radius [acc_radius_mod.c:401]: init_acc_rad():
RC_ACCT_INIT: Name: P�y:^
kamailio-1 | 0(18) INFO: acc_radius [acc_radius_mod.c:402]: init_acc_rad():
RC_ACCT_INIT: Max 1
kamailio-1 | 0(18) INFO: acc_radius [acc_radius_mod.c:403]: init_acc_rad():
RC_ACCT_INIT: Port: 125489528
kamailio-1 | 0(18) INFO: acc_radius [acc_radius_mod.c:404]: init_acc_rad():
RC_ACCT_INIT: Secret:
kamailio-1 | 0(18) ERROR: acc_radius [acc_radius_mod.c:410]: init_acc_rad():
RC_CLIENTDEBUG: No clientdebug specified
```
I'm using `libradcli4 1.2.11-1+b2` for running on the container and `libradcli-dev
1.2.11-1build1` for compiling.
Open to hear ideas, somebody using it actively on latest 5.7 release?
Some updated documentation flying around?
I was thinking to open a GitHub issue to handle the documentation issue.
Thanks in advance!
Show replies by date