From the build log
```
CC (gcc) [M kazoo.so] kazoo.o
CC (gcc) [M kazoo.so] kz_amqp.o
kz_amqp.c: In function 'kz_amqp_connection_open_ssl':
kz_amqp.c:857:17: warning: 'amqp_set_initialize_ssl_library' is deprecated [-Wdeprecated-declarations]
857 | amqp_set_initialize_ssl_library(1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from kz_amqp.c:37:
/usr/include/rabbitmq-c/ssl_socket.h:233:16: note: declared here
233 | void AMQP_CALL amqp_set_initialize_ssl_library(amqp_boolean_t do_initialize);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC (gcc) [M kazoo.so] kz_fixup.o
CC (gcc) [M kazoo.so] kz_hash.o
```
Functions description in the header file
https://github.com/alanxz/rabbitmq-c/blob/v0.13.0/include/rabbitmq-c/ssl_so…
```
/**
* Sets whether rabbitmq-c will initialize OpenSSL.
*
* \deprecated Since v0.13.0 this is a no-op. OpenSSL automatically manages
* library initialization and uninitialization.
*
* OpenSSL requires a one-time initialization across a whole program, this sets
* whether or not rabbitmq-c will initialize the SSL library when the first call
* to amqp_ssl_socket_new() is made. You should call this function with
* do_init = 0 if the underlying SSL library is initialized somewhere else
* the program.
*
* Failing to initialize or double initialization of the SSL library will
* result in undefined behavior
*
* By default rabbitmq-c will initialize the underlying SSL library.
*
* NOTE: calling this function after the first socket has been opened with
* amqp_open_socket() will not have any effect.
*
* \param [in] do_initialize If 0 rabbitmq-c will not initialize the SSL
* library, otherwise rabbitmq-c will initialize the
* SSL library
*
* \since v0.4.0
*/
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3466
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3466(a)github.com>
Module: kamailio
Branch: master
Commit: 35a87c98f4e84b65f82376dfb57050f43d0f355f
URL: https://github.com/kamailio/kamailio/commit/35a87c98f4e84b65f82376dfb57050f…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2024-10-08T13:26:32+02:00
ims_usrloc_pcscf: fix warning deprecated-non-prototype
> In file included from usrloc_db.c:12:
> Warning: ./usrloc_db.h:131:5: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a subsequent definition [-Wdeprecated-non-prototype]
> int use_location_pcscf_table();
> ^
> usrloc_db.c:113:5: note: conflicting prototype is here
> int use_location_pcscf_table(str *domain)
> ^
> 1 warning generated.
---
Modified: src/modules/ims_usrloc_pcscf/usrloc_db.h
---
Diff: https://github.com/kamailio/kamailio/commit/35a87c98f4e84b65f82376dfb57050f…
Patch: https://github.com/kamailio/kamailio/commit/35a87c98f4e84b65f82376dfb57050f…
---
diff --git a/src/modules/ims_usrloc_pcscf/usrloc_db.h b/src/modules/ims_usrloc_pcscf/usrloc_db.h
index 3c50c153b4e..688387b1b2d 100644
--- a/src/modules/ims_usrloc_pcscf/usrloc_db.h
+++ b/src/modules/ims_usrloc_pcscf/usrloc_db.h
@@ -128,7 +128,7 @@ typedef struct reusable_buffer
int data_len;
} t_reusable_buffer;
-int use_location_pcscf_table();
+int use_location_pcscf_table(str *domain);
void destroy_db();
int init_db(const str *db_url, int db_update_period, int fetch_num_rows);
int connect_db(const str *db_url);
Module: kamailio
Branch: master
Commit: f49012d15a06b27875cf6bca211ad953968b5217
URL: https://github.com/kamailio/kamailio/commit/f49012d15a06b27875cf6bca211ad95…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2024-10-08T13:10:57+02:00
cdp: fix warning deprecated-non-prototype
> Warning: peerstatemachine.c:120:19: warning: passing arguments to 'log_peer_list' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
> log_peer_list(L_INFO);
> ^
> Warning: peerstatemachine.c:182:19: warning: passing arguments to 'log_peer_list' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
> log_peer_list(L_INFO);
> ^
> Warning: peerstatemachine.c:395:19: warning: passing arguments to 'log_peer_list' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
> log_peer_list(L_INFO);
> ^
> Warning: peerstatemachine.c:400:19: warning: passing arguments to 'log_peer_list' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
> log_peer_list(L_INFO);
> ^
> Warning: peerstatemachine.c:420:19: warning: passing arguments to 'log_peer_list' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
> log_peer_list(L_INFO);
> ^
> Warning: peerstatemachine.c:462:19: warning: passing arguments to 'log_peer_list' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
> log_peer_list(L_INFO);
> ^
> Warning: peerstatemachine.c:467:19: warning: passing arguments to 'log_peer_list' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
> log_peer_list(L_INFO);
> ^
> 7 warnings generated.
---
Modified: src/modules/cdp/peerstatemachine.c
---
Diff: https://github.com/kamailio/kamailio/commit/f49012d15a06b27875cf6bca211ad95…
Patch: https://github.com/kamailio/kamailio/commit/f49012d15a06b27875cf6bca211ad95…
---
diff --git a/src/modules/cdp/peerstatemachine.c b/src/modules/cdp/peerstatemachine.c
index 97edb129549..2571e5df252 100644
--- a/src/modules/cdp/peerstatemachine.c
+++ b/src/modules/cdp/peerstatemachine.c
@@ -117,7 +117,7 @@ int sm_process(
R_Disc(p);
p->state = Closed;
}
- log_peer_list(L_INFO);
+ log_peer_list();
break;
case Stop:
/* just ignore this state */
@@ -134,7 +134,7 @@ int sm_process(
case I_Rcv_Conn_Ack:
p->state = Wait_I_CEA;
I_Snd_CER(p);
- if (p->state == Closed)
+ if(p->state == Closed)
sm_process(p, Start, 0, 1, 0);
break;
case I_Rcv_Conn_NAck:
@@ -179,7 +179,7 @@ int sm_process(
Cleanup(p, p->I_sock);
p->state = Closed;
}
- log_peer_list(L_INFO);
+ log_peer_list();
break;
case R_Conn_CER:
if(p->r_cer)
@@ -392,12 +392,12 @@ int sm_process(
Snd_DPA(p, msg, AAA_SUCCESS, p->R_sock);
R_Disc(p);
p->state = Closed;
- log_peer_list(L_INFO);
+ log_peer_list();
break;
case R_Peer_Disc:
R_Disc(p);
p->state = Closed;
- log_peer_list(L_INFO);
+ log_peer_list();
break;
case R_Rcv_CER:
result_code = Process_CER(p, msg);
@@ -417,7 +417,7 @@ int sm_process(
/*R_Disc(p);p.state = Closed;*/
p->state = R_Open; /* Or maybe I should disconnect it?*/
}
- log_peer_list(L_INFO);
+ log_peer_list();
break;
default:
LM_ERR("sm_process(): In state %s invalid event %s\n",
@@ -459,12 +459,12 @@ int sm_process(
Snd_DPA(p, msg, 2001, p->I_sock);
I_Disc(p);
p->state = Closed;
- log_peer_list(L_INFO);
+ log_peer_list();
break;
case I_Peer_Disc:
I_Disc(p);
p->state = Closed;
- log_peer_list(L_INFO);
+ log_peer_list();
break;
case I_Rcv_CER:
result_code = Process_CER(p, msg);
@@ -669,13 +669,13 @@ void I_Snd_CER(peer *p)
if((ret = getsockname(p->I_sock, &(addr_u.addr), &addrlen)) == -1) {
LM_ERR("I_Snd_CER(): Error on finding local host address > %s\n",
strerror(errno));
- Cleanup(p,p->I_sock);
+ Cleanup(p, p->I_sock);
p->state = Closed;
AAAFreeMessage(&cer);
return;
}
- if (ret != -1) {
+ if(ret != -1) {
switch(addr_u.addr.sa_family) {
case AF_INET:
set_2bytes(x, 1);
Module: kamailio
Branch: master
Commit: 03e49d4e1d806f39ee6aadaedd183a6578108d96
URL: https://github.com/kamailio/kamailio/commit/03e49d4e1d806f39ee6aadaedd183a6…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2024-10-08T13:07:37+02:00
presence: fix warning conflicting prototype
> Warning: presence_dmq.c:38:5: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a subsequent definition [-Wdeprecated-non-prototype]
> int pres_dmq_send_all_presentities();
> ^
> presence_dmq.c:487:5: note: conflicting prototype is here
> int pres_dmq_send_all_presentities(dmq_node_t *dmq_node)
> ^
> 1 warning generated.
---
Modified: src/modules/presence/presence_dmq.c
---
Diff: https://github.com/kamailio/kamailio/commit/03e49d4e1d806f39ee6aadaedd183a6…
Patch: https://github.com/kamailio/kamailio/commit/03e49d4e1d806f39ee6aadaedd183a6…
---
diff --git a/src/modules/presence/presence_dmq.c b/src/modules/presence/presence_dmq.c
index 97c6f5831b5..2e26187383f 100644
--- a/src/modules/presence/presence_dmq.c
+++ b/src/modules/presence/presence_dmq.c
@@ -35,7 +35,7 @@ dmq_api_t pres_dmqb;
dmq_peer_t *pres_dmq_peer = NULL;
dmq_resp_cback_t pres_dmq_resp_callback = {&pres_dmq_resp_callback_f, 0};
-int pres_dmq_send_all_presentities();
+int pres_dmq_send_all_presentities(dmq_node_t *dmq_node);
int pres_dmq_request_sync();
/**
Module: kamailio
Branch: master
Commit: 9475837b209c91366e8bb40416552b02c13aaf3a
URL: https://github.com/kamailio/kamailio/commit/9475837b209c91366e8bb40416552b0…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2024-10-08T13:05:19+02:00
core/rand: fix -Wdeprecated-non-prototype
> Warning: core/rand/isaac/rand.c:28:6: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
> void isaac(ctx) randctx *ctx;
> ^
> Warning: core/rand/isaac/rand.c:81:6: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
> void randinit(ctx, flag) randctx *ctx;
---
Modified: src/core/rand/isaac/rand.c
---
Diff: https://github.com/kamailio/kamailio/commit/9475837b209c91366e8bb40416552b0…
Patch: https://github.com/kamailio/kamailio/commit/9475837b209c91366e8bb40416552b0…
---
diff --git a/src/core/rand/isaac/rand.c b/src/core/rand/isaac/rand.c
index eb917fdd34f..52d44d5eb6d 100644
--- a/src/core/rand/isaac/rand.c
+++ b/src/core/rand/isaac/rand.c
@@ -25,7 +25,7 @@ rand.c: By Bob Jenkins. My random number generator, ISAAC. Public Domain.
*(r++) = b = ind(mm, y >> RANDSIZL) + x; \
}
-void isaac(ctx) randctx *ctx;
+void isaac(randctx *ctx)
{
register ub4 a, b, x, y, *m, *mm, *m2, *r, *mend;
mm = ctx->randmem;
@@ -78,8 +78,7 @@ void isaac(ctx) randctx *ctx;
}
/* if (flag==TRUE), then use the contents of randrsl[] to initialize mm[]. */
-void randinit(ctx, flag) randctx *ctx;
-word flag;
+void randinit(randctx *ctx, word flag)
{
word i;
ub4 a, b, c, d, e, f, g, h;
<!--
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:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-users.lists.kamailio…
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-dev.lists.kamailio.o…
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
Note that an issue report may be closed automatically after about 2 months
if there is no interest from developers or community users on pursuing it, being
considered expired. In such case, it can be reopened by writing a comment that includes
the token `/notexpired`. About two weeks before considered expired, the issue is
marked with the label `stale`, trying to notify the submitter and everyone else
that might be interested in it. To remove the label `stale`, write a comment that
includes the token `/notstale`. Also, any comment postpone the `expire` timeline,
being considered that there is interest in pursuing 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
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
### Troubleshooting
#### Reproduction
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### Debugging Data
<!--
If you got a core dump, use gdb to extract troubleshooting data - full backtrace,
local variables and the list of the code at the issue location.
gdb /path/to/kamailio /path/to/corefile
bt full
info locals
list
If you are familiar with gdb, feel free to attach more of what you consider to
be relevant.
-->
```
(paste your debugging data here)
<core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f7cd10b07d8), called from core: core/xavp.c: xavp_free_unsafe(100), first free core: core/xavp.c: xavp_new_value(116) - ignoring
#### 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).
-->
```
(paste your log messages here)
```
#### SIP Traffic
<!--
If the issue is exposed by processing specific SIP messages, grab them with ngrep or save in a pcap file, then add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
(paste your sip traffic here)
```
### 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.6.4 (x86_64/linux) 0a4d88
(paste your output here)
```
* **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`)
-->
```
(paste your output here)
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3971
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3971(a)github.com>
#### Pre-Submission Checklist
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #3592
#### Description
The `kamailio-geoip` RPM sub package currently builds both the `geoip` module - based on [the old and out of support MaxMind GeoIP library](https://github.com/maxmind/geoip-api-c) - and the newer `geoip2` module - based on [the currently supported `libmaxminddb`](https://github.com/maxmind/libmaxminddb).
The old GeoIP C library had its end of support date at May 2022 but for a while was still shipped for many distributions. At this point though, the EPEL repository that shipped the GeoIP library for RHEL-based operating systems, has removed it from their repositories for "Enterprise Linux 9":

Therefor builds using the bundled spec file fail on EL9 installations.
The suggested change is to add an RPM build option `--with geoip2` that when specified will build just the `geoip2` module for the `kamailio-geoip` RPM subpackage. This build option is not enabled by default, unless the build is running on a RHEL 9 based OS - in which case it is set as the default, because otherwise trivial builds break. To revert to the older behavior in RHEL 9 based OSs (and assuming you have the required unsupported library installed correctly) one will need to set both `--without geoip2 --with geoip`.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3886
-- Commit Summary --
* packaging: RPM build option to build just the geoip2 module
* packaging: make 'with geoip2' the default behavior for EL9
-- File Changes --
M pkg/kamailio/obs/kamailio.spec (36)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3886.patchhttps://github.com/kamailio/kamailio/pull/3886.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3886
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3886(a)github.com>
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
Adding sqlfile ims i-cscf to utils/kamctl/mysql copied from misc/examples/ims/icscf
so that sql file will be automatically included in kamailio-mysql-module packages in the future
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3876
-- Commit Summary --
* IMS DB: Adding i-cscf database/tables under utils/kamctl/mysql
-- File Changes --
A utils/kamctl/mysql/ims-icscf.sql (94)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3876.patchhttps://github.com/kamailio/kamailio/pull/3876.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3876
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3876(a)github.com>
hi. I am using https://github.com/havfo/WEBRTC-to-SIP to have a web sipcaller. it uses kamailio + rtpengine + web sipcaller (jssip)
right now it is working using internal account and can call to another sip.
But I need to use websipcaller to call to voip provider. I tried to register on my voip provider, and use just outbound websocket proxy, but it not working giving 401
the config I am using is https://github.com/havfo/WEBRTC-to-SIP/blob/master/etc/kamailio/kamailio.cfg
Please help adopt it to relay anything to external sip provider. I don't know what I need, relay, sip trunk or path module.
kamailio configs are very hard for me to understand.
So I need it just as websocket proxy to my voip provider, that doesn't support websocket.
thanks!
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3990
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3990(a)github.com>
Related to #3961
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [x] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, ...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3975
-- Commit Summary --
* dialog: Remove dlg_flag docs
-- File Changes --
M src/modules/dialog/dlg_handlers.c (2)
M src/modules/dialog/doc/dialog_admin.xml (16)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3975.patchhttps://github.com/kamailio/kamailio/pull/3975.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3975
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3975(a)github.com>
### Description
I'm trying to check if the incoming message is from the dispatcher hosts using KEMI function ds_is_from_list from a lua script:
```
if KSR.dispatcher.ds_is_from_list("-1", "2") then
KSR.info("Dispatcher List \n");
return "list"
end
```
I'm getting always true if when the source IP of the request is from a different network:
```
/usr/local/sbin/kamcmd dispatcher.list
{
NRSETS: 1
RECORDS: {
SET: {
ID: 1
TARGETS: {
DEST: {
URI: sip:127.0.0.1:5060
FLAGS: AX
PRIORITY: 0
LATENCY: {
AVG: 0
STD: 0
EST: 0
MAX: 0
TIMEOUT: 0
}
}
}
}
}
}
```
SIP Request:
```
[info] [sipexer.go:1578] main.SIPExerDialogLoop(): local socket address: 172.16.22.12:45379 (udp)
[info] [sipexer.go:1579] main.SIPExerDialogLoop(): local via address: 172.16.22.12:45379
[info] [sipexer.go:1580] main.SIPExerDialogLoop(): sending to udp 192.168.1.1:5060: [[---
OPTIONS sip:192.168.1.1:5060 SIP/2.0
Via: SIP/2.0/UDP 172.16.22.12:45379;rport;branch=z9hG4bKSG.70e3db71-1902-40aa-898b-ba582eefb784
From: <sip:alice@localhost>;tag=4f0ad3f3-1008-49dd-8177-7913ab12cf38
To: <sip:bob@localhost>
Call-ID: 4f538d14-e8e4-495b-818a-c595f4457585
CSeq: 977235 OPTIONS
Date: Tue, 01 Oct 2024 10:51:14 IST
User-Agent: SIPExer v1.1.0
Max-Forwards: 10
Content-Length: 0
```
Works ok when I'm using this function from the default configuration file:
```
if (ds_is_from_list("-1", "2")) {
xlogl("L_INFO","Dispatcher List\n");
exit;
}
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.8.3 (x86_64/linux) ab3530-dirty
```
* **Operating System**:
```
5.14.0-508.el9.x86_64
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3988
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3988(a)github.com>
Hello
The tm.t_uac_start function generates a “tm:local-request” event.
But the tm.cancel function doesn't generete “tm:local-request” event.
Is it possible to activate a parameter in the TM or TMX module to generate the event?
Thanks
Juan
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3831
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3831(a)github.com>
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for feature requests.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-users.lists.kamailio…
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-dev.lists.kamailio.o…
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
If you submit a feature request (or enhancement) add the description of what you would like to be added.
If there is no content to be filled in a section, the entire section can be removed.
Note that a feature request may be closed automatically after about 2 months
if there is no interest from developers or community users to implement it, being
considered expired. In such case can be reopened by writing a comment that includes
the token `/notexpired`. About two weeks before considered expired, the item is
marked with the label `stale`, trying to notify the submitter and everyone else
that might be interested in it. To remove the label `stale`, write a comment that
includes the token `/notstale`. Also, any comment postpone the `expire` timeline,
being considered that there is interest in the proposed feature request.
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
I followed the page 18~23 of this slide [20-Federico.Cabiddu-Kamailio-In-A-Mobile-World](https://www.kamailio.org/ev… to implement suspension & push notification, it worked well on mobile devices.
However, callee might have several location records on some occasions, for instance, they forcibly quit the app or kill the browser, meaning they don't de-register, the location hasn't expired and still exists, but it is stale and unreachable, this makes `t_relay` failed (return code is -2 and didn't trigger failure_route) since Kamailio `lookup` the stale location rather than the new one as they get push notification, below are some part of logs.
```
ERROR: tm [t_fwd.c:484]: prepare_new_uac(): could not build request
ERROR: tm [t_fwd.c:1764]: t_forward_nonack(): failure to add branches
ERROR: <script>: not t_relay by INVITE -2
ERROR: <script>: check status code is 100
```
The rest of Kamailio code triggers `sl_reply_error`, caller gets 500 and terminates.
### Expected behavior
When callee has several locations, even if some of them are stale, callee should not terminate the call and should find a valid location to ring the target.
#### Actual observed behavior
Caller finds invalid locations and gets 500 error msg.
#### Debugging Data
What I have tried
1. Run `suspend` when `t_relay` failed.
```
if (!t_relay()) {
revert_uri();
route(SUSPEND);
}
```
It doesn't work since `t_continue` still tries to recover the call with the stale location.
2. Run `append_branch` before `t_relay`.
```
if (!lookup("location")) {
send_replay("100", "Trying");
route(SUSPEND);
} else {
append_branch($tu);
t_relay();
ts_store();
$sht(vtp=>stored::$rU) = 1;
xdbg("stored transaction [$T(id_index):$T(id_label)] $fU=> $rU\n");
}
```
This version of caller won't get 500 and terminate, but callee cannot finds the resumed call.
3. Use `t_load_contacts` and `t_next_contact`.
```
t_load_contacts();
while (t_next_contacts()) {
xlog ("==== $ru\n");
}
```
t_next_contacts always return -2 (nothing to do), but I can see the new location via command `kamctl ul show`.
#### 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).
-->
```
(paste your log messages here)
```
#### SIP Traffic
<!--
If the issue is exposed by processing specific SIP messages, grab them with ngrep or save in a pcap file, then add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
(paste your sip traffic here)
```
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a improvement.
-->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
(paste your output here)
```
* **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`)
-->
```
(paste your output here)
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3985
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3985(a)github.com>
#### Pre-Submission Checklist
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
This change allows to enable/disable the insertion of SIP traces into the DB at runtime (i know we could do this with `siptrace.status`, but this is a different case).
This feature is strictly important if you start `Kamailio` with `trace_to_database` parameter disabled, and you want to enable it later and at runtime.
Nowadays, if you try to start `Kamailio` with `trace_to_database` enabled, but without a connection to the DB, the service won't start (`child_init` logic).
In this type of situation, it makes sense to start `Kamailio` disabling the `trace_to_database` parameter, and when the DB is ok, at runtime, we enable `trace_to_database` parameter. This prevents the need to restart the service, and also we can start `Kamailio` without problems, if DB of SIP Traces is NOK at that time.
My PR may need some improvements, especially on the enable side, so feel free to make any changes to improve that.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3877
-- Commit Summary --
* siptrace: handle trace_to_database param at runtime
-- File Changes --
M src/modules/siptrace/siptrace.c (100)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3877.patchhttps://github.com/kamailio/kamailio/pull/3877.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3877
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3877(a)github.com>
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
Allow Kamailio modules to register their log function so that all Kamailio log messages (coming from core and other modules) are logged uniformly in the format defined by the custom log function.
To enable the custom log format feature, Kamailio must be compiled with the `CUSTOM_LOG_FMT` flag. Then the module that wishes to modify the log format has to call `km_custom_log_func_set` during the initialization to supply a custom log formatting function (see `km_default_custom_log_func` as an example).
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3902
-- Commit Summary --
* core: add support for custom log function
-- File Changes --
M src/core/dprint.c (19)
M src/core/dprint.h (47)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3902.patchhttps://github.com/kamailio/kamailio/pull/3902.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3902
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3902(a)github.com>
### Description
During our tls conn performance test for kamailio, we found fixed shared momory 700MB can only support around 9600 concurrent TLS connections. At the same time, we use nginx for comparison to do the same same tls conn performance test, and the result is 9600 concurrent TLS connections only cost 72MB virtual memory(nginx dont support global shared memory pool for each allocate. it use openssl internal allocate function)
Of course, we know, nginx does not use shared memory, and they are not much comparable. Please check if there is any solution to save some shmmem SSL session takes.
### Expected behavior
kamailio use less shared memory for more TLS connections
#### Actual observed behavior
kamailio 's tls connection shared memory consists of tcpconn structure info and tcp_rd_buf and SSL session info, which are all in the same shared memory pool. As our observation, a ssl session info takes too many shmmem---around 130KB
#### Debugging Data
None
#### Log Messages
None
#### SIP Traffic
None
### Possible Solutions
None
### Additional Information
None
* **Operating System**:
Linux localhost.localdomain 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3980
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3980(a)github.com>
When relaying this `200 OK` repeatedly with calls to `rtpengine_answer()` failing because all RTPEngines in a set are unreachable...
```
Dec 8 06:24:38 gw kamailio[4823]: ERROR: rtpengine [rtpengine.c:2960]: select_rtpp_node(): rtpengine failed to select new for calllen=36 callid=8279a4ea-151e-48de-a23c-5840104126de
```
```
SIP/2.0 200 OK
v:SIP/2.0/UDP 10.150.20.20;branch=z9hG4bK03e.e4da444e627bb575ef4f46151729a1fa.0,SIP/2.0/UDP 10.151.20.108;received=10.151.20.108;rport=5060;branch=z9hG4bKKQyrBKpp04X0K
Record-Route:<sip:10.150.20.20;lr;ftag=emHm2apy95jFe;rtp_relay=1;rtp_group=0>
f:"14045551212"<sip:14045551212@10.151.20.108>;tag=emHm2apy95jFe
t:<sip:16782001111@internal.evaristesys.com>;tag=tHQt0rDcF7UHK
i:8279a4ea-151e-48de-a23c-5840104126de
CSeq:60686471 INVITE
m:<sip:16782001111@10.160.10.55:5060;transport=udp>
User-Agent:VoiceAppServer
Allow:INVITE,ACK,BYE,CANCEL,OPTIONS,MESSAGE,INFO,UPDATE,REFER,NOTIFY
k:path,replaces
u:talk,hold,conference,refer
c:application/sdp
Content-Disposition:session
l:257
v=0
o=DM 1670428117 1670428118 IN IP4 10.160.10.55
s=DM
c=IN IP4 10.160.10.55
t=0 0
m=audio 52418 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=rtcp:52419 IN IP4 10.160.10.55
```
Repeat INVITEs eventually result in a crash. This backtrace is taken from a different server but identical scenario:
```
#0 t_should_relay_response (Trans=0x7f4aee56ba80, new_code=200, branch=0, should_store=0x7ffd8b8bbba0, should_relay=0x7ffd8b8bbba4, cancel_data=0x7ffd8b8bbe40,
reply=0x7f4afe40df70) at t_reply.c:1285
1285 && !(inv_through && Trans->uac[branch].last_received<300)) {
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.192.el6.x86_64 jansson-2.11-1.el6.x86_64 keyutils-libs-1.4-5.el6.x86_64 krb5-libs-1.10.3-57.el6.x86_64 libcom_err-1.41.12-22.el6.x86_64 libev-4.03-3.el6.x86_64 libselinux-2.0.94-7.el6.x86_64 libunistring-0.9.3-5.el6.x86_64 openssl-1.0.1e-48.el6_8.3.x86_64 sqlite-3.6.20-1.el6_7.2.x86_64 zlib-1.2.3-29.el6.x86_64
(gdb) where
#0 t_should_relay_response (Trans=0x7f4aee56ba80, new_code=200, branch=0, should_store=0x7ffd8b8bbba0, should_relay=0x7ffd8b8bbba4, cancel_data=0x7ffd8b8bbe40,
reply=0x7f4afe40df70) at t_reply.c:1285
#1 0x00007f4afd73ab7d in relay_reply (t=0x7f4aee56ba80, p_msg=0x7f4afe40df70, branch=0, msg_status=200, cancel_data=0x7ffd8b8bbe40, do_put_on_wait=1)
at t_reply.c:1821
#2 0x00007f4afd740c38 in reply_received (p_msg=0x7f4afe40df70) at t_reply.c:2558
#3 0x00000000004b5d6a in do_forward_reply (msg=0x7f4afe40df70, mode=0) at core/forward.c:747
#4 0x00000000004b78c9 in forward_reply (msg=0x7f4afe40df70) at core/forward.c:852
#5 0x000000000054982b in receive_msg (
buf=0xb27700 "SIP/2.0 200 OK\r\nv:SIP/2.0/UDP xxx;branch=z9hG4bK9915.dcfe6d03cb21e6c94a6705adb095c566.0,SIP/2.0/UDP xxx;received=xxx;rport=5060;branch=z9hG4bKZmZp0NZv3FvQB\r\nRecord-Rout"..., len=984, rcv_info=0x7ffd8b8bc6c0) at core/receive.c:434
#6 0x00000000006658ca in udp_rcv_loop () at core/udp_server.c:541
#7 0x000000000042500f in main_loop () at main.c:1655
#8 0x000000000042c5bb in main (argc=11, argv=0x7ffd8b8bcc88) at main.c:2696
```
Looks like in the crash frame, `Trans->uac` is `NULL`:
```
(gdb) frame 0
#0 t_should_relay_response (Trans=0x7f4aee56ba80, new_code=200, branch=0, should_store=0x7ffd8b8bbba0, should_relay=0x7ffd8b8bbba4, cancel_data=0x7ffd8b8bbe40,
reply=0x7f4afe40df70) at t_reply.c:1285
1285 && !(inv_through && Trans->uac[branch].last_received<300)) {
(gdb) print Trans->uac
$1 = (struct ua_client *) 0x0
```
I have seen this crash from time to time, though it is infrequent. It always seems to occur when there are problems reaching RTPEngine in a timely fashion.
This is on Kamailio 5.2.4:de9a03, which I know has long fallen off the back of the maintenance train. However, line 1386 of `t_reply.c` in `master:HEAD` shows that the code is no different now:
https://github.com/kamailio/kamailio/blob/master/src/modules/tm/t_reply.c#L…
Of course, it's possible that something upstream has changed so as to prevent this state. Otherwise, I suppose a null pointer safety check for `Trans->uac` is recommended. I'd be happy to submit a patch, just wasn't sure if the feeling was more that this should be resolved higher up the call stack.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3297
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3297(a)github.com>
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [x] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [x] Related to issue [reported in lists](https://lists.kamailio.org/mailman3/hyperkitty/list/sr-users@lists.k…
#### Description
<!-- Describe your changes in detail -->
This PR aims to fix a bug/security issue where data that was supposed to be encrypted and transferred through TLS, were transferred instead with TCP protocol.
More information and how to replicate can be found in the above [issue](https://lists.kamailio.org/mailman3/hyperkitty/list/sr-users@lists.k… in list.
This PR suggests using also the protocol to match if a TCP connection exists, and when doing connection lookups, otherwise, it might return a wrong connection, ie a TCP one when we are asking for a TLS one (a case when source ip/port and dest IP are same but dest port is set 0 (wildcard) ).
`tcpconn_get` was left unchanged due to being used by some modules and not wanting to break them. Please advise whether it should be beneficial to also change it.
In some cases like, `tcpconn_add_alias` and `tcpconn_get` we used the `PROTO_NONE` which preserves the original behavior. `tcpconn_add_alias` we do have the protocol available, should it be also used?
`tcpconn_get` does not have the protocol available unless we pass it as an argument.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3810
-- Commit Summary --
* tcp_main: Add protocol argument for searching tcp/tls connections
* tcp_main: Add proto argument to tcpconn_exists function
* tcp_main: Update comment docs
* core/forward: Match protocol when forwarding
* tcp_main: Match wss protocol
-- File Changes --
M src/core/forward.h (3)
M src/core/tcp_conn.h (3)
M src/core/tcp_main.c (43)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3810.patchhttps://github.com/kamailio/kamailio/pull/3810.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3810
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3810(a)github.com>
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [x] Tested changes locally
#### Description
Another step to merge the functionality that is already used in Sipwise kamailio flavor:
be able to define a fallback contact to be used when message processed has no contact
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3958
-- Commit Summary --
* sca: contact_fallback parameter
* sca: documentation for contact_fallback parameter [skip ci]
-- File Changes --
M src/modules/sca/doc/sca_admin.xml (20)
M src/modules/sca/sca.c (6)
M src/modules/sca/sca.h (1)
M src/modules/sca/sca_call_info.c (9)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3958.patchhttps://github.com/kamailio/kamailio/pull/3958.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3958
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3958(a)github.com>
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [X] Commit message has the format required by CONTRIBUTING guide
- [X] Commits are split per component (core, individual modules, libs, utils, ...)
- [X] Each component has a single commit (if not, squash them into one commit)
- [X] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [X] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [X] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
Hello, I recently did some tests with kamailio's kafka module, with focus on what happens when kafka broker goes down.
First thing I noticed is that kamailio won't start initially if kafka broker is down. Second thing I noticed syslog overflowing with err logs, when kafka broker is down. Third, I noticed that when it starts, kamailio queries topic metadata and waited up to 100 seconds for any answer. I've added modparams for all these three to change behavior. Updated doc for all the new modparams.
I've also updated stats errors counting when exposed cfg functions failed for any reason. And some rework to stats function to accept str* instead of char* topic. Also moved librdkafka's poll() function at the begining of the cfg function logic, so polling happens even when some errors happen with the cfg function.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3951
-- Commit Summary --
* Makefile.defs: version set to 5.8.0-rc0
* pkg/kamailio/deb: version set 5.8.0~rc0
* github: set branch to 5.8 [skip ci]
* pkg/docker: set branch 5.8 and refresh [skip ci]
* tls: restore early init for other modules that use TLS
* tls: fix restore early init
* tls: fix OpenSSL 1.1.1 compatibility
* OpenSSL integration: manage curl_global_init(...) used by modules
* Revert ac4f1be039 - split into per module commits
* core/rthreads.h: add thread executor for curl_global_init()
* http_async_client: libssl thread executor for curl_global_init()
* http_client: libssl thread executor for curl_global_init()
* xcap_client: libssl thread executor for curl_global_init()
* http_async_client: libssl refactor thread executors for curl
* file_out: Add header guards
* file_out: Fix leaks
* tls: fix OpenSSL 1.1.1 engine keys
* tls: make explicit ENGINE deprecation in OpenSSL 3
* tls: clean-up of ENGINE
* tlsa: removed the map files used in the past for tls engine
* tls: remove unused ENGINE define
* tls: basic OpenSSL 3 support of provider keys (replaces ENGINE)
* core/rthreads.h: add new option tls_threads_mode = 2
* tls: new option tls_threads_mode = 2
* etc/kamailio.cfg: document tls_threads_mode = 2 to use atfork handler
* tls: NULL safety check
* ndb_redis: reformat exported structures
* evrexec: reformat exported structures
* microhttpd: docs - note about variables available in the event route
* ndb_redis: init enabled for tcp-main and postchildinit callbacks
* tcpops: variables to get active connection attributes
* tcpops: if connection not found, return attributes from sip msg rcv
* ims_usrloc: make matching of username in contact conditional
* ims_registrar_pcscf: update registered state to pending registration if contact exists
* core: rthreads - init return variable
* influxdbc: copy with buffer size limit
* core: ppcfg - jump to end when defexp eval does not get a str val
* core: select - handle ws and wss inside select_ip_port()
* core: parser rr - check for rr value before serializing
* acc: cdr - do not free static empty string in case of error
* ctl: reset log prefix on reading ctl traffic
* core: main - init local variables used for cli param parsing
* presence: docs - remove extra section end tag
* tls/docs: Update tls.reload docs
* tls/docs: Update certificate generation docs
* modules: readme files regenerated - modules ... [skip ci]
* ChangeLog: added content from 5.8.0 developent
* pkg/kamailio/deb: version set 5.8.0 [skip ci]
* pkg/kamailio: version set 5.8.0 for rpms and alpine
* Makefile.defs: version set to 5.8.0
* ChangeLog: content set for v5.8.0
* pkg/kamailio/obs: packaged README.file_out
* core: set null-terminated char for modparam (backport from master)
* Avoid 'qm_strnstr' defined but not used warning
* topos: small rearangement by removing else after return in the true block
* topos: properly handle cases of no user in contact for mode 1
* pkg/kamailio/obs: Allow builders to disable wolfssl module [skip ci]
* file_out: Fix var position and initialize
* pdb: Return negative carrierid for failures
* pdb server: Return negative carrierid for failures. Clang format
* ctl: handle int input for double storage
* dispatcher: refine documentation
* ims_ipsec_pcscf: TLS support in ipsec_forward() improved
* acc: more log messages of failure arsing extra acc string
* keepalive: proper storing of last up/down timestamps
* keepalive: small formatting updates and comments to the ka dest structure
* ndb_redis: clang-format for WITH_SSL code
* ndb_redis: fix index on parsing sentinel address inside redisc_reconnect_server()
* ndb_redis: break on finding a server via sentinel inside redisc_reconnect_server()
* modules: readme files regenerated - modules ... [skip ci]
* dmq: fix inter-lock on error
* file_out: additional checks for silenting warnings
* file_out: Cast to correct type of str
* tls: Fix ‘for’ loop initial declarations error
* file_out: FIx ‘for’ loop initial declarations error
* gcrypt: docs - module name used for section ids
* core: socket info - parse advertise ip part to get address family
* core: resolve/create_srv_pref_list() - insert at correct position in list
* corex: fix conditions for dns_cache modparam srv attributes
* keepalive: reformat module exports structures
* db_mysql: MYSQL_OPT_RECONNECT is deprecated by MySQL 8.0.34
* db_mysql: right position for define KSR_MYSQL_OPT_RECONNECT
* smsops: reformat module exports structures
* smsops: short reference section about variables
* blst: reformat exported structures
* modules: readme files regenerated - modules ... [skip ci]
* pkg/kamailio: version set 5.8.1 for rpms and alpine
* pkg: deb specs updated for v5.8.1
* core: xavp - added missing closing parenthesis in log messages
* core: msg translator - duplicate reply via xavp params and handle errors
* Makefile.defs: version set to 5.8.1
* ChangeLog: content updated for v5.8.1
* pdb server: allow carrier id 0
* db_redis: docs - refine docs regarding client certificates [skip ci]
* ndb_redis: docs - refine docs regarding client certificates [skip ci]
* sdpops: reformat the codecs map
* core: parser/sdp - rename parameter to suggest better its role
* siputils: tel2sip2() - memset to 0 pkg allocs and recompute len of new uri
* ims_ipsec_pcscf: log error message made info
* corex: Fix unknown af in list_sockets
* rtpengine: fix pkg mem leak in send_rtpp_command()
* tcp_main: Add protocol argument for searching tcp/tls connections
* tcp_main: Add proto argument to tcpconn_exists function
* tcp_main: Update comment docs
* core/forward: Match protocol when forwarding
* tcp_main: Match wss protocol
* usrloc: check on db delete the return value of memchr
* core: tcp - keep connection id on event route cb structure
* tcpops: reworked some debug messages
* core: tcp - set a global shortcut to tcp connection for event route
* pv: use global tcp connection callback for event route on $conid
* core: fmsg - parse loopback ip when initializing faked msg structure
* regex: init globals for safer shutdown on failure
* regex: allocate pcres array
* regex: reformat exported structures
* tcpops: removed unused variable introduced recently
* modules: readme files regenerated - modules ... [skip ci]
* tls: clear thread-local variables up to tls_pthreads_key_mark
* core: spelling fix in comment and log message
* uid_auth_db: spelling fix in documentation
* ims_usrloc_scscf: reformat exported structures
* ims_usrloc_scscf: enclose examples in dotted lines for better visibility
* modules/statsd: ensure statsd failures do not stop execution (#3819)
* ims_registrar_scscf: init variable to fix analyzer warning
* ims_ipsec_pcscf: decouple IPSEC_FORWARD_USEVIA and IPSEC_TCPPORT_UEC for requests
* ims_ipsec_pcscf: docs updated for ipsec_forward() flags
* ims_ipsec_pcscf: updated comments for ipsec_forward() flags
* ims_ipsec_pcscf: handle tls for replies
* ims_registrar_scscf: fix uninitialized arguments in save()
* ims_registrar_scscf: refactor save_fixup4
* ims_registrar_scscf: fix typo in function name uint_fixup
* ims_registrar_scscf: free_uint_fixup: fix memleak/freeing the wrong parameter
* ims_ipsec_pcscf: cascade on options to get the uri for fill_contact()
* sipcapture: docs - fix default value for parameter
* tm: free new buffer on drop for local requests
* tm: cb flag to mark local uac on request drop
* tm: cb_flags made unsigned for uac_req
* pv_headers: print also the new TMCB_LOCAL_REQUEST_DROP in debug function
* presence: check if the local notify was dropped in event route
* uac: check if local requests are dropped and free the param
* pua: check if local requests are dropped and free the param
* core: parser/contact - add limit for max number of contacts
* core: parser/contact - basic validation tests for contact uri
* core: parse/contact: jump to error on too many contacts
* ctl: removed level and function names from log messages
* ctl: info log on ECONNRESET (connection reset by peer)
* modules: readme files regenerated - modules ... [skip ci]
* tcpops: note about execution of event routes by TCP main process
* modules: readme files regenerated - modules ... [skip ci]
* sipcapture: fix default DB URL docs
* modules: readme files regenerated - modules ... [skip ci]
* etc/kamailio.cfg: remove executable flag
* tm: add mandatory Max-Forwards header to local AC
* db_cluster: Update log levels
* dialplan: don't call free on empty pcre pointer
* tcpops: reformat exported structures
* sipcapture: use local static buffers for ip address and port
* db_mysql: fixed build on CentOS 7
* usrloc: delete location_attrs in db_only mode on delete_urecord
* htable: error on not finding htable in pv set
* htable: error on not finding htable in pv get
* rtpengine: Fix extra process in pkg.stats
* siputils: free head of params list for get_uri_param()
* siputils: free head of params list for get_uri_param()
* regex: fix pcre2 migration
* geoip2: init MMDB_s global pointer and check on destroy
* geoip2: do not close global MMDB_s on destroy
* geoip2: rename global lock variable
* geoip2: keep global structure per process
* geoip2: clang format module file
* geoip2: Reload database before accessing it
* iims_registrar_scscf: include header for common c functions
* core/resolve: Check dns_cache_init and choose appropriate functions
* nathelper: fixed handle_ruri_alias_mode(1) cannot proper handle multi alias
* nathelper: remove magic constant
* dmq_usrloc: reformat exported structures
* ims_ipsec_pcscf: Fix typo
* pua_dialoginfo: Fix ruri length
* modules: readme files regenerated - modules ... [skip ci]
* pkg/kamailio: version set 5.8.2 for rpms and alpine
* pkg: deb specs updated for v5.8.2
* Makefile.defs: version set to 5.8.2
* ChangeLog: content updated for v5.8.2
* kafka: add modparam init_without_kafka
* kafka: add modparam log_without_overflow
* kafka: add modparam metadata_timeout
* kafka: export statistics for total/err messages
* kafka: Update kfk_stats_add() to use str topic
* kafka: Update doc with the new modparams
-- File Changes --
M .devcontainer/devcontainer.json (2)
M .github/workflows/devcontainer.yaml (2)
M .github/workflows/main.yml (2)
M .gitmodules (1)
M ChangeLog (16562)
M etc/kamailio.cfg (5)
M pkg/docker (2)
M pkg/kamailio/alpine/APKBUILD (2)
M pkg/kamailio/deb/bionic/changelog (24)
M pkg/kamailio/deb/bookworm/changelog (24)
M pkg/kamailio/deb/bullseye/changelog (24)
M pkg/kamailio/deb/buster/changelog (24)
M pkg/kamailio/deb/debian/changelog (24)
M pkg/kamailio/deb/focal/changelog (24)
M pkg/kamailio/deb/jammy/changelog (24)
M pkg/kamailio/deb/jessie/changelog (24)
M pkg/kamailio/deb/precise/changelog (24)
M pkg/kamailio/deb/sid/changelog (24)
M pkg/kamailio/deb/stretch/changelog (24)
M pkg/kamailio/deb/trusty/changelog (24)
M pkg/kamailio/deb/wheezy/changelog (24)
M pkg/kamailio/deb/xenial/changelog (24)
M pkg/kamailio/obs/kamailio.spec (24)
M src/Makefile.defs (4)
M src/core/fmsg.c (11)
M src/core/forward.h (3)
M src/core/mem/q_malloc.c (2)
M src/core/modparam.c (1)
M src/core/msg_translator.c (18)
M src/core/parser/contact/contact.c (29)
M src/core/parser/parse_rr.c (24)
M src/core/parser/sdp/sdp_helpr_funcs.c (14)
M src/core/ppcfg.c (2)
M src/core/resolve.c (60)
M src/core/resolve.h (14)
M src/core/rthreads.h (58)
M src/core/select_core.c (12)
M src/core/socket_info.c (5)
M src/core/switch.c (2)
M src/core/tcp_conn.h (6)
M src/core/tcp_main.c (52)
M src/core/ut.h (2)
M src/core/xavp.c (6)
M src/main.c (6)
M src/modules/acc/acc_cdr.c (4)
M src/modules/acc/acc_extra.c (16)
M src/modules/blst/blst.c (49)
M src/modules/corex/corex_mod.c (6)
M src/modules/corex/corex_rpc.c (4)
M src/modules/ctl/binrpc.h (15)
M src/modules/ctl/fifo_server.c (1)
M src/modules/ctl/io_listener.c (90)
M src/modules/db_cluster/dbcl_api.c (83)
M src/modules/db_mysql/km_my_con.c (21)
M src/modules/db_redis/README (17)
M src/modules/db_redis/doc/db_redis_admin.xml (10)
M src/modules/dialplan/dp_repl.c (3)
M src/modules/dispatcher/README (13)
M src/modules/dispatcher/doc/dispatcher_admin.xml (9)
M src/modules/dmq/notification_peer.c (6)
M src/modules/dmq_usrloc/dmq_usrloc.c (44)
M src/modules/evrexec/evrexec_mod.c (40)
M src/modules/file_out/file_out.c (69)
M src/modules/file_out/types.c (14)
M src/modules/file_out/types.h (5)
M src/modules/gcrypt/doc/gcrypt_admin.xml (4)
M src/modules/geoip2/geoip2_mod.c (25)
M src/modules/geoip2/geoip2_pv.c (81)
M src/modules/geoip2/geoip2_pv.h (1)
M src/modules/htable/ht_var.c (10)
M src/modules/http_async_client/http_async_client_mod.c (115)
M src/modules/http_client/http_client.c (23)
M src/modules/ims_ipsec_pcscf/README (13)
M src/modules/ims_ipsec_pcscf/cmd.c (130)
M src/modules/ims_ipsec_pcscf/doc/ims_ipsec_pcscf_admin.xml (12)
M src/modules/ims_registrar_pcscf/save.c (11)
M src/modules/ims_registrar_scscf/ims_registrar_scscf_mod.c (55)
M src/modules/ims_registrar_scscf/lookup.c (2)
M src/modules/ims_registrar_scscf/userdata_parser.c (5)
M src/modules/ims_usrloc_pcscf/udomain.c (58)
M src/modules/ims_usrloc_scscf/README (29)
M src/modules/ims_usrloc_scscf/doc/ims_usrloc_scscf_admin.xml (129)
M src/modules/ims_usrloc_scscf/ims_usrloc_scscf_mod.c (78)
M src/modules/influxdbc/ic.c (16)
M src/modules/kafka/doc/kafka_admin.xml (64)
M src/modules/kafka/kafka_mod.c (33)
M src/modules/kafka/kfk.c (117)
M src/modules/keepalive/keepalive.h (12)
M src/modules/keepalive/keepalive_core.c (4)
M src/modules/keepalive/keepalive_mod.c (56)
M src/modules/microhttpd/doc/microhttpd_admin.xml (5)
M src/modules/nathelper/nathelper.c (4)
M src/modules/ndb_redis/README (17)
M src/modules/ndb_redis/doc/ndb_redis_admin.xml (10)
M src/modules/ndb_redis/ndb_redis_mod.c (128)
M src/modules/ndb_redis/redis_client.c (34)
M src/modules/pdb/pdb.c (14)
M src/modules/presence/doc/presence_admin.xml (1)
M src/modules/presence/notify.c (5)
M src/modules/pua/pua.c (5)
M src/modules/pua/send_publish.c (3)
M src/modules/pua_dialoginfo/pua_dialoginfo.c (1)
M src/modules/pv/pv_core.c (7)
M src/modules/pv_headers/pv_headers.c (2)
M src/modules/regex/regex_mod.c (78)
M src/modules/rtpengine/rtpengine.c (7)
M src/modules/sdpops/sdpops_data.c (28)
M src/modules/sipcapture/README (5)
M src/modules/sipcapture/doc/sipcapture_admin.xml (4)
M src/modules/sipcapture/hep.c (13)
M src/modules/siputils/checks.c (14)
M src/modules/smsops/README (13)
M src/modules/smsops/doc/smsops_admin.xml (14)
M src/modules/smsops/smsops.c (47)
M src/modules/statsd/statsd.c (51)
M src/modules/tcpops/README (8)
M src/modules/tcpops/doc/eventroutes.xml (12)
M src/modules/tcpops/tcpops.c (6)
M src/modules/tcpops/tcpops_mod.c (155)
M src/modules/tls/README (12)
M src/modules/tls/doc/rpc.xml (4)
M src/modules/tls/doc/tls.xml (10)
M src/modules/tls/tls_domain.c (94)
D src/modules/tls/tls_map.c (213)
D src/modules/tls/tls_map.h (77)
M src/modules/tls/tls_mod.c (223)
M src/modules/tls/tls_rand.h (2)
M src/modules/tls/tls_server.c (24)
D src/modules/tlsa/tls_map.c (27)
D src/modules/tlsa/tls_map.h (27)
M src/modules/tm/t_hooks.h (4)
M src/modules/tm/t_msgbuilder.c (5)
M src/modules/tm/uac.c (3)
M src/modules/tm/uac.h (2)
M src/modules/topos/tps_storage.c (71)
M src/modules/uac/uac_reg.c (7)
M src/modules/uac/uac_send.c (9)
M src/modules/uid_auth_db/auth_db.xml (2)
M src/modules/usrloc/ucontact.c (36)
M src/modules/usrloc/urecord.c (18)
M src/modules/xcap_client/xcap_client.c (5)
M utils/pdbt/common.h (2)
M utils/pdbt/pdb_server.c (330)
M utils/pdbt/pdb_server_backend.c (21)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3951.patchhttps://github.com/kamailio/kamailio/pull/3951.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3951
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3951(a)github.com>
Module: kamailio
Branch: master
Commit: c31c91fc36dda736b0c19f66ac38b1cc500bfe8b
URL: https://github.com/kamailio/kamailio/commit/c31c91fc36dda736b0c19f66ac38b1c…
Author: Stefan Mititelu <stefan.mititelu(a)net2phone.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-09-18T10:01:10+02:00
kafka: Update doc with the new modparams
---
Modified: src/modules/kafka/doc/kafka_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/c31c91fc36dda736b0c19f66ac38b1c…
Patch: https://github.com/kamailio/kamailio/commit/c31c91fc36dda736b0c19f66ac38b1c…
---
diff --git a/src/modules/kafka/doc/kafka_admin.xml b/src/modules/kafka/doc/kafka_admin.xml
index 8ada5e9fe07..666e7c2fc3d 100644
--- a/src/modules/kafka/doc/kafka_admin.xml
+++ b/src/modules/kafka/doc/kafka_admin.xml
@@ -154,6 +154,70 @@ modparam("kafka", "topic", "name=third_topic")
</programlisting>
</example>
</section>
+
+ <section id="kafka.p.init_without_kafka">
+ <title><varname>init_without_kafka</varname> (string)</title>
+ <para>
+ Set to anything but 0, specifies if kamailio starts even when kafka brokers are not available at startup time.
+ </para>
+ <para>
+ Default value is <emphasis>0</emphasis> (disabled).
+ </para>
+ <example>
+ <title>Set <varname>init_without_kafka</varname> parameter</title>
+ <programlisting format="linespecific">
+...
+modparam("kafka", "init_without_kafka", 1)
+...
+ </programlisting>
+ </example>
+ </section>
+
+ <section id="kafka.p.metadata_timeout">
+ <title><varname>metadata_timeout</varname> (string)</title>
+ <para>
+ Specifies, in milliseconds, how much time kamailio waits to get topic metadata info at startup time.
+ </para>
+ <para>
+ Default value is <emphasis>2000 milliseconds</emphasis> (2 seconds).
+ </para>
+ <example>
+ <title>Set <varname>metadata_timeout</varname> parameter</title>
+ <programlisting format="linespecific">
+...
+modparam("kafka", "metadata_timeout", 1000)
+...
+ </programlisting>
+ </example>
+ </section>
+
+ <section id="kafka.p.log_without_overflow">
+ <title><varname>log_without_overflow</varname> (string)</title>
+ <para>
+ Set to anything but 0, will skip logging most of the error messages that may happen to each kafka message sent to the broker.
+ This is useful when e.g. kafka broker goes down, not to overflow syslog with error messages.
+ </para>
+ <para>
+ One can alwyas check this module's stats e.g. via RPC commands and see that errors happened or not.
+ Those errors can have 2 causes:
+ <itemizedlist>
+ <listitem>Some errors happened with the config functions kafka_send()/kafka_send_key(). This means that the message wasn't even enqueued by librdkafka.</listitem>
+ <listitem>Some errors happened on delivery callback, managed by librdkafka. This means that the message was enqueued by librdkafka, but not managed to be delivered to the broker.</listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ Default value is <emphasis>0</emphasis> (disabled).
+ </para>
+ <example>
+ <title>Set <varname>log_without_overflow</varname> parameter</title>
+ <programlisting format="linespecific">
+...
+modparam("kafka", "log_without_overflow", 1)
+...
+ </programlisting>
+ </example>
+ </section>
+
</section>
<section>
<title>Functions</title>