[SR-Users] Re: [auth_radius.c:123]: mod_init(): failed to open configuration file

2023-05-12 Thread Henning Westerholt
Hello,

ah, good find, thanks for sharing the solution.

The module seems to just use the rc_read_config option, not sure if this allows 
the addition of additional log messages. But a comment to the module docs could 
of course be added.

Cheers,

Henning

From: Denys Pozniak 
Sent: Freitag, 12. Mai 2023 09:55
To: mico...@gmail.com; Kamailio (SER) - Users Mailing List 

Subject: [SR-Users] Re: [auth_radius.c:123]: mod_init(): failed to open 
configuration file

Hello!

Figured out the source of the problem.
The radiusclient-ng library didn't like the radius_deadtime option (which has 
been migrated from the freeradius-client library), commented it out and 
everything works.
Maybe it makes sense to add additional logging to the configuration file to 
avoid such problems?

/etc/radiusclient-ng/radiusclient.conf
...
#radius_deadtime 30
...

чт, 11 мая 2023 г. в 12:41, Denys Pozniak 
mailto:denys.pozn...@gmail.com>>:
In this commit, the radius library was changed specifically for the version of 
Centos 7:
https://github.com/kamailio/kamailio/commit/a3ce062fdec2d3a5d5e46f49c9d0ea9d449a1bec


%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} == 8
Requires:   freeradius-client
BuildRequires:  freeradius-client-devel
%else
Requires:   radiusclient-ng
BuildRequires:  radiusclient-ng-devel
%endif



чт, 11 мая 2023 г. в 11:56, Denys Pozniak 
mailto:denys.pozn...@gmail.com>>:
As far as I can see, the new version of Kamailio requires radiusclient-ng, 
although the current one old worked with freeradius-client.
Maybe there is a reason?


чт, 11 мая 2023 г. в 11:35, Denys Pozniak 
mailto:denys.pozn...@gmail.com>>:
Hello!

>Is it the same radius client library used for the two test cases?
>It is the same operating system?
>In other words, have you tried with the two version on exactly the same system?

That's exactly what it is, in two cases the operating system and the radius 
library are the same, only the difference is in the version of Kamailio.

CentOS Linux release 7.9.2009 (Core)
freeradius-utils-3.0.13-15.el7.x86_64
freeradius-3.0.13-15.el7.x86_64
freeradius-client-1.1.7-16.el7.centos.x86_64

I connected via strace to kamailio 5.6.4, maybe this output will somehow 
clarify the situation:

...
write(2, " 0(20677) INFO: auth [auth_mod.c"..., 107 0(20677) INFO: auth 
[auth_mod.c:346]: mod_init(): qop set, but nonce-count (nonce_count) support 
disabled
) = 107
write(2, " 0(20677) DEBUG:  [core/sr"..., 72 0(20677) DEBUG:  
[core/sr_module.c:969]: init_mod(): auth_radius
) = 72
open("/etc/radiusclient/radiusclient.conf", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=487, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7f2df0119000
read(4, "auth_order  radius,local\nlog"..., 4096) = 487
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 5
connect(5, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 
ENOENT (No such file or directory)
close(5)= 0
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 5
connect(5, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 
ENOENT (No such file or directory)
close(5)= 0
open("/etc/services", O_RDONLY|O_CLOEXEC) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=670293, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7f2df0118000
read(5, "# /etc/services:\n# $Id: services"..., 4096) = 4096
read(5, " 74/udp "..., 4096) = 4096
read(5, " # Quick Mail Transfer Proto"..., 4096) = 4096
read(5, "636/udp "..., 4096) = 4096
read(5, "  # Microsoft-SQL-Monito"..., 4096) = 4096
close(5)= 0
munmap(0x7f2df0118000, 4096)= 0
open("/etc/services", O_RDONLY|O_CLOEXEC) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=670293, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7f2df0118000
read(5, "# /etc/services:\n# $Id: services"..., 4096) = 4096
read(5, " 74/udp "..., 4096) = 4096
read(5, " # Quick Mail Transfer Proto"..., 4096) = 4096
read(5, "636/udp "..., 4096) = 4096
read(5, "  # Microsoft-SQL-Monito"..., 4096) = 4096
close(5)= 0
munmap(0x7f2df0118000, 4096)= 0
socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 5
connect(5, {sa_family=AF_UNIX, sun_path="/dev/log"}, 110) = 0
sendto(5, "<11>May 11 10:20:50 kamailio: /e"..., 113, MSG_NOSIGNAL, NULL, 0) = 
113
close(4)= 0
munmap(0x7f2df0119000, 4096)= 0
write(2, " 0(20677) ERROR: auth_radius [au"..., 97 0(20677) ERROR: auth_radius 
[auth_radius.c:123]: mod_init(): failed to open configuration file
) = 97
write(2, " 0(20677) ERROR:  [core/sr"..., 149 0(20677) ERROR:  
[core/sr_module.c:975]: init_mod(): Error while initializing module auth_radius 

[SR-Users] How to prevent run-away dialogues?

2023-05-12 Thread Benoît Panizzon
Hi team

Is there any way to get correct CDRS when using the dialog module and
restarting kamailio?

I have configured the dialog timeout to be 12 hours.

But today while doing IC billing, we stumbled over a call that lasted
for a week. Probably due to a stale entry in the database dialogue
tables left over after a kamailio restart.

Looking at the logs there definitely was something wrong:

dialog [dlg_req_within.c:211]: bye_reply_cb(): inconsistent dlg timer
data on dlg 0x7f153f503778 [956:2612] with clid '35BEFD13@7f33ff47' and
tags '7f33ff47+1+75300082+dde85140' '3891401256-2097511021'

acc [acc_cdr.c:229]: db_write_cdr(): fallback to dlg_only search
because of message doesn't exist.

-- 
Mit freundlichen Grüssen

-Benoît Panizzon- @ HomeOffice und normal erreichbar
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: kamcmd ul.db_contacts how to specify table name?

2023-05-12 Thread Benoît Panizzon
> Kamcmd complains the table is not found. What would be the correct
> syntax to provide the table name?

Sigh, once more, answering myself: db_mode=3 only!

-- 
Mit freundlichen Grüssen

-Benoît Panizzon- @ HomeOffice und normal erreichbar
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] kamcmd ul.db_contacts how to specify table name?

2023-05-12 Thread Benoît Panizzon
Good morning.

I'm trying to get the number of registered contacts with kamcmd
ul.db_contacts.

The table has the default name 'location'.

But no matter what I try:

kamcmd ul.db_contacts location
kamcmd ul.db_contacts s:location
kamcmd ul.db_contacts database.location
kamcmd ul.db_contacts s:database.location

Kamcmd complains the table is not found. What would be the correct
syntax to provide the table name?

Attempted with Kamailio 5.5 and 5.6

-- 
Mit freundlichen Grüssen

-Benoît Panizzon- @ HomeOffice und normal erreichbar
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: [auth_radius.c:123]: mod_init(): failed to open configuration file

2023-05-12 Thread Denys Pozniak
Hello!

Figured out the source of the problem.
The radiusclient-ng library didn't like the radius_deadtime option (which
has been migrated from the freeradius-client library), commented it out and
everything works.
Maybe it makes sense to add additional logging to the configuration file to
avoid such problems?

/etc/radiusclient-ng/radiusclient.conf
...
#radius_deadtime 30
...

чт, 11 мая 2023 г. в 12:41, Denys Pozniak :

> In this commit, the radius library was changed specifically for the
> version of Centos 7:
>
> https://github.com/kamailio/kamailio/commit/a3ce062fdec2d3a5d5e46f49c9d0ea9d449a1bec
>
>
>
>
>
>
>
>
>
> *%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} == 8Requires:
> freeradius-clientBuildRequires:  freeradius-client-devel%elseRequires:
> radiusclient-ngBuildRequires:  radiusclient-ng-devel%endif*
>
>
>
> чт, 11 мая 2023 г. в 11:56, Denys Pozniak :
>
>> As far as I can see, the new version of Kamailio requires
>> radiusclient-ng, although the current one old worked with freeradius-client.
>> Maybe there is a reason?
>>
>>
>> чт, 11 мая 2023 г. в 11:35, Denys Pozniak :
>>
>>> Hello!
>>>
>>> >Is it the same radius client library used for the two test cases?
>>> >It is the same operating system?
>>> >In other words, have you tried with the two version on exactly the same
>>> system?
>>>
>>> That's exactly what it is, in two cases the operating system and the
>>> radius library are the same, only the difference is in the version of
>>> Kamailio.
>>>
>>> CentOS Linux release 7.9.2009 (Core)
>>> freeradius-utils-3.0.13-15.el7.x86_64
>>> freeradius-3.0.13-15.el7.x86_64
>>> freeradius-client-1.1.7-16.el7.centos.x86_64
>>>
>>> I connected via strace to kamailio 5.6.4, maybe this output will somehow
>>> clarify the situation:
>>>
>>> ...
>>> write(2, " 0(20677) INFO: auth [auth_mod.c"..., 107 0(20677) INFO: auth
>>> [auth_mod.c:346]: mod_init(): qop set, but nonce-count (nonce_count)
>>> support disabled
>>> ) = 107
>>> write(2, " 0(20677) DEBUG:  [core/sr"..., 72 0(20677) DEBUG:
>>>  [core/sr_module.c:969]: init_mod(): auth_radius
>>> ) = 72
>>> open("/etc/radiusclient/radiusclient.conf", O_RDONLY) = 4
>>> fstat(4, {st_mode=S_IFREG|0644, st_size=487, ...}) = 0
>>> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
>>> = 0x7f2df0119000
>>> read(4, "auth_order  radius,local\nlog"..., 4096) = 487
>>> socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 5
>>> connect(5, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) =
>>> -1 ENOENT (No such file or directory)
>>> close(5)= 0
>>> socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 5
>>> connect(5, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) =
>>> -1 ENOENT (No such file or directory)
>>> close(5)= 0
>>> open("/etc/services", O_RDONLY|O_CLOEXEC) = 5
>>> fstat(5, {st_mode=S_IFREG|0644, st_size=670293, ...}) = 0
>>> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
>>> = 0x7f2df0118000
>>> read(5, "# /etc/services:\n# $Id: services"..., 4096) = 4096
>>> read(5, " 74/udp "..., 4096) = 4096
>>> read(5, " # Quick Mail Transfer Proto"..., 4096) = 4096
>>> read(5, "636/udp "..., 4096) = 4096
>>> read(5, "  # Microsoft-SQL-Monito"..., 4096) = 4096
>>> close(5)= 0
>>> munmap(0x7f2df0118000, 4096)= 0
>>> open("/etc/services", O_RDONLY|O_CLOEXEC) = 5
>>> fstat(5, {st_mode=S_IFREG|0644, st_size=670293, ...}) = 0
>>> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
>>> = 0x7f2df0118000
>>> read(5, "# /etc/services:\n# $Id: services"..., 4096) = 4096
>>> read(5, " 74/udp "..., 4096) = 4096
>>> read(5, " # Quick Mail Transfer Proto"..., 4096) = 4096
>>> read(5, "636/udp "..., 4096) = 4096
>>> read(5, "  # Microsoft-SQL-Monito"..., 4096) = 4096
>>> close(5)= 0
>>> munmap(0x7f2df0118000, 4096)= 0
>>> socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 5
>>> connect(5, {sa_family=AF_UNIX, sun_path="/dev/log"}, 110) = 0
>>> sendto(5, "<11>May 11 10:20:50 kamailio: /e"..., 113, MSG_NOSIGNAL,
>>> NULL, 0) = 113
>>> close(4)= 0
>>> munmap(0x7f2df0119000, 4096)= 0
>>> write(2, " 0(20677) ERROR: auth_radius [au"..., 97 0(20677) ERROR:
>>> auth_radius [auth_radius.c:123]: mod_init(): failed to open configuration
>>> file
>>> ) = 97
>>> write(2, " 0(20677) ERROR:  [core/sr"..., 149 0(20677) ERROR:
>>>  [core/sr_module.c:975]: init_mod(): Error while initializing module
>>> auth_radius (/usr/lib64/kamailio/modules/auth_radius.so)
>>> ) = 149
>>> write(2, "ERROR: error while initializing "..., 40ERROR: error while
>>> initializing modules
>>> ) = 40
>>> rt_sigaction(SIGALRM, {sa_handler=0x41f3af, sa_mask=[ALRM],
>>> sa_flags=SA_RESTORER|SA_RESTART,