From f3fa76d96bb48b099253cf27ab3aca14a6dd068c Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Mon, 2 Oct 2023 13:07:26 +0200 Subject: [PATCH] New upstream version 5.7.2 --- ChangeLog | 275 ++++++++++++++++++ etc/kamailio.cfg | 6 +- etc/sip-router.cfg | 16 +- pkg/kamailio/alpine/APKBUILD | 2 +- pkg/kamailio/deb/bionic/changelog | 6 + pkg/kamailio/deb/bookworm/changelog | 6 + pkg/kamailio/deb/bullseye/changelog | 6 + pkg/kamailio/deb/buster/changelog | 6 + pkg/kamailio/deb/debian/changelog | 6 + pkg/kamailio/deb/focal/changelog | 6 + pkg/kamailio/deb/jammy/changelog | 6 + pkg/kamailio/deb/jessie/changelog | 6 + pkg/kamailio/deb/precise/changelog | 6 + pkg/kamailio/deb/sid/changelog | 6 + pkg/kamailio/deb/stretch/changelog | 6 + pkg/kamailio/deb/trusty/changelog | 6 + pkg/kamailio/deb/wheezy/changelog | 6 + pkg/kamailio/deb/xenial/changelog | 6 + pkg/kamailio/obs/kamailio.spec | 2 +- src/Makefile.defs | 2 +- src/core/autover.h | 4 +- src/core/cfg.y | 2 +- src/core/parser/parse_via.c | 23 ++ src/modules/app_lua/README | 2 +- src/modules/app_lua/doc/app_lua_admin.xml | 2 +- src/modules/crypto/crypto_uuid.c | 19 ++ src/modules/db_redis/redis_dbase.c | 2 + src/modules/dialog/dlg_hash.c | 5 +- src/modules/http_async_client/README | 3 +- .../doc/http_async_client_admin.xml | 8 +- src/modules/http_client/functions.c | 10 +- src/modules/ims_dialog/ims_dialog.c | 107 ++++++- src/modules/ims_ipsec_pcscf/spi_list.c | 2 +- src/modules/ims_qos/ims_qos_mod.c | 164 +++++++++-- src/modules/ims_qos/rx_aar.c | 11 + src/modules/jansson/jansson_funcs.c | 2 +- src/modules/kex/mod_stats.c | 7 +- src/modules/mohqueue/README | 2 +- src/modules/mohqueue/doc/mohqueue_admin.xml | 2 +- src/modules/msilo/msilo.c | 2 +- src/modules/rabbitmq/rabbitmq.c | 4 + src/modules/rabbitmq/rabbitmq.h | 1 + src/modules/registrar/common.c | 14 +- src/modules/registrar/registrar.h | 8 +- src/modules/siptrace/siptrace.c | 4 +- src/modules/tm/rpc_uac.c | 4 +- src/modules/xhttp/README | 9 +- src/modules/xhttp/doc/xhttp_admin.xml | 7 +- src/modules/xlog/README | 2 +- src/modules/xlog/doc/xlog_admin.xml | 2 +- utils/kamctl/kamctl | 2 +- 51 files changed, 738 insertions(+), 85 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1d61b2120..19d863be0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,278 @@ +===================== 2023-09-27 Version 5.7.2 Released ===================== + +===================== Changes Since Version 5.7.1 =========================== + + +commit 0a91d8a6f25c83094e0ff7cc0f16ecfe3488b378 +Author: Daniel-Constantin Mierla +Date: Wed Sep 27 09:00:32 2023 +0200 + + Makefile.defs: version set to 5.7.2 + +commit 5b31a87cb90c4f81bc48b4f0f1fbd52825967de3 +Author: Daniel-Constantin Mierla +Date: Wed Sep 27 08:45:03 2023 +0200 + + pkg: deb specs updated for v5.7.2 + +commit 549e7903ef40086d933c756b43e35a1d22a38401 +Author: Daniel-Constantin Mierla +Date: Wed Sep 27 08:43:49 2023 +0200 + + pkg: version set to 5.7.2 for rpms and alpine specs + +commit 5d07b647680543752512ae89b8ec23fa9a2cbd8a +Author: Daniel-Constantin Mierla +Date: Wed Sep 27 08:01:48 2023 +0200 + + kamctl: updated the version to reflect kamailio series + +commit 2f0b2189f52927cdcb17c63087d31e637c4b716f +Author: Daniel-Constantin Mierla +Date: Wed Sep 27 08:01:04 2023 +0200 + + etc/kamailio.cfg: updated the version in comments + +commit f764cef139d55adb5d38ffc6a1a65fd14bda5f4c +Author: Daniel-Constantin Mierla +Date: Tue Sep 26 08:06:42 2023 +0200 + + rabbitmq: backport of RABBITMQ_ERR_CREATE needed for handling allocation error + +commit e202f597e1725c204eb33fa7b6266d9ce934be09 +Author: Kamailio Dev +Date: Mon Sep 25 20:02:22 2023 +0200 + + modules: readme files regenerated - modules ... [skip ci] + +commit 1f27bdfc5cc25b9d2f06204169131d9843cc252a +Author: Daniel-Constantin Mierla +Date: Mon Sep 25 19:51:26 2023 +0200 + + Revert "pv_headers: compare result of pvh_set_xavi() with NULL for error cases" + + This reverts commit 3bb59945d59ae438897a8f797dc2f06489728459. + +commit 9be895a16c91bcf4eb299ce0ffb14624755baa48 +Author: Дилян Палаузов +Date: Fri Aug 25 20:54:52 2023 +0200 + + [app_lua] clarify the file scripts can be in source or bytecode + + (cherry picked from commit a8747aa02ff3fbffd7a63bdc1e5c06188472edfa) + +commit 59d0ebe41017c2270b62f6171285bae02673da3a +Author: Daniel-Constantin Mierla +Date: Thu Sep 7 14:16:49 2023 +0200 + + core: parser - set via->params.len when body is finished + + (cherry picked from commit 82b0f273e1cf65051b6c50301c5073dce56c1149) + +commit 35f0efadeceaecc8e3315f4682d9ac4eba36e363 +Author: Daniel-Constantin Mierla +Date: Wed Aug 23 13:03:02 2023 +0200 + + msilo: cast to fix storage size warning + + (cherry picked from commit c11fcbbe9ed19bc54b800100d15d9ae269735f0c) + +commit 34885ab83c0c259376ffda04b41253eb9271780f +Author: Daniel-Constantin Mierla +Date: Wed Aug 23 10:55:35 2023 +0200 + + pv_headers: compare result of pvh_set_xavi() with NULL for error cases + + - the function returns a pointer + + (cherry picked from commit 5633026f90e46f7d6da8c1a658d425e8926f6949) + +commit fac1995c8730a83c24036c9d01d52b674291860b +Author: Daniel-Constantin Mierla +Date: Mon Sep 25 19:30:25 2023 +0200 + + db_redis: free db_keys in case of failure + + - backport of 027c2b30b39a7596c8630c06995ddc49bb42d789 + +commit 3a217af6b9229989b3c7a788a01609e9513024c4 +Author: Daniel-Constantin Mierla +Date: Tue Aug 22 17:09:37 2023 +0200 + + rabbitmq: proper check for allocated pointer + + (cherry picked from commit 4d58141ab84cf248e8c44a96181642ad0f187e80) + +commit 34a2d87479d1bcc37d74f3d8fcb4186aea90fc84 +Author: Rick Barenthin +Date: Tue Aug 15 22:30:58 2023 +0200 + + core: cfg.y typo in parsing XAVPVIAFIELDS + + In the XAVPVIAFIELDS block there is the string written to the wrong variable. + + The string is stored in _ksr_xavp_via_params.s but the lenght is stored in _ksr_xavp_via_fields.len. This breaks XAVPVIAPARAMS and XAVPVIAFIELDS. + + (cherry picked from commit 722a79a9ba8ca2608e699ec14684ce004ae10d60) + +commit 516894e37e53bf17d29a4c95add29df7f70bcb8f +Author: Henning Westerholt +Date: Tue Aug 15 14:16:07 2023 +0000 + + ims_ipsec_pcscf: typo in spi_add function definition, GH #3513 + + - fix typo in spi_add function definition + - patch from jbipre2, GH #3513 + + (cherry picked from commit a053bcc391f0680ecd5f458d2512e57f69499d39) + +commit 774b464af7c561e49253066e8ce3b4ee55463d9a +Author: Daniel-Constantin Mierla +Date: Sat Aug 12 13:30:39 2023 +0200 + + xhttp: note about available variables during http request processing + + (cherry picked from commit 170067e633ef32ea7b17adad46fdfe2c85fadda0) + +commit 5b1592900920143c9ce5c188e2835c1afd27d489 +Author: Daniel-Constantin Mierla +Date: Fri Aug 11 20:16:37 2023 +0200 + + http_async_client: docs - dependency on libevent + + - list style for dependencies and links to projects + + (cherry picked from commit f16d2658bbefb7a9f43076cbaa958fb3a27f6a0c) + +commit 90bd4424e17bc07a9073fd50bbd6d8b608ad4da9 +Author: Дилян Палаузов +Date: Sat Jul 22 14:15:09 2023 +0200 + + etc/ typos + + (cherry picked from commit 6e9335ff2245596b74bc1c749d1e7805bf186f02) + +commit 9276342ea90acffc3d631c6175c1f70c5c4fbacc +Author: Дилян Палаузов +Date: Wed Jun 21 21:29:41 2023 +0200 + + mohqueue: typo + + (cherry picked from commit 0dcaaed5148cba775cebfd88d8e4a593f8c4297d) + +commit 3e197c7c41c97badece29cbc6477119180b8dcad +Author: MVONDO Eric OBS/OINIS +Date: Tue Jun 20 10:22:48 2023 +0100 + + siptrace: fix pseudo var direction attribute length + + (cherry picked from commit 508886c3054a8470fe4469e78e63aa37ae93922d) + +commit 1b42a7036714a0e50bc61bd9e0619f9a2d36bcf8 +Author: Daniel-Constantin Mierla +Date: Fri Jul 7 17:41:15 2023 +0200 + + registrar: increase max size for user and domain building aor + + - renamed max aor lenght define to match the user and domain style + + (cherry picked from commit b1356efd61e56eaa3426d8e2e813ea6730b4f2c9) + +commit ba7b3155611fd983f7d3d244e7b525a483998d3f +Author: Daniel-Constantin Mierla +Date: Thu Jul 6 21:26:28 2023 +0200 + + kex: safety checks when iterating stats list + + - GH #3186 + + (cherry picked from commit 883f6b77211a76b35a9df570a8ddbbc344b05472) + +commit b59009089ad2b7cc33af27b637a81396b240660d +Author: Henning Westerholt +Date: Wed Jul 5 07:04:46 2023 +0000 + + tm: remove obselete comment, add clarification for reply_wait mode 2 + + (cherry picked from commit 2dbaa727a38e29da0f887fa5d0d8d20392839f9b) + +commit 80b26beb7d4f9cd4b3858e9e2dae4588feec8e28 +Author: Norbert Koppány Legyes +Date: Tue Jul 4 17:27:17 2023 +0200 + + xlog: fix docs example for modparam methods_filter + + (cherry picked from commit b5a37683e364f596b6c5b4ebbba1fff951d7be84) + +commit e681aa8236b502de31ad6600932517a259b6b62e +Author: Daniel-Constantin Mierla +Date: Fri Jun 30 08:49:19 2023 +0200 + + jansson: print unknown type in log message + + (cherry picked from commit b8cae4fbcd026ffb81e8242500212582d9672ad5) + +commit 704cc393dd310c9db6db34214597e3134b40367f +Author: Stefan-Cristian Mititelu +Date: Fri Aug 18 10:59:57 2023 +0300 + + ims_dialog: kemi export some functions + + (cherry-picked from commit 3994410) + +commit c51bc6c05428e8d66ddd6addcc1c0b4bbf4705f1 +Author: Stefan-Cristian Mititelu +Date: Wed Aug 16 11:01:08 2023 +0300 + + ims_qos: kemi export + + (cherry picked from commit eb23e6b) + +commit 1cf389829bebad2013a6cf3b4ab919fa6b78a7c2 +Author: Victor Seva +Date: Thu Jul 20 14:04:30 2023 +0200 + + crypto: SHA1_Init deprecated at openssl 3.0 + + From https://www.openssl.org/docs/man3.0/man7/migration_guide.html + + > Use of low-level digest functions such as SHA1_Init(3) have been informally + > discouraged from use for a long time. Applications should instead use the + > high level EVP APIs EVP_DigestInit_ex(3), EVP_DigestUpdate(3) and + > EVP_DigestFinal_ex(3), or the quick one-shot EVP_Q_digest(3). + + related to #3502 + + (cherry picked from commit e55a6ed0f24c9b81d8d3ad27ba25d4d88c474483) + +commit 20be29ab3638d803341ec376b02edd7c14a9174a +Author: Stefan Mititelu +Date: Wed Jul 19 13:48:09 2023 +0300 + + dialog: set cbs list to NULL after destroying + + (cherry picked from commit 6881faadec45dd16dd896b13db44862e7df70422) + +commit 44130062640ccbbc7e796cc748d432fe3382c328 +Author: Stefan Mititelu +Date: Wed Jul 5 13:56:21 2023 +0300 + + ims_qos: check and log for NULL sessionId + + (cherry picked from commit 1b291315b43da1148cee5f3821ddbe49b0c86b7f) + +commit 7630473f57c7c0ad600067cea7a89693d9926a81 +Author: Daniel-Constantin Mierla +Date: Mon Jul 3 08:26:07 2023 +0200 + + http_client: use LIBCURL_VERSION_NUM instead of CURL_AT_LEAST_VERSION + + - older distros have compilers that don't cope with the later + + (cherry picked from commit 7cd32bf9631a81c7c4382d45f498bdc9c7f9b34c) + + + ===================== 2023-06-28 Version 5.7.1 Released ===================== ===================== Changes Since Version 5.7.0 =========================== diff --git a/etc/kamailio.cfg b/etc/kamailio.cfg index 68493736d..d91f5185b 100644 --- a/etc/kamailio.cfg +++ b/etc/kamailio.cfg @@ -1,6 +1,6 @@ #!KAMAILIO # -# Kamailio SIP Server v5.6 - default configuration script +# Kamailio SIP Server v5.7 - default configuration script # - web: https://www.kamailio.org # - git: https://github.com/kamailio/kamailio # @@ -227,7 +227,7 @@ enable_sctp=no ####### Custom Parameters ######### -/* These parameters can be modified runtime via RPC interface +/* These parameters can be modified at runtime via RPC interface * - see the documentation of 'cfg_rpc' module. * * Format: group.id = value 'desc' description @@ -389,7 +389,7 @@ modparam("registrar", "path_mode", 0) modparam("acc", "early_media", 0) modparam("acc", "report_ack", 0) modparam("acc", "report_cancels", 0) -/* by default ww do not adjust the direct of the sequential requests. +/* by default we do not adjust the direct of the sequential requests. * if you enable this parameter, be sure the enable "append_fromtag" * in "rr" module */ modparam("acc", "detect_direction", 0) diff --git a/etc/sip-router.cfg b/etc/sip-router.cfg index 0390ef7ec..8669ea63d 100644 --- a/etc/sip-router.cfg +++ b/etc/sip-router.cfg @@ -1,7 +1,7 @@ # # $Id$ # -# Example configuration file (simpler then ser-oob.cfg, but more +# Example configuration file (simpler than ser-oob.cfg, but more # complex then ser-basic.cfg). # # First start SER sample config script with: @@ -73,7 +73,7 @@ rev_dns=no # (cmd. line: -R) #group=ser #disable_core=yes #disables core dumping #open_fd_limit=1024 # sets the open file descriptors limit -#mhomed=yes # usefull for multihomed hosts, small performance penalty +#mhomed=yes # useful for multihomed hosts, small performance penalty #disable_tcp=yes #tcp_accept_aliases=yes # accepts the tcp alias via option (see NEWS) sip_warning=yes @@ -172,7 +172,7 @@ modparam("ctl", "binrpc", "tcp:127.0.0.1:2046") # failed transactions (=negative responses) should be logged to modparam("acc_db", "failed_transactions", 1) -# comment the next line if you dont want to have accounting to DB +# comment the next line if you don't want to have accounting to DB modparam("acc_db", "log_flag", "FLAG_ACC") # -- tm params -- @@ -197,7 +197,7 @@ modparam("tls", "private_key", "ser-selfsigned.key") # -- xmlrpc params -- -# using a sub-route from the module is a lot safer then relying on the +# using a sub-route from the module is a lot safer than relying on the # request method to distinguish HTTP from SIP modparam("xmlrpc", "route", "RPC"); @@ -358,8 +358,8 @@ route[RR] # particularly good if upstream and downstream entities # use different transport protocol - # if the inital INVITE got the ACC flag store this in - # an RR AVP cookie. this is more for demonstration purpose + # if the initial INVITE got the ACC flag store this in + # an RR AVP cookie. This is more for demonstration purpose if (isflagset(FLAG_ACC)) { $account = "yes"; setavpflag($account, "dialog_cookie"); @@ -377,7 +377,7 @@ route[DOMAIN] # check if the callee is at a local domain lookup_domain("$td", "@ruri.host"); - # we dont know the domain of the caller and also not + # we don't know the domain of the caller and also not # the domain of the callee -> somone uses our proxy as # a relay if (strempty($t.did) && strempty($f.did)) { @@ -528,7 +528,7 @@ route[INBOUND] if (lookup_contacts("location")) { append_hf("P-hint: usrloc applied\r\n"); - # we set the TM module timers according to the prefences + # we set the TM module timers according to the preferences # of the callee (avoid too long ringing of his phones) # Note1: timer values have to be in ms now! # Note2: this makes even more sense if you switch to a voicemail diff --git a/pkg/kamailio/alpine/APKBUILD b/pkg/kamailio/alpine/APKBUILD index c07d5ace4..45ae00469 100644 --- a/pkg/kamailio/alpine/APKBUILD +++ b/pkg/kamailio/alpine/APKBUILD @@ -4,7 +4,7 @@ # Maintainer: Nathan Angelacos pkgname=kamailio -pkgver=5.7.1 +pkgver=5.7.2 pkgrel=0 # If building from a git snapshot, specify the gitcommit diff --git a/pkg/kamailio/deb/bionic/changelog b/pkg/kamailio/deb/bionic/changelog index 618fc7779..9595fadf2 100644 --- a/pkg/kamailio/deb/bionic/changelog +++ b/pkg/kamailio/deb/bionic/changelog @@ -1,3 +1,9 @@ +kamailio (5.7.2) unstable; urgency=medium + + * version set 5.7.2 + + -- Victor Seva Wed, 27 Sep 2023 08:44:32 +0200 + kamailio (5.7.1) unstable; urgency=medium * version set 5.7.1 diff --git a/pkg/kamailio/deb/bookworm/changelog b/pkg/kamailio/deb/bookworm/changelog index 618fc7779..9595fadf2 100644 --- a/pkg/kamailio/deb/bookworm/changelog +++ b/pkg/kamailio/deb/bookworm/changelog @@ -1,3 +1,9 @@ +kamailio (5.7.2) unstable; urgency=medium + + * version set 5.7.2 + + -- Victor Seva Wed, 27 Sep 2023 08:44:32 +0200 + kamailio (5.7.1) unstable; urgency=medium * version set 5.7.1 diff --git a/pkg/kamailio/deb/bullseye/changelog b/pkg/kamailio/deb/bullseye/changelog index 618fc7779..9595fadf2 100644 --- a/pkg/kamailio/deb/bullseye/changelog +++ b/pkg/kamailio/deb/bullseye/changelog @@ -1,3 +1,9 @@ +kamailio (5.7.2) unstable; urgency=medium + + * version set 5.7.2 + + -- Victor Seva Wed, 27 Sep 2023 08:44:32 +0200 + kamailio (5.7.1) unstable; urgency=medium * version set 5.7.1 diff --git a/pkg/kamailio/deb/buster/changelog b/pkg/kamailio/deb/buster/changelog index 618fc7779..9595fadf2 100644 --- a/pkg/kamailio/deb/buster/changelog +++ b/pkg/kamailio/deb/buster/changelog @@ -1,3 +1,9 @@ +kamailio (5.7.2) unstable; urgency=medium + + * version set 5.7.2 + + -- Victor Seva Wed, 27 Sep 2023 08:44:32 +0200 + kamailio (5.7.1) unstable; urgency=medium * version set 5.7.1 diff --git a/pkg/kamailio/deb/debian/changelog b/pkg/kamailio/deb/debian/changelog index 618fc7779..9595fadf2 100644 --- a/pkg/kamailio/deb/debian/changelog +++ b/pkg/kamailio/deb/debian/changelog @@ -1,3 +1,9 @@ +kamailio (5.7.2) unstable; urgency=medium + + * version set 5.7.2 + + -- Victor Seva Wed, 27 Sep 2023 08:44:32 +0200 + kamailio (5.7.1) unstable; urgency=medium * version set 5.7.1 diff --git a/pkg/kamailio/deb/focal/changelog b/pkg/kamailio/deb/focal/changelog index 618fc7779..9595fadf2 100644 --- a/pkg/kamailio/deb/focal/changelog +++ b/pkg/kamailio/deb/focal/changelog @@ -1,3 +1,9 @@ +kamailio (5.7.2) unstable; urgency=medium + + * version set 5.7.2 + + -- Victor Seva Wed, 27 Sep 2023 08:44:32 +0200 + kamailio (5.7.1) unstable; urgency=medium * version set 5.7.1 diff --git a/pkg/kamailio/deb/jammy/changelog b/pkg/kamailio/deb/jammy/changelog index 618fc7779..9595fadf2 100644 --- a/pkg/kamailio/deb/jammy/changelog +++ b/pkg/kamailio/deb/jammy/changelog @@ -1,3 +1,9 @@ +kamailio (5.7.2) unstable; urgency=medium + + * version set 5.7.2 + + -- Victor Seva Wed, 27 Sep 2023 08:44:32 +0200 + kamailio (5.7.1) unstable; urgency=medium * version set 5.7.1 diff --git a/pkg/kamailio/deb/jessie/changelog b/pkg/kamailio/deb/jessie/changelog index 618fc7779..9595fadf2 100644 --- a/pkg/kamailio/deb/jessie/changelog +++ b/pkg/kamailio/deb/jessie/changelog @@ -1,3 +1,9 @@ +kamailio (5.7.2) unstable; urgency=medium + + * version set 5.7.2 + + -- Victor Seva Wed, 27 Sep 2023 08:44:32 +0200 + kamailio (5.7.1) unstable; urgency=medium * version set 5.7.1 diff --git a/pkg/kamailio/deb/precise/changelog b/pkg/kamailio/deb/precise/changelog index 618fc7779..9595fadf2 100644 --- a/pkg/kamailio/deb/precise/changelog +++ b/pkg/kamailio/deb/precise/changelog @@ -1,3 +1,9 @@ +kamailio (5.7.2) unstable; urgency=medium + + * version set 5.7.2 + + -- Victor Seva Wed, 27 Sep 2023 08:44:32 +0200 + kamailio (5.7.1) unstable; urgency=medium * version set 5.7.1 diff --git a/pkg/kamailio/deb/sid/changelog b/pkg/kamailio/deb/sid/changelog index 618fc7779..9595fadf2 100644 --- a/pkg/kamailio/deb/sid/changelog +++ b/pkg/kamailio/deb/sid/changelog @@ -1,3 +1,9 @@ +kamailio (5.7.2) unstable; urgency=medium + + * version set 5.7.2 + + -- Victor Seva Wed, 27 Sep 2023 08:44:32 +0200 + kamailio (5.7.1) unstable; urgency=medium * version set 5.7.1 diff --git a/pkg/kamailio/deb/stretch/changelog b/pkg/kamailio/deb/stretch/changelog index 618fc7779..9595fadf2 100644 --- a/pkg/kamailio/deb/stretch/changelog +++ b/pkg/kamailio/deb/stretch/changelog @@ -1,3 +1,9 @@ +kamailio (5.7.2) unstable; urgency=medium + + * version set 5.7.2 + + -- Victor Seva Wed, 27 Sep 2023 08:44:32 +0200 + kamailio (5.7.1) unstable; urgency=medium * version set 5.7.1 diff --git a/pkg/kamailio/deb/trusty/changelog b/pkg/kamailio/deb/trusty/changelog index 618fc7779..9595fadf2 100644 --- a/pkg/kamailio/deb/trusty/changelog +++ b/pkg/kamailio/deb/trusty/changelog @@ -1,3 +1,9 @@ +kamailio (5.7.2) unstable; urgency=medium + + * version set 5.7.2 + + -- Victor Seva Wed, 27 Sep 2023 08:44:32 +0200 + kamailio (5.7.1) unstable; urgency=medium * version set 5.7.1 diff --git a/pkg/kamailio/deb/wheezy/changelog b/pkg/kamailio/deb/wheezy/changelog index 618fc7779..9595fadf2 100644 --- a/pkg/kamailio/deb/wheezy/changelog +++ b/pkg/kamailio/deb/wheezy/changelog @@ -1,3 +1,9 @@ +kamailio (5.7.2) unstable; urgency=medium + + * version set 5.7.2 + + -- Victor Seva Wed, 27 Sep 2023 08:44:32 +0200 + kamailio (5.7.1) unstable; urgency=medium * version set 5.7.1 diff --git a/pkg/kamailio/deb/xenial/changelog b/pkg/kamailio/deb/xenial/changelog index 618fc7779..9595fadf2 100644 --- a/pkg/kamailio/deb/xenial/changelog +++ b/pkg/kamailio/deb/xenial/changelog @@ -1,3 +1,9 @@ +kamailio (5.7.2) unstable; urgency=medium + + * version set 5.7.2 + + -- Victor Seva Wed, 27 Sep 2023 08:44:32 +0200 + kamailio (5.7.1) unstable; urgency=medium * version set 5.7.1 diff --git a/pkg/kamailio/obs/kamailio.spec b/pkg/kamailio/obs/kamailio.spec index 9121e459b..d57ec6503 100644 --- a/pkg/kamailio/obs/kamailio.spec +++ b/pkg/kamailio/obs/kamailio.spec @@ -1,5 +1,5 @@ %define name kamailio -%define ver 5.7.1 +%define ver 5.7.2 %define rel dev1.0%{dist} %if 0%{?fedora} diff --git a/src/Makefile.defs b/src/Makefile.defs index 4ff899c93..287efecaf 100644 --- a/src/Makefile.defs +++ b/src/Makefile.defs @@ -106,7 +106,7 @@ INSTALL_FLAVOUR=$(FLAVOUR) # version number VERSION = 5 PATCHLEVEL = 7 -SUBLEVEL = 1 +SUBLEVEL = 2 EXTRAVERSION = # memory manager switcher diff --git a/src/core/autover.h b/src/core/autover.h index b6fb2cd16..5fe117da3 100644 --- a/src/core/autover.h +++ b/src/core/autover.h @@ -2,6 +2,6 @@ * DO NOT EDIT IT */ -#define REPO_VER "4238e4" -#define REPO_HASH "4238e4" +#define REPO_VER "29caa1" +#define REPO_HASH "29caa1" #define REPO_STATE "" diff --git a/src/core/cfg.y b/src/core/cfg.y index b93638eaa..eef8e6acd 100644 --- a/src/core/cfg.y +++ b/src/core/cfg.y @@ -886,7 +886,7 @@ assign_stm: _ksr_xavp_via_params.len=strlen($3); } | XAVPVIAPARAMS EQUAL error { yyerror("string value expected"); } - | XAVPVIAFIELDS EQUAL STRING { _ksr_xavp_via_params.s=$3; + | XAVPVIAFIELDS EQUAL STRING { _ksr_xavp_via_fields.s=$3; _ksr_xavp_via_fields.len=strlen($3); } | XAVPVIAFIELDS EQUAL error { yyerror("string value expected"); } diff --git a/src/core/parser/parse_via.c b/src/core/parser/parse_via.c index 9d541a00b..55e6b7c02 100644 --- a/src/core/parser/parse_via.c +++ b/src/core/parser/parse_via.c @@ -2677,6 +2677,17 @@ endofpacket: goto error; } } + if(vb->params.s != NULL && vb->params.len == 0 && vb->last_param != NULL) { + if(vb->last_param->name.len > 0) { + if(vb->last_param->value.len > 0) { + vb->params.len = vb->last_param->value.s + vb->last_param->value.len + - vb->params.s; + } else { + vb->params.len = vb->last_param->name.s + vb->last_param->name.len + - vb->params.s; + } + } + } return tmp; nextvia: DBG("parsing via: next via\n"); @@ -2691,6 +2702,18 @@ nextvia: goto error; } } + if(vb->params.s != NULL && vb->params.len == 0 && vb->last_param != NULL) { + if(vb->last_param->name.len > 0) { + if(vb->last_param->value.len > 0) { + vb->params.len = vb->last_param->value.s + vb->last_param->value.len + - vb->params.s; + } else { + vb->params.len = vb->last_param->name.s + vb->last_param->name.len + - vb->params.s; + } + } + } + vb->next = pkg_malloc(sizeof(struct via_body)); if(vb->next == 0) { PKG_MEM_ERROR; diff --git a/src/modules/app_lua/README b/src/modules/app_lua/README index c4697435e..f8891270e 100644 --- a/src/modules/app_lua/README +++ b/src/modules/app_lua/README @@ -149,7 +149,7 @@ Chapter 1. Admin Guide Set the path to the Lua script to be loaded at startup. Then you can use lua_run(function, params) to execute a function from the script at - runtime. + runtime. The script can be in Lua-source or bytecode. Default value is “null”. diff --git a/src/modules/app_lua/doc/app_lua_admin.xml b/src/modules/app_lua/doc/app_lua_admin.xml index adcb91cae..0c2841ea0 100644 --- a/src/modules/app_lua/doc/app_lua_admin.xml +++ b/src/modules/app_lua/doc/app_lua_admin.xml @@ -117,7 +117,7 @@ Set the path to the Lua script to be loaded at startup. Then you can use lua_run(function, params) to execute a function from the - script at runtime. + script at runtime. The script can be in Lua-source or bytecode. diff --git a/src/modules/crypto/crypto_uuid.c b/src/modules/crypto/crypto_uuid.c index a4049e628..63a9db07d 100644 --- a/src/modules/crypto/crypto_uuid.c +++ b/src/modules/crypto/crypto_uuid.c @@ -169,14 +169,33 @@ static inline int crypto_format_rfc4122_uuid(char *sbuf, size_t sbuf_len, */ void crypto_generate_callid(str* callid) { +#if OPENSSL_VERSION_NUMBER > 0x030000000L + EVP_MD_CTX *crypto_ctx = NULL; +#else static SHA_CTX crypto_ctx = {0}; +#endif static unsigned char crypto_buf[SHA_DIGEST_LENGTH] = {0}; static char crypto_sbuf[UUID_LEN] = {0}; crypto_inc_counter(crypto_callid_counter, CTR_LEN); + +#if OPENSSL_VERSION_NUMBER > 0x030000000L + if((crypto_ctx = EVP_MD_CTX_new()) == NULL) { + LM_ERR("can't get new context\n"); + callid->s = NULL; + callid->len = 0; + return; + } + EVP_DigestInit_ex(crypto_ctx, EVP_sha1(), NULL); + EVP_DigestUpdate(crypto_ctx, crypto_callid_seed, SEED_LEN); + EVP_DigestUpdate(crypto_ctx, crypto_callid_counter, CTR_LEN); + EVP_DigestFinal_ex(crypto_ctx, crypto_buf, NULL); + EVP_MD_CTX_free(crypto_ctx); +#else SHA1_Init(&crypto_ctx); SHA1_Update(&crypto_ctx, crypto_callid_seed, SEED_LEN); SHA1_Update(&crypto_ctx, crypto_callid_counter, CTR_LEN); SHA1_Final(crypto_buf, &crypto_ctx); +#endif crypto_format_rfc4122_uuid(crypto_sbuf, sizeof(crypto_sbuf), crypto_buf, sizeof(crypto_buf)); callid->s = crypto_sbuf; diff --git a/src/modules/db_redis/redis_dbase.c b/src/modules/db_redis/redis_dbase.c index 254e0f6b3..8f7056bd0 100644 --- a/src/modules/db_redis/redis_dbase.c +++ b/src/modules/db_redis/redis_dbase.c @@ -2389,6 +2389,8 @@ error: LM_ERR("failed to perform the update\n"); if (reply) db_redis_free_reply(&reply); + if(db_keys) + pkg_free(db_keys); db_redis_key_free(&query_v); db_redis_key_free(&all_type_keys); db_redis_key_free(&type_keys); diff --git a/src/modules/dialog/dlg_hash.c b/src/modules/dialog/dlg_hash.c index 54b8916d4..d61bfb62b 100644 --- a/src/modules/dialog/dlg_hash.c +++ b/src/modules/dialog/dlg_hash.c @@ -370,8 +370,11 @@ void destroy_dlg(struct dlg_cell *dlg) if (dlg_db_mode) remove_dialog_from_db(dlg); - if (dlg->cbs.first) + if(dlg->cbs.first) { destroy_dlg_callbacks_list(dlg->cbs.first); + dlg->cbs.first = NULL; + dlg->cbs.types = 0; + } if (dlg->profile_links) destroy_linkers(dlg->profile_links); diff --git a/src/modules/http_async_client/README b/src/modules/http_async_client/README index 57eff8a89..0caa3d463 100644 --- a/src/modules/http_async_client/README +++ b/src/modules/http_async_client/README @@ -146,7 +146,8 @@ Chapter 1. Admin Guide The following libraries or applications must be installed before running Kamailio with this module loaded: - * libcurl libev + * libcurl - https://curl.se/libcurl/ + * libevent - https://libevent.org/ 3. Parameters diff --git a/src/modules/http_async_client/doc/http_async_client_admin.xml b/src/modules/http_async_client/doc/http_async_client_admin.xml index f51498672..e03b02089 100644 --- a/src/modules/http_async_client/doc/http_async_client_admin.xml +++ b/src/modules/http_async_client/doc/http_async_client_admin.xml @@ -48,8 +48,12 @@ - libcurl - libev + libcurl - https://curl.se/libcurl/ + + + + + libevent - https://libevent.org/ diff --git a/src/modules/http_client/functions.c b/src/modules/http_client/functions.c index 8b1f33d74..97eea3681 100644 --- a/src/modules/http_client/functions.c +++ b/src/modules/http_client/functions.c @@ -155,14 +155,16 @@ static int curL_request_url(struct sip_msg *_m, const char *_met, res = curl_easy_setopt(curl, CURLOPT_URL, _url); /* Limit to HTTP and HTTPS protocols */ -#if defined(CURL_AT_LEAST_VERSION) && CURL_AT_LEAST_VERSION(7, 85, 0) +#if LIBCURL_VERSION_NUM >= 0x075500 + /* #if defined(CURL_AT_LEAST_VERSION) && CURL_AT_LEAST_VERSION(7, 85, 0) */ res = curl_easy_setopt(curl, CURLOPT_PROTOCOLS_STR, "http,https"); #else res = curl_easy_setopt( curl, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS); #endif -#if defined(CURL_AT_LEAST_VERSION) && CURL_AT_LEAST_VERSION(7, 85, 0) +#if LIBCURL_VERSION_NUM >= 0x075500 + /* #if defined(CURL_AT_LEAST_VERSION) && CURL_AT_LEAST_VERSION(7, 85, 0) */ res = curl_easy_setopt(curl, CURLOPT_REDIR_PROTOCOLS_STR, "http,https"); #else res = curl_easy_setopt( @@ -392,7 +394,9 @@ static int curL_request_url(struct sip_msg *_m, const char *_met, if((stat >= 200) && (stat < 500)) { double datasize = 0; -#if defined(CURL_AT_LEAST_VERSION) && CURL_AT_LEAST_VERSION(7, 55, 0) + +#if LIBCURL_VERSION_NUM >= 0x073700 + /* #if defined(CURL_AT_LEAST_VERSION) && CURL_AT_LEAST_VERSION(7, 55, 0) */ curl_off_t dlsize; curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD_T, &dlsize); download_size = (double)dlsize; diff --git a/src/modules/ims_dialog/ims_dialog.c b/src/modules/ims_dialog/ims_dialog.c index 5da9d058e..dc614193b 100644 --- a/src/modules/ims_dialog/ims_dialog.c +++ b/src/modules/ims_dialog/ims_dialog.c @@ -21,6 +21,7 @@ #include "../../modules/tm/tm_load.h" #include "../../core/rpc_lookup.h" #include "../../modules/rr/api.h" +#include "../../core/kemi.h" #include "dlg_hash.h" #include "dlg_timer.h" @@ -1044,9 +1045,107 @@ static void rpc_end_all_active_dlg (rpc_t *rpc, void *c) } static rpc_export_t rpc_methods[] = { - {"dlg2.list", rpc_print_dlgs, rpc_print_dlgs_doc, 0}, - {"dlg2.end_dlg", rpc_end_dlg_entry_id, rpc_end_dlg_entry_id_doc, 0}, - {"dlg2.end_all_active_dlg", rpc_end_all_active_dlg, rpc_end_all_active_dlg_doc, 0}, - {0, 0, 0, 0} + {"dlg2.list", rpc_print_dlgs, rpc_print_dlgs_doc, 0}, + {"dlg2.end_dlg", rpc_end_dlg_entry_id, rpc_end_dlg_entry_id_doc, 0}, + {"dlg2.end_all_active_dlg", rpc_end_all_active_dlg, + rpc_end_all_active_dlg_doc, 0}, + {0, 0, 0, 0}}; + + +static int ki_is_known_dlg(sip_msg_t *msg) +{ + return is_known_dlg(msg); +} + +static int ki_set_dlg_profile(sip_msg_t *msg, str *sprofile, str *svalue) +{ + struct dlg_profile_table *profile = NULL; + pv_elem_t *pvvalue = NULL; + + if(sprofile == NULL || sprofile->s == NULL || sprofile->len <= 0) { + LM_ERR("invalid profile identifier\n"); + return -1; + } + + profile = search_dlg_profile(sprofile); + if(profile == NULL) { + LM_CRIT("profile <%.*s> not defined\n", sprofile->len, sprofile->s); + return -1; + } + + if(pv_parse_format(svalue, &pvvalue) || pvvalue == NULL) { + LM_ERR("wrong format [%.*s] for value param!\n", svalue->len, + svalue->s); + return -1; + } + + return w_set_dlg_profile(msg, (char *)profile, (char *)pvvalue); +} + +static int ki_get_profile_size( + sip_msg_t *msg, str *sprofile, str *svalue, str *spv) + +{ + struct dlg_profile_table *profile = NULL; + pv_elem_t *pvvalue = NULL; + pv_spec_t *pvs = NULL; + + if(sprofile == NULL || sprofile->s == NULL || sprofile->len <= 0) { + LM_ERR("invalid profile identifier\n"); + return -1; + } + if(spv == NULL || spv->s == NULL || spv->len <= 0) { + LM_ERR("invalid destination var name\n"); + return -1; + } + profile = search_dlg_profile(sprofile); + if(profile == NULL) { + LM_CRIT("profile <%.*s> not defined\n", sprofile->len, sprofile->s); + return -1; + } + if(pv_parse_format(svalue, &pvvalue) || pvvalue == NULL) { + LM_ERR("wrong format [%.*s] for value param!\n", svalue->len, + svalue->s); + return -1; + } + pvs = pv_cache_get(spv); + if(pvs == NULL) { + LM_ERR("cannot get pv spec for [%.*s]\n", spv->len, spv->s); + return -1; + } + if(pvs->type != PVT_AVP && pvs->type != PVT_SCRIPTVAR) { + LM_ERR("return must be an AVP or SCRIPT VAR!\n"); + return -1; + } + + return w_get_profile_size3( + msg, (char *)profile, (char *)pvvalue, (char *)pvs); +} + +/* clang-format off */ +static sr_kemi_t sr_kemi_ims_dialog_exports[] = { + { str_init("ims_dialog"), str_init("is_known_dlg"), + SR_KEMIP_INT, ki_is_known_dlg, + { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, + SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } + }, + { str_init("ims_dialog"), str_init("set_dlg_profile"), + SR_KEMIP_INT, ki_set_dlg_profile, + { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE, + SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } + }, + { str_init("ims_dialog"), str_init("get_profile_size"), + SR_KEMIP_INT, ki_get_profile_size, + { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_STR, + SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } + }, + + { {0, 0}, {0, 0}, 0, NULL, { 0, 0, 0, 0, 0, 0 } } }; +/* clang-format on */ +int mod_register(char *path, int *dlflags, void *p1, void *p2) +{ + sr_kemi_modules_add(sr_kemi_ims_dialog_exports); + return 0; +} diff --git a/src/modules/ims_ipsec_pcscf/spi_list.c b/src/modules/ims_ipsec_pcscf/spi_list.c index 37a76cba7..f56952f81 100644 --- a/src/modules/ims_ipsec_pcscf/spi_list.c +++ b/src/modules/ims_ipsec_pcscf/spi_list.c @@ -51,7 +51,7 @@ void destroy_list(spi_list_t *lst) } int spi_add(spi_list_t *list, uint32_t spi_cid, uint32_t spi_sid, - uint16_t sport, uint16_t cport) + uint16_t cport, uint16_t sport) { if(!list) { return 1; diff --git a/src/modules/ims_qos/ims_qos_mod.c b/src/modules/ims_qos/ims_qos_mod.c index 9eb25d4e1..1e2897df9 100644 --- a/src/modules/ims_qos/ims_qos_mod.c +++ b/src/modules/ims_qos/ims_qos_mod.c @@ -69,6 +69,7 @@ #include "rx_aar.h" #include "ims_qos_mod.h" #include "../../core/parser/sdp/sdp.h" +#include "../../core/kemi.h" #include "../../lib/ims/useful_defs.h" #include "ims_qos_stats.h" @@ -157,8 +158,14 @@ int rs_default_bandwidth = 0; int rr_default_bandwidth = 0; /* commands wrappers and fixups */ -static int w_rx_aar(struct sip_msg *msg, char *route, char* dir, char *id, int id_type); -static int w_rx_aar_register(struct sip_msg *msg, char *route, char* str1, char *bar); +static int w_rx_aar(struct sip_msg *msg, char *route, char *dir, char *id, + int id_type, int cfg_type); +static int w_rx_aar_register( + struct sip_msg *msg, char *route, char *str1, int cfg_type); + +static int cfg_rx_aar( + struct sip_msg *msg, char *route, char *dir, char *id, int id_type); +static int cfg_rx_aar_register(struct sip_msg *msg, char *route, char *str1); struct _pv_req_data { struct cell *T; @@ -196,10 +203,10 @@ static int pv_t_copy_msg(struct sip_msg *src, struct sip_msg *dst) static cmd_export_t cmds[] = { - { "Rx_AAR", (cmd_function) w_rx_aar, 4, fixup_aar, 0, REQUEST_ROUTE | ONREPLY_ROUTE}, - { "Rx_AAR_Register", (cmd_function) w_rx_aar_register, 2, fixup_aar_register, 0, REQUEST_ROUTE}, - { 0, 0, 0, 0, 0, 0} -}; + {"Rx_AAR", (cmd_function)cfg_rx_aar, 4, fixup_aar, 0, ONREPLY_ROUTE}, + {"Rx_AAR_Register", (cmd_function)cfg_rx_aar_register, 2, + fixup_aar_register, 0, REQUEST_ROUTE}, + {0, 0, 0, 0, 0, 0}}; static param_export_t params[] = { { "rx_dest_realm", PARAM_STR, &rx_dest_realm}, @@ -677,7 +684,14 @@ uint16_t check_ip_version(str ip) /* Wrapper to send AAR from config file - this only allows for AAR for calls - not register, which uses r_rx_aar_register * return: 1 - success, <=0 failure. 2 - message not an AAR generating message (ie proceed without PCC if you wish) */ -static int w_rx_aar(struct sip_msg *msg, char *route, char* dir, char *c_id, int id_type) +static int cfg_rx_aar( + struct sip_msg *msg, char *route, char *dir, char *c_id, int id_type) +{ + return w_rx_aar(msg, route, dir, c_id, id_type, 0); +} + +static int w_rx_aar(struct sip_msg *msg, char *route, char *dir, char *c_id, + int id_type, int cfg_type) { int ret = CSCF_RETURN_ERROR; @@ -702,19 +716,32 @@ static int w_rx_aar(struct sip_msg *msg, char *route, char* dir, char *c_id, int struct hdr_field *h = 0; struct dlg_cell* dlg = 0; - cfg_action_t* cfg_action = 0; - saved_transaction_t* saved_t_data = 0; //data specific to each contact's AAR async call - char* direction = dir; - if (fixup_get_svalue(msg, (gparam_t*) route, &route_name) != 0) { - LM_ERR("no async route block for assign_server_unreg\n"); - return result; + cfg_action_t *cfg_action = 0; + saved_transaction_t *saved_t_data = + 0; //data specific to each contact's AAR async call + char *direction = dir; + + // standard config + if(cfg_type == 0) { + if(fixup_get_svalue(msg, (gparam_t *)route, &route_name) != 0) { + LM_ERR("no async route block for assign_server_unreg\n"); + return result; } - if (get_str_fparam(&s_id, msg, (fparam_t*) c_id) < 0) { - LM_ERR("failed to get s__id\n"); - return result; + if(get_str_fparam(&s_id, msg, (fparam_t *)c_id) < 0) { + LM_ERR("failed to get s__id\n"); + return result; } + // kemi config + } else { + route_name.s = route; + route_name.len = strlen(route); + + s_id.s = c_id; + s_id.len = strlen(c_id); + } + LM_DBG("Looking for route block [%.*s]\n", route_name.len, route_name.s); int ri = route_get(&main_rt, route_name.s); if (ri < 0) { @@ -1154,7 +1181,13 @@ ignore: } /* Wrapper to send AAR from config file - only used for registration */ -static int w_rx_aar_register(struct sip_msg *msg, char* route, char* str1, char* bar) +static int cfg_rx_aar_register(struct sip_msg *msg, char *route, char *str1) +{ + return w_rx_aar_register(msg, route, str1, 0); +} + +static int w_rx_aar_register( + struct sip_msg *msg, char *route, char *str1, int cfg_type) { int ret = CSCF_RETURN_ERROR; @@ -1178,15 +1211,30 @@ static int w_rx_aar_register(struct sip_msg *msg, char* route, char* str1, char* unsigned short recv_proto; uint16_t ip_version; - struct via_body* vb; - unsigned short via_port; - unsigned short via_proto; + struct via_body *vb; + unsigned short via_port; + unsigned short via_proto; + udomain_t *d = NULL; - if (fixup_get_svalue(msg, (gparam_t*) route, &route_name) != 0) { - LM_ERR("no async route block for assign_server_unreg\n"); - return -1; + // standard config + if(cfg_type == 0) { + if(fixup_get_svalue(msg, (gparam_t *)route, &route_name) != 0) { + LM_ERR("no async route block for assign_server_unreg\n"); + return -1; } + // kemi config + } else { + route_name.s = route; + route_name.len = strlen(route); + + if(ul.register_udomain((char *)str1, &d) < 0) { + LM_ERR("Error doing kemi fixup"); + return -1; + } + str1 = (char *)d; + } + LM_DBG("Looking for route block [%.*s]\n", route_name.len, route_name.s); int ri = route_get(&main_rt, route_name.s); if (ri < 0) { @@ -1598,3 +1646,73 @@ int create_return_code(int result) return rc; } + + +static int ki_rx_aar( + sip_msg_t *msg, str *route, str *dir, str *c_id, int id_type) +{ + if(!msg || !route || !dir || !c_id) + return -1; + + if(route->s == NULL || route->len <= 0) { + LM_ERR("invalid or empty route\n"); + return -1; + } + + if(dir->s == NULL || dir->len <= 0) { + LM_ERR("invalid or empty direction\n"); + return -1; + } + + // make sure vars can be used as char* + route->s[route->len] = '\0'; + dir->s[dir->len] = '\0'; + c_id->s[c_id->len] = '\0'; + + return w_rx_aar(msg, route->s, dir->s, c_id->s, id_type, 1); +} + +static int ki_rx_aar_register(sip_msg_t *msg, str *route, str *domain) +{ + if(!msg || !route || !domain) + return -1; + + if(route->s == NULL || route->len <= 0) { + LM_ERR("invalid or empty route\n"); + return -1; + } + + if(domain->s == NULL || domain->len <= 0) { + LM_ERR("invalid or empty domain\n"); + return -1; + } + + // make sure vars can be used as char* + route->s[route->len] = '\0'; + domain->s[domain->len] = '\0'; + + return w_rx_aar_register(msg, route->s, domain->s, 1); +} + +/* clang-format off */ +static sr_kemi_t sr_kemi_ims_qos_exports[] = { + { str_init("ims_qos"), str_init("Rx_AAR"), + SR_KEMIP_INT, ki_rx_aar, + { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_STR, + SR_KEMIP_INT, SR_KEMIP_NONE, SR_KEMIP_NONE } + }, + { str_init("ims_qos"), str_init("Rx_AAR_Register"), + SR_KEMIP_INT, ki_rx_aar_register, + { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE, + SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } + }, + + { {0, 0}, {0, 0}, 0, NULL, { 0, 0, 0, 0, 0, 0 } } +}; +/* clang-format on */ + +int mod_register(char *path, int *dlflags, void *p1, void *p2) +{ + sr_kemi_modules_add(sr_kemi_ims_qos_exports); + return 0; +} diff --git a/src/modules/ims_qos/rx_aar.c b/src/modules/ims_qos/rx_aar.c index 1c376c980..0f7373915 100644 --- a/src/modules/ims_qos/rx_aar.c +++ b/src/modules/ims_qos/rx_aar.c @@ -149,6 +149,11 @@ void async_aar_callback(int is_timeout, void *param, AAAMessage *aaa, long elaps LM_DBG("Success, received code: [%i] from PCRF for AAR request\n", cdp_result); counter_inc(ims_qos_cnts_h.successful_media_aars); + if(!aaa->sessionId) { + LM_ERR("NULL AAA sessionId from PCRF!\n"); + goto error; + } + LM_DBG("Auth session ID [%.*s]", aaa->sessionId->data.len, aaa->sessionId->data.s); if(!data->aar_update) { @@ -286,6 +291,12 @@ void async_aar_reg_callback(int is_timeout, void *param, AAAMessage *aaa, long e create_return_code(result); goto done; } + + if(!aaa->sessionId) { + LM_ERR("NULL AAA sessionId from PCRF!\n"); + goto error; + } + //need to set Rx auth data to say this session has been successfully opened //This is used elsewhere to prevent acting on termination events when the session has not been opened //getting auth session diff --git a/src/modules/jansson/jansson_funcs.c b/src/modules/jansson/jansson_funcs.c index 547c1275b..fb81a0feb 100644 --- a/src/modules/jansson/jansson_funcs.c +++ b/src/modules/jansson/jansson_funcs.c @@ -225,7 +225,7 @@ int janssonmod_set(unsigned int append, struct sip_msg* msg, char* type_in, value = json_null(); } else { - ERR("unrecognized input type\n"); + ERR("unrecognized input type: %.*s\n", type_s.len, type_s.s); goto fail; } diff --git a/src/modules/kex/mod_stats.c b/src/modules/kex/mod_stats.c index dd73bec52..84ca44f66 100644 --- a/src/modules/kex/mod_stats.c +++ b/src/modules/kex/mod_stats.c @@ -88,15 +88,14 @@ static const char* rpc_mod_mem_statsx_doc[2] = { static int rpc_mod_is_printed_one(mem_counter *stats, mem_counter *current) { mem_counter *iter; - if ( stats == NULL || current == NULL ) - { + if(stats == NULL || current == NULL || current->mname == NULL) { LM_ERR("invalid parameter\n"); return 1; } iter = stats; - while (iter && iter != current) { - if (strcmp(iter->mname, current->mname) == 0) { + while(iter && iter != current) { + if(iter->mname != NULL && strcmp(iter->mname, current->mname) == 0) { return 1; } iter = iter->next; diff --git a/src/modules/mohqueue/README b/src/modules/mohqueue/README index 5a0f746fa..934b5fa14 100644 --- a/src/modules/mohqueue/README +++ b/src/modules/mohqueue/README @@ -327,7 +327,7 @@ $var(mohq) = "operators"; volatile database in memory of call status. If the module is restarted it loses the internal database and clears the external one. - On a reqular basis it checks the external table that defines the queues + On a regular basis it checks the external table that defines the queues to see if the definition has changed. It makes this check under the following conditions: the queue has not been checked in the last 60 seconds AND no call is currently in queue or transitioning in or out. diff --git a/src/modules/mohqueue/doc/mohqueue_admin.xml b/src/modules/mohqueue/doc/mohqueue_admin.xml index 37cc02e1a..20eb7072d 100644 --- a/src/modules/mohqueue/doc/mohqueue_admin.xml +++ b/src/modules/mohqueue/doc/mohqueue_admin.xml @@ -361,7 +361,7 @@ restarted it loses the internal database and clears the external one. -On a reqular basis it checks the external table that defines the +On a regular basis it checks the external table that defines the queues to see if the definition has changed. It makes this check under the following conditions: the queue has not been checked in the last 60 seconds AND no call is currently in diff --git a/src/modules/msilo/msilo.c b/src/modules/msilo/msilo.c index fc9613732..f2fcc953b 100644 --- a/src/modules/msilo/msilo.c +++ b/src/modules/msilo/msilo.c @@ -755,7 +755,7 @@ static int m_store(sip_msg_t* msg, str *owner_s) } /* current time */ - val = (int)time(NULL); + val = (int)(unsigned long long)time(NULL); /* add expiration time */ db_keys[nr_keys] = &sc_exp_time; diff --git a/src/modules/rabbitmq/rabbitmq.c b/src/modules/rabbitmq/rabbitmq.c index f96a4ff06..76bf8218c 100644 --- a/src/modules/rabbitmq/rabbitmq.c +++ b/src/modules/rabbitmq/rabbitmq.c @@ -563,6 +563,10 @@ static int rabbitmq_connect(amqp_connection_state_t *conn) // establish a new connection to RabbitMQ server *conn = amqp_new_connection(); + if(!*conn) { + LM_ERR("FAIL: create AMQP connection\n"); + return RABBITMQ_ERR_CREATE; + } log_ret = log_on_amqp_error( amqp_get_rpc_reply(*conn), "amqp_new_connection()"); if(log_ret != AMQP_RESPONSE_NORMAL && log_ret != AMQP_RESPONSE_NONE) { diff --git a/src/modules/rabbitmq/rabbitmq.h b/src/modules/rabbitmq/rabbitmq.h index 4560c04a0..79c3be55c 100644 --- a/src/modules/rabbitmq/rabbitmq.h +++ b/src/modules/rabbitmq/rabbitmq.h @@ -48,6 +48,7 @@ typedef enum { RABBITMQ_ERR_CHANNEL, RABBITMQ_ERR_QUEUE, RABBITMQ_ERR_PUBLISH, + RABBITMQ_ERR_CREATE, RABBITMQ_ERR_SOCK, RABBITMQ_ERR_CONSUME, RABBITMQ_ERR_NULL, diff --git a/src/modules/registrar/common.c b/src/modules/registrar/common.c index d5a3e628a..302c089de 100644 --- a/src/modules/registrar/common.c +++ b/src/modules/registrar/common.c @@ -34,14 +34,14 @@ #include "common.h" #include "config.h" -#define MAX_AOR_LEN 256 +#define AOR_MAX_SIZE 512 /*! \brief * Extract Address of Record */ int extract_aor(str* _uri, str* _a, sip_uri_t *_pu) { - static char aor_buf[MAX_AOR_LEN]; + static char aor_buf[AOR_MAX_SIZE]; str tmp; sip_uri_t turi; sip_uri_t *puri; @@ -49,8 +49,8 @@ int extract_aor(str* _uri, str* _a, sip_uri_t *_pu) str *uri; str realm_prefix = {0}; - memset(aor_buf, 0, MAX_AOR_LEN); - uri=_uri; + memset(aor_buf, 0, AOR_MAX_SIZE); + uri = _uri; if(_pu!=NULL) puri = _pu; @@ -63,9 +63,9 @@ int extract_aor(str* _uri, str* _a, sip_uri_t *_pu) return -1; } - if ( (puri->user.len + puri->host.len + 1) > MAX_AOR_LEN - || puri->user.len > USERNAME_MAX_SIZE - || puri->host.len > DOMAIN_MAX_SIZE ) { + if((puri->user.len + puri->host.len + 2) > AOR_MAX_SIZE + || puri->user.len > USERNAME_MAX_SIZE + || puri->host.len > DOMAIN_MAX_SIZE) { rerrno = R_AOR_LEN; LM_ERR("Address Of Record too long\n"); return -2; diff --git a/src/modules/registrar/registrar.h b/src/modules/registrar/registrar.h index 3cf8b6a93..e58be581c 100644 --- a/src/modules/registrar/registrar.h +++ b/src/modules/registrar/registrar.h @@ -40,10 +40,10 @@ /* if DB support is used, this values must not exceed the * storage capacity of the DB columns! See db/schema/entities.xml */ extern int contact_max_size; /* configurable using module parameter "contact_max_size" instead of compile time constant */ -#define RECEIVED_MAX_SIZE 255 -#define USERNAME_MAX_SIZE 64 -#define DOMAIN_MAX_SIZE 128 -#define CALLID_MAX_SIZE 255 +#define RECEIVED_MAX_SIZE 255 +#define USERNAME_MAX_SIZE 248 +#define DOMAIN_MAX_SIZE 248 +#define CALLID_MAX_SIZE 255 #define PATH_MODE_STRICT 2 #define PATH_MODE_LAZY 1 diff --git a/src/modules/siptrace/siptrace.c b/src/modules/siptrace/siptrace.c index 81926cc1b..be8f3e879 100644 --- a/src/modules/siptrace/siptrace.c +++ b/src/modules/siptrace/siptrace.c @@ -2659,6 +2659,8 @@ int pv_parse_siptrace_name(pv_spec_t *sp, str *in) sp->pvp.pvn.u.isname.name.n = 6; else if(strncmp(in->s, "dst_proto", 9)==0) sp->pvp.pvn.u.isname.name.n = 7; + else if(strncmp(in->s, "direction", 9)==0) + sp->pvp.pvn.u.isname.name.n = 10; else goto error; break; case 10: @@ -2666,8 +2668,6 @@ int pv_parse_siptrace_name(pv_spec_t *sp, str *in) sp->pvp.pvn.u.isname.name.n = 8; else if(strncmp(in->s, "dst_hostip", 10)==0) sp->pvp.pvn.u.isname.name.n = 9; - else if(strncmp(in->s, "direction", 10)==0) - sp->pvp.pvn.u.isname.name.n = 10; else goto error; break; default: diff --git a/src/modules/tm/rpc_uac.c b/src/modules/tm/rpc_uac.c index 5c2fc7be5..46ff1ef3e 100644 --- a/src/modules/tm/rpc_uac.c +++ b/src/modules/tm/rpc_uac.c @@ -622,12 +622,12 @@ static void rpc_uac_block_callback(struct cell* t, int type, * only if reply_wait is set to 1. Otherwise the rpc reply will be sent * immediately and it will be success if the parameters were ok and t_uac did * not report any error. - * Note: reply waiting (reply_wait==1) is not yet supported. * @param rpc - rpc handle * @param c - rpc current context * @param reply_wait - if 1 do not generate a rpc reply until final response * for the transaction arrives, if 0 immediately send - * an rpc reply (see above). + * an rpc reply (see above). If 2 blocking wait until + * final response for the transaction arrives. */ static void rpc_t_uac(rpc_t* rpc, void* c, int reply_wait) { diff --git a/src/modules/xhttp/README b/src/modules/xhttp/README index 9a59c839a..ec009baca 100644 --- a/src/modules/xhttp/README +++ b/src/modules/xhttp/README @@ -83,8 +83,8 @@ Chapter 1. Admin Guide SIP parser can easily handle HTTP requests just by adding a fake Via header. - The xmlrpc module uses the same concept. The xHTTP - module offers a generic way of handling the HTTP protocol, by calling + The xmlrpc module uses the same concept. The xHTTP module offers a + generic way of handling the HTTP protocol, by calling event_route[xhttp:request] in your config. You can check the HTTP URL via the config variable $hu. Note that use of $ru will raise errors since the structure of an HTTP URL is not compatible with that of a SIP @@ -222,7 +222,10 @@ event_route[xhttp:request] { 6.1. xhttp:request - The event route is executed when a new HTTP request is received. + The event route is executed when a new HTTP request is received. Most + of the variables related to a SIP request can be used inside this event + route to get HTTP request attributes (e.g., $si - source IP, $hdr(X) - + body of header X, $rm - request method, $rb - request body, ...). ... tcp_accept_no_cl=yes ... diff --git a/src/modules/xhttp/doc/xhttp_admin.xml b/src/modules/xhttp/doc/xhttp_admin.xml index f0e6d3fde..1c7d29a05 100644 --- a/src/modules/xhttp/doc/xhttp_admin.xml +++ b/src/modules/xhttp/doc/xhttp_admin.xml @@ -22,7 +22,7 @@ Via header. - The xmlrpc module uses the same concept. + The xmlrpc module uses the same concept. The xHTTP module offers a generic way of handling the HTTP protocol, by calling event_route[xhttp:request] in your config. You can check the HTTP URL via the config variable @@ -228,7 +228,10 @@ event_route[xhttp:request] { xhttp:request - The event route is executed when a new HTTP request is received. + The event route is executed when a new HTTP request is received. Most + of the variables related to a SIP request can be used inside this event + route to get HTTP request attributes (e.g., $si - source IP, $hdr(X) + - body of header X, $rm - request method, $rb - request body, ...). ... diff --git a/src/modules/xlog/README b/src/modules/xlog/README index 6606c5d9e..b21766a6d 100644 --- a/src/modules/xlog/README +++ b/src/modules/xlog/README @@ -266,7 +266,7 @@ kamcmd cfg.set_now_int xlog methods_filter 15 Example 1.8. Set methods_filter parameter ... -modparam("xlog", "long_format", 1) +modparam("xlog", "methods_filter", 15) ... 5. Functions diff --git a/src/modules/xlog/doc/xlog_admin.xml b/src/modules/xlog/doc/xlog_admin.xml index ba4340330..0b760b293 100644 --- a/src/modules/xlog/doc/xlog_admin.xml +++ b/src/modules/xlog/doc/xlog_admin.xml @@ -256,7 +256,7 @@ kamcmd cfg.set_now_int xlog methods_filter 15 Set <varname>methods_filter</varname> parameter ... -modparam("xlog", "long_format", 1) +modparam("xlog", "methods_filter", 15) ... diff --git a/utils/kamctl/kamctl b/utils/kamctl/kamctl index 214cd21e5..b4e552ef6 100755 --- a/utils/kamctl/kamctl +++ b/utils/kamctl/kamctl @@ -5,7 +5,7 @@ #=================================================================== ### version for this script -VERSION='5.6.0' +VERSION='5.7.0' PATH=$PATH:/usr/local/sbin/