<!--
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
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
I'm testing kamailio v 5.6.1 in an alpine linux docker with musl libc (x86_64) Version 1.2.3 and I see a kamailio crash just with version option (kamailio --version).
The crash occur if I haven't localhost resolution in /etc/hosts. This isn't a canonical situation, but crash occur!
Running kamailio with gdb I see that the problem is in freeaddrinfo call in log_init function.
#### Reproduction
<!--
If the issue can be reproduced, describe how it can be done.
-->
cat /etc/hosts
#127.0.0.1 localhost
#::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
#172.30.0.3 bd9375eeb5af
#2001:db8:1111:2222:0:242:ac1e:3 bd9375eeb5af
/ #
/ # kamailio --version
Segmentation fault (core dumped)
#### 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.
-->
```
# gdb --args kamailio --version
GNU gdb (GDB) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-alpine-linux-musl".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from kamailio...
(gdb) run
Starting program: /usr/local/sbin/kamailio --version
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7f9f5ed in freeaddrinfo () from /lib/ld-musl-x86_64.so.1
(gdb) bt
#0 0x00007ffff7f9f5ed in freeaddrinfo () from /lib/ld-musl-x86_64.so.1
#1 0x000055555559087d in calc_proc_no () at main.c:1976
#2 0x00007fffffffe8d0 in ?? ()
#3 0x00007fffffffed58 in ?? ()
#4 0x000055555561b143 in log_init () at core/dprint.c:483
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
```
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
I suppose that log_init function needs a check for info pointer. If info pointer is not NULL, then call freeaddrinfo. I see similar protections in other points of code.
```
void log_init(void)
{
struct addrinfo hints;
struct addrinfo *info = NULL;
int gai_result;
char hostname[1024];
hostname[1023] = '\0';
gethostname (hostname, 1023);
memset (&hints, 0, sizeof (hints));
hints.ai_family = AF_UNSPEC; /*either IPV4 or IPV6 */
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = AI_CANONNAME;
if ((gai_result = getaddrinfo (hostname, 0, &hints, &info)) != 0) {
log_fqdn = "?";
} else if (info == NULL) {
log_fqdn = "?";
} else {
log_fqdn = strdup (info->ai_canonname);
}
if(info) // add pointer validity
freeaddrinfo (info);
dprint_init_colors();
}
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.6.2 (x86_64/linux) 54a9c1
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: 54a9c1
compiled on 09:26:43 Nov 15 2022 with gcc 9.3.0
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3281
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3281(a)github.com>
In my use case I use HS256 so its a shared secret normally using a string with environment variable or something, not a key file. The jwt mod expects a file to load up the secret/key. So I just create a file with the secret inside the file, but I keep getting.
```
failed to decode jwt value
```
After digging into the source and trying to debug. It looks like when it's handing secret in a file the kdata.len is off by one.
This is the dirty fix for me.
```
diff --git a/src/modules/jwt/jwt_mod.c b/src/modules/jwt/jwt_mod.c
index 233a0709..a67d0b89 100644
--- a/src/modules/jwt/jwt_mod.c
+++ b/src/modules/jwt/jwt_mod.c
@@ -509,7 +509,7 @@ static int ki_jwt_verify(sip_msg_t* msg, str *key, str *alg, str *claims,
}
}
- ret = jwt_decode(&jwt, jwtval->s, (unsigned char*)kdata.s, (size_t)kdata.len);
+ ret = jwt_decode(&jwt, jwtval->s, (unsigned char*)kdata.s, (size_t)kdata.len-1);
if (ret!=0 || jwt==NULL) {
LM_ERR("failed to decode jwt value\n");
goto error;
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3282
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3282(a)github.com>
Module: kamailio
Branch: master
Commit: 929986648dcfefa1212cbfcc129b7bb3a44259d6
URL: https://github.com/kamailio/kamailio/commit/929986648dcfefa1212cbfcc129b7bb…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-11-23T09:16:28+01:00
modules: readme files regenerated - presence ... [skip ci]
---
Modified: src/modules/presence/README
---
Diff: https://github.com/kamailio/kamailio/commit/929986648dcfefa1212cbfcc129b7bb…
Patch: https://github.com/kamailio/kamailio/commit/929986648dcfefa1212cbfcc129b7bb…
---
diff --git a/src/modules/presence/README b/src/modules/presence/README
index 9e378a5681..571ba1872f 100644
--- a/src/modules/presence/README
+++ b/src/modules/presence/README
@@ -1135,7 +1135,7 @@ kamcmd presence.updateWatchers sip:alice@domain.com presence
Parameters:
* mode - (optional) it can be 'full' to print all the fields of
- presentity record. If missine, only a selected set of fields are
+ presentity record. If missing, only a selected set of fields are
printed in the response.
RPC Command Format:
Module: kamailio
Branch: master
Commit: ced18c6f3c3a4632cb23510334466c236f08d26f
URL: https://github.com/kamailio/kamailio/commit/ced18c6f3c3a4632cb23510334466c2…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-11-23T09:07:44+01:00
presence: docs - small typo
---
Modified: src/modules/presence/doc/presence_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/ced18c6f3c3a4632cb23510334466c2…
Patch: https://github.com/kamailio/kamailio/commit/ced18c6f3c3a4632cb23510334466c2…
---
diff --git a/src/modules/presence/doc/presence_admin.xml b/src/modules/presence/doc/presence_admin.xml
index 7e425105aa4..9a1a655cc17 100644
--- a/src/modules/presence/doc/presence_admin.xml
+++ b/src/modules/presence/doc/presence_admin.xml
@@ -1381,7 +1381,7 @@ pres_update_watchers("sip:test@kamailio.org", "presence");
<itemizedlist>
<listitem>
<para>mode - (optional) it can be 'full' to print all the
- fields of presentity record. If missine, only a selected
+ fields of presentity record. If missing, only a selected
set of fields are printed in the response.</para>
</listitem>
</itemizedlist>
Hello!
We needed rtpengine module to be asynchronous. I needed help for this.
1) I want to understand how many of the commands in the list are needed to be made asynchronous.
2) I went through evapi module to understand how asynchronous commands were implemented by suspending request/responses and then continuing. But I couldn't see anywhere where the suspended commands were being continued.
Thank you.
Module: kamailio
Branch: master
Commit: 8c59f8e782381811b1afb6a75b8b8c9fa6959933
URL: https://github.com/kamailio/kamailio/commit/8c59f8e782381811b1afb6a75b8b8c9…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-11-15T17:31:21+01:00
modules: readme files regenerated - app_python3 ... [skip ci]
---
Modified: src/modules/app_python3/README
---
Diff: https://github.com/kamailio/kamailio/commit/8c59f8e782381811b1afb6a75b8b8c9…
Patch: https://github.com/kamailio/kamailio/commit/8c59f8e782381811b1afb6a75b8b8c9…
---
diff --git a/src/modules/app_python3/README b/src/modules/app_python3/README
index f59291a078..914350572b 100644
--- a/src/modules/app_python3/README
+++ b/src/modules/app_python3/README
@@ -195,9 +195,9 @@ python_exec("my_python_function", "$rU");
in each worker when it next invokes a Python method. The module uses a
worker process lock to prevent recursive reloads.
- This function only reloads the user script and creates a new script
- object. It does not reinitialize the interpreter. E.g., references in
- the old module remain if not redefined by the new version.
+ This function only reloads (re-executes) the user script and creates a
+ new script object. It does not reinitialize the interpreter (references
+ in the old module remain if not redefined by the new version).
Name: app_python.reload
@@ -208,6 +208,24 @@ python_exec("my_python_function", "$rU");
kamcmd app_python.reload
...
+ Note that reload is done for the Python script provided as parameter to
+ this Kamailio module. To reload the Python libraries imported in this
+ script, use something like:
+...
+import mod1
+...
+import modN
+from importlib import reload
+
+def mod_init():
+ reload(mod1)
+ ...
+ reload(modN)
+ return kamailio()
+...
+
+ Where "modX" are the modules imported at the top.
+
5.2. app_python.api_list
List the functions available via Kemi framework.
Module: kamailio
Branch: master
Commit: 34d60608bea449ab7258a5d88894651303b80adf
URL: https://github.com/kamailio/kamailio/commit/34d60608bea449ab7258a5d88894651…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-11-15T17:24:23+01:00
app_python3: docs - added note about how Python modules used in script can be reloaded
---
Modified: src/modules/app_python3/doc/app_python3_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/34d60608bea449ab7258a5d88894651…
Patch: https://github.com/kamailio/kamailio/commit/34d60608bea449ab7258a5d88894651…
---
diff --git a/src/modules/app_python3/doc/app_python3_admin.xml b/src/modules/app_python3/doc/app_python3_admin.xml
index 0f4c63ffd0..67f6058020 100644
--- a/src/modules/app_python3/doc/app_python3_admin.xml
+++ b/src/modules/app_python3/doc/app_python3_admin.xml
@@ -203,12 +203,12 @@ python_exec("my_python_function", "$rU");
<para>
Marks the need to reload the Python script.
The actual reload is done in each worker when it next invokes a Python method.
- The module uses a worker process lock to prevent recursive reloads.
+ The module uses a worker process lock to prevent recursive reloads.
</para>
<para>
- This function only reloads the user script and creates a new script object.
- It does not reinitialize the interpreter.
- E.g., references in the old module remain if not redefined by the new version.
+ This function only reloads (re-executes) the user script and creates
+ a new script object. It does not reinitialize the interpreter (references
+ in the old module remain if not redefined by the new version).
</para>
<para>
Name: <emphasis>app_python.reload</emphasis>
@@ -222,6 +222,28 @@ python_exec("my_python_function", "$rU");
&kamcmd; app_python.reload
...
</programlisting>
+ <para>
+ Note that reload is done for the Python script provided as parameter
+ to this &kamailio; module. To reload the Python libraries imported
+ in this script, use something like:
+ </para>
+ <programlisting format="linespecific">
+...
+import mod1
+...
+import modN
+from importlib import reload
+
+def mod_init():
+ reload(mod1)
+ ...
+ reload(modN)
+ return kamailio()
+...
+ </programlisting>
+ <para>
+ Where "modX" are the modules imported at the top.
+ </para>
</section>
<section id="app_python3.r.api_list">
<title>
Hello,
as some of you may know from previous announcements, a few of us meet
tomorrow and the day after in Dusseldorf at sipgate.de for a Kamailio
development event. Should anyone want to join remotely, we can make
available a video conference bridge.
Join if you want to work together to add new features to Kamailio or
help improving existing tools and documentation. It is not an event for
discussing about Kamailio or how to use it.
Reply to this email (can be only to me this time) if you want to join
remotely and eventually provide the time you think you would be around
and, if you have something in mind, what you would like to work on. You
can also join if you don't have already something to work on, you can
become part of another team and help them.
You will receive privately the details of how to join the video
conference room.
Tomorrow we plan to to start the day around 10:30 Berlin time zone (UTC
+ 1), probably wrapping up around 17:00. The schedule for Thursday will
be given tomorrow once it is decided.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Module: kamailio
Branch: master
Commit: 5ecae10fabb5da1911c7a7843ba3fb595bfb39e0
URL: https://github.com/kamailio/kamailio/commit/5ecae10fabb5da1911c7a7843ba3fb5…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-11-10T12:01:36+01:00
modules: readme files regenerated - dialog ... [skip ci]
---
Modified: src/modules/dialog/README
---
Diff: https://github.com/kamailio/kamailio/commit/5ecae10fabb5da1911c7a7843ba3fb5…
Patch: https://github.com/kamailio/kamailio/commit/5ecae10fabb5da1911c7a7843ba3fb5…
---
diff --git a/src/modules/dialog/README b/src/modules/dialog/README
index d850087b7f..06e279ec4f 100644
--- a/src/modules/dialog/README
+++ b/src/modules/dialog/README
@@ -1814,7 +1814,7 @@ if(dlg_get_var("$var(ci)", "$var(ft)", "456", "test", "$var(tmp)"))
Meaning of the parameters is as follows:
* callid - SIP call-id.
* ftag - SIP From tag.
- * ttag - SIP To tag.
+ * ttag - SIP To tag. Use "" value to indicate early dialog.
* name - key name of the $dlg_var.
* value - string value to store at $dlg_var(name).
@@ -1827,6 +1827,11 @@ if(dlg_set_var("$var(ci)", "$var(ft)", "456", "test", "$var(tmp)"))
{
xdbg("set $$dlg_var(test):$var(tmp)\n");
}
+# you can set vars in early dialog too
+if(dlg_set_var("$var(ci)", "$var(ft)", "", "test", "$var(tmp)"))
+{
+ xdbg("set $$dlg_var(test):$var(tmp)\n");
+}
...
7.15. is_known_dlg()
<!--
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
#### Description
support setting vars for non established dialogs
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3277
-- Commit Summary --
* dialog: dlg_set_var() support empty totag parameter
* dialog: add a note for early dialogs in dlg_set_var()
-- File Changes --
M src/modules/dialog/dialog.c (8)
M src/modules/dialog/doc/dialog_admin.xml (7)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3277.patchhttps://github.com/kamailio/kamailio/pull/3277.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3277
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3277(a)github.com>
Hello,
are there any objections to extend the https://github.com/kamailio/kamailio-docker packages to support some environment variables to allow some customization?
* add a run.sh script
* evaluate SHM_MEMORY and PKG_MEMORY variables
* set "-M" and "-m" parameters appropriately for startup
The shared memory pool can be set in the kamailio.cfg, but AFAIK the private memory pool not. Additionally using environment variables would be the common way that is used also in other well-known packages. If no variable is set, the default would be used.
Thanks,
Henning
Module: kamailio
Branch: master
Commit: 065a83fbb1a8b9b1912aadecff039a485c2d46dd
URL: https://github.com/kamailio/kamailio/commit/065a83fbb1a8b9b1912aadecff039a4…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-10-29T09:31:37+02:00
modules: readme files regenerated - dispatcher ... [skip ci]
---
Modified: src/modules/dispatcher/README
---
Diff: https://github.com/kamailio/kamailio/commit/065a83fbb1a8b9b1912aadecff039a4…
Patch: https://github.com/kamailio/kamailio/commit/065a83fbb1a8b9b1912aadecff039a4…
---
diff --git a/src/modules/dispatcher/README b/src/modules/dispatcher/README
index 9d4287804f..abf41a6d85 100644
--- a/src/modules/dispatcher/README
+++ b/src/modules/dispatcher/README
@@ -1206,7 +1206,9 @@ With congestion control the formula becomes :
set is chosen.
* limit - the maximum number of items to be stored in XAVP list for
further fail-overs (the first selected destination and default
- destination are the first to be put in the list)
+ destination are the first to be put in the list). This can improve
+ the performance especially if you are using a large list of
+ gateways.
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
Module: kamailio
Branch: master
Commit: 0dc7d711c4c2d16d532862344f9ccd629de38e20
URL: https://github.com/kamailio/kamailio/commit/0dc7d711c4c2d16d532862344f9ccd6…
Author: Henning Westerholt <hw(a)gilawa.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2022-10-29T07:17:10Z
dispatcher: small docs extensions regarding to ds_select_dst
---
Modified: src/modules/dispatcher/doc/dispatcher_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/0dc7d711c4c2d16d532862344f9ccd6…
Patch: https://github.com/kamailio/kamailio/commit/0dc7d711c4c2d16d532862344f9ccd6…
---
diff --git a/src/modules/dispatcher/doc/dispatcher_admin.xml b/src/modules/dispatcher/doc/dispatcher_admin.xml
index 1c9de29ba78..022c915e139 100644
--- a/src/modules/dispatcher/doc/dispatcher_admin.xml
+++ b/src/modules/dispatcher/doc/dispatcher_admin.xml
@@ -1399,7 +1399,8 @@ With congestion control the formula becomes :
<emphasis>limit</emphasis> - the maximum number of items to be
stored in XAVP list for further fail-overs (the first selected
destination and default destination are the first to be put in
- the list)
+ the list). This can improve the performance especially if you
+ are using a large list of gateways.
</para>
</listitem>
</itemizedlist>
Module: kamailio
Branch: master
Commit: 9b4d4d059e6222a64a9b9cadb0b867bea27ed0d8
URL: https://github.com/kamailio/kamailio/commit/9b4d4d059e6222a64a9b9cadb0b867b…
Author: Henning Westerholt <hw(a)gilawa.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2022-10-29T07:15:10Z
dispatcher: small spelling fix in comment
---
Modified: src/modules/dispatcher/dispatch.c
---
Diff: https://github.com/kamailio/kamailio/commit/9b4d4d059e6222a64a9b9cadb0b867b…
Patch: https://github.com/kamailio/kamailio/commit/9b4d4d059e6222a64a9b9cadb0b867b…
---
diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c
index 8f06f6f5cbb..66ebd19996e 100644
--- a/src/modules/dispatcher/dispatch.c
+++ b/src/modules/dispatcher/dispatch.c
@@ -2065,7 +2065,7 @@ int ds_select_dst(struct sip_msg *msg, int set, int alg, int mode)
* Set destination address from group 'set' selected with alogorithm 'alg'
* - the rest of addresses in group are added as next destination in xavps,
* up to the 'limit'
- * - mode specify to set address in R-URI or outboud proxy
+ * - mode specify to set address in R-URI or outbound proxy
*
*/
int ds_select_dst_limit(sip_msg_t *msg, int set, int alg, uint32_t limit,
Module: kamailio
Branch: master
Commit: e7e2366634f7b56136b11d4b196150467a18b651
URL: https://github.com/kamailio/kamailio/commit/e7e2366634f7b56136b11d4b1961504…
Author: Henning Westerholt <hw(a)gilawa.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2022-10-29T07:14:57Z
core: small spelling fix in comment
---
Modified: src/core/parser/msg_parser.h
---
Diff: https://github.com/kamailio/kamailio/commit/e7e2366634f7b56136b11d4b1961504…
Patch: https://github.com/kamailio/kamailio/commit/e7e2366634f7b56136b11d4b1961504…
---
diff --git a/src/core/parser/msg_parser.h b/src/core/parser/msg_parser.h
index 595c1be8957..d582ddf7200 100644
--- a/src/core/parser/msg_parser.h
+++ b/src/core/parser/msg_parser.h
@@ -110,7 +110,7 @@ typedef enum request_method {
#define FL_MSG_NOREPLY (1<<23) /*!< do not send sip reply for request */
#define FL_SIPTRACE (1<<24) /*!< message to be traced in stateless replies */
#define FL_ROUTE_ADDR (1<<25) /*!< request has Route address for next hop */
-#define FL_USE_OTCPID (1<<26) /*!< request to be routed using outboud tcp con id */
+#define FL_USE_OTCPID (1<<26) /*!< request to be routed using outbound tcp con id */
/* WARNING: Value (1 << 28) is reserved for use in kamailio call_control
* module (flag FL_USE_CALL_CONTROL )! */
Module: kamailio
Branch: master
Commit: 77840e465e1e074ede44fbc262faa850e1c4f862
URL: https://github.com/kamailio/kamailio/commit/77840e465e1e074ede44fbc262faa85…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-10-27T10:16:43+02:00
modules: readme files regenerated - app_python3 ... [skip ci]
---
Modified: src/modules/app_python3/README
---
Diff: https://github.com/kamailio/kamailio/commit/77840e465e1e074ede44fbc262faa85…
Patch: https://github.com/kamailio/kamailio/commit/77840e465e1e074ede44fbc262faa85…
---
diff --git a/src/modules/app_python3/README b/src/modules/app_python3/README
index 49bc577444..f59291a078 100644
--- a/src/modules/app_python3/README
+++ b/src/modules/app_python3/README
@@ -87,6 +87,11 @@ Chapter 1. Admin Guide
module, look at the files inside the source tree located at
'modules/app_python3/python_examples/'.
+ Note: if symbols exported to KEMI (module or function names) conflict
+ with Python's reserved keywords, use the 'getattr()' function or the
+ '__dict__' attribute for 'KSR' (e.g.,
+ 'KSR.__dict__["async"].task_route("myroute")').
+
2. Dependencies
2.1. Kamailio Modules
Module: kamailio
Branch: master
Commit: 0d6d434a92ae69cf1e503f07ffa6f46a9948593e
URL: https://github.com/kamailio/kamailio/commit/0d6d434a92ae69cf1e503f07ffa6f46…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-10-27T10:07:36+02:00
app_python3: note about kemi symbols and python reserved words
---
Modified: src/modules/app_python3/doc/app_python3_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/0d6d434a92ae69cf1e503f07ffa6f46…
Patch: https://github.com/kamailio/kamailio/commit/0d6d434a92ae69cf1e503f07ffa6f46…
---
diff --git a/src/modules/app_python3/doc/app_python3_admin.xml b/src/modules/app_python3/doc/app_python3_admin.xml
index c2648c48c82..0f4c63ffd04 100644
--- a/src/modules/app_python3/doc/app_python3_admin.xml
+++ b/src/modules/app_python3/doc/app_python3_admin.xml
@@ -34,6 +34,11 @@
this module, look at the files inside the source tree located at
'modules/app_python3/python_examples/'.
</para>
+ <para>
+ Note: if symbols exported to KEMI (module or function names) conflict
+ with Python's reserved keywords, use the 'getattr()' function or the
+ '__dict__' attribute for 'KSR' (e.g., 'KSR.__dict__["async"].task_route("myroute")').
+ </para>
</section>
<section>
<title>Dependencies</title>
### Description
Using the KEMI async module in Python is not possible, since the `async` word is a reserved word in Python3. This leads to a syntax error.
#### Reproduction
```python
import KSR
KSR.async.task_route("")
```
### Possible Solutions
The below code works, but not sure if this is a right approach to this issue.
`KSR.__dict__["async"].task_route("my_route")`
### Additional Information
```
version: kamailio 5.6.1 (x86_64/linux) b36a13
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: b36a13
compiled on 10:06:47 Oct 25 2022 with gcc 10.2.1
```
```
Linux b0fe2a764c5e 5.10.124-linuxkit #1 SMP Thu Jun 30 08:19:10 UTC 2022 x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3272
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3272(a)github.com>
Hi,
maybe im wrong, but it seems the sipt module is not implemented in KEMI Framework.
Is it planned? :)
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3264
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3264(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 -->
- [x] 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 -->
Adding add_uri_param method to kemi
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3268
-- Commit Summary --
* siputils: adding add_uri_param to kemi
-- File Changes --
M src/modules/siputils/siputils.c (5)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3268.patchhttps://github.com/kamailio/kamailio/pull/3268.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3268
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3268(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)
- [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
- [x] Related to issue #3263 (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
New params:
- reload_delta: To set the number of seconds that have to be waited before executing a new RPC reload
- cleanup_interval: To set the number of seconds that have to be wait before cleanup the previous values from memory after a RPC reload
The purpose is to avoid problems when accessing data lists while doing an RPC reload.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3271
-- Commit Summary --
* secfilter: cleanup old data after a reload by timer function
-- File Changes --
M src/modules/secfilter/secfilter.c (148)
M src/modules/secfilter/secfilter.h (9)
M src/modules/secfilter/secfilter_db.c (22)
M src/modules/secfilter/secfilter_rpc.c (58)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3271.patchhttps://github.com/kamailio/kamailio/pull/3271.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3271
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3271(a)github.com>
Module: kamailio
Branch: master
Commit: e7b3724d3fc514c8a541a6a7f7fb1a782f21f2e7
URL: https://github.com/kamailio/kamailio/commit/e7b3724d3fc514c8a541a6a7f7fb1a7…
Author: Jose Luis Verdeguer <pepeluxx(a)gmail.com>
Committer: Jose Luis Verdeguer <pepeluxx(a)gmail.com>
Date: 2022-10-22T16:43:26+02:00
secfilter: Added information about two new params in the README file [skip ci]
---
Modified: src/modules/secfilter/doc/secfilter_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/e7b3724d3fc514c8a541a6a7f7fb1a7…
Patch: https://github.com/kamailio/kamailio/commit/e7b3724d3fc514c8a541a6a7f7fb1a7…
---
diff --git a/src/modules/secfilter/doc/secfilter_admin.xml b/src/modules/secfilter/doc/secfilter_admin.xml
index fff4ca3b2c8..48c54868de6 100644
--- a/src/modules/secfilter/doc/secfilter_admin.xml
+++ b/src/modules/secfilter/doc/secfilter_admin.xml
@@ -212,6 +212,47 @@
</programlisting>
</example>
</section>
+
+ <section id="secfilter.p.reload_delta">
+ <title><varname>reload_delta</varname> (integer)</title>
+
+ <para>
+ The number of seconds that have to be waited before executing a new RPC reload.
+ By default there is a rate limiting of maximum one reload in five seconds.
+
+ If set to <emphasis>0</emphasis>, no rate limit is configured.
+ </para>
+ <para><emphasis> Default value is 5</emphasis></para>
+
+ <example>
+ <title>Set <varname>reload_delta</varname> parameter</title>
+
+ <programlisting format="linespecific">
+ ...
+ modparam("secfilter", "reload_delta", 1)
+ ...
+ </programlisting>
+ </example>
+ </section>
+
+ <section id="secfilter.p.cleanup_interval">
+ <title><varname>cleanup_interval</varname> (integer)</title>
+
+ <para>
+ The number of seconds that have to be wait before cleanup the previous values from memory after a RPC reload.
+ </para>
+ <para><emphasis> Default value is 60</emphasis></para>
+
+ <example>
+ <title>Set <varname>cleanup_interval</varname> parameter</title>
+
+ <programlisting format="linespecific">
+ ...
+ modparam("secfilter", "cleanup_interval", 120)
+ ...
+ </programlisting>
+ </example>
+ </section>
</section>
<section>
<!-- 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)
- [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
- [x] Related to issue #3263 (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
New params:
- eload_delta: To set the number of seconds that have to be waited before executing a new RPC reload
- cleanup_interval: To set the number of seconds that have to be wait before cleanup the previous values from memory after a RPC reload
The purpose is to avoid problems when accessing data lists while doing an RPC reload.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3270
-- Commit Summary --
* secfilter: added locks while check list values
* secfilter: lock position changed
* secfilter: cleanup old data after a reload by timer function
* Merge branch 'master' into pepelux/secfilter
* secfilter: cleanup old data after a reload by timer function
* secfilter: Added information about two new params in the README file [skip ci]
* cleanup old data after a reload by timer function
-- File Changes --
M src/modules/secfilter/doc/secfilter_admin.xml (41)
M src/modules/secfilter/secfilter.c (148)
M src/modules/secfilter/secfilter.h (9)
M src/modules/secfilter/secfilter_db.c (22)
M src/modules/secfilter/secfilter_rpc.c (58)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3270.patchhttps://github.com/kamailio/kamailio/pull/3270.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3270
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3270(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)
- [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
<!-- Describe your changes in detail -->
New params:
- reload_delta: To set the number of seconds that have to be waited before executing a new RPC reload
- cleanup_interval: To set the number of seconds that have to be wait before cleanup the previous values from memory after a RPC reload
The purpose is to avoid problems when accessing data lists while doing an RPC reload.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3269
-- Commit Summary --
* secfilter: added locks while check list values
* secfilter: lock position changed
* secfilter: cleanup old data after a reload by timer function
-- File Changes --
M src/modules/secfilter/secfilter.c (122)
M src/modules/secfilter/secfilter.h (9)
M src/modules/secfilter/secfilter_db.c (22)
M src/modules/secfilter/secfilter_rpc.c (57)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3269.patchhttps://github.com/kamailio/kamailio/pull/3269.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3269
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3269(a)github.com>
### Description
Hello!
I'm running a sip service and have several crash per day.
The crash is happening in secfilter module, method "w_check_ip" line 651
https://github.com/kamailio/kamailio/blob/master/src/modules/secfilter/secf…
#### Reproduction
I noticed that every core is generated when I insert a new IP and most probably, when I call
kamcmd secfilter.reload
NOTE: I'm calling the above command line from the kamailio script
#### Debugging Data
```
(gdb) bt
#0 __strncasecmp_l_avx () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:271
#1 0x0000564a161b6413 in cmpi_str (s1=0x7f0bdcbc1b28, s2=0x7ffd88e2c580) at core/strutils.c:443
#2 0x00007f0bd069c983 in w_check_ip (msg=0x7f0be1619620) at secfilter.c:651
#3 0x0000564a15f8cafc in do_action (h=0x7ffd88e2d640, a=0x7f0be142f118, msg=0x7f0be1619620) at core/action.c:1079
#4 0x0000564a15f9bb26 in run_actions (h=0x7ffd88e2d640, a=0x7f0be14296e8, msg=0x7f0be1619620) at core/action.c:1584
#5 0x0000564a15f889d9 in do_action (h=0x7ffd88e2d640, a=0x7f0be15996f0, msg=0x7f0be1619620) at core/action.c:703
#6 0x0000564a15f9bb26 in run_actions (h=0x7ffd88e2d640, a=0x7f0be1598c70, msg=0x7f0be1619620) at core/action.c:1584
#7 0x0000564a15f9c3a0 in run_top_route (a=0x7f0be1598c70, msg=0x7f0be1619620, c=0x0) at core/action.c:1669
#8 0x0000564a160f2e96 in receive_msg (
buf=0x564a16549ea0 <buf> "REGISTER sip:sip.antisip.com SIP/2.0\r\nVia: SIP/2.0/UDP 10.1.1.78:5060;branch=z9hG4bKVsAO82I6G4Oe4Okgc;rport\r\nFrom: \"504f9410db5c\" <sip:XXXXXXXXXXXX@sip.antisip.com>;tag=D2yOicg8WAMe4Sii\r\nTo: \"XXXXXXXX"..., len=429, rcv_info=0x7ffd88e2daf0) at core/receive.c:501
#9 0x0000564a16251d97 in udp_rcv_loop () at core/udp_server.c:543
#10 0x0000564a15f75ce9 in main_loop () at main.c:1730
#11 0x0000564a15f829a1 in main (argc=10, argv=0x7ffd88e2e508) at main.c:3061
```
#### Log Messages
Oct 12 00:28:08 sip kamailio[19274]: ALERT: <core> [main.c:788]: handle_sigs(): child process 19474 exited by a signal 11
Oct 12 00:28:08 sip kamailio[19274]: ALERT: <core> [main.c:791]: handle_sigs(): core was generated
Oct 12 00:28:08 sip kamailio[19274]: INFO: <core> [main.c:813]: handle_sigs(): terminating due to SIGCHLD
#### SIP Traffic
not applicable
### Possible Solutions
I guess the secfilter reload is happening at the same time w_check_ip loops over the data. Some mutex should probably be missing.
### Additional Information
Debian GNU/Linux 11 (bullseye)
kamailio 5.5.5 (x86_64/linux) installed from http://deb.kamailio.org/
secfilter module hasn't changed much since 5.5.5, so I it looks like master branch is still affected.
Thanks a lot.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3263
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3263(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 -->
- [x ] PR should be backported to stable branches
- [x ] Tested changes locally
- [x ] Related to issue #3263 (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
Locks have been added to several functions to prevent data from changing while they are being queried.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3267
-- Commit Summary --
* secfilter: added locks while check list values
-- File Changes --
M src/modules/secfilter/secfilter.c (25)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3267.patchhttps://github.com/kamailio/kamailio/pull/3267.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3267
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3267(a)github.com>
Hello,
as I am not a user of dialog variables, I am turning to community to ask
for help testing the current master branch with configurations that make
use of dialog variables and acc dialog-based cdr generation.
With a few reports of issues related to dialog modules and unexpected
crashes, I looked over the code and noticed that the access of the value
for dialog variables was not protected, making them vulnerable of
invalid memory access in case of the variable was updated by another
process or dialog was terminated.
I introduced a couple of new functions to try to cover different use
cases of getting the dlg variable values, dialog management code was not
affected, but given that these commits need to be backported to stable
branch (5.6), I want to get proper feedback from community that things
work fine.
A previous attempt of a simpler fix was not enough, having side effects
to acc module for dialog-based cdr generation, because it was keeping
referenced to many dlg variables at the same time.
In short, it would be appreciated any feedback on testing dialog and acc
with dialog-based cdr generation using git master branch.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Online
Nov 7-10, 2022 (Europe Timezone)
* https://www.asipto.com/sw/kamailio-advanced-training-online/
<!-- 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 -->
- [ ] 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
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
We have found a random crash in the CTL module handler and we are using kamailio 5.4.7. Based on the core log analysis, we have identified that, due to some of the RPC events this crash happens.
This crash happen when "rpc_mod_is_printed_one" funtion recevies the parameter ( mem_counter *stats ) as NULL. To avoid the crash, we have added the below code.
if ( stats == NULL || current == NULL )
{
LM_ERR("rpc_mod_is_printed_one -> funtion parameter contains null value \n");
return 1;
}
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3250
-- Commit Summary --
* Update mod_stats.c Random crash in CTL handler
-- File Changes --
M src/modules/kex/mod_stats.c (6)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3250.patchhttps://github.com/kamailio/kamailio/pull/3250.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3250
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3250(a)github.com>
Fix the below warning one gets when compiling siputils for a 32 bit target against a time64 libc (musl).
Also fix a spelling mistake on the same line ("autdated" -> "outdated").
```
siputils.c: In function 'ki_hdr_date_check':
../../core/parser/../dprint.h:321:73: warning: format '%ld' expects argument of type 'long int', but argument 11 has type 'time_t' {aka 'long long int'} [-Wformat=]
321 | fprintf(stderr, "%2d(%d) %s: %.*s%s%s%s" fmt, \
| ^~~~~~~~~~~~~~~~~~~~~~~~
../../core/parser/../dprint.h:345:25: note: in expansion of macro 'LOG_FX'
345 | LOG_FX(facility, level, lname, prefix, _FUNC_NAME_, fmt, ## args)
| ^~~~~~
../../core/parser/../dprint.h:351:25: note: in expansion of macro 'LOG_FL'
351 | LOG_FL(facility, level, NULL, prefix, fmt, ## args)
| ^~~~~~
../../core/parser/../dprint.h:354:25: note: in expansion of macro 'LOG_FP'
354 | LOG_FP(DEFAULT_FACILITY, (level), LOC_INFO, fmt, ## args)
| ^~~~~~
../../core/parser/../dprint.h:392:37: note: in expansion of macro 'LOG'
392 | # define ERR(fmt, args...) LOG(L_ERR, fmt , ## args)
| ^~~
../../core/parser/../dprint.h:418:16: note: in expansion of macro 'ERR'
418 | #define LM_ERR ERR
| ^~~
siputils.c:562:17: note: in expansion of macro 'LM_ERR'
562 | LM_ERR("autdated date header value (%ld sec)\n", tnow - tmsg + tdiff);
| ^~~~~~
```
Signed-off-by: Sebastian Kemper <sebastian_ml(a)gmx.net>
<!-- 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 -->
- [x] 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 -->
Hi all,
I ticked "Tested changes locally" because I ran kamailio with siputils module loaded, but I wouldn't know how to trigger the exact code path to end up with the error message I updated. But the compile warning goes away with this change and the same mechanism for time_t format handling is used elsewhere in kamailio already.
Kind regards,
Seb
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3266
-- Commit Summary --
* siputils: fix time_t warning and a typo
-- File Changes --
M src/modules/siputils/siputils.c (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3266.patchhttps://github.com/kamailio/kamailio/pull/3266.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3266
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3266(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 -->
- [ ] 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
- [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
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
In the two log lines, message id is written instead of rtpengine set id.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3265
-- Commit Summary --
* rtpengine: fixed set id value in log lines
-- File Changes --
M src/modules/rtpengine/rtpengine.c (4)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3265.patchhttps://github.com/kamailio/kamailio/pull/3265.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3265
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3265(a)github.com>
### Description
After I turned on topoh module, the forwarding call flow seems to break. This might be caused by the Contact header on Redirecting request is masked.
### Expected behavior
The Contact header in 301, 302 SIP message will not be masked, and the forward call will succeed.
#### Actual observed behavior
The 302 SIP Contact header gets masked by 127.0.0.1 (masked_ip).
#### SIP Traffic
```
2022/10/05 13:47:58.093790 192.168.1.109:5060 -> 192.168.1.66:55709
SIP/2.0 302 Moved Temporarily
Via: SIP/2.0/TCP 192.168.1.66:58554;received=192.168.1.66;branch=z9hG4bK-524287-1---493db1f2d8f51001;rport=55709
Record-Route: <sip:127.0.0.1;line=sr-N6IAzBFsMJZfWBc7MmZfMxq-W.y6Mx1LMBu5oB1dNB1EpSthH.3sW6WBW.Vlz6aYgxuqMB37z.pBMP**>
Record-Route: <sip:192.168.1.109;transport=tcp;r2=on;lr;ftag=697cc523;did=d26.97c1>
From: <sip:1000@192.168.1.109;transport=TCP>;tag=697cc523
To: <sip:1001@192.168.1.109>;tag=1357659545
Call-ID: g_hnmT8yukR7M9QxI-t6jA..
CSeq: 2 INVITE
Contact: <sip:127.0.0.1;line=sr-N6IAzBj6M.KyM.qLOBF6zGZfOBF6W.vuMxNA>
Supported: replaces, path, timer
User-Agent: Grandstream GXP1620 1.0.4.106
Diversion: <sip:1001@192.168.1.165:5070>;reason=unconditional
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0
```
### Possible Solutions
The behavior becomes normal when I turn off the topoh module.
Hence, I think this can be solved by retaining the Contact header for 301, 302 requests when using topoh.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
kamailio 5.4.5
```
* **Operating System**:
```
Centos 7
```
[topoh_302.tar.gz](https://github.com/kamailio/kamailio/files/9714508/topoh_…
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3256
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3256(a)github.com>
This is used when a service (like AWS IoT Core) uses one TLS port for multiple services (like https and mqtt), so you have to set the ALPN to 'mqtt' to be able to connect kamailio.
<!-- 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 -->
Some services use ALPN to have one single TLS port serving multiple protocols, in order to avoid additional round-trips for negotiating TLS connections. https://en.wikipedia.org/wiki/Application-Layer_Protocol_Negotiation has the details.
One of those services using ALPN is AWS IoT Core, which allows components to send messages both via HTTP and MQTT to AWS for further processing (e.g. logging, analysis, storage to db etc). This patch enables kamailio to communicate with this service by allowing the kamailio admin to set the mqtt.so module mod-param *tls_alpn* to *mqtt*.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3261
-- Commit Summary --
* mqtt: Add tls_alpn module option
-- File Changes --
M src/modules/mqtt/doc/mqtt_admin.xml (21)
M src/modules/mqtt/mqtt_dispatch.c (13)
M src/modules/mqtt/mqtt_dispatch.h (3)
M src/modules/mqtt/mqtt_mod.c (5)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3261.patchhttps://github.com/kamailio/kamailio/pull/3261.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3261
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3261(a)github.com>
Module: kamailio
Branch: master
Commit: ea7201d9c3b086fb79c093b4f127516befb08e25
URL: https://github.com/kamailio/kamailio/commit/ea7201d9c3b086fb79c093b4f127516…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-10-13T15:46:31+02:00
modules: readme files regenerated - tsilo ... [skip ci]
---
Modified: src/modules/tsilo/README
---
Diff: https://github.com/kamailio/kamailio/commit/ea7201d9c3b086fb79c093b4f127516…
Patch: https://github.com/kamailio/kamailio/commit/ea7201d9c3b086fb79c093b4f127516…
---
diff --git a/src/modules/tsilo/README b/src/modules/tsilo/README
index c93fa0ebef..06029a2bac 100644
--- a/src/modules/tsilo/README
+++ b/src/modules/tsilo/README
@@ -180,7 +180,7 @@ modparam("tsilo", "use_domain", 1)
if (is_method("INVITE")) {
if (t_newtran()) {
ts_store();
- # t_store("sip:alice@$td");
+ # ts_store("sip:alice@$td");
}
}
...
@@ -199,6 +199,11 @@ if (is_method("INVITE")) {
and add them new branches. Can be a static string value or a
dynamic string with pseudo-variables.
+ Return codes:
+ * 1 - branches added.
+ -1 - an internal error has produced (parsing error, memory error).
+ -2 - no records found for the r-uri.
+
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
Example 1.4. ts_append usage
@@ -231,6 +236,11 @@ if (is_method("REGISTER")) {
location lookup based on this Contact URI fails (no location record
found), then the branch append will not happen.
+ Return codes:
+ * 1 - branches added.
+ -1 - an internal error has produced (parsing error, memory error).
+ -2 - no records found for the r-uri.
+
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
Example 1.5. ts_append_by_contact usage
I found a problem when I tested again. When the interval between the transmission of two info messages is too short, the forwarding of kamailio will be confused. Can this be solved please?
<img width="1077" alt="3212f45cd3f97e395065c8a109eaa9d" src="https://user-images.githubusercontent.com/16113837/195576921-dafc0511-5b8e-…">

--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3262
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3262(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 -->
- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [x] Related to https://github.com/kamailio/kamailio/commit/aa6e9963b2725c1b6b7e5ff995a77c2…https://lists.kamailio.org/pipermail/sr-users/2020-November/111152.html
#### Description
tm.t_uac_start adds new tag into from header even if it exists. It has already been fixed for t_uac_send function. But there is the same problem for tm.t_uac_start RPC command. I've fixed it in the same way.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3251
-- Commit Summary --
* tm: proper fill of From/To URI/tag values using parsed structure in rpc_t_uac()
-- File Changes --
M src/modules/tm/rpc_uac.c (24)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3251.patchhttps://github.com/kamailio/kamailio/pull/3251.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3251
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3251(a)github.com>
### Description
While trying to iterate over an empty htable, this erro is printed:
```
ERROR: htable [ht_api.c:1847]: ht_iterator_end(): iterator not found [HTABLE_NAME]
```
There error log should be removed, it is normal to not find an iterator on an empty table.
This error is printed only on version 5.6.x and up.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3260
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3260(a)github.com>
Dear all
we have seen a core in a running production kamailio instance today, i attach you the bt in dropbox
version: kamailio 5.4.4 (x86_64/linux) 0ddb01-dirty
centos7 3.10.0-693.17.1.el7.x86_64
https://www.dropbox.com/s/fpunfs0o9aqhwww/kamailio_core_17agosto.txt?dl=0
~~~
#0 0x00007f4c131446ad in print_lists (dlg=0x7f4b60abb2e8) at dlg_var.c:277
#1 0x00007f4c131467ff in pv_set_dlg_variable (msg=0x7f4c17592d70, param=0x7f4c17aa88d0, op=254, val=0x7ffc8de8c990) at dlg_var.c:443
#2 0x00000000004f9c82 in lval_pvar_assign (h=0x7ffc8de8ddc0, msg=0x7f4c17592d70, lv=0x7f4c17aa8998, rv=0x7f4c17aa8b18) at core/lvalue.c:352
#3 0x00000000004fa780 in lval_assign (h=0x7ffc8de8ddc0, msg=0x7f4c17592d70, lv=0x7f4c17aa8998, rve=0x7f4c17aa8b10) at core/lvalue.c:400
#4 0x00000000004c3f6f in do_action (h=0x7ffc8de8ddc0, a=0x7f4c17aa92b0, msg=0x7f4c17592d70) at core/action.c:1455
#5 0x00000000004c5cab in run_actions (h=0x7ffc8de8ddc0, a=0x7f4c17aa8668, msg=0x7f4c17592d70) at core/action.c:1581
#6 0x00000000004b8867 in do_action (h=0x7ffc8de8ddc0, a=0x7f4c17aac2b0, msg=0x7f4c17592d70) at core/action.c:1067
#7 0x00000000004c5cab in run_actions (h=0x7ffc8de8ddc0, a=0x7f4c17aa34c0, msg=0x7f4c17592d70) at core/action.c:1581
#8 0x00000000004c63ef in run_top_route (a=0x7f4c17aa34c0, msg=0x7f4c17592d70, c=0x7ffc8de8ddc0) at core/action.c:1666
#9 0x00007f4c16bbc0a2 in reply_received (p_msg=0x7f4c17592d70) at t_reply.c:2543
#10 0x00000000005d0b69 in do_forward_reply (msg=0x7f4c17592d70, mode=0) at core/forward.c:764
#11 0x00000000005d283b in forward_reply (msg=0x7f4c17592d70) at core/forward.c:865
#12 0x0000000000622dd2 in receive_msg (
buf=0xb034a0 <buf.7140> "SIP/2.0 100 Trying\r\nVia: SIP/2.0/UDP 79.170.68.186;branch=z9hG4bK895d.0e2ee1cb7a0cde9ed9e78d7f0ec22c00.0\r\nVia: SIP/2.0/UDP 79.170.71.172:5080;received=79.170.71.172;rport=5080;branch=z9hG4bKtmtBy7jaQ5"..., len=449, rcv_info=0x7ffc8de8e8b0) at core/receive.c:509
#13 0x0000000000521e67 in udp_rcv_loop () at core/udp_server.c:543
#14 0x0000000000429f56 in main_loop () at main.c:1689
#15 0x0000000000434034 in main (argc=13, argv=0x7ffc8de8f148) at main.c:2876
~~~
Best regards,
Noel
--
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/2828
<!-- 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 -->
- [x] 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 -->
Ported all carrierroute module functions to KEMI API.
Here is an example,
```python3
...
# User location service
def ksr_route_location(self, msg):
if KSR.pv.get("$rm") == "INVITE" and KSR.carrierroute.cr_user_carrier("$fU", "$fd", "$avp(carrier)") > 0:
if KSR.pv.get("$rm") == "INVITE" and KSR.carrierroute.cr_route("$avp(carrier)","$avp(domain)","$rU","$rU","call_id") > 0:
KSR.info('Routing call via user carrier route\n')
self.ksr_route_relay(msg)
rc = KSR.registrar.lookup("location")
if rc < 0:
KSR.tm.t_newtran()
if rc == -1 or rc == -3:
KSR.sl.send_reply(404, "Not Found")
return -255
elif rc == -2:
KSR.sl.send_reply(405, "Method Not Allowed")
return -255
# when routing via usrloc, log the missed calls also
if KSR.is_INVITE() :
KSR.setflag(FLT_ACCMISSED)
self.ksr_route_relay(msg)
return -255
...
```
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3247
-- Commit Summary --
* KEMI API implementation for carrierroute module
-- File Changes --
M src/modules/carrierroute/carrierroute.c (50)
M src/modules/carrierroute/carrierroute.h (1)
M src/modules/carrierroute/cr_func.c (260)
M src/modules/carrierroute/cr_func.h (63)
A src/modules/carrierroute/cr_kemi.c (199)
A src/modules/carrierroute/cr_kemi.h (119)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3247.patchhttps://github.com/kamailio/kamailio/pull/3247.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3247
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3247(a)github.com>
Module: kamailio
Branch: master
Commit: 7306e7683fd50420e93b44ec5593705194bf3616
URL: https://github.com/kamailio/kamailio/commit/7306e7683fd50420e93b44ec5593705…
Author: Henning Westerholt <hw(a)gilawa.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2022-10-10T07:39:56Z
app_python: add a note that python2 is deprecated and app_python3 should be used
---
Modified: src/modules/app_python/doc/app_python_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/7306e7683fd50420e93b44ec5593705…
Patch: https://github.com/kamailio/kamailio/commit/7306e7683fd50420e93b44ec5593705…
---
diff --git a/src/modules/app_python/doc/app_python_admin.xml b/src/modules/app_python/doc/app_python_admin.xml
index f9a39a8364a..f428bed6d7f 100644
--- a/src/modules/app_python/doc/app_python_admin.xml
+++ b/src/modules/app_python/doc/app_python_admin.xml
@@ -25,6 +25,11 @@
this module, look at the files inside source tree located at
'modules/app_python/python_examples/'.
</para>
+ <para>
+ As python2 is deprecated in Debian and other distributions, please
+ use the <quote>app_python3</quote> module instead. This module will
+ be removed future releases.
+ </para>
</section>
<section>
<title>Dependencies</title>
Hello,
Kamailio SIP Server project is organizing another meeting of its
developers during November 16-17, 2022, hosted again by sipgate.de in
Dusseldorf, Germany.
The event is intended to facilitate the interaction between Kamailio
developers and to offer a convenient environment for working together on
several topics of high interest for the project, including writing code
for Kamailio and its tools, improving documentation, or discuss about
future development.
Everyone from the community is welcome to join. Please note we have a
limited capacity of seats in the meeting room, the main policy for
accepting participants being first come first server. Also, very
important to be aware that this is not an event to learn how to use
Kamailio.
More details about the event, the venue, how to register, are available at:
* https://www.kamailio.org/w/developers-meeting/
Looking forward to those two intensive hacking Kamailio days in Dusseldorf!
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Online
Oct 10-13, 2022 (Europe Timezone)
* https://www.asipto.com/sw/kamailio-advanced-training-online/
Hello,
Kamailio SIP Server v5.6.2 stable release is out.
This is a maintenance release of the latest stable branch, 5.6, that
includes fixes since the release of v5.6.1. There is no change to
database schema or configuration language structure that you have to do
on previous installations of v5.6.x. Deployments running previous v5.6.x
versions are strongly recommended to be upgraded to v5.6.2.
For more details about version 5.6.2 (including links and guidelines to
download the tarball or from GIT repository), visit:
* https://www.kamailio.org/w/2022/10/kamailio-v5-6-2-released/
RPM, Debian/Ubuntu packages will be available soon as well.
Many thanks to all contributing and using Kamailio!
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Module: kamailio
Branch: master
Commit: 640456bb13cd9da3ff84ca3542f9f28446062d7c
URL: https://github.com/kamailio/kamailio/commit/640456bb13cd9da3ff84ca3542f9f28…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-10-04T12:01:46+02:00
modules: readme files regenerated - jsonrpcs ... [skip ci]
---
Modified: src/modules/jsonrpcs/README
---
Diff: https://github.com/kamailio/kamailio/commit/640456bb13cd9da3ff84ca3542f9f28…
Patch: https://github.com/kamailio/kamailio/commit/640456bb13cd9da3ff84ca3542f9f28…
---
diff --git a/src/modules/jsonrpcs/README b/src/modules/jsonrpcs/README
index a16d628fae..0b9465dfa1 100644
--- a/src/modules/jsonrpcs/README
+++ b/src/modules/jsonrpcs/README
@@ -71,7 +71,7 @@ Daniel-Constantin Mierla
1.15. jsonrpc_exec usage
1.16. JSONRPC Commands - Examples
1.17. JSONRPC Over Fifo Command
- 1.18. JSONRPC Over Fifo Command From Termina
+ 1.18. JSONRPC Over Fifo Command From Terminal
Chapter 1. Admin Guide
@@ -494,7 +494,7 @@ xlog("jsonrpc response code: $jsonrpl(code) - the body is: $jsonrpl(body)\n");
Next is an example of how to test it from a terminal, assuming that the
parameter 'fifo_name' is set to '/tmp/kamailio_jsonrpc_fifo'.
- Example 1.18. JSONRPC Over Fifo Command From Termina
+ Example 1.18. JSONRPC Over Fifo Command From Terminal
...
mkfifo /tmp/kamailio_jsonrpc_reply_fifo
cat /tmp/kamailio_jsonrpc_reply_fifo &
<!--
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
We have a cluster of two Kamailio nodes on Debian 10 + v5.5.2.
We have added a node and updated to v5.6.1. So now it's a cluster of:
2x debian10 + v5.6.1
1x debian11 + v5.6.1
### Troubleshooting
I'm not sure what is the issue but per `dmesg` logs it seems related to `dmq_usrloc` module. We have a lot of cores, so it's happening constantly since the upgrade and the extra node addition.
#### Debugging Data
[core.kamailio.53605.1663462643.txt](https://github.com/kamailio/kamailio/fi…
#### 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).
-->
```
[155017.987497] kamailio[53605]: segfault at f8 ip 00007fd49cf02f72 sp 00007ffea6e37e70 error 4 in dmq_usrloc.so[7fd49cef0000+17000]
[155017.987527] Code: 40 38 01 d0 89 05 12 95 00 00 48 8b 05 cf 8f 00 00 8b 00 83 f8 01 0f 85 80 00 00 00 48 8b 85 48 ff ff ff 48 8b 80 a0 00 00 00 <8b> 90 f8 00 00 00 48 8b 85 48 ff ff ff 48 8b 80 a0 00 00 00 48 8b
```
#### 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.1 (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`)
-->
```
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
Linux sip03.example.com 5.18.0-0.deb11.4-amd64 #1 SMP PREEMPT_DYNAMIC Debian 5.18.16-1~bpo11+1 (2022-08-12) x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3242
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3242(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 -->
This new feature provides a way to have multiple users sharing the same speed dial number, if they belong to the same group.
A new function is add: "sd_lookup_group". It finds the URI for a specific sd_username and group_id (and sd_domain if is_domain value is defined) in the database, returning its URI.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3255
-- Commit Summary --
* speeddial: allow search uri of speed dial by group
-- File Changes --
M src/modules/speeddial/doc/speeddial_admin.xml (35)
M src/modules/speeddial/sdlookup.h (2)
M src/modules/speeddial/speeddial.c (8)
M src/modules/speeddial/speeddial.h (15)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3255.patchhttps://github.com/kamailio/kamailio/pull/3255.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3255
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3255(a)github.com>
Module: kamailio
Branch: master
Commit: 6f400a8074fe60916867596431ca26dff00435d1
URL: https://github.com/kamailio/kamailio/commit/6f400a8074fe60916867596431ca26d…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-09-30T11:46:18+02:00
modules: readme files regenerated - carrierroute ... [skip ci]
---
Modified: src/modules/carrierroute/README
---
Diff: https://github.com/kamailio/kamailio/commit/6f400a8074fe60916867596431ca26d…
Patch: https://github.com/kamailio/kamailio/commit/6f400a8074fe60916867596431ca26d…
---
diff --git a/src/modules/carrierroute/README b/src/modules/carrierroute/README
index ad924c1ca2..ba1d19d230 100644
--- a/src/modules/carrierroute/README
+++ b/src/modules/carrierroute/README
@@ -41,7 +41,7 @@ Lucian Balaceanu
4. Functions
- 4.1. cr_user_carrier(user, domain, dstavp)
+ 4.1. cr_user_carrier(user, domain, dstvar)
4.2. cr_route(carrier, domain, prefix_matching,
rewrite_user, hash_source, descavp)
@@ -185,7 +185,7 @@ Chapter 1. Admin Guide
4. Functions
- 4.1. cr_user_carrier(user, domain, dstavp)
+ 4.1. cr_user_carrier(user, domain, dstvar)
4.2. cr_route(carrier, domain, prefix_matching, rewrite_user,
hash_source, descavp)
@@ -473,7 +473,7 @@ modparam("carrierroute", "avoid_failed_destinations", 0)
4. Functions
- 4.1. cr_user_carrier(user, domain, dstavp)
+ 4.1. cr_user_carrier(user, domain, dstvar)
4.2. cr_route(carrier, domain, prefix_matching, rewrite_user,
hash_source, descavp)
@@ -501,22 +501,23 @@ cr_user_rewrite_uri(uri, domain)
cr_tree_rewrite_uri(tree, domain)
-> cr_route(tree, domain, "$rU", "$rU", "call_id")
-4.1. cr_user_carrier(user, domain, dstavp)
+4.1. cr_user_carrier(user, domain, dstvar)
- This function loads the carrier and stores it in an AVP. It cannot be
- used in the config file mode, as it needs a mapping of the given user
- to a certain carrier. The is derived from a database entry belonging to
- the user parameter. This mapping must be available in the table that is
- specified in the “subscriber_table” variable. This data is not cached
- in memory, that means for every execution of this function a database
- query will be done.
+ This function loads the carrier and stores it in a config variable. It
+ cannot be used in the config file mode, as it needs a mapping of the
+ given user to a certain carrier. The is derived from a database entry
+ belonging to the user parameter. This mapping must be available in the
+ table that is specified in the “subscriber_table” variable. This data
+ is not cached in memory, that means for every execution of this
+ function a database query will be done.
Meaning of the parameters is as follows:
* user - Name of the user for the carrier tree lookup. Additional to
a string any pseudo-variable could be used as input.
* domain - Name of the routing domain to be used. Additional to a
string any pseudo-variable could be used as input.
- * dstavp - Name of the AVP where to store the carrier id.
+ * dstvar - Name of the writaable variable (e.g., an AVP) where to
+ store the carrier id.
4.2. cr_route(carrier, domain, prefix_matching, rewrite_user, hash_source,
descavp)
Module: kamailio
Branch: master
Commit: c32ce4d776d40fe2eccea9007fb842cd8c9c3af9
URL: https://github.com/kamailio/kamailio/commit/c32ce4d776d40fe2eccea9007fb842c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-30T11:21:29+02:00
carrierroute: docs updated for cr_user_carrier()
---
Modified: src/modules/carrierroute/doc/carrierroute_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/c32ce4d776d40fe2eccea9007fb842c…
Patch: https://github.com/kamailio/kamailio/commit/c32ce4d776d40fe2eccea9007fb842c…
---
diff --git a/src/modules/carrierroute/doc/carrierroute_admin.xml b/src/modules/carrierroute/doc/carrierroute_admin.xml
index 3b883d75155..341349495ec 100644
--- a/src/modules/carrierroute/doc/carrierroute_admin.xml
+++ b/src/modules/carrierroute/doc/carrierroute_admin.xml
@@ -412,10 +412,10 @@ cr_tree_rewrite_uri(tree, domain)
<section>
<title>
- <function moreinfo="none">cr_user_carrier(user, domain, dstavp)</function>
+ <function moreinfo="none">cr_user_carrier(user, domain, dstvar)</function>
</title>
<para>
- This function loads the carrier and stores it in an AVP.
+ This function loads the carrier and stores it in a config variable.
It cannot be used in the config file mode, as it needs a mapping of the
given user to a certain carrier. The is derived from a database entry
belonging to the user parameter. This mapping must be available in the
@@ -438,7 +438,8 @@ cr_tree_rewrite_uri(tree, domain)
</para>
</listitem>
<listitem>
- <para><emphasis>dstavp</emphasis> - Name of the AVP where to store the carrier id.
+ <para><emphasis>dstvar</emphasis> - Name of the writaable variable (e.g., an AVP)
+ where to store the carrier id.
</para>
</listitem>
</itemizedlist>
Hi!
A few years ago Daniel and I checked the possibility of supporting LibreSSL in addition to OpenSSL. I might not remember all the details, but I think it failed on LibreSSL not willing to support the memory allocation API we use in OpenSSL.
There has been a lot of discussion about the OpenSSL project lately, their focus and lack of communication skills. AlpineLinux has tried moving away from OpenSSL but failed in the first attempt and now discuss making another attempt. It they do and we want to run Kamailio in Alpine - which is used in many container environments - we need to pay attention.
https://gitlab.alpinelinux.org/alpine/tsc/-/issues/28
Some quotes:
"Meanwhile, there are more problems: it turns out that OpenSSL 3.x will not have LTS releases of the same length as past branches of OpenSSL. In addition, there are governance problems, as outlined by Rich Salz in his email to the openssl-project mailing list: the OpenSSL developers appear to want to focus on developing new features rather than cleaning up the mess of regressions they have created with OpenSSL 3.”
"However, it is the opinion of the Alpine license review community that the Apache 2.0 license is not compatible with GPLv2. It is also the opinion of the Alpine license review community that the OpenSSL 1.x license was alreadycompatible with both GPLv2 and GPLv3 due to the system library exception: it is generally not possible to install an Alpine system without having an OpenSSL implementation, so it clearly qualifies as a system library.”
Kamailio has GPLv2 - if we parse the license the same way, we can’t support OpenSSL 3.
We have many third-party libraries we use, like Curl, that also use OpenSSL. Curl may be a bad example, since the support of various TLS stacks is huge in Curl, but other libraries may have to make a decision here too.
Do you have any feeling if other Open Source projects discuss this?
Should we take another look at using LibreSSL?
Personally I’m rather worried about all the discussions around the OpenSSL project. There has been meetings at IETF with this as a topic. It is a very important building block for a lot of what we work with.
Cheers,
/O
Hello,
following the recent new feature of #!ifexp based on snexpr
(https://www.kamailio.org/w/2022/09/ifexp-conditional-preprocessor-blocks/),
another preprocessor directive was added which allows defining IDs with
a value computed from the evaluation of an expression, respectively:
#!defexp ID EXP
The EXP can be any expression supported by snexpr, including the
previously defined IDs. For example:
#!define IPADDR 1.2.3.4
#!define PORT 5060
#!defexp SIPURI "sip:" + IPADDR + ":" + PORT
The result is that SIPURI is defined to sip:1.2.3.4:5060.
Another variant is available as #!defexps, which encloses the result of
the expression in double quotes, making it suitable to be used further
as string value:
#!defexps SIPURI "sip:" + IPADDR + ":" + PORT
The result is that SIPURI is defined to “sip:1.2.3.4:5060”.
More details at:
- https://www.kamailio.org/wikidocs/cookbooks/devel/core/#defexp
- https://www.kamailio.org/wikidocs/cookbooks/devel/core/#defexps
Testing would be appreciated, feedback can be addressed to sr-users
mailing list!
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Online
Nov 7-10, 2022 (Europe Timezone)
* https://www.asipto.com/sw/kamailio-advanced-training-online/
### Description
After upgrading from the 5.6.1 release by applying 5.6 branch changes through ebda78c92c, the `acc_cdr` entries for `start_time` and `end_time` in my PostgreSQL database are incorrect; the syslog output is also incorrect. The entries in the `acc` table contain the correct timestamps.
In PostgreSQL, each of these timestamp columns are `timestamp without time zone`.
```
kamailio=# SELECT id, start_time, end_time, duration, callid FROM acc_cdrs ORDER BY id DESC LIMIT 1;
id | start_time | end_time | duration | callid
-------+---------------------+---------------------+----------+-----------------------------------------
24867 | 1969-12-31 18:00:25 | 1969-12-31 18:00:25 | 25.41 | 0_1083748456@fd00:a::215:65ff:fe9e:e168
(1 row)
kamailio=# SELECT id, method, time, callid FROM acc ORDER BY id DESC LIMIT 2;
id | method | time | callid
--------+--------+---------------------+-----------------------------------------
108653 | BYE | 2022-09-17 20:54:43 | 0_1083748456@fd00:a::215:65ff:fe9e:e168
108652 | INVITE | 2022-09-17 20:54:18 | 0_1083748456@fd00:a::215:65ff:fe9e:e168
```
#### Log Messages
It appears that `duration` is being copied into `start_time` and `end_time`.
```
INFO: acc [acc_cdr.c:367]: log_write_cdr(): start_time=25.410; end_time=25.410; duration=25.410; callid=0_1083748456@fd00:a::215:65ff:fe9e:e168; from_tag=1137456145; to_tag=645d9eee-9c3a-420a-ac37-8d3c741a5ce9;
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.6.1-2.20220917gitebda78c9.fc36 (x86_64/linux) b36a13
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: b36a13
compiled on 00:00:00 Sep 18 2022 with gcc 12.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`)
-->
```
Fedora 36
Linux 5.19.9-200.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 15 09:49:52 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3243
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3243(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
Right now the `presence_reginfo` module does not perform any aggregation on presentities from the same AoR. While this is generally ok for new notifies driven by new publishes, when a new subscription is received only the most recent presentity is notified. This PR adds a new parameter, disabled by default to preserve compatibility, which merges all presentities for the same AoR into a single document.
For example, two registrations from the same AoR will create the following document:
```<?xml version="1.0"?>
<reginfo xmlns="urn:ietf:params:xml:ns:reginfo" version="23" state="full">
<registration aor="sip:user2@example.com" id="0x7f9b6bbf9cf8" state="active">
<contact id="0x7f9b6bbf3ea8" state="active" event="created" expires="300" callid="23439394725296-103541137625012(a)192.168.10.130" cseq="38" received="" path="&lt;sip:172.23.42.1;lr;received=sip:uac.public.ip:60015;r2=on&gt;,&lt;sip:kamailio.public.ip;lr;received=sip:uac.public.ip:60015;r2=on&gt;" user_agent="MyUA 1.2.3.4">
<uri>sip:user2@192.168.10.130:5060</uri>
</contact>
</registration>
<registration aor="sip:user2@example.com" id="0x7f46836f63b8" state="active">
<contact id="0x7f46836f64e0" state="active" event="refreshed" expires="300" callid="15796302815379-26687127665413(a)192.168.10.130" cseq="38" received="" path="&lt;sip:172.23.42.1;lr;received=sip:uac.public.ip:5099;r2=on&gt;,&lt;sip:kamailio.public.ip;lr;received=sip:uac.public.ip:5099;r2=on&gt;" user_agent="MyUA 1.2.3.4">
<uri>sip:user2@192.168.10.130:5099</uri>
</contact>
</registration>
</reginfo>
```
Example of a body with two registrations with different bodies:
```
<?xml version="1.0"?>
<reginfo xmlns="urn:ietf:params:xml:ns:reginfo" version="21" state="full">
<registration aor="sip:user2@example.com" id="0x7f9b6bc55540" state="terminated"/>
<registration aor="sip:user2@example.com" id="0x7f46836f63b8" state="active">
<contact id="0x7f46836f64e0" state="active" event="refreshed" expires="300" callid="15796302815379-26687127665413(a)192.168.10.130" cseq="36" received="" path="&lt;sip:172.23.42.1;lr;received=sip:uac.public.ip:5099;r2=on&gt;,&lt;sip:kamailio.public.ip;lr;received=sip:uac.public.ip:5099;r2=on&gt;" user_agent="MyUA 1.2.3.4">
<uri>sip:user2@192.168.10.130:5099</uri>
</contact>
</registration>
</reginfo>
```
What is maybe missing: if the aor and id are the same on different presentities (is possible ?) we should not put it twice in the same body, because aor+id identify an unique registration.
Most of the code has been adapted from `presence_dialoginfo` so I have preserved the original authors, too.
Since is a bit complex PR (for me, at least) I'm begging for a in deep review ;)
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3240
-- Commit Summary --
* [presence_reginfo] Add option for aggregating presentities
-- File Changes --
M src/modules/presence_reginfo/Makefile (19)
M src/modules/presence_reginfo/add_events.c (17)
M src/modules/presence_reginfo/doc/presence_reginfo_admin.xml (21)
A src/modules/presence_reginfo/notify_body.c (322)
A src/modules/presence_reginfo/notify_body.h (43)
M src/modules/presence_reginfo/presence_reginfo.c (8)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3240.patchhttps://github.com/kamailio/kamailio/pull/3240.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3240
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3240(a)github.com>
Module: kamailio
Branch: master
Commit: c2c3211cd31405188891abd16ef770c26a8ddd44
URL: https://github.com/kamailio/kamailio/commit/c2c3211cd31405188891abd16ef770c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-26T12:30:06+02:00
dialog: api function to get the status if dlg var is set or not
---
Modified: src/modules/dialog/dlg_cb.h
Modified: src/modules/dialog/dlg_var.c
Modified: src/modules/dialog/dlg_var.h
---
Diff: https://github.com/kamailio/kamailio/commit/c2c3211cd31405188891abd16ef770c…
Patch: https://github.com/kamailio/kamailio/commit/c2c3211cd31405188891abd16ef770c…
---
diff --git a/src/modules/dialog/dlg_cb.h b/src/modules/dialog/dlg_cb.h
index 86a85bb2e1..a685816306 100644
--- a/src/modules/dialog/dlg_cb.h
+++ b/src/modules/dialog/dlg_cb.h
@@ -63,6 +63,9 @@ typedef int (*get_dlg_varval_f)( struct dlg_cell* dlg,
/* method to get a variable value pkg-allocated duplicate from a dialog */
typedef int (*get_dlg_vardup_f)( struct dlg_cell* dlg,
str* key, str* val);
+/* method to get if a variable value is set or not from a dialog */
+typedef int (*get_dlg_varstatus_f)( struct dlg_cell* dlg,
+ str* key);
#define CONFIRMED_DIALOG_STATE 1
diff --git a/src/modules/dialog/dlg_var.c b/src/modules/dialog/dlg_var.c
index 8edde80f1b..473736b437 100644
--- a/src/modules/dialog/dlg_var.c
+++ b/src/modules/dialog/dlg_var.c
@@ -376,6 +376,31 @@ int get_dlg_vardup(struct dlg_cell *dlg, str *key, str *val)
return -2;
}
+/**
+ * return the status if the dlg variable value is set or not
+ * - 1 - variable is set
+ * - 0 - variable is not set
+ */
+int get_dlg_varstatus(struct dlg_cell *dlg, str *key)
+{
+ str* var = NULL;
+ int ret = 0;
+
+ if( !dlg || !key || key->len<=0) {
+ LM_ERR("BUG - bad parameters\n");
+ return 0;
+ }
+
+ dlg_lock(d_table, &(d_table->entries[dlg->h_entry]));
+ var = get_dlg_variable_unsafe(dlg, key);
+ if(var && var->s) {
+ ret = 1;
+ }
+ dlg_unlock(d_table, &(d_table->entries[dlg->h_entry]));
+
+ return ret;
+}
+
int get_dlg_variable_uintval(struct dlg_cell *dlg, str *key, unsigned int *uval)
{
str* var = NULL;
diff --git a/src/modules/dialog/dlg_var.h b/src/modules/dialog/dlg_var.h
index 52f2a01a60..292e9f701b 100644
--- a/src/modules/dialog/dlg_var.h
+++ b/src/modules/dialog/dlg_var.h
@@ -62,6 +62,7 @@ typedef struct dlg_var {
str* get_dlg_varref(dlg_cell_t *dlg, str *key);
int get_dlg_varval(dlg_cell_t *dlg, str *key, str *val);
int get_dlg_vardup(dlg_cell_t *dlg, str *key, str *val);
+int get_dlg_varstatus(dlg_cell_t *dlg, str *key);
int set_dlg_variable(dlg_cell_t *dlg, str *key, str *val);
int get_dlg_variable_uintval(struct dlg_cell *dlg, str *key, unsigned int *uval);
Module: kamailio
Branch: master
Commit: 8548aaa8a798b939e041821848b2f05b963451d8
URL: https://github.com/kamailio/kamailio/commit/8548aaa8a798b939e041821848b2f05…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-26T12:04:29+02:00
dialog: updated comments for api functions to get dlg var value
---
Modified: src/modules/dialog/dlg_cb.h
---
Diff: https://github.com/kamailio/kamailio/commit/8548aaa8a798b939e041821848b2f05…
Patch: https://github.com/kamailio/kamailio/commit/8548aaa8a798b939e041821848b2f05…
---
diff --git a/src/modules/dialog/dlg_cb.h b/src/modules/dialog/dlg_cb.h
index 91064ee9e0..86a85bb2e1 100644
--- a/src/modules/dialog/dlg_cb.h
+++ b/src/modules/dialog/dlg_cb.h
@@ -54,13 +54,13 @@ typedef int (*register_dlgcb_f)(struct dlg_cell* dlg, int cb_types,
typedef int (*set_dlg_variable_f)( struct dlg_cell* dlg,
str* key,
str* val);
-/* method to get a variable from a dialog */
+/* method to get a variable value reference from a dialog */
typedef str* (*get_dlg_varref_f)( struct dlg_cell* dlg,
str* key);
-/* method to get a variable from a dialog */
+/* method to get a variable value static-buffer duplicate from a dialog */
typedef int (*get_dlg_varval_f)( struct dlg_cell* dlg,
str* key, str* val);
-/* method to get a variable value duplicate from a dialog */
+/* method to get a variable value pkg-allocated duplicate from a dialog */
typedef int (*get_dlg_vardup_f)( struct dlg_cell* dlg,
str* key, str* val);
Hi Mojtaba,
no worries, you can just revert it with “git revert $commit-ID” for the specific commit.
I can also do it later today, no problem.
Cheers,
Henning
--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com<https://gilawa.com/>
From: Mojtaba <mespio(a)gmail.com>
Sent: Saturday, September 24, 2022 1:35 PM
To: Henning Westerholt <hw(a)gilawa.com>
Subject: Re: [sr-dev] git:master:f2b07f23: lrkproxy: Add new features : TURN support, behind_nat support, subset of range ports
Hello Henning,
After I pushed it, I got this issue.
Please rollback this commit, then I will push the changes related to LRKProxy again.
Thanks
On Sat, Sep 24, 2022 at 2:58 PM Henning Westerholt <hw(a)gilawa.com<mailto:hw@gilawa.com>> wrote:
Hello Mojtaba,
There seems to be an issue with this commit, you've removed something related to the tls_wolfssl module.
Cheers,
Henning
-----Original Message-----
From: sr-dev <sr-dev-bounces(a)lists.kamailio.org<mailto:sr-dev-bounces@lists.kamailio.org>> On Behalf Of Mojtaba Esfandiari.S
Sent: Saturday, September 24, 2022 12:56 PM
To: sr-dev(a)lists.kamailio.org<mailto:sr-dev@lists.kamailio.org>
Subject: [sr-dev] git:master:f2b07f23: lrkproxy: Add new features : TURN support, behind_nat support, subset of range ports
Module: kamailio
Branch: master
Commit: f2b07f2321980e74247cb0c968b98925172f6874
URL: https://github.com/kamailio/kamailio/commit/f2b07f2321980e74247cb0c968b9892…
Author: Mojtaba Esfandiari.S <mespio(a)gmail.com<mailto:mespio@gmail.com>>
Committer: Mojtaba Esfandiari.S <mespio(a)gmail.com<mailto:mespio@gmail.com>>
Date: 2022-09-24T14:25:24+03:30
lrkproxy: Add new features : TURN support, behind_nat support, subset of range ports
---
Removed: misc/external/wolfssl/wolfssl
---
Diff: https://github.com/kamailio/kamailio/commit/f2b07f2321980e74247cb0c968b9892…
Patch: https://github.com/kamailio/kamailio/commit/f2b07f2321980e74247cb0c968b9892…
---
diff --git a/misc/external/wolfssl/wolfssl b/misc/external/wolfssl/wolfssl deleted file mode 160000 index 57aac1c50b4..00000000000
--- a/misc/external/wolfssl/wolfssl
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 57aac1c50b45275c7a99eca32ad985998b292dc8
_______________________________________________
Kamailio (SER) - Development Mailing List sr-dev(a)lists.kamailio.org<mailto:sr-dev@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
--
--Mojtaba Esfandiari.S
After I pushed it, I got a issue.
Please roll back this commit, then I will push the changes related to LRKProxy again.
Thanks
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/commit/f2b07f2321980e74247cb0c968b9892…
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/commit/f2b07f2321980e74247cb0c968b98925172f6874/84890546(a)github.com>
Hello,
a new feature has landed to Kamailio devel version, bringing in more
flexibility for preprocessing of the kamailio.cfg file.
It is about #!ifexp, which allows to evaluate an expression created with
defined IDs, string and number values. Based on evaluation result, being
true or false, parts of the config file can be enabled or disabled.
An extensive number of operators can be used in expressions, such as: +,
-, *, /, ==, !=, <, >, <=, >=, ||, &&, etc. The evaluation is done using
snexpr (https://github.com/miconda/snexpr), which was embedded inside
Kamailio code.
Here are some simple kamailio.cfg examples:
#!ifexp KAMAILIO_VERSION >= 5006000
loadmodule "tlsa.so"
#!else
loadmodule "tls.so"
#!endif
#!ifexp MOD_xlog && (OS_NAME == "darwin")
xlog("running on MacOS\n");
#!endif
Documentation and more examples can be found on the wiki portal at:
- https://www.kamailio.org/wikidocs/cookbooks/devel/core/#ifexp
Testing would be appreciated, feedback can be addressed to sr-users
mailing list!
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda