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>