### Description
If the file loaded with the modparam "load" uses CommonJS modules (Issue #3037-PR #3038), the modules are not reloaded when issuing the command app_jsdt.reload. Only the "main" file is reloaded.
#### Reproduction
1 - Start Kamailio with those files as the initial configuration
```generic
# kamailio.cfg
## Only the part concerning app_jsdt is included.
## The rest of the config file is ommited for the sake of clarity
loadmodule "app_jsdt.so"
modparam("app_jsdt", "load", "/etc/kamailio/js/index.js")
modparam("app_jsdt", "mode", 1)
cfgengine "jsdt"
```
```js
// index.js
var myModule = require('./myModule');
function ksr_request_route() {
myModule.myFunction()
KSR.log("info", "KSR.log called from the index.js file");
}
```
```js
// myModule.js
exports.myFunction = function() {
KSR.log("info", "KSR.log called from the myModule.js file"
}
```
2 - Modify the myModule.js file
```js
// myModule.js
exports.myFunction = function() {
KSR.log("info", "KSR.log called from the MODIFIED myModule.js file"
}
```
3 - Run the reload command
```console
foo@bar:~# kamcmd app_jsdt.reload
{
old: 0
new: 1
}
```
> Log file
>
> INFO: app_jsdt [app_jsdt_api.c:1557]: app_jsdt_rpc_reload(): marking for reload js script file: /etc/kamailio/js/index.js (0 => 0)
> DEBUG: app_jsdt [app_jsdt_api.c:534]: jsdt_kemi_reload_script(): reloading js script file: /etc/kamailio/js/index.js (0 => 1)
4 - The log file still show those lines:
> Log file
>
>INFO <core> [core/kemi.c:156]: sr_kemi_core_log(): KSR.log called from the myModule.js file
>INFO <core> [core/kemi.c:156]: sr_kemi_core_log(): KSR.log called from the index.js file
5 - Modify the index.js file
```js
// index.js
var myModule = require('./myModule');
function ksr_request_route() {
myModule.myFunction()
KSR.log("info", "KSR.log called from the MODIFIED index.js file");
}
```
6 - Run the reload command
```console
foo@bar:~# kamcmd app_jsdt.reload
{
old: 1
new: 2
}
```
> Log file
>
> INFO: app_jsdt [app_jsdt_api.c:1557]: app_jsdt_rpc_reload(): marking for reload js script file: /etc/kamailio/js/index.js (0 => 1)
> DEBUG: app_jsdt [app_jsdt_api.c:534]: jsdt_kemi_reload_script(): reloading js script file: /etc/kamailio/js/index.js (1 => 2)
7 - The log file now show those lines:
> Log file
>
> INFO <core> [core/kemi.c:156]: sr_kemi_core_log(): KSR.log called from the myModule.js file
> INFO <core> [core/kemi.c:156]: sr_kemi_core_log(): KSR.log called from the MODIFIED index.js file
8 - Restart kamailio completly
9 - The log file now show those lines:
> Log file
>
> INFO <core> [core/kemi.c:156]: sr_kemi_core_log(): KSR.log called from the MODIFIED myModule.js file
> INFO <core> [core/kemi.c:156]: sr_kemi_core_log(): KSR.log called from the MODIFIED index.js file
### Possible Solutions
Sorry, I would really like to provide one, but, as I'm a new Kamailio user, I don't know all the internals yet.
### Additional Information
* **Kamailio Version**
```console
foo@bar:~# kamailio -v
version: kamailio 5.6.0 (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_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
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 10.2.1
```
* **Operating System**:
```console
foo@bar:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
foo@bar:~# uname -a
Linux localhost 5.10.0-14-amd64 #1 SMP Debian 5.10.113-1 (2022-04-29) x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3145
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3145(a)github.com>
### Description
OPTIONS keepalives sent by usrloc are not being traced with HEP/Homer
### Troubleshooting
#### Reproduction
Module setup:
modparam("siptrace", "duplicate_uri","sip:HOMERIP:9060");
modparam("siptrace", "hep_mode_on",1);
modparam("siptrace", "trace_to_database",0);
modparam("siptrace", "trace_flag",22);
modparam("siptrace", "trace_on", 1);
modparam("siptrace", "hep_version", 3);
modparam("siptrace", "trace_mode", 1)
I believe the above setup should duplicate ALL packets to homer, which is working just fine, except for usrloc-generated OPTIONS.
The 200 OK from endpoints is showing up just fine, just not the initial request.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3136
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3136(a)github.com>
ITNOA
### Description
I think for non-db deployment of Kamailio it is very useful to add support static data (like another configurations) for caller numbers list in user blocklist module. because if we do not have this feature we cannot use this module in non-db deployment of Kamailio.
### Expected behavior
We have a configuration files (like dispatcher file) that contains below information in format of space separated list (like dispatcher file format)
```
+----+----------------+-------------+-----------+-----------+
| id | username | domain | prefix | whitelist |
+----+----------------+-------------+-----------+-----------+
| 23 | 49721123456788 | | 1234 | 0 |
| 22 | 49721123456788 | | 123456788 | 1 |
| 21 | 49721123456789 | | 12345 | 0 |
| 20 | 494675231 | | 499034133 | 1 |
| 19 | 494675231 | test | 499034132 | 0 |
| 18 | 494675453 | test.domain | 49901 | 0 |
| 17 | 494675454 | | 49900 | 0 |
+----+----------------+-------------+-----------+-----------+
```
and user blocklist module read this file and load it, and apply this data for blocking call
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3132
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3132(a)github.com>
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
-->
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
I incremented sess-version w/ value `2147483648` via `$sdp(sess_version) = -1` as well as `$sdp(sess_version) = 2147483648`.
sess-version in SDP should be 2147483649 but is `-1941279658`.
### Troubleshooting
[RFC4566 5.2. Origin ("o=")](https://datatracker.ietf.org/doc/html/rfc4566#section-5.2)
```
<sess-version> is a version number for this session description. Its
usage is up to the creating tool, so long as <sess-version> is
increased when a modification is made to the session data. Again,
it is RECOMMENDED that an NTP format timestamp is used.
```
[Wikipedia NTP Timestamps](https://en.wikipedia.org/wiki/Network_Time_Protocol#Timestamps)
```
The 64-bit binary fixed-point timestamps used by NTP consist of a 32-bit part for seconds and a 32-bit part for fractional second, giving a time scale that rolls over every 232 seconds (136 years) and a theoretical resolution of 2−32 seconds (233 picoseconds). NTP uses an epoch of January 1, 1900. Therefore, the first rollover occurs on February 7, 2036.[28][29]
```
#### Reproduction
Receive SDP w/ sess-version greater equal 2^31 (2147483648) and increase version via `$sdp(sess-version) = -1` or setting a value greater than 2^31.
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### Log Messages
<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
May 02 06:43:20.578496 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} <core> [core/parser/sdp/sdp_helpr_funcs.c:622]: extract_sess_version(): oline(46): >o=user1 53655765 2147483648 IN IP4 127.0.0.1
<
May 02 06:43:20.578501 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} <core> [core/parser/sdp/sdp_helpr_funcs.c:651]: extract_sess_version(): end 10: >2147483648<
May 02 06:43:20.578508 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} <core> [core/parser/sdp/sdp_helpr_funcs.c:506]: extract_mediaip(): located IP address [127.0.0.1] in `o=' field
May 02 06:43:20.578512 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} <core> [core/parser/sdp/sdp_helpr_funcs.c:506]: extract_mediaip(): located IP address [127.0.0.1] in `c=' field
May 02 06:43:20.578532 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} sdpops [sdpops_mod.c:1918]: sdp_get_sess_version(): sdp_session_num 0 sess-version: 2147483648
May 02 06:43:20.578536 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} sdpops [sdpops_mod.c:1923]: sdp_get_sess_version(): sdp_session_num 1
May 02 06:43:20.578576 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} sdpops [sdpops_mod.c:1918]: sdp_get_sess_version(): sdp_session_num 0 sess-version: 2147483648
May 02 06:43:20.578581 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} sdpops [sdpops_mod.c:1923]: sdp_get_sess_version(): sdp_session_num 1
May 02 06:43:20.578695 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} sdpops [sdpops_mod.c:2111]: pv_set_sdp(): res->flags: 24
May 02 06:43:20.578702 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} sdpops [sdpops_mod.c:2112]: pv_set_sdp(): PV_TYPE_INT: 16
May 02 06:43:20.578705 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} sdpops [sdpops_mod.c:2113]: pv_set_sdp(): PV_VAL_INT: 8
May 02 06:43:20.578708 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} sdpops [sdpops_mod.c:2116]: pv_set_sdp(): param.pvn.u.isname.name.n = 1
May 02 06:43:20.578710 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} sdpops [sdpops_mod.c:2125]: pv_set_sdp(): do $sdp(sess_version) = -1941279658
May 02 06:43:20.578713 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} sdpops [sdpops_mod.c:1918]: sdp_get_sess_version(): sdp_session_num 0 sess-version: 2147483648
May 02 06:43:20.578716 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} sdpops [sdpops_mod.c:1923]: sdp_get_sess_version(): sdp_session_num 1
May 02 06:43:20.578750 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} sdpops [sdpops_mod.c:1971]: sdp_set_sess_version(): old_sess_version_num: -2147483648 autoincrement: 0
May 02 06:43:20.578756 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} sdpops [sdpops_mod.c:1972]: sdp_set_sess_version(): *new_sess_version_num: -1941279658 autoincrement: 0
```
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.5.4 (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_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
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 10.2.1
```
* **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 `lsb_release -a` and `uname -a`)
-->
```
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
Linux debian11 5.10.0-13-amd64 #1 SMP Debian 5.10.106-1 (2022-03-17) x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3099
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3099(a)github.com>
### Description
Hello,
Loading http_async_client module causes kamailio to crash on startup with the following errors:
0(60541) INFO: http_async_client [async_http.c:85]: async_http_init_worker(): started worker process: 1
[warn] kevent: Bad file descriptor
16(60557) CRITICAL: <core> [core/pt.c:405]: fork_tcp_process(): called from a non "main" process
16(60557) ERROR: <core> [core/tcp_main.c:5121]: tcp_init_children(): fork failed: Bad file descriptor
0(60541) ALERT: <core> [main.c:786]: handle_sigs(): child process 60557 exited normally, status=255
0(60541) INFO: <core> [main.c:813]: handle_sigs(): terminating due to SIGCHLD
1(60542) INFO: <core> [main.c:868]: sig_usr(): signal 15 received
5(60546) INFO: <core> [main.c:868]: sig_usr(): signal 15 received
Issue reproduced with kamailio sample configuration + loadmodule "http_async_client.so"
### Additional Information
* **Kamailio Version** *
```
kamailio -v
version: kamailio 5.5.3 (x86_64/darwin) b42dfd
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, select, kqueue.
id: b42dfd
compiled on 22:25:21 Jan 6 2022 with gcc Apple clang version 13.0.0 (clang-1300.0.29.30)
```
* **Operating System**:
```
MacOS
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2999
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/2999(a)github.com>
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
-->
### Description
Similar to [issue #1886](https://github.com/kamailio/kamailio/issues/1886), we have Kamailio receiving WebRTC connections from clients and we see many errors related to connections being forcibly closed.
We see two cases where this occurs, the former of which occurs much more often.
```
Dec 29 01:12:43.909934 tlx-dal-ecv2-staging kamailio_edge[14813]: WARNING: websocket [ws_frame.c:810]: ws_keepalive(): forcibly closing connection
Dec 29 01:12:43.910179 tlx-dal-ecv2-staging kamailio_edge[14813]: ERROR: websocket [ws_conn.c:375]: wsconn_close_now(): getting TCP/TLS connection while trying to close. src_ip:src_port=x.x.x.x:49319, dst_port=443
```
```
Dec 29 00:53:28.110949 tlx-dal-ecv2-staging kamailio_edge[14817]: WARNING: websocket [ws_frame.c:227]: encode_and_send_ws_frame(): TCP/TLS connection get failed
Dec 29 00:53:28.111187 tlx-dal-ecv2-staging kamailio_edge[14817]: ERROR: websocket [ws_frame.c:761]: ping_pong(): sending keepalive. src_ip:src_port=x.x.x.x:46712, dst_port=443
```
### Troubleshooting
There seems to be a common occurrence where the WebSocket keepalive will not receive a pong and close the websocket connection. While closing, we see that the underlying TCP connection has already been closed. While that may be harmless, I am concerned there is a race condition that could lead to other problems.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.3.1 (x86_64/linux) d68f5c
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, TLS_PTHREAD_MUTEX_SHARED
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: d68f5c
compiled on 07:32:16 Dec 29 2021 with gcc 8.3.0
```
* **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 `lsb_release -a` and `uname -a`)
-->
```
> lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
> uname -a
Linux tlx-dal-ecv2-staging 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2990
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/2990(a)github.com>
The kafka module use printf-like message to print statistics in rpc_kafka_stats() which doesn't follow the style for other RPC commands that produce data structures parsable as data, like when using jsonrpc.
```
if (rpc->rpl_printf(ctx, "Total messages: %" PRIu64 " Errors: %" PRIu64,
msg_total, msg_error) < 0) {
rpc->fault(ctx, 500, "Internal error showing total statistics");
return;
}
```
I think this is a bug, but easy to fix.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2991
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/2991(a)github.com>
### Description
We are trying to use CNXCC in order to monitor credit usage but it doesn't appear to be working.
The cnxcc_set_max_credit call appears to be working partially as we can see that a new key is created in the Redis DB but with all the values set to 0.
The values that we set in the cnxcc_set_max_credit are hardcoded but it doesn't seem to work.
This is an example of what we find in the Redis DB:
```
1637599472.872820 [1 127.0.0.1:53578] "HEXISTS" "cnxcc:money:pippo@dom.domain.it" "concurrent_calls"
1637599472.872942 [1 127.0.0.1:53578] "EXPIRE" "cnxcc:money:pippo@dom.domain.it" "70"
1637599472.873043 [1 127.0.0.1:53578] "HSET" "cnxcc:money:pippo@dom.domain.it" "concurrent_calls" "0"
1637599472.873159 [1 127.0.0.1:53578] "EXPIRE" "cnxcc:money:pippo@dom.domain.it" "70"
1637599472.873292 [1 127.0.0.1:53578] "HSET" "cnxcc:money:pippo@dom.domain.it" "consumed_amount" "0.000000"
1637599472.873404 [1 127.0.0.1:53578] "EXPIRE" "cnxcc:money:pippo@dom.domain.it" "70"
1637599472.873515 [1 127.0.0.1:53578] "HSET" "cnxcc:money:pippo@dom.domain.it" "ended_calls_consumed_amount" "0.000000"
1637599472.873634 [1 127.0.0.1:53578] "EXPIRE" "cnxcc:money:pippo@dom.domain.it" "70"
1637599472.873752 [1 127.0.0.1:53578] "HSET" "cnxcc:money:pippo@dom.domain.it" "max_amount" "0.000000"
1637599472.873875 [1 127.0.0.1:53578] "EXPIRE" "cnxcc:money:pippo@dom.domain.it" "70"
1637599472.874000 [1 127.0.0.1:53578] "HSET" "cnxcc:money:pippo@dom.domain.it" "number_of_calls" "0"
1637599472.874115 [1 127.0.0.1:53578] "EXPIRE" "cnxcc:money:pippo@dom.domain.it" "70"
1637599472.874269 [1 127.0.0.1:53578] "HSET" "cnxcc:money:pippo@dom.domain.it" "type" "1"
1637599472.874381 [1 127.0.0.1:53578] "EXPIRE" "cnxcc:money:pippo@dom.domain.it" "70"
1637599472.874481 [1 127.0.0.1:53578] "SREM" "cnxcc:kill_list:money" "\"pippo(a)dom.domain.it\""
1637599472.874585 [1 127.0.0.1:53578] "EXPIRE" "cnxcc:money:pippo@dom.domain.it" "70"
1637599472.874747 [1 127.0.0.1:53578] "HINCRBY" "cnxcc:money:pippo@dom.domain.it" "number_of_calls" "1"
1637599472.874845 [1 127.0.0.1:53578] "EXPIRE" "cnxcc:money:pippo@dom.domain.it" "70"
```
This issue is identical to the one described in #1387
### Troubleshooting
#### Reproduction
We are running Kamailio 5.5 from the official repos on Debian 10. All the modules are installed through the repo.
This is the config that we are currently using to set the values for the modules.
We also tried setting the values straight into the function bypassing the variables but the result is the same.
```
$dlg_var(credit) = "50.0";
$var(connect_cost) = "5.0";
$var(cost_per_sec) = "1.0";
$var(i_pulse) = 1;
$var(f_pulse) = 1;
xlog("$dlg_var(label) $var(credit) $var(connect_cost) ");
if (cnxcc_set_max_credit("$dlg_var(label)", "$dlg_var(credit)", "$var(connect_cost)", "$var(cost_per_sec)", "$var(i_pulse) ", "$var(f_pulse)") < 0) {
xlog("Failed to setup credit control");
sl_send_reply("503", "Internal Server Error");
exit;
}
```
#### Log Messages
The call to cnxcc_set_max_credit() doesn't throw any errors and returns 1 as if everything worked correctly
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.5.2 (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_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
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
```
* **Operating System**:
```
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
Linux kamailio 5.11.22-5-pve #1 SMP PVE 5.11.22-10 (Tue, 28 Sep 2021 08:15:41 +0200) x86_64 GNU/Linux
```
--
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/2948