From bde62f6c92bf49b399ad74620d671a7a59ed6fae Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Tue, 13 Jan 2026 10:01:25 +0100 Subject: [PATCH] New upstream version 6.0.5 --- CMakeLists.txt | 51 +- ChangeLog | 1583 +++++++++++++++++ cmake/BuildType.cmake | 8 +- cmake/cmake-format.py | 4 +- cmake/compiler-specific.cmake | 359 +++- cmake/db_files.cmake | 54 + cmake/dbschema-version-postprocess.sh | 49 + cmake/dbschema.cmake | 256 +++ cmake/deb-packaging.cmake | 18 + cmake/defs.cmake | 161 +- cmake/groups.cmake | 264 +-- cmake/modules-docs.cmake | 198 +-- cmake/modules/FindBerkeleyDB.cmake | 60 +- cmake/modules/FindErlang.cmake | 52 +- cmake/modules/FindLdap.cmake | 32 +- cmake/modules/FindLibev.cmake | 4 +- cmake/modules/FindLibfreeradiusClient.cmake | 21 +- cmake/modules/FindMariaDBClient.cmake | 3 +- cmake/modules/FindMySQL.cmake | 114 +- cmake/modules/FindNETSNMP.cmake | 15 +- cmake/modules/FindOracle.cmake | 11 +- cmake/modules/FindRadius.cmake | 6 +- cmake/os-specific.cmake | 10 +- cmake/os-specific/darwin.cmake | 38 +- cmake/os-specific/dragonfly.cmake | 9 +- cmake/os-specific/freebsd.cmake | 3 +- cmake/os-specific/linux.cmake | 9 +- doc/stylesheets/dbschema_k/xsl/common.xsl | 2 +- .../xsl/{mongodb.xsl => db_mongodb.xsl} | 0 .../xsl/{mysql.xsl => db_mysql.xsl} | 0 .../xsl/{oracle.xsl => db_oracle.xsl} | 0 .../xsl/{postgres.xsl => db_postgres.xsl} | 0 .../xsl/{dbtext.xsl => db_text.xsl} | 0 .../dbschema_k/xsl/pi_framework_table.xsl | 2 +- pkg/kamailio/Makefile | 3 +- pkg/kamailio/alpine/APKBUILD | 602 ++++--- pkg/kamailio/alpine/APKBUILD-kamailio | 90 + pkg/kamailio/alpine/kamailio.initd | 33 +- pkg/kamailio/deb/bionic/changelog | 12 + pkg/kamailio/deb/bionic/control | 3 +- pkg/kamailio/deb/bionic/copyright | 22 +- pkg/kamailio/deb/bookworm/changelog | 12 + pkg/kamailio/deb/bookworm/control | 3 +- pkg/kamailio/deb/bookworm/copyright | 22 +- pkg/kamailio/deb/bullseye/changelog | 12 + pkg/kamailio/deb/bullseye/control | 3 +- pkg/kamailio/deb/bullseye/copyright | 22 +- pkg/kamailio/deb/buster/changelog | 12 + pkg/kamailio/deb/buster/control | 3 +- pkg/kamailio/deb/buster/copyright | 22 +- pkg/kamailio/deb/debian/backports/bionic | 4 + pkg/kamailio/deb/debian/backports/bookworm | 4 + pkg/kamailio/deb/debian/backports/bullseye | 3 + pkg/kamailio/deb/debian/backports/buster | 3 + pkg/kamailio/deb/debian/backports/focal | 3 + pkg/kamailio/deb/debian/backports/jammy | 4 + pkg/kamailio/deb/debian/backports/jessie | 4 + pkg/kamailio/deb/debian/backports/precise | 4 + pkg/kamailio/deb/debian/backports/sid | 9 + pkg/kamailio/deb/debian/backports/stretch | 4 + pkg/kamailio/deb/debian/backports/trusty | 4 + pkg/kamailio/deb/debian/backports/wheezy | 4 + pkg/kamailio/deb/debian/backports/xenial | 4 + pkg/kamailio/deb/debian/changelog | 12 + pkg/kamailio/deb/debian/control | 5 +- pkg/kamailio/deb/debian/copyright | 22 +- pkg/kamailio/deb/debian/rules | 1 + pkg/kamailio/deb/focal/changelog | 12 + pkg/kamailio/deb/focal/control | 3 +- pkg/kamailio/deb/focal/copyright | 22 +- pkg/kamailio/deb/jammy/changelog | 12 + pkg/kamailio/deb/jammy/control | 3 +- pkg/kamailio/deb/jammy/copyright | 22 +- pkg/kamailio/deb/jessie/changelog | 12 + pkg/kamailio/deb/jessie/control | 3 +- pkg/kamailio/deb/jessie/copyright | 22 +- pkg/kamailio/deb/noble/changelog | 12 + pkg/kamailio/deb/noble/control | 5 +- pkg/kamailio/deb/noble/copyright | 22 +- pkg/kamailio/deb/noble/rules | 1 + pkg/kamailio/deb/precise/changelog | 12 + pkg/kamailio/deb/precise/control | 3 +- pkg/kamailio/deb/precise/copyright | 22 +- pkg/kamailio/deb/sid/changelog | 12 + pkg/kamailio/deb/sid/control | 42 +- pkg/kamailio/deb/sid/copyright | 22 +- .../deb/sid/kamailio-berkeley-bin.dirs | 1 - pkg/kamailio/deb/sid/rules | 3 +- pkg/kamailio/deb/stretch/changelog | 12 + pkg/kamailio/deb/stretch/control | 3 +- pkg/kamailio/deb/stretch/copyright | 22 +- pkg/kamailio/deb/trixie/changelog | 12 + pkg/kamailio/deb/trixie/control | 5 +- pkg/kamailio/deb/trixie/copyright | 22 +- pkg/kamailio/deb/trixie/rules | 1 + pkg/kamailio/deb/trusty/changelog | 12 + pkg/kamailio/deb/trusty/control | 3 +- pkg/kamailio/deb/trusty/copyright | 22 +- pkg/kamailio/deb/wheezy/changelog | 12 + pkg/kamailio/deb/wheezy/control | 3 +- pkg/kamailio/deb/wheezy/copyright | 22 +- pkg/kamailio/deb/xenial/changelog | 12 + pkg/kamailio/deb/xenial/control | 3 +- pkg/kamailio/deb/xenial/copyright | 22 +- pkg/kamailio/obs/kamailio-local.cfg | 5 + pkg/kamailio/obs/kamailio.preset | 1 + pkg/kamailio/obs/kamailio.spec | 531 +++--- pkg/kamailio/obs/kamailio.sysusers | 1 + pkg/kamailio/obs/meta | 65 - pkg/kamailio/obs/prjconf | 5 - src/CMakeLists.txt | 101 +- src/Makefile.defs | 2 +- src/core/CMakeLists.txt | 18 +- src/core/autover.h | 4 +- src/core/basex.c | 52 +- src/core/parser/digest/digest.c | 2 +- src/core/parser/digest/digest_parser.c | 1 + src/core/parser/msg_parser.c | 27 +- src/core/parser/parse_to.c | 28 +- src/core/parser/parse_to.h | 3 + src/core/parser/sdp/sdp.c | 24 +- src/core/socket_info.c | 2 +- src/core/tcp_main.c | 14 +- src/core/ut.c | 33 + src/core/ut.h | 32 +- src/lib/ims/ims_getters.c | 2 +- src/lib/srdb1/schema/Makefile | 20 +- src/lib/srdb1/schema/acc.xml | 4 +- src/lib/srdb1/schema/acc_cdrs.xml | 4 +- src/lib/srdb1/schema/address.xml | 4 +- src/lib/srdb1/schema/aliases.xml | 8 +- src/lib/srdb1/schema/carrier_name.xml | 4 +- src/lib/srdb1/schema/carrierfailureroute.xml | 4 +- src/lib/srdb1/schema/carrierroute.xml | 4 +- src/lib/srdb1/schema/contact.xml | 4 +- src/lib/srdb1/schema/cpl.xml | 4 +- src/lib/srdb1/schema/dbaliases.xml | 4 +- src/lib/srdb1/schema/dialog.xml | 4 +- src/lib/srdb1/schema/dialog_in.xml | 4 +- src/lib/srdb1/schema/dialog_out.xml | 4 +- src/lib/srdb1/schema/dialog_vars.xml | 4 +- src/lib/srdb1/schema/dialplan.xml | 4 +- src/lib/srdb1/schema/dispatcher.xml | 4 +- src/lib/srdb1/schema/domain.xml | 6 +- src/lib/srdb1/schema/domain_attrs.xml | 6 +- src/lib/srdb1/schema/domain_name.xml | 4 +- src/lib/srdb1/schema/domainpolicy.xml | 4 +- src/lib/srdb1/schema/dr_gateways.xml | 4 +- src/lib/srdb1/schema/dr_groups.xml | 4 +- src/lib/srdb1/schema/dr_gw_lists.xml | 4 +- src/lib/srdb1/schema/dr_rules.xml | 4 +- src/lib/srdb1/schema/globalblocklist.xml | 4 +- src/lib/srdb1/schema/grp.xml | 6 +- src/lib/srdb1/schema/htable.xml | 4 +- src/lib/srdb1/schema/imc_members.xml | 4 +- src/lib/srdb1/schema/imc_rooms.xml | 4 +- src/lib/srdb1/schema/impu.xml | 4 +- src/lib/srdb1/schema/impu_contact.xml | 4 +- src/lib/srdb1/schema/impu_subscriber.xml | 4 +- src/lib/srdb1/schema/lcr_gw.xml | 4 +- src/lib/srdb1/schema/lcr_rule.xml | 4 +- src/lib/srdb1/schema/lcr_rule_target.xml | 4 +- src/lib/srdb1/schema/location.xml | 8 +- src/lib/srdb1/schema/location_attrs.xml | 6 +- src/lib/srdb1/schema/location_pcscf.xml | 6 +- src/lib/srdb1/schema/matrix.xml | 4 +- src/lib/srdb1/schema/missed_calls.xml | 4 +- src/lib/srdb1/schema/mohqcalls.xml | 4 +- src/lib/srdb1/schema/mohqueues.xml | 4 +- src/lib/srdb1/schema/mtree.xml | 4 +- src/lib/srdb1/schema/mtrees.xml | 4 +- src/lib/srdb1/schema/nds_trusted_domains.xml | 4 +- src/lib/srdb1/schema/pdt.xml | 4 +- src/lib/srdb1/schema/pipelimit.xml | 4 +- src/lib/srdb1/schema/pr_active_watchers.xml | 4 +- src/lib/srdb1/schema/pr_presentity.xml | 4 +- src/lib/srdb1/schema/pr_pua.xml | 4 +- src/lib/srdb1/schema/pr_watchers.xml | 4 +- src/lib/srdb1/schema/pr_xcap.xml | 4 +- src/lib/srdb1/schema/purplemap.xml | 4 +- src/lib/srdb1/schema/re_grp.xml | 4 +- src/lib/srdb1/schema/rls_presentity.xml | 4 +- src/lib/srdb1/schema/rls_watchers.xml | 4 +- src/lib/srdb1/schema/ro_session.xml | 4 +- src/lib/srdb1/schema/rtpengine.xml | 4 +- src/lib/srdb1/schema/rtpproxy.xml | 4 +- src/lib/srdb1/schema/s_cscf.xml | 4 +- src/lib/srdb1/schema/s_cscf_capabilities.xml | 4 +- src/lib/srdb1/schema/sca.xml | 4 +- src/lib/srdb1/schema/secfilter.xml | 4 +- src/lib/srdb1/schema/silo.xml | 4 +- src/lib/srdb1/schema/sip_trace.xml | 6 +- src/lib/srdb1/schema/speed_dial.xml | 4 +- src/lib/srdb1/schema/subscriber.xml | 4 +- src/lib/srdb1/schema/subscriber_scscf.xml | 4 +- src/lib/srdb1/schema/template.xml | 4 +- src/lib/srdb1/schema/topos_d.xml | 4 +- src/lib/srdb1/schema/topos_t.xml | 4 +- src/lib/srdb1/schema/trusted.xml | 4 +- src/lib/srdb1/schema/uacreg.xml | 4 +- src/lib/srdb1/schema/uid_credentials.xml | 8 +- src/lib/srdb1/schema/uid_domain.xml | 8 +- src/lib/srdb1/schema/uid_domain_attrs.xml | 4 +- src/lib/srdb1/schema/uid_global_attrs.xml | 4 +- src/lib/srdb1/schema/uid_uri.xml | 10 +- src/lib/srdb1/schema/uid_uri_attrs.xml | 4 +- src/lib/srdb1/schema/uid_user_attrs.xml | 6 +- src/lib/srdb1/schema/uri.xml | 6 +- src/lib/srdb1/schema/userblocklist.xml | 4 +- src/lib/srdb1/schema/usr_preferences.xml | 6 +- src/lib/srdb1/schema/version.xml | 9 +- src/lib/srdb2/schema/acc.xml | 6 +- src/lib/srdb2/schema/attr_types.xml | 2 +- src/lib/srdb2/schema/contact_attrs.xml | 2 +- src/lib/srdb2/schema/cpl.xml | 2 +- src/lib/srdb2/schema/credentials.xml | 4 +- src/lib/srdb2/schema/customers.xml | 6 +- src/lib/srdb2/schema/domain.xml | 4 +- src/lib/srdb2/schema/grp.xml | 2 +- src/lib/srdb2/schema/gw_grp.xml | 6 +- src/lib/srdb2/schema/location.xml | 2 +- src/lib/srdb2/schema/missed_calls.xml | 6 +- src/lib/srdb2/schema/offline_winfo.xml | 8 +- src/lib/srdb2/schema/phonebook.xml | 8 +- src/lib/srdb2/schema/presentity.xml | 2 +- src/lib/srdb2/schema/ser.xml | 6 +- src/lib/srdb2/schema/silo.xml | 8 +- src/lib/srdb2/schema/speed_dial.xml | 8 +- src/lib/srdb2/schema/uri.xml | 6 +- src/lib/srdb2/schema/user_attrs.xml | 2 +- src/modules/CMakeLists.txt | 124 +- src/modules/app_perl/CMakeLists.txt | 27 +- src/modules/auth/api.c | 31 +- src/modules/auth/api.h | 20 +- src/modules/auth/auth_mod.c | 42 +- src/modules/auth_db/authorize.c | 7 +- src/modules/auth_radius/CMakeLists.txt | 8 +- src/modules/auth_radius/sterman.c | 4 +- src/modules/benchmark/README | 14 +- src/modules/benchmark/doc/benchmark_admin.xml | 14 +- src/modules/cdp/cdp_tls.c | 10 +- src/modules/crypto/CMakeLists.txt | 2 +- src/modules/db2_ldap/CMakeLists.txt | 3 +- src/modules/db_berkeley/CMakeLists.txt | 7 +- src/modules/db_mysql/CMakeLists.txt | 4 +- src/modules/db_oracle/CMakeLists.txt | 4 + src/modules/db_postgres/CMakeLists.txt | 4 + src/modules/db_redis/CMakeLists.txt | 26 +- src/modules/db_redis/redis_dbase.c | 2 +- src/modules/db_sqlite/CMakeLists.txt | 4 + src/modules/db_text/CMakeLists.txt | 10 + src/modules/dialog/dialog.c | 24 + src/modules/dialog/dlg_db_handler.c | 33 +- src/modules/dialog/dlg_hash.h | 3 + src/modules/dialog/dlg_req_within.c | 4 +- src/modules/dispatcher/README | 29 +- src/modules/dispatcher/dispatch.c | 6 +- src/modules/dispatcher/dispatch.h | 2 +- src/modules/dispatcher/dispatcher.c | 4 +- src/modules/dispatcher/doc/dispatcher.cfg | 2 +- .../dispatcher/doc/dispatcher_admin.xml | 14 +- src/modules/dmq/dmq_funcs.c | 12 +- src/modules/dmq/notification_peer.c | 6 + src/modules/dnssec/CMakeLists.txt | 7 +- src/modules/gcrypt/CMakeLists.txt | 35 +- src/modules/ims_ipsec_pcscf/sec_agree.c | 48 +- src/modules/ims_qos_npn/rx_aar.c | 10 +- .../ims_registrar_scscf/registrar_notify.c | 7 + .../ims_usrloc_scscf/contact_dlg_handlers.c | 80 +- src/modules/ims_usrloc_scscf/impurecord.c | 7 + src/modules/json/json_mod.c | 11 +- src/modules/json/json_trans.c | 39 +- src/modules/kazoo/CMakeLists.txt | 7 +- src/modules/lrkproxy/lrkproxy.c | 12 +- src/modules/ndb_redis/CMakeLists.txt | 24 +- src/modules/nghttp2/CMakeLists.txt | 5 +- src/modules/nsq/CMakeLists.txt | 5 +- src/modules/phonenum/CMakeLists.txt | 16 +- src/modules/rabbitmq/CMakeLists.txt | 3 +- src/modules/rr/rr_mod.c | 6 +- src/modules/rtp_media_server/CMakeLists.txt | 21 +- src/modules/rtpengine/README | 1074 +++++------ src/modules/rtpengine/doc/rtpengine_admin.xml | 25 +- src/modules/rtpengine/rtpengine.c | 13 +- src/modules/ruxc/CMakeLists.txt | 3 +- src/modules/sctp/CMakeLists.txt | 6 +- src/modules/secsipid_proc/CMakeLists.txt | 3 +- src/modules/sms/libsms_getsms.c | 12 +- src/modules/snmpstats/CMakeLists.txt | 6 +- src/modules/statsd/README | 157 +- src/modules/statsd/doc/statsd_admin.xml | 216 ++- src/modules/stun/kam_stun.c | 2 +- src/modules/sworker/README | 8 +- src/modules/sworker/doc/sworker_admin.xml | 4 +- src/modules/timer/doc/timer.xml | 270 +-- src/modules/timer/doc/timer_admin.xml | 281 +++ src/modules/tls/CMakeLists.txt | 29 +- src/modules/tlsa/CMakeLists.txt | 11 +- src/modules/tm/CMakeLists.txt | 4 +- src/modules/tm/h_table.c | 6 +- src/modules/tm/t_msgbuilder.c | 4 +- src/modules/tm/uac.c | 16 +- src/modules/topoh/th_msg.c | 2 +- src/modules/topos/tps_msg.c | 9 +- src/modules/topos/tps_storage.h | 2 +- src/modules/topos_redis/CMakeLists.txt | 6 +- src/modules/tsilo/CMakeLists.txt | 4 +- src/modules/uac/replace.c | 4 +- src/modules/uac/uac.c | 1 + src/modules/xhttp_pi/CMakeLists.txt | 8 +- src/modules/xhttp_prom/prom.c | 13 +- src/modules/xhttp_rpc/xhttp_rpc.c | 6 +- utils/CMakeLists.txt | 6 +- utils/db_berkeley/CMakeLists.txt | 4 +- utils/kamcmd/CMakeLists.txt | 39 +- utils/kamctl/CMakeLists.txt | 343 +--- utils/kamctl/generate_version_create_mongo.sh | 18 + utils/kamctl/kamctlrc | 5 +- 318 files changed, 6540 insertions(+), 3195 deletions(-) create mode 100644 cmake/db_files.cmake create mode 100755 cmake/dbschema-version-postprocess.sh create mode 100644 cmake/dbschema.cmake create mode 100644 cmake/deb-packaging.cmake rename doc/stylesheets/dbschema_k/xsl/{mongodb.xsl => db_mongodb.xsl} (100%) rename doc/stylesheets/dbschema_k/xsl/{mysql.xsl => db_mysql.xsl} (100%) rename doc/stylesheets/dbschema_k/xsl/{oracle.xsl => db_oracle.xsl} (100%) rename doc/stylesheets/dbschema_k/xsl/{postgres.xsl => db_postgres.xsl} (100%) rename doc/stylesheets/dbschema_k/xsl/{dbtext.xsl => db_text.xsl} (100%) create mode 100644 pkg/kamailio/alpine/APKBUILD-kamailio delete mode 100644 pkg/kamailio/deb/sid/kamailio-berkeley-bin.dirs create mode 100644 pkg/kamailio/obs/kamailio-local.cfg create mode 100644 pkg/kamailio/obs/kamailio.preset create mode 100644 pkg/kamailio/obs/kamailio.sysusers delete mode 100644 pkg/kamailio/obs/meta delete mode 100644 pkg/kamailio/obs/prjconf create mode 100644 src/modules/timer/doc/timer_admin.xml create mode 100644 utils/kamctl/generate_version_create_mongo.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index cf2485bc7..5a1c1021d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,16 +1,29 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.13) # Use cmake -DCMAKE_SYSTEM_NAME .. for cross-compiling (inside build directory) # Set the project name project( kamailio - VERSION 6.0.3 + VERSION 6.0.5 DESCRIPTION "Kamailio SIP Server" - HOMEPAGE_URL "https://www.kamailio.org") + HOMEPAGE_URL "https://www.kamailio.org" +) + +# ---- Include guards ---- + +if(PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR) + message( + FATAL_ERROR + "In-source builds not allowed. Please make a new directory (called a build directory) \ +and run CMake again accordingly." + ) +endif() + +# ---- Project settings ---- # Set the version number -set(EXTRAVERSION "-rc0") +set(EXTRAVERSION "") set(RELEASE "${PROJECT_VERSION}${EXTRAVERSION}") message(STATUS "PROJECT_VERSION: ${PROJECT_VERSION}") @@ -41,12 +54,14 @@ include(${CMAKE_SOURCE_DIR}/cmake/BuildType.cmake) # main binary name set(MAIN_NAME "kamailio" - CACHE STRING "Main binary name") + CACHE STRING "Main binary name" +) # use kamailio config set(CFG_NAME "kamailio" - CACHE STRING "Config name") + CACHE STRING "Config name" +) include(GNUInstallDirs) include(${CMAKE_SOURCE_DIR}/cmake/defs.cmake) @@ -59,23 +74,27 @@ add_subdirectory(src) add_subdirectory(utils/kamctl) add_subdirectory(utils/kamcmd) -# TODO: Packaging stuuf. These should be on different file propably -set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) -set(CPACK_PACKAGE_NAME kamailio) -set(CPACK_GENERATOR DEB) -set(CPACK_DEBIAN_PACKAGE_MAINTAINER "test") +# ---------- +# Db schema files +# Include it here due to calling a script where we need the base binary dir +# and scirpts are using {CMAKE_BINARY_DIR} from where they where first included. +include(${CMAKE_SOURCE_DIR}/cmake/dbschema.cmake) -include(CPack) +# ---------- +# Packaging +# ---------- +include(${CMAKE_SOURCE_DIR}/cmake/deb-packaging.cmake) # Add uninstall target if(NOT TARGET uninstall) configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake-uninstall.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake-uninstall.cmake" IMMEDIATE @ONLY) + "${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake-uninstall.cmake" IMMEDIATE @ONLY + ) add_custom_target( uninstall - COMMAND ${CMAKE_COMMAND} -P - ${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake-uninstall.cmake - COMMENT "Uninstalling") + COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake-uninstall.cmake + COMMENT "Uninstalling ${PROJECT_NAME}-${PROJECT_VERSION} from ${CMAKE_INSTALL_PREFIX}" + ) endif() diff --git a/ChangeLog b/ChangeLog index b37607b4b..e46175171 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,1586 @@ +===================== 2026-01-08 Version 6.0.5 Released ===================== + +===================== Changes Since Version 6.0.4 =========================== + +commit 438c10a6859aaa3865a0b229ab6d40402ebf1b7b +Author: Daniel-Constantin Mierla +Date: Thu Jan 8 09:17:32 2026 +0100 + + CMakeLists.txt: version set to 6.0.5 + +commit 857fa6e72f3bf7e146c3817382fb5a7eee637613 +Author: Daniel-Constantin Mierla +Date: Thu Jan 8 09:15:04 2026 +0100 + + Makefile.defs: version set to 6.0.5 + +commit 1549d7e8462f754a189f92bc905e387b641ebd25 +Author: Daniel-Constantin Mierla +Date: Thu Jan 8 09:10:22 2026 +0100 + + pkg/kamailio/deb: version set 6.0.5 + +commit 566fdcb4a444aad691ebe13ea3f03e1b8183c38d +Author: Daniel-Constantin Mierla +Date: Thu Jan 8 09:08:59 2026 +0100 + + pkg/kamailio: version set 6.0.5 for rpms and alpine + +commit 048e318881087fa6ba2bf25f0410b447203a0a00 +Author: Daniel-Constantin Mierla +Date: Tue Jan 6 17:02:23 2026 +0100 + + core: tcp - enable defining TCP_LISTEN_BACKLOG with compile options + + (cherry picked from commit 45a0e30f845d423474370cc5a46c851c2ba369ec) + +commit 27eb9f11da82d5a58137bb3ed2b0f05970a298f8 +Author: Daniel-Constantin Mierla +Date: Tue Jan 6 09:07:55 2026 +0100 + + stun: send response without triggering message-out callbacks + + (cherry picked from commit 6d1fe099e284514be05a56f235dcd3ce2325fa67) + +commit 28686b3561e5612f0b3e4ae86f7573747a06559d +Author: Matteo Brancaleoni +Date: Tue Dec 23 14:46:22 2025 +0100 + + dmq: Fix DNS resolution corruption when search list is used + + When `dns_use_search_list=1` (the default), `get_record()` may prepend a "fake CNAME" record to map short hostnames to their expanded form. + + (cherry picked from commit 787bbe5c91e9fc02f741fdd26b06ccad87b4c19e) + +commit 6413ceac061fc8cef59802128fa7b3cc43938144 +Author: Sergey Safarov +Date: Fri Nov 14 16:01:07 2025 +0200 + + pkg/kamailio: kamailio should listen on loopback only by default + + fixes GH#4428 + + (cherry picked from commit 4570fe3550d1c16bfa82999371f1f54c3e36c96e) + +commit 3b714261419f529ab086c5dee22fe98ef9c7ae2f +Author: Sergey Safarov +Date: Fri Nov 14 17:23:05 2025 +0200 + + pkg/kamailio: refactor kamailio user creation for rpm dists + + (cherry picked from commit 0f7a2fcab9dea8a3bc60bdfa3115c82bad81f112) + +commit c42fb5b9bd4efd2db240c97a6c7044701696098c +Author: Sergey Safarov +Date: Fri Nov 14 14:55:18 2025 +0200 + + pkg/kamailio: fixed systemd unit file inititlization + + (cherry picked from commit e221ef539d16570840f004c397909441bac58cce) + +commit 92ac628ecca55019fbe442de05ed25bc90ae4b05 +Author: Sergey Safarov +Date: Tue Aug 12 21:33:13 2025 +0300 + + github: added alma-10 and rocky-10 packaging + + (cherry picked from commit 7e357abd051a968d0454b24e369b15bfb3a9dd55) + +commit ed6084a5e4b9fcf2b58b4436adf1a607930515f3 +Author: Kamailio Dev +Date: Mon Jan 5 09:31:18 2026 +0100 + + modules: readme files regenerated - modules ... [skip ci] + +commit dee536cdc73e9d1b9ce494562fb1cd3d92cb6155 +Author: Daniel-Constantin Mierla +Date: Fri Jan 2 11:55:58 2026 +0100 + + topos: increase size for data buffer + + (cherry picked from commit d7d6444b3936390e1d977d72dcaa10197c87b87e) + +commit 3bc7431d77c5795f58e475087976ee9e3f7d563e +Author: Daniel-Constantin Mierla +Date: Mon Dec 22 12:08:57 2025 +0100 + + tm: safety check for EoL in user-agent parameter + + (cherry picked from commit 7eea4bc836bd14c7341d77e8cdde8a473ce2eef2) + +commit f3e400533b2f26a6efec50a6714ea3b7c09e9d3f +Author: Daniel-Constantin Mierla +Date: Mon Dec 22 11:47:28 2025 +0100 + + dmq: check the result of printing headers + + (cherry picked from commit 1ad4f802a4827bbfa0b132e6a21146bbb22a3f84) + +commit e87e6488335f4610b78469977a999851d96829b5 +Author: Daniel-Constantin Mierla +Date: Thu Dec 18 09:54:43 2025 +0100 + + sms: check for name field length + + (cherry picked from commit 6118e5b654e7344bf68ca0b77f4f39567980e0ef) + +commit 05291db0c314c1b97a5e9bb3ae20f51375d72a3e +Author: Daniel-Constantin Mierla +Date: Tue Dec 16 08:50:08 2025 +0100 + + timer: docs - organized files for indexing + + (cherry picked from commit bc14bb405c3cd855a525f1fd7742709051a95d40) + +commit d5ceccd0e6d72001ba93071b0bdacf8f6b0736ed +Author: Daniel-Constantin Mierla +Date: Fri Dec 12 15:40:16 2025 +0100 + + tm: rename parameter that hides a global + + (cherry picked from commit bb604e272dd034abfc0fe8dcbdfc0102cbbc8a40) + +commit 9ab4d1715769a4d9246041edf24bd494e86d5996 +Author: Daniel-Constantin Mierla +Date: Wed Dec 10 09:58:37 2025 +0100 + + json: use formatted string evaluation instead of fixup mechanism for transformation + + (cherry picked from commit a0d3183dda3d7af695deb6aba0798cd860cdde2e) + +commit ae611e7b5232e606ebb3b6b27b35af9bb451a926 +Author: Daniel-Constantin Mierla +Date: Wed Dec 10 09:38:54 2025 +0100 + + json: do not parse transformation parameter for vars if none there + + (cherry picked from commit 42014a3384c76575a96e1b4fe2ba524a503e845a) + +commit 0c0e68cfdfd9803d183e17100c0f0be05d62b20e +Author: Daniel-Constantin Mierla +Date: Wed Dec 10 09:38:05 2025 +0100 + + core: ut - helper functions to search in string + + (cherry picked from commit 5c7accbde8423072d5f3d6620115a588d8678294) + +commit eba11b333d215d00d1b0ea0cd1597b5b4efabdae +Author: Daniel-Constantin Mierla +Date: Tue Dec 9 11:49:53 2025 +0100 + + db_redis: use set max fetch for result to 1000 when *keys_count == 1000 + + - GH #4511 + + (cherry picked from commit 46737c269ae290c29639ab1a5e66e4cf1637556e) + +commit 5f8f8cc4fb4eeda5cf3a65d5cdc2e8a20e045db4 +Author: Daniel-Constantin Mierla +Date: Mon Dec 8 17:25:28 2025 +0100 + + json: reformatted exported structures + + (cherry picked from commit 9233834b4dd3ac51348b781629c84f4c6fe1aad3) + +commit c8df44342534f08be357e7be24f13e88bce282a5 +Author: Daniel-Constantin Mierla +Date: Thu Dec 4 08:06:59 2025 +0100 + + core: parser/sdp - rename local variable to be different than function name + + (cherry picked from commit b225469a49db1324ef67a630ad9bcd4a7f3f53ed) + +commit 00b8ecf25b647264ac9d5efe68928ced80e152b0 +Author: Daniel-Constantin Mierla +Date: Tue Dec 2 13:53:12 2025 +0100 + + topoh: meaningful debug message + + (cherry picked from commit adc6c53411e572a8f77efffa06ce3e7b5ed02764) + +commit cfbefe330d8f60f49bb79b5a6ecfc6c28ba1a965 +Author: Daniel-Constantin Mierla +Date: Tue Dec 2 09:11:21 2025 +0100 + + kamctl: remove CTLENGINE from kamctlrc - it has a single value option + + (cherry picked from commit 6c03c3e78b76a6b664c65c90c8681a2db62e1df7) + +commit 8450b807950cd0b07b6d41020397b5dac8ea2458 +Author: Daniel-Constantin Mierla +Date: Sun Nov 30 20:27:48 2025 +0100 + + benchmark: docs updated about measurment working inside process context + + (cherry picked from commit d4915b129cc3262a822d53e96b5f52df7b9b23fc) + +commit e7597d8478c74cefc22c59f39e886f77c0699dae +Author: Fredrik Dahlgren +Date: Mon Dec 1 08:34:39 2025 +0100 + + statsd: Added missing documentation to statsd module [skip ci] + + - Document already existing features in the statsd module and update the description of the module to clarify that it is more generic than previously implied. + + (cherry picked from commit 303b0bc2ad80f3664c38aad74fd67e6577db8751) + +commit 53fe35cf9e5276bfb96b210e0b40f2a92b1e7943 +Author: Torrey Searle +Date: Mon Dec 1 09:49:55 2025 +0100 + + topos: make tps parameter lookup more robust + + check both params and sip_params for the tps parameter, this is needed + in case extra parameters added to the URI. + + closes #4505 + + (cherry picked from commit ede3912a732f99cada994157885328eef268f89b) + +commit 90a00cebf84bccd5a7c5b2a9dc37476aa5be2a54 +Author: Daniel-Constantin Mierla +Date: Thu Nov 27 19:19:08 2025 +0100 + + tm: small code formatting and clarity + + (cherry picked from commit bb0bb49a30b7732eea8785ce7b7f02bbf512ef74) + +commit 5fd4b275f0948621771ad05503fc9225f9e2243a +Author: Ovidiu Sas +Date: Tue Dec 30 01:22:00 2025 -0500 + + xhttp_prom: fix attributes for pkgmem_total_size + + (cherry picked from commit cbffe7b868e8b450293c2977b3ef1df61d6bf1bc) + +commit 68cccf5f3b3c640ee5926cec497ca21e80a387d9 +Author: Xenofon Karamanos +Date: Thu Dec 18 15:32:43 2025 +0000 + + cmake: Adopt sed commands for ctl and db files + + - Move dir defintions to defs.cmake for visibility from other modules + - Add missing replacements in sed command + + (cherry picked from commit 8f912d2d3d748cc1cd95a38b951910a5f4848cf9) + +commit 2a9078378dc885a10f7b7a1471b4334b7d27001b +Author: Joel Serrano +Date: Thu Dec 11 14:03:28 2025 -0800 + + xhttp_prom: don't sanitize tag values in exported metrics (#4519) + + Fixes #4508 + + (cherry picked from commit 02f7ace19b49a16ccacc7d83f4717f6492ff56fa) + +commit e33380895bee40ccf02a27e8a25b9e94a4801563 +Author: Xenofon Karamanos +Date: Wed Dec 3 11:09:09 2025 +0000 + + core: Add input validation on internal functions + + - base64url_enc + - base64url_dec + + (cherry picked from commit d7210bc1102ae820f9e6f8998694271ac2a320fe) + +commit aec01495a7e24c096d1a0a8fd92a8426a2d1a8b7 +Author: Daniel-Constantin Mierla +Date: Thu Dec 4 07:49:04 2025 +0100 + + core: parser/sdp - copy data after structure when cloning ice attr and opt + + (cherry picked from commit 37c78454408043e5d285cbc82681f9e2cc634cf5) + +commit 94882113464866cb16166a7e648b3ae938917c65 +Author: Daniel-Constantin Mierla +Date: Wed Nov 26 20:43:25 2025 +0100 + + auth: use AUTH_FLAG_NOINVNC flag + + (cherry picked from commit 9dc160d1d2bdf0542d3d9d8ae090bb1352520a1c) + +commit 244caf8c20ee61312b31aaa912529785e929c766 +Author: Daniel-Constantin Mierla +Date: Sun Nov 23 11:38:07 2025 +0100 + + auth: add defines for authenticate flags + + (cherry picked from commit cd88ca4bb64a8d44e2ea9f73be53b24d3b3a93fa) + +commit de337ed3c2ff50bf095b7179968fe7e73d83b62e +Author: Daniel-Constantin Mierla +Date: Sun Nov 23 11:21:04 2025 +0100 + + auth_db: init variable and set the result header later + + (cherry picked from commit c2e62cd2dfb0c9969f7e410020fa3a39f343d608) + +commit 317ed98d592de0230d84730652b7be5774046c12 +Author: Daniel-Constantin Mierla +Date: Sun Nov 23 11:19:06 2025 +0100 + + auth: init variable + + (cherry picked from commit 6d99a650cb79ec5551bb1af29132be9e9c7c555b) + +commit 72b213ce1442234475bed8ce59c002316c3a14cf +Author: Daniel-Constantin Mierla +Date: Sun Nov 23 09:18:48 2025 +0100 + + auth: propagate auth header via pv_authenticate() + + (cherry picked from commit aa14327b826ac3dfa348c33fe1e9d354cdd855af) + +commit 4b1176a2d174941ccf2124dd893a6063493db83d +Author: Daniel-Constantin Mierla +Date: Wed Nov 19 12:25:57 2025 +0100 + + core: parser/digest - more details on parsing failure + + (cherry picked from commit a07a360a5726350d4d28134e9d407364bb7e9386) + +commit ccfeed9bff2dae8a68838343c3d966e2d6338dd1 +Author: Daniel-Constantin Mierla +Date: Sun Nov 16 21:41:24 2025 +0100 + + rr: return $null on header not found for $route_uri + + (cherry picked from commit 09a0a1a0b44f996d9ae5d0a8fea390aa2dbe7d11) + +commit 0fe2f9d9da4d98d245b30c83eb3cb5ae7b9e0cd3 +Author: Daniel-Constantin Mierla +Date: Sat Nov 15 20:28:16 2025 +0100 + + ims_qos_npn: init variables for add_media_components() + + (cherry picked from commit 26036ca9a269ca97b30d86e103c512a1ef647886) + +commit ec164166ec1c70d85a7e979c24777541083ccba0 +Author: Daniel-Constantin Mierla +Date: Fri Nov 14 09:28:43 2025 +0100 + + uac: avp_flags_t for exter declaration of restore avp type vars + + (cherry picked from commit 2227c53615c807d0de547b1fdcaa399ff95c890c) + +commit 1294c2759f3e48031eed22bab447084ede4664d0 +Author: Daniel-Constantin Mierla +Date: Thu Nov 13 10:19:58 2025 +0100 + + auth_radius: cast value for log message + + (cherry picked from commit 772edab45c2ad04dda90f94b7e5535df857b5322) + +commit aacea30d56b50b32097e584f44e7cca46bef7b6a +Author: Daniel-Constantin Mierla +Date: Wed Nov 12 16:47:55 2025 +0100 + + uac: update cfg framework before sending the first uac registrations + + - GH #4356 + + (cherry picked from commit 270a57b4e605ce9a2734108f0244993ada774829) + +commit 53091debc027d71a38ccad9adfc9fe35ac22da62 +Author: Daniel-Constantin Mierla +Date: Wed Nov 12 16:36:11 2025 +0100 + + core: tcp - decrease busy field if sending to child fails + + - GH #4437 + + (cherry picked from commit 52f9a57e1a4a817b7ad0c05b3673daaf8458bc92) + +commit 43ec53e90e8c73ff68f4ecddd2632b44082b017b +Author: Daniel-Constantin Mierla +Date: Wed Nov 12 15:33:29 2025 +0100 + + lrkproxy: use strcat() instead of strncat() with strlen() + + - GH #4440 + + (cherry picked from commit 1f02e0a90ae0d463b8843c9d72aaf58a068ce02a) + +commit 5f150a910707f6fe29250eba3b06244c77732a89 +Author: Xenofon Karamanos +Date: Fri Nov 7 17:22:37 2025 +0000 + + lib: dbschema: Update xml file to use the db_* namings + + (cherry picked from commit c749c902a5e9f04a73ec36685de37734bf02f013) + +commit d4b3cf36069700ac4d1f24abbd663c388228bc5e +Author: Sergey Safarov +Date: Sat Oct 11 17:25:08 2025 +0300 + + github: fixed build for Alpine linux/386 platform + + (cherry picked from commit c7f7966181b3b8c9f629f9217612342125d588ff) + +commit bfadcd65aa6d7881a328dad1ebeaf173a9f98e35 +Author: Sergey Safarov +Date: Tue Sep 30 14:35:13 2025 +0300 + + github: fixed base alpine image + + (cherry picked from commit e357d9b055eac4153e9c0044bc75399eaa410aef) + +commit dc45e78266420fba12a8b2d30ff5b4cee8ac2b59 +Author: Sergey Safarov +Date: Sat Oct 11 13:16:16 2025 +0300 + + pkg/kamailio: alpine packaging customisation + + (cherry picked from commit 371972f260f57d4e3db818622ad046108928edb6) + +commit 28dfa0c3735867daf58c709ebf63973daa5f52ce +Author: Sergey Safarov +Date: Mon Sep 22 15:39:27 2025 +0300 + + pkg/kamailio: updated Alpine packaging rules + + (cherry picked from commit 5ae620031e487df487af1af0e398e4ebda513edd) + +commit e99748b15cdf12466beeb72acac2178c9208cb65 +Author: Sergey Safarov +Date: Sat Oct 11 14:50:17 2025 +0300 + + pkg/kamailio: apk build updated make instructions + + (cherry picked from commit dbcca2ee95227bd62c1fbdd11ae0bbbe2248cde8) + +commit ebcc3c3929025b4d1bacd321ec8f496952fe5f11 +Author: Sergey Safarov +Date: Sun Oct 19 13:53:58 2025 +0300 + + pkg/kamailio: added cmake to the build deps for rpm spec + + (cherry picked from commit 090a394462abe47f0d8e798bee86b1232407b64b) + +commit 70d0795d3dfb4016a5d2758b7a36303968bccafb +Author: Sergey Safarov +Date: Sun Oct 19 13:52:43 2025 +0300 + + pkg/kamailio: rpm packaged mqtt module + + (cherry picked from commit bf36942960307d761919a29b3ed192c59fb94332) + +commit 842da6877f78415293dc282e189a8e792f521b01 +Author: Sergey Safarov +Date: Sun Oct 19 13:43:27 2025 +0300 + + pkg/kamailio: rpm packaged nghttp2 module + + (cherry picked from commit 451b58b7f0d78c5d2e57b59b03a54ae082c41332) + +commit d7540b9c10180907d655041f4aeb195aa6582ca3 +Author: Sergey Safarov +Date: Sun Oct 19 13:36:10 2025 +0300 + + pkg/kamailio: rpm packaged gcrypt module + + (cherry picked from commit 2bd5d4e869a0fbe398541e0e695f7c3bbc3c481f) + +commit db78b600e069c8ef01b8c13f4fdb1945baeb007e +Author: Sergey Safarov +Date: Sun Oct 19 13:29:21 2025 +0300 + + pkg/kamailio: rpm packaged kafka module + + (cherry picked from commit 29ed29a209a3af6a1c33295901724ce657b94249) + +commit b10d7d492707d724a17742343c50987fbe98199f +Author: Sergey Safarov +Date: Sat Aug 16 18:10:32 2025 +0300 + + pkg/kamailio: rpm packaging cleanup [skip ci] + + (cherry picked from commit d9108421d5227d22110eedd2ebe97b7e61e8ac0a) + +commit 6752fefd9f607cb8cba2563db7657a4b01c7bff7 +Author: Sergey Safarov +Date: Fri Jan 24 17:20:59 2025 +0200 + + pkg/kamailio: switched RPM packaging to use cmake + + (cherry picked from commit 9a1b9d08a112745663f37f0dfcbe86a741486da3) + +commit 3fe34725fb9961a0bdf365389fbcb8ef41573885 +Author: Xenofon Karamanos +Date: Wed Nov 5 17:04:29 2025 +0000 + + gcrypt: cmake: Fallback to libgcrypt-config for older distributions + + - If no .pc installed, use the libgcrypt-config executable to find the libraries + + (cherry picked from commit 6a666575765373ee3c8d1daeee580bf50e28b1ff) + +commit 34614ff3cfadfe999fdc2815d47dec434bfb69b3 +Author: Richard Fuchs +Date: Thu Nov 6 10:22:53 2025 -0400 + + rtpengine: always set "flags" + + Processing a trickle ICE SDP fragment requires the "flags" list to be + present, regardless of how other flags are being processed or if other + flags are even set at all. Create the "flags" list unconditionally as + it's a cheap operation and eliminates a few case distinctions in the + code. + + (cherry picked from commit 2cd13758f172976c91fa814712e11ccb00a22397) + + +===================== 2025-11-06 Version 6.0.4 Released ===================== + +===================== Changes Since Version 6.0.3 =========================== + +commit 457cfe43b6cf60497e730f2064988c1729b40434 +Author: Daniel-Constantin Mierla +Date: Thu Nov 6 09:17:01 2025 +0100 + + pkg/kamailio: version set 6.0.4 for rpms and alpine + +commit 28bcf795484d36a84cf52906674c4a35e7d850f5 +Author: Daniel-Constantin Mierla +Date: Thu Nov 6 07:36:59 2025 +0100 + + Makefile.defs: version set to 6.0.4 + +commit 0f56a4378adcca1de23d8a23610869651f87cfd3 +Author: Daniel-Constantin Mierla +Date: Thu Nov 6 07:36:35 2025 +0100 + + CMakeLists.txt: version set to 6.0.4 + +commit c0a10988fd462852865463c244c556dd796ced3b +Author: Victor Seva +Date: Thu Nov 6 08:33:39 2025 +0100 + + pkg/kamailio/deb: version set 6.0.4 + +commit ad52fc16f3b625577dac06e21f5d91a0b54f036b +Author: Victor Seva +Date: Tue Oct 14 08:52:57 2025 +0200 + + pkg/kamailio/deb: remove berkeley modules from sid [skip ci] + + db5.3 is going away https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1117120 + + > db5.3 underwent a license change upstream, and thus newer versions + > are unsuitable for Debian + + (cherry picked from commit cc4c036efa2bb1c468fff2101de9914ca0ef5580) + +commit 7f54e36191d08c929bfba5f3af130bf60b09c3ba +Author: Mikko Lehto +Date: Thu Sep 18 12:13:13 2025 +0300 + + pkg/kamailio/deb: Update changed module path in copyright statement + + Module malloc_test is renamed to misctest. + Warning by lintian check "superfluous-file-pattern". + + (cherry picked from commit 6ecbde0455699548d8a538b30df6ade8a485ddcd) + +commit 082e3ac9a16d395b1d818d0d6acf15b19c20b488 +Author: Mikko Lehto +Date: Thu Sep 18 12:13:13 2025 +0300 + + pkg/kamailio/deb: Remove obsolete reference in copyright statement + + Memory manager "shm_mem" was removed in 2018. + Warning by lintian check "superfluous-file-pattern". + + (cherry picked from commit 364b371d75faff61acfa6cc621a82cf689356e81) + +commit 215b1f667036d7ce8734842d16ab24635fdf4ad5 +Author: Mikko Lehto +Date: Thu Sep 18 12:13:13 2025 +0300 + + pkg/kamailio/deb: Update changed file path in copyright statement + + s!lib/srutils!core/utils! + Warning by lintian check "superfluous-file-pattern". + + (cherry picked from commit e449840baf1112a7ca4f264153c7c0bc10bb3414) + +commit 0337a47af30609c1fc8ebe0a0ba002f9cb705b83 +Author: Mikko Lehto +Date: Thu Sep 18 12:13:13 2025 +0300 + + pkg/kamailio/deb: Fix incorrect file path in copyright statement + + s/code/core/ + Warning by lintian check "superfluous-file-pattern". + + (cherry picked from commit a1581421685914c6f732a938cc11350cb909784b) + +commit f3dd68d2f8795937f9cb6d68bdac692e72a0429e +Author: Mikko Lehto +Date: Thu Sep 18 12:13:13 2025 +0300 + + pkg/kamailio/deb: Adjust named license in copyright statement + + Adjust license name in License -field. + Warning by lintian check "space-in-std-shortname-in-dep5-copyright". + + (cherry picked from commit 857cb1af73b3ff84de50d200a369ae9488478b0d) + +commit b6dc1b185e48b49ddd3e9a2af5efed4b6174dc50 +Author: Kamailio Dev +Date: Mon Nov 3 10:46:18 2025 +0100 + + modules: readme files regenerated - modules ... [skip ci] + +commit 2f0b14803e8c60f3f617b8c26f491044fe82abc6 +Author: Daniel-Constantin Mierla +Date: Wed Oct 8 09:19:22 2025 +0200 + + auth: export wrappers to the functions to calcupate HA1 and response + + - the function pointers can change based on the hashing algorithm + + (cherry picked from commit 3c16b81a363b15116ef1f3a480f1184fd2eb3d14) + +commit 296c5766c87d8d23cc0d86102951f427b01fe762 +Author: Daniel-Constantin Mierla +Date: Mon Oct 6 15:05:57 2025 +0200 + + sms: handle case of unsupported length + + - GH #4413 + + (cherry picked from commit 42b24debb47edfef9229ada6fc7fafe293f530a9) + +commit 461dc36494711ed3b8db39e4eef7ce82340900a5 +Author: Daniel-Constantin Mierla +Date: Mon Sep 29 14:40:19 2025 +0200 + + tm: clean up locally parsed headers in onsend route + + - GH #4399 + + (cherry picked from commit e9d143f7890cae3c629c82df2c281d528d1499d9) + +commit cf1c796c549616e84bfb9eb84e793ee1ce9f693e +Author: Daniel-Constantin Mierla +Date: Mon Sep 29 09:43:39 2025 +0200 + + core: parser - rework parsing From body on getting headers + + - reuse code for parsing To-body header on getting headers + + (cherry picked from commit 7ddba9d07a938299cb50f6dde354d8f691c307cf) + +commit c2dae566a61bca1e828c13ae30330b06b4c929f7 +Author: Daniel-Constantin Mierla +Date: Sun Sep 28 09:02:21 2025 +0200 + + core: parse - parse from body on first iteration + + (cherry picked from commit 4fef850efb73aa063ae4f920e0f86f2bf085956c) + +commit 316610383101db55742dc85dc5b6cda3a648f97f +Author: Lyubomir Yatanski +Date: Sat Sep 27 14:34:37 2025 +0300 + + core parser: fix after 316ea8925edd0c401c121e9dc0f21dde3a2c6598 + + > Error: core/parser/msg_parser.c:423:9: error: call to undeclared function 'parse_from_header'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] + > 423 | if(parse_from_header(msg) < 0) { + > | ^ + > core/parser/msg_parser.c:423:9: note: did you mean 'parse_to_header'? + > core/parser/parse_to.h:48:5: note: 'parse_to_header' declared here + > 48 | int parse_to_header(struct sip_msg *const msg); + > | ^ + > 1 error generated. + + (cherry picked from commit d8715c16fb79365a26fb75990565be4fea701ae6) + +commit d4d9b1b6be3baf6374def56d5e6bc189988e7469 +Author: Daniel-Constantin Mierla +Date: Fri Sep 26 11:25:21 2025 +0200 + + core: parser - parse From header on initial headers parsing + + (cherry picked from commit 316ea8925edd0c401c121e9dc0f21dde3a2c6598) + +commit e359c100cbf0f18b2cb3eb049a54d43c24132d21 +Author: Daniel-Constantin Mierla +Date: Thu Sep 25 12:31:38 2025 +0200 + + dialog: try sending bye to callee no matter of the return code for caller + + - GH #4404 + + (cherry picked from commit 25fa214154ede1907b20b0bf3d6c8e2ed8055512) + +commit 60dc2c93359b3e0baaa200b524e2b518ce628a20 +Author: dmsf100 +Date: Sat Aug 9 18:28:57 2025 +0100 + + dialog: fix sflags database persistence for dlg_setflag/dlg_resetflag + + Dialog script flags (sflags) were not being saved to database when + dlg_setflag() or dlg_resetflag() functions were called. The functions + updated flags in memory but didn't trigger database updates. + + - Add DLG_FLAG_CHANGED_SFLAGS flag to track sflags changes + - Trigger immediate DB updates in realtime mode + - Support delayed and shutdown database modes + - Fix database update parameters to target sflags column correctly + + (cherry picked from commit 9dcba806093ef48962379a64770c2b71b8b74232) + +commit 9b0e8116e37cde82f1017d964dd57fa564e7f788 +Author: Tim Anderson +Date: Thu Aug 7 12:37:59 2025 +1000 + + xhttp_rpc: add handling of null strings in `print_value` + + - reported by GH #4351 + + (cherry picked from commit b32894f85485ba5cc9b4f4fa9cb706144e70d0e7) + +commit 548649a236dc5177cf9d2941856bfe380f5394b8 +Author: Mikko Lehto +Date: Mon Jul 3 07:23:34 2017 +0300 + + dispatcher: fix typo in documentation and code comments + + (cherry picked from commit 46ee44af4f1d9ae4fccc6178142ca602ef689943) + +commit 392f02f85127b93e5f21d50aac70283dc5c943ec +Author: Mikko Lehto +Date: Mon Jul 3 07:23:34 2017 +0300 + + core: socket_info - fix typo in log message + + (cherry picked from commit ef53fdeb33a6158801c52f522a1398abd3777324) + +commit 78e65311ffcdec1f6c7149ff80fa454cb3132654 +Author: Mikko Lehto +Date: Sat Apr 20 18:42:07 2024 +0300 + + sworker: fix function name in documentation + + (cherry picked from commit bf8a605bbf843d184c1f4d94bb7e1bf6697ef0d2) + +commit 697572e40c783ed9537b17fd290c88a5c31e7105 +Author: Henning Westerholt +Date: Wed Sep 10 13:21:52 2025 +0000 + + dispatcher: show link in README file as well + + (cherry picked from commit 616c4c77db531feaf0ce3ea13962b9bb41bf2160) + +commit c748b55c0c8db016ce24a811534106a2e26edc3a +Author: Henning Westerholt +Date: Wed Sep 10 12:18:58 2025 +0000 + + dispatcher: add link to algorithm definition to main section + + (cherry picked from commit 0933cb319aa2e114b35cfac8383dd88855125b83) + +commit aba4d8149836264224bc0b6f371db524314443ea +Author: Julien Chavanton +Date: Tue Sep 9 13:45:56 2025 -0400 + + dispatcher: update the default value and docs of ds_latency_estimator_alpha + + This is to match the recent adjustement made in "dispatcher: fix ds_latency_estimator_alpha meaning" + + (cherry picked from commit 02c0e0b1b0f84754c468e97ae7f2c09e7c13e8ee) + +commit aded821760d2b0be1e4fadb97d79fa163ebbc52e +Author: Michael Furmur +Date: Mon Aug 11 12:24:08 2025 +0300 + + dispatcher: fix ds_latency_estimator_alpha meaning + + swap 'latency' and 'latency_stats->estimate' in the EWMA formula + to ensure ds_latency_estimator_alpha rates new values over the old average estimate + + (cherry picked from commit d789b6c1fec4cd1743a51c87b8f01af7ddee03d7) + +commit 6949f6970786d737daa88b05b014725ba81147f5 +Author: herlesupreeth +Date: Sun Oct 26 17:00:07 2025 +0100 + + ims_ipsec_pcscf: fix selection of encryption algorithm selection + + (cherry picked from commit 1bdafed8d4bb97f1f9a7654155decbf9625b0504) + +commit 1a2ab319458637e219bd43a4b2db9c8a38fd0b34 +Author: Victor Seva +Date: Mon Oct 27 16:22:17 2025 +0100 + + ims_usrloc_scscf: improve find_contact_from_impu() + + * remove ':5060' from comparation + * don't compare twice if there's no alias_term + + > ims_dialog [dlg_cb.c:271]: run_dlg_callbacks(): dialog=0x7fa0f03b9da0, type=16 + > ims_usrloc_scscf [contact_dlg_handlers.c:65]: find_contact_from_impu(): Looking for contact [sip:1d5c5384e21d0969@10.17.10.37:5060;transport=udp] for IMPU [sip:+3910010008912@ims.mnc001.mcc001.3gppnetwork.org] + > ims_usrloc_scscf [contact_dlg_handlers.c:102]: find_contact_from_impu(): Comparing [10.17.10.37:5060;transport=udp] and [10.17.10.37;transport=udp] + > ims_usrloc_scscf [contact_dlg_handlers.c:104]: find_contact_from_impu(): Comparing [10.17.10.37:5060;transport=udp] and [10.17.10.37;transport=udp] + > ims_usrloc_scscf [contact_dlg_handlers.c:113]: find_contact_from_impu(): Skipping sip:1d5c5384e21d0969@10.17.10.37;transport=udp + > ims_usrloc_scscf [contact_dlg_handlers.c:118]: find_contact_from_impu(): malformed contact, bailing search + > ims_usrloc_scscf [contact_dlg_handlers.c:163]: contact_dlg_handler(): Unable to find caller contact from dialog.... continuing + > ims_usrloc_scscf [contact_dlg_handlers.c:65]: find_contact_from_impu(): Looking for contact [sip:527478AC-68FF7C1E0004017B-BD55A700@10.17.10.37:5060] for IMPU [tel:+3910010008913] + > ims_usrloc_scscf [contact_dlg_handlers.c:102]: find_contact_from_impu(): Comparing [10.17.10.37:5060] and [10.17.10.37;transport=udp] + > ims_usrloc_scscf [contact_dlg_handlers.c:104]: find_contact_from_impu(): Comparing [10.17.10.37:5060] and [10.17.10.37;transport=udp] + > ims_usrloc_scscf [contact_dlg_handlers.c:113]: find_contact_from_impu(): Skipping sip:1cecbffd628fa83f@10.17.10.37;transport=udp + > ims_usrloc_scscf [contact_dlg_handlers.c:118]: find_contact_from_impu(): malformed contact, bailing search + > ims_usrloc_scscf [contact_dlg_handlers.c:189]: contact_dlg_handler(): Unable to find callee contact from dialog.... continuing + > ims_usrloc_scscf [contact_dlg_handlers.c:204]: contact_dlg_handler(): No Contacts found for both caller && callee ... bailing + + (cherry picked from commit 6ce335298da14211716209b8b8c12efedc86f53f) + +commit d56fd00cc6850b0e2130bb8e03f0aa53488ff3bb +Author: Victor Seva +Date: Sat Sep 6 11:47:35 2025 +0200 + + ims_usrloc_scscf: fix contact_port_ip_match() + + * same logic as in 22db60c1e29c26caacf4356849d2d1d550d68617 + + (cherry picked from commit 0cae5fa009ce1385a3a131523685f74bef5514b6) + +commit dfc590313be56564a924bd190ae89f8cf1b1f4fb +Author: Victor Seva +Date: Thu Sep 4 14:00:57 2025 +0200 + + ims_registrar_scscf: fix contact_port_ip_match() + + It was not matching comparation when default port was omitted + + > ims_registrar_scscf [registrar_notify.c:1556]: contact_port_ip_match(): Matching contact using only port and ip - comparing [127.169.7.104] and [127.169.7.104:5060] + + (cherry picked from commit f57f4045ac8a08585c573dcc1eb257102be1a2a9) + +commit a8ebcb84827a5ddceceebd98c8dbce8e89447f67 +Author: Victor Seva +Date: Tue Oct 21 15:32:46 2025 +0200 + + ims_qos: cscf_get_asserted_identity() not properly parsing PAI header + + > ims_qos [ims_qos_mod.c:1035]: w_rx_aar(): No P-Asserted-Identity hdr found in request. Using From hdr in req - we shouldn't have to do this + +commit 28d718c8caeff0e1780c553d5364246207e1420d +Author: Xenofon Karamanos +Date: Fri Oct 3 11:42:35 2025 +0000 + + topos_redis: cmake: Use consistent naming across modules + + (cherry picked from commit 5d73826c9b3b7ececf01358a7396e5e395f15872) + +commit 9731c735d59e07f82c578b6910e37ae109e539f2 +Author: Xenofon Karamanos +Date: Fri Oct 3 11:39:56 2025 +0000 + + db_redis: cmake: Add ssl support + + (cherry picked from commit 4f436ee4881e954fa6fc152c02ac5ddc52ff936c) + +commit 6970be9c0036c5af3b123c89beee5f32af861309 +Author: Xenofon Karamanos +Date: Fri Oct 3 11:38:52 2025 +0000 + + ndb_redis: cmake: Remove message for hiredis_ssl + + - pkg-config alreadys does + + (cherry picked from commit d4a955e1f04fe6b109556b43c2e682b105f2fb95) + +commit 1a93503ba82bd0227e774938bcf0d706cd8513a7 +Author: Xenofon Karamanos +Date: Thu Sep 25 11:28:22 2025 +0000 + + ndb_redis: cmake: Update for hiredis_ssl + + (cherry picked from commit 829dce8e9de586f1269be2f58f9a7f58cc81e2b1) + +commit 97fda22d4a3184fabf8889cbd0e72d621c523c96 +Author: Kamailio Dev +Date: Wed Sep 24 21:31:19 2025 +0200 + + modules: readme files regenerated - modules ... [skip ci] + +commit 2314adbc98deb8172f10d87ae8647dbd45d8bf8f +Author: Richard Fuchs +Date: Wed Sep 24 15:22:09 2025 -0400 + + rtpengine: add recommended version to docs + + Closes #4407 + +commit f5f3e9f63c62f12746d282eea29c1a77d6da456b +Author: Mikko Lehto +Date: Fri Sep 12 14:41:14 2025 +0300 + + CMakeLists.txt: drop EXTRAVERSION + +commit de4b07c3a4962afb167bf80e2e673ad0fe88f25c +Author: Xenofon Karamanos <22965395+xkaraman@users.noreply.github.com> +Date: Mon Sep 22 13:53:25 2025 +0000 + + Revert "websocket: use core sha1 instead of libssl for the handshake key" + + This reverts commit 24643eb80d8206098a17dd8073523157766a5a04. + +commit 24643eb80d8206098a17dd8073523157766a5a04 +Author: Daniel-Constantin Mierla +Date: Thu Aug 7 06:01:05 2025 +0200 + + websocket: use core sha1 instead of libssl for the handshake key + + - avoid the libssl crypto rwlock use + + (cherry picked from commit e0c04615bb6a9f4a2077012481d4cbb5c669ecf0) + +commit aad27e1536ed46bd86d8ca36758a176c250334e8 +Author: Xenofon Karamanos +Date: Mon Aug 25 14:52:09 2025 +0000 + + cmake: Detect armv8 and armv7 as arm + + - for compatibility reasons for make + + (cherry picked from commit 70ee233bf9a0cdf88be23d5e58e5df47f09926f2) + +commit 883b6720c9652d92b3e41debc07b535bfd8477e9 +Author: Xenofon Karamanos +Date: Mon Aug 25 14:48:16 2025 +0000 + + cmake: Add ppc compile options + + (cherry picked from commit 91e8565c32754229c124f99a25377142184fdb79) + +commit b371e1827c6190a8d26e2d1e32c7798302e241b1 +Author: Xenofon Karamanos +Date: Mon Aug 25 14:42:26 2025 +0000 + + cmake: Add alpha compile options + + (cherry picked from commit d32ce5536d19092dbc86637243c79d95c23ae24a) + +commit 1b6fd33901a259237e15a803286a420c4d0ab844 +Author: Xenofon Karamanos +Date: Mon Aug 25 14:40:17 2025 +0000 + + cmake: Add mips64 compile options + + (cherry picked from commit 2938e32cf53c1a31357577f55be5150745eb916d) + +commit c1826c49170f22533001477045405075db1463d8 +Author: Xenofon Karamanos +Date: Mon Aug 25 14:37:12 2025 +0000 + + cmake: Add mips2 compile options + + (cherry picked from commit b8baa3a1533fc38ac8960c655e41743fe1461e21) + +commit 3281b6c0c975ace1930e83bed3ac96c91e7dead1 +Author: Xenofon Karamanos +Date: Mon Aug 25 14:33:27 2025 +0000 + + cmake: Add mips compile options + + (cherry picked from commit f5d4c6095c91c54d29ba2dc3276ec08906813fbc) + +commit 58592f061e4e42f44ec2941d8461baa0c6060713 +Author: Xenofon Karamanos +Date: Mon Aug 25 13:32:37 2025 +0000 + + cmake: Add sparc compile options + + (cherry picked from commit 84db8b6c0c2ba289429ab36d054d677e2c16c8e0) + +commit 14919f1e35579d4406d79cd7e6361dbdb481aead +Author: Xenofon Karamanos +Date: Mon Aug 25 13:32:06 2025 +0000 + + cmake: Add sparc64 compile options + + (cherry picked from commit 97d453665f74edc9d0e8174c46c37ae7f57fee06) + +commit cce34a150f8ee7b77d314dd3d2c6f5ce3a7e2f0d +Author: Xenofon Karamanos +Date: Fri Aug 22 09:40:30 2025 +0000 + + cmake: Adopt x86_64 options from make + + (cherry picked from commit 0b7c938c3c2c652ee1fa8d55ce28135c6ab4b777) + +commit 29df7958433c25d51a02a33de5388e271c673d19 +Author: Xenofon Karamanos +Date: Fri Aug 22 09:30:25 2025 +0000 + + cmake: Adopt x86 options from make + + (cherry picked from commit cd46307a9c542eb74e69498b8fbcd35d70bb62c5) + +commit 4b6b739dbe6a4bf58a41060f3fbdaa717076fe05 +Author: Xenofon Karamanos +Date: Fri Aug 22 09:21:47 2025 +0000 + + cmake: Add set_if_empty function + + (cherry picked from commit bcbeb86443e1a058e1439572c93bc043517bdefd) + +commit 241f9737adf9f1e8e52ffbdbca68063b2a9e1587 +Author: Xenofon Karamanos +Date: Mon Aug 25 13:37:24 2025 +0000 + + cmake: Add arm6 compile options + + (cherry picked from commit 2bd61fc1b13af0e05b3060257f89a884433370bd) + +commit 6f4ad68c19b0d6c36d0d97fd96a75491a311f238 +Author: Xenofon Karamanos +Date: Fri Aug 22 09:08:43 2025 +0000 + + cmake: Add arm and arm7 options + + (cherry picked from commit bfd7596f0fcfe6127bea92c6de175ff0b6facf8a) + +commit 5f514798e97578602b9eac29be36629c8be35229 +Author: Xenofon Karamanos +Date: Fri Aug 22 09:07:42 2025 +0000 + + cmake: Use TARGET_ARCH var for detecting and aliasing target arch + + (cherry picked from commit 74c1c3fc919637491b22cbae11872da288990b5a) + +commit 247309893ef0d8b6189f122bf3f4e07d0eaaead9 +Author: Xenofon Karamanos +Date: Wed Aug 20 16:07:09 2025 +0000 + + cmake: Fix elseif() without conditions + + (cherry picked from commit 758af7cf202d3545bf2e68019dfadb0ea56219a3) + +commit e6ae9d1430290591b83e35aa8515206c0f6bb78c +Author: Xenofon Karamanos +Date: Tue Aug 19 17:18:40 2025 +0000 + + cmake: Fix bash specific result code to sh + + (cherry picked from commit 44bd165d101eb56ccb1189c77d98878f20a094b2) + +commit 068a67ee85f82feb7ab3a513051571274895a8a8 +Author: Xenofon Karamanos +Date: Tue Aug 19 17:11:38 2025 +0000 + + cmake: Use `sh` instead of `bash + + (cherry picked from commit b21f14b3fb1d4d553f6c07496a09003c049493fe) + +commit 13f2aff02192a71d86db931a4e4a0ff323c85698 +Author: Xenofon Karamanos +Date: Mon Aug 18 10:12:28 2025 +0000 + + cmake: Add prtint-modules target + + - Print a summary for included and excluded modules + - Print a summary of all module to be built + - Sort them + + (cherry picked from commit 916e9911bf9b06e5677975ca82d72618d1df9af8) + +commit ad276703aaedef50450e87731ea7a62163e46ce7 +Author: Xenofon Karamanos +Date: Mon Aug 18 10:10:50 2025 +0000 + + cmake: Add a component name for user-specified modules + + (cherry picked from commit 47892a13b4c9c2c6a4e100ecad250d1d23b2c9a1) + +commit f1b718ca70a840ab9b6c1e7397640e4ddf29df9a +Author: Xenofon Karamanos +Date: Mon Aug 18 10:10:19 2025 +0000 + + cmake: Provide a clear error + + - No folder with module_name found + - No CMakeLists.txt file found in said folder + + (cherry picked from commit ba693314e43d4c20263a6b1f7dc937052cb6c604) + +commit 775a5ee671400e2f15167c2c3d8617cd275c1419 +Author: Xenofon Karamanos +Date: Fri Aug 8 15:08:58 2025 +0000 + + cmake: Add missing defintion + + (cherry picked from commit 3ca03821e6920fe57b15a0a46c22c6e9e9299aa3) + +commit 7f4a4012b129fdf28273f17a077dfad07ad1511b +Author: Xenofon Karamanos +Date: Fri Aug 8 15:08:36 2025 +0000 + + cmake: Remove duplicate definition + + - Used in os specific cmake like linux.cmake + + (cherry picked from commit b4fbab81f35984cf3369cd97142f49ee4c622877) + +commit a8328c46994e816b36ddc9ed53e57d2dba4ecac7 +Author: Xenofon Karamanos +Date: Fri Aug 8 15:07:17 2025 +0000 + + cmake: Fix FMSTATS and KMSTATS compile defs + + - Removed relevant unnessecary option + + (cherry picked from commit 8728cb4de4ba27287b1f43f9d96179ff4df08b84) + +commit 8c1ed877e5d57e437c9600aca9c53f4e34334a50 +Author: Xenofon Karamanos +Date: Wed Aug 6 09:57:27 2025 +0000 + + cmake: Fix typo for 6738b9e + + - Alias ppc64le to ppc64 + + (cherry picked from commit 41241ec4c7210d2db1195715afc0c84a6959b45f) + +commit 7d43c2ecacb60d4d7f91180b33a1ff024188235f +Author: Xenofon Karamanos +Date: Tue Aug 5 13:01:48 2025 +0000 + + cmake: Alias ppc64le to ppc64 + + - Match Makefile behaviour + + (cherry picked from commit 6738b9e64e04ba029e1c207c2dc76b10d8493df0) + +commit 3afd2aab843f1ad7cc338ff9a58cb1fade465417 +Author: Xenofon Karamanos +Date: Mon Jul 7 16:41:33 2025 +0000 + + cmake: Update and add options + + - Add dependent options + - Add EXTRA_DEFS for undeclared options found in the code as a convenience + + (cherry picked from commit 848ef810c05d8969968e04752d333ffdfb754551) + +commit 377e902eccea79ad79a7e3e4af4acd9f36638510 +Author: Xenofon Karamanos +Date: Thu Jul 24 14:07:52 2025 +0000 + + cmake: Up min version to 3.13 + + - As discussed in https://github.com/kamailio/kamailio/issues/4078#issuecomment-2553148148 + + (cherry picked from commit 8cf64efffe08a6fdbb8365e463a63bad30b7a3d7) + +commit a21ec3ab7812852744aa56a3a66b0ed04c8d062e +Author: Xenofon Karamanos +Date: Tue Jul 22 13:39:03 2025 +0000 + + cmake: Add ppc64 arch compile options + + (cherry picked from commit 26b8bd414ba4cef25c8d5bcfd5a5d97cecf759d2) + +commit 5fe5dd3cf95c5395a03df99637f15646c17e8f41 +Author: Xenofon Karamanos +Date: Tue Jul 22 12:27:42 2025 +0000 + + cmake: Adopt regex to match only ppc and ppc64 and nothing more. + + (cherry picked from commit 25810b126740e741698d5067bca0e79c5cb12b16) + +commit 949075ab76e60cfb2798ec43794ff8a040c797f8 +Author: Xenofon Karamanos +Date: Tue Jul 22 11:51:05 2025 +0000 + + cmake: Fix condition for fast_lock on unknown archs + + (cherry picked from commit 053eb87f5338b0fc94dcb3e0d6b4c7416c854140) + +commit 57af62677c3c1056540748ad02053ec80ce3c826 +Author: Xenofon Karamanos +Date: Mon Jul 21 21:35:05 2025 +0000 + + cmake: Fix component group names for dbshema generation + + - dbshema modules generated components that were not provided by user + - if a module with dbschema is included in the include_modules list, it will now be in "user_specified_list" component instead of the actual KGROUP component that might be not included. + + (cherry picked from commit 97345507045bee739b006298a586dfaedc2b09e8) + +commit 8874b2f64db9d5d1d7a6d83d260dd9b42838fbca +Author: Xenofon Karamanos +Date: Mon Jul 21 19:04:45 2025 +0000 + + cmake: Fix help string and allow mutliple values from gui + + - Allow providing multiple space seperated groups in guis like ccmake instead of the single option + + - ALL_PACKAGED option refined to be allowed with other groups as well. + - Providing ALL_PACKAGED with another group will append the another group to the list of groups comprising the ALL_PACKAGED option. + - Remove duplicates in the group list if any + + (cherry picked from commit 78dbbda4ca74e18c4a99c87520abd5d7906af4d3) + +commit a4f20cff3e41182515254249c4d2e5578386109b +Author: Xenofon Karamanos +Date: Mon Jul 21 17:45:27 2025 +0000 + + cmake: Remove Flavour options + + (cherry picked from commit ae28e39830f79ee2abf34518678749678e7d14bb) + +commit f44ce861660a9e436bedf274566c334771bbcebf +Author: Xenofon Karamanos +Date: Fri May 23 13:34:06 2025 +0000 + + cmake: dbschema Coorect install folder of pi_framework + + (cherry picked from commit 57bd37c54390fdb70520834b0c2eb29fbb79510e) + +commit 494a45af3eee3ae67307ab54e4696ce2cedba1af +Author: Xenofon Karamanos +Date: Fri May 23 11:03:00 2025 +0000 + + cmake: Add some check for finding group name if using non K-variants of group names + + (cherry picked from commit c7fcdfdb13aeec9aeae726a9cc1ccaeda557e7bb) + +commit 6b56aca2cf7dd8629b2779f263225c6535f7c6f2 +Author: Xenofon Karamanos +Date: Fri May 23 11:01:10 2025 +0000 + + cmake: Add missing package KSTANDARD + + - When `ALL_PACKAGED` is used, KSTANDARD should be built as well, but not KMINI which is a subset of it. + - Fix RTP_MEDIA group name + + (cherry picked from commit 0fb182720428b276793899debb210279a0b5ec97) + +commit 03f4f7070d25f3cecacabe1dd66a71e1d074b12a +Author: Xenofon Karamanos +Date: Thu Apr 24 12:47:31 2025 +0000 + + cmake: Refactor packaging setup and improve installation paths + + - Moved packaging configuration to a new deb-packaging.cmake file for better organization. + - Updated installation paths in CMakeLists to use DESTDIR for flexibility. + - Enhanced group handling for module packaging, allowing for "ALL_PACKAGED" option. + + (cherry picked from commit cdf9a4716db3762b172df059d7366983216fd48c) + +commit 344bdcfa597bd0ae36a478a507f003ad605c3705 +Author: Xenofon Karamanos +Date: Fri May 23 10:56:11 2025 +0000 + + cmake: Move prefix/suffix calculation back. + + - Prefix depends on each table name.. + - Fix postgress with correct install folder..... + + (cherry picked from commit 2ec8ddba5eeaeea1c7292d1aa56ed90dc834341e) + +commit fbd6875072963a55b613a0d359d871f4ed0315c4 +Author: Xenofon Karamanos +Date: Mon May 19 14:18:13 2025 +0000 + + cmake: snmpstats Remove warning message + + (cherry picked from commit 201a2bdee6a8b78787908b296824cd282b78eef5) + +commit 76d6fea3874ce1ea3dd91fb7845586e19f2d9a2e +Author: Victor Seva +Date: Tue Jun 10 16:20:30 2025 +0200 + + lib/srdb1: align schema Makefile after e0dd39618fae2004cd1ab44758ca323376935e2e + + (cherry picked from commit 4de3270830c08641e3bc3e5858513244083b106e) + +commit 3bb15cfd44f562ac054d480d7ef2053a9d144850 +Author: Victor Seva +Date: Tue Jun 10 13:50:17 2025 +0200 + + lib/srdb1: fix schema Makefile after e0dd39618fae2004cd1ab44758ca323376935e2e + + > diff --git a/doc/stylesheets/dbschema_k/xsl/mongodb.xsl b/doc/stylesheets/dbschema_k/xsl/db_mongodb.xsl + > similarity index 100% + > rename from doc/stylesheets/dbschema_k/xsl/mongodb.xsl + > rename to doc/stylesheets/dbschema_k/xsl/db_mongodb.xsl + > diff --git a/doc/stylesheets/dbschema_k/xsl/mysql.xsl b/doc/stylesheets/dbschema_k/xsl/db_mysql.xsl + > similarity index 100% + > rename from doc/stylesheets/dbschema_k/xsl/mysql.xsl + > rename to doc/stylesheets/dbschema_k/xsl/db_mysql.xsl + > diff --git a/doc/stylesheets/dbschema_k/xsl/oracle.xsl b/doc/stylesheets/dbschema_k/xsl/db_oracle.xsl + > similarity index 100% + > rename from doc/stylesheets/dbschema_k/xsl/oracle.xsl + > rename to doc/stylesheets/dbschema_k/xsl/db_oracle.xsl + > diff --git a/doc/stylesheets/dbschema_k/xsl/postgres.xsl b/doc/stylesheets/dbschema_k/xsl/db_postgres.xsl + > similarity index 100% + > rename from doc/stylesheets/dbschema_k/xsl/postgres.xsl + > rename to doc/stylesheets/dbschema_k/xsl/db_postgres.xsl + > diff --git a/doc/stylesheets/dbschema_k/xsl/dbtext.xsl b/doc/stylesheets/dbschema_k/xsl/db_text.xsl + > similarity index 100% + > rename from doc/stylesheets/dbschema_k/xsl/dbtext.xsl + > rename to doc/stylesheets/dbschema_k/xsl/db_text.xsl + + (cherry picked from commit 58057e9c78971ee215b508f912e94f79bc57f247) + +commit 01d2ae51947898806b1d2ba67bea0eca539848bc +Author: Xenofon Karamanos +Date: Tue May 20 15:05:56 2025 +0000 + + cmake: Fix dbschema generation to match older makefile structure + + (cherry picked from commit e0dd39618fae2004cd1ab44758ca323376935e2e) + +commit 1421ade7732f8bdb4535e16a951dd3710325fedb +Author: Xenofon Karamanos +Date: Mon May 19 17:42:03 2025 +0000 + + cmake: Fix dbschema generation with group names + + - Add function to find group of module + - Some targets and destinations folders have changed due to changing to more consistency naming. + - dbschema_{db_module_name) targets + - stringparam db set to module name + + (cherry picked from commit ccad04cc13b1c5695aded8ee02181f10c8ed7d11) + +commit 48ab6ef07162f73aed6708b3a8704696bfcf1997 +Author: Xenofon Karamanos +Date: Fri May 16 14:31:08 2025 +0000 + + cmake: Centralize dbschema generation + + - Do not define the targets if xsltproc is missing + + (cherry picked from commit 6753acd06859e5e5e34a7981765c4bcdbeb66897) + +commit c0d2b9eb08cd55e043d4df65dfb902ee6597e133 +Author: Xenofon Karamanos +Date: Fri May 16 11:08:52 2025 +0000 + + cmake: Fix wrong name of option + + (cherry picked from commit f9bbac5167e98952ef5b1764c3f2c4b6939fd25d) + +commit d6673422df4b6ae2ea50831a657458b708da14c5 +Author: Xenofon Karamanos +Date: Fri May 16 11:07:27 2025 +0000 + + cmake: Add some comments + + (cherry picked from commit 497b7d94b8d3575cf7399c8537e96297bcd4062b) + +commit 17c2fd25e353187297dcc09e456a97a302451d39 +Author: Xenofon Karamanos +Date: Mon May 12 09:27:44 2025 +0000 + + cmake: Add check and warning for module docs + + (cherry picked from commit 782d93197c928f8856a7026c93aebd223c6cb682) + +commit ebd6d2765161f2e8a228be3792c3e3012856e262 +Author: Xenofon Karamanos +Date: Thu Apr 24 13:26:45 2025 +0000 + + cmake: Fix build paths for dbschema. + + - Build artifcats of dbschema should be in utils folder + + (cherry picked from commit 478ddb1f38817ac4730d0f499c73046be26b6907) + +commit ded3889d606bd1d396e4a482ee61a91aa42bac40 +Author: Xenofon Karamanos +Date: Wed Mar 26 16:00:23 2025 +0000 + + cmake: Fix formatting and add some comments. + + - Remove unused replacement SRC_NAME to MAIN_NAME + + (cherry picked from commit 0550b6300703ec5536a033e1d4ba4d70ec53f83a) + +commit f5771a3ed1b397d5b76f5f50b27a3422f9040a29 +Author: Xenofon Karamanos +Date: Tue Feb 18 15:05:45 2025 +0000 + + cmake: Better handling of doc generation dependencies + + (cherry picked from commit 08bfcad2c34855dbadd3c9eafda72b38a6e65a1c) + +commit 1bc336122c6aa1adc259efb48882fe4f4ae5a0cf +Author: Xenofon Karamanos +Date: Tue Feb 18 14:50:31 2025 +0000 + + cmake: quote variables for expansion + + (cherry picked from commit d3f85d8a3b13a444ac66b440056aee8232cbae54) + +commit 23c578ba73833fa49f7d2807ecfc1c95e603a86b +Author: Xenofon Karamanos +Date: Tue Jan 28 14:41:37 2025 +0000 + + cmake: Use components to install groups + + - kamailio-core for anything related to core + - group_name as defined in groups.cmake + - Preferably use K-variants instead of DEFAULT,STANDARD + - Refactor kamctl and dbschema CMakLists for component based installation + + (cherry picked from commit 3c9f60772e04edbc853d8162543b3b0af7f46217) + +commit 407433da72418f080ef79640cb04ca0e2951d1da +Author: Xenofon Karamanos +Date: Thu Feb 6 12:57:45 2025 +0000 + + cmake: If BUILD_DOC options is set to ON, include doc and man targets to default target! + + (cherry picked from commit 8cc60c03a25a2a9b1f7fbe93e08c21165336ad0a) + +commit 0c3cfeea45aadafba8f5b8ece814bd219a5911e2 +Author: Xenofon Karamanos +Date: Fri May 16 11:12:23 2025 +0000 + + cmake: Remove find_package for ORTP and Mediastreamer2 libraries + + - Use pkg-config instead because their cmake configs are not up to standard and complicates things + + (cherry picked from commit 42e1a9c3c5df65cae8a5f559f6fe47a6de5f6fac) + +commit 48de1c533d38ecd3c4cb6563bbbbb43bf559aa14 +Author: Xenofon Karamanos +Date: Fri May 16 11:11:18 2025 +0000 + + cmake: Quiet fail for rabbit-mq + + - Remove extra find_package(pkgconfig) + - Remove required version + + (cherry picked from commit 1c4de2410f8f5d3f600c96ac823c88911c58ae22) + +commit 3dcfd9321d9ca9f9e8c107f8f81ec89cc558d19b +Author: Xenofon Karamanos +Date: Fri May 16 11:09:30 2025 +0000 + + cmake: Remove unnessecary components to be consistent + + (cherry picked from commit 898f680d85b3e558038b41a14fa6f2ebca05bc94) + +commit e3ea2f56791ae8d953ab5e8fc46a61a6037d37b8 +Author: Xenofon Karamanos +Date: Fri May 16 11:08:19 2025 +0000 + + cmake: Remove unused groups + + (cherry picked from commit 85b821b4b6e6cfaa5495d39bcd3ef2e1b939b499) + +commit 8edfda3952eb0c0b339a9822aaf06e182ce56fc5 +Author: Xenofon Karamanos +Date: Mon May 12 09:29:56 2025 +0000 + + cmake: Add missing defintion + + (cherry picked from commit 165f2cd3c2e1197b8d1986cbc2784a24c02e06e9) + +commit 35772f6fb527e9ce2fb131729203639de479c397 +Author: Xenofon Karamanos +Date: Thu Apr 24 13:27:08 2025 +0000 + + cmake: Remove warning message + + (cherry picked from commit 549643ec1e283b07e9fae274b6ed923065ba46e0) + +commit 287679f8dbff6114d6113bf38d3e02d211045a35 +Author: Xenofon Karamanos +Date: Thu Feb 6 12:55:43 2025 +0000 + + cmake: Warning if no modules/group were selected + + (cherry picked from commit cf8cdb99355e19a30460229633eaf087717ee44d) + +commit c19544c6af100ae86514d924a8c60e88fd855d90 +Author: Xenofon Karamanos +Date: Thu Jan 30 15:48:26 2025 +0000 + + cmake: Forbid in-source builds + + (cherry picked from commit 0afea1fd170a79d3f260c18a293bac1ce8fd8527) + +commit f34264ad78fd547e64db081ca2738b7fda385cd8 +Author: Xenofon Karamanos +Date: Thu Mar 27 13:50:51 2025 +0000 + + cmake: Fix formatting according to cmake-format config file. + + (cherry picked from commit 7c58b8a7fca0a72b360669ba297e0902cceeb4b0) + +commit bc5e6b864663891505191fbb74b54d66f4a03c99 +Author: Xenofon Karamanos +Date: Mon Mar 24 16:42:30 2025 +0000 + + cmake: Alter some of cmake-format options + + (cherry picked from commit b102e3f38a554f65a55424a728821d68cc386015) + +commit 0f58b8f0b304c72f2b42576b4ccf97989c2a8393 +Author: Xenofon Karamanos +Date: Thu Jan 30 15:09:21 2025 +0000 + + cmake: Generate version-create.mongo file and install it + + (cherry picked from commit b70ade3e636cec8c38f40c92ec6bab5e7486feee) + +commit 728776a3ad75d1d8f67b3f452d02c956a6f2da8e +Author: Victor Seva +Date: Mon Sep 15 15:56:45 2025 +0200 + + cdp: don't try to cleanup_ssl when no there's no tls info + + > Program terminated with signal SIGSEGV, Segmentation fault. + > #0 0x00007fa6326b3a95 in SSL_shutdown () from /lib/x86_64-linux-gnu/libssl.so.3 + > (gdb) bt + > #0 0x00007fa6326b3a95 in SSL_shutdown () from /lib/x86_64-linux-gnu/libssl.so.3 + > #1 0x00007fa6327582d5 in cleanup_ssl (tls_ctx=0x0, tls_conn=0x0) at cdp_tls.c:259 + > #2 0x00007fa6327a30a7 in receive_loop (original_peer=0x7fa612199860) at receiver.c:890 + > #3 0x00007fa63279b5cb in receiver_process (p=0x7fa612199860) at receiver.c:485 + > #4 0x00007fa63277e2b1 in diameter_peer_start (blocking=0) at diameter_peer.c:294 + > #5 0x00007fa63274ea8f in cdp_child_init (rank=0) at cdp_mod.c:275 + > ... + > (gdb) p sp->tls_conn + > $5 = (SSL *) 0x0 + > (gdb) p sp->tls_ctx + > $6 = (SSL_CTX *) 0x0 + + (cherry picked from commit cb0f9a9ac493201bad29e7f393e1c1b193bdd4b9) + +commit 4e53db36e65f4d97c09b9daf67abd4e56e623107 +Author: Victor Seva +Date: Thu Sep 11 09:45:00 2025 +0200 + + pkg/kamailio/deb: refresh [skip ci] + + (cherry picked from commit 618874aeb817400ea53c0529c7cc856878c560a4) + +commit 886652cb20dcec45968e3cc0c052076b193d7734 +Author: Victor Seva +Date: Thu Sep 11 09:39:14 2025 +0200 + + pkg/kamailio/deb: add jwt to extra modules [skip ci] + + libjwt-dev > 1.12: + * trixie + * sid + * noble + + (cherry picked from commit 6e756e7d6193e955298a1cb407b827f0538de190) + + ===================== 2025-09-10 Version 6.0.3 Released ===================== ===================== Changes Since Version 6.0.2 =========================== diff --git a/cmake/BuildType.cmake b/cmake/BuildType.cmake index 7b15e3e05..e45b6c51e 100644 --- a/cmake/BuildType.cmake +++ b/cmake/BuildType.cmake @@ -5,17 +5,13 @@ if(EXISTS "${CMAKE_SOURCE_DIR}/.git") endif() if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) - message( - STATUS - "Setting build type to '${default_build_type}' as none was specified." - ) + message(STATUS "Setting build type to '${default_build_type}' as none was specified.") set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE STRING "Choose the type of build." FORCE ) # Set the possible values of build type for cmake-gui set_property( - CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" - "RelWithDebInfo" + CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo" ) endif() diff --git a/cmake/cmake-format.py b/cmake/cmake-format.py index 65103f4e3..47074bdf6 100644 --- a/cmake/cmake-format.py +++ b/cmake/cmake-format.py @@ -25,7 +25,7 @@ with section("format"): # type: ignore disable = False # How wide to allow formatted cmake files - line_width = 80 + line_width = 100 # How many spaces to tab for indent tab_size = 2 @@ -91,7 +91,7 @@ with section("format"): # type: ignore command_case = 'canonical' # Format keywords consistently as 'lower' or 'upper' case - keyword_case = 'unchanged' + keyword_case = 'upper' # A list of command names which should always be wrapped always_wrap = [] diff --git a/cmake/compiler-specific.cmake b/cmake/compiler-specific.cmake index e64ea577c..51679f963 100644 --- a/cmake/compiler-specific.cmake +++ b/cmake/compiler-specific.cmake @@ -1,61 +1,111 @@ -# Quite analogous to the Makefile.defs file This file is used to define the -# common flags and options for the project The flags are defined as INTERFACE -# properties of the common library The flags are then used by the other -# libraries and executables +# This file is included from the def.cmake CMakeLists.txt file. +# It sets up the compiler specific flags. # Define the common flags and options for GCC option(PROFILE "Enable profiling" OFF) add_library(common_compiler_flags INTERFACE) +function(set_if_empty var value) + if(DEFINED ENV{${var}} AND NOT "$ENV{${var}}" STREQUAL "") + set(${var} + ${value} + PARENT_SCOPE + ) + set(${var} "$ENV{${var}}") + else() + set(${var} + ${value} + PARENT_SCOPE + ) + endif() +endfunction() + # Define the flags for the C compiler -if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64") +if(TARGET_ARCH MATCHES "x86_64") if(CMAKE_C_COMPILER_ID STREQUAL "GNU") target_compile_definitions(common_compiler_flags INTERFACE CC_GCC_LIKE_ASM) - target_compile_options( - common_compiler_flags - INTERFACE -Wall -funroll-loops -Wcast-align - -Werror=implicit-function-declaration -Werror=implicit-int) + target_compile_options(common_compiler_flags INTERFACE -funroll-loops -Wcast-align) - # If GCC version is greater than 4.2.0, enable the following flags - if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.2.0) + # If GCC version is greater than 4.2, enable the following flags + if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.2) + set_if_empty(CPUTYPE "generic") target_compile_options( - common_compiler_flags - INTERFACE -m64 -minline-all-stringops -falign-loops -ftree-vectorize - -fno-strict-overflow -mtune=generic) + common_compiler_flags INTERFACE -m64 -minline-all-stringops -falign-loops -ftree-vectorize + -fno-strict-overflow -mtune=${CPUTYPE} + ) target_link_options(common_compiler_flags INTERFACE -m64) + elseif(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.0) + set_if_empty(CPUTYPE "athlon64") + target_compile_options( + common_compiler_flags INTERFACE -m64 -minline-all-stringops -falign-loops -ftree-vectorize + -mtune=${CPUTYPE} + ) + target_link_options(common_compiler_flags INTERFACE -m64) + else() + message( + WARNING + "You are using an old and unsupported gcc version ${CMAKE_C_COMPILER_VERSION}, compile at your own risk!" + ) endif() elseif(CMAKE_C_COMPILER_ID STREQUAL "Clang") + set_if_empty(CPUTYPE "opteron") target_compile_definitions(common_compiler_flags INTERFACE CC_GCC_LIKE_ASM) target_compile_options(common_compiler_flags INTERFACE -m64) target_link_options(common_compiler_flags INTERFACE -m64) + elseif(CMAKE_C_COMPILER_ID STREQUAL "Intel") + target_compile_definitions(common_compiler_flags INTERFACE CC_GCC_LIKE_ASM) + target_compile_options(common_compiler_flags INTERFACE -O3 -ipo -ipo_obj -unroll -tpp6 -xK) + else() + message( + WARNING + "Unsupported compiler (${CMAKE_C_COMPILER_ID}) for x86_64. Try GCC, Clang, or ICC. Compile at your own risk!" + ) endif() -elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i486|i586|i686") +elseif(TARGET_ARCH MATCHES "i386") if(CMAKE_C_COMPILER_ID STREQUAL "GNU") target_compile_definitions(common_compiler_flags INTERFACE CC_GCC_LIKE_ASM) - target_compile_options( - common_compiler_flags - INTERFACE -Wall -funroll-loops -Wcast-align - -Werror=implicit-function-declaration -Werror=implicit-int) + target_compile_options(common_compiler_flags INTERFACE -Wall -funroll-loops -Wcast-align) # If GCC version is greater than 4.2.0, enable the following flags - if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.2.0) + if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.2) + set_if_empty(CPUTYPE "generic") + target_compile_options( + common_compiler_flags INTERFACE -m32 -minline-all-stringops -falign-loops -ftree-vectorize + -fno-strict-overflow -mtune=${CPUTYPE} + ) + elseif(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.0) + set_if_empty(CPUTYPE "athlon64") target_compile_options( - common_compiler_flags - INTERFACE -m32 -minline-all-stringops -falign-loops -ftree-vectorize - -fno-strict-overflow -mtune=generic) + common_compiler_flags INTERFACE -m32 -minline-all-stringops -falign-loops -ftree-vectorize + -mtune=${CPUTYPE} + ) + else() + message( + WARNING + "You are using an old and unsupported gcc version ${CMAKE_C_COMPILER_VERSION}, compile at your own risk!" + ) endif() elseif(CMAKE_C_COMPILER_ID STREQUAL "Clang") + set_if_empty(CPUTYPE "athlon64") target_compile_definitions(common_compiler_flags INTERFACE CC_GCC_LIKE_ASM) - target_compile_options(common_compiler_flags INTERFACE -m32) + target_compile_options(common_compiler_flags INTERFACE -m32 -mtune=${CPUTYPE}) target_link_options(common_compiler_flags INTERFACE -m32) + elseif(CMAKE_C_COMPILER_ID STREQUAL "Intel") + # ICC- Intel classic specific flags + target_compile_definitions(common_compiler_flags INTERFACE CC_GCC_LIKE_ASM) + target_compile_options(common_compiler_flags INTERFACE -O3 -ipo -ipo_obj -unroll -tpp6 -xK) + else() + message( + WARNING "Unsupported compiler (${CMAKE_C_COMPILER_ID}) for i386. Try GCC, Clang, or ICC." + ) endif() -elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") +elseif(TARGET_ARCH MATCHES "aarch64") if(CMAKE_C_COMPILER_ID STREQUAL "GNU") target_compile_definitions(common_compiler_flags INTERFACE CC_GCC_LIKE_ASM) @@ -70,4 +120,263 @@ elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") # common INTERFACE -ftree-vectorize -fno-strict-overflow ) endif() endif() + +elseif(TARGET_ARCH MATCHES "ppc64$") + # PowerPC 64-bit specific flags + if(CMAKE_C_COMPILER_ID STREQUAL "GNU") + target_compile_definitions(common_compiler_flags INTERFACE CC_GCC_LIKE_ASM) + target_compile_options(common_compiler_flags INTERFACE -funroll-loops -fsigned-char) + + # Try to get CPUTYPE from the environment, fallback to "powerpc64" if not set + if(DEFINED ENV{CPUTYPE} AND NOT "$ENV{CPUTYPE}" STREQUAL "") + set(CPUTYPE "$ENV{CPUTYPE}") + else() + set(CPUTYPE "powerpc64") + endif() + + if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.2) + target_compile_options( + common_compiler_flags INTERFACE -ftree-vectorize -fno-strict-overflow -mtune=${CPUTYPE} + -maltivec + ) + elseif(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.0) + target_compile_options( + common_compiler_flags INTERFACE -ftree-vectorize -mtune=${CPUTYPE} -maltivec + ) + elseif(CMAKE_C_COMPILER_VERSION VERSION_LESS 3.0) + message( + WARNING + "GCC version ${CMAKE_C_COMPILER_VERSION} is too old for ppc64. Try GCC 3.0 or newer." + ) + endif() + # else() + # message(FATAL_ERROR "Unsupported compiler (${CMAKE_C_COMPILER_ID}) for ppc64. Try GCC.") + endif() +elseif(TARGET_ARCH STREQUAL "ppc") + # PowerPC 32-bit specific flags + if(CMAKE_C_COMPILER_ID STREQUAL "GNU") + target_compile_definitions(common_compiler_flags INTERFACE CC_GCC_LIKE_ASM) + if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.2) + set_if_empty(CPUTYPE "powerpc") + target_compile_options( + common_compiler_flags INTERFACE -funroll-loops -fsigned-char -ftree-vectorize -maltivec + -fno-strict-overflow -mtune=${CPUTYPE} + ) + elseif(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.0) + set_if_empty(CPUTYPE "powerpc") + target_compile_options( + common_compiler_flags INTERFACE -funroll-loops -fsigned-char -ftree-vectorize -maltivec + -mtune=${CPUTYPE} + ) + else() + message( + WARNING "GCC version ${CMAKE_C_COMPILER_VERSION} is too old for ppc. Try GCC 4.0 or newer." + ) + endif() + else() + message( + WARNING + "Unsupported compiler (${CMAKE_C_COMPILER_ID}) for ${TARGET_ARCH}. Try GCC. Compile at your own risk!" + ) + endif() +elseif(TARGET_ARCH STREQUAL "arm7") + if(CMAKE_C_COMPILER_ID STREQUAL "GNU") + target_compile_definitions(common_compiler_flags INTERFACE CC_GCC_LIKE_ASM) + + # ARM specific flags + target_compile_options( + common_compiler_flags INTERFACE -march=armv7-a -funroll-loops -fsigned-char + ) + if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.2.0) + target_compile_options(common_compiler_flags INTERFACE -ftree-vectorize -fno-strict-overflow) + elseif(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.0) + target_compile_options(common_compiler_flags INTERFACE -ftree-vectorize) + else() + message( + WARNING "GCC version ${CMAKE_C_COMPILER_VERSION} is too old for arm7. Try GCC 4.0 or newer." + ) + endif() + else() + message(FATAL_ERROR "Unsupported compiler (${CMAKE_C_COMPILER_ID}) for arm7. Try GCC.") + endif() +elseif(TARGET_ARCH STREQUAL "arm6") + if(CMAKE_C_COMPILER_ID STREQUAL "GNU") + target_compile_definitions(common_compiler_flags INTERFACE CC_GCC_LIKE_ASM) + target_compile_options( + common_compiler_flags INTERFACE -march=armv6 -funroll-loops -fsigned-char + ) + if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.2.0) + target_compile_options(common_compiler_flags INTERFACE -ftree-vectorize -fno-strict-overflow) + elseif(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.0) + target_compile_options(common_compiler_flags INTERFACE -ftree-vectorize) + else() + message( + WARNING "GCC version ${CMAKE_C_COMPILER_VERSION} is too old for arm6. Try GCC 4.0 or newer." + ) + endif() + else() + message(WARNING "Unsupported compiler (${CMAKE_C_COMPILER_ID}) for arm6. Try GCC.") + endif() +elseif(TARGET_ARCH STREQUAL "arm") + if(CMAKE_C_COMPILER_ID STREQUAL "GNU") + target_compile_definitions(common_compiler_flags INTERFACE CC_GCC_LIKE_ASM) + + # ARM specific flags + target_compile_options( + common_compiler_flags INTERFACE -marm -march=armv5t -funroll-loops -fsigned-char + ) + if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.2.0) + target_compile_options(common_compiler_flags INTERFACE -ftree-vectorize -fno-strict-overflow) + elseif(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.0) + target_compile_options(common_compiler_flags INTERFACE -ftree-vectorize) + else() + message( + WARNING "GCC version ${CMAKE_C_COMPILER_VERSION} is too old for arm. Try GCC 4.0 or newer." + ) + endif() + else() + message(FATAL_ERROR "Unsupported compiler (${CMAKE_C_COMPILER_ID}) for arm. Try GCC.") + endif() +elseif(TARGET_ARCH STREQUAL "sparc64") + if(CMAKE_C_COMPILER_ID STREQUAL "GNU") + target_compile_definitions(common_compiler_flags INTERFACE CC_GCC_LIKE_ASM SPARC64_MODE) + target_compile_options(common_compiler_flags INTERFACE -funroll-loops) + if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.2) + set_if_empty(CPUTYPE "ultrasparc") + target_compile_options( + common_compiler_flags INTERFACE -m64 -mcpu=ultrasparc -mtune=${CPUTYPE} + -fno-strict-overflow -ftree-vectorize + ) + target_link_options(common_compiler_flags INTERFACE -m64) + elseif(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.0) + set_if_empty(CPUTYPE "ultrasparc") + target_compile_options( + common_compiler_flags INTERFACE -m64 -mcpu=ultrasparc -mtune=${CPUTYPE} -ftree-vectorize + ) + endif() + # The following CMAKE_C_COMPILER_ID is not available per cmake docs + # TODO: Use some other variable to check like CC + elseif(CMAKE_C_COMPILER_ID STREQUAL "Sun") + target_compile_definitions(common_compiler_flags INTERFACE CC_GCC_LIKE_ASM SPARC64_MODE) + target_compile_options( + common_compiler_flags + INTERFACE -m64 + -xO3 + -xtarget=native + -xmemalign=8i + -fma=fused + -fns=yes + -xc99 + ) + else() + message( + FATAL_ERROR "Unsupported compiler (${CMAKE_C_COMPILER_ID}) for sparc64. Try GCC or Sun." + ) + endif() +elseif(TARGET_ARCH STREQUAL "sparc") + if(CMAKE_C_COMPILER_ID STREQUAL "GNU") + target_compile_definitions(common_compiler_flags INTERFACE CC_GCC_LIKE_ASM) + target_compile_options(common_compiler_flags INTERFACE -funroll-loops) + if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.2) + set_if_empty(CPUTYPE "v8") + target_compile_options( + common_compiler_flags INTERFACE -mtune=${CPUTYPE} -fno-strict-overflow -ftree-vectorize + ) + elseif(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.0) + set_if_empty(CPUTYPE "v8") + target_compile_options(common_compiler_flags INTERFACE -mtune=${CPUTYPE} -ftree-vectorize) + endif() + # The following CMAKE_C_COMPILER_ID is not available per cmake docs + # TODO: Use some other variable to check like CC + elseif(CMAKE_C_COMPILER_ID STREQUAL "Sun") + target_compile_definitions(common_compiler_flags INTERFACE CC_GCC_LIKE_ASM) + target_compile_options( + common_compiler_flags INTERFACE -xO3 -xtarget=native -xmemalign=4i -fma=fused -fns=yes -xc99 + ) + else() + message(FATAL_ERROR "Unsupported compiler (${CMAKE_C_COMPILER_ID}) for sparc. Try GCC or Sun.") + endif() +elseif(TARGET_ARCH STREQUAL "mips") + if(CMAKE_C_COMPILER_ID STREQUAL "GNU") + target_compile_definitions(common_compiler_flags INTERFACE CC_GCC_LIKE_ASM) + target_compile_options(common_compiler_flags INTERFACE -funroll-loops) + if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.2) + target_compile_options( + common_compiler_flags INTERFACE -mfp32 -march=r3000 -ftree-vectorize -fno-strict-overflow + ) + elseif(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.0) + target_compile_options(common_compiler_flags INTERFACE -march=r3000 -ftree-vectorize) + else() + message( + WARNING "GCC version ${CMAKE_C_COMPILER_VERSION} is too old for mips. Try GCC 4.0 or newer." + ) + endif() + + else() + message(WARNING "Unsupported compiler (${CMAKE_C_COMPILER_ID}) for mips. Try GCC.") + endif() +elseif(TARGET_ARCH STREQUAL "mips2") + if(CMAKE_C_COMPILER_ID STREQUAL "GNU") + target_compile_definitions(common_compiler_flags INTERFACE CC_GCC_LIKE_ASM) + target_compile_options(common_compiler_flags INTERFACE -funroll-loops) + if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.2) + target_compile_options(common_compiler_flags INTERFACE -ftree-vectorize -fno-strict-overflow) + elseif(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.0) + target_compile_options(common_compiler_flags INTERFACE -ftree-vectorize) + elseif(CMAKE_C_COMPILER_VERSION VERSION_LESS 3.0) + message( + WARNING + "You are using an old and unsupported gcc version ${CMAKE_C_COMPILER_VERSION}, compile at your own risk!" + ) + endif() + else() + message( + WARNING + "Unsupported compiler (${CMAKE_C_COMPILER_ID}) for ${TARGET_ARCH}. Try GCC. Compile at your own risk!" + ) + endif() +elseif(TARGET_ARCH STREQUAL "mips64") + if(CMAKE_C_COMPILER_ID STREQUAL "GNU") + target_compile_definitions(common_compiler_flags INTERFACE CC_GCC_LIKE_ASM) + target_compile_options(common_compiler_flags INTERFACE -funroll-loops) + if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.2) + target_compile_options(common_compiler_flags INTERFACE -ftree-vectorize -fno-strict-overflow) + elseif(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.0) + target_compile_options(common_compiler_flags INTERFACE -ftree-vectorize) + elseif(CMAKE_C_COMPILER_VERSION VERSION_LESS 3.0) + message( + WARNING + "You are using an old and unsupported gcc version ${CMAKE_C_COMPILER_VERSION}, compile at your own risk!" + ) + endif() + else() + message( + WARNING + "Unsupported compiler (${CMAKE_C_COMPILER_ID}) for ${TARGET_ARCH}. Try GCC. Compile at your own risk!" + ) + endif() +elseif(TARGET_ARCH STREQUAL "alpha") + if(CMAKE_C_COMPILER_ID STREQUAL "GNU") + target_compile_definitions(common_compiler_flags INTERFACE CC_GCC_LIKE_ASM) + target_compile_options(common_compiler_flags INTERFACE -funroll-loops) + if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.2) + target_compile_options(common_compiler_flags INTERFACE -fno-strict-overflow) + elseif(CMAKE_C_COMPILER_VERSION VERSION_LESS 3.0) + message( + WARNING + "You are using an old and unsupported gcc version ${CMAKE_C_COMPILER_VERSION}, compile at your own risk!" + ) + endif() + else() + message( + WARNING + "Unsupported compiler (${CMAKE_C_COMPILER_ID}) for ${TARGET_ARCH}. Try GCC. Compile at your own risk!" + ) + endif() +else() + message( + WARNING + "Architecture ${TARGET_ARCH} not directly supported by project. Proceeding with generic flags. \ + Define any compile options you might need with env variables like CFLAGS." + ) endif() diff --git a/cmake/db_files.cmake b/cmake/db_files.cmake new file mode 100644 index 000000000..89ea86129 --- /dev/null +++ b/cmake/db_files.cmake @@ -0,0 +1,54 @@ +# Funtion to add db files to the target kamctl/kamdbctl +# It takes the group name, the file name and a boolean to determine if it is for kamctl or kamdbctl +# It processes the file with sed and installs it to the correct location +# Used by the helper function add_kamctl_db_files and add_kamdbctl_db_files + +function(add_db_files group_name file kamctl) + # message(WARNING "file name is ${file}") + # message(WARNING "group name is ${group_name}") + # Process the file with sed and install it + add_custom_command( + OUTPUT "${CMAKE_BINARY_DIR}/utils/kamctl/${file}" + COMMAND + sed -e "s#/usr/local/sbin#${BIN_DIR}#g" -e "s#/usr/local/share/kamailio#${SHARE_DIR}#g" -e + "s#/usr/local/etc/kamailio#${CFG_DIR}#g" < ${CMAKE_SOURCE_DIR}/utils/kamctl/${file} > + ${CMAKE_BINARY_DIR}/utils/kamctl/${file} + COMMENT "Processed ${file} with sed " + ) + + # Append to the depependencies list for the target kamctl/kamdbctl respectively + if(kamctl) + add_custom_target( + kamctl_${file} + DEPENDS ${CMAKE_BINARY_DIR}/utils/kamctl/${file} + COMMENT "Generating kamctl_${file}" + ) + set_property(GLOBAL APPEND PROPERTY KAMCTL_DEPENDENCIES "kamctl_${file}") + else() + add_custom_target( + kamdbctl_${file} + DEPENDS ${CMAKE_BINARY_DIR}/utils/kamctl/${file} + COMMENT "Generating kamctl_${file}" + ) + set_property(GLOBAL APPEND PROPERTY KAMDBCTL_DEPENDENCIES "kamdbctl_${file}") + endif() + install( + PROGRAMS ${CMAKE_BINARY_DIR}/utils/kamctl/${file} + DESTINATION ${CMAKE_INSTALL_LIBDIR}/${MAIN_NAME}/kamctl + COMPONENT ${group_name} + ) +endfunction() + +# Helper functions to add kamctl releated db files +# Used by utils/kamctl/CMakeLists.txt for the core kamctl files +# and by modules/db_{module_name}/CMakeLists.txt for the module specific kamctl files +function(add_kamctl_db_files group_name file) + add_db_files(${group_name} ${file} 1) +endfunction() + +# Helper functions to add kamdbctl releated db files +# Used by utils/kamctl/CMakeLists.txt for the core kamctl files +# and by modules/db_{module_name}/CMakeLists.txt for the module specific kamdbctl files +function(add_kamdbctl_db_files group_name file) + add_db_files(${group_name} ${file} 0) +endfunction() diff --git a/cmake/dbschema-version-postprocess.sh b/cmake/dbschema-version-postprocess.sh new file mode 100755 index 000000000..bc9611ee2 --- /dev/null +++ b/cmake/dbschema-version-postprocess.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env sh + +# This script is executed by CMake after db_berkeley and db_text schema files are generated. +# It appends the last line of each generated file (except 'version') +# to the 'version' file and truncates each generated file to the n line. + +# Get the number of lines to move to version file from the first argument +# Get the nubmer of lines to keep in the file from the second argument + +TAIL_NUMBER="$1" +HEAD_NUMBER="$2" + +# echo " Tail number: $TAIL_NUMBER" +# echo " Head number: $HEAD_NUMBER" + +# Loop through files, sorted alphabetically +for FILE in $(ls * | sort); do + # Check if it's a regular file and not the version file + if [ -f "$FILE" ] && [ "$FILE" != "version" ]; then + # echo " Processing: $FILE" + + # Check if file has at least 1 line before tail + if [ -s "$FILE" ]; then # -s checks if file is not empty + # Append the last line to the version file + # Using "printf" to ensure a newline is added after the tail output + tail -n "$TAIL_NUMBER" "$FILE" >> version + if [ $? -ne 0 ]; then # Check tail command result + echo "Warning: tail command failed for $FILE" + fi + + # Get the first line and overwrite the original file + head -n "$HEAD_NUMBER" "$FILE" > "$$FILE".tmp + if [ $? -ne 0 ]; then + echo "Warning: head command failed for $FILE" + else + mv "$$FILE".tmp "$FILE" + if [ $? -ne 0 ]; then + echo "Warning: mv command failed for $FILE" + fi + fi + else + echo "Warning: File $FILE is empty, skipping processing." + fi + fi +done + +echo "Finished processing schema files in $PWD" + +exit 0 # Indicate success diff --git a/cmake/dbschema.cmake b/cmake/dbschema.cmake new file mode 100644 index 000000000..d30014cba --- /dev/null +++ b/cmake/dbschema.cmake @@ -0,0 +1,256 @@ +# ---------- +# dbschema target: Old Makefiles: make dbschema declared in src/ Makefile This +# was using the makefile found in src/lib/srdb1/schema folder. +# +# CMakeLists.txt in src/ includes this file. All modules that have a schema +# should be appended to the end of this file. See the the rest of modules. +find_program(XSLTPROC_EXECUTABLE xsltproc QUIET) + +include(${CMAKE_SOURCE_DIR}/cmake/groups.cmake) +get_property(added_modules GLOBAL PROPERTY ADDED_MODULES_LIST) +# message(WARNING "Added modules: ${added_modules}") + +# Function to add a target for each database type prefix with dbschema ie +# db_name = redis -> target = dbschema_redis +function(add_db_target db_name xsl_file) + if(NOT XSLTPROC_EXECUTABLE) + return() + endif() + # Change name for the folder + if(db_name STREQUAL "pi_framework_table" OR db_name STREQUAL "pi_framework_mod") + set(db_name_folder xhttp_pi) + else() + set(db_name_folder ${db_name}) + endif() + + if(NOT (db_name_folder IN_LIST added_modules)) + return() + endif() + + find_group_name(${db_name_folder}) + + add_custom_target( + dbschema_${db_name} + COMMAND ${CMAKE_COMMAND} -E make_directory "${db_name_folder}" + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/utils/kamctl + COMMENT "Creating schemas for ${db_name}" + ) + + # db_name for old makefiles are different. + # old -> new (module names) + # db_berkeley -> db_berkeley + # mongodb -> db_mongodb + # mysql -> db_mysql + # db_oracle -> db_oracle + # postgres -> db_postgres + # db_redis -> db_redis + # db_sqlite -> db_sqlite + # dbtext -> db_text + # pi_framework -> xhttp_pi (this was not provided at all in the old makefiles) + # For consistency, we are now using the new names. + # For compatibility with tools, we are still using the old names for install folder + + # install folder based on db_name + if(db_name STREQUAL "db_mongodb") + set(install_folder "mongodb") + elseif(db_name STREQUAL "db_mysql") + set(install_folder "mysql") + elseif(db_name STREQUAL "db_postgres") + set(install_folder "postgres") + elseif(db_name STREQUAL "db_text") + set(install_folder "dbtext") + elseif(db_name STREQUAL "pi_framework_table" OR db_name STREQUAL "pi_framework_mod") + set(install_folder "xhttp_pi") + else() + set(install_folder "${db_name}") + endif() + + # Loop through each table and add a command for xsltproc + foreach(table ${EXTRACTED_TABLES}) + + # Determine the prefix/suffix + if(db_name STREQUAL "db_berkeley" + OR db_name STREQUAL "db_redis" + OR db_name STREQUAL "db_text" + OR db_name STREQUAL "db_mongodb" + ) + set(prefix '') + set(folder_suffix "${MAIN_NAME}") + else() + set(prefix "${table}-") + set(folder_suffix '') + endif() + + # Stringparam db is the db_* module name + add_custom_command( + TARGET dbschema_${db_name} + PRE_BUILD + COMMAND + "XML_CATALOG_FILES=${CATALOG}" ${XSLTPROC_EXECUTABLE} ${XSLTPROC_FLAGS} --stringparam dir + ${CMAKE_BINARY_DIR}/utils/kamctl/${db_name_folder}/${folder_suffix} --stringparam prefix + ${prefix} --stringparam db ${db_name} ${xsl_file} "kamailio-${table}.xml" + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/src/lib/srdb1/schema" + COMMENT "Processing ${table} for ${db_name}" + ) + endforeach() + + # Create version table for db_text and db_berkeley + # Use bash script + set(POSTPROCESS_SCRIPT "${CMAKE_SOURCE_DIR}/cmake/dbschema-version-postprocess.sh") + + if(db_name STREQUAL "db_text") + add_custom_command( + TARGET dbschema_${db_name} + POST_BUILD + COMMAND ${POSTPROCESS_SCRIPT} 1 1 + COMMENT "Creating version table for ${db_name}" + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/utils/kamctl/${db_name_folder}/${folder_suffix} + ) + elseif(db_name STREQUAL "db_berkeley") + add_custom_command( + TARGET dbschema_${db_name} + POST_BUILD + COMMAND ${POSTPROCESS_SCRIPT} 2 10 + COMMENT "Creating version table for ${db_name}" + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/utils/kamctl/${db_name_folder}/${folder_suffix} + ) + + endif() + + add_custom_target( + dbschema_${db_name}_clean + COMMAND ${CMAKE_COMMAND} -E remove_directory + "${CMAKE_BINARY_DIR}/utils/kamctl/${db_name_folder}" + COMMENT "Cleaning ${db_name} schema files" + ) + + add_dependencies(dbschema dbschema_${db_name}) + add_dependencies(dbschema_clean dbschema_${db_name}_clean) + + # message(WARNING "group name is ${group_name}") + # Before installing, ensure the target is built `dbschema_${db_name}` + # install as previously done in makefile folder. see naming above + # TODO: when tools adopt to new folder structure, replace the install_folder variable + # with ${db_name_folder} + + install( + DIRECTORY ${CMAKE_BINARY_DIR}/utils/kamctl/${db_name_folder}/ + DESTINATION ${CMAKE_INSTALL_DATADIR}/${MAIN_NAME}/${install_folder} + OPTIONAL + COMPONENT ${group_name} + ) +endfunction() + +if(NOT XSLTPROC_EXECUTABLE) + message(STATUS "xsltproc is not found. Skip dbschema target.") +else() + # Add targets for each database type + if(NOT TARGET dbschema) + add_custom_target(dbschema COMMENT "Generating schemas for all dbs...") + endif() + if(NOT TARGET dbschema_clean) + add_custom_target(dbschema_clean COMMENT "Cleaning schemas for all dbs...") + endif() + + option(XSLT_VALIDATE "Enable schema validation during XSL transformations" ON) + option(XSLT_VERBOSE "Enable verbose output for XSL transformations" OFF) + + set(XSLTPROC_FLAGS --xinclude) + if(NOT ${XSLT_VALIDATE}) + set(XSLTPROC_FLAGS ${XSLTPROC_FLAGS} --novalid) + endif() + if(${XSLT_VERBOSE}) + set(XSLTPROC_FLAGS ${XSLTPROC_FLAGS} --verbose) + endif() + + # Set the root directories + set(ROOTDIR ${CMAKE_SOURCE_DIR}) + set(STYLESHEETS ${ROOTDIR}/doc/stylesheets/dbschema_k/xsl) + set(CATALOG ${ROOTDIR}/doc/stylesheets/dbschema_k/catalog.xml) + + # List of XML files + file(GLOB TABLES "${CMAKE_SOURCE_DIR}/src/lib/srdb1/schema/kamailio-*.xml") + # message(WARNING "TABLES : ${TABLES}") + set(EXTRACTED_TABLES "") + foreach(table ${TABLES}) + get_filename_component(TABLE_NAME "${table}" NAME) + string(REPLACE "kamailio-" "" TABLE_NAME "${TABLE_NAME}") + string(REPLACE ".xml" "" TABLE_NAME "${TABLE_NAME}") + list(APPEND EXTRACTED_TABLES "${TABLE_NAME}") + list(SORT EXTRACTED_TABLES) + endforeach() + # Output the extracted table names + if(VERBOSE) + message(STATUS "Extracted Tables for DB schema generation: ${EXTRACTED_TABLES}") + endif() +endif() + +#---- DB berkeley +add_db_target(db_berkeley "${STYLESHEETS}/db_berkeley.xsl") + +#---- DB mongo +add_db_target(db_mongodb "${STYLESHEETS}/db_mongodb.xsl") +# Create the version-create.mongo script +# After processing the JSON files, create the version-create.mongo script +# Usage of generate_version_create_mongo.sh: +# 1. The first argument is the path to create the version-create.mongo script +# 2. The second argument is the path to the directory containing the JSON files +if(TARGET dbschema_db_mongodb) + add_custom_command( + TARGET dbschema_db_mongodb + POST_BUILD + COMMAND + sh generate_version_create_mongo.sh + "${CMAKE_BINARY_DIR}/utils/kamctl/db_mongodb/kamailio/version-create.mongo" + "${CMAKE_BINARY_DIR}/utils/kamctl/db_mongodb/kamailio" + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/utils/kamctl + COMMENT "Creating version-create.mongo from JSON files" + ) + + find_group_name("db_mongodb") + install( + FILES ${CMAKE_BINARY_DIR}/utils/kamctl/db_mongodb/kamailio/version-create.mongo + DESTINATION ${CMAKE_INSTALL_DATADIR}/${MAIN_NAME}/mongodb/${MAIN_NAME} + OPTIONAL + COMPONENT ${group_name} + ) +endif() + +#---- DB mysql +add_db_target(db_mysql "${STYLESHEETS}/db_mysql.xsl") + +#---- DB Oracle +add_db_target(db_oracle "${STYLESHEETS}/db_oracle.xsl") + +#---- DB postgres +add_db_target(db_postgres "${STYLESHEETS}/db_postgres.xsl") + +#---- DB redis +add_db_target(db_redis "${STYLESHEETS}/db_redis.xsl") + +#---- DB sqlite +add_db_target(db_sqlite "${STYLESHEETS}/db_sqlite.xsl") + +#---- DB text +add_db_target(db_text "${STYLESHEETS}/db_text.xsl") + +#---- DB xhttp_pi +add_db_target(pi_framework_table "${STYLESHEETS}/pi_framework_table.xsl") +add_db_target(pi_framework_mod "${STYLESHEETS}/pi_framework_mod.xsl") + +# Add alias targets that match the dbschema +if(XSLTPROC_EXECUTABLE + AND TARGET dbschema_pi_framework_table + AND TARGET dbschema_pi_framework_mod +) + add_custom_target(dbschema_xhttp_pi) + add_dependencies(dbschema_xhttp_pi dbschema_pi_framework_table dbschema_pi_framework_mod) + + add_custom_target(dbschema_xhttp_pi_clean) + add_dependencies( + dbschema_xhttp_pi dbschema_pi_framework_table_clean dbschema_pi_framework_mod_clean + ) + + add_dependencies(dbschema dbschema_pi_framework_table dbschema_pi_framework_mod) + add_dependencies(dbschema_clean dbschema_pi_framework_table_clean dbschema_pi_framework_mod_clean) +endif() diff --git a/cmake/deb-packaging.cmake b/cmake/deb-packaging.cmake new file mode 100644 index 000000000..253003f80 --- /dev/null +++ b/cmake/deb-packaging.cmake @@ -0,0 +1,18 @@ +# Retrieve all defined components +get_cmake_property(CPACK_COMPONENTS_ALL COMPONENTS) + +message(STATUS "All components: ${CPACK_COMPONENTS_ALL}") +# Optionally filter components +# list(FILTER CPACK_COMPONENTS_ALL INCLUDE REGEX "^(core|tls)$") + +set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) +# set(CPACK_PACKAGE_NAME kamailio) +set(CPACK_DEBIAN_PACKAGE_NAME kamailio) +set(CPACK_GENERATOR DEB) +set(CPACK_DEBIAN_PACKAGE_MAINTAINER "test") +set(CPACK_DEB_COMPONENT_INSTALL ON) +set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) +set(CPACK_PACKAGING_INSTALL_PREFIX "/usr") + +# Configure CPack with the selected components +include(CPack) diff --git a/cmake/defs.cmake b/cmake/defs.cmake index 42bfccd72..177198111 100644 --- a/cmake/defs.cmake +++ b/cmake/defs.cmake @@ -3,6 +3,21 @@ # properties of the common library The flags are then used by the other # libraries and executables +include(CMakeDependentOption) # cmake_dependent_option + +# Define full paths for installation directories with name of the project +# appended where needed. These are used in various places to define paths in +# config files and scripts using sed for the most part or install(CODE) scripts. +# For relative paths use the CMAKE_INSTALL_xxxDIR variables directly provided +# by CMake module GNUInstallDirs. +# If you need to change path for one of these directories, change the respective +# CMAKE_INSTALL_xxxDIR variable when invoking cmake, e.g.: +# cmake -DCMAKE_INSTALL_SBINDIR=custom/sbin ... +set(BIN_DIR "${CMAKE_INSTALL_FULL_SBINDIR}") +set(LIB_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/${MAIN_NAME}") +set(CFG_DIR "${CMAKE_INSTALL_FULL_SYSCONFDIR}/${MAIN_NAME}") +set(SHARE_DIR "${CMAKE_INSTALL_FULL_DATADIR}/${MAIN_NAME}") + add_library(common INTERFACE) # This interface is populated by common and some extra module specific flags @@ -21,10 +36,32 @@ set(OSREL ${CMAKE_SYSTEM_VERSION}) message(STATUS "OS version: ${OSREL}") # set(HOST_ARCH "__CPU_${CMAKE_HOST_SYSTEM_PROCESSOR}") +# Set the target architecture alias based on the system processor +# Currently known used archs +# i386, x86_64, aarch64, arm7, arm6, ppc64, mips, alpha if(CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i486|i586|i686") set(TARGET_ARCH "i386") elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64") set(TARGET_ARCH "x86_64") +elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm64$") + set(TARGET_ARCH "aarch64") +elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "armv8|armv7") + # Match any variant like v7l + # armv8 is the 64-bit ARM architecture, uname -a will report it as aarch64 probably + # if not retarget it to arm7 + # arm8 not supported yet from core atomic operations, fallback to arm7 + + # *** TODO: NOTE*** + # Old Makefile detected armv7 as an arm, for compatibility reasons we apply this as well. + # See https://github.com/kamailio/kamailio/issues/4333#issuecomment-3210890740 + set(TARGET_ARCH "arm") +elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "armv6") + set(TARGET_ARCH "arm6") + # Other older arm arch versions shall report as arm to kamailio +elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm") + set(TARGET_ARCH "arm") +elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64le$") + set(TARGET_ARCH "ppc64") else() set(TARGET_ARCH "${CMAKE_SYSTEM_PROCESSOR}") endif() @@ -38,14 +75,6 @@ message(STATUS "Target Processor Alias: ${TARGET_ARCH}") # supported_archs) message(FATAL_ERROR "Target architecture not supported") # endif() -# Flavor of the project flavour: sip-router, ser or kamailio This is used to -# define the MAIN_NAME flag TODO: Kamailio only -set(flavours kamailio) -set(FLAVOUR - "kamailio" - CACHE STRING "Flavour of the project") -set_property(CACHE FLAVOUR PROPERTY STRINGS ${flavours}) - # Verbose option (for debugging purposes) (was quiet in Makefile.defs) Probably # not needed in CMake and can be removed Use the -DCMAKE_VERBOSE_MAKEFILE=ON # option to enable verbose mode @@ -58,7 +87,6 @@ option(KMSTATS "Kamailio statistics" ON) option(FMSTATS "Fast memory statistics" ON) option(WITHAS "With Application server support" ON) option(RAW_SOCKS "Raw sockets support" ON) -option(MEMPKG "Package memory or sys " ON) option(NO_KQUEUE "No kqueue support" OFF) option(NO_SELECT "No select support" OFF) @@ -78,48 +106,60 @@ option(USE_MCAST "Use Multicast" ON) option(DNS_IP_HACK "Use DNS IP hack" ON) option(SHM_MMAP "Use mmap for shared memory" ON) -option(PKG_MALLOC "Use package memory" ON) +# memory managers and related debug mode +option(PKG_MALLOC "Use custom package memory manager (OFF will use system manager)" ON) +# Requires MEMPKG to be ON +option(MEMDBG "Use memory debugging system" ON) +cmake_dependent_option(MEMDBGSYS "Debug system memory manager" OFF "NOT PKG_MALLOC" OFF) + option(MEM_JOIN_FREE "Use mem_join_free" ON) option(F_MALLOC "Use f_malloc" ON) option(Q_MALLOC "Use q_malloc" ON) +# The following symbol is defined also when DBG_SR_MEMORY is defined +# in the respective q_malloc.h +# Same goes for fmalloc and tlsf malloc +# cmake_dependent_option(DBG_QM_MALLOC "Enable debugging info for q_malloc" OFF "Q_MALLOC" OFF) option(TLSF_MALLOC "Use tlsf_malloc" ON) -option(MALLOC_STATS "Use malloc stats" ON) -option(DBG_SR_MEMORY "Use memory debugging system" ON) option(USE_DNS_FAILOVER "Use DNS failover" ON) option(USE_DST_BLOCKLIST "Use destination blacklist" ON) option(HAVE_RESOLV_RES "Have resolv_res" ON) option(KSR_PTHREAD_MUTEX_SHARED "Use shared mutex for TLS" ON) -option(STATISTICS "Statistics" ON) -# if(${MEMPKG}) target_compile_definitions(common INTERFACE PKG_MALLOC) else() -# if(${MEMDBGSYS}) target_compile_definitions(common INTERFACE DDBG_SYS_MEMORY) -# endif() endif() + +# if(${MEMPKG}) +# target_compile_definitions(common INTERFACE PKG_MALLOC) +# else() +# if(${MEMDBGSYS}) +# target_compile_definitions(common INTERFACE DDBG_SYS_MEMORY) +# endif() +# endif() # ----------------------- # TLS support # ----------------------- option(TLS_HOOKS "TLS hooks support" ON) option(CORE_TLS "CORE_TLS" OFF) -# set(CORE_TLS "" CACHE STRING "CORE_TLS") set(TLS_HOOKS ON CACHE BOOL "TLS -# hooks support") +# set(CORE_TLS "" CACHE STRING "CORE_TLS") +# set(TLS_HOOKS +# ON +# CACHE BOOL "TLS hooks support" +# ) if(${CORE_TLS}) set(RELEASE "${RELEASE}-tls") set(TLS_HOOKS OFF) + target_compile_definitions(common INTERFACE CORE_TLS) else() set(TLS_HOOKS ON) endif() set(LIBSSL_SET_MUTEX_SHARED ON - CACHE BOOL - "enable workaround for libssl 1.1+ to set shared mutex attribute") + CACHE BOOL "enable workaround for libssl 1.1+ to set shared mutex attribute" +) if(NOT ${LIBSSL_SET_MUTEX_SHARED}) - message( - STATUS - "Checking if can enable workaround for libssl 1.1+ to set shared mutex attribute" - ) + message(STATUS "Checking if can enable workaround for libssl 1.1+ to set shared mutex attribute") # TODO: This can probably be reduced to a just a find_package(OpenSSL) call # and then check the version @@ -131,9 +171,7 @@ if(NOT ${LIBSSL_SET_MUTEX_SHARED}) if(OPENSSL_FOUND) message(STATUS "OpenSSL version: ${OPENSSL_VERSION}") if(${OPENSSL_VERSION} VERSION_GREATER_EQUAL "1.1.0") - message( - STATUS - "Enabling workaround for libssl 1.1+ to set shared mutex attribute") + message(STATUS "Enabling workaround for libssl 1.1+ to set shared mutex attribute") set(LIBSSL_SET_MUTEX_SHARED ON) endif() endif() @@ -162,36 +200,37 @@ option(USE_FAST_LOCK "Use fast locking if available" ON) # Fast-lock not available for all platforms like mips # Check the system processor type and set USE_FAST_LOCK accordingly if(USE_FAST_LOCK) - if(CMAKE_SYSTEM_PROCESSOR MATCHES - "i386|i486|i586|i686|x86_64|amd64|sparc64|sparc|ppc|ppc64|alpha|mips2|mips64") + if(TARGET_ARCH MATCHES "i386$|x86_64$|sparc64$|sparc$|ppc$|ppc64$|mips2$|mips64$") set(USE_FAST_LOCK YES) - elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm64") - set(USE_FAST_LOCK NO) - elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm6|arm7") + elseif(TARGET_ARCH MATCHES "aarch64$") set(USE_FAST_LOCK YES) - elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm|aarch64") + target_compile_definitions(common INTERFACE NOSMP) # memory barriers not + # implemented for arm + elseif(TARGET_ARCH MATCHES "arm6$|arm7$") + set(USE_FAST_LOCK YES) + elseif(TARGET_ARCH MATCHES "arm$") set(USE_FAST_LOCK YES) target_compile_definitions(common INTERFACE NOSMP) # memory barriers not # implemented for arm - elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "mips") + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "mips$") set(USE_FAST_LOCK NO) target_compile_definitions(common INTERFACE MIPS_HAS_LLSC) # likely target_compile_definitions(common INTERFACE NOSMP) # very likely - elseif() - message( - STATUS - "Fast locking not available for this platform, disabling USE_FAST_LOCK") + elseif(TARGET_ARCH MATCHES "alpha$") + set(USE_FAST_LOCK YES) + target_compile_definitions(common INTERFACE NOSMP) # very likely + else() + message(STATUS "Fast locking not available for this platform, disabling USE_FAST_LOCK") set(USE_FAST_LOCK NO) endif() endif() # Add definitions if USE_FAST_LOCK is YES -message(STATUS "Fast lock available: ${USE_FAST_LOCK}") +message(STATUS "Fast lock available: USE_FAST_LOCK=${USE_FAST_LOCK}") if(USE_FAST_LOCK) # If fast lock is available, add the definitions for it, else each OS will # have its own locking method - target_compile_definitions(common INTERFACE FAST_LOCK ADAPTIVE_WAIT - ADAPTIVE_WAIT_LOOPS=1024) + target_compile_definitions(common INTERFACE FAST_LOCK ADAPTIVE_WAIT ADAPTIVE_WAIT_LOOPS=1024) endif() # set(LOCKING_DEFINITION "${locking_method}") @@ -226,17 +265,25 @@ endif() if(Q_MALLOC) target_compile_definitions(common INTERFACE Q_MALLOC) endif() +# See note above on defintion of option +# Same goes for fmalloc and tlsf malloc +# if(DBG_QM_MALLOC) +# target_compile_definitions(common INTERFACE DBG_QM_MALLOC) +# endif() if(TLSF_MALLOC) target_compile_definitions(common INTERFACE TLSF_MALLOC) endif() -if(MALLOC_STATS) - target_compile_definitions(common INTERFACE MALLOC_STATS) +if(MEMDBG) + target_compile_definitions(common INTERFACE DBG_SR_MEMORY) + if(MEMDBGSYS) + target_compile_definitions(common INTERFACE DBG_SYS_MEMORY) + endif() endif() -if(DBG_SR_MEMORY) - target_compile_definitions(common INTERFACE DBG_SR_MEMORY) +if(MEM_JOIN_FREE) + target_compile_definitions(common INTERFACE MEM_JOIN_FREE) endif() if(USE_DNS_FAILOVER) @@ -291,20 +338,16 @@ if(NO_DEV_POLL) target_compile_definitions(common INTERFACE NO_DEV_POLL) endif() -if(RAW_SOCKS) - target_compile_definitions(common INTERFACE RAW_SOCKS) -endif() - if(KSR_PTHREAD_MUTEX_SHARED) target_compile_definitions(common INTERFACE KSR_PTHREAD_MUTEX_SHARED) endif() if(FMSTATS) - target_compile_definitions(common INTERFACE FMSTATS) + target_compile_definitions(common INTERFACE MALLOC_STATS) endif() if(KMSTATS) - target_compile_definitions(common INTERFACE KMSTATS) + target_compile_definitions(common INTERFACE USE_CORE_STATS STATISTICS) endif() include(${CMAKE_SOURCE_DIR}/cmake/compiler-specific.cmake) @@ -320,6 +363,20 @@ if(NOT DEFINED RUN_DIR) set(RUN_DIR "run/${MAIN_NAME}") endif() string(TOLOWER ${OS} OS_LOWER) + +# This is a convenience mechanism to provide undeclared options. +# If you find an undecleared option in the code, please declare it +# as an option os cache variable and try to use that instead of this. +set(EXTRA_DEFS + "" + CACHE STRING "Extra preprocessor definitions (semicolon-separated string, e.g. FOO;BAR=1)" +) +if(EXTRA_DEFS) + foreach(def ${EXTRA_DEFS}) + target_compile_definitions(common INTERFACE ${def}) + endforeach() +endif() + target_compile_definitions( common INTERFACE NAME="${MAIN_NAME}" @@ -342,7 +399,7 @@ target_compile_definitions( # TODO: We can use the generator expression to define extra flags # instead of checking the options each time $<$:USE_SCTP> - $<$:STATISTICS>) +) target_link_libraries(common INTERFACE common_compiler_flags) # ---------------------- diff --git a/cmake/groups.cmake b/cmake/groups.cmake index 73ef6d632..353611f03 100644 --- a/cmake/groups.cmake +++ b/cmake/groups.cmake @@ -60,7 +60,8 @@ set(MOD_LIST_BASIC topos_htable sipdump pv_headers - kemix) + kemix +) # * extra used modules, with no extra dependency set(MOD_LIST_EXTRA @@ -102,7 +103,8 @@ set(MOD_LIST_EXTRA xhttp_prom dlgs sworker - influxdbc) + influxdbc +) # * common modules depending on database set(MOD_LIST_DB @@ -139,11 +141,11 @@ set(MOD_LIST_DB uri_db userblocklist usrloc - secfilter) + secfilter +) # * common modules depending on database, using UID db schema -set(MOD_LIST_DBUID db2_ops uid_auth_db uid_avp_db uid_domain uid_gflags - uid_uri_db) +set(MOD_LIST_DBUID db2_ops uid_auth_db uid_avp_db uid_domain uid_gflags uid_uri_db) # * modules for devel purposes set(MOD_LIST_DEVEL misctest) @@ -233,7 +235,8 @@ set(MOD_LIST_PRESENCE pua_xmpp rls xcap_client - xcap_server) + xcap_server +) # * modules depending on lua library set(MOD_LIST_LUA app_lua) @@ -296,7 +299,8 @@ set(MOD_LIST_IMS ims_charging ims_ocs ims_diameter_server - ims_ipsec_pcscf) + ims_ipsec_pcscf +) # * modules depending on java library set(MOD_LIST_JAVA app_java) @@ -439,7 +443,8 @@ set(MOD_LIST_ALL ${MOD_LIST_MICROHTTPD} ${MOD_LIST_NGHTTP2} ${MOD_LIST_GCRYPT} - ${MOD_LIST_RTP_MEDIA_SERVER}) + ${MOD_LIST_RTP_MEDIA_SERVER} +) # sort the list list(SORT MOD_LIST_ALL) @@ -453,15 +458,15 @@ list(SORT MOD_LIST_ALL) # compile or link dependencies set(MODULE_GROUP_ALL ${MOD_LIST_ALL}) -set(MODULE_GROUP_DEFAULT ${MOD_LIST_BASIC} ${MOD_LIST_EXTRA} ${MOD_LIST_DB} - ${MOD_LIST_DBUID} ${MOD_LIST_DEVEL} ${MOD_LIST_JSDT}) +set(MODULE_GROUP_DEFAULT ${MOD_LIST_BASIC} ${MOD_LIST_EXTRA} ${MOD_LIST_DB} ${MOD_LIST_DBUID} + ${MOD_LIST_DEVEL} ${MOD_LIST_JSDT} +) # Modules in this group are the default compiled modules due to no # internal/external compile or link dependencies # module_group_standard=$(mod_list_basic) $(mod_list_extra) \ $(mod_list_devel) # $(mod_list_jsdt) -set(MODULE_GROUP_STANDARD ${MOD_LIST_BASIC} ${MOD_LIST_EXTRA} ${MOD_LIST_DEVEL} - ${MOD_LIST_JSDT}) +set(MODULE_GROUP_STANDARD ${MOD_LIST_BASIC} ${MOD_LIST_EXTRA} ${MOD_LIST_DEVEL} ${MOD_LIST_JSDT}) # Modules in this group are considered a standard part due to widespread usage, # but they have dependencies that must be satisfied for compilation (e.g., lcr, @@ -475,50 +480,22 @@ set(MODULE_GROUP_COMMON ${MOD_LIST_RADIUS} ${MOD_LIST_XMLDEPS} ${MOD_LIST_PRESENCE} - ${MOD_LIST_TLSDEPS}) - -# For db use (db modules, excluding drivers) module_group_db=$(mod_list_db) -set(MODULE_GROUP_DB ${MOD_LIST_DB}) - -# For mysql module_group_mysql_driver=$(mod_list_mysql) -# module_group_mysql=$(module_group_mysql_driver) $(module_group_db) -set(MODULE_GROUP_MYSQL_DRIVER ${MOD_LIST_MYSQL}) -set(MODULE_GROUP_MYSQL ${MODULE_GROUP_MYSQL_DRIVER} ${MODULE_GROUP_DB}) - -# For postgress module_group_postgres_driver=$(mod_list_postgres) -# module_group_postgres=$(module_group_postgres_driver) $(module_group_db) -set(MODULE_GROUP_POSTGRES_DRIVER ${MOD_LIST_POSTGRES}) -set(MODULE_GROUP_POSTGRES ${MODULE_GROUP_POSTGRES_DRIVER} ${MODULE_GROUP_DB}) - -# For sqlite module_group_sqlite_driver=$(mod_list_sqlite) -# module_group_sqlite=$(module_group_sqlite_driver) $(module_group_db) -set(MODULE_GROUP_SQLITE_DRIVER ${MOD_LIST_SQLITE}) -set(MODULE_GROUP_SQLITE ${MODULE_GROUP_SQLITE_DRIVER} ${MODULE_GROUP_DB}) - -# For radius -set(MODULE_GROUP_RADIUS ${MODULE_LIST_RADIUS}) - -# For presence kamailio modules -set(MODULE_GROUP_PRESENCE ${MOD_LIST_PRESENCE}) - -# For cassandra -set(MODULE_GROUP_CASSANDRA_DRIVER ${MODULE_LIST_CASSANDRA}) -set(MODULE_GROUP_CASSANDRA ${MODULE_GROUP_CASSANDRA_DRIVER} ${MODULE_GROUP_DB}) - -# For all modules not compiled by default -# list(FILTER MOD_LIST_ALL EXCLUDE REGEX "${MODULE_GROUP_DEFAULT}") + ${MOD_LIST_TLSDEPS} +) # for all protocols (excl. local ones such as unix, tcp, etc.) set(AVAILABLE_GROUPS ALL DEFAULT STANDARD COMMON) # --- Groups defined for pacKaging ### # Standard modules in main pkg -set(MODULE_GROUP_KSTANDARD ${MOD_LIST_BASIC} ${MOD_LIST_EXTRA} ${MOD_LIST_DB} - ${MOD_LIST_DBUID} ${MOD_LIST_PCRE} ${MOD_LIST_JSDT}) +set(MODULE_GROUP_KSTANDARD ${MOD_LIST_BASIC} ${MOD_LIST_EXTRA} ${MOD_LIST_DB} ${MOD_LIST_DBUID} + ${MOD_LIST_PCRE} ${MOD_LIST_JSDT} +) # Standard modules without any dependencies (such as pcre) -set(MODULE_GROUP_KMINI ${MOD_LIST_BASIC} ${MOD_LIST_EXTRA} ${MOD_LIST_DB} - ${MOD_LIST_DBUID} ${MOD_LIST_JSDT}) +set(MODULE_GROUP_KMINI ${MOD_LIST_BASIC} ${MOD_LIST_EXTRA} ${MOD_LIST_DB} ${MOD_LIST_DBUID} + ${MOD_LIST_JSDT} +) # pkg pcre module set(MODULE_GROUP_KPCRE ${MOD_LIST_PCRE}) @@ -710,87 +687,110 @@ set(MODULE_GROUP_KRTP_MEDIA_SERVER ${MOD_LIST_RTP_MEDIA_SERVER}) # list of static modules set(STATIC_MODULES "") -list( - APPEND - AVAILABLE_GROUPS - KSTANDARD - KMINI - KPCRE - KMYSQL - KPOSTGRES - KCPL - KXML - KRADIUS - KUNIXODBC - KPERL - KSNMPSTATS - KXMPP - KBERKELEY - KLDAP - KUTILS - KHTTP_ASYNC - KMEMCACHED - KTLS_BASIC - KTLS - KTLS_WOLFSSL - KWEBSOCKET - KPRESENCE - KLUA - KPYTHON - KPYTHON3 - KRUBY - KGEOIP - KGEOIP2 - KSQLITE - KJSON_BASIC - KJSON - KJANSSON_BASIC - KJANSSON - KREDIS - KIMS - KOUTBOUND - KJAVA - KDNSSEC - KSCTP - KAUTHEPH - KGZCOMPRESS - KUUID - KEV - KJWT - KLWSC - KSTIRSHAKEN - KKAZOO - KMONGODB - KCNXCC - KERLANG - KSYSTEMD - KNSQ - KRABBITMQ - KPHONENUM - KKAFKA - KMQTT - KNATS - KRUXC - KMICROHTTPD - KNGHTTP2 - KGCRYPT - KSECSIPID - KRT_MEDIA_SERVER) - -# # Option to allow the user to define which group to build -# set(SELECTED_PACKAGE_GROUP -# "" -# CACHE STRING "Select the package group to build from" -# PARENT_SCOPE -# ) -# set_property(CACHE SELECTED_PACKAGE_GROUP PROPERTY STRINGS ${PACKAGE_GROUPS}) - -# # Ensure the selected group is valid -# if(NOT SELECTED_PACKAGE_GROUP IN_LIST PACKAGE_GROUPS) -# message( -# FATAL_ERROR -# "Invalid package group selected: ${SELECTED_PACKAGE_GROUP}. Please choose from: ${PACKAGE_GROUPS}." -# ) -# endif() - -# message(STATUS "Building package group: ${SELECTED_PACKAGE_GROUP}") +set(MODULE_GROUP_PACKAGE_GROUPS + KSTANDARD + KPCRE + KMYSQL + KPOSTGRES + KCPL + KXML + KRADIUS + KUNIXODBC + KPERL + KSNMPSTATS + KXMPP + KBERKELEY + KLDAP + KUTILS + KHTTP_ASYNC + KMEMCACHED + KTLS_BASIC + KTLS + KTLS_WOLFSSL + KWEBSOCKET + KPRESENCE + KLUA + KPYTHON + KPYTHON3 + KRUBY + KGEOIP + KGEOIP2 + KSQLITE + KJSON_BASIC + KJSON + KJANSSON_BASIC + KJANSSON + KREDIS + KIMS + KOUTBOUND + KJAVA + KDNSSEC + KSCTP + KAUTHEPH + KGZCOMPRESS + KUUID + KEV + KJWT + KLWSC + KSTIRSHAKEN + KKAZOO + KMONGODB + KCNXCC + KERLANG + KSYSTEMD + KNSQ + KRABBITMQ + KPHONENUM + KKAFKA + KMQTT + KNATS + KRUXC + KMICROHTTPD + KNGHTTP2 + KGCRYPT + KSECSIPID + KRTP_MEDIA_SERVER +) + +# Add group names to available group and provide "ALL_PACKAGED" as well +# for easier packaging using components +list(APPEND AVAILABLE_GROUPS ALL_PACKAGED KMINI ${MODULE_GROUP_PACKAGE_GROUPS}) + +# Find the group name for the target by checking if the module is in the +# list of modules to be built and if so, use the group name of that module +# group_name can be used afterwards. +function(find_group_name module) + set(group_name + "" + PARENT_SCOPE + ) + separate_arguments(groups_to_search_in UNIX_COMMAND ${MODULE_GROUP_NAME}) + list(FIND groups_to_search_in "ALL_PACKAGED" group_index) + if(group_index GREATER -1) + # Remove it from the list and append the package groups + list(REMOVE_AT groups_to_search_in ${group_index}) + list(APPEND groups_to_search_in ${MODULE_GROUP_PACKAGE_GROUPS}) + endif() + # message(WARNING "Groups provided by the user ${groups_to_search_in}") + # message(WARNING "Looking for group for db ${module}") + foreach(group IN LISTS groups_to_search_in) + get_property(MODULES_IN_GROUP VARIABLE PROPERTY "MODULE_GROUP_${group}") + # message(WARNING "Modules in group ${group}: ${MODULES_IN_GROUP}") + if("${module}" IN_LIST MODULES_IN_GROUP) + # message(WARNING "Found group ${group} for db ${module}") + set(group_name + "${group}" + PARENT_SCOPE + ) + return() + endif() + endforeach() + message(STATUS "module ${module} not found in any group") + # if not found in any group, it's probably in include_modules list + # Use the group name "user_specified_list" associated with include_modules + # list, otherwise it will generate Unknown group component + set(group_name + "user_specified_list" + PARENT_SCOPE + ) +endfunction() diff --git a/cmake/modules-docs.cmake b/cmake/modules-docs.cmake index 721ba7d0b..e4c111a86 100644 --- a/cmake/modules-docs.cmake +++ b/cmake/modules-docs.cmake @@ -1,43 +1,30 @@ -option(BUILD_DOC "Build documentation" ON) - -# Readme file and man page -find_program(XSLTPROC_EXECUTABLE xsltproc QUIET) -find_program(LYNX_EXECUTABLE lynx QUIET) -find_program(DOCBOOK2X_EXECUTABLE docbook2x-man QUIET) - -if(BUILD_DOC AND (NOT XSLTPROC_EXECUTABLE OR NOT LYNX_EXECUTABLE)) - message(STATUS "xsltproc or lynx not found but required for doc generation.") - set(BUILD_DOC OFF) -endif() - -if(BUILD_DOC AND (NOT DOCBOOK2X_EXECUTABLE)) - message(STATUS "docbook2x-man not found but required for man generation.") - set(BUILD_DOC OFF) -endif() - option(DOCS_XSL_VAIDATION "Docbook document validation" OFF) -option(DOCS_NOCATALOG - "ON: Use standard catalog from OS | OFF: Use custom catalog " OFF) +option(DOCS_NOCATALOG "ON: Use standard catalog from OS | OFF: Use custom catalog " OFF) set(DOCS_SOURCES "index.html" - CACHE STRING "Documentation files list") + CACHE STRING "Documentation files list" +) set(DOCS_README ${DOCS_SOURCES} - CACHE STRING "Readme Documentation files list") + CACHE STRING "Readme Documentation files list" +) set(DOCS_HTML ${DOCS_SOURCES} - CACHE STRING "HTML Documentation files list") + CACHE STRING "HTML Documentation files list" +) set(DOCS_TXT ${DOCS_SOURCES} - CACHE STRING "TXT Documentation files list") + CACHE STRING "TXT Documentation files list" +) set(DOCS_OUTPUT_DIR ${CMAKE_BINARY_DIR}/doc/docbook - CACHE STRING "Path to build HTML docs") + CACHE STRING "Path to build HTML docs" +) set(DOCBOOK_DIR ${CMAKE_SOURCE_DIR}/doc/docbook) set(STYLESHEET_DIR ${CMAKE_SOURCE_DIR}/doc/stylesheets) @@ -49,7 +36,8 @@ set(README_XSL ${DOCBOOK_DIR}/readme.xsl) set(DOCS_HTML_CSS "/css/sr-doc.css" - CACHE STRING "Path to the CSS file") + CACHE STRING "Path to the CSS file" +) set(CATALOG ${DOCBOOK_DIR}/catalog.xml) @@ -62,11 +50,13 @@ endif() # Set flags for xtproc for generating documentation and allow user defined set(DOCS_XSLTPROC_FLAGS "" - CACHE STRING "Xsltransform processor flags") + CACHE STRING "Xsltransform processor flags" +) if(NOT DOCS_XSL_VAIDATION) if(VERBOSE) message(STATUS "DOCS_XSL_VAIDATION=OFF" - "Disabling xsl validation when generating documentation") + "Disabling xsl validation when generating documentation" + ) endif() list(APPEND DOCS_XSLTPROC_FLAGS --novalid) endif() @@ -74,10 +64,11 @@ endif() # Set lynx flags for generating readmes and allow user defined set(DOCS_LYNX_FLAGS "-nolist" - CACHE STRING "Lynx readme generator flags") + CACHE STRING "Lynx readme generator flags" +) # Function to add a module docs entry -function(docs_add_module module_name) +function(docs_add_module group_name module_name) # message(STATUS "Adding documentation for module ${MODULE_NAME}") set(module_path "${MODULES_DIR}/${module_name}") set(module_doc_path "${module_path}/doc") @@ -85,101 +76,98 @@ function(docs_add_module module_name) add_custom_target( ${module_name}_doc_text DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${module_name}/${module_name}.txt - COMMENT "Processing target ${module_name}_doc_text") + COMMENT "Processing target ${module_name}_doc_text" + ) # This is essentialy an alias of doc_text target but with extra copy command # to copy the text file to the source tree directory. - add_custom_target(${module_name}_readme - COMMENT "Processing target ${module_name}_readme") + add_custom_target(${module_name}_readme COMMENT "Processing target ${module_name}_readme") add_dependencies(${module_name}_readme ${module_name}_doc_text) add_dependencies(kamailio_docs_readme ${module_name}_readme) add_custom_target( ${module_name}_doc_html DEPENDS ${DOCS_OUTPUT_DIR}/${module_name}.html - COMMENT "Processing target ${module_name}_doc_html") + COMMENT "Processing target ${module_name}_doc_html" + ) - add_custom_target(${module_name}_doc - COMMENT "Processing target ${module_name}_doc") - add_dependencies(${module_name}_doc ${module_name}_doc_text - ${module_name}_doc_html) + add_custom_target(${module_name}_doc COMMENT "Processing target ${module_name}_doc") + add_dependencies(${module_name}_doc ${module_name}_doc_text ${module_name}_doc_html) # Man docs only if author of module provided xml for man. if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/${module_name}.xml) add_custom_target( ${module_name}_man DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/${module_name}.xml - COMMENT "Processing target ${module_name}_man") + COMMENT "Processing target ${module_name}_man" + ) add_dependencies(kamailio_docs_man ${module_name}_man) endif() # Each version has seperate custon commands for not recompiling all if 1 gets # changed. - if(XSLTPROC_EXECUTABLE) - if(LYNX_EXECUTABLE) - add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${module_name}/${module_name}.txt - COMMAND - # TXT version - just plain text - ${XMLCATATLOGX} ${XSLTPROC_EXECUTABLE} ${DOCS_XSLTPROC_FLAGS} - --xinclude ${TXT_XSL} ${module_name}.xml | ${LYNX_EXECUTABLE} - ${DOCS_LYNX_FLAGS} -stdin -dump > - ${CMAKE_CURRENT_BINARY_DIR}/${module_name}/${module_name}.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/doc/${module_name}.xml - ${TXT_XSL} - # ${SINGLE_HTML_XSL} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/doc - COMMENT "Generating text documentation with for ${module_name}") - - # Add custom command to copy the README file after the readme target is - # built. The readme target depends on doc_text so it will regenerate if - # it's input changed. - add_custom_command( - TARGET ${module_name}_readme - POST_BUILD - COMMAND - ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_BINARY_DIR}/${module_name}/${module_name}.txt - ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/README - COMMENT "Copying README file to source tree for ${module_name}") - - add_custom_command( - OUTPUT ${DOCS_OUTPUT_DIR}/${module_name}.html - COMMAND - # HTML version - ${XMLCATATLOGX} ${XSLTPROC_EXECUTABLE} ${DOCS_XSLTPROC_FLAGS} - --xinclude --stringparam base.dir ${DOCS_OUTPUT_DIR} --stringparam - root.filename ${module_name} --stringparam html.stylesheet - ${DOCS_HTML_CSS} --stringparam html.ext ".html" ${SINGLE_HTML_XSL} - ${module_name}.xml - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/doc/${module_name}.xml - ${SINGLE_HTML_XSL} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/doc - COMMENT "Generating html documentation for ${module_name}") - endif() - - add_custom_command( - # man version - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${module_name}/${module_name}.7 - COMMAND ${DOCBOOK2X_EXECUTABLE} -s ${STYLESHEET_DIR}/serdoc2man.xsl - ${module_name}.xml - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/doc/${module_name}.xml - ${STYLESHEET_DIR}/serdoc2man.xsl - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${module_name} - COMMENT "Processing target ${module_name}_man") - - install( - FILES ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/README - RENAME README.${module_name} - DESTINATION ${CMAKE_INSTALL_DOCDIR}/modules - COMPONENT kamailio_docs) - - install( - FILES ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/${module_name}.7 - DESTINATION ${CMAKE_INSTALL_DATADIR}/man/man7 - COMPONENT kamailio_docs - OPTIONAL) - endif() + # if(XSLTPROC_EXECUTABLE) + # if(LYNX_EXECUTABLE) + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${module_name}/${module_name}.txt + COMMAND + # TXT version - just plain text + ${XMLCATATLOGX} ${XSLTPROC_EXECUTABLE} ${DOCS_XSLTPROC_FLAGS} --xinclude ${TXT_XSL} + ${module_name}.xml | ${LYNX_EXECUTABLE} ${DOCS_LYNX_FLAGS} -stdin -dump > + ${CMAKE_CURRENT_BINARY_DIR}/${module_name}/${module_name}.txt + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/doc/${module_name}.xml ${TXT_XSL} + # ${SINGLE_HTML_XSL} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/doc + COMMENT "Generating text documentation with for ${module_name}" + ) + + # Add custom command to copy the README file after the readme target is + # built. The readme target depends on doc_text so it will regenerate if + # it's input changed. + add_custom_command( + TARGET ${module_name}_readme + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/${module_name}/${module_name}.txt + ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/README + COMMENT "Copying README file to source tree for ${module_name}" + ) + + add_custom_command( + OUTPUT ${DOCS_OUTPUT_DIR}/${module_name}.html + COMMAND + # HTML version + ${XMLCATATLOGX} ${XSLTPROC_EXECUTABLE} ${DOCS_XSLTPROC_FLAGS} --xinclude --stringparam + base.dir ${DOCS_OUTPUT_DIR} --stringparam root.filename ${module_name} --stringparam + html.stylesheet ${DOCS_HTML_CSS} --stringparam html.ext ".html" ${SINGLE_HTML_XSL} + ${module_name}.xml + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/doc/${module_name}.xml ${SINGLE_HTML_XSL} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/doc + COMMENT "Generating html documentation for ${module_name}" + ) + # endif() + + add_custom_command( + # man version + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${module_name}/${module_name}.7 + COMMAND ${DOCBOOK2X_EXECUTABLE} -s ${STYLESHEET_DIR}/serdoc2man.xsl ${module_name}.xml + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/doc/${module_name}.xml + ${STYLESHEET_DIR}/serdoc2man.xsl + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${module_name} + COMMENT "Processing target ${module_name}_man" + ) + + install( + FILES ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/README + RENAME README.${module_name} + DESTINATION ${CMAKE_INSTALL_DOCDIR}/modules + COMPONENT ${group_name} + ) + + install( + FILES ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/${module_name}.7 + DESTINATION ${CMAKE_INSTALL_DATADIR}/man/man7 + COMPONENT ${group_name} + OPTIONAL + ) + # endif() endfunction() diff --git a/cmake/modules/FindBerkeleyDB.cmake b/cmake/modules/FindBerkeleyDB.cmake index d0b4461d1..5978237aa 100644 --- a/cmake/modules/FindBerkeleyDB.cmake +++ b/cmake/modules/FindBerkeleyDB.cmake @@ -38,7 +38,8 @@ if(CMAKE_HOST_APPLE) execute_process( COMMAND ${HOMEBREW_EXECUTABLE} --prefix berkeley-db@5.3 OUTPUT_VARIABLE _BerkeleyDB_homebrew_prefix - ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) + ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE + ) endif() endif() @@ -55,7 +56,8 @@ find_path( 5.3 db5.3 5 - db5) + db5 +) mark_as_advanced(BerkeleyDB_INCLUDE_DIR) unset(_BerkeleyDB_homebrew_prefix) @@ -68,21 +70,22 @@ if(NOT BerkeleyDB_LIBRARY) set(CMAKE_FIND_USE_CMAKE_PATH FALSE) endif() - get_filename_component(_BerkeleyDB_lib_hint "${BerkeleyDB_INCLUDE_DIR}" - DIRECTORY) + get_filename_component(_BerkeleyDB_lib_hint "${BerkeleyDB_INCLUDE_DIR}" DIRECTORY) find_library( BerkeleyDB_LIBRARY_RELEASE NAMES db48 db53 db NAMES_PER_DIR HINTS ${_BerkeleyDB_lib_hint} - PATH_SUFFIXES lib) + PATH_SUFFIXES lib + ) mark_as_advanced(BerkeleyDB_LIBRARY_RELEASE) find_library( BerkeleyDB_LIBRARY_DEBUG NAMES db48 db53 db NAMES_PER_DIR HINTS ${_BerkeleyDB_lib_hint} - PATH_SUFFIXES debug/lib) + PATH_SUFFIXES debug/lib + ) mark_as_advanced(BerkeleyDB_LIBRARY_DEBUG) unset(_BerkeleyDB_lib_hint) @@ -97,23 +100,23 @@ endif() if(BerkeleyDB_INCLUDE_DIR) file(STRINGS "${BerkeleyDB_INCLUDE_DIR}/db.h" _BerkeleyDB_version_strings - REGEX "^#define[\t ]+DB_VERSION_(MAJOR|MINOR|PATCH)[ \t]+[0-9]+.*") - string(REGEX - REPLACE ".*#define[\t ]+DB_VERSION_MAJOR[ \t]+([0-9]+).*" "\\1" - _BerkeleyDB_version_major "${_BerkeleyDB_version_strings}") - string(REGEX - REPLACE ".*#define[\t ]+DB_VERSION_MINOR[ \t]+([0-9]+).*" "\\1" - _BerkeleyDB_version_minor "${_BerkeleyDB_version_strings}") - string(REGEX - REPLACE ".*#define[\t ]+DB_VERSION_PATCH[ \t]+([0-9]+).*" "\\1" - _BerkeleyDB_version_patch "${_BerkeleyDB_version_strings}") + REGEX "^#define[\t ]+DB_VERSION_(MAJOR|MINOR|PATCH)[ \t]+[0-9]+.*" + ) + string(REGEX REPLACE ".*#define[\t ]+DB_VERSION_MAJOR[ \t]+([0-9]+).*" "\\1" + _BerkeleyDB_version_major "${_BerkeleyDB_version_strings}" + ) + string(REGEX REPLACE ".*#define[\t ]+DB_VERSION_MINOR[ \t]+([0-9]+).*" "\\1" + _BerkeleyDB_version_minor "${_BerkeleyDB_version_strings}" + ) + string(REGEX REPLACE ".*#define[\t ]+DB_VERSION_PATCH[ \t]+([0-9]+).*" "\\1" + _BerkeleyDB_version_patch "${_BerkeleyDB_version_strings}" + ) unset(_BerkeleyDB_version_strings) # The MAJOR.MINOR.PATCH version will be logged in the following find_package_handle_standard_args() command. set(_BerkeleyDB_full_version ${_BerkeleyDB_version_major}.${_BerkeleyDB_version_minor}.${_BerkeleyDB_version_patch} ) - set(BerkeleyDB_VERSION - ${_BerkeleyDB_version_major}.${_BerkeleyDB_version_minor}) + set(BerkeleyDB_VERSION ${_BerkeleyDB_version_major}.${_BerkeleyDB_version_minor}) unset(_BerkeleyDB_version_major) unset(_BerkeleyDB_version_minor) unset(_BerkeleyDB_version_patch) @@ -123,30 +126,33 @@ include(FindPackageHandleStandardArgs) find_package_handle_standard_args( BerkeleyDB REQUIRED_VARS BerkeleyDB_LIBRARY BerkeleyDB_INCLUDE_DIR - VERSION_VAR _BerkeleyDB_full_version) + VERSION_VAR _BerkeleyDB_full_version +) unset(_BerkeleyDB_full_version) if(BerkeleyDB_FOUND AND NOT TARGET BerkeleyDB::BerkeleyDB) add_library(BerkeleyDB::BerkeleyDB UNKNOWN IMPORTED) set_target_properties( - BerkeleyDB::BerkeleyDB PROPERTIES INTERFACE_INCLUDE_DIRECTORIES - "${BerkeleyDB_INCLUDE_DIR}") + BerkeleyDB::BerkeleyDB PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${BerkeleyDB_INCLUDE_DIR}" + ) if(BerkeleyDB_LIBRARY_RELEASE) set_property( TARGET BerkeleyDB::BerkeleyDB APPEND - PROPERTY IMPORTED_CONFIGURATIONS RELEASE) + PROPERTY IMPORTED_CONFIGURATIONS RELEASE + ) set_target_properties( - BerkeleyDB::BerkeleyDB PROPERTIES IMPORTED_LOCATION_RELEASE - "${BerkeleyDB_LIBRARY_RELEASE}") + BerkeleyDB::BerkeleyDB PROPERTIES IMPORTED_LOCATION_RELEASE "${BerkeleyDB_LIBRARY_RELEASE}" + ) endif() if(BerkeleyDB_LIBRARY_DEBUG) set_property( TARGET BerkeleyDB::BerkeleyDB APPEND - PROPERTY IMPORTED_CONFIGURATIONS DEBUG) + PROPERTY IMPORTED_CONFIGURATIONS DEBUG + ) set_target_properties( - BerkeleyDB::BerkeleyDB PROPERTIES IMPORTED_LOCATION_DEBUG - "${BerkeleyDB_LIBRARY_DEBUG}") + BerkeleyDB::BerkeleyDB PROPERTIES IMPORTED_LOCATION_DEBUG "${BerkeleyDB_LIBRARY_DEBUG}" + ) endif() endif() diff --git a/cmake/modules/FindErlang.cmake b/cmake/modules/FindErlang.cmake index e7913f4e3..5335853b4 100644 --- a/cmake/modules/FindErlang.cmake +++ b/cmake/modules/FindErlang.cmake @@ -49,9 +49,7 @@ This will define the following variables: #]=======================================================================] include(FindPackageHandleStandardArgs) -set(Erlang_BIN_PATH $ENV{ERLANG_HOME}/bin /opt/bin /sw/bin /usr/bin - /usr/local/bin /opt/local/bin -) +set(Erlang_BIN_PATH $ENV{ERLANG_HOME}/bin /opt/bin /sw/bin /usr/bin /usr/local/bin /opt/local/bin) find_program( Erlang_RUNTIME @@ -66,28 +64,23 @@ find_program( ) execute_process( - COMMAND erl -noshell -eval "io:format(\"~s\", [code:lib_dir()])" -s erlang - halt OUTPUT_VARIABLE Erlang_OTP_LIB_DIR + COMMAND erl -noshell -eval "io:format(\"~s\", [code:lib_dir()])" -s erlang halt + OUTPUT_VARIABLE Erlang_OTP_LIB_DIR ) execute_process( - COMMAND erl -noshell -eval "io:format(\"~s\", [code:root_dir()])" -s erlang - halt OUTPUT_VARIABLE Erlang_OTP_ROOT_DIR + COMMAND erl -noshell -eval "io:format(\"~s\", [code:root_dir()])" -s erlang halt + OUTPUT_VARIABLE Erlang_OTP_ROOT_DIR ) execute_process( - COMMAND - erl -noshell -eval - "io:format(\"~s\",[filename:basename(code:lib_dir('erl_interface'))])" -s - erlang halt - OUTPUT_VARIABLE Erlang_EI_DIR + COMMAND erl -noshell -eval "io:format(\"~s\",[filename:basename(code:lib_dir('erl_interface'))])" + -s erlang halt OUTPUT_VARIABLE Erlang_EI_DIR ) execute_process( - COMMAND - erl -noshell -eval - "io:format(\"~s\",[filename:basename(code:lib_dir('erts'))])" -s erlang halt - OUTPUT_VARIABLE Erlang_ERTS_DIR + COMMAND erl -noshell -eval "io:format(\"~s\",[filename:basename(code:lib_dir('erts'))])" -s erlang + halt OUTPUT_VARIABLE Erlang_ERTS_DIR ) set(Erlang_EI_PATH ${Erlang_OTP_LIB_DIR}/${Erlang_EI_DIR}) @@ -113,39 +106,28 @@ if(Erlang_FOUND) if(NOT TARGET Erlang::Erlang) add_library(Erlang::Erlang INTERFACE IMPORTED) set_target_properties( - Erlang::Erlang PROPERTIES INTERFACE_INCLUDE_DIRECTORIES - ${Erlang_OTP_ROOT_DIR}/usr/include + Erlang::Erlang PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${Erlang_OTP_ROOT_DIR}/usr/include ) endif() if(NOT TARGET Erlang::ERTS) add_library(Erlang::ERTS STATIC IMPORTED) set_target_properties( - Erlang::ERTS - PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${Erlang_ERTS_INCLUDE_DIRS} - IMPORTED_LOCATION ${Erlang_ERTS_LIBRARY_PATH}/liberts.a + Erlang::ERTS PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${Erlang_ERTS_INCLUDE_DIRS} + IMPORTED_LOCATION ${Erlang_ERTS_LIBRARY_PATH}/liberts.a ) endif() if(NOT TARGET Erlang::EI) add_library(erlang_ei STATIC IMPORTED) - set_property( - TARGET erlang_ei PROPERTY IMPORTED_LOCATION - ${Erlang_EI_LIBRARY_PATH}/libei.a - ) + set_property(TARGET erlang_ei PROPERTY IMPORTED_LOCATION ${Erlang_EI_LIBRARY_PATH}/libei.a) add_library(erlang_erl_interface STATIC IMPORTED) set_property( - TARGET erlang_erl_interface - PROPERTY IMPORTED_LOCATION ${Erlang_EI_LIBRARY_PATH}/liberl_interface.a + TARGET erlang_erl_interface PROPERTY IMPORTED_LOCATION + ${Erlang_EI_LIBRARY_PATH}/liberl_interface.a ) add_library(Erlang::EI INTERFACE IMPORTED) - set_property( - TARGET Erlang::EI PROPERTY INTERFACE_INCLUDE_DIRECTORIES - ${Erlang_EI_INCLUDE_DIRS} - ) - set_property( - TARGET Erlang::EI PROPERTY INTERFACE_LINK_LIBRARIES erlang_ei - erlang_erl_interface - ) + set_property(TARGET Erlang::EI PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Erlang_EI_INCLUDE_DIRS}) + set_property(TARGET Erlang::EI PROPERTY INTERFACE_LINK_LIBRARIES erlang_ei erlang_erl_interface) endif() endif(Erlang_FOUND) diff --git a/cmake/modules/FindLdap.cmake b/cmake/modules/FindLdap.cmake index 2e255e93d..b6f0798f3 100644 --- a/cmake/modules/FindLdap.cmake +++ b/cmake/modules/FindLdap.cmake @@ -58,29 +58,21 @@ endif() if(EXISTS ${Ldap_INCLUDE_DIRS}/ldap_features.h) file(READ ${Ldap_INCLUDE_DIRS}/ldap_features.h LDAP_FEATURES_H_CONTENT) - string(REGEX MATCH "#define LDAP_VENDOR_VERSION_MAJOR[ ]+[0-9]+" - _LDAP_VERSION_MAJOR_MATCH ${LDAP_FEATURES_H_CONTENT} + string(REGEX MATCH "#define LDAP_VENDOR_VERSION_MAJOR[ ]+[0-9]+" _LDAP_VERSION_MAJOR_MATCH + ${LDAP_FEATURES_H_CONTENT} ) - string(REGEX MATCH "#define LDAP_VENDOR_VERSION_MINOR[ ]+[0-9]+" - _LDAP_VERSION_MINOR_MATCH ${LDAP_FEATURES_H_CONTENT} + string(REGEX MATCH "#define LDAP_VENDOR_VERSION_MINOR[ ]+[0-9]+" _LDAP_VERSION_MINOR_MATCH + ${LDAP_FEATURES_H_CONTENT} ) - string(REGEX MATCH "#define LDAP_VENDOR_VERSION_PATCH[ ]+[0-9]+" - _LDAP_VERSION_PATCH_MATCH ${LDAP_FEATURES_H_CONTENT} + string(REGEX MATCH "#define LDAP_VENDOR_VERSION_PATCH[ ]+[0-9]+" _LDAP_VERSION_PATCH_MATCH + ${LDAP_FEATURES_H_CONTENT} ) - string(REGEX REPLACE ".*_MAJOR[ ]+(.*)" "\\1" LDAP_VERSION_MAJOR - ${_LDAP_VERSION_MAJOR_MATCH} - ) - string(REGEX REPLACE ".*_MINOR[ ]+(.*)" "\\1" LDAP_VERSION_MINOR - ${_LDAP_VERSION_MINOR_MATCH} - ) - string(REGEX REPLACE ".*_PATCH[ ]+(.*)" "\\1" LDAP_VERSION_PATCH - ${_LDAP_VERSION_PATCH_MATCH} - ) + string(REGEX REPLACE ".*_MAJOR[ ]+(.*)" "\\1" LDAP_VERSION_MAJOR ${_LDAP_VERSION_MAJOR_MATCH}) + string(REGEX REPLACE ".*_MINOR[ ]+(.*)" "\\1" LDAP_VERSION_MINOR ${_LDAP_VERSION_MINOR_MATCH}) + string(REGEX REPLACE ".*_PATCH[ ]+(.*)" "\\1" LDAP_VERSION_PATCH ${_LDAP_VERSION_PATCH_MATCH}) - set(Ldap_VERSION - "${LDAP_VERSION_MAJOR}.${LDAP_VERSION_MINOR}.${LDAP_VERSION_PATCH}" - ) + set(Ldap_VERSION "${LDAP_VERSION_MAJOR}.${LDAP_VERSION_MINOR}.${LDAP_VERSION_PATCH}") endif() include(FindPackageHandleStandardArgs) @@ -94,9 +86,7 @@ find_package_handle_standard_args( if(Ldap_FOUND AND NOT TARGET Lber::Lber) add_library(Lber::Lber UNKNOWN IMPORTED) - set_target_properties( - Lber::Lber PROPERTIES IMPORTED_LOCATION "${Lber_LIBRARY}" - ) + set_target_properties(Lber::Lber PROPERTIES IMPORTED_LOCATION "${Lber_LIBRARY}") endif() if(Ldap_FOUND AND NOT TARGET Ldap::Ldap) diff --git a/cmake/modules/FindLibev.cmake b/cmake/modules/FindLibev.cmake index 3fe054eee..2aefb1b9c 100644 --- a/cmake/modules/FindLibev.cmake +++ b/cmake/modules/FindLibev.cmake @@ -53,8 +53,6 @@ endif() list(APPEND LIBEV_LIBRARIES "${LIBEV_LIBRARY}") include(FindPackageHandleStandardArgs) -find_package_handle_standard_args( - Libev REQUIRED_VARS LIBEV_LIBRARIES LIBEV_INCLUDE_DIR -) +find_package_handle_standard_args(Libev REQUIRED_VARS LIBEV_LIBRARIES LIBEV_INCLUDE_DIR) mark_as_advanced(LIBEV_INCLUDE_DIR LIBEV_LIBRARIES LIBEV_LIBRARY) diff --git a/cmake/modules/FindLibfreeradiusClient.cmake b/cmake/modules/FindLibfreeradiusClient.cmake index d57799624..d47e3af62 100644 --- a/cmake/modules/FindLibfreeradiusClient.cmake +++ b/cmake/modules/FindLibfreeradiusClient.cmake @@ -14,7 +14,8 @@ find_path(LibfreeradiusClient_INCLUDE_DIR NAMES freeradius-client.h) find_library( LibfreeradiusClient_LIBRARY NAMES freeradius-client freeradius-eap - PATH_SUFFIXES freeradius) + PATH_SUFFIXES freeradius +) mark_as_advanced(LibfreeradiusClient_LIBRARY LibfreeradiusClient_INCLUDE_DIR) @@ -22,21 +23,23 @@ mark_as_advanced(LibfreeradiusClient_LIBRARY LibfreeradiusClient_INCLUDE_DIR) # all listed variables are TRUE include(FindPackageHandleStandardArgs) find_package_handle_standard_args( - LibfreeradiusClient REQUIRED_VARS LibfreeradiusClient_LIBRARY - LibfreeradiusClient_INCLUDE_DIR) + LibfreeradiusClient REQUIRED_VARS LibfreeradiusClient_LIBRARY LibfreeradiusClient_INCLUDE_DIR +) if(LibfreeradiusClient_FOUND) find_package_message( LibfreeradiusClient "Found Libfreeradius: ${LibfreeradiusClient_LIBRARY}" - "[${LibfreeradiusClient_LIBRARY}][${LibfreeradiusClient_INCLUDE_DIR}]") + "[${LibfreeradiusClient_LIBRARY}][${LibfreeradiusClient_INCLUDE_DIR}]" + ) set(LibfreeradiusClient_INCLUDE_DIRS ${LibfreeradiusClient_INCLUDE_DIR}) set(LibfreeradiusClient_LIBRARIES ${LibfreeradiusClient_LIBRARY}) add_library(LibfreeradiusClient::LIBFREERADIUS UNKNOWN IMPORTED) set_target_properties( - LibfreeradiusClient::LIBFREERADIUS - PROPERTIES INTERFACE_INCLUDE_DIRECTORIES - "${LibfreeradiusClient_INCLUDE_DIR}") + LibfreeradiusClient::LIBFREERADIUS PROPERTIES INTERFACE_INCLUDE_DIRECTORIES + "${LibfreeradiusClient_INCLUDE_DIR}" + ) set_target_properties( - LibfreeradiusClient::LIBFREERADIUS - PROPERTIES IMPORTED_LOCATION "${LibfreeradiusClient_LIBRARY}") + LibfreeradiusClient::LIBFREERADIUS PROPERTIES IMPORTED_LOCATION + "${LibfreeradiusClient_LIBRARY}" + ) endif() diff --git a/cmake/modules/FindMariaDBClient.cmake b/cmake/modules/FindMariaDBClient.cmake index 43f7279bf..1c4031e9b 100644 --- a/cmake/modules/FindMariaDBClient.cmake +++ b/cmake/modules/FindMariaDBClient.cmake @@ -40,8 +40,7 @@ set(BAK_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_SHARED_LIBRARY_SUFFIX}) find_library( MariaDBClient_LIBRARY - NAMES mariadb libmariadb mariadbclient libmariadbclient mysqlclient - libmysqlclient + NAMES mariadb libmariadb mariadbclient libmariadbclient mysqlclient libmysqlclient PATH_SUFFIXES mariadb mysql ) set(CMAKE_FIND_LIBRARY_SUFFIXES ${BAK_CMAKE_FIND_LIBRARY_SUFFIXES}) diff --git a/cmake/modules/FindMySQL.cmake b/cmake/modules/FindMySQL.cmake index 35d3cea10..b54bd58d1 100644 --- a/cmake/modules/FindMySQL.cmake +++ b/cmake/modules/FindMySQL.cmake @@ -130,9 +130,7 @@ set(ENV_OR_OPT_VARS ) # Mark the variable names that have values that are paths -set(ENV_OR_OPT_PATH_VARS MYSQL_DIR MYSQL_INCLUDE_DIR MYSQL_LIB_DIR - MYSQL_PLUGIN_DIR -) +set(ENV_OR_OPT_PATH_VARS MYSQL_DIR MYSQL_INCLUDE_DIR MYSQL_LIB_DIR MYSQL_PLUGIN_DIR) foreach(_xvar ${ENV_OR_OPT_VARS}) @@ -167,10 +165,8 @@ endforeach() # were given if(MYSQL_DIR AND (MYSQL_INCLUDE_DIR OR MYSQL_LIB_DIR)) - message( - FATAL_ERROR - "Both MYSQL_DIR and MYSQL_INCLUDE_DIR/MYSQL_LIB_DIR were specified," - " use either one or the other way of pointing at MySQL location." + message(FATAL_ERROR "Both MYSQL_DIR and MYSQL_INCLUDE_DIR/MYSQL_LIB_DIR were specified," + " use either one or the other way of pointing at MySQL location." ) endif() @@ -215,9 +211,7 @@ else() add_definitions(-DNDEBUG) # FIXME what?! endif() -set(_exe_fallback_path /usr/bin /usr/local/bin /opt/mysql/mysql/bin - /usr/local/mysql/bin -) +set(_exe_fallback_path /usr/bin /usr/local/bin /opt/mysql/mysql/bin /usr/local/mysql/bin) set(_include_fallback_path /usr/include/mysql @@ -322,10 +316,7 @@ string(REPLACE ";" " " _pp_include_fallback_path "${_include_fallback_path}") message(STATUS "You will link ${_link_type}ally to the MySQL client" " library (set with -DMYSQLCLIENT_STATIC_LINKING=)" ) -message( - STATUS - "Searching for ${_link_type} libraries with the base name(s) \"${_pp_search_libs}\"" -) +message(STATUS "Searching for ${_link_type} libraries with the base name(s) \"${_pp_search_libs}\"") ########################################################################## # @@ -367,20 +358,12 @@ endmacro() macro(_mysql_config _var _regex _opt) _mysql_conf(_mysql_config_output ${_opt}) - string(REGEX MATCHALL "${_regex}([^ ]+)" _mysql_config_output - "${_mysql_config_output}" - ) - string(REGEX REPLACE "^[ \t]+" "" _mysql_config_output - "${_mysql_config_output}" - ) + string(REGEX MATCHALL "${_regex}([^ ]+)" _mysql_config_output "${_mysql_config_output}") + string(REGEX REPLACE "^[ \t]+" "" _mysql_config_output "${_mysql_config_output}") if(CMAKE_SYSTEM_NAME MATCHES "SunOS") - string(REGEX REPLACE " -latomic" "" _mysql_config_output - "${_mysql_config_output}" - ) + string(REGEX REPLACE " -latomic" "" _mysql_config_output "${_mysql_config_output}") endif() - string(REGEX REPLACE "${_regex}" "" _mysql_config_output - "${_mysql_config_output}" - ) + string(REGEX REPLACE "${_regex}" "" _mysql_config_output "${_mysql_config_output}") separate_arguments(_mysql_config_output) set(${_var} ${_mysql_config_output}) endmacro() @@ -403,23 +386,13 @@ endmacro() macro(_mysql_config_replace _var _regex1 _replace _regex2 _opt) _mysql_conf(_mysql_config_output ${_opt}) - string(REGEX MATCHALL "${_regex2}([^ ]+)" _mysql_config_output - "${_mysql_config_output}" - ) - string(REGEX REPLACE "^[ \t]+" "" _mysql_config_output - "${_mysql_config_output}" - ) + string(REGEX MATCHALL "${_regex2}([^ ]+)" _mysql_config_output "${_mysql_config_output}") + string(REGEX REPLACE "^[ \t]+" "" _mysql_config_output "${_mysql_config_output}") if(CMAKE_SYSTEM_NAME MATCHES "SunOS") - string(REGEX REPLACE " -latomic" "" _mysql_config_output - "${_mysql_config_output}" - ) + string(REGEX REPLACE " -latomic" "" _mysql_config_output "${_mysql_config_output}") endif() - string(REGEX REPLACE "${_regex2}" "" _mysql_config_output - "${_mysql_config_output}" - ) - string(REGEX REPLACE "${_regex1}" "${_replace}" _mysql_config_output - "${_mysql_config_output}" - ) + string(REGEX REPLACE "${_regex2}" "" _mysql_config_output "${_mysql_config_output}") + string(REGEX REPLACE "${_regex1}" "${_replace}" _mysql_config_output "${_mysql_config_output}") separate_arguments(_mysql_config_output) set(${_var} ${_mysql_config_output}) endmacro() @@ -442,10 +415,8 @@ macro(_check_lib_search_error _lib_dir_var _lib_var _exta_err_string) message("_lib_dir_var \"${_lib_dir_var}\"") endif() - set(_err_string - "Could not find ${_link_type} " - "\"${_pp_search_libs}\" in ${_lib_dir_var} " - "\"${_lib_dir}\" ${_exta_err_string}" + set(_err_string "Could not find ${_link_type} " "\"${_pp_search_libs}\" in ${_lib_dir_var} " + "\"${_lib_dir}\" ${_exta_err_string}" ) if(NOT ${_lib_var}) @@ -529,9 +500,7 @@ elseif( set(MYSQL_INCLUDE_DIR "${MYSQL_DIR}/include") if(NOT EXISTS "${MYSQL_INCLUDE_DIR}/mysql.h") - message(FATAL_ERROR "MYSQL_DIR given, but no \"mysql.h\" " - "in \"${MYSQL_INCLUDE_DIR}\"" - ) + message(FATAL_ERROR "MYSQL_DIR given, but no \"mysql.h\" " "in \"${MYSQL_INCLUDE_DIR}\"") endif() elseif(MYSQL_CONFIG_EXECUTABLE) @@ -550,9 +519,8 @@ elseif(MYSQL_CONFIG_EXECUTABLE) endif() if(NOT EXISTS "${MYSQL_INCLUDE_DIR}/mysql.h") - message( - FATAL_ERROR "Could not find \"mysql.h\" in \"${MYSQL_INCLUDE_DIR}\" " - "found from running \"${MYSQL_CONFIG_EXECUTABLE}\"" + message(FATAL_ERROR "Could not find \"mysql.h\" in \"${MYSQL_INCLUDE_DIR}\" " + "found from running \"${MYSQL_CONFIG_EXECUTABLE}\"" ) endif() @@ -615,9 +583,7 @@ elseif( ) if(FINDMYSQL_DEBUG) - message("DBG: Using find_library() searching " - "MYSQL_DIR and \"${_pp_lib_subdirs}\"" - ) + message("DBG: Using find_library() searching " "MYSQL_DIR and \"${_pp_lib_subdirs}\"") endif() find_library( @@ -631,9 +597,7 @@ elseif( get_filename_component(MYSQL_LIB_DIR "${MYSQL_LIB}" PATH) set(MYSQL_LIBRARIES "${MYSQL_LIB}") - if(((NOT DEFINED MYSQL_PLUGIN_DIR) OR (NOT ${MYSQL_PLUGIN_DIR})) - AND MYSQL_LIB_DIR - ) + if(((NOT DEFINED MYSQL_PLUGIN_DIR) OR (NOT ${MYSQL_PLUGIN_DIR})) AND MYSQL_LIB_DIR) if(EXISTS "${MYSQL_LIB_DIR}/plugin") set(MYSQL_PLUGIN_DIR "${MYSQL_LIB_DIR}/plugin") else() @@ -721,8 +685,7 @@ elseif(MYSQL_CONFIG_EXECUTABLE) # Replace the current library references with the full path # to the library, i.e. the -L will be ignored _mysql_config_replace( - MYSQL_LIBRARIES "(mysqlclient|mysqlclient_r)" "${MYSQL_LIB}" "(^| )-l" - "--libs" + MYSQL_LIBRARIES "(mysqlclient|mysqlclient_r)" "${MYSQL_LIB}" "(^| )-l" "--libs" ) else() @@ -798,11 +761,10 @@ endif() list(LENGTH MYSQL_LIBRARIES len) if(MYSQL_STATIC_LINKING AND (len LESS 2)) message( - WARNING - "Statically linking MySQL client library normally requires linking" - " additional libraries that the client library depends on. It seems" - " no extra libraries have been specified. Provide the list of required" - " dependencies through MYSQL_EXTRA_LIBRARIES." + WARNING "Statically linking MySQL client library normally requires linking" + " additional libraries that the client library depends on. It seems" + " no extra libraries have been specified. Provide the list of required" + " dependencies through MYSQL_EXTRA_LIBRARIES." ) endif() @@ -819,9 +781,7 @@ set(MYSQL_CLIENT_LIBS ${MYSQL_LIBRARIES}) if(MYSQL_INCLUDE_DIR AND NOT MYSQL_VERSION) # Write the C source file that will include the MySQL headers - set(GETMYSQLVERSION_SOURCEFILE - "${CMAKE_CURRENT_BINARY_DIR}/getmysqlversion.c" - ) + set(GETMYSQLVERSION_SOURCEFILE "${CMAKE_CURRENT_BINARY_DIR}/getmysqlversion.c") file(WRITE "${GETMYSQLVERSION_SOURCEFILE}" "#include \n" "#include \n" "int main() {\n" " printf(\"%s\", MYSQL_SERVER_VERSION);\n" "}\n" @@ -829,8 +789,7 @@ if(MYSQL_INCLUDE_DIR AND NOT MYSQL_VERSION) # Compile and run the created executable, store output in MYSQL_VERSION try_run( - _run_result _compile_result "${CMAKE_BINARY_DIR}" - "${GETMYSQLVERSION_SOURCEFILE}" + _run_result _compile_result "${CMAKE_BINARY_DIR}" "${GETMYSQLVERSION_SOURCEFILE}" CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${MYSQL_INCLUDE_DIR}" RUN_OUTPUT_VARIABLE MYSQL_VERSION ) @@ -859,12 +818,8 @@ endif() # Clean up so only numeric, in case of "-alpha" or similar string(REGEX MATCHALL "([0-9]+.[0-9]+.[0-9]+)" MYSQL_VERSION "${MYSQL_VERSION}") # To create a fully numeric version, first normalize so N.NN.NN -string(REGEX REPLACE "[.]([0-9])[.]" ".0\\1." MYSQL_VERSION_ID - "${MYSQL_VERSION}" -) -string(REGEX REPLACE "[.]([0-9])$" ".0\\1" MYSQL_VERSION_ID - "${MYSQL_VERSION_ID}" -) +string(REGEX REPLACE "[.]([0-9])[.]" ".0\\1." MYSQL_VERSION_ID "${MYSQL_VERSION}") +string(REGEX REPLACE "[.]([0-9])$" ".0\\1" MYSQL_VERSION_ID "${MYSQL_VERSION_ID}") # Finally remove the dot string(REGEX REPLACE "[.]" "" MYSQL_VERSION_ID "${MYSQL_VERSION_ID}") set(MYSQL_NUM_VERSION ${MYSQL_VERSION_ID}) @@ -933,10 +888,7 @@ endif() # ########################################################################## -message( - STATUS - "MySQL client environment/cmake variables set that the user can override" -) +message(STATUS "MySQL client environment/cmake variables set that the user can override") message(STATUS " MYSQL_DIR : ${MYSQL_DIR}") message(STATUS " MYSQL_INCLUDE_DIR : ${MYSQL_INCLUDE_DIR}") @@ -949,9 +901,7 @@ message(STATUS " MYSQL_CXXFLAGS : ${MYSQL_CXXFLAGS}") message(STATUS " MYSQLCLIENT_STATIC_LINKING : ${MYSQLCLIENT_STATIC_LINKING}") message(STATUS " MYSQLCLIENT_NO_THREADS : ${MYSQLCLIENT_NO_THREADS}") -message( - STATUS "MySQL client optional environment/cmake variables set by the user" -) +message(STATUS "MySQL client optional environment/cmake variables set by the user") message(STATUS " MYSQL_EXTRA_LIBRARIES : ${MYSQL_EXTRA_LIBRARIES}") message(STATUS " MYSQL_LINK_FLAGS : ${MYSQL_LINK_FLAGS}") diff --git a/cmake/modules/FindNETSNMP.cmake b/cmake/modules/FindNETSNMP.cmake index edf1c7394..eed4d28d3 100644 --- a/cmake/modules/FindNETSNMP.cmake +++ b/cmake/modules/FindNETSNMP.cmake @@ -38,12 +38,8 @@ endif(NETSNMP_LIBS) find_program(NETSNMP_CONFIG_BIN net-snmp-config) if(NETSNMP_CONFIG_BIN) - execute_process( - COMMAND ${NETSNMP_CONFIG_BIN} --cflags OUTPUT_VARIABLE _NETSNMP_CFLAGS - ) - execute_process( - COMMAND ${NETSNMP_CONFIG_BIN} --libs OUTPUT_VARIABLE _NETSNMP_LIBS - ) + execute_process(COMMAND ${NETSNMP_CONFIG_BIN} --cflags OUTPUT_VARIABLE _NETSNMP_CFLAGS) + execute_process(COMMAND ${NETSNMP_CONFIG_BIN} --libs OUTPUT_VARIABLE _NETSNMP_LIBS) # Strip trailing and leading whitespaces string(STRIP "${_NETSNMP_CFLAGS}" _NETSNMP_CFLAGS) string(STRIP "${_NETSNMP_LIBS}" _NETSNMP_LIBS) @@ -60,14 +56,13 @@ if(NETSNMP_CONFIG_BIN) add_library(NETSNMP::NETSNMP INTERFACE IMPORTED) set_target_properties( - NETSNMP::NETSNMP PROPERTIES COMPILE_FLAGS "${NETSNMP_CFLAGS}" - INTERFACE_LINK_LIBRARIES "${NETSNMP_LIBS}" + NETSNMP::NETSNMP PROPERTIES COMPILE_FLAGS "${NETSNMP_CFLAGS}" INTERFACE_LINK_LIBRARIES + "${NETSNMP_LIBS}" ) if(NOT TARGET NETSNMP::NETSNMP) message( - FATAL_ERROR - "Failed to create NETSNMP::NETSNMP target, check the output of net-snmp-config" + FATAL_ERROR "Failed to create NETSNMP::NETSNMP target, check the output of net-snmp-config" ) endif() else() diff --git a/cmake/modules/FindOracle.cmake b/cmake/modules/FindOracle.cmake index 1b88fe4ee..8ccd24421 100644 --- a/cmake/modules/FindOracle.cmake +++ b/cmake/modules/FindOracle.cmake @@ -56,8 +56,7 @@ set(ORACLE_VERSIONS 11 10 ) -set(ORACLE_OCI_NAMES clntsh libclntsh oci -)# Dirty trick might help on OSX, see issues/89 +set(ORACLE_OCI_NAMES clntsh libclntsh oci) # Dirty trick might help on OSX, see issues/89 set(ORACLE_OCCI_NAMES libocci occi) set(ORACLE_NNZ_NAMES ociw32) foreach(loop_var IN LISTS ORACLE_VERSIONS) @@ -91,9 +90,7 @@ find_library( PATHS ${ORACLE_LIB_DIR} ) -set(ORACLE_LIBRARY ${ORACLE_OCI_LIBRARY} ${ORACLE_OCCI_LIBRARY} - ${ORACLE_NNZ_LIBRARY} -) +set(ORACLE_LIBRARY ${ORACLE_OCI_LIBRARY} ${ORACLE_OCCI_LIBRARY} ${ORACLE_NNZ_LIBRARY}) if(NOT WIN32) set(ORACLE_LIBRARY ${ORACLE_LIBRARY} ${ORACLE_CLNTSH_LIBRARY}) @@ -104,9 +101,7 @@ set(ORACLE_LIBRARIES ${ORACLE_LIBRARY}) # Handle the QUIETLY and REQUIRED arguments and set ORACLE_FOUND to TRUE # if all listed variables are TRUE include(FindPackageHandleStandardArgs) -find_package_handle_standard_args( - Oracle DEFAULT_MSG ORACLE_LIBRARY ORACLE_INCLUDE_DIR -) +find_package_handle_standard_args(Oracle DEFAULT_MSG ORACLE_LIBRARY ORACLE_INCLUDE_DIR) if(NOT ORACLE_FOUND) message( diff --git a/cmake/modules/FindRadius.cmake b/cmake/modules/FindRadius.cmake index 0ed23c171..75bb4d96d 100644 --- a/cmake/modules/FindRadius.cmake +++ b/cmake/modules/FindRadius.cmake @@ -14,7 +14,8 @@ find_package(PkgConfig) set(RADIUSCLIENTS FREERADIUS RADCLI RADIUSCLIENT_NG) set(RADIUSCLIENT RADCLI - CACHE STRING "Radius Client to use") + CACHE STRING "Radius Client to use" +) set_property(CACHE RADIUSCLIENT PROPERTY STRINGS ${RADIUSCLIENTS}) # option(FREERADIUS "Use freeradius-client library" OFF) @@ -37,8 +38,7 @@ if(${RADIUSCLIENT} STREQUAL "FREERADIUS") # - freeradius-client library set(RADIUSCLIENT_LIB USE_FREERADIUS) find_package(LibfreeradiusClient REQUIRED) - add_library(RadiusClient::RadiusClient ALIAS - LibfreeradiusClient::LIBFREERADIUS) + add_library(RadiusClient::RadiusClient ALIAS LibfreeradiusClient::LIBFREERADIUS) elseif(${RADIUSCLIENT} STREQUAL "RADCLI") # - radcli library set(RADIUSCLIENT_LIB USE_RADCLI) diff --git a/cmake/os-specific.cmake b/cmake/os-specific.cmake index ab67a4f7d..5222f6c7f 100644 --- a/cmake/os-specific.cmake +++ b/cmake/os-specific.cmake @@ -1,8 +1,6 @@ -# Quite analogous to the Makefile.defs file This file is used to define the -# common flags and options for the project The flags are defined as INTERFACE -# properties of the common library The flags are then used by the other -# libraries and executables - +# This file is included from the def.cmake CMakeLists.txt file. +# It sets up the OS-specific flags and includes the appropriate +# OS-specific CMake file. set(OS_SPECIFIC_DIR "${CMAKE_SOURCE_DIR}/cmake/os-specific") if(CMAKE_SYSTEM_NAME STREQUAL "Linux") include(${OS_SPECIFIC_DIR}/linux.cmake) @@ -15,6 +13,6 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") # FreeBSD specific flags include(${OS_SPECIFIC_DIR}/freebsd.cmake) -elseif() +else() message(FATAL_ERROR "Unsupported system: ${CMAKE_SYSTEM_NAME}") endif() diff --git a/cmake/os-specific/darwin.cmake b/cmake/os-specific/darwin.cmake index a43c07514..529c422a7 100644 --- a/cmake/os-specific/darwin.cmake +++ b/cmake/os-specific/darwin.cmake @@ -1,7 +1,4 @@ -message( - STATUS - "Configuring for Darwin (Apple stationary operating systems (macOS, OS X, etc.)" -) +message(STATUS "Configuring for Darwin (Apple stationary operating systems (macOS, OS X, etc.)") target_compile_definitions( common @@ -16,7 +13,8 @@ target_compile_definitions( HAVE_CONNECT_ECONNRESET_BUG HAVE_TIMEGM USE_SIGWAIT - HAVE_IP_MREQN) + HAVE_IP_MREQN +) target_link_libraries(common INTERFACE resolv) target_link_libraries(common_utils INTERFACE resolv) @@ -25,20 +23,22 @@ if(NOT ${USE_FAST_LOCK}) target_compile_definitions(common INTERFACE USE_PTHREAD_MUTEX USE_SYSV_SEM) endif() -if (CMAKE_HOST_SYSTEM_VERSION VERSION_LESS 24) - message(STATUS "Running on Big Sur") -set(CMAKE_MODULE_LINKER_FLAGS - "${CMAKE_MODULE_LINKER_FLAGS} -bundle -flat_namespace -undefined suppress") -set(CMAKE_SHARED_LINKER_FLAGS - "${CMAKE_SHARED_LINKER_FLAGS} -dynamiclib -flat_namespace -undefined suppress" -) -else () -set(CMAKE_MODULE_LINKER_FLAGS - "${CMAKE_MODULE_LINKER_FLAGS} -bundle -flat_namespace -undefined dynamic_lookup") -set(CMAKE_SHARED_LINKER_FLAGS - "${CMAKE_SHARED_LINKER_FLAGS} -dynamiclib -flat_namespace -undefined dynamic_lookup" -) -endif () +if(CMAKE_HOST_SYSTEM_VERSION VERSION_LESS 24) + message(STATUS "Running on Big Sur") + set(CMAKE_MODULE_LINKER_FLAGS + "${CMAKE_MODULE_LINKER_FLAGS} -bundle -flat_namespace -undefined suppress" + ) + set(CMAKE_SHARED_LINKER_FLAGS + "${CMAKE_SHARED_LINKER_FLAGS} -dynamiclib -flat_namespace -undefined suppress" + ) +else() + set(CMAKE_MODULE_LINKER_FLAGS + "${CMAKE_MODULE_LINKER_FLAGS} -bundle -flat_namespace -undefined dynamic_lookup" + ) + set(CMAKE_SHARED_LINKER_FLAGS + "${CMAKE_SHARED_LINKER_FLAGS} -dynamiclib -flat_namespace -undefined dynamic_lookup" + ) +endif() if(NOT NO_SELECT) target_compile_definitions(common INTERFACE HAVE_SELECT) diff --git a/cmake/os-specific/dragonfly.cmake b/cmake/os-specific/dragonfly.cmake index 09df6bb6c..5334c46e1 100644 --- a/cmake/os-specific/dragonfly.cmake +++ b/cmake/os-specific/dragonfly.cmake @@ -10,7 +10,8 @@ target_compile_definitions( HAVE_ALLOCA_H HAVE_TIMEGM HAVE_SCHED_SETSCHEDULER - HAVE_IP_MREQN) + HAVE_IP_MREQN +) if(${RAW_SOCKS}) target_compile_definitions(common INTERFACE USE_RAW_SOCKS) @@ -21,8 +22,7 @@ if(NOT ${USE_FAST_LOCK}) target_link_libraries(common INTERFACE pthread) else() # Check if lock_method is posix or pthread - if(LOCK_METHOD STREQUAL "USE_POSIX_SEM" OR LOCK_METHOD STREQUAL - "USE_PTHREAD_MUTEX") + if(LOCK_METHOD STREQUAL "USE_POSIX_SEM" OR LOCK_METHOD STREQUAL "USE_PTHREAD_MUTEX") message(STATUS "Using ${LOCK_METHOD} for locks") target_link_libraries(common INTERFACE pthread) endif() @@ -38,6 +38,5 @@ if(NOT NO_EPOLL) endif() if(NOT NO_SIGIO_RT) - target_compile_definitions(common INTERFACE HAVE_SIGIO_RT - SIGINFO64_WORKAROUND) + target_compile_definitions(common INTERFACE HAVE_SIGIO_RT SIGINFO64_WORKAROUND) endif() diff --git a/cmake/os-specific/freebsd.cmake b/cmake/os-specific/freebsd.cmake index 146a5baa1..6cf30e888 100644 --- a/cmake/os-specific/freebsd.cmake +++ b/cmake/os-specific/freebsd.cmake @@ -9,7 +9,8 @@ target_compile_definitions( HAVE_MSGHDR_MSG_CONTROL HAVE_CONNECT_ECONNRESET_BUG HAVE_TIMEGM - HAVE_IP_MREQN) + HAVE_IP_MREQN +) if(${RAW_SOCKS}) target_compile_definitions(common INTERFACE USE_RAW_SOCKS) diff --git a/cmake/os-specific/linux.cmake b/cmake/os-specific/linux.cmake index 4c9c37666..b55603cef 100644 --- a/cmake/os-specific/linux.cmake +++ b/cmake/os-specific/linux.cmake @@ -11,7 +11,8 @@ target_compile_definitions( HAVE_ALLOCA_H HAVE_TIMEGM HAVE_SCHED_SETSCHEDULER - HAVE_IP_MREQN) + HAVE_IP_MREQN +) target_link_libraries(common INTERFACE ${CMAKE_DL_LIBS} resolv) target_link_libraries(common_utils INTERFACE resolv) @@ -23,8 +24,7 @@ endif() if(NOT ${USE_FAST_LOCK}) target_compile_definitions(common INTERFACE USE_PTHREAD_MUTEX) target_link_libraries(common INTERFACE pthread) - message( - STATUS "FAST_LOCK not available on this platform, using: USE_PTHREAD_MUTEX") + message(STATUS "FAST_LOCK not available on this platform, using: USE_PTHREAD_MUTEX") else() # TODO: Check if this can be reached. Right now it is not possible to set # LOCK_METHOD, only USE_FAST_LOCK. This branch is reached when USE_FAST_LOCK @@ -48,8 +48,7 @@ endif() # TODO introduce check for sigio if(NOT NO_SIGIO_RT) - target_compile_definitions(common INTERFACE HAVE_SIGIO_RT - SIGINFO64_WORKAROUND) + target_compile_definitions(common INTERFACE HAVE_SIGIO_RT SIGINFO64_WORKAROUND) endif() # TODO This is placed here to match the Makefiles where both diff --git a/doc/stylesheets/dbschema_k/xsl/common.xsl b/doc/stylesheets/dbschema_k/xsl/common.xsl index 67f624f6f..3a4ffd6e1 100644 --- a/doc/stylesheets/dbschema_k/xsl/common.xsl +++ b/doc/stylesheets/dbschema_k/xsl/common.xsl @@ -43,7 +43,7 @@ - + ` diff --git a/doc/stylesheets/dbschema_k/xsl/mongodb.xsl b/doc/stylesheets/dbschema_k/xsl/db_mongodb.xsl similarity index 100% rename from doc/stylesheets/dbschema_k/xsl/mongodb.xsl rename to doc/stylesheets/dbschema_k/xsl/db_mongodb.xsl diff --git a/doc/stylesheets/dbschema_k/xsl/mysql.xsl b/doc/stylesheets/dbschema_k/xsl/db_mysql.xsl similarity index 100% rename from doc/stylesheets/dbschema_k/xsl/mysql.xsl rename to doc/stylesheets/dbschema_k/xsl/db_mysql.xsl diff --git a/doc/stylesheets/dbschema_k/xsl/oracle.xsl b/doc/stylesheets/dbschema_k/xsl/db_oracle.xsl similarity index 100% rename from doc/stylesheets/dbschema_k/xsl/oracle.xsl rename to doc/stylesheets/dbschema_k/xsl/db_oracle.xsl diff --git a/doc/stylesheets/dbschema_k/xsl/postgres.xsl b/doc/stylesheets/dbschema_k/xsl/db_postgres.xsl similarity index 100% rename from doc/stylesheets/dbschema_k/xsl/postgres.xsl rename to doc/stylesheets/dbschema_k/xsl/db_postgres.xsl diff --git a/doc/stylesheets/dbschema_k/xsl/dbtext.xsl b/doc/stylesheets/dbschema_k/xsl/db_text.xsl similarity index 100% rename from doc/stylesheets/dbschema_k/xsl/dbtext.xsl rename to doc/stylesheets/dbschema_k/xsl/db_text.xsl diff --git a/doc/stylesheets/dbschema_k/xsl/pi_framework_table.xsl b/doc/stylesheets/dbschema_k/xsl/pi_framework_table.xsl index ba3f697ca..291edf2ec 100644 --- a/doc/stylesheets/dbschema_k/xsl/pi_framework_table.xsl +++ b/doc/stylesheets/dbschema_k/xsl/pi_framework_table.xsl @@ -65,7 +65,7 @@ - + diff --git a/pkg/kamailio/Makefile b/pkg/kamailio/Makefile index 6f1a18ec3..2408a8d96 100644 --- a/pkg/kamailio/Makefile +++ b/pkg/kamailio/Makefile @@ -32,7 +32,8 @@ apk: sed -e "s/^_gitcommit=.*/_gitcommit=${GIT_TAG}/" \ -e "s/^pkgver=.*/pkgver=${APK_VERSION}/" \ -i alpine/APKBUILD - abuild -C alpine snapshot + abuild -C alpine git_archive + abuild -C alpine checksum @echo \"abuild\" cannot be started from Makefile please start manually \"abuild -C alpine -r\" # build source rpm package diff --git a/pkg/kamailio/alpine/APKBUILD b/pkg/kamailio/alpine/APKBUILD index ec6760c7e..7f6ca909a 100644 --- a/pkg/kamailio/alpine/APKBUILD +++ b/pkg/kamailio/alpine/APKBUILD @@ -1,44 +1,88 @@ # Contributor: Łukasz Jendrysik # Contributor: Michael Mason # Contributor: Leonardo Arena +# Contributor: Yann Vigara # Maintainer: Nathan Angelacos pkgname=kamailio -pkgver=6.0.3 +pkgver=6.0.5 pkgrel=0 # If building from a git snapshot, specify the gitcommit # If building a proper release, leave gitcommit blank or commented -_gitcommit=991fe9b28e0e201309048f3b38a135037e40357a +_gitcommit=9bba10f1684f078be9cbedbd1da05743bb3bf513 -[ ! -z "${_gitcommit}" ] && pkgver="${pkgver}.$(date +%Y%m%d)" -[ ! -z "${_gitcommit}" ] && _suffix="-${_gitcommit:0:7}" -[ ! -z "${_gitcommit}" ] && builddir="$srcdir/$pkgname-$_gitcommit" || builddir="$srcdir/$pkgname-$pkgver" -[ -z "${_gitcommit}" ] && _gitcommit="${pkgver}" +[ -n "$_gitcommit" ] && pkgver="${pkgver}_git20251011" +[ -n "$_gitcommit" ] && _suffix="-${_gitcommit:0:7}" +[ -n "$_gitcommit" ] && builddir="$srcdir/$pkgname-$_gitcommit" || builddir="$srcdir/$pkgname-$pkgver" +[ -z "$_gitcommit" ] && _gitcommit="$pkgver" pkgdesc="Open Source SIP Server" url="https://www.kamailio.org/" -arch="all" pkgusers="kamailio" pkggroups="kamailio" arch="all" -license="GPL-2.0" +license="GPL-2.0-or-later" +options="!check" # no testsuite depends="gawk" -options="!check" -makedepends="bison db-dev flex freeradius-client-dev expat-dev - lksctp-tools-dev perl-dev postgresql-dev python3-dev - pcre2-dev mariadb-dev libxml2-dev curl-dev unixodbc-dev - confuse-dev ncurses-dev sqlite-dev lua-dev openldap-dev openssl-dev - net-snmp-dev libuuid libev-dev jansson-dev json-c-dev libevent-dev - linux-headers libmemcached-dev rabbitmq-c-dev hiredis-dev - ruby-dev libmaxminddb-dev libunistring-dev mongo-c-driver-dev - libwebsockets-dev mosquitto-dev librdkafka-dev nghttp2-dev libjwt-dev" +makedepends="\ + bison + cmake + confuse-dev + curl-dev + expat-dev + flex + freeradius-client-dev + hiredis-dev + hiredis-ssl + icu-dev + jansson-dev + json-c-dev + libev-dev + libevent-dev + libgcrypt-dev + libmaxminddb-dev + libmemcached-dev + libmnl-dev + libpq-dev + libunistring-dev + libuuid + libwebsockets-dev + libxml2-dev + libxslt + linux-headers + lksctp-tools-dev + lua-dev + mariadb-dev + mosquitto-dev + ncurses-dev + net-snmp-dev + openldap-dev + openssl-dev>3 + openssl-libs-static + pcre2-dev + perl-dev + python3-dev + rabbitmq-c-dev + rabbitmq-c-static + readline-dev + ruby-dev + sqlite-dev + unixodbc-dev + zlib-static + " + +source="kamailio-${pkgver}$_suffix.tar.gz::https://github.com/kamailio/kamailio/archive/$_gitcommit.tar.gz + kamailio.initd + " install="$pkgname.pre-install $pkgname.pre-upgrade" +[ "$CARCH" = "armv7" ] && options="$options textrels" + # secfixes: # 5.1.4-r0: -# - CVE-2018-14767 +# - CVE-2018-14767 # See Makefile.groups for the list of recommended modules for # each package. What follows is a simplified version of Makefile.groups @@ -53,47 +97,149 @@ install="$pkgname.pre-install $pkgname.pre-upgrade" # Remove db_text from _mod_list_db because we create a separate dbtext package # # - basic used modules, with no extra dependency (widespread usage) -_mod_list_basic="avp async auth benchmark blst cfg_rpc cfgt cfgutils corex \ - counters ctl debugger diversion dlgs enum exec gzcompress ipops kex \ - keepalive mangler math maxfwd mediaproxy mqueue nat_traversal \ - nathelper path pike posops pv pv_headers pvtpl ratelimit rr rtimer \ - rtpproxy sanity sdpops siputils sl smsops statsc statistics \ - sworker textops textopsx tm tmx topoh topos xlog rtpengine stun sipt" +_mod_list_basic="\ + async + auth + avp + benchmark + blst + cfg_rpc + cfgt + cfgutils + corex + counters + ctl + debugger + diversion + dlgs + enum + exec + gzcompress + ipops + keepalive + kemix + kex + mangler + math + maxfwd + mediaproxy + mqueue + nathelper + nat_traversal + path + pike + posops + pv + pv_headers + pvtpl + ratelimit + rr + rtimer + rtpengine + rtpproxy + sanity + sdpops + siprepo + sipt + siputils + sl + smsops + statistics + statsc + stun + sworker + textops + textopsx + tm + tmx + topoh + topos + xlog + " # - extra used modules, with no extra dependency -_mod_list_extras="auth_diameter call_control call_obj cnxcc dmq domainpolicy \ - log_custom msrp pdb qos sca seas sms ss7ops sst timer tmrec tsilo \ - uac_redirect xhttp xhttp_rpc xprint nosip dmq_usrloc statsd rtjson \ - tcpops auth_xkeys" +_mod_list_extras="\ + auth_diameter + auth_xkeys + call_control + call_obj + cnxcc + dmq + dmq_usrloc + domainpolicy + file_out + influxdbc + log_custom + msrp + nosip + pdb + pvtpl + qos + rtjson + sca + seas + sms + ss7ops + sst + statsd + tcpops + timer + tmrec + tsilo + uac_redirect + xhttp + xhttp_rpc + xprint + " -# Add tops_htable here, because htable is here. -# # - common modules depending on database -_mod_list_db="acc alias_db auth_db avpops cfg_db db_berkeley db_flatstore \ - db_cluster dialog dispatcher domain drouting group htable imc matrix \ - mohqueue msilo mtree p_usrloc pdt permissions pipelimit prefix_route \ - registrar secfilter sipcapture siptrace speeddial sqlops topos_htable \ - uac uri_db userblocklist usrloc" +_mod_list_db="\ + acc + alias_db + auth_db + avpops + cfg_db + db_cluster + db_flatstore + dialog + dispatcher + domain + drouting + group + htable + imc + matrix + mohqueue + msilo + mtree + pdt + permissions + pipelimit + prefix_route + p_usrloc + registrar + sipcapture + siptrace + speeddial + sqlops + topos_htable + uac + uri_db + userblocklist + usrloc + " # - common modules depending on database, using UID db schema -_mod_list_dbuid="db2_ops uid_auth_db uid_avp_db uid_domain uid_gflags \ - uid_uri_db" - -# - modules for devel purposes -_mod_list_devel="misctest" - -# - kemix module -_mod_list_kemix="kemix" - -# _mod_list_secsipid="secsipid secsipid_proc" - -# - LOST -_mod_list_lost="lost" - -# - JWT -_mod_list_jwt="jwt" +_mod_list_dbuid="\ + db2_ops + uid_auth_db + uid_avp_db + uid_domain + uid_gflags + uid_uri_db + " -# - modules depending on pcre2 library +# - modules depending on pcre3 library _mod_list_pcre="dialplan lcr regex" # - modules depending on radius client library @@ -129,32 +275,26 @@ _mod_list_xmpp="xmpp" # - modules depending on confuse library _mod_list_carrierroute="carrierroute" -# - modules depending on bdb (db4) library -_mod_list_berkeley="db_berkeley" - # - modules depending on curl library _mod_list_utils="utils http_client" # - async http_async_client _mod_list_http_async="http_async_client" -# - modules depending on purple library -_mod_list_purple="purple" - # - modules depending on memcache library _mod_list_memcached="memcached" # - modules depending on openssl library _mod_list_tls="crypto tls" +# - modules depending on static openssl library +_mod_list_tlsa="tlsa" + # - modules depending on openssl library _mod_list_outbound="outbound" # - modules depending on unistring library -_mod_list_websocket="websocket lwsc" - -# - modules depending on libval-threads libcrypto libsres libpthread -_mod_list_dnssec="dnssec" +_mod_list_websocket="lwsc websocket" # - modules depending on libsctp _mod_list_sctp="sctp" @@ -163,10 +303,26 @@ _mod_list_sctp="sctp" _mod_list_authephemeral="auth_ephemeral" # - modules related to SIMPLE presence extensions -_mod_list_presence="presence presence_conference presence_dialoginfo \ - presence_mwi presence_profile presence_reginfo presence_xml \ - presence_dfks pua pua_bla pua_dialoginfo pua_reginfo pua_rpc \ - pua_usrloc pua_xmpp rls xcap_client xcap_server" +_mod_list_presence="\ + presence + presence_conference + presence_dfks + presence_dialoginfo + presence_mwi + presence_profile + presence_reginfo + presence_xml + pua + pua_bla + pua_dialoginfo + pua_reginfo + pua_rpc + pua_usrloc + pua_xmpp + rls + xcap_client + xcap_server + " # - modules depending on lua library _mod_list_lua="app_lua" @@ -174,9 +330,6 @@ _mod_list_lua="app_lua" # - modules depending on perl library _mod_list_perl="app_perl db_perlvdb" -# - modules depending on ruby library -_mod_list_ruby="app_ruby" - # - modules depending on python3 library _mod_list_python3="app_python3 app_python3s" @@ -186,6 +339,9 @@ _mod_list_ruby="app_ruby app_ruby_proc" # - modules depending on rabbitmq _mod_list_rabbitmq="rabbitmq" +# - modules depending on mqtt mosquitto and ev library +_mod_list_mqtt="mqtt" + # - modules depending on geoip2 library _mod_list_geoip2="geoip2" @@ -196,7 +352,7 @@ _mod_list_sqlite="db_sqlite" _mod_list_oracle="db_oracle" # - modules depending on json library -_mod_list_json="json jsonrpcc jsonrpcs pua_json" +_mod_list_json="json pua_json jsonrpcc jsonrpcs" # - modules depending on redis library _mod_list_redis="db_redis ndb_redis topos_redis" @@ -205,9 +361,24 @@ _mod_list_redis="db_redis ndb_redis topos_redis" _mod_list_mono="app_mono" # - modules related to IMS extensions -_mod_list_ims="cdp cdp_avp ims_dialog ims_diameter_server ims_auth ims_isc \ - ims_icscf ims_qos ims_ocs ims_registrar_pcscf ims_registrar_scscf \ - ims_usrloc_pcscf ims_usrloc_scscf ims_charging ims_qos_npn" +_mod_list_ims="\ + cdp + cdp_avp + ims_auth + ims_charging + ims_dialog + ims_diameter_server + ims_icscf + ims_ipsec_pcscf + ims_isc + ims_ocs + ims_qos + ims_qos_npn + ims_registrar_pcscf + ims_registrar_scscf + ims_usrloc_pcscf + ims_usrloc_scscf + " # - modules depending on osp toolkit library _mod_list_osp="osp" @@ -215,9 +386,6 @@ _mod_list_osp="osp" # - modules depending on java library _mod_list_java="app_java" -# - modules depending on iptables library -_mod_list_iptrtpproxy="iptrtpproxy" - # - modules depending on gzip library _mod_list_gzcompress="gzcompress" @@ -234,7 +402,7 @@ _mod_list_kazoo="kazoo" _mod_list_mongodb="db_mongodb ndb_mongodb" # - modules depending on jansson library -_mod_list_jansson="acc_json jansson janssonrpcc" +_mod_list_jansson="jansson janssonrpcc acc_json" # - modules depending on libm _mod_list_jsdt="app_jsdt" @@ -245,6 +413,21 @@ _mod_list_rabbitmq="rabbitmq" # - modules depending on sipdump _mod_list_sipdump="sipdump" +# - modules depending on libgcrypt +_mod_list_gcrypt="gcrypt" + +# - modules depending on libmicrohttpd +_mod_list_microhttpd="microhttpd" + +# - modules depending on nghttp2 library +_mod_list_nghttp2=nghttp2 + +# - kemix module +_mod_list_kemix="kemix" + +# - LOST +_mod_list_lost="lost" + # - modules depending on xhttp_prom _mod_list_xhttp_prom="xhttp_prom" @@ -252,91 +435,110 @@ _mod_list_xhttp_prom="xhttp_prom" _mod_list_slack="slack" # - modules depending on lrkproxy -_mod_list_slack="lrkproxy" - -# mqtt -_mod_list_mqtt="mqtt" - -# Kafka -_mod_list_kafka="kafka" +_mod_list_lrkproxy="lrkproxy" # Alpine Specific -_mod_list_debugger="$_mod_list_devel benchmark debugger" - -_mod_list_nghttp2="nghttp2" +_mod_list_debugger="benchmark debugger misctest" # Standard modules in main pkg _module_group_kstandard="$_mod_list_basic $_mod_list_dbuid $_mod_list_pcre" # END Makefile.groups ############################################################# -subpackages="$pkgname-doc $pkgname-dbg $pkgname-openrc" -_modules="$_module_group_kstandard" -for _i in mqtt kafka lost jwt kemix db postgres sqlite dbtext mysql cpl xml \ - unixodbc snmpstats xmpp carrierroute ldap utils tls presence lua ims \ - outbound debugger extras json websocket authephemeral mongodb uuid ev \ - memcached redis geoip2 jansson sipdump jsdt http_async kazoo rabbitmq sctp \ - radius perl python3 ruby xhttp_prom slack lrkproxy; do - - subpackages="$subpackages $pkgname-$_i" - eval "_modules=\"\$_modules \$_mod_list_$_i\"" -done - -source="${pkgname}-${pkgver}${_suffix}.tar.gz::https://github.com/kamailio/$pkgname/archive/$_gitcommit.tar.gz - kamailio.initd +subpackages="\ + authephemeral + carrierroute + cpl + db + dbtext + debugger + ev + extras + gcrypt + geoip2 + http_async + ims + jansson + jsdt + json + kazoo + kemix + ldap + lost + lrkproxy + lua + memcached + mqtt + mysql + nghttp2 + outbound + perl + postgres + presence + python3 + rabbitmq + radius + redis + ruby + sctp + sipdump + slack + snmpstats + sqlite + tls + tlsa + unixodbc + utils + uuid + websocket + xhttp_prom + xml + xmpp " -get_source_from_local_git(){ - cd ../../.. && git archive --format=tar.gz --prefix=${pkgname}-${_gitcommit}/ -o "$SRCDEST"/${pkgname}-${pkgver}${_suffix}.tar.gz ${_gitcommit} && cd pkg/kamailio/alpine || return 1 - echo Created dist archive "$SRCDEST"/${pkgname}-${pkgver}${_suffix}.tar.gz -} - -get_source_from_github(){ - echo Cannot create archive using local git repo. Trying create source from GutHub. - wget -O "$SRCDEST"/${pkgname}-${pkgver}${_suffix}.tar.gz https://github.com/kamailio/$pkgname/archive/${_gitcommit}.tar.gz || return 1 - echo Created dist archive "$SRCDEST"/${pkgname}-${pkgver}${_suffix}.tar.gz -} +. ${startdir}/APKBUILD-kamailio -snapshot() { - if [ ! -f "$SRCDEST"/${pkgname}-${pkgver}${_suffix}.tar.gz ]; then - get_source_from_local_git || get_source_from_github - fi - SHA512SUM=$(sha512sum "$SRCDEST"/${pkgname}-${pkgver}${_suffix}.tar.gz | sed -e "s:${SRCDEST}/::") - sed -i -e "s/^\(sha512sums=.\).*/\1$SHA512SUM/" APKBUILD -} +_modules="$_module_group_kstandard" +for _i in $subpackages; do + eval "_modules=\"\$_modules \$_mod_list_$_i\"" +done +# format modules as string +_modules=$(echo $_modules) -prepare() { - default_prepare - cd "$builddir" +subpackages="doc dbg openrc $subpackages" +# add '$pkgname-' prefix +subpackages=$(echo $subpackages | sed -E "s/\w+/$pkgname-&/g") - cd utils/kamctl/ - sed -i -e 's:/run/kamailio.pid:/run/kamailio/kamailio.pid:g' \ - kamctl.base kamctlrc || return 1 - # we actually don't need bash - sed -i -e 's:/bin/bash:/bin/sh:' kamctl kamdbctl \ - || return 1 +snapshot() { + if [ ! -f "$SRCDEST"/$pkgname-${pkgver}$_suffix.tar.gz ]; then + wget -O "$SRCDEST"/$pkgname-${pkgver}$_suffix.tar.gz https://github.com/kamailio/$pkgname/archive/$_gitcommit.tar.gz + fi + SHA512SUM=$(sha512sum "$SRCDEST"/$pkgname-${pkgver}$_suffix.tar.gz | sed -e "s:$SRCDEST/::") + sed -i -e "s/^\(sha512sums=.\).*/\1$SHA512SUM/" APKBUILD } build() { - cd "$builddir" - make FLAVOUR=kamailio STUN=1 \ - PREFIX=/usr \ - CC_EXTRA_OPTS="$CFLAGS -D_GNU_SOURCE" \ - cfg_target=/etc/kamailio/ \ - run_prefix="" \ - include_modules="$_modules" \ - LIBDIR=lib \ - DESTDIR="$pkgdir" \ - cfg_prefix="$pkgdir" \ - cfg - make EMBEDDED_UTF8_DECODE=1 STUN=1 FREERADIUS=1 \ - all || return 1 + export CMAKE_C_FLAGS_MINSIZEREL="-g" + # for linux/386 arch maybe usefull to set CMAKE_TOOLCHAIN_FILE + # use TOOLCHAIN_OPTIONS environment variable if defined + # more details at https://github.com/kamailio/kamailio/issues/4403 + cmake -S . ${TOOLCHAIN_OPTIONS} \ + -G "Unix Makefiles" \ + -B build \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DVERBOSE=ON \ + -DBUILD_DOC=ON \ + -DRADIUSCLIENT="FREERADIUS" \ + --fresh \ + -DCMAKE_BUILD_TYPE="MinSizeRel" \ + -DINCLUDE_MODULES="$_modules" + cmake --build build + cmake --build build --target man + cmake --build build --target dbschema } package() { - cd "$builddir" - make FREERADIUS=1 -j1 install || return 1 - + DESTDIR="$pkgdir" cmake --install build install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname install -d -o kamailio "$pkgdir"/run/kamailio } @@ -344,8 +546,8 @@ package() { _mv_mod() { local moddir=usr/lib/kamailio/modules i= mkdir -p "$subpkgdir"/$moddir - for i in $@; do - mv "$pkgdir"/$moddir/$i.so "$subpkgdir"/$moddir/ || return 1 + for i in "$@"; do + mv "$pkgdir"/$moddir/$i.so "$subpkgdir"/$moddir/ done } @@ -355,20 +557,18 @@ _generic_pkg() { _mv_mod $2 } - _db_driver() { pkgdesc="Database drivers for $1" depends="$pkgname $pkgname-db" - _mv_mod db_$2 || return 1 + _mv_mod db_$2 mkdir -p "$subpkgdir"/usr/share/kamailio \ "$subpkgdir"/usr/lib/kamailio/kamctl mv "$pkgdir"/usr/share/kamailio/$3 \ - "$subpkgdir"/usr/share/kamailio/ || return 1 + "$subpkgdir"/usr/share/kamailio/ mv "$pkgdir"/usr/lib/kamailio/kamctl/*.$4 \ - "$subpkgdir"/usr/lib/kamailio/kamctl/ || return 1 + "$subpkgdir"/usr/lib/kamailio/kamctl/ } - db() { _generic_pkg "modules using a database backend" "$_mod_list_db" } @@ -386,13 +586,12 @@ sqlite() { } dbtext() { - _db_driver DBText text dbtext dbtext || return 1 + _db_driver DBText text dbtext dbtext # kamdbctl.dbtext is a python script - but we will not make python # a dependency because kamdbctl is not normally used - depends="$depends" - mkdir -p "$subpkgdir"/usr/lib/kamailio/kamctl || return 1 + mkdir -p "$subpkgdir"/usr/lib/kamailio/kamctl mv "$pkgdir"/usr/lib/kamailio/kamctl/dbtextdb \ - "$subpkgdir"/usr/lib/kamailio/kamctl/ || return 1 + "$subpkgdir"/usr/lib/kamailio/kamctl/ } cpl() { @@ -402,13 +601,13 @@ cpl() { xml() { _generic_pkg "XML related modules: $_mod_list_xml" \ - "$_mod_list_xml" || return 1 + "$_mod_list_xml" mkdir -p "$subpkgdir"/usr/share/kamailio mv "$pkgdir"/usr/share/kamailio/xhttp_pi \ - "$subpkgdir"/usr/share/kamailio || return 1 + "$subpkgdir"/usr/share/kamailio mkdir -p "$subpkgdir"/etc/kamailio/ mv "$pkgdir"/etc/kamailio/pi_framework.xml \ - "$subpkgdir"/etc/kamailio || return 1 + "$subpkgdir"/etc/kamailio } unixodbc() { @@ -418,10 +617,10 @@ unixodbc() { snmpstats() { _generic_pkg "SNMP statistics support" \ - "$_mod_list_snmpstats" || return 1 + "$_mod_list_snmpstats" mkdir -p "$subpkgdir"/usr/share/snmp mv "$builddir"/src/modules/snmpstats/mibs \ - "$subpkgdir"/usr/share/snmp/ || return 1 + "$subpkgdir"/usr/share/snmp/ } xmpp() { @@ -434,42 +633,6 @@ carrierroute() { "$_mod_list_carrierroute" } -kemix() { - _generic_pkg "extensions and functions to be used with KEMI SIP routing scripting" \ - "$_mod_list_kemix" -} - -#secsipid() { -# _generic_pkg "Secure SIP/Telephony Identity (STIR/SHAKEN) extensions" \ -# "$_mod_list_secsipid" -#} - -lost() { - _generic_pkg "HELD (RFC6155) and LOST (RFC5222) location-based routing" \ - "$_mod_list_lost" -} - -jwt() { - _generic_pkg "JSON Web Token generation and validation" \ - "$_mod_list_jwt" -} - -mqtt() { - _generic_pkg "MQTT connector for bi-directional publish-subscribe communication" \ - "$_mod_list_mqtt" -} - -kafka() { - _generic_pkg "Produces and sends messages to a Kafka server" \ - "$_mod_list_kafka" -} - -## doesn't compile -# tls_wolfssl() { -# _generic_pkg "TLS operations module using wolfssl" \ -# "$_mod_list_tls_wolfssl" -# } - ldap() { _generic_pkg "LDAP search functions" \ "$_mod_list_ldap" @@ -485,6 +648,11 @@ tls() { "$_mod_list_tls" } +tlsa() { + _generic_pkg "TLS support compiled statically against libssl and libcrypto" \ + "$_mod_list_tlsa" +} + presence() { _generic_pkg "SIP Notify (Presence) support" \ "$_mod_list_presence" @@ -555,11 +723,6 @@ memcached() { "$_mod_list_memcached" } -mongodb() { - _generic_pkg "MongoDB database connectivity" \ - "$_mod_list_mongodb" -} - rabbitmq() { _generic_pkg "RabbitMQ client for configuration file" \ "$_mod_list_rabbitmq" @@ -570,7 +733,6 @@ jsdt() { "$_mod_list_jsdt" } - redis() { _generic_pkg "Redis NoSQL support" \ "$_mod_list_redis" @@ -601,11 +763,6 @@ perl() { "$_mod_list_perl" } -ruby() { - _generic_pkg "Ruby extensions for Kamailio" \ - "$_mod_list_ruby" -} - python3() { _generic_pkg "Execute embedded Python3 scripts" \ "$_mod_list_python3" @@ -616,6 +773,11 @@ ruby() { "$_mod_list_ruby" } +mqtt() { + _generic_pkg "MQTT publish/subscribe connector" \ + "$_mod_list_mqtt" +} + rabbitmq() { _generic_pkg "RabbitMQ related modules for Kamailio" \ "$_mod_list_rabbitmq" @@ -626,6 +788,21 @@ sipdump() { "$_mod_list_sipdump" } +microhttpd() { + _generic_pkg "Simple HTTP server using libmicrohttpd" \ + "$_mod_list_microhttpd" +} + +kemix() { + _generic_pkg "extensions and functions to be used with KEMI SIP routing scripting" \ + "$_mod_list_kemix" +} + +lost() { + _generic_pkg "HELD (RFC6155) and LOST (RFC5222) location-based routing" \ + "$_mod_list_lost" +} + xhttp_prom() { _generic_pkg "Metrics for Prometheus monitoring." \ "$_mod_list_xhttp_prom" @@ -642,9 +819,16 @@ lrkproxy() { } nghttp2() { - _generic_pkg "Implements an embedded HTTP/2 server using nghttpd2 library" \ + _generic_pkg "HTTP2 server implementation using nghttp2 library" \ "$_mod_list_nghttp2" } -sha512sums="51ea5fccd27a9d3d1783cfc5596eb28ab27e34faeec3268600363f43c48a3634c3c584c479ba874fdb53b85766a0ce8fe7df0e20954c9c6514b1d9d41d9237e6 kamailio-5.1.0.20171125-991fe9b.tar.gz -a777338f1a60b95aa2bf3e38314a0cfa77a3397ccad342955409eb95f66ad9c38a3a64d2974d353d50f2aced3936b209063a0f0a7127851b1c278d8384f4cc45 kamailio.initd" +gcrypt() { + _generic_pkg "Cryptography functions using libcrypt" \ + "$_mod_list_gcrypt" +} + +sha512sums=" +32b7dfa502d9e6d15c3edc51bd42cd99dd9793445c5a4cf56acbf13f97e7c2647628ad96e22f5c1f573f3b3e8aba933ccb6ac85c389cdf7cb402adc5067c9776 kamailio-6.0.4_git20251011-9bba10f.tar.gz +38a786b48d433b2e99a29249458c1ffcc3f449a1898df6ef1f4b8ebf7770e99d80ce6e3340ea680b44e725b951e65fd06d395ecb903600d7c8fdc0a736c4d9b1 kamailio.initd +" diff --git a/pkg/kamailio/alpine/APKBUILD-kamailio b/pkg/kamailio/alpine/APKBUILD-kamailio new file mode 100644 index 000000000..8a251570d --- /dev/null +++ b/pkg/kamailio/alpine/APKBUILD-kamailio @@ -0,0 +1,90 @@ +#!/bin/sh + +git_archive(){ + cd ../../.. && git archive --format=tar.gz --prefix=${pkgname}-${_gitcommit}/ -o "$SRCDEST"/${pkgname}-${pkgver}${_suffix}.tar.gz ${_gitcommit} && cd pkg/kamailio/alpine || return 1 + echo Created dist archive "$SRCDEST"/${pkgname}-${pkgver}${_suffix}.tar.gz +} + +dnssec() { + _generic_pkg "DNSSEC implementation for SIP routing" \ + "$_mod_list_dnssec" +} + +jwt() { + _generic_pkg "provides JWT (JSON Web Token) functions" \ + "$_mod_list_jwt" +} + +kafka() { + _generic_pkg "Produce and send messages to a Kafka server" \ + "$_mod_list_kafka" +} + +microhttpd() { + _generic_pkg "embedded HTTP server using libmicrohttpd" \ + "$_mod_list_microhttpd" +} + +mongodb() { + _generic_pkg "connector for MongoDB NoSQL server" \ + "$_mod_list_mongodb" +} + +phonenum() { + _generic_pkg "module to get normalize and get details about a phone number" \ + "$_mod_list_phonenum" +} + +secsipid() { + _generic_pkg "This module implements STIR (Secure Telephony Identity Revisited) and SHAKEN (Signature-based Handling of Asserted information using toKENs)" \ + "$_mod_list_secsipid" +} + +_makedepends_community="\ + libjwt2-dev + libmicrohttpd-dev + libphonenumber-dev + librdkafka-dev + mongo-c-driver-dev + " + +_makedepends_testing="\ + dnssec-tools-dev + secsipidx + " + +[ -n "$use_community" ] && makedepends="$makedepends $_makedepends_community" +[ -n "$use_testing" ] && makedepends="$makedepends $_makedepends_testing" + +# - modules depending on libmicrohttpd library +_mod_list_microhttpd="microhttpd" + +# - modules depending on dnssec-tools-dev +_mod_list_dnssec="dnssec" + +# - modules depending on phonenum +_mod_list_phonenum="phonenum" + +# - modules depending on rdkafka library +_mod_list_kafka="kafka" + +# - modules depending on libjwt2 library +_mod_list_jwt="jwt" + +# - modules depending on secsipidx +_mod_list_secsipid="secsipid" + + +_subpackages_community="\ + jwt + kafka + microhttpd + mongodb + phonenum + " + +_subpackages_testing="dnssec secsipid" + +[ -n "$use_community" ] && subpackages="$subpackages $_subpackages_community" +[ -n "$use_testing" ] && subpackages="$subpackages $_subpackages_testing" +return 0 diff --git a/pkg/kamailio/alpine/kamailio.initd b/pkg/kamailio/alpine/kamailio.initd index 9ec1938d6..d6124ab41 100644 --- a/pkg/kamailio/alpine/kamailio.initd +++ b/pkg/kamailio/alpine/kamailio.initd @@ -1,35 +1,16 @@ #!/sbin/openrc-run -daemon=/usr/sbin/kamailio -pidfile=/run/kamailio/kamailio.pid - -extra_started_commands="reload" +command="/usr/sbin/kamailio" +command_args="$KAMAILIO_OPTS -DD -u ${KAMAILIO_USER:-kamailio} -g ${KAMAILIO_GROUP:-kamailio}" +command_background="true" +pidfile="/run/kamailio.pid" depend() { need net after firewall mariadb postgresql } -start() { - ebegin "Starting Kamailio" - checkpath -d -o kamailio:kamailio /run/kamailio - start-stop-daemon --start --quiet --pidfile $pidfile --exec $daemon \ - -- \ - -u ${KAMAILIO_USER:-kamailio} \ - -g ${KAMAILIO_GROUP:-kamailio} \ - -P $pidfile \ - ${KAMAILIO_OPTS:-} - eend $? -} - -stop() { - ebegin "Stopping Kamailio" - start-stop-daemon --stop --quiet --pidfile $pidfile - eend $? -} - -reload() { - ebegin "Reloading Kamailio" - echo mi_dg dp_reload | kamcmd 2>/dev/null - eend $? +start_pre() { + checkpath -d -o kamailio:kamailio /var/run/kamailio + kamailio -c } diff --git a/pkg/kamailio/deb/bionic/changelog b/pkg/kamailio/deb/bionic/changelog index 882226d33..bbe05ce57 100644 --- a/pkg/kamailio/deb/bionic/changelog +++ b/pkg/kamailio/deb/bionic/changelog @@ -1,3 +1,15 @@ +kamailio (6.0.5) unstable; urgency=medium + + * version set 6.0.5 + + -- Victor Seva Thu, 08 Jan 2026 09:09:38 +0100 + +kamailio (6.0.4) unstable; urgency=medium + + * version set 6.0.4 + + -- Victor Seva Thu, 06 Nov 2025 08:33:15 +0100 + kamailio (6.0.3) unstable; urgency=medium * version set 6.0.3 diff --git a/pkg/kamailio/deb/bionic/control b/pkg/kamailio/deb/bionic/control index 07d9e3065..5c85f1e3f 100644 --- a/pkg/kamailio/deb/bionic/control +++ b/pkg/kamailio/deb/bionic/control @@ -825,7 +825,8 @@ Description: Extra modules for the Kamailio SIP Server . This package provides a set of modules for compression of SIP attachments, UUID usage, JSON data structure support, HTTP restful API asynchronous - access and a few more functions: gzcompress uuid evapi jansson janssonrpcc http_async_client + access and a few more functions: + gzcompress uuid evapi jansson janssonrpcc http_async_client jwt Package: kamailio-nth Architecture: any diff --git a/pkg/kamailio/deb/bionic/copyright b/pkg/kamailio/deb/bionic/copyright index 4eaf098ba..0b23c6ca1 100644 --- a/pkg/kamailio/deb/bionic/copyright +++ b/pkg/kamailio/deb/bionic/copyright @@ -24,16 +24,16 @@ License: GPL-2+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. -Files: src/code/atomic/* src/code/atomic_ops.* src/code/basex.* src/code/bit_*.c - src/code/char_msg_val.h src/code/compiler_opt.h src/code/core_stats.h src/code/counters.* - src/code/endianness.* src/code/futexlock.h src/code/hashes.h src/code/io_wait.* +Files: src/core/atomic/* src/core/atomic_ops.* src/core/basex.* src/core/bit_*.c + src/core/char_msg_val.h src/core/compiler_opt.h src/core/core_stats.h src/core/counters.* + src/core/endianness.* src/core/futexlock.h src/core/hashes.h src/core/io_wait.* src/core/lock_ops.c src/core/lock_ops_init.h src/core/lvalue.* src/core/mem/ll_malloc.* src/core/mem/memdbg.h src/core/mem/sf_malloc.* src/core/mod_fix.* src/modules/tm/rpc_uac.* src/modules/counters/counters.c src/modules/tls/sbufq.h src/modules/tls/tls_bio.* src/modules/tls/tls_cfg.* src/modules/tls/tls_cfg.h src/modules/tls/tls_ct_wrq.* src/modules/tls/tls_ct_q.h src/modules/tls/tls_domain.* src/modules/tls/tls_server.* src/modules/tls/tls_locking.* src/modules/tls/tls_rpc.* - src/modules/malloc_test/malloc_test.c src/modules/blst/blst.c + src/modules/misctest/misctest_mod.c src/modules/blst/blst.c src/core/parser/case_p_* src/core/parser/case_reas.h src/core/pvapi.h src/core/pv_core.* src/core/rand/fastrand.* src/core/raw_* src/core/rpc_lookup.* src/core/rvalue.* src/core/sctp_* src/core/ser_time.h @@ -47,16 +47,16 @@ License: ISC Files: src/modules/tls/tls_select.* src/modules/tls/tls_dump_vf.* Copyright: 2005-2010 iptelorg GmbH -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/modules/websocket/* src/modules/outbound/* src/modules/auth_ephemeral/* Copyright: 2012-2013 Crocodile RCS Ltd -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/core/daemonize.* src/core/fastlock.h src/core/lock_ops.h src/core/mem/mem.* src/core/mem/f_malloc.h - src/core/mem/meminfo.h src/core/mem/memtest.c src/core/mem/shm_mem.c - src/core/mem/q_malloc.* src/core/mem/shm_mem.h + src/core/mem/meminfo.h src/core/mem/memtest.c + src/core/mem/q_malloc.* src/core/mem/f_malloc.c src/core/pt.* src/core/sched_yield.h src/core/ut.* Copyright: 2001-2003 FhG Fokus License: ISC @@ -112,7 +112,7 @@ License: Apache-1.0 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Files: src/code/list.h +Files: src/core/list.h Copyright: 1991, 1993 The Regents of the University of California License: BSD-3-clause @@ -233,7 +233,7 @@ License: ISC ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -Files: src/lib/srutils/srjson.* +Files: src/core/utils/srjson.* Copyright: 2009 Dave Gamble License: MIT Permission is hereby granted, free of charge, to any person obtaining a copy @@ -254,7 +254,7 @@ License: MIT OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. * Exception: permission to copy, modify, propagate, and distribute a work diff --git a/pkg/kamailio/deb/bookworm/changelog b/pkg/kamailio/deb/bookworm/changelog index 882226d33..bbe05ce57 100644 --- a/pkg/kamailio/deb/bookworm/changelog +++ b/pkg/kamailio/deb/bookworm/changelog @@ -1,3 +1,15 @@ +kamailio (6.0.5) unstable; urgency=medium + + * version set 6.0.5 + + -- Victor Seva Thu, 08 Jan 2026 09:09:38 +0100 + +kamailio (6.0.4) unstable; urgency=medium + + * version set 6.0.4 + + -- Victor Seva Thu, 06 Nov 2025 08:33:15 +0100 + kamailio (6.0.3) unstable; urgency=medium * version set 6.0.3 diff --git a/pkg/kamailio/deb/bookworm/control b/pkg/kamailio/deb/bookworm/control index e5685b5be..d7d704ea8 100644 --- a/pkg/kamailio/deb/bookworm/control +++ b/pkg/kamailio/deb/bookworm/control @@ -893,7 +893,8 @@ Description: Extra modules for the Kamailio SIP Server . This package provides a set of modules for compression of SIP attachments, UUID usage, JSON data structure support, HTTP restful API asynchronous - access and a few more functions: gzcompress uuid evapi jansson janssonrpcc http_async_client + access and a few more functions: + gzcompress uuid evapi jansson janssonrpcc http_async_client jwt Package: kamailio-nth Architecture: any diff --git a/pkg/kamailio/deb/bookworm/copyright b/pkg/kamailio/deb/bookworm/copyright index 4eaf098ba..0b23c6ca1 100644 --- a/pkg/kamailio/deb/bookworm/copyright +++ b/pkg/kamailio/deb/bookworm/copyright @@ -24,16 +24,16 @@ License: GPL-2+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. -Files: src/code/atomic/* src/code/atomic_ops.* src/code/basex.* src/code/bit_*.c - src/code/char_msg_val.h src/code/compiler_opt.h src/code/core_stats.h src/code/counters.* - src/code/endianness.* src/code/futexlock.h src/code/hashes.h src/code/io_wait.* +Files: src/core/atomic/* src/core/atomic_ops.* src/core/basex.* src/core/bit_*.c + src/core/char_msg_val.h src/core/compiler_opt.h src/core/core_stats.h src/core/counters.* + src/core/endianness.* src/core/futexlock.h src/core/hashes.h src/core/io_wait.* src/core/lock_ops.c src/core/lock_ops_init.h src/core/lvalue.* src/core/mem/ll_malloc.* src/core/mem/memdbg.h src/core/mem/sf_malloc.* src/core/mod_fix.* src/modules/tm/rpc_uac.* src/modules/counters/counters.c src/modules/tls/sbufq.h src/modules/tls/tls_bio.* src/modules/tls/tls_cfg.* src/modules/tls/tls_cfg.h src/modules/tls/tls_ct_wrq.* src/modules/tls/tls_ct_q.h src/modules/tls/tls_domain.* src/modules/tls/tls_server.* src/modules/tls/tls_locking.* src/modules/tls/tls_rpc.* - src/modules/malloc_test/malloc_test.c src/modules/blst/blst.c + src/modules/misctest/misctest_mod.c src/modules/blst/blst.c src/core/parser/case_p_* src/core/parser/case_reas.h src/core/pvapi.h src/core/pv_core.* src/core/rand/fastrand.* src/core/raw_* src/core/rpc_lookup.* src/core/rvalue.* src/core/sctp_* src/core/ser_time.h @@ -47,16 +47,16 @@ License: ISC Files: src/modules/tls/tls_select.* src/modules/tls/tls_dump_vf.* Copyright: 2005-2010 iptelorg GmbH -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/modules/websocket/* src/modules/outbound/* src/modules/auth_ephemeral/* Copyright: 2012-2013 Crocodile RCS Ltd -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/core/daemonize.* src/core/fastlock.h src/core/lock_ops.h src/core/mem/mem.* src/core/mem/f_malloc.h - src/core/mem/meminfo.h src/core/mem/memtest.c src/core/mem/shm_mem.c - src/core/mem/q_malloc.* src/core/mem/shm_mem.h + src/core/mem/meminfo.h src/core/mem/memtest.c + src/core/mem/q_malloc.* src/core/mem/f_malloc.c src/core/pt.* src/core/sched_yield.h src/core/ut.* Copyright: 2001-2003 FhG Fokus License: ISC @@ -112,7 +112,7 @@ License: Apache-1.0 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Files: src/code/list.h +Files: src/core/list.h Copyright: 1991, 1993 The Regents of the University of California License: BSD-3-clause @@ -233,7 +233,7 @@ License: ISC ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -Files: src/lib/srutils/srjson.* +Files: src/core/utils/srjson.* Copyright: 2009 Dave Gamble License: MIT Permission is hereby granted, free of charge, to any person obtaining a copy @@ -254,7 +254,7 @@ License: MIT OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. * Exception: permission to copy, modify, propagate, and distribute a work diff --git a/pkg/kamailio/deb/bullseye/changelog b/pkg/kamailio/deb/bullseye/changelog index 882226d33..bbe05ce57 100644 --- a/pkg/kamailio/deb/bullseye/changelog +++ b/pkg/kamailio/deb/bullseye/changelog @@ -1,3 +1,15 @@ +kamailio (6.0.5) unstable; urgency=medium + + * version set 6.0.5 + + -- Victor Seva Thu, 08 Jan 2026 09:09:38 +0100 + +kamailio (6.0.4) unstable; urgency=medium + + * version set 6.0.4 + + -- Victor Seva Thu, 06 Nov 2025 08:33:15 +0100 + kamailio (6.0.3) unstable; urgency=medium * version set 6.0.3 diff --git a/pkg/kamailio/deb/bullseye/control b/pkg/kamailio/deb/bullseye/control index 62e1ffdd1..1126e6e52 100644 --- a/pkg/kamailio/deb/bullseye/control +++ b/pkg/kamailio/deb/bullseye/control @@ -893,7 +893,8 @@ Description: Extra modules for the Kamailio SIP Server . This package provides a set of modules for compression of SIP attachments, UUID usage, JSON data structure support, HTTP restful API asynchronous - access and a few more functions: gzcompress uuid evapi jansson janssonrpcc http_async_client + access and a few more functions: + gzcompress uuid evapi jansson janssonrpcc http_async_client jwt Package: kamailio-nth Architecture: any diff --git a/pkg/kamailio/deb/bullseye/copyright b/pkg/kamailio/deb/bullseye/copyright index 4eaf098ba..0b23c6ca1 100644 --- a/pkg/kamailio/deb/bullseye/copyright +++ b/pkg/kamailio/deb/bullseye/copyright @@ -24,16 +24,16 @@ License: GPL-2+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. -Files: src/code/atomic/* src/code/atomic_ops.* src/code/basex.* src/code/bit_*.c - src/code/char_msg_val.h src/code/compiler_opt.h src/code/core_stats.h src/code/counters.* - src/code/endianness.* src/code/futexlock.h src/code/hashes.h src/code/io_wait.* +Files: src/core/atomic/* src/core/atomic_ops.* src/core/basex.* src/core/bit_*.c + src/core/char_msg_val.h src/core/compiler_opt.h src/core/core_stats.h src/core/counters.* + src/core/endianness.* src/core/futexlock.h src/core/hashes.h src/core/io_wait.* src/core/lock_ops.c src/core/lock_ops_init.h src/core/lvalue.* src/core/mem/ll_malloc.* src/core/mem/memdbg.h src/core/mem/sf_malloc.* src/core/mod_fix.* src/modules/tm/rpc_uac.* src/modules/counters/counters.c src/modules/tls/sbufq.h src/modules/tls/tls_bio.* src/modules/tls/tls_cfg.* src/modules/tls/tls_cfg.h src/modules/tls/tls_ct_wrq.* src/modules/tls/tls_ct_q.h src/modules/tls/tls_domain.* src/modules/tls/tls_server.* src/modules/tls/tls_locking.* src/modules/tls/tls_rpc.* - src/modules/malloc_test/malloc_test.c src/modules/blst/blst.c + src/modules/misctest/misctest_mod.c src/modules/blst/blst.c src/core/parser/case_p_* src/core/parser/case_reas.h src/core/pvapi.h src/core/pv_core.* src/core/rand/fastrand.* src/core/raw_* src/core/rpc_lookup.* src/core/rvalue.* src/core/sctp_* src/core/ser_time.h @@ -47,16 +47,16 @@ License: ISC Files: src/modules/tls/tls_select.* src/modules/tls/tls_dump_vf.* Copyright: 2005-2010 iptelorg GmbH -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/modules/websocket/* src/modules/outbound/* src/modules/auth_ephemeral/* Copyright: 2012-2013 Crocodile RCS Ltd -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/core/daemonize.* src/core/fastlock.h src/core/lock_ops.h src/core/mem/mem.* src/core/mem/f_malloc.h - src/core/mem/meminfo.h src/core/mem/memtest.c src/core/mem/shm_mem.c - src/core/mem/q_malloc.* src/core/mem/shm_mem.h + src/core/mem/meminfo.h src/core/mem/memtest.c + src/core/mem/q_malloc.* src/core/mem/f_malloc.c src/core/pt.* src/core/sched_yield.h src/core/ut.* Copyright: 2001-2003 FhG Fokus License: ISC @@ -112,7 +112,7 @@ License: Apache-1.0 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Files: src/code/list.h +Files: src/core/list.h Copyright: 1991, 1993 The Regents of the University of California License: BSD-3-clause @@ -233,7 +233,7 @@ License: ISC ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -Files: src/lib/srutils/srjson.* +Files: src/core/utils/srjson.* Copyright: 2009 Dave Gamble License: MIT Permission is hereby granted, free of charge, to any person obtaining a copy @@ -254,7 +254,7 @@ License: MIT OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. * Exception: permission to copy, modify, propagate, and distribute a work diff --git a/pkg/kamailio/deb/buster/changelog b/pkg/kamailio/deb/buster/changelog index 882226d33..bbe05ce57 100644 --- a/pkg/kamailio/deb/buster/changelog +++ b/pkg/kamailio/deb/buster/changelog @@ -1,3 +1,15 @@ +kamailio (6.0.5) unstable; urgency=medium + + * version set 6.0.5 + + -- Victor Seva Thu, 08 Jan 2026 09:09:38 +0100 + +kamailio (6.0.4) unstable; urgency=medium + + * version set 6.0.4 + + -- Victor Seva Thu, 06 Nov 2025 08:33:15 +0100 + kamailio (6.0.3) unstable; urgency=medium * version set 6.0.3 diff --git a/pkg/kamailio/deb/buster/control b/pkg/kamailio/deb/buster/control index 07d9e3065..5c85f1e3f 100644 --- a/pkg/kamailio/deb/buster/control +++ b/pkg/kamailio/deb/buster/control @@ -825,7 +825,8 @@ Description: Extra modules for the Kamailio SIP Server . This package provides a set of modules for compression of SIP attachments, UUID usage, JSON data structure support, HTTP restful API asynchronous - access and a few more functions: gzcompress uuid evapi jansson janssonrpcc http_async_client + access and a few more functions: + gzcompress uuid evapi jansson janssonrpcc http_async_client jwt Package: kamailio-nth Architecture: any diff --git a/pkg/kamailio/deb/buster/copyright b/pkg/kamailio/deb/buster/copyright index 4eaf098ba..0b23c6ca1 100644 --- a/pkg/kamailio/deb/buster/copyright +++ b/pkg/kamailio/deb/buster/copyright @@ -24,16 +24,16 @@ License: GPL-2+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. -Files: src/code/atomic/* src/code/atomic_ops.* src/code/basex.* src/code/bit_*.c - src/code/char_msg_val.h src/code/compiler_opt.h src/code/core_stats.h src/code/counters.* - src/code/endianness.* src/code/futexlock.h src/code/hashes.h src/code/io_wait.* +Files: src/core/atomic/* src/core/atomic_ops.* src/core/basex.* src/core/bit_*.c + src/core/char_msg_val.h src/core/compiler_opt.h src/core/core_stats.h src/core/counters.* + src/core/endianness.* src/core/futexlock.h src/core/hashes.h src/core/io_wait.* src/core/lock_ops.c src/core/lock_ops_init.h src/core/lvalue.* src/core/mem/ll_malloc.* src/core/mem/memdbg.h src/core/mem/sf_malloc.* src/core/mod_fix.* src/modules/tm/rpc_uac.* src/modules/counters/counters.c src/modules/tls/sbufq.h src/modules/tls/tls_bio.* src/modules/tls/tls_cfg.* src/modules/tls/tls_cfg.h src/modules/tls/tls_ct_wrq.* src/modules/tls/tls_ct_q.h src/modules/tls/tls_domain.* src/modules/tls/tls_server.* src/modules/tls/tls_locking.* src/modules/tls/tls_rpc.* - src/modules/malloc_test/malloc_test.c src/modules/blst/blst.c + src/modules/misctest/misctest_mod.c src/modules/blst/blst.c src/core/parser/case_p_* src/core/parser/case_reas.h src/core/pvapi.h src/core/pv_core.* src/core/rand/fastrand.* src/core/raw_* src/core/rpc_lookup.* src/core/rvalue.* src/core/sctp_* src/core/ser_time.h @@ -47,16 +47,16 @@ License: ISC Files: src/modules/tls/tls_select.* src/modules/tls/tls_dump_vf.* Copyright: 2005-2010 iptelorg GmbH -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/modules/websocket/* src/modules/outbound/* src/modules/auth_ephemeral/* Copyright: 2012-2013 Crocodile RCS Ltd -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/core/daemonize.* src/core/fastlock.h src/core/lock_ops.h src/core/mem/mem.* src/core/mem/f_malloc.h - src/core/mem/meminfo.h src/core/mem/memtest.c src/core/mem/shm_mem.c - src/core/mem/q_malloc.* src/core/mem/shm_mem.h + src/core/mem/meminfo.h src/core/mem/memtest.c + src/core/mem/q_malloc.* src/core/mem/f_malloc.c src/core/pt.* src/core/sched_yield.h src/core/ut.* Copyright: 2001-2003 FhG Fokus License: ISC @@ -112,7 +112,7 @@ License: Apache-1.0 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Files: src/code/list.h +Files: src/core/list.h Copyright: 1991, 1993 The Regents of the University of California License: BSD-3-clause @@ -233,7 +233,7 @@ License: ISC ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -Files: src/lib/srutils/srjson.* +Files: src/core/utils/srjson.* Copyright: 2009 Dave Gamble License: MIT Permission is hereby granted, free of charge, to any person obtaining a copy @@ -254,7 +254,7 @@ License: MIT OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. * Exception: permission to copy, modify, propagate, and distribute a work diff --git a/pkg/kamailio/deb/debian/backports/bionic b/pkg/kamailio/deb/debian/backports/bionic index 30a41109e..784c0beac 100755 --- a/pkg/kamailio/deb/debian/backports/bionic +++ b/pkg/kamailio/deb/debian/backports/bionic @@ -59,6 +59,10 @@ sed -i -e '/^ librdkafka-dev,/d' \ sed -i -e '/^PACKAGE_GROUPS += kafka/d' ${DIST}/rules sed -i -e '/--EXCLUDED--/i EXTRA_EXCLUDED_MODULES += kafka' ${DIST}/rules +# libjwt < 1.12 +sed -i -e '/libjwt-dev/d' -e 's/, JWT (JSON Web Token)//' ${DIST}/control +sed -i -e '/^EXTRA_GROUPS += jwt$/d' ${DIST}/rules + wrap-and-sort -sat -d ${DIST} # clean backports scripts diff --git a/pkg/kamailio/deb/debian/backports/bookworm b/pkg/kamailio/deb/debian/backports/bookworm index 8ab9aa1ac..55dd2b4c8 100755 --- a/pkg/kamailio/deb/debian/backports/bookworm +++ b/pkg/kamailio/deb/debian/backports/bookworm @@ -35,6 +35,10 @@ sed -i -e '/lsb-base/d' ${DIST}/control # libncurses sed -i -e 's/libncurses5-dev/libncurses-dev/g' ${DIST}/control +# libjwt < 1.12 +sed -i -e '/libjwt-dev/d' -e 's/, JWT (JSON Web Token)//' ${DIST}/control +sed -i -e '/^EXTRA_GROUPS += jwt$/d' ${DIST}/rules + wrap-and-sort -sat -d ${DIST} # clean backports scripts diff --git a/pkg/kamailio/deb/debian/backports/bullseye b/pkg/kamailio/deb/debian/backports/bullseye index 1355722ce..7ca49aed9 100755 --- a/pkg/kamailio/deb/debian/backports/bullseye +++ b/pkg/kamailio/deb/debian/backports/bullseye @@ -36,6 +36,9 @@ sed -i -e '/^ libwolfssl-dev,/d' \ sed -i -e '/^PACKAGE_GROUPS += tls_wolfssl/d' ${DIST}/rules sed -i -e '/--EXCLUDED--/i EXTRA_EXCLUDED_MODULES += tls_wolfssl' ${DIST}/rules +# libjwt < 1.12 +sed -i -e '/libjwt-dev/d' -e 's/, JWT (JSON Web Token)//' ${DIST}/control +sed -i -e '/^EXTRA_GROUPS += jwt$/d' ${DIST}/rules wrap-and-sort -sat -d ${DIST} # clean backports scripts diff --git a/pkg/kamailio/deb/debian/backports/buster b/pkg/kamailio/deb/debian/backports/buster index c002539a6..4dc2ba6ef 100755 --- a/pkg/kamailio/deb/debian/backports/buster +++ b/pkg/kamailio/deb/debian/backports/buster @@ -59,6 +59,9 @@ sed -i -e '/^ librdkafka-dev,/d' \ sed -i -e '/^PACKAGE_GROUPS += kafka/d' ${DIST}/rules sed -i -e '/--EXCLUDED--/i EXTRA_EXCLUDED_MODULES += kafka' ${DIST}/rules +# libjwt < 1.12 +sed -i -e '/libjwt-dev/d' -e 's/, JWT (JSON Web Token)//' ${DIST}/control +sed -i -e '/^EXTRA_GROUPS += jwt$/d' ${DIST}/rules wrap-and-sort -sat -d ${DIST} # clean backports scripts diff --git a/pkg/kamailio/deb/debian/backports/focal b/pkg/kamailio/deb/debian/backports/focal index bf8dd81cc..8290e73c3 100755 --- a/pkg/kamailio/deb/debian/backports/focal +++ b/pkg/kamailio/deb/debian/backports/focal @@ -46,6 +46,9 @@ sed -i -e '/^ libwolfssl-dev,/d' \ sed -i -e '/^PACKAGE_GROUPS += tls_wolfssl/d' ${DIST}/rules sed -i -e '/--EXCLUDED--/i EXTRA_EXCLUDED_MODULES += tls_wolfssl' ${DIST}/rules +# libjwt < 1.12 +sed -i -e '/libjwt-dev/d' -e 's/, JWT (JSON Web Token)//' ${DIST}/control +sed -i -e '/^EXTRA_GROUPS += jwt$/d' ${DIST}/rules wrap-and-sort -sat -d ${DIST} # clean backports scripts diff --git a/pkg/kamailio/deb/debian/backports/jammy b/pkg/kamailio/deb/debian/backports/jammy index a469871dc..30ca3cacf 100755 --- a/pkg/kamailio/deb/debian/backports/jammy +++ b/pkg/kamailio/deb/debian/backports/jammy @@ -29,6 +29,10 @@ sed -i -e '/^ python,/d' -e '/python-dev/d' \ sed -i -e '/^PACKAGE_GROUPS += python$/d' ${DIST}/rules sed -i -e '/--EXCLUDED--/i EXTRA_EXCLUDED_MODULES += python' ${DIST}/rules +# libjwt < 1.12 +sed -i -e '/libjwt-dev/d' -e 's/, JWT (JSON Web Token)//' ${DIST}/control +sed -i -e '/^EXTRA_GROUPS += jwt$/d' ${DIST}/rules + wrap-and-sort -sat -d ${DIST} # clean backports scripts diff --git a/pkg/kamailio/deb/debian/backports/jessie b/pkg/kamailio/deb/debian/backports/jessie index e1171a557..669774c36 100755 --- a/pkg/kamailio/deb/debian/backports/jessie +++ b/pkg/kamailio/deb/debian/backports/jessie @@ -72,6 +72,10 @@ sed -i -e '/^ librdkafka-dev,/d' \ sed -i -e '/^PACKAGE_GROUPS += kafka/d' ${DIST}/rules sed -i -e '/--EXCLUDED--/i EXTRA_EXCLUDED_MODULES += kafka' ${DIST}/rules +# libjwt < 1.12 +sed -i -e '/libjwt-dev/d' -e 's/, JWT (JSON Web Token)//' ${DIST}/control +sed -i -e '/^EXTRA_GROUPS += jwt$/d' ${DIST}/rules + wrap-and-sort -sat -d ${DIST} # clean backports scripts diff --git a/pkg/kamailio/deb/debian/backports/precise b/pkg/kamailio/deb/debian/backports/precise index ada20e25b..83a510e6e 100755 --- a/pkg/kamailio/deb/debian/backports/precise +++ b/pkg/kamailio/deb/debian/backports/precise @@ -135,6 +135,10 @@ sed -i -e '/^ librdkafka-dev,/d' \ sed -i -e '/^PACKAGE_GROUPS += kafka/d' ${DIST}/rules sed -i -e '/--EXCLUDED--/i EXTRA_EXCLUDED_MODULES += kafka' ${DIST}/rules +# libjwt < 1.12 +sed -i -e '/libjwt-dev/d' -e 's/, JWT (JSON Web Token)//' ${DIST}/control +sed -i -e '/^EXTRA_GROUPS += jwt$/d' ${DIST}/rules + wrap-and-sort -sat -d ${DIST} # clean backports scripts diff --git a/pkg/kamailio/deb/debian/backports/sid b/pkg/kamailio/deb/debian/backports/sid index d40c46626..3a6df744c 100755 --- a/pkg/kamailio/deb/debian/backports/sid +++ b/pkg/kamailio/deb/debian/backports/sid @@ -35,6 +35,15 @@ sed -i -e '/lsb-base/d' ${DIST}/control # libncurses sed -i -e 's/libncurses5-dev/libncurses-dev/g' ${DIST}/control +# no db5.3 +rm ${DIST}/kamailio-berkeley-bin.dirs +sed -i -e '/libdb-dev/d' \ + -e '/^Package: kamailio-berkeley-modules/,/^$/d' \ + -e '/^Package: kamailio-berkeley-bin/,/^$/d' \ + ${DIST}/control +sed -i -e '/^PACKAGE_GROUPS += berkeley$/d' ${DIST}/rules +sed -i -e '/--EXCLUDED--/i EXTRA_EXCLUDED_MODULES += berkeley' ${DIST}/rules + wrap-and-sort -sat -d ${DIST} # clean backports scripts diff --git a/pkg/kamailio/deb/debian/backports/stretch b/pkg/kamailio/deb/debian/backports/stretch index 9f0a7580c..34256cfb3 100755 --- a/pkg/kamailio/deb/debian/backports/stretch +++ b/pkg/kamailio/deb/debian/backports/stretch @@ -62,6 +62,10 @@ sed -i -e '/^ librdkafka-dev,/d' \ sed -i -e '/^PACKAGE_GROUPS += kafka/d' ${DIST}/rules sed -i -e '/--EXCLUDED--/i EXTRA_EXCLUDED_MODULES += kafka' ${DIST}/rules +# libjwt < 1.12 +sed -i -e '/libjwt-dev/d' -e 's/, JWT (JSON Web Token)//' ${DIST}/control +sed -i -e '/^EXTRA_GROUPS += jwt$/d' ${DIST}/rules + wrap-and-sort -sat -d ${DIST} # clean backports scripts diff --git a/pkg/kamailio/deb/debian/backports/trusty b/pkg/kamailio/deb/debian/backports/trusty index 9f809b3bd..82b4b0ceb 100755 --- a/pkg/kamailio/deb/debian/backports/trusty +++ b/pkg/kamailio/deb/debian/backports/trusty @@ -98,6 +98,10 @@ sed -i -e '/^ librdkafka-dev,/d' \ sed -i -e '/^PACKAGE_GROUPS += kafka/d' ${DIST}/rules sed -i -e '/--EXCLUDED--/i EXTRA_EXCLUDED_MODULES += kafka' ${DIST}/rules +# libjwt < 1.12 +sed -i -e '/libjwt-dev/d' -e 's/, JWT (JSON Web Token)//' ${DIST}/control +sed -i -e '/^EXTRA_GROUPS += jwt$/d' ${DIST}/rules + wrap-and-sort -sat -d ${DIST} # clean backports scripts diff --git a/pkg/kamailio/deb/debian/backports/wheezy b/pkg/kamailio/deb/debian/backports/wheezy index faa5472f7..8274dd7db 100755 --- a/pkg/kamailio/deb/debian/backports/wheezy +++ b/pkg/kamailio/deb/debian/backports/wheezy @@ -141,6 +141,10 @@ sed -i -e '/^ librdkafka-dev,/d' \ sed -i -e '/^PACKAGE_GROUPS += kafka/d' ${DIST}/rules sed -i -e '/--EXCLUDED--/i EXTRA_EXCLUDED_MODULES += kafka' ${DIST}/rules +# libjwt < 1.12 +sed -i -e '/libjwt-dev/d' -e 's/, JWT (JSON Web Token)//' ${DIST}/control +sed -i -e '/^EXTRA_GROUPS += jwt$/d' ${DIST}/rules + wrap-and-sort -sat -d ${DIST} # clean backports scripts diff --git a/pkg/kamailio/deb/debian/backports/xenial b/pkg/kamailio/deb/debian/backports/xenial index 6baaab8ff..defe02fe6 100755 --- a/pkg/kamailio/deb/debian/backports/xenial +++ b/pkg/kamailio/deb/debian/backports/xenial @@ -71,6 +71,10 @@ sed -i -e '/^ librdkafka-dev,/d' \ sed -i -e '/^PACKAGE_GROUPS += kafka/d' ${DIST}/rules sed -i -e '/--EXCLUDED--/i EXTRA_EXCLUDED_MODULES += kafka' ${DIST}/rules +# libjwt < 1.12 +sed -i -e '/libjwt-dev/d' -e 's/, JWT (JSON Web Token)//' ${DIST}/control +sed -i -e '/^EXTRA_GROUPS += jwt$/d' ${DIST}/rules + # tlsa build fails sed -i -e 's/KTLS_INCLUDE_TLSA=yes/KTLS_INCLUDE_TLSA=no/' ${DIST}/rules diff --git a/pkg/kamailio/deb/debian/changelog b/pkg/kamailio/deb/debian/changelog index 882226d33..bbe05ce57 100644 --- a/pkg/kamailio/deb/debian/changelog +++ b/pkg/kamailio/deb/debian/changelog @@ -1,3 +1,15 @@ +kamailio (6.0.5) unstable; urgency=medium + + * version set 6.0.5 + + -- Victor Seva Thu, 08 Jan 2026 09:09:38 +0100 + +kamailio (6.0.4) unstable; urgency=medium + + * version set 6.0.4 + + -- Victor Seva Thu, 06 Nov 2025 08:33:15 +0100 + kamailio (6.0.3) unstable; urgency=medium * version set 6.0.3 diff --git a/pkg/kamailio/deb/debian/control b/pkg/kamailio/deb/debian/control index 1a386ebb6..aede2ba94 100644 --- a/pkg/kamailio/deb/debian/control +++ b/pkg/kamailio/deb/debian/control @@ -22,6 +22,8 @@ Build-Depends: libhiredis-dev (>= 0.10.0), libjansson-dev, libjson-c-dev, + libjwt-dev (>= 1.12), + libjwt-dev (<< 3), libldap2-dev, liblua5.1-0-dev, libmaxminddb-dev, @@ -950,7 +952,8 @@ Description: Extra modules for the Kamailio SIP Server . This package provides a set of modules for compression of SIP attachments, UUID usage, JSON data structure support, HTTP restful API asynchronous - access and a few more functions: gzcompress uuid evapi jansson janssonrpcc http_async_client + access, JWT (JSON Web Token) and a few more functions: + gzcompress uuid evapi jansson janssonrpcc http_async_client jwt Package: kamailio-nth Architecture: any diff --git a/pkg/kamailio/deb/debian/copyright b/pkg/kamailio/deb/debian/copyright index 4eaf098ba..0b23c6ca1 100644 --- a/pkg/kamailio/deb/debian/copyright +++ b/pkg/kamailio/deb/debian/copyright @@ -24,16 +24,16 @@ License: GPL-2+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. -Files: src/code/atomic/* src/code/atomic_ops.* src/code/basex.* src/code/bit_*.c - src/code/char_msg_val.h src/code/compiler_opt.h src/code/core_stats.h src/code/counters.* - src/code/endianness.* src/code/futexlock.h src/code/hashes.h src/code/io_wait.* +Files: src/core/atomic/* src/core/atomic_ops.* src/core/basex.* src/core/bit_*.c + src/core/char_msg_val.h src/core/compiler_opt.h src/core/core_stats.h src/core/counters.* + src/core/endianness.* src/core/futexlock.h src/core/hashes.h src/core/io_wait.* src/core/lock_ops.c src/core/lock_ops_init.h src/core/lvalue.* src/core/mem/ll_malloc.* src/core/mem/memdbg.h src/core/mem/sf_malloc.* src/core/mod_fix.* src/modules/tm/rpc_uac.* src/modules/counters/counters.c src/modules/tls/sbufq.h src/modules/tls/tls_bio.* src/modules/tls/tls_cfg.* src/modules/tls/tls_cfg.h src/modules/tls/tls_ct_wrq.* src/modules/tls/tls_ct_q.h src/modules/tls/tls_domain.* src/modules/tls/tls_server.* src/modules/tls/tls_locking.* src/modules/tls/tls_rpc.* - src/modules/malloc_test/malloc_test.c src/modules/blst/blst.c + src/modules/misctest/misctest_mod.c src/modules/blst/blst.c src/core/parser/case_p_* src/core/parser/case_reas.h src/core/pvapi.h src/core/pv_core.* src/core/rand/fastrand.* src/core/raw_* src/core/rpc_lookup.* src/core/rvalue.* src/core/sctp_* src/core/ser_time.h @@ -47,16 +47,16 @@ License: ISC Files: src/modules/tls/tls_select.* src/modules/tls/tls_dump_vf.* Copyright: 2005-2010 iptelorg GmbH -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/modules/websocket/* src/modules/outbound/* src/modules/auth_ephemeral/* Copyright: 2012-2013 Crocodile RCS Ltd -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/core/daemonize.* src/core/fastlock.h src/core/lock_ops.h src/core/mem/mem.* src/core/mem/f_malloc.h - src/core/mem/meminfo.h src/core/mem/memtest.c src/core/mem/shm_mem.c - src/core/mem/q_malloc.* src/core/mem/shm_mem.h + src/core/mem/meminfo.h src/core/mem/memtest.c + src/core/mem/q_malloc.* src/core/mem/f_malloc.c src/core/pt.* src/core/sched_yield.h src/core/ut.* Copyright: 2001-2003 FhG Fokus License: ISC @@ -112,7 +112,7 @@ License: Apache-1.0 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Files: src/code/list.h +Files: src/core/list.h Copyright: 1991, 1993 The Regents of the University of California License: BSD-3-clause @@ -233,7 +233,7 @@ License: ISC ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -Files: src/lib/srutils/srjson.* +Files: src/core/utils/srjson.* Copyright: 2009 Dave Gamble License: MIT Permission is hereby granted, free of charge, to any person obtaining a copy @@ -254,7 +254,7 @@ License: MIT OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. * Exception: permission to copy, modify, propagate, and distribute a work diff --git a/pkg/kamailio/deb/debian/rules b/pkg/kamailio/deb/debian/rules index 29ac907f4..c634a702e 100755 --- a/pkg/kamailio/deb/debian/rules +++ b/pkg/kamailio/deb/debian/rules @@ -97,6 +97,7 @@ EXTRA_GROUPS += gzcompress EXTRA_GROUPS += jansson EXTRA_GROUPS += uuid EXTRA_GROUPS += http_async +EXTRA_GROUPS += jwt .PHONY: skip-modules skip-modules: diff --git a/pkg/kamailio/deb/focal/changelog b/pkg/kamailio/deb/focal/changelog index 882226d33..bbe05ce57 100644 --- a/pkg/kamailio/deb/focal/changelog +++ b/pkg/kamailio/deb/focal/changelog @@ -1,3 +1,15 @@ +kamailio (6.0.5) unstable; urgency=medium + + * version set 6.0.5 + + -- Victor Seva Thu, 08 Jan 2026 09:09:38 +0100 + +kamailio (6.0.4) unstable; urgency=medium + + * version set 6.0.4 + + -- Victor Seva Thu, 06 Nov 2025 08:33:15 +0100 + kamailio (6.0.3) unstable; urgency=medium * version set 6.0.3 diff --git a/pkg/kamailio/deb/focal/control b/pkg/kamailio/deb/focal/control index da9afc670..839204a2d 100644 --- a/pkg/kamailio/deb/focal/control +++ b/pkg/kamailio/deb/focal/control @@ -860,7 +860,8 @@ Description: Extra modules for the Kamailio SIP Server . This package provides a set of modules for compression of SIP attachments, UUID usage, JSON data structure support, HTTP restful API asynchronous - access and a few more functions: gzcompress uuid evapi jansson janssonrpcc http_async_client + access and a few more functions: + gzcompress uuid evapi jansson janssonrpcc http_async_client jwt Package: kamailio-nth Architecture: any diff --git a/pkg/kamailio/deb/focal/copyright b/pkg/kamailio/deb/focal/copyright index 4eaf098ba..0b23c6ca1 100644 --- a/pkg/kamailio/deb/focal/copyright +++ b/pkg/kamailio/deb/focal/copyright @@ -24,16 +24,16 @@ License: GPL-2+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. -Files: src/code/atomic/* src/code/atomic_ops.* src/code/basex.* src/code/bit_*.c - src/code/char_msg_val.h src/code/compiler_opt.h src/code/core_stats.h src/code/counters.* - src/code/endianness.* src/code/futexlock.h src/code/hashes.h src/code/io_wait.* +Files: src/core/atomic/* src/core/atomic_ops.* src/core/basex.* src/core/bit_*.c + src/core/char_msg_val.h src/core/compiler_opt.h src/core/core_stats.h src/core/counters.* + src/core/endianness.* src/core/futexlock.h src/core/hashes.h src/core/io_wait.* src/core/lock_ops.c src/core/lock_ops_init.h src/core/lvalue.* src/core/mem/ll_malloc.* src/core/mem/memdbg.h src/core/mem/sf_malloc.* src/core/mod_fix.* src/modules/tm/rpc_uac.* src/modules/counters/counters.c src/modules/tls/sbufq.h src/modules/tls/tls_bio.* src/modules/tls/tls_cfg.* src/modules/tls/tls_cfg.h src/modules/tls/tls_ct_wrq.* src/modules/tls/tls_ct_q.h src/modules/tls/tls_domain.* src/modules/tls/tls_server.* src/modules/tls/tls_locking.* src/modules/tls/tls_rpc.* - src/modules/malloc_test/malloc_test.c src/modules/blst/blst.c + src/modules/misctest/misctest_mod.c src/modules/blst/blst.c src/core/parser/case_p_* src/core/parser/case_reas.h src/core/pvapi.h src/core/pv_core.* src/core/rand/fastrand.* src/core/raw_* src/core/rpc_lookup.* src/core/rvalue.* src/core/sctp_* src/core/ser_time.h @@ -47,16 +47,16 @@ License: ISC Files: src/modules/tls/tls_select.* src/modules/tls/tls_dump_vf.* Copyright: 2005-2010 iptelorg GmbH -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/modules/websocket/* src/modules/outbound/* src/modules/auth_ephemeral/* Copyright: 2012-2013 Crocodile RCS Ltd -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/core/daemonize.* src/core/fastlock.h src/core/lock_ops.h src/core/mem/mem.* src/core/mem/f_malloc.h - src/core/mem/meminfo.h src/core/mem/memtest.c src/core/mem/shm_mem.c - src/core/mem/q_malloc.* src/core/mem/shm_mem.h + src/core/mem/meminfo.h src/core/mem/memtest.c + src/core/mem/q_malloc.* src/core/mem/f_malloc.c src/core/pt.* src/core/sched_yield.h src/core/ut.* Copyright: 2001-2003 FhG Fokus License: ISC @@ -112,7 +112,7 @@ License: Apache-1.0 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Files: src/code/list.h +Files: src/core/list.h Copyright: 1991, 1993 The Regents of the University of California License: BSD-3-clause @@ -233,7 +233,7 @@ License: ISC ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -Files: src/lib/srutils/srjson.* +Files: src/core/utils/srjson.* Copyright: 2009 Dave Gamble License: MIT Permission is hereby granted, free of charge, to any person obtaining a copy @@ -254,7 +254,7 @@ License: MIT OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. * Exception: permission to copy, modify, propagate, and distribute a work diff --git a/pkg/kamailio/deb/jammy/changelog b/pkg/kamailio/deb/jammy/changelog index 882226d33..bbe05ce57 100644 --- a/pkg/kamailio/deb/jammy/changelog +++ b/pkg/kamailio/deb/jammy/changelog @@ -1,3 +1,15 @@ +kamailio (6.0.5) unstable; urgency=medium + + * version set 6.0.5 + + -- Victor Seva Thu, 08 Jan 2026 09:09:38 +0100 + +kamailio (6.0.4) unstable; urgency=medium + + * version set 6.0.4 + + -- Victor Seva Thu, 06 Nov 2025 08:33:15 +0100 + kamailio (6.0.3) unstable; urgency=medium * version set 6.0.3 diff --git a/pkg/kamailio/deb/jammy/control b/pkg/kamailio/deb/jammy/control index 31f1f2197..f3de4fd5e 100644 --- a/pkg/kamailio/deb/jammy/control +++ b/pkg/kamailio/deb/jammy/control @@ -894,7 +894,8 @@ Description: Extra modules for the Kamailio SIP Server . This package provides a set of modules for compression of SIP attachments, UUID usage, JSON data structure support, HTTP restful API asynchronous - access and a few more functions: gzcompress uuid evapi jansson janssonrpcc http_async_client + access and a few more functions: + gzcompress uuid evapi jansson janssonrpcc http_async_client jwt Package: kamailio-nth Architecture: any diff --git a/pkg/kamailio/deb/jammy/copyright b/pkg/kamailio/deb/jammy/copyright index 4eaf098ba..0b23c6ca1 100644 --- a/pkg/kamailio/deb/jammy/copyright +++ b/pkg/kamailio/deb/jammy/copyright @@ -24,16 +24,16 @@ License: GPL-2+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. -Files: src/code/atomic/* src/code/atomic_ops.* src/code/basex.* src/code/bit_*.c - src/code/char_msg_val.h src/code/compiler_opt.h src/code/core_stats.h src/code/counters.* - src/code/endianness.* src/code/futexlock.h src/code/hashes.h src/code/io_wait.* +Files: src/core/atomic/* src/core/atomic_ops.* src/core/basex.* src/core/bit_*.c + src/core/char_msg_val.h src/core/compiler_opt.h src/core/core_stats.h src/core/counters.* + src/core/endianness.* src/core/futexlock.h src/core/hashes.h src/core/io_wait.* src/core/lock_ops.c src/core/lock_ops_init.h src/core/lvalue.* src/core/mem/ll_malloc.* src/core/mem/memdbg.h src/core/mem/sf_malloc.* src/core/mod_fix.* src/modules/tm/rpc_uac.* src/modules/counters/counters.c src/modules/tls/sbufq.h src/modules/tls/tls_bio.* src/modules/tls/tls_cfg.* src/modules/tls/tls_cfg.h src/modules/tls/tls_ct_wrq.* src/modules/tls/tls_ct_q.h src/modules/tls/tls_domain.* src/modules/tls/tls_server.* src/modules/tls/tls_locking.* src/modules/tls/tls_rpc.* - src/modules/malloc_test/malloc_test.c src/modules/blst/blst.c + src/modules/misctest/misctest_mod.c src/modules/blst/blst.c src/core/parser/case_p_* src/core/parser/case_reas.h src/core/pvapi.h src/core/pv_core.* src/core/rand/fastrand.* src/core/raw_* src/core/rpc_lookup.* src/core/rvalue.* src/core/sctp_* src/core/ser_time.h @@ -47,16 +47,16 @@ License: ISC Files: src/modules/tls/tls_select.* src/modules/tls/tls_dump_vf.* Copyright: 2005-2010 iptelorg GmbH -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/modules/websocket/* src/modules/outbound/* src/modules/auth_ephemeral/* Copyright: 2012-2013 Crocodile RCS Ltd -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/core/daemonize.* src/core/fastlock.h src/core/lock_ops.h src/core/mem/mem.* src/core/mem/f_malloc.h - src/core/mem/meminfo.h src/core/mem/memtest.c src/core/mem/shm_mem.c - src/core/mem/q_malloc.* src/core/mem/shm_mem.h + src/core/mem/meminfo.h src/core/mem/memtest.c + src/core/mem/q_malloc.* src/core/mem/f_malloc.c src/core/pt.* src/core/sched_yield.h src/core/ut.* Copyright: 2001-2003 FhG Fokus License: ISC @@ -112,7 +112,7 @@ License: Apache-1.0 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Files: src/code/list.h +Files: src/core/list.h Copyright: 1991, 1993 The Regents of the University of California License: BSD-3-clause @@ -233,7 +233,7 @@ License: ISC ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -Files: src/lib/srutils/srjson.* +Files: src/core/utils/srjson.* Copyright: 2009 Dave Gamble License: MIT Permission is hereby granted, free of charge, to any person obtaining a copy @@ -254,7 +254,7 @@ License: MIT OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. * Exception: permission to copy, modify, propagate, and distribute a work diff --git a/pkg/kamailio/deb/jessie/changelog b/pkg/kamailio/deb/jessie/changelog index 882226d33..bbe05ce57 100644 --- a/pkg/kamailio/deb/jessie/changelog +++ b/pkg/kamailio/deb/jessie/changelog @@ -1,3 +1,15 @@ +kamailio (6.0.5) unstable; urgency=medium + + * version set 6.0.5 + + -- Victor Seva Thu, 08 Jan 2026 09:09:38 +0100 + +kamailio (6.0.4) unstable; urgency=medium + + * version set 6.0.4 + + -- Victor Seva Thu, 06 Nov 2025 08:33:15 +0100 + kamailio (6.0.3) unstable; urgency=medium * version set 6.0.3 diff --git a/pkg/kamailio/deb/jessie/control b/pkg/kamailio/deb/jessie/control index 96f8e9a53..46afb4805 100644 --- a/pkg/kamailio/deb/jessie/control +++ b/pkg/kamailio/deb/jessie/control @@ -823,7 +823,8 @@ Description: Extra modules for the Kamailio SIP Server . This package provides a set of modules for compression of SIP attachments, UUID usage, JSON data structure support, HTTP restful API asynchronous - access and a few more functions: gzcompress uuid evapi jansson janssonrpcc http_async_client + access and a few more functions: + gzcompress uuid evapi jansson janssonrpcc http_async_client jwt Package: kamailio-nth Architecture: any diff --git a/pkg/kamailio/deb/jessie/copyright b/pkg/kamailio/deb/jessie/copyright index 4eaf098ba..0b23c6ca1 100644 --- a/pkg/kamailio/deb/jessie/copyright +++ b/pkg/kamailio/deb/jessie/copyright @@ -24,16 +24,16 @@ License: GPL-2+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. -Files: src/code/atomic/* src/code/atomic_ops.* src/code/basex.* src/code/bit_*.c - src/code/char_msg_val.h src/code/compiler_opt.h src/code/core_stats.h src/code/counters.* - src/code/endianness.* src/code/futexlock.h src/code/hashes.h src/code/io_wait.* +Files: src/core/atomic/* src/core/atomic_ops.* src/core/basex.* src/core/bit_*.c + src/core/char_msg_val.h src/core/compiler_opt.h src/core/core_stats.h src/core/counters.* + src/core/endianness.* src/core/futexlock.h src/core/hashes.h src/core/io_wait.* src/core/lock_ops.c src/core/lock_ops_init.h src/core/lvalue.* src/core/mem/ll_malloc.* src/core/mem/memdbg.h src/core/mem/sf_malloc.* src/core/mod_fix.* src/modules/tm/rpc_uac.* src/modules/counters/counters.c src/modules/tls/sbufq.h src/modules/tls/tls_bio.* src/modules/tls/tls_cfg.* src/modules/tls/tls_cfg.h src/modules/tls/tls_ct_wrq.* src/modules/tls/tls_ct_q.h src/modules/tls/tls_domain.* src/modules/tls/tls_server.* src/modules/tls/tls_locking.* src/modules/tls/tls_rpc.* - src/modules/malloc_test/malloc_test.c src/modules/blst/blst.c + src/modules/misctest/misctest_mod.c src/modules/blst/blst.c src/core/parser/case_p_* src/core/parser/case_reas.h src/core/pvapi.h src/core/pv_core.* src/core/rand/fastrand.* src/core/raw_* src/core/rpc_lookup.* src/core/rvalue.* src/core/sctp_* src/core/ser_time.h @@ -47,16 +47,16 @@ License: ISC Files: src/modules/tls/tls_select.* src/modules/tls/tls_dump_vf.* Copyright: 2005-2010 iptelorg GmbH -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/modules/websocket/* src/modules/outbound/* src/modules/auth_ephemeral/* Copyright: 2012-2013 Crocodile RCS Ltd -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/core/daemonize.* src/core/fastlock.h src/core/lock_ops.h src/core/mem/mem.* src/core/mem/f_malloc.h - src/core/mem/meminfo.h src/core/mem/memtest.c src/core/mem/shm_mem.c - src/core/mem/q_malloc.* src/core/mem/shm_mem.h + src/core/mem/meminfo.h src/core/mem/memtest.c + src/core/mem/q_malloc.* src/core/mem/f_malloc.c src/core/pt.* src/core/sched_yield.h src/core/ut.* Copyright: 2001-2003 FhG Fokus License: ISC @@ -112,7 +112,7 @@ License: Apache-1.0 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Files: src/code/list.h +Files: src/core/list.h Copyright: 1991, 1993 The Regents of the University of California License: BSD-3-clause @@ -233,7 +233,7 @@ License: ISC ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -Files: src/lib/srutils/srjson.* +Files: src/core/utils/srjson.* Copyright: 2009 Dave Gamble License: MIT Permission is hereby granted, free of charge, to any person obtaining a copy @@ -254,7 +254,7 @@ License: MIT OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. * Exception: permission to copy, modify, propagate, and distribute a work diff --git a/pkg/kamailio/deb/noble/changelog b/pkg/kamailio/deb/noble/changelog index 882226d33..bbe05ce57 100644 --- a/pkg/kamailio/deb/noble/changelog +++ b/pkg/kamailio/deb/noble/changelog @@ -1,3 +1,15 @@ +kamailio (6.0.5) unstable; urgency=medium + + * version set 6.0.5 + + -- Victor Seva Thu, 08 Jan 2026 09:09:38 +0100 + +kamailio (6.0.4) unstable; urgency=medium + + * version set 6.0.4 + + -- Victor Seva Thu, 06 Nov 2025 08:33:15 +0100 + kamailio (6.0.3) unstable; urgency=medium * version set 6.0.3 diff --git a/pkg/kamailio/deb/noble/control b/pkg/kamailio/deb/noble/control index e5685b5be..ea46fbce3 100644 --- a/pkg/kamailio/deb/noble/control +++ b/pkg/kamailio/deb/noble/control @@ -20,6 +20,8 @@ Build-Depends: libhiredis-dev (>= 0.10.0), libjansson-dev, libjson-c-dev, + libjwt-dev (<< 3), + libjwt-dev (>= 1.12), libldap2-dev, liblua5.1-0-dev, libmaxminddb-dev, @@ -893,7 +895,8 @@ Description: Extra modules for the Kamailio SIP Server . This package provides a set of modules for compression of SIP attachments, UUID usage, JSON data structure support, HTTP restful API asynchronous - access and a few more functions: gzcompress uuid evapi jansson janssonrpcc http_async_client + access, JWT (JSON Web Token) and a few more functions: + gzcompress uuid evapi jansson janssonrpcc http_async_client jwt Package: kamailio-nth Architecture: any diff --git a/pkg/kamailio/deb/noble/copyright b/pkg/kamailio/deb/noble/copyright index 4eaf098ba..0b23c6ca1 100644 --- a/pkg/kamailio/deb/noble/copyright +++ b/pkg/kamailio/deb/noble/copyright @@ -24,16 +24,16 @@ License: GPL-2+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. -Files: src/code/atomic/* src/code/atomic_ops.* src/code/basex.* src/code/bit_*.c - src/code/char_msg_val.h src/code/compiler_opt.h src/code/core_stats.h src/code/counters.* - src/code/endianness.* src/code/futexlock.h src/code/hashes.h src/code/io_wait.* +Files: src/core/atomic/* src/core/atomic_ops.* src/core/basex.* src/core/bit_*.c + src/core/char_msg_val.h src/core/compiler_opt.h src/core/core_stats.h src/core/counters.* + src/core/endianness.* src/core/futexlock.h src/core/hashes.h src/core/io_wait.* src/core/lock_ops.c src/core/lock_ops_init.h src/core/lvalue.* src/core/mem/ll_malloc.* src/core/mem/memdbg.h src/core/mem/sf_malloc.* src/core/mod_fix.* src/modules/tm/rpc_uac.* src/modules/counters/counters.c src/modules/tls/sbufq.h src/modules/tls/tls_bio.* src/modules/tls/tls_cfg.* src/modules/tls/tls_cfg.h src/modules/tls/tls_ct_wrq.* src/modules/tls/tls_ct_q.h src/modules/tls/tls_domain.* src/modules/tls/tls_server.* src/modules/tls/tls_locking.* src/modules/tls/tls_rpc.* - src/modules/malloc_test/malloc_test.c src/modules/blst/blst.c + src/modules/misctest/misctest_mod.c src/modules/blst/blst.c src/core/parser/case_p_* src/core/parser/case_reas.h src/core/pvapi.h src/core/pv_core.* src/core/rand/fastrand.* src/core/raw_* src/core/rpc_lookup.* src/core/rvalue.* src/core/sctp_* src/core/ser_time.h @@ -47,16 +47,16 @@ License: ISC Files: src/modules/tls/tls_select.* src/modules/tls/tls_dump_vf.* Copyright: 2005-2010 iptelorg GmbH -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/modules/websocket/* src/modules/outbound/* src/modules/auth_ephemeral/* Copyright: 2012-2013 Crocodile RCS Ltd -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/core/daemonize.* src/core/fastlock.h src/core/lock_ops.h src/core/mem/mem.* src/core/mem/f_malloc.h - src/core/mem/meminfo.h src/core/mem/memtest.c src/core/mem/shm_mem.c - src/core/mem/q_malloc.* src/core/mem/shm_mem.h + src/core/mem/meminfo.h src/core/mem/memtest.c + src/core/mem/q_malloc.* src/core/mem/f_malloc.c src/core/pt.* src/core/sched_yield.h src/core/ut.* Copyright: 2001-2003 FhG Fokus License: ISC @@ -112,7 +112,7 @@ License: Apache-1.0 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Files: src/code/list.h +Files: src/core/list.h Copyright: 1991, 1993 The Regents of the University of California License: BSD-3-clause @@ -233,7 +233,7 @@ License: ISC ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -Files: src/lib/srutils/srjson.* +Files: src/core/utils/srjson.* Copyright: 2009 Dave Gamble License: MIT Permission is hereby granted, free of charge, to any person obtaining a copy @@ -254,7 +254,7 @@ License: MIT OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. * Exception: permission to copy, modify, propagate, and distribute a work diff --git a/pkg/kamailio/deb/noble/rules b/pkg/kamailio/deb/noble/rules index 3c5003b17..00fc1da1d 100755 --- a/pkg/kamailio/deb/noble/rules +++ b/pkg/kamailio/deb/noble/rules @@ -96,6 +96,7 @@ EXTRA_GROUPS += gzcompress EXTRA_GROUPS += jansson EXTRA_GROUPS += uuid EXTRA_GROUPS += http_async +EXTRA_GROUPS += jwt .PHONY: skip-modules skip-modules: diff --git a/pkg/kamailio/deb/precise/changelog b/pkg/kamailio/deb/precise/changelog index 882226d33..bbe05ce57 100644 --- a/pkg/kamailio/deb/precise/changelog +++ b/pkg/kamailio/deb/precise/changelog @@ -1,3 +1,15 @@ +kamailio (6.0.5) unstable; urgency=medium + + * version set 6.0.5 + + -- Victor Seva Thu, 08 Jan 2026 09:09:38 +0100 + +kamailio (6.0.4) unstable; urgency=medium + + * version set 6.0.4 + + -- Victor Seva Thu, 06 Nov 2025 08:33:15 +0100 + kamailio (6.0.3) unstable; urgency=medium * version set 6.0.3 diff --git a/pkg/kamailio/deb/precise/control b/pkg/kamailio/deb/precise/control index 5f6831ea4..fb2269938 100644 --- a/pkg/kamailio/deb/precise/control +++ b/pkg/kamailio/deb/precise/control @@ -673,7 +673,8 @@ Description: Extra modules for the Kamailio SIP Server . This package provides a set of modules for compression of SIP attachments, UUID usage, JSON data structure support, HTTP restful API asynchronous - access and a few more functions: gzcompress uuid evapi jansson janssonrpcc http_async_client + access and a few more functions: + gzcompress uuid evapi jansson janssonrpcc http_async_client jwt Package: kamailio-nth Architecture: any diff --git a/pkg/kamailio/deb/precise/copyright b/pkg/kamailio/deb/precise/copyright index 4eaf098ba..0b23c6ca1 100644 --- a/pkg/kamailio/deb/precise/copyright +++ b/pkg/kamailio/deb/precise/copyright @@ -24,16 +24,16 @@ License: GPL-2+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. -Files: src/code/atomic/* src/code/atomic_ops.* src/code/basex.* src/code/bit_*.c - src/code/char_msg_val.h src/code/compiler_opt.h src/code/core_stats.h src/code/counters.* - src/code/endianness.* src/code/futexlock.h src/code/hashes.h src/code/io_wait.* +Files: src/core/atomic/* src/core/atomic_ops.* src/core/basex.* src/core/bit_*.c + src/core/char_msg_val.h src/core/compiler_opt.h src/core/core_stats.h src/core/counters.* + src/core/endianness.* src/core/futexlock.h src/core/hashes.h src/core/io_wait.* src/core/lock_ops.c src/core/lock_ops_init.h src/core/lvalue.* src/core/mem/ll_malloc.* src/core/mem/memdbg.h src/core/mem/sf_malloc.* src/core/mod_fix.* src/modules/tm/rpc_uac.* src/modules/counters/counters.c src/modules/tls/sbufq.h src/modules/tls/tls_bio.* src/modules/tls/tls_cfg.* src/modules/tls/tls_cfg.h src/modules/tls/tls_ct_wrq.* src/modules/tls/tls_ct_q.h src/modules/tls/tls_domain.* src/modules/tls/tls_server.* src/modules/tls/tls_locking.* src/modules/tls/tls_rpc.* - src/modules/malloc_test/malloc_test.c src/modules/blst/blst.c + src/modules/misctest/misctest_mod.c src/modules/blst/blst.c src/core/parser/case_p_* src/core/parser/case_reas.h src/core/pvapi.h src/core/pv_core.* src/core/rand/fastrand.* src/core/raw_* src/core/rpc_lookup.* src/core/rvalue.* src/core/sctp_* src/core/ser_time.h @@ -47,16 +47,16 @@ License: ISC Files: src/modules/tls/tls_select.* src/modules/tls/tls_dump_vf.* Copyright: 2005-2010 iptelorg GmbH -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/modules/websocket/* src/modules/outbound/* src/modules/auth_ephemeral/* Copyright: 2012-2013 Crocodile RCS Ltd -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/core/daemonize.* src/core/fastlock.h src/core/lock_ops.h src/core/mem/mem.* src/core/mem/f_malloc.h - src/core/mem/meminfo.h src/core/mem/memtest.c src/core/mem/shm_mem.c - src/core/mem/q_malloc.* src/core/mem/shm_mem.h + src/core/mem/meminfo.h src/core/mem/memtest.c + src/core/mem/q_malloc.* src/core/mem/f_malloc.c src/core/pt.* src/core/sched_yield.h src/core/ut.* Copyright: 2001-2003 FhG Fokus License: ISC @@ -112,7 +112,7 @@ License: Apache-1.0 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Files: src/code/list.h +Files: src/core/list.h Copyright: 1991, 1993 The Regents of the University of California License: BSD-3-clause @@ -233,7 +233,7 @@ License: ISC ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -Files: src/lib/srutils/srjson.* +Files: src/core/utils/srjson.* Copyright: 2009 Dave Gamble License: MIT Permission is hereby granted, free of charge, to any person obtaining a copy @@ -254,7 +254,7 @@ License: MIT OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. * Exception: permission to copy, modify, propagate, and distribute a work diff --git a/pkg/kamailio/deb/sid/changelog b/pkg/kamailio/deb/sid/changelog index 882226d33..bbe05ce57 100644 --- a/pkg/kamailio/deb/sid/changelog +++ b/pkg/kamailio/deb/sid/changelog @@ -1,3 +1,15 @@ +kamailio (6.0.5) unstable; urgency=medium + + * version set 6.0.5 + + -- Victor Seva Thu, 08 Jan 2026 09:09:38 +0100 + +kamailio (6.0.4) unstable; urgency=medium + + * version set 6.0.4 + + -- Victor Seva Thu, 06 Nov 2025 08:33:15 +0100 + kamailio (6.0.3) unstable; urgency=medium * version set 6.0.3 diff --git a/pkg/kamailio/deb/sid/control b/pkg/kamailio/deb/sid/control index e5685b5be..7c912384c 100644 --- a/pkg/kamailio/deb/sid/control +++ b/pkg/kamailio/deb/sid/control @@ -13,13 +13,14 @@ Build-Depends: erlang-dev, flex, libcurl4-openssl-dev, - libdb-dev (>= 4.6.19), libev-dev, libevent-dev, libexpat1-dev, libhiredis-dev (>= 0.10.0), libjansson-dev, libjson-c-dev, + libjwt-dev (<< 3), + libjwt-dev (>= 1.12), libldap2-dev, liblua5.1-0-dev, libmaxminddb-dev, @@ -462,42 +463,6 @@ Description: XML based extensions for Kamailio's Management Interface Management and Control Interface. - xmlops module for XPath operations in configuration file -Package: kamailio-berkeley-modules -Architecture: any -Multi-Arch: same -Pre-Depends: - ${misc:Pre-Depends}, -Depends: - db-util (>= 4.6.19), - kamailio (= ${binary:Version}), - ${misc:Depends}, - ${shlibs:Depends}, -Description: Berkeley database module for the Kamailio SIP server - Kamailio is a very fast and flexible SIP (RFC3261) - server. Written entirely in C, Kamailio can handle thousands calls - per second even on low-budget hardware. - . - This package provides the Berkeley database module for Kamailio, a - high-performance embedded database. All database tables are stored - in files, no additional server is necessary. - -Package: kamailio-berkeley-bin -Architecture: any -Multi-Arch: foreign -Pre-Depends: - ${misc:Pre-Depends}, -Depends: - ${misc:Depends}, - ${shlibs:Depends}, -Description: Berkeley database module for Kamailio - helper program - Kamailio is a very fast and flexible SIP (RFC3261) - server. Written entirely in C, Kamailio can handle thousands calls - per second even on low-budget hardware. - . - This package provides helper modules for the Berkeley database module for - Kamailio, a high-performance embedded DB kernel. You should normally - install kamailio-berkeley-modules and not this package directly. - Package: kamailio-ldap-modules Architecture: any Multi-Arch: same @@ -893,7 +858,8 @@ Description: Extra modules for the Kamailio SIP Server . This package provides a set of modules for compression of SIP attachments, UUID usage, JSON data structure support, HTTP restful API asynchronous - access and a few more functions: gzcompress uuid evapi jansson janssonrpcc http_async_client + access, JWT (JSON Web Token) and a few more functions: + gzcompress uuid evapi jansson janssonrpcc http_async_client jwt Package: kamailio-nth Architecture: any diff --git a/pkg/kamailio/deb/sid/copyright b/pkg/kamailio/deb/sid/copyright index 4eaf098ba..0b23c6ca1 100644 --- a/pkg/kamailio/deb/sid/copyright +++ b/pkg/kamailio/deb/sid/copyright @@ -24,16 +24,16 @@ License: GPL-2+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. -Files: src/code/atomic/* src/code/atomic_ops.* src/code/basex.* src/code/bit_*.c - src/code/char_msg_val.h src/code/compiler_opt.h src/code/core_stats.h src/code/counters.* - src/code/endianness.* src/code/futexlock.h src/code/hashes.h src/code/io_wait.* +Files: src/core/atomic/* src/core/atomic_ops.* src/core/basex.* src/core/bit_*.c + src/core/char_msg_val.h src/core/compiler_opt.h src/core/core_stats.h src/core/counters.* + src/core/endianness.* src/core/futexlock.h src/core/hashes.h src/core/io_wait.* src/core/lock_ops.c src/core/lock_ops_init.h src/core/lvalue.* src/core/mem/ll_malloc.* src/core/mem/memdbg.h src/core/mem/sf_malloc.* src/core/mod_fix.* src/modules/tm/rpc_uac.* src/modules/counters/counters.c src/modules/tls/sbufq.h src/modules/tls/tls_bio.* src/modules/tls/tls_cfg.* src/modules/tls/tls_cfg.h src/modules/tls/tls_ct_wrq.* src/modules/tls/tls_ct_q.h src/modules/tls/tls_domain.* src/modules/tls/tls_server.* src/modules/tls/tls_locking.* src/modules/tls/tls_rpc.* - src/modules/malloc_test/malloc_test.c src/modules/blst/blst.c + src/modules/misctest/misctest_mod.c src/modules/blst/blst.c src/core/parser/case_p_* src/core/parser/case_reas.h src/core/pvapi.h src/core/pv_core.* src/core/rand/fastrand.* src/core/raw_* src/core/rpc_lookup.* src/core/rvalue.* src/core/sctp_* src/core/ser_time.h @@ -47,16 +47,16 @@ License: ISC Files: src/modules/tls/tls_select.* src/modules/tls/tls_dump_vf.* Copyright: 2005-2010 iptelorg GmbH -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/modules/websocket/* src/modules/outbound/* src/modules/auth_ephemeral/* Copyright: 2012-2013 Crocodile RCS Ltd -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/core/daemonize.* src/core/fastlock.h src/core/lock_ops.h src/core/mem/mem.* src/core/mem/f_malloc.h - src/core/mem/meminfo.h src/core/mem/memtest.c src/core/mem/shm_mem.c - src/core/mem/q_malloc.* src/core/mem/shm_mem.h + src/core/mem/meminfo.h src/core/mem/memtest.c + src/core/mem/q_malloc.* src/core/mem/f_malloc.c src/core/pt.* src/core/sched_yield.h src/core/ut.* Copyright: 2001-2003 FhG Fokus License: ISC @@ -112,7 +112,7 @@ License: Apache-1.0 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Files: src/code/list.h +Files: src/core/list.h Copyright: 1991, 1993 The Regents of the University of California License: BSD-3-clause @@ -233,7 +233,7 @@ License: ISC ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -Files: src/lib/srutils/srjson.* +Files: src/core/utils/srjson.* Copyright: 2009 Dave Gamble License: MIT Permission is hereby granted, free of charge, to any person obtaining a copy @@ -254,7 +254,7 @@ License: MIT OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. * Exception: permission to copy, modify, propagate, and distribute a work diff --git a/pkg/kamailio/deb/sid/kamailio-berkeley-bin.dirs b/pkg/kamailio/deb/sid/kamailio-berkeley-bin.dirs deleted file mode 100644 index 236670a2d..000000000 --- a/pkg/kamailio/deb/sid/kamailio-berkeley-bin.dirs +++ /dev/null @@ -1 +0,0 @@ -usr/sbin diff --git a/pkg/kamailio/deb/sid/rules b/pkg/kamailio/deb/sid/rules index 3c5003b17..2fdf09831 100755 --- a/pkg/kamailio/deb/sid/rules +++ b/pkg/kamailio/deb/sid/rules @@ -40,6 +40,7 @@ EXTRA_EXCLUDED_MODULES += iptrtpproxy EXTRA_EXCLUDED_MODULES += dnssec EXTRA_EXCLUDED_MODULES += java EXTRA_EXCLUDED_MODULES += python +EXTRA_EXCLUDED_MODULES += berkeley ## --EXCLUDED-- @@ -49,7 +50,6 @@ EXTRA_EXCLUDED_MODULES += python # on which other depend first) PACKAGE_GROUPS += mysql PACKAGE_GROUPS += postgres -PACKAGE_GROUPS += berkeley PACKAGE_GROUPS += unixodbc PACKAGE_GROUPS += radius PACKAGE_GROUPS += presence @@ -96,6 +96,7 @@ EXTRA_GROUPS += gzcompress EXTRA_GROUPS += jansson EXTRA_GROUPS += uuid EXTRA_GROUPS += http_async +EXTRA_GROUPS += jwt .PHONY: skip-modules skip-modules: diff --git a/pkg/kamailio/deb/stretch/changelog b/pkg/kamailio/deb/stretch/changelog index 882226d33..bbe05ce57 100644 --- a/pkg/kamailio/deb/stretch/changelog +++ b/pkg/kamailio/deb/stretch/changelog @@ -1,3 +1,15 @@ +kamailio (6.0.5) unstable; urgency=medium + + * version set 6.0.5 + + -- Victor Seva Thu, 08 Jan 2026 09:09:38 +0100 + +kamailio (6.0.4) unstable; urgency=medium + + * version set 6.0.4 + + -- Victor Seva Thu, 06 Nov 2025 08:33:15 +0100 + kamailio (6.0.3) unstable; urgency=medium * version set 6.0.3 diff --git a/pkg/kamailio/deb/stretch/control b/pkg/kamailio/deb/stretch/control index 4d1dde907..a279f69d8 100644 --- a/pkg/kamailio/deb/stretch/control +++ b/pkg/kamailio/deb/stretch/control @@ -828,7 +828,8 @@ Description: Extra modules for the Kamailio SIP Server . This package provides a set of modules for compression of SIP attachments, UUID usage, JSON data structure support, HTTP restful API asynchronous - access and a few more functions: gzcompress uuid evapi jansson janssonrpcc http_async_client + access and a few more functions: + gzcompress uuid evapi jansson janssonrpcc http_async_client jwt Package: kamailio-nth Architecture: any diff --git a/pkg/kamailio/deb/stretch/copyright b/pkg/kamailio/deb/stretch/copyright index 4eaf098ba..0b23c6ca1 100644 --- a/pkg/kamailio/deb/stretch/copyright +++ b/pkg/kamailio/deb/stretch/copyright @@ -24,16 +24,16 @@ License: GPL-2+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. -Files: src/code/atomic/* src/code/atomic_ops.* src/code/basex.* src/code/bit_*.c - src/code/char_msg_val.h src/code/compiler_opt.h src/code/core_stats.h src/code/counters.* - src/code/endianness.* src/code/futexlock.h src/code/hashes.h src/code/io_wait.* +Files: src/core/atomic/* src/core/atomic_ops.* src/core/basex.* src/core/bit_*.c + src/core/char_msg_val.h src/core/compiler_opt.h src/core/core_stats.h src/core/counters.* + src/core/endianness.* src/core/futexlock.h src/core/hashes.h src/core/io_wait.* src/core/lock_ops.c src/core/lock_ops_init.h src/core/lvalue.* src/core/mem/ll_malloc.* src/core/mem/memdbg.h src/core/mem/sf_malloc.* src/core/mod_fix.* src/modules/tm/rpc_uac.* src/modules/counters/counters.c src/modules/tls/sbufq.h src/modules/tls/tls_bio.* src/modules/tls/tls_cfg.* src/modules/tls/tls_cfg.h src/modules/tls/tls_ct_wrq.* src/modules/tls/tls_ct_q.h src/modules/tls/tls_domain.* src/modules/tls/tls_server.* src/modules/tls/tls_locking.* src/modules/tls/tls_rpc.* - src/modules/malloc_test/malloc_test.c src/modules/blst/blst.c + src/modules/misctest/misctest_mod.c src/modules/blst/blst.c src/core/parser/case_p_* src/core/parser/case_reas.h src/core/pvapi.h src/core/pv_core.* src/core/rand/fastrand.* src/core/raw_* src/core/rpc_lookup.* src/core/rvalue.* src/core/sctp_* src/core/ser_time.h @@ -47,16 +47,16 @@ License: ISC Files: src/modules/tls/tls_select.* src/modules/tls/tls_dump_vf.* Copyright: 2005-2010 iptelorg GmbH -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/modules/websocket/* src/modules/outbound/* src/modules/auth_ephemeral/* Copyright: 2012-2013 Crocodile RCS Ltd -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/core/daemonize.* src/core/fastlock.h src/core/lock_ops.h src/core/mem/mem.* src/core/mem/f_malloc.h - src/core/mem/meminfo.h src/core/mem/memtest.c src/core/mem/shm_mem.c - src/core/mem/q_malloc.* src/core/mem/shm_mem.h + src/core/mem/meminfo.h src/core/mem/memtest.c + src/core/mem/q_malloc.* src/core/mem/f_malloc.c src/core/pt.* src/core/sched_yield.h src/core/ut.* Copyright: 2001-2003 FhG Fokus License: ISC @@ -112,7 +112,7 @@ License: Apache-1.0 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Files: src/code/list.h +Files: src/core/list.h Copyright: 1991, 1993 The Regents of the University of California License: BSD-3-clause @@ -233,7 +233,7 @@ License: ISC ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -Files: src/lib/srutils/srjson.* +Files: src/core/utils/srjson.* Copyright: 2009 Dave Gamble License: MIT Permission is hereby granted, free of charge, to any person obtaining a copy @@ -254,7 +254,7 @@ License: MIT OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. * Exception: permission to copy, modify, propagate, and distribute a work diff --git a/pkg/kamailio/deb/trixie/changelog b/pkg/kamailio/deb/trixie/changelog index 882226d33..bbe05ce57 100644 --- a/pkg/kamailio/deb/trixie/changelog +++ b/pkg/kamailio/deb/trixie/changelog @@ -1,3 +1,15 @@ +kamailio (6.0.5) unstable; urgency=medium + + * version set 6.0.5 + + -- Victor Seva Thu, 08 Jan 2026 09:09:38 +0100 + +kamailio (6.0.4) unstable; urgency=medium + + * version set 6.0.4 + + -- Victor Seva Thu, 06 Nov 2025 08:33:15 +0100 + kamailio (6.0.3) unstable; urgency=medium * version set 6.0.3 diff --git a/pkg/kamailio/deb/trixie/control b/pkg/kamailio/deb/trixie/control index e5685b5be..ea46fbce3 100644 --- a/pkg/kamailio/deb/trixie/control +++ b/pkg/kamailio/deb/trixie/control @@ -20,6 +20,8 @@ Build-Depends: libhiredis-dev (>= 0.10.0), libjansson-dev, libjson-c-dev, + libjwt-dev (<< 3), + libjwt-dev (>= 1.12), libldap2-dev, liblua5.1-0-dev, libmaxminddb-dev, @@ -893,7 +895,8 @@ Description: Extra modules for the Kamailio SIP Server . This package provides a set of modules for compression of SIP attachments, UUID usage, JSON data structure support, HTTP restful API asynchronous - access and a few more functions: gzcompress uuid evapi jansson janssonrpcc http_async_client + access, JWT (JSON Web Token) and a few more functions: + gzcompress uuid evapi jansson janssonrpcc http_async_client jwt Package: kamailio-nth Architecture: any diff --git a/pkg/kamailio/deb/trixie/copyright b/pkg/kamailio/deb/trixie/copyright index 4eaf098ba..0b23c6ca1 100644 --- a/pkg/kamailio/deb/trixie/copyright +++ b/pkg/kamailio/deb/trixie/copyright @@ -24,16 +24,16 @@ License: GPL-2+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. -Files: src/code/atomic/* src/code/atomic_ops.* src/code/basex.* src/code/bit_*.c - src/code/char_msg_val.h src/code/compiler_opt.h src/code/core_stats.h src/code/counters.* - src/code/endianness.* src/code/futexlock.h src/code/hashes.h src/code/io_wait.* +Files: src/core/atomic/* src/core/atomic_ops.* src/core/basex.* src/core/bit_*.c + src/core/char_msg_val.h src/core/compiler_opt.h src/core/core_stats.h src/core/counters.* + src/core/endianness.* src/core/futexlock.h src/core/hashes.h src/core/io_wait.* src/core/lock_ops.c src/core/lock_ops_init.h src/core/lvalue.* src/core/mem/ll_malloc.* src/core/mem/memdbg.h src/core/mem/sf_malloc.* src/core/mod_fix.* src/modules/tm/rpc_uac.* src/modules/counters/counters.c src/modules/tls/sbufq.h src/modules/tls/tls_bio.* src/modules/tls/tls_cfg.* src/modules/tls/tls_cfg.h src/modules/tls/tls_ct_wrq.* src/modules/tls/tls_ct_q.h src/modules/tls/tls_domain.* src/modules/tls/tls_server.* src/modules/tls/tls_locking.* src/modules/tls/tls_rpc.* - src/modules/malloc_test/malloc_test.c src/modules/blst/blst.c + src/modules/misctest/misctest_mod.c src/modules/blst/blst.c src/core/parser/case_p_* src/core/parser/case_reas.h src/core/pvapi.h src/core/pv_core.* src/core/rand/fastrand.* src/core/raw_* src/core/rpc_lookup.* src/core/rvalue.* src/core/sctp_* src/core/ser_time.h @@ -47,16 +47,16 @@ License: ISC Files: src/modules/tls/tls_select.* src/modules/tls/tls_dump_vf.* Copyright: 2005-2010 iptelorg GmbH -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/modules/websocket/* src/modules/outbound/* src/modules/auth_ephemeral/* Copyright: 2012-2013 Crocodile RCS Ltd -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/core/daemonize.* src/core/fastlock.h src/core/lock_ops.h src/core/mem/mem.* src/core/mem/f_malloc.h - src/core/mem/meminfo.h src/core/mem/memtest.c src/core/mem/shm_mem.c - src/core/mem/q_malloc.* src/core/mem/shm_mem.h + src/core/mem/meminfo.h src/core/mem/memtest.c + src/core/mem/q_malloc.* src/core/mem/f_malloc.c src/core/pt.* src/core/sched_yield.h src/core/ut.* Copyright: 2001-2003 FhG Fokus License: ISC @@ -112,7 +112,7 @@ License: Apache-1.0 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Files: src/code/list.h +Files: src/core/list.h Copyright: 1991, 1993 The Regents of the University of California License: BSD-3-clause @@ -233,7 +233,7 @@ License: ISC ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -Files: src/lib/srutils/srjson.* +Files: src/core/utils/srjson.* Copyright: 2009 Dave Gamble License: MIT Permission is hereby granted, free of charge, to any person obtaining a copy @@ -254,7 +254,7 @@ License: MIT OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. * Exception: permission to copy, modify, propagate, and distribute a work diff --git a/pkg/kamailio/deb/trixie/rules b/pkg/kamailio/deb/trixie/rules index 3c5003b17..00fc1da1d 100755 --- a/pkg/kamailio/deb/trixie/rules +++ b/pkg/kamailio/deb/trixie/rules @@ -96,6 +96,7 @@ EXTRA_GROUPS += gzcompress EXTRA_GROUPS += jansson EXTRA_GROUPS += uuid EXTRA_GROUPS += http_async +EXTRA_GROUPS += jwt .PHONY: skip-modules skip-modules: diff --git a/pkg/kamailio/deb/trusty/changelog b/pkg/kamailio/deb/trusty/changelog index 882226d33..bbe05ce57 100644 --- a/pkg/kamailio/deb/trusty/changelog +++ b/pkg/kamailio/deb/trusty/changelog @@ -1,3 +1,15 @@ +kamailio (6.0.5) unstable; urgency=medium + + * version set 6.0.5 + + -- Victor Seva Thu, 08 Jan 2026 09:09:38 +0100 + +kamailio (6.0.4) unstable; urgency=medium + + * version set 6.0.4 + + -- Victor Seva Thu, 06 Nov 2025 08:33:15 +0100 + kamailio (6.0.3) unstable; urgency=medium * version set 6.0.3 diff --git a/pkg/kamailio/deb/trusty/control b/pkg/kamailio/deb/trusty/control index e911dc738..c233efa00 100644 --- a/pkg/kamailio/deb/trusty/control +++ b/pkg/kamailio/deb/trusty/control @@ -764,7 +764,8 @@ Description: Extra modules for the Kamailio SIP Server . This package provides a set of modules for compression of SIP attachments, UUID usage, JSON data structure support, HTTP restful API asynchronous - access and a few more functions: gzcompress uuid evapi jansson janssonrpcc http_async_client + access and a few more functions: + gzcompress uuid evapi jansson janssonrpcc http_async_client jwt Package: kamailio-nth Architecture: any diff --git a/pkg/kamailio/deb/trusty/copyright b/pkg/kamailio/deb/trusty/copyright index 4eaf098ba..0b23c6ca1 100644 --- a/pkg/kamailio/deb/trusty/copyright +++ b/pkg/kamailio/deb/trusty/copyright @@ -24,16 +24,16 @@ License: GPL-2+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. -Files: src/code/atomic/* src/code/atomic_ops.* src/code/basex.* src/code/bit_*.c - src/code/char_msg_val.h src/code/compiler_opt.h src/code/core_stats.h src/code/counters.* - src/code/endianness.* src/code/futexlock.h src/code/hashes.h src/code/io_wait.* +Files: src/core/atomic/* src/core/atomic_ops.* src/core/basex.* src/core/bit_*.c + src/core/char_msg_val.h src/core/compiler_opt.h src/core/core_stats.h src/core/counters.* + src/core/endianness.* src/core/futexlock.h src/core/hashes.h src/core/io_wait.* src/core/lock_ops.c src/core/lock_ops_init.h src/core/lvalue.* src/core/mem/ll_malloc.* src/core/mem/memdbg.h src/core/mem/sf_malloc.* src/core/mod_fix.* src/modules/tm/rpc_uac.* src/modules/counters/counters.c src/modules/tls/sbufq.h src/modules/tls/tls_bio.* src/modules/tls/tls_cfg.* src/modules/tls/tls_cfg.h src/modules/tls/tls_ct_wrq.* src/modules/tls/tls_ct_q.h src/modules/tls/tls_domain.* src/modules/tls/tls_server.* src/modules/tls/tls_locking.* src/modules/tls/tls_rpc.* - src/modules/malloc_test/malloc_test.c src/modules/blst/blst.c + src/modules/misctest/misctest_mod.c src/modules/blst/blst.c src/core/parser/case_p_* src/core/parser/case_reas.h src/core/pvapi.h src/core/pv_core.* src/core/rand/fastrand.* src/core/raw_* src/core/rpc_lookup.* src/core/rvalue.* src/core/sctp_* src/core/ser_time.h @@ -47,16 +47,16 @@ License: ISC Files: src/modules/tls/tls_select.* src/modules/tls/tls_dump_vf.* Copyright: 2005-2010 iptelorg GmbH -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/modules/websocket/* src/modules/outbound/* src/modules/auth_ephemeral/* Copyright: 2012-2013 Crocodile RCS Ltd -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/core/daemonize.* src/core/fastlock.h src/core/lock_ops.h src/core/mem/mem.* src/core/mem/f_malloc.h - src/core/mem/meminfo.h src/core/mem/memtest.c src/core/mem/shm_mem.c - src/core/mem/q_malloc.* src/core/mem/shm_mem.h + src/core/mem/meminfo.h src/core/mem/memtest.c + src/core/mem/q_malloc.* src/core/mem/f_malloc.c src/core/pt.* src/core/sched_yield.h src/core/ut.* Copyright: 2001-2003 FhG Fokus License: ISC @@ -112,7 +112,7 @@ License: Apache-1.0 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Files: src/code/list.h +Files: src/core/list.h Copyright: 1991, 1993 The Regents of the University of California License: BSD-3-clause @@ -233,7 +233,7 @@ License: ISC ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -Files: src/lib/srutils/srjson.* +Files: src/core/utils/srjson.* Copyright: 2009 Dave Gamble License: MIT Permission is hereby granted, free of charge, to any person obtaining a copy @@ -254,7 +254,7 @@ License: MIT OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. * Exception: permission to copy, modify, propagate, and distribute a work diff --git a/pkg/kamailio/deb/wheezy/changelog b/pkg/kamailio/deb/wheezy/changelog index 882226d33..bbe05ce57 100644 --- a/pkg/kamailio/deb/wheezy/changelog +++ b/pkg/kamailio/deb/wheezy/changelog @@ -1,3 +1,15 @@ +kamailio (6.0.5) unstable; urgency=medium + + * version set 6.0.5 + + -- Victor Seva Thu, 08 Jan 2026 09:09:38 +0100 + +kamailio (6.0.4) unstable; urgency=medium + + * version set 6.0.4 + + -- Victor Seva Thu, 06 Nov 2025 08:33:15 +0100 + kamailio (6.0.3) unstable; urgency=medium * version set 6.0.3 diff --git a/pkg/kamailio/deb/wheezy/control b/pkg/kamailio/deb/wheezy/control index 5f6831ea4..fb2269938 100644 --- a/pkg/kamailio/deb/wheezy/control +++ b/pkg/kamailio/deb/wheezy/control @@ -673,7 +673,8 @@ Description: Extra modules for the Kamailio SIP Server . This package provides a set of modules for compression of SIP attachments, UUID usage, JSON data structure support, HTTP restful API asynchronous - access and a few more functions: gzcompress uuid evapi jansson janssonrpcc http_async_client + access and a few more functions: + gzcompress uuid evapi jansson janssonrpcc http_async_client jwt Package: kamailio-nth Architecture: any diff --git a/pkg/kamailio/deb/wheezy/copyright b/pkg/kamailio/deb/wheezy/copyright index 4eaf098ba..0b23c6ca1 100644 --- a/pkg/kamailio/deb/wheezy/copyright +++ b/pkg/kamailio/deb/wheezy/copyright @@ -24,16 +24,16 @@ License: GPL-2+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. -Files: src/code/atomic/* src/code/atomic_ops.* src/code/basex.* src/code/bit_*.c - src/code/char_msg_val.h src/code/compiler_opt.h src/code/core_stats.h src/code/counters.* - src/code/endianness.* src/code/futexlock.h src/code/hashes.h src/code/io_wait.* +Files: src/core/atomic/* src/core/atomic_ops.* src/core/basex.* src/core/bit_*.c + src/core/char_msg_val.h src/core/compiler_opt.h src/core/core_stats.h src/core/counters.* + src/core/endianness.* src/core/futexlock.h src/core/hashes.h src/core/io_wait.* src/core/lock_ops.c src/core/lock_ops_init.h src/core/lvalue.* src/core/mem/ll_malloc.* src/core/mem/memdbg.h src/core/mem/sf_malloc.* src/core/mod_fix.* src/modules/tm/rpc_uac.* src/modules/counters/counters.c src/modules/tls/sbufq.h src/modules/tls/tls_bio.* src/modules/tls/tls_cfg.* src/modules/tls/tls_cfg.h src/modules/tls/tls_ct_wrq.* src/modules/tls/tls_ct_q.h src/modules/tls/tls_domain.* src/modules/tls/tls_server.* src/modules/tls/tls_locking.* src/modules/tls/tls_rpc.* - src/modules/malloc_test/malloc_test.c src/modules/blst/blst.c + src/modules/misctest/misctest_mod.c src/modules/blst/blst.c src/core/parser/case_p_* src/core/parser/case_reas.h src/core/pvapi.h src/core/pv_core.* src/core/rand/fastrand.* src/core/raw_* src/core/rpc_lookup.* src/core/rvalue.* src/core/sctp_* src/core/ser_time.h @@ -47,16 +47,16 @@ License: ISC Files: src/modules/tls/tls_select.* src/modules/tls/tls_dump_vf.* Copyright: 2005-2010 iptelorg GmbH -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/modules/websocket/* src/modules/outbound/* src/modules/auth_ephemeral/* Copyright: 2012-2013 Crocodile RCS Ltd -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/core/daemonize.* src/core/fastlock.h src/core/lock_ops.h src/core/mem/mem.* src/core/mem/f_malloc.h - src/core/mem/meminfo.h src/core/mem/memtest.c src/core/mem/shm_mem.c - src/core/mem/q_malloc.* src/core/mem/shm_mem.h + src/core/mem/meminfo.h src/core/mem/memtest.c + src/core/mem/q_malloc.* src/core/mem/f_malloc.c src/core/pt.* src/core/sched_yield.h src/core/ut.* Copyright: 2001-2003 FhG Fokus License: ISC @@ -112,7 +112,7 @@ License: Apache-1.0 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Files: src/code/list.h +Files: src/core/list.h Copyright: 1991, 1993 The Regents of the University of California License: BSD-3-clause @@ -233,7 +233,7 @@ License: ISC ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -Files: src/lib/srutils/srjson.* +Files: src/core/utils/srjson.* Copyright: 2009 Dave Gamble License: MIT Permission is hereby granted, free of charge, to any person obtaining a copy @@ -254,7 +254,7 @@ License: MIT OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. * Exception: permission to copy, modify, propagate, and distribute a work diff --git a/pkg/kamailio/deb/xenial/changelog b/pkg/kamailio/deb/xenial/changelog index 882226d33..bbe05ce57 100644 --- a/pkg/kamailio/deb/xenial/changelog +++ b/pkg/kamailio/deb/xenial/changelog @@ -1,3 +1,15 @@ +kamailio (6.0.5) unstable; urgency=medium + + * version set 6.0.5 + + -- Victor Seva Thu, 08 Jan 2026 09:09:38 +0100 + +kamailio (6.0.4) unstable; urgency=medium + + * version set 6.0.4 + + -- Victor Seva Thu, 06 Nov 2025 08:33:15 +0100 + kamailio (6.0.3) unstable; urgency=medium * version set 6.0.3 diff --git a/pkg/kamailio/deb/xenial/control b/pkg/kamailio/deb/xenial/control index 286ab18c5..a8dfa7dd6 100644 --- a/pkg/kamailio/deb/xenial/control +++ b/pkg/kamailio/deb/xenial/control @@ -846,7 +846,8 @@ Description: Extra modules for the Kamailio SIP Server . This package provides a set of modules for compression of SIP attachments, UUID usage, JSON data structure support, HTTP restful API asynchronous - access and a few more functions: gzcompress uuid evapi jansson janssonrpcc http_async_client + access and a few more functions: + gzcompress uuid evapi jansson janssonrpcc http_async_client jwt Package: kamailio-nth Architecture: any diff --git a/pkg/kamailio/deb/xenial/copyright b/pkg/kamailio/deb/xenial/copyright index 4eaf098ba..0b23c6ca1 100644 --- a/pkg/kamailio/deb/xenial/copyright +++ b/pkg/kamailio/deb/xenial/copyright @@ -24,16 +24,16 @@ License: GPL-2+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. -Files: src/code/atomic/* src/code/atomic_ops.* src/code/basex.* src/code/bit_*.c - src/code/char_msg_val.h src/code/compiler_opt.h src/code/core_stats.h src/code/counters.* - src/code/endianness.* src/code/futexlock.h src/code/hashes.h src/code/io_wait.* +Files: src/core/atomic/* src/core/atomic_ops.* src/core/basex.* src/core/bit_*.c + src/core/char_msg_val.h src/core/compiler_opt.h src/core/core_stats.h src/core/counters.* + src/core/endianness.* src/core/futexlock.h src/core/hashes.h src/core/io_wait.* src/core/lock_ops.c src/core/lock_ops_init.h src/core/lvalue.* src/core/mem/ll_malloc.* src/core/mem/memdbg.h src/core/mem/sf_malloc.* src/core/mod_fix.* src/modules/tm/rpc_uac.* src/modules/counters/counters.c src/modules/tls/sbufq.h src/modules/tls/tls_bio.* src/modules/tls/tls_cfg.* src/modules/tls/tls_cfg.h src/modules/tls/tls_ct_wrq.* src/modules/tls/tls_ct_q.h src/modules/tls/tls_domain.* src/modules/tls/tls_server.* src/modules/tls/tls_locking.* src/modules/tls/tls_rpc.* - src/modules/malloc_test/malloc_test.c src/modules/blst/blst.c + src/modules/misctest/misctest_mod.c src/modules/blst/blst.c src/core/parser/case_p_* src/core/parser/case_reas.h src/core/pvapi.h src/core/pv_core.* src/core/rand/fastrand.* src/core/raw_* src/core/rpc_lookup.* src/core/rvalue.* src/core/sctp_* src/core/ser_time.h @@ -47,16 +47,16 @@ License: ISC Files: src/modules/tls/tls_select.* src/modules/tls/tls_dump_vf.* Copyright: 2005-2010 iptelorg GmbH -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/modules/websocket/* src/modules/outbound/* src/modules/auth_ephemeral/* Copyright: 2012-2013 Crocodile RCS Ltd -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception Files: src/core/daemonize.* src/core/fastlock.h src/core/lock_ops.h src/core/mem/mem.* src/core/mem/f_malloc.h - src/core/mem/meminfo.h src/core/mem/memtest.c src/core/mem/shm_mem.c - src/core/mem/q_malloc.* src/core/mem/shm_mem.h + src/core/mem/meminfo.h src/core/mem/memtest.c + src/core/mem/q_malloc.* src/core/mem/f_malloc.c src/core/pt.* src/core/sched_yield.h src/core/ut.* Copyright: 2001-2003 FhG Fokus License: ISC @@ -112,7 +112,7 @@ License: Apache-1.0 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Files: src/code/list.h +Files: src/core/list.h Copyright: 1991, 1993 The Regents of the University of California License: BSD-3-clause @@ -233,7 +233,7 @@ License: ISC ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -Files: src/lib/srutils/srjson.* +Files: src/core/utils/srjson.* Copyright: 2009 Dave Gamble License: MIT Permission is hereby granted, free of charge, to any person obtaining a copy @@ -254,7 +254,7 @@ License: MIT OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -License: GPL-2 + OpenSSL exception +License: GPL-2+ with OpenSSL exception On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. * Exception: permission to copy, modify, propagate, and distribute a work diff --git a/pkg/kamailio/obs/kamailio-local.cfg b/pkg/kamailio/obs/kamailio-local.cfg new file mode 100644 index 000000000..bf2c597de --- /dev/null +++ b/pkg/kamailio/obs/kamailio-local.cfg @@ -0,0 +1,5 @@ +# According service policy +# The service MUST NOT listen on a network socket for connections originating on a separate physical or virtual machine. +# https://docs.fedoraproject.org/en-US/packaging-guidelines/DefaultServices/#_must_not_listen_for_outside_connections +listen=udp:lo +listen=tcp:lo diff --git a/pkg/kamailio/obs/kamailio.preset b/pkg/kamailio/obs/kamailio.preset new file mode 100644 index 000000000..25ab2dd22 --- /dev/null +++ b/pkg/kamailio/obs/kamailio.preset @@ -0,0 +1 @@ +enable kamailio.service diff --git a/pkg/kamailio/obs/kamailio.spec b/pkg/kamailio/obs/kamailio.spec index 3d7076178..fa5c1beb3 100644 --- a/pkg/kamailio/obs/kamailio.spec +++ b/pkg/kamailio/obs/kamailio.spec @@ -1,5 +1,5 @@ %define name kamailio -%define ver 6.0.3 +%define ver 6.0.5 %define rel dev1.0%{dist} %if 0%{?fedora} @@ -188,13 +188,17 @@ Conflicts: kamailio-acc_json < %ver Conflicts: kamailio-auth-ephemeral < %ver, kamailio-bdb < %ver Conflicts: kamailio-carrierroute < %ver, kamailio-cpl < %ver Conflicts: kamailio-dialplan < %ver, kamailio-dnssec < %ver +Conflicts: kamailio-gcrypt < %ver Conflicts: kamailio-geoip < %ver, kamailio-gzcompress < %ver Conflicts: kamailio-http_client < %ver Conflicts: kamailio-ims < %ver, kamailio-java < %ver, kamailio-json < %ver Conflicts: kamailio-jwt < %ver +Conflicts: kamailio-kafka < %ver Conflicts: kamailio-kazoo < %ver Conflicts: kamailio-lcr < %ver, kamailio-ldap < %ver, kamailio-lost < %ver, kamailio-lua < %ver +Conflicts: kamailio-mqtt < %ver Conflicts: kamailio-nats < %ver +Conflicts: kamailio-nghttp2 < %ver Conflicts: kamailio-rabbitmq < %ver Conflicts: kamailio-memcached < %ver, kamailio-mongodb < %ver, kamailio-mysql < %ver Conflicts: kamailio-outbound < %ver, kamailio-perl < %ver @@ -210,9 +214,19 @@ Conflicts: kamailio-utils < %ver, kamailio-websocket < %ver Conflicts: kamailio-xhttp-pi < %ver, kamailio-xmlops < %ver Conflicts: kamailio-xmlrpc < %ver, kamailio-xmpp < %ver Conflicts: kamailio-uuid < %ver -BuildRequires: bison, flex, which, make, gcc, gcc-c++, pkgconfig, readline-devel Requires: systemd BuildRequires: systemd-devel +BuildRequires: systemd-rpm-macros +BuildRequires: bison +BuildRequires: cmake +BuildRequires: flex +BuildRequires: which +BuildRequires: make +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: pkgconfig +BuildRequires: readline-devel +BuildRequires: libxslt %if 0%{?suse_version} == 1315 || 0%{?suse_version} == 1330 Requires: filesystem @@ -390,6 +404,16 @@ suspended when sending the event, to be resumed at a later point, maybe triggere %endif +%package gcrypt +Summary: Module provides various cryptography tools for use in Kamailio +Group: %{PKGGROUP} +Requires: libgcrypt, kamailio = %ver +BuildRequires: libgcrypt-devel + +%description gcrypt +Module provides various cryptography tools for use in Kamailio. + + %package geoip Summary: MaxMind GeoIP support for Kamailio Group: %{PKGGROUP} @@ -508,6 +532,17 @@ This module provides JWT (JSON Web Token) functions to be used in Kamailio confi It relies on libjwt (at least v1.12.0) library (https://github.com/benmcollins/libjwt). +%package kafka +Summary: Module produces and sends messages to a Kafka server +Group: %{PKGGROUP} +Requires: librdkafka, kamailio = %ver +BuildRequires: librdkafka-devel + +%description kafka +Kafka module for Kamailio. +Module produces and sends messages to a Kafka server. + + %if %{with kazoo} %package kazoo Summary: Kazoo middle layer connector support for Kamailio @@ -605,6 +640,16 @@ MongoDB database connectivity for Kamailio. %endif +%package mqtt +Summary: Module allows bidirectional publish/subscribe communication by connecting Kamailio to a MQTT Broker +Group: %{PKGGROUP} +Requires: mosquitto, kamailio = %ver +BuildRequires: mosquitto-devel + +%description mqtt +Module allows bidirectional publish/subscribe communication by connecting Kamailio to a MQTT Broker. + + %package mysql Summary: MySQL database connectivity for Kamailio Group: %{PKGGROUP} @@ -633,6 +678,16 @@ The module provides an NATS consumer for Kamailio. NATS is a real time distribut %endif +%package nghttp2 +Summary: Module implements an embedded HTTP/2 server using nghttpd2 library +Group: %{PKGGROUP} +Requires: libnghttp2, kamailio = %ver +BuildRequires: libnghttp2-devel + +%description nghttp2 +Module implements an embedded HTTP/2 server using nghttpd2 library + + %package outbound Summary: Outbound (RFC 5626) support for Kamailio Group: %{PKGGROUP} @@ -1069,234 +1124,199 @@ sed -i -e 's|/usr/sbin/kamailio|/usr/sbin/kamailio --atexit=no|' pkg/kamailio/ob rm -f misc/examples/pkg/sipcapture.cfg - %build -%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} >= 8 -export RADCLI=1 -%endif -make cfg prefix=/usr \ - basedir=%{buildroot} \ - cfg_prefix=%{buildroot} \ - doc_prefix=%{buildroot} \ - doc_dir=%{_docdir}/kamailio/ \ - cfg_target=%{_sysconfdir}/kamailio/ modules_dirs="modules" -make -make every-module skip_modules="app_mono db_cassandra db_oracle iptrtpproxy \ - jabber ndb_cassandra osp" \ -%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} >= 8 - RADCLI=1 \ -%endif -%if 0%{?rhel} >= 8 - PYTHON3=python3.12 \ -%endif - WOLFSSL_INTERNAL=no \ - group_include="kstandard kautheph kberkeley kcarrierroute \ -%if %{with cnxcc} - kcnxcc \ -%endif - kcpl \ -%if %{with dnssec} - kdnssec \ -%endif -%if %{with evapi} - kev \ -%endif - kgeoip2 \ - kgzcompress \ -%if %{with http_async_client} - khttp_async \ -%endif - kxhttp_prom \ -%if %{with ims} - kims \ -%endif -%if %{with jansson} - kjansson \ -%endif -%if %{with json} - kjson \ -%endif - kjsonrpcs \ - kjwt \ -%if %{with kazoo} - kkazoo \ -%endif - kldap \ +MODULES="\ +acc_json \ +acc_radius \ %if %{with lua} - klua \ -%endif -%if %{with lwsc} - klwsc \ -%endif -%if %{with memcached} - kmemcached \ -%endif -%if %{with xmlrpc} - kmi_xmlrpc \ -%endif -%if %{with mongodb} - kmongodb \ -%endif - kmysql koutbound \ -%if %{with nats} - knats \ +app_lua \ %endif %if %{with perl} - kperl \ -%endif -%if %{with phonenum} - kphonenum \ +app_perl \ %endif - kpostgres kpresence \ %if %{with python2} - kpython \ +app_python \ %endif %if %{with python3} - kpython3 \ -%endif -%if %{with rabbitmq} - krabbitmq \ -%endif - kradius \ -%if %{with redis} - kredis \ +app_python3 \ +app_python3s \ %endif %if %{with ruby} - kruby \ -%endif -%if %{with sctp} - ksctp \ -%endif - ksnmpstats ksqlite \ -%if "%{?_unitdir}" != "" - ksystemd \ +app_ruby \ +app_ruby_proc \ %endif - ktls \ -%if %{with wolfssl} - ktls_wolfssl \ -%endif - kunixodbc kutils \ -%if %{with websocket} - kwebsocket \ +auth_ephemeral \ +auth_radius \ +cdp \ +cdp_avp \ +%if %{with cnxcc} +cnxcc \ %endif - kxml kxmpp kuuid" - -make utils - - - -%install -rm -rf %{buildroot} - -make install -make install-modules-all skip_modules="app_mono db_cassandra db_oracle \ - iptrtpproxy jabber osp" \ -%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} >= 8 - RADCLI=1 \ +cplc \ +crypto \ +db2_ldap \ +%if %{with mongodb} +db_mongodb \ %endif -%if 0%{?rhel} >= 8 - PYTHON3=python3.12 \ +db_mysql \ +%if %{with perl} +db_perlvdb %endif - WOLFSSL_INTERNAL=no \ - group_include="kstandard kautheph kberkeley kcarrierroute \ -%if %{with cnxcc} - kcnxcc \ +db_postgres \ +%if %{with redis} +db_redis \ %endif - kcpl \ +db_sqlite \ +db_text \ +db_text \ +db_unixodbc \ +dialplan \ %if %{with dnssec} - kdnssec \ +dnssec \ %endif %if %{with evapi} - kev \ +evapi \ %endif - kgeoip2 \ - kgzcompress \ +gcrypt \ +geoip2 \ +gzcompress \ +h350 \ %if %{with http_async_client} - khttp_async \ +http_async_client \ %endif - kxhttp_prom \ +http_client \ %if %{with ims} - kims \ +ims_auth \ +ims_charging \ +ims_dialog \ +ims_diameter_server \ +ims_icscf \ +ims_ipsec_pcscf \ +ims_isc \ +ims_ocs \ +ims_qos \ +ims_qos_npn \ +ims_registrar_pcscf \ +ims_registrar_scscf \ +ims_usrloc_pcscf \ +ims_usrloc_scscf \ %endif %if %{with jansson} - kjansson \ +jansson db_berkeley \ +janssonrpcc \ %endif %if %{with json} - kjson \ +json \ %endif - kjsonrpcs \ - kjwt \ +jsonrpcc \ +jwt \ +kafka \ %if %{with kazoo} - kkazoo \ -%endif - kldap \ -%if %{with lua} - klua \ +kazoo \ %endif +lcr \ +ldap \ +log_systemd \ +lost \ %if %{with lwsc} - klwsc \ +lwsc \ %endif %if %{with memcached} - kmemcached \ +memcached \ %endif -%if %{with xmlrpc} - kmi_xmlrpc \ +misc_radius \ +mqtt \ +%if %{with nats} +nats \ %endif %if %{with mongodb} - kmongodb \ +ndb_mongodb \ %endif - kmysql koutbound \ -%if %{with nats} - knats \ -%endif -%if %{with perl} - kperl \ +%if %{with redis} +ndb_redis \ %endif +nghttp2 \ +outbound \ +peering \ %if %{with phonenum} - kphonenum \ -%endif - kpostgres kpresence \ -%if %{with python2} - kpython \ -%endif -%if %{with python3} - kpython3 \ -%endif +phonenum \ +%endif +presence \ +presence_conference \ +presence_dfks \ +presence_dialoginfo \ +presence_mwi \ +presence_profile \ +presence_reginfo \ +presence_xml \ +pua \ +pua_bla \ +pua_dialoginfo \ +pua_json \ +pua_reginfo \ +pua_rpc \ +pua_rpc \ +pua_usrloc \ +pua_xmpp \ +pvtpl \ %if %{with rabbitmq} - krabbitmq \ -%endif - kradius \ -%if %{with redis} - kredis \ -%endif -%if %{with ruby} - kruby \ +rabbitmq \ %endif +regex \ +rls \ %if %{with sctp} - ksctp \ -%endif - ksnmpstats ksqlite \ -%if "%{?_unitdir}" != "" - ksystemd \ +sctp \ %endif - ktls \ +siprepo \ +slack \ +snmpstats \ +systemdops \ +tls \ %if %{with wolfssl} - ktls_wolfssl \ +tls_wolfssl \ %endif - kunixodbc kutils \ +%if %{with redis} +topos_redis \ +%endif +utils \ +uuid \ %if %{with websocket} - kwebsocket \ +websocket \ +%endif +xcap_client \ +xcap_server \ +xhttp_pi \ +xmlops \ +%if %{with xmlrpc} +xmlrpc \ %endif - kxml kxmpp kuuid" +xmpp \ +" + +%{cmake} \ + -DBUILD_DOC=ON \ + -DUSE_TLS=ON \ + -DRADIUSCLIENT="RADCLI" \ + -DINCLUDE_MODULES="${MODULES}" -make install-cfg-pkg +%{cmake_build} +%{cmake_build} --target dbschema +%{cmake_build} --target man + +%install +%{cmake_install} +rm -f %{buildroot}%{_sysconfdir}/kamailio/tls.cfg.sample +rm -f %{buildroot}%{_sysconfdir}/kamailio/pi_framework.xml.sample install -d %{buildroot}%{_sharedstatedir}/kamailio install -d %{buildroot}%{_unitdir} +install -Dpm 0644 pkg/kamailio/obs/kamailio.preset %{buildroot}%{_presetdir}/kamailio.preset install -Dpm 0644 pkg/kamailio/obs/kamailio.service %{buildroot}%{_unitdir}/kamailio.service install -Dpm 0644 pkg/kamailio/obs/kamailio@.service %{buildroot}%{_unitdir}/kamailio@.service +install -Dpm 0644 pkg/kamailio/obs/kamailio.sysusers %{buildroot}%{_sysusersdir}/kamailio.conf install -Dpm 0644 pkg/kamailio/obs/kamailio.tmpfiles %{buildroot}%{_tmpfilesdir}/kamailio.conf +install -Dpm 0644 pkg/kamailio/obs/kamailio-local.cfg %{buildroot}%{_sysconfdir}/kamailio/kamailio-local.cfg %if 0%{?suse_version} install -d %{buildroot}%{_fillupdir} @@ -1311,6 +1331,7 @@ install -m644 pkg/kamailio/obs/kamailio.sysconfig \ %if 0%{?suse_version} %py_compile -O %{buildroot}%{_libdir}/kamailio/kamctl/dbtextdb %endif + %if 0%{?fedora} || 0%{?rhel} >= 8 %py_byte_compile %{__python3} %{buildroot}%{_libdir}/kamailio/kamctl/dbtextdb %endif @@ -1318,43 +1339,21 @@ install -m644 pkg/kamailio/obs/kamailio.sysconfig \ # Removing devel files rm -f %{buildroot}%{_libdir}/kamailio/lib*.so -%pre -if ! /usr/bin/id kamailio &>/dev/null; then - /usr/sbin/useradd --system \ - --user-group \ - --shell /bin/false \ - --comment "Kamailio SIP Server" \ - --home-dir %{_rundir}/kamailio kamailio || \ - %logmsg "Unexpected error adding user \"kamailio\". Aborting installation." -fi - %clean rm -rf %{buildroot} +%pre +%sysusers_create_package %{name} pkg/kamailio/obs/kamailio.sysusers %post -%if "%{?_unitdir}" == "" -/sbin/chkconfig --add kamailio -%else -%tmpfiles_create kamailio.conf -/usr/bin/systemctl -q enable kamailio.service -%endif - +%tmpfiles_create %{name}.conf +%systemd_post %{name}.service %preun -if [ $1 = 0 ]; then -%if "%{?_unitdir}" == "" - /sbin/service kamailio stop > /dev/null 2>&1 - /sbin/chkconfig --del kamailio -%else - %{?systemd_preun kamailio.service} -%endif -fi +%systemd_preun %{name}.service -%if "%{?_unitdir}" == "" %postun -%{?systemd_postun kamailio.service} -%endif +%systemd_postun %{name}.service %files %defattr(-,root,root) @@ -1491,14 +1490,13 @@ fi %doc %{_docdir}/kamailio/modules/README.statsc %doc %{_docdir}/kamailio/modules/README.topos %doc %{_docdir}/kamailio/modules/README.cfgt -%if "%{?_unitdir}" != "" %doc %{_docdir}/kamailio/modules/README.log_systemd %doc %{_docdir}/kamailio/modules/README.systemdops -%endif %dir %attr(-,kamailio,kamailio) %{_sysconfdir}/kamailio %config(noreplace) %{_sysconfdir}/kamailio/dictionary.kamailio %config(noreplace) %{_sysconfdir}/kamailio/kamailio.cfg +%config(noreplace) %{_sysconfdir}/kamailio/kamailio-local.cfg %config(noreplace) %{_sysconfdir}/kamailio/kamctlrc %config(noreplace) %{_sysconfdir}/kamailio/pi_framework.xml %config(noreplace) %{_sysconfdir}/kamailio/tls.cfg @@ -1508,14 +1506,11 @@ fi %else %config %{_sysconfdir}/sysconfig/kamailio %endif -%if "%{?_unitdir}" == "" -%config %{_sysconfdir}/rc.d/init.d/* -%dir %attr(-,kamailio,kamailio) %{_var}/run/kamailio -%else %{_unitdir}/kamailio.service %{_unitdir}/kamailio@.service +%{_presetdir}/kamailio.preset %{_tmpfilesdir}/kamailio.conf -%endif +%{_sysusersdir}/kamailio.conf %dir %{_libdir}/kamailio @@ -1648,10 +1643,8 @@ fi %{_libdir}/kamailio/modules/topos.so %{_libdir}/kamailio/modules/topos_htable.so %{_libdir}/kamailio/modules/cfgt.so -%if "%{?_unitdir}" != "" %{_libdir}/kamailio/modules/log_systemd.so %{_libdir}/kamailio/modules/systemdops.so -%endif %{_sbindir}/kamailio %{_sbindir}/kamctl @@ -1707,7 +1700,7 @@ fi %files bdb %defattr(-,root,root) %doc %{_docdir}/kamailio/modules/README.db_berkeley -%{_sbindir}/kambdb_recover +%{_sbindir}/kamdb_recover %{_libdir}/kamailio/modules/db_berkeley.so %{_libdir}/kamailio/kamctl/kamctl.db_berkeley %{_libdir}/kamailio/kamctl/kamdbctl.db_berkeley @@ -1769,6 +1762,12 @@ fi %endif +%files gcrypt +%defattr(-,root,root) +%doc %{_docdir}/kamailio/modules/README.gcrypt +%{_libdir}/kamailio/modules/gcrypt.so + + %files geoip %defattr(-,root,root) %doc %{_docdir}/kamailio/modules/README.geoip2 @@ -1857,6 +1856,12 @@ fi %{_libdir}/kamailio/modules/jwt.so +%files kafka +%defattr(-,root,root) +%doc %{_docdir}/kamailio/modules/README.kafka +%{_libdir}/kamailio/modules/kafka.so + + %if %{with kazoo} %files kazoo %defattr(-,root,root) @@ -1915,7 +1920,97 @@ fi %doc %{_docdir}/kamailio/modules/README.ndb_mongodb %{_libdir}/kamailio/modules/db_mongodb.so %{_libdir}/kamailio/modules/ndb_mongodb.so -%endif +%{_datadir}/kamailio/mongodb/kamailio/acc_cdrs.json +%{_datadir}/kamailio/mongodb/kamailio/acc.json +%{_datadir}/kamailio/mongodb/kamailio/active_watchers.json +%{_datadir}/kamailio/mongodb/kamailio/address.json +%{_datadir}/kamailio/mongodb/kamailio/aliases.json +%{_datadir}/kamailio/mongodb/kamailio/carrierfailureroute.json +%{_datadir}/kamailio/mongodb/kamailio/carrier_name.json +%{_datadir}/kamailio/mongodb/kamailio/carrierroute.json +%{_datadir}/kamailio/mongodb/kamailio/contact.json +%{_datadir}/kamailio/mongodb/kamailio/cpl.json +%{_datadir}/kamailio/mongodb/kamailio/dbaliases.json +%{_datadir}/kamailio/mongodb/kamailio/dialog_in.json +%{_datadir}/kamailio/mongodb/kamailio/dialog.json +%{_datadir}/kamailio/mongodb/kamailio/dialog_out.json +%{_datadir}/kamailio/mongodb/kamailio/dialog_vars.json +%{_datadir}/kamailio/mongodb/kamailio/dialplan.json +%{_datadir}/kamailio/mongodb/kamailio/dispatcher.json +%{_datadir}/kamailio/mongodb/kamailio/domain_attrs.json +%{_datadir}/kamailio/mongodb/kamailio/domain.json +%{_datadir}/kamailio/mongodb/kamailio/domain_name.json +%{_datadir}/kamailio/mongodb/kamailio/domainpolicy.json +%{_datadir}/kamailio/mongodb/kamailio/dr_gateways.json +%{_datadir}/kamailio/mongodb/kamailio/dr_groups.json +%{_datadir}/kamailio/mongodb/kamailio/dr_gw_lists.json +%{_datadir}/kamailio/mongodb/kamailio/dr_rules.json +%{_datadir}/kamailio/mongodb/kamailio/globalblocklist.json +%{_datadir}/kamailio/mongodb/kamailio/grp.json +%{_datadir}/kamailio/mongodb/kamailio/htable.json +%{_datadir}/kamailio/mongodb/kamailio/imc_members.json +%{_datadir}/kamailio/mongodb/kamailio/imc_rooms.json +%{_datadir}/kamailio/mongodb/kamailio/impu_contact.json +%{_datadir}/kamailio/mongodb/kamailio/impu.json +%{_datadir}/kamailio/mongodb/kamailio/impu_subscriber.json +%{_datadir}/kamailio/mongodb/kamailio/lcr_gw.json +%{_datadir}/kamailio/mongodb/kamailio/lcr_rule.json +%{_datadir}/kamailio/mongodb/kamailio/lcr_rule_target.json +%{_datadir}/kamailio/mongodb/kamailio/location_attrs.json +%{_datadir}/kamailio/mongodb/kamailio/location.json +%{_datadir}/kamailio/mongodb/kamailio/matrix.json +%{_datadir}/kamailio/mongodb/kamailio/missed_calls.json +%{_datadir}/kamailio/mongodb/kamailio/mohqcalls.json +%{_datadir}/kamailio/mongodb/kamailio/mohqueues.json +%{_datadir}/kamailio/mongodb/kamailio/mtree.json +%{_datadir}/kamailio/mongodb/kamailio/mtrees.json +%{_datadir}/kamailio/mongodb/kamailio/nds_trusted_domains.json +%{_datadir}/kamailio/mongodb/kamailio/pcscf_location.json +%{_datadir}/kamailio/mongodb/kamailio/pdt.json +%{_datadir}/kamailio/mongodb/kamailio/pl_pipes.json +%{_datadir}/kamailio/mongodb/kamailio/presentity.json +%{_datadir}/kamailio/mongodb/kamailio/pua.json +%{_datadir}/kamailio/mongodb/kamailio/purplemap.json +%{_datadir}/kamailio/mongodb/kamailio/re_grp.json +%{_datadir}/kamailio/mongodb/kamailio/rls_presentity.json +%{_datadir}/kamailio/mongodb/kamailio/rls_watchers.json +%{_datadir}/kamailio/mongodb/kamailio/ro_session.json +%{_datadir}/kamailio/mongodb/kamailio/rtpengine.json +%{_datadir}/kamailio/mongodb/kamailio/rtpproxy.json +%{_datadir}/kamailio/mongodb/kamailio/sca_subscriptions.json +%{_datadir}/kamailio/mongodb/kamailio/s_cscf_capabilities.json +%{_datadir}/kamailio/mongodb/kamailio/s_cscf.json +%{_datadir}/kamailio/mongodb/kamailio/secfilter.json +%{_datadir}/kamailio/mongodb/kamailio/silo.json +%{_datadir}/kamailio/mongodb/kamailio/sip_trace.json +%{_datadir}/kamailio/mongodb/kamailio/speed_dial.json +%{_datadir}/kamailio/mongodb/kamailio/subscriber.json +%{_datadir}/kamailio/mongodb/kamailio/subscriber_scscf.json +%{_datadir}/kamailio/mongodb/kamailio/topos_d.json +%{_datadir}/kamailio/mongodb/kamailio/topos_t.json +%{_datadir}/kamailio/mongodb/kamailio/trusted.json +%{_datadir}/kamailio/mongodb/kamailio/uacreg.json +%{_datadir}/kamailio/mongodb/kamailio/uid_credentials.json +%{_datadir}/kamailio/mongodb/kamailio/uid_domain_attrs.json +%{_datadir}/kamailio/mongodb/kamailio/uid_domain.json +%{_datadir}/kamailio/mongodb/kamailio/uid_global_attrs.json +%{_datadir}/kamailio/mongodb/kamailio/uid_uri_attrs.json +%{_datadir}/kamailio/mongodb/kamailio/uid_uri.json +%{_datadir}/kamailio/mongodb/kamailio/uid_user_attrs.json +%{_datadir}/kamailio/mongodb/kamailio/uri.json +%{_datadir}/kamailio/mongodb/kamailio/userblocklist.json +%{_datadir}/kamailio/mongodb/kamailio/usr_preferences.json +%{_datadir}/kamailio/mongodb/kamailio/version.json +%{_datadir}/kamailio/mongodb/kamailio/version-create.mongo +%{_datadir}/kamailio/mongodb/kamailio/watchers.json +%{_datadir}/kamailio/mongodb/kamailio/xcap.json +%endif + + +%files mqtt +%defattr(-,root,root) +%doc %{_docdir}/kamailio/modules/README.mqtt +%{_libdir}/kamailio/modules/mqtt.so %files mysql @@ -1936,6 +2031,12 @@ fi %endif +%files nghttp2 +%defattr(-,root,root) +%doc %{_docdir}/kamailio/modules/README.nghttp2 +%{_libdir}/kamailio/modules/nghttp2.so + + %files outbound %defattr(-,root,root) %doc %{_docdir}/kamailio/modules/README.outbound diff --git a/pkg/kamailio/obs/kamailio.sysusers b/pkg/kamailio/obs/kamailio.sysusers new file mode 100644 index 000000000..279333829 --- /dev/null +++ b/pkg/kamailio/obs/kamailio.sysusers @@ -0,0 +1 @@ +u kamailio - "Kamailio SIP Server" /var/lib/kamailio diff --git a/pkg/kamailio/obs/meta b/pkg/kamailio/obs/meta deleted file mode 100644 index f536fe29c..000000000 --- a/pkg/kamailio/obs/meta +++ /dev/null @@ -1,65 +0,0 @@ - - RPM Packages for Kamailio v5.2.x - RPM Packages for Kamailio v5.2.x - - - - i586 - x86_64 - - - - x86_64 - - - - x86_64 - - - - x86_64 - - - - x86_64 - - - - x86_64 - ppc64 - - - - x86_64 - - - - x86_64 - - - - - x86_64 - i586 - armv7l - aarch64 - ppc64le - - - - - x86_64 - - - - - - x86_64 - - - - - - x86_64 - - diff --git a/pkg/kamailio/obs/prjconf b/pkg/kamailio/obs/prjconf deleted file mode 100644 index 09b22cd6b..000000000 --- a/pkg/kamailio/obs/prjconf +++ /dev/null @@ -1,5 +0,0 @@ -%if 0%{?suse_version} -Release: . -%else -Release: %{dist} -%endif diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a29aa5727..a9ca7784d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,6 @@ # Set the installation paths +message(STATUS "CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}") +message(STATUS "CMAKE_LIBRARY_ARCHITECTURE: ${CMAKE_LIBRARY_ARCHITECTURE}") message(STATUS "Cross compile: ${CMAKE_CROSSCOMPILING}") message(STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}") @@ -36,7 +38,7 @@ if(USE_GIT ) execute_process( - COMMAND bash -c "${GIT_EXECUTABLE} diff-index --name-only HEAD" + COMMAND sh -c "${GIT_EXECUTABLE} diff-index --name-only HEAD" " | grep -vE 'Makefile|CMakeLists.txt'" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE GIT_DIFF_OUTPUT @@ -55,8 +57,7 @@ else() endif() configure_file( - "${CMAKE_CURRENT_SOURCE_DIR}/core/autover.h.in" - "${CMAKE_CURRENT_SOURCE_DIR}/core/autover.h" + "${CMAKE_CURRENT_SOURCE_DIR}/core/autover.h.in" "${CMAKE_CURRENT_SOURCE_DIR}/core/autover.h" ) # ----------------------- @@ -70,25 +71,52 @@ if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.20) cmake_policy(SET CMP0118 NEW) else() set_source_files_properties( - ${CMAKE_CURRENT_BINARY_DIR}/core/lex.yy.c - ${CMAKE_CURRENT_BINARY_DIR}/core/cfg.tab.c + ${CMAKE_CURRENT_BINARY_DIR}/core/lex.yy.c ${CMAKE_CURRENT_BINARY_DIR}/core/cfg.tab.c ${CMAKE_CURRENT_BINARY_DIR}/core/cfg.tab.h PROPERTIES GENERATED TRUE ) endif() + +option(BUILD_DOC "Build documentation" ON) +# Readme file and man page +find_program(XSLTPROC_EXECUTABLE xsltproc QUIET) +find_program(LYNX_EXECUTABLE lynx QUIET) +find_program(DOCBOOK2X_EXECUTABLE docbook2x-man QUIET) + +if(BUILD_DOC AND (NOT XSLTPROC_EXECUTABLE OR NOT LYNX_EXECUTABLE)) + message( + WARNING "BUILD_DOC set to ON but xsltproc or lynx not found and are required for doc generation. + Disabling documentation and man page generation. + You can safely ignore this warning." + ) + set(BUILD_DOC OFF) +endif() + +if(BUILD_DOC AND (NOT DOCBOOK2X_EXECUTABLE)) + message( + WARNING "BUILD_DOC set to ON but docbook2x-man not found and is required for man generation. + Disabling documentation and man page generation. + You can safely ignore this warning" + ) + set(BUILD_DOC OFF) +endif() + +# This is used to add the documentation target to the default build target +if(BUILD_DOC) + set(docs_in_all_target ALL) +else() + set(docs_in_all_target "") +endif() # ----------------------- # ----------------------- add_executable(kamailio ${CMAKE_CURRENT_SOURCE_DIR}/main.c) add_dependencies(kamailio GenerateParser) + # Enable ENABLE_EXPORTS property so modules can link from symbols found in # kamailio executable. -set_target_properties( - kamailio PROPERTIES ENABLE_EXPORTS TRUE OUTPUT_NAME ${MAIN_NAME} -) +set_target_properties(kamailio PROPERTIES ENABLE_EXPORTS TRUE OUTPUT_NAME ${MAIN_NAME}) -target_compile_options( - kamailio PUBLIC "-ffile-prefix-map=${CMAKE_SOURCE_DIR}/src/=" -) +target_compile_options(kamailio PUBLIC "-ffile-prefix-map=${CMAKE_SOURCE_DIR}/src/=") add_subdirectory(core) add_subdirectory(lib) @@ -99,9 +127,8 @@ add_subdirectory(modules) # from their own CMakeLists.txt # Module subdiretory does not contribute to the Kamailio executable. target_sources( - kamailio - PRIVATE ${kamailio_SRC_FILES} ${CMAKE_CURRENT_BINARY_DIR}/core/lex.yy.c - ${CMAKE_CURRENT_BINARY_DIR}/core/cfg.tab.c + kamailio PRIVATE ${kamailio_SRC_FILES} ${CMAKE_CURRENT_BINARY_DIR}/core/lex.yy.c + ${CMAKE_CURRENT_BINARY_DIR}/core/cfg.tab.c ) target_include_directories(kamailio PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/core) @@ -134,7 +161,8 @@ install( install( FILES ${CMAKE_SOURCE_DIR}/README ${CMAKE_SOURCE_DIR}/INSTALL DESTINATION ${CMAKE_INSTALL_DOCDIR} - COMPONENT kamailio-docs) + COMPONENT kamailio-core +) # ---------- # Create and install the man pages for kamailio @@ -145,10 +173,10 @@ add_custom_command( "s#/etc/${CFG_NAME}/${CFG_NAME}\.cfg#${CMAKE_INSTALL_FULL_SYSCONFDIR}/${MAIN_NAME}/${MAIN_NAME}.cfg#g" -e "s#/usr/sbin/#${CMAKE_INSTALL_FULL_SBINDIR}/#g" -e "s#/usr/lib/${CFG_NAME}/#${CMAKE_INSTALL_FULL_LIBDIR}/${MAIN_NAME}/#g" -e - "s#/usr/share/doc/${CFG_NAME}/#${CMAKE_INSTALL_FULL_DOCDIR}/#g" -e - "s#${SRC_NAME}#${MAIN_NAME}#g" < ${CMAKE_SOURCE_DIR}/doc/man/kamailio.8 > - ${CMAKE_CURRENT_BINARY_DIR}/${MAIN_NAME}.8 - DEPENDS ${CMAKE_SOURCE_DIR}/doc/man/kamailio.8) + "s#/usr/share/doc/${CFG_NAME}/#${CMAKE_INSTALL_FULL_DOCDIR}/#g" < + ${CMAKE_SOURCE_DIR}/doc/man/kamailio.8 > ${CMAKE_CURRENT_BINARY_DIR}/${MAIN_NAME}.8 + DEPENDS ${CMAKE_SOURCE_DIR}/doc/man/kamailio.8 +) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${MAIN_NAME}.cfg.5 @@ -157,31 +185,37 @@ add_custom_command( "s#/etc/${CFG_NAME}/${CFG_NAME}\.cfg#${CMAKE_INSTALL_FULL_SYSCONFDIR}/${MAIN_NAME}/${MAIN_NAME}.cfg#g" -e "s#/usr/sbin/#${CMAKE_INSTALL_FULL_SBINDIR}/#g" -e "s#/usr/lib/${CFG_NAME}/#${CMAKE_INSTALL_FULL_LIBDIR}/${MAIN_NAME}/#g" -e - "s#/usr/share/doc/${CFG_NAME}/#${CMAKE_INSTALL_FULL_DOCDIR}/#g" -e - "s#${SRC_NAME}#${MAIN_NAME}#g" < ${CMAKE_SOURCE_DIR}/doc/man/kamailio.cfg.5 - > ${CMAKE_CURRENT_BINARY_DIR}/${MAIN_NAME}.cfg.5 - DEPENDS ${CMAKE_SOURCE_DIR}/doc/man/kamailio.cfg.5) + "s#/usr/share/doc/${CFG_NAME}/#${CMAKE_INSTALL_FULL_DOCDIR}/#g" < + ${CMAKE_SOURCE_DIR}/doc/man/kamailio.cfg.5 > ${CMAKE_CURRENT_BINARY_DIR}/${MAIN_NAME}.cfg.5 + DEPENDS ${CMAKE_SOURCE_DIR}/doc/man/kamailio.cfg.5 +) -add_custom_target(man DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${MAIN_NAME}.8 - ${CMAKE_CURRENT_BINARY_DIR}/${MAIN_NAME}.cfg.5) +add_custom_target( + man + ${docs_in_all_target} # Add this `man` target to the default ALL target + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${MAIN_NAME}.8 ${CMAKE_CURRENT_BINARY_DIR}/${MAIN_NAME}.cfg.5 +) add_dependencies(man kamctl_man) add_dependencies(man kamcmd_man) + # These are the modules man pages if any exist add_dependencies(man kamailio_docs_man) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${MAIN_NAME}.8 DESTINATION ${CMAKE_INSTALL_MANDIR}/man8 - COMPONENT kamailio_man - OPTIONAL) + COMPONENT kamailio-core + OPTIONAL +) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${MAIN_NAME}.cfg.5 DESTINATION ${CMAKE_INSTALL_MANDIR}/man5 - COMPONENT kamailio_man - OPTIONAL) -# ---------- + COMPONENT kamailio-core + OPTIONAL +) +# ---------- # Install the configuration file (kamailio.cfg) ${CFG_NAME} using a CODE block # to check existence at install time instead of configure time # If(EXISTS ..) require full path @@ -193,18 +227,17 @@ install( message(STATUS \"${CFG_NAME}.cfg already exists in \" \"\${dir}/${CFG_NAME}.cfg. Installing as ${CFG_NAME}.cfg.sample\") file(INSTALL \"${CMAKE_SOURCE_DIR}/etc/kamailio.cfg\" - DESTINATION \"${CMAKE_INSTALL_FULL_SYSCONFDIR}/${MAIN_NAME}\" + DESTINATION \"$ENV{DESTDIR}${CMAKE_INSTALL_FULL_SYSCONFDIR}/${MAIN_NAME}\" RENAME \"${CFG_NAME}.cfg.sample\" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ ) else() file(INSTALL \"${CMAKE_SOURCE_DIR}/etc/kamailio.cfg\" - DESTINATION \"${CMAKE_INSTALL_FULL_SYSCONFDIR}/${MAIN_NAME}\" + DESTINATION \"$ENV{DESTDIR}${CMAKE_INSTALL_FULL_SYSCONFDIR}/${MAIN_NAME}\" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ RENAME \"${CFG_NAME}.cfg\" ) endif() - " - COMPONENT kamailio-utils-cfg + COMPONENT kamailio-core ) diff --git a/src/Makefile.defs b/src/Makefile.defs index c7df967ed..d7520fe05 100644 --- a/src/Makefile.defs +++ b/src/Makefile.defs @@ -106,7 +106,7 @@ INSTALL_FLAVOUR=$(FLAVOUR) # version number VERSION = 6 PATCHLEVEL = 0 -SUBLEVEL = 3 +SUBLEVEL = 5 EXTRAVERSION = # memory manager switcher diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 750af9b7b..d221941d3 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -1,8 +1,8 @@ # This is just for Debugging and print the compile definitions and options # for the common target -get_target_property( - MY_INTERFACE_DEFINITIONS common INTERFACE_COMPILE_DEFINITIONS -) +message(STATUS "Flags defined for all targets: ${CMAKE_C_FLAGS}") + +get_target_property(MY_INTERFACE_DEFINITIONS common INTERFACE_COMPILE_DEFINITIONS) message(STATUS "Compile definitions for common: ${MY_INTERFACE_DEFINITIONS}") get_target_property(MY_INTERFACE_OPTIONS common INTERFACE_COMPILE_OPTIONS) @@ -23,15 +23,13 @@ add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex.yy.c COMMAND ${FLEX_EXECUTABLE} -o ${CMAKE_CURRENT_BINARY_DIR}/lex.yy.c ${CMAKE_CURRENT_SOURCE_DIR}/cfg.lex - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/cfg.lex - ${CMAKE_CURRENT_BINARY_DIR}/cfg.tab.h + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/cfg.lex ${CMAKE_CURRENT_BINARY_DIR}/cfg.tab.h COMMENT "Generating lex.yy.c from cfg.lex" ) # Generate cfg.tab.c and cfg.tab.h from cfg.y add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cfg.tab.c - ${CMAKE_CURRENT_BINARY_DIR}/cfg.tab.h + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cfg.tab.c ${CMAKE_CURRENT_BINARY_DIR}/cfg.tab.h COMMAND ${BISON_EXECUTABLE} -d -b cfg -o ${CMAKE_CURRENT_BINARY_DIR}/cfg.tab.c ${CMAKE_CURRENT_SOURCE_DIR}/cfg.y DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/cfg.y @@ -41,8 +39,7 @@ add_custom_command( # Add custom target for generating the 3 source files mentioned above add_custom_target( GenerateParser ALL - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/lex.yy.c - ${CMAKE_CURRENT_BINARY_DIR}/cfg.tab.c + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/lex.yy.c ${CMAKE_CURRENT_BINARY_DIR}/cfg.tab.c ${CMAKE_CURRENT_BINARY_DIR}/cfg.tab.h COMMENT "Generating parser source files" ) @@ -51,7 +48,8 @@ add_custom_target( file(GLOB_RECURSE kamailio_SRC "*.c") list(REMOVE_ITEM kamailio_SRC ${CMAKE_CURRENT_SOURCE_DIR}/cfg.tab.c - ${CMAKE_CURRENT_SOURCE_DIR}/lex.yy.c) + ${CMAKE_CURRENT_SOURCE_DIR}/lex.yy.c +) set(kamailio_SRC_FILES ${kamailio_SRC} PARENT_SCOPE diff --git a/src/core/autover.h b/src/core/autover.h index 0678d4a85..c48653569 100644 --- a/src/core/autover.h +++ b/src/core/autover.h @@ -2,6 +2,6 @@ * DO NOT EDIT IT */ -#define REPO_VER "5095b7" -#define REPO_HASH "5095b7" +#define REPO_VER "900efe" +#define REPO_HASH "900efe" #define REPO_STATE "" diff --git a/src/core/basex.c b/src/core/basex.c index 2871afa22..554600564 100644 --- a/src/core/basex.c +++ b/src/core/basex.c @@ -497,6 +497,36 @@ int base64url_enc(char *in, int ilen, char *out, int osize) unsigned int block; int olen; + + /* Add input validation */ + if(!in || !out) { + LM_ERR("null pointer parameter\n"); + return -1; + } + + if(ilen < 0) { + LM_ERR("invalid input length %d\n", ilen); + return -1; + } + + if(osize < 1) { + LM_ERR("invalid output size %d\n", osize); + return -1; + } + + if(ilen == 0) { + out[0] = '\0'; + return 0; + } + + /* Protect against integer overflow + Max safe ilen: (INT_MAX >> 2) to avoid overflow + */ + if(ilen > (INT_MAX >> 2)) { + LM_ERR("input length too large %d\n", ilen); + return -1; + } + olen = (((ilen + 2) / 3) << 2); if(olen >= osize) { LM_ERR("not enough output buffer size %d - need %d\n", osize, olen + 1); @@ -533,7 +563,27 @@ int base64url_dec(char *in, int ilen, char *out, int osize) char c; int olen; - for(n = 0, i = ilen - 1; in[i] == '='; i--) + /* Early error and input validation */ + if(!in || !out) { + LM_ERR("invalid input parameters\n"); + return -1; + } + + if(ilen < 0) { + LM_ERR("invalid input length %d\n", ilen); + return -1; + } + if(osize < 1) { + LM_ERR("invalid output size %d\n", osize); + return -1; + } + + if(ilen == 0) { + out[0] = '\0'; + return 0; + } + + for(n = 0, i = ilen - 1; i >= 0 && in[i] == '='; i--) n++; olen = ((ilen * 6) >> 3) - n; diff --git a/src/core/parser/digest/digest.c b/src/core/parser/digest/digest.c index 5f8ea477c..7e7deda2f 100644 --- a/src/core/parser/digest/digest.c +++ b/src/core/parser/digest/digest.c @@ -320,7 +320,7 @@ int find_credentials(struct sip_msg *msg, str *realm, hdr_types_t hftype, while(ptr) { res = parse_credentials(ptr); if(res < 0) { - LM_ERR("error while parsing credentials\n"); + LM_ERR("error while parsing credentials (%d)\n", res); return (res == -1) ? -2 : -3; } else if(res == 0) { r = &(((auth_body_t *)(ptr->parsed))->digest.realm); diff --git a/src/core/parser/digest/digest_parser.c b/src/core/parser/digest/digest_parser.c index 9ce9d1840..eb772ba50 100644 --- a/src/core/parser/digest/digest_parser.c +++ b/src/core/parser/digest/digest_parser.c @@ -176,6 +176,7 @@ static inline int parse_digest_param(str *_s, dig_cred_t *_c) trim_leading(_s); if(_s->len == 0) { + LM_ERR("no value for parameter type: %d\n", t); return -2; } diff --git a/src/core/parser/msg_parser.c b/src/core/parser/msg_parser.c index 9435c6771..13170071b 100644 --- a/src/core/parser/msg_parser.c +++ b/src/core/parser/msg_parser.c @@ -155,22 +155,24 @@ char *get_hdr_field( cseq_b->number.len, ZSW(cseq_b->number.s), cseq_b->method.len, cseq_b->method.s); break; - case HDR_TO_T: - to_b = pkg_malloc(sizeof(struct to_body)); - if(to_b == 0) { - PKG_MEM_ERROR; + case HDR_FROM_T: + tmp = parse_to_body(tmp, end, hdr); + if(tmp == NULL) { goto error; } - memset(to_b, 0, sizeof(struct to_body)); - hdr->body.s = tmp; - tmp = parse_to(tmp, end, to_b); - if(to_b->error == PARSE_ERROR) { - ERR("bad to header\n"); - free_to(to_b); + to_b = (struct to_body *)hdr->parsed; + DBG("<%.*s> [%d]; uri=[%.*s]\n", hdr->name.len, ZSW(hdr->name.s), + hdr->body.len, to_b->uri.len, ZSW(to_b->uri.s)); + DBG("from body (%d)[%.*s], from tag (%d)[%.*s]\n", to_b->body.len, + to_b->body.len, ZSW(to_b->body.s), to_b->tag_value.len, + to_b->tag_value.len, ZSW(to_b->tag_value.s)); + break; + case HDR_TO_T: + tmp = parse_to_body(tmp, end, hdr); + if(tmp == NULL) { goto error; } - hdr->parsed = to_b; - hdr->body.len = tmp - hdr->body.s; + to_b = (struct to_body *)hdr->parsed; DBG("<%.*s> [%d]; uri=[%.*s]\n", hdr->name.len, ZSW(hdr->name.s), hdr->body.len, to_b->uri.len, ZSW(to_b->uri.s)); DBG("to body (%d)[%.*s], to tag (%d)[%.*s]\n", to_b->body.len, @@ -205,7 +207,6 @@ char *get_hdr_field( case HDR_SUPPORTED_T: case HDR_REQUIRE_T: case HDR_CONTENTTYPE_T: - case HDR_FROM_T: case HDR_CALLID_T: case HDR_CONTACT_T: case HDR_ROUTE_T: diff --git a/src/core/parser/parse_to.c b/src/core/parser/parse_to.c index 2e38a7714..10ffc78fa 100644 --- a/src/core/parser/parse_to.c +++ b/src/core/parser/parse_to.c @@ -37,13 +37,39 @@ #include "../mem/mem.h" +char *parse_to_body( + char *const buffer, const char *const end, struct hdr_field *const hdr) +{ + char *tmp = NULL; + struct to_body *to_b = NULL; + + tmp = buffer; + to_b = pkg_malloc(sizeof(struct to_body)); + if(to_b == 0) { + PKG_MEM_ERROR; + goto error; + } + memset(to_b, 0, sizeof(struct to_body)); + hdr->body.s = tmp; + tmp = parse_to(tmp, end, to_b); + if(to_b->error == PARSE_ERROR) { + ERR("bad to header\n"); + free_to(to_b); + goto error; + } + hdr->parsed = to_b; + hdr->body.len = tmp - hdr->body.s; + return tmp; +error: + return NULL; +} + char *parse_to( char *const buffer, const char *const end, struct to_body *const to_b) { return parse_addr_spec(buffer, end, to_b, 0); } - int parse_to_header(struct sip_msg *const msg) { if(!msg->to && (parse_headers(msg, HDR_TO_F, 0) == -1 || !msg->to)) { diff --git a/src/core/parser/parse_to.h b/src/core/parser/parse_to.h index f396b31ea..32af93e98 100644 --- a/src/core/parser/parse_to.h +++ b/src/core/parser/parse_to.h @@ -39,6 +39,9 @@ #define GET_TO_PURI(p_msg) \ (&((struct to_body *)(p_msg)->to->parsed)->parsed_uri) +char *parse_to_body( + char *const buffer, const char *const end, struct hdr_field *const hdr); + /*! \brief * To header field parser */ diff --git a/src/core/parser/sdp/sdp.c b/src/core/parser/sdp/sdp.c index 5eb04b0c0..f263dec3b 100644 --- a/src/core/parser/sdp/sdp.c +++ b/src/core/parser/sdp/sdp.c @@ -1233,7 +1233,7 @@ sdp_ice_attr_t *clone_sdp_ice_attr(sdp_ice_attr_t *ice_attr) } memset(clone_ice_attr, 0, len); - p = (char *)(clone_ice_attr); /* beginning of the struct */ + p = (char *)(clone_ice_attr + 1); /* foundation */ if(ice_attr->foundation.len) { @@ -1301,7 +1301,7 @@ sdp_ice_opt_t *clone_sdp_opt_attr(sdp_ice_opt_t *ice_opt) return NULL; } memset(clone_ice_opt, 0, len); - p = (char *)(clone_ice_opt); /* beginning of the struct */ + p = (char *)(clone_ice_opt + 1); /* ice option */ if(ice_opt->option.len) { @@ -1600,7 +1600,7 @@ error: sdp_info_t *clone_sdp_info(struct sip_msg *_m) { - sdp_info_t *clone_sdp_info, *sdp_info = (sdp_info_t *)_m->body; + sdp_info_t *cloned_sdp_info, *sdp_info = (sdp_info_t *)_m->body; sdp_session_cell_t *clone_session, *prev_clone_session, *session; int i, len; @@ -1618,23 +1618,23 @@ sdp_info_t *clone_sdp_info(struct sip_msg *_m) } len = sizeof(sdp_info_t); - clone_sdp_info = (sdp_info_t *)shm_malloc(len); - if(clone_sdp_info == NULL) { + cloned_sdp_info = (sdp_info_t *)shm_malloc(len); + if(cloned_sdp_info == NULL) { SHM_MEM_ERROR; return NULL; } - LM_DBG("clone_sdp_info: %p\n", clone_sdp_info); - memset(clone_sdp_info, 0, len); + LM_DBG("cloned_sdp_info: %p\n", cloned_sdp_info); + memset(cloned_sdp_info, 0, len); LM_DBG("we have %d sessions\n", sdp_info->sessions_num); - clone_sdp_info->sessions_num = sdp_info->sessions_num; - clone_sdp_info->streams_num = sdp_info->streams_num; + cloned_sdp_info->sessions_num = sdp_info->sessions_num; + cloned_sdp_info->streams_num = sdp_info->streams_num; session = sdp_info->sessions; clone_session = clone_sdp_session_cell(session); if(clone_session == NULL) { goto error; } - clone_sdp_info->sessions = clone_session; + cloned_sdp_info->sessions = clone_session; prev_clone_session = clone_session; session = session->next; for(i = 1; i < sdp_info->sessions_num; i++) { @@ -1647,9 +1647,9 @@ sdp_info_t *clone_sdp_info(struct sip_msg *_m) session = session->next; } - return clone_sdp_info; + return cloned_sdp_info; error: - free_cloned_sdp(clone_sdp_info); + free_cloned_sdp(cloned_sdp_info); return NULL; } diff --git a/src/core/socket_info.c b/src/core/socket_info.c index dac3f08a6..0041ea991 100644 --- a/src/core/socket_info.c +++ b/src/core/socket_info.c @@ -485,7 +485,7 @@ int socketinfo2str(char *s, int *len, struct socket_info *si, int mode) l += 2; if(*len < l) { - LM_ERR("Destionation buffer too short\n"); + LM_ERR("Destination buffer too short\n"); *len = l; return -1; } diff --git a/src/core/tcp_main.c b/src/core/tcp_main.c index b24349a8b..be87e741a 100644 --- a/src/core/tcp_main.c +++ b/src/core/tcp_main.c @@ -115,7 +115,10 @@ #define TCP_PASS_NEW_CONNECTION_ON_DATA /* don't pass a new connection immediately to a child, wait for some data on it first */ +#ifndef TCP_LISTEN_BACKLOG #define TCP_LISTEN_BACKLOG 1024 +#endif + #define SEND_FD_QUEUE /* queue send fd requests on EAGAIN, instead of sending them immediately */ #define TCP_CHILD_NON_BLOCKING @@ -4416,8 +4419,11 @@ inline static int send2child(struct tcp_connection *tcpconn) even replaced by another one with the same number) so it must not be sent to a reader anymore */ if(unlikely(tcpconn->state == S_CONN_BAD - || (tcpconn->flags & F_CONN_FD_CLOSED))) + || (tcpconn->flags & F_CONN_FD_CLOSED))) { + tcp_children[idx].busy--; + tcp_children[idx].n_reqs--; return -1; + } #ifdef SEND_FD_QUEUE /* if queue full, try to queue the io */ if(unlikely(send_fd(tcp_children[idx].unix_sock, &tcpconn, sizeof(tcpconn), @@ -4432,11 +4438,15 @@ inline static int send2child(struct tcp_connection *tcpconn) &send2child_q, tcp_children[idx].unix_sock, tcpconn) != 0) { LM_ERR("queue send op. failed\n"); + tcp_children[idx].busy--; + tcp_children[idx].n_reqs--; return -1; } } else { LM_ERR("send_fd failed for %p (flags 0x%0x), fd %d\n", tcpconn, tcpconn->flags, tcpconn->s); + tcp_children[idx].busy--; + tcp_children[idx].n_reqs--; return -1; } } @@ -4446,6 +4456,8 @@ inline static int send2child(struct tcp_connection *tcpconn) <= 0)) { LM_ERR("send_fd failed for %p (flags 0x%0x), fd %d\n", tcpconn, tcpconn->flags, tcpconn->s); + tcp_children[idx].busy--; + tcp_children[idx].n_reqs--; return -1; } #endif diff --git a/src/core/ut.c b/src/core/ut.c index cac9fcaf0..27c2d40e5 100644 --- a/src/core/ut.c +++ b/src/core/ut.c @@ -324,6 +324,39 @@ char *str_search(str *text, str *needle) return NULL; } +/** + * case sensitive search of a charz string 'needlez' inside str 'text' + */ +char *str_search_strz(str *text, char *needlez) +{ + str needle; + + needle.s = needlez; + needle.len = strlen(needlez); + + return str_search(text, &needle); +} + +/** + * search of a char 'needle' inside str 'text' + */ +char *str_search_char(str *text, char needle) +{ + char *p; + + if(text == NULL || text->s == NULL) { + return NULL; + } + + for(p = text->s; p <= text->s + text->len; p++) { + if(*p == needle) { + return p; + } + } + + return NULL; +} + /** * @brief search for occurrence of needlez starting from vstart and before vend * @return pointer to start of needle in text or NULL if the needle diff --git a/src/core/ut.h b/src/core/ut.h index 0b729707e..87b15e828 100644 --- a/src/core/ut.h +++ b/src/core/ut.h @@ -50,19 +50,19 @@ #define ZSW(_c) ((_c) ? (_c) : "") /* returns string beginning and length without insignificant chars */ -#define trim_len(_len, _begin, _mystr) \ - do { \ - static char _c; \ - (_len) = (_mystr).len; \ - while((_len) \ - && ((_c = (_mystr).s[(_len)-1]) == 0 || _c == '\r' \ - || _c == '\n' || _c == ' ' || _c == '\t')) \ - (_len)--; \ - (_begin) = (_mystr).s; \ - while((_len) && ((_c = *(_begin)) == ' ' || _c == '\t')) { \ - (_len)--; \ - (_begin)++; \ - } \ +#define trim_len(_len, _begin, _mystr) \ + do { \ + static char _c; \ + (_len) = (_mystr).len; \ + while((_len) \ + && ((_c = (_mystr).s[(_len) - 1]) == 0 || _c == '\r' \ + || _c == '\n' || _c == ' ' || _c == '\t')) \ + (_len)--; \ + (_begin) = (_mystr).s; \ + while((_len) && ((_c = *(_begin)) == ' ' || _c == '\t')) { \ + (_len)--; \ + (_begin)++; \ + } \ } while(0) #define trim_r(_mystr) \ @@ -145,7 +145,7 @@ #define is_in_str(p, in) (p < in->s + in->len && *p) #define ksr_container_of(ptr, type, member) \ - ((type *)((char *)(ptr)-offsetof(type, member))) + ((type *)((char *)(ptr) - offsetof(type, member))) /* links a value to a msgid */ struct msgid_var @@ -1214,6 +1214,8 @@ char *get_abs_pathname(str *base, str *file); */ char *str_search(str *text, str *needle); +char *str_search_strz(str *text, char *needlez); + char *stre_search_strz(char *vstart, char *vend, char *needlez); char *str_casesearch(str *text, str *needle); @@ -1226,6 +1228,8 @@ char *str_rsearch(str *text, str *needle); char *str_rcasesearch(str *text, str *needle); +char *str_search_char(str *text, char needle); + /* * ser_memmem() returns the location of the first occurrence of data * pattern b2 of size len2 in memory block b1 of size len1 or diff --git a/src/lib/ims/ims_getters.c b/src/lib/ims/ims_getters.c index aabf221d9..2e747ea1a 100644 --- a/src/lib/ims/ims_getters.c +++ b/src/lib/ims/ims_getters.c @@ -648,7 +648,7 @@ str cscf_get_asserted_identity(struct sip_msg *msg, int is_shm) int len; str uri = {0, 0}; - if(!msg || !msg->pai) + if(!msg) return uri; if((parse_pai_header(msg) == 0) && (msg->pai) && (msg->pai->parsed)) { diff --git a/src/lib/srdb1/schema/Makefile b/src/lib/srdb1/schema/Makefile index b057387c7..77529d56e 100644 --- a/src/lib/srdb1/schema/Makefile +++ b/src/lib/srdb1/schema/Makefile @@ -17,13 +17,13 @@ PI_FRAMEWORK_TABLE_XSL = $(STYLESHEETS)/pi_framework_table.xsl PI_FRAMEWORK_MOD_XSL = $(STYLESHEETS)/pi_framework_mod.xsl # Stylesheet used to generate MySQL database schema -MYSQL_XSL = $(STYLESHEETS)/mysql.xsl +MYSQL_XSL = $(STYLESHEETS)/db_mysql.xsl # Stylesheet used to generate Postgres database schema -POSTGRES_XSL = $(STYLESHEETS)/postgres.xsl +POSTGRES_XSL = $(STYLESHEETS)/db_postgres.xsl # Stylesheet used to generate dbtext database schema -DBTEXT_XSL = $(STYLESHEETS)/dbtext.xsl +DBTEXT_XSL = $(STYLESHEETS)/db_text.xsl # Stylesheet used to generate berkeley database schema DB_BERKELEY_XSL = $(STYLESHEETS)/db_berkeley.xsl @@ -32,10 +32,10 @@ DB_BERKELEY_XSL = $(STYLESHEETS)/db_berkeley.xsl DB_SQLITE_XSL = $(STYLESHEETS)/db_sqlite.xsl # Stylesheet used to generate oracle database schema -ORACLE_XSL = $(STYLESHEETS)/oracle.xsl +ORACLE_XSL = $(STYLESHEETS)/db_oracle.xsl # Stylesheet used to generate mongodb database schema -MONGODB_XSL = $(STYLESHEETS)/mongodb.xsl +MONGODB_XSL = $(STYLESHEETS)/db_mongodb.xsl # Stylesheet used to generate Redis database schema DB_REDIS_XSL = $(STYLESHEETS)/db_redis.xsl @@ -105,7 +105,7 @@ mysql: XML_CATALOG_FILES=$(CATALOG) $(XSLTPROC) $(XSLTPROC_FLAGS) \ --stringparam dir "$(SCHEME)/mysql" \ --stringparam prefix "$$FILE-" \ - --stringparam db "mysql" \ + --stringparam db "db_mysql" \ $(MYSQL_XSL) kamailio-"$$FILE".xml ; \ done @@ -118,7 +118,7 @@ postgres: XML_CATALOG_FILES=$(CATALOG) $(XSLTPROC) $(XSLTPROC_FLAGS) \ --stringparam dir "$(SCHEME)/postgres" \ --stringparam prefix "$$FILE-" \ - --stringparam db "postgres" \ + --stringparam db "db_postgres" \ $(POSTGRES_XSL) kamailio-"$$FILE".xml ; \ done @@ -131,7 +131,7 @@ oracle: XML_CATALOG_FILES=$(CATALOG) $(XSLTPROC) $(XSLTPROC_FLAGS) \ --stringparam dir "$(SCHEME)/oracle" \ --stringparam prefix "$$FILE-" \ - --stringparam db "oracle" \ + --stringparam db "db_oracle" \ $(ORACLE_XSL) kamailio-"$$FILE".xml ; \ done @@ -144,7 +144,7 @@ dbtext: XML_CATALOG_FILES=$(CATALOG) $(XSLTPROC) $(XSLTPROC_FLAGS) \ --stringparam dir "$(SCHEME)/dbtext/kamailio" \ --stringparam prefix "" \ - --stringparam db "dbtext" \ + --stringparam db "db_text" \ $(DBTEXT_XSL) kamailio-"$$FILE".xml ; \ done TMPFILE=`mktemp -t kamailio-test.XXXXXXXXXX` @@ -208,7 +208,7 @@ mongodb: XML_CATALOG_FILES=$(CATALOG) $(XSLTPROC) $(XSLTPROC_FLAGS) \ --stringparam dir "$(SCHEME)/mongodb/kamailio" \ --stringparam prefix "" \ - --stringparam db "mongodb" \ + --stringparam db "db_mongodb" \ $(MONGODB_XSL) kamailio-"$$FILE".xml ; \ done @# small hack to create the version table entries, this is here easier as with XSL diff --git a/src/lib/srdb1/schema/acc.xml b/src/lib/srdb1/schema/acc.xml index 97d704d2c..6829e5d0f 100644 --- a/src/lib/srdb1/schema/acc.xml +++ b/src/lib/srdb1/schema/acc.xml @@ -10,7 +10,7 @@ acc5 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the ACC module to report on @@ -29,7 +29,7 @@ &table_id_len; - int,auto + int,auto unique ID diff --git a/src/lib/srdb1/schema/acc_cdrs.xml b/src/lib/srdb1/schema/acc_cdrs.xml index 4cdc72006..b924d9788 100644 --- a/src/lib/srdb1/schema/acc_cdrs.xml +++ b/src/lib/srdb1/schema/acc_cdrs.xml @@ -10,7 +10,7 @@
acc_cdrs2 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the ACC module to report on CDRs relying on dialog callbacks. More information is available at: @@ -28,7 +28,7 @@ &table_id_len; - int,auto + int,auto unique ID diff --git a/src/lib/srdb1/schema/address.xml b/src/lib/srdb1/schema/address.xml index db30becb3..0d315bbfe 100644 --- a/src/lib/srdb1/schema/address.xml +++ b/src/lib/srdb1/schema/address.xml @@ -10,7 +10,7 @@
address6 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the permissions module. More information is @@ -29,7 +29,7 @@ &table_id_len; - int,auto + int,auto unique ID diff --git a/src/lib/srdb1/schema/aliases.xml b/src/lib/srdb1/schema/aliases.xml index 6463b582a..cd657164f 100644 --- a/src/lib/srdb1/schema/aliases.xml +++ b/src/lib/srdb1/schema/aliases.xml @@ -10,7 +10,7 @@
aliases8 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table for the registrar module is similar to the "location" @@ -33,7 +33,7 @@ &table_id_len; - int,auto + int,auto unique ID @@ -95,7 +95,7 @@ expires datetime &DEFAULT_ALIASES_EXPIRES; - to_date('&DEFAULT_ALIASES_EXPIRES;','yyyy-mm-dd hh24:mi:ss') + to_date('&DEFAULT_ALIASES_EXPIRES;','yyyy-mm-dd hh24:mi:ss') Date and time when this entry expires. @@ -127,7 +127,7 @@ last_modified datetime &DEFAULT_DATETIME; - to_date('&DEFAULT_DATETIME;','yyyy-mm-dd hh24:mi:ss') + to_date('&DEFAULT_DATETIME;','yyyy-mm-dd hh24:mi:ss') Date and time when this entry was last modified. diff --git a/src/lib/srdb1/schema/carrier_name.xml b/src/lib/srdb1/schema/carrier_name.xml index dfe50a60b..3c1d338ef 100644 --- a/src/lib/srdb1/schema/carrier_name.xml +++ b/src/lib/srdb1/schema/carrier_name.xml @@ -10,7 +10,7 @@
carrier_name1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the carrierroute module to provides @@ -32,7 +32,7 @@ - int,auto + int,auto Name of the column containing the unique identifier of a carrier. diff --git a/src/lib/srdb1/schema/carrierfailureroute.xml b/src/lib/srdb1/schema/carrierfailureroute.xml index 58a05e786..16d7f1f11 100644 --- a/src/lib/srdb1/schema/carrierfailureroute.xml +++ b/src/lib/srdb1/schema/carrierfailureroute.xml @@ -10,7 +10,7 @@
carrierfailureroute2 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the carrierroute module to provide @@ -30,7 +30,7 @@ &table_id_len; - int,auto + int,auto This column contains the unique identifier of a failure route. diff --git a/src/lib/srdb1/schema/carrierroute.xml b/src/lib/srdb1/schema/carrierroute.xml index 05a209ba8..9720069fb 100644 --- a/src/lib/srdb1/schema/carrierroute.xml +++ b/src/lib/srdb1/schema/carrierroute.xml @@ -10,7 +10,7 @@
carrierroute3 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the carrierroute module to provides @@ -30,7 +30,7 @@ &table_id_len; - int,auto + int,auto Name of the column contains the unique identifier of a route. diff --git a/src/lib/srdb1/schema/contact.xml b/src/lib/srdb1/schema/contact.xml index 563ac0c61..f4381ff2c 100644 --- a/src/lib/srdb1/schema/contact.xml +++ b/src/lib/srdb1/schema/contact.xml @@ -10,7 +10,7 @@
contact6 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Table for storage engine for SCSCF contacts. More information at: @@ -27,7 +27,7 @@ &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb1/schema/cpl.xml b/src/lib/srdb1/schema/cpl.xml index 500d2d4eb..85c3437ce 100644 --- a/src/lib/srdb1/schema/cpl.xml +++ b/src/lib/srdb1/schema/cpl.xml @@ -10,7 +10,7 @@
cpl1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Table for the call processing language "cpl" module. More @@ -29,7 +29,7 @@ &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb1/schema/dbaliases.xml b/src/lib/srdb1/schema/dbaliases.xml index b5546a7d4..f54a5c73d 100644 --- a/src/lib/srdb1/schema/dbaliases.xml +++ b/src/lib/srdb1/schema/dbaliases.xml @@ -10,7 +10,7 @@
dbaliases1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table us used by the alias_db module as an alternative for user aliases via userloc. More information @@ -29,7 +29,7 @@ &table_id_len; - int,auto + int,auto unique ID diff --git a/src/lib/srdb1/schema/dialog.xml b/src/lib/srdb1/schema/dialog.xml index 272b60d17..7e70b4920 100644 --- a/src/lib/srdb1/schema/dialog.xml +++ b/src/lib/srdb1/schema/dialog.xml @@ -10,7 +10,7 @@
dialog7 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Persistent dialog information for the dialog module. More information can be found at: @@ -28,7 +28,7 @@ &table_id_len; - int,auto + int,auto unique ID diff --git a/src/lib/srdb1/schema/dialog_in.xml b/src/lib/srdb1/schema/dialog_in.xml index c17ac4a6f..cf08c92cd 100644 --- a/src/lib/srdb1/schema/dialog_in.xml +++ b/src/lib/srdb1/schema/dialog_in.xml @@ -10,7 +10,7 @@
dialog_in7 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Persistent dialog location information for the ims_dialog module. More information can be found at: @@ -28,7 +28,7 @@ &table_id_len; - int,auto + int,auto unique ID diff --git a/src/lib/srdb1/schema/dialog_out.xml b/src/lib/srdb1/schema/dialog_out.xml index db78fc9d2..9e92e118c 100644 --- a/src/lib/srdb1/schema/dialog_out.xml +++ b/src/lib/srdb1/schema/dialog_out.xml @@ -10,7 +10,7 @@
dialog_out7 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Persistent dialog location information for the ims_dialog module. More information can be found at: @@ -28,7 +28,7 @@ &table_id_len; - int,auto + int,auto unique ID diff --git a/src/lib/srdb1/schema/dialog_vars.xml b/src/lib/srdb1/schema/dialog_vars.xml index c3e0f9161..b6aab3d56 100644 --- a/src/lib/srdb1/schema/dialog_vars.xml +++ b/src/lib/srdb1/schema/dialog_vars.xml @@ -10,7 +10,7 @@
dialog_vars1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Persistent dialog variable information for the dialog module. @@ -29,7 +29,7 @@ &table_id_len; - int,auto + int,auto unique ID diff --git a/src/lib/srdb1/schema/dialplan.xml b/src/lib/srdb1/schema/dialplan.xml index 4e842057a..e92dbf43e 100644 --- a/src/lib/srdb1/schema/dialplan.xml +++ b/src/lib/srdb1/schema/dialplan.xml @@ -10,7 +10,7 @@
dialplan2 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the dialplan module for the translation @@ -29,7 +29,7 @@ &table_id_len; - int,auto + int,auto unique ID diff --git a/src/lib/srdb1/schema/dispatcher.xml b/src/lib/srdb1/schema/dispatcher.xml index 524120864..b91ce96e1 100644 --- a/src/lib/srdb1/schema/dispatcher.xml +++ b/src/lib/srdb1/schema/dispatcher.xml @@ -10,7 +10,7 @@
dispatcher4 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the dispatcher module. It contains the list of destinations used for load balancing and dispatching. More @@ -29,7 +29,7 @@ &table_id_len; - int,auto + int,auto unique ID diff --git a/src/lib/srdb1/schema/domain.xml b/src/lib/srdb1/schema/domain.xml index 12a8e2c04..71c7f1096 100644 --- a/src/lib/srdb1/schema/domain.xml +++ b/src/lib/srdb1/schema/domain.xml @@ -10,7 +10,7 @@
domain2 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the domain module to determine if a host part @@ -30,7 +30,7 @@ &table_id_len; - int,auto + int,auto unique ID @@ -55,7 +55,7 @@ last_modified datetime &DEFAULT_DATETIME; - to_date('&DEFAULT_DATETIME;','yyyy-mm-dd hh24:mi:ss') + to_date('&DEFAULT_DATETIME;','yyyy-mm-dd hh24:mi:ss') Date and time when this record was last modified. diff --git a/src/lib/srdb1/schema/domain_attrs.xml b/src/lib/srdb1/schema/domain_attrs.xml index 78d9b4f70..ffe8fbd81 100644 --- a/src/lib/srdb1/schema/domain_attrs.xml +++ b/src/lib/srdb1/schema/domain_attrs.xml @@ -10,7 +10,7 @@
domain_attrs1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table contains attributes of domain ids. More information @@ -29,7 +29,7 @@ &table_id_len; - int,auto + int,auto unique ID @@ -64,7 +64,7 @@ last_modified datetime &DEFAULT_DATETIME; - to_date('&DEFAULT_DATETIME;','yyyy-mm-dd hh24:mi:ss') + to_date('&DEFAULT_DATETIME;','yyyy-mm-dd hh24:mi:ss') Date and time when this record was last modified. diff --git a/src/lib/srdb1/schema/domain_name.xml b/src/lib/srdb1/schema/domain_name.xml index 5f0ae242a..53fe64d00 100644 --- a/src/lib/srdb1/schema/domain_name.xml +++ b/src/lib/srdb1/schema/domain_name.xml @@ -10,7 +10,7 @@
domain_name1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the carrierroute module to provides @@ -32,7 +32,7 @@ - int,auto + int,auto Name of the column containing the unique identifier of a domain. diff --git a/src/lib/srdb1/schema/domainpolicy.xml b/src/lib/srdb1/schema/domainpolicy.xml index 2c1a9ecd9..e7d145fce 100644 --- a/src/lib/srdb1/schema/domainpolicy.xml +++ b/src/lib/srdb1/schema/domainpolicy.xml @@ -10,7 +10,7 @@
domainpolicy2 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Table for the domainpolicy module. More information at: @@ -28,7 +28,7 @@ &table_id_len; - int,auto + int,auto unique ID diff --git a/src/lib/srdb1/schema/dr_gateways.xml b/src/lib/srdb1/schema/dr_gateways.xml index 194e27ed4..e89ba7185 100644 --- a/src/lib/srdb1/schema/dr_gateways.xml +++ b/src/lib/srdb1/schema/dr_gateways.xml @@ -10,7 +10,7 @@
dr_gateways3 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the drouting module - keeps the gateways data: @@ -28,7 +28,7 @@ &table_id_len; - int,auto + int,auto Unique ID per gateway diff --git a/src/lib/srdb1/schema/dr_groups.xml b/src/lib/srdb1/schema/dr_groups.xml index fac3f1977..e5c1671e8 100644 --- a/src/lib/srdb1/schema/dr_groups.xml +++ b/src/lib/srdb1/schema/dr_groups.xml @@ -10,7 +10,7 @@
dr_groups2 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the drouting module to store information about the routing groups (users mapped over groups). @@ -29,7 +29,7 @@ &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb1/schema/dr_gw_lists.xml b/src/lib/srdb1/schema/dr_gw_lists.xml index 25dba2b53..4b6362fcd 100644 --- a/src/lib/srdb1/schema/dr_gw_lists.xml +++ b/src/lib/srdb1/schema/dr_gw_lists.xml @@ -10,7 +10,7 @@
dr_gw_lists1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the drouting module to define lists of gateways to be used in rule definitions. @@ -29,7 +29,7 @@ &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb1/schema/dr_rules.xml b/src/lib/srdb1/schema/dr_rules.xml index 115ddac72..e28742f4f 100644 --- a/src/lib/srdb1/schema/dr_rules.xml +++ b/src/lib/srdb1/schema/dr_rules.xml @@ -10,7 +10,7 @@
dr_rules3 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the drouting module - keeps the @@ -29,7 +29,7 @@ &table_id_len; - int,auto + int,auto Rule unique ID diff --git a/src/lib/srdb1/schema/globalblocklist.xml b/src/lib/srdb1/schema/globalblocklist.xml index e77263e59..d18cf3fde 100644 --- a/src/lib/srdb1/schema/globalblocklist.xml +++ b/src/lib/srdb1/schema/globalblocklist.xml @@ -10,7 +10,7 @@
globalblocklist1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the userblocklist module for the global blocklists. More information is available at: @@ -28,7 +28,7 @@ &table_id_len; - int,auto + int,auto unique ID diff --git a/src/lib/srdb1/schema/grp.xml b/src/lib/srdb1/schema/grp.xml index 2937fdaaa..61350ba40 100644 --- a/src/lib/srdb1/schema/grp.xml +++ b/src/lib/srdb1/schema/grp.xml @@ -10,7 +10,7 @@
grp2 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table us used by the group module as a means of group membership checking. Used primarily for Access Control Lists @@ -29,7 +29,7 @@ &table_id_len; - int,auto + int,auto unique ID @@ -64,7 +64,7 @@ last_modified datetime &DEFAULT_DATETIME; - to_date('&DEFAULT_DATETIME;','yyyy-mm-dd hh24:mi:ss') + to_date('&DEFAULT_DATETIME;','yyyy-mm-dd hh24:mi:ss') Date and time when this record was last modified. diff --git a/src/lib/srdb1/schema/htable.xml b/src/lib/srdb1/schema/htable.xml index ab60cc7fd..a6ca03eaa 100644 --- a/src/lib/srdb1/schema/htable.xml +++ b/src/lib/srdb1/schema/htable.xml @@ -10,7 +10,7 @@
htable2 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table us used by the htable module to load values in the hash table at start up. More information about the htable module @@ -29,7 +29,7 @@ &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb1/schema/imc_members.xml b/src/lib/srdb1/schema/imc_members.xml index a747bd821..26403925b 100644 --- a/src/lib/srdb1/schema/imc_members.xml +++ b/src/lib/srdb1/schema/imc_members.xml @@ -10,7 +10,7 @@
imc_members1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Member table for the IMC module. More information at: @@ -27,7 +27,7 @@ &table_id_len; - int,auto + int,auto unique ID diff --git a/src/lib/srdb1/schema/imc_rooms.xml b/src/lib/srdb1/schema/imc_rooms.xml index f256098d5..35962efc5 100644 --- a/src/lib/srdb1/schema/imc_rooms.xml +++ b/src/lib/srdb1/schema/imc_rooms.xml @@ -10,7 +10,7 @@
imc_rooms1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Room table for the IMC module. More information at: @@ -27,7 +27,7 @@ &table_id_len; - int,auto + int,auto unique ID diff --git a/src/lib/srdb1/schema/impu.xml b/src/lib/srdb1/schema/impu.xml index 375c55c3d..85695a7f5 100644 --- a/src/lib/srdb1/schema/impu.xml +++ b/src/lib/srdb1/schema/impu.xml @@ -10,7 +10,7 @@
impu6 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Table for Session Control Function (SCF) in IMS. More information at: @@ -27,7 +27,7 @@ &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb1/schema/impu_contact.xml b/src/lib/srdb1/schema/impu_contact.xml index 712541b00..515882a43 100644 --- a/src/lib/srdb1/schema/impu_contact.xml +++ b/src/lib/srdb1/schema/impu_contact.xml @@ -10,7 +10,7 @@
impu_contact6 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Table for storage engine for SCSCF contacts. More information at: @@ -27,7 +27,7 @@ &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb1/schema/impu_subscriber.xml b/src/lib/srdb1/schema/impu_subscriber.xml index 75f565040..10b13f5c3 100644 --- a/src/lib/srdb1/schema/impu_subscriber.xml +++ b/src/lib/srdb1/schema/impu_subscriber.xml @@ -10,7 +10,7 @@
impu_subscriber6 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Table for storage engine for SCSCF contacts. More information at: @@ -27,7 +27,7 @@ &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb1/schema/lcr_gw.xml b/src/lib/srdb1/schema/lcr_gw.xml index 41dd96be7..dcf1b9ff6 100644 --- a/src/lib/srdb1/schema/lcr_gw.xml +++ b/src/lib/srdb1/schema/lcr_gw.xml @@ -11,7 +11,7 @@
lcr_gw3 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by lcr (Least Cost Routing) module to store gateway attributes. @@ -30,7 +30,7 @@ &table_id_len; - int,auto + int,auto diff --git a/src/lib/srdb1/schema/lcr_rule.xml b/src/lib/srdb1/schema/lcr_rule.xml index 18bf6f6c4..2415e9f77 100644 --- a/src/lib/srdb1/schema/lcr_rule.xml +++ b/src/lib/srdb1/schema/lcr_rule.xml @@ -10,7 +10,7 @@
lcr_rule3 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the lcr (Least Cost Routing) module to store routing rules. @@ -29,7 +29,7 @@ &table_id_len; - int,auto + int,auto diff --git a/src/lib/srdb1/schema/lcr_rule_target.xml b/src/lib/srdb1/schema/lcr_rule_target.xml index d7da45440..583ac685f 100644 --- a/src/lib/srdb1/schema/lcr_rule_target.xml +++ b/src/lib/srdb1/schema/lcr_rule_target.xml @@ -10,7 +10,7 @@
lcr_rule_target1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the lcr (Least Cost Routing) module to store routing rule targets. @@ -29,7 +29,7 @@ &table_id_len; - int,auto + int,auto diff --git a/src/lib/srdb1/schema/location.xml b/src/lib/srdb1/schema/location.xml index 55ebb6f83..af25ae86f 100644 --- a/src/lib/srdb1/schema/location.xml +++ b/src/lib/srdb1/schema/location.xml @@ -10,7 +10,7 @@
location9 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Persistent user location information for the usrloc module. More information can be found at: @@ -28,7 +28,7 @@ &table_id_len; - int,auto + int,auto unique ID @@ -91,7 +91,7 @@ datetime time &DEFAULT_ALIASES_EXPIRES; - to_date('&DEFAULT_ALIASES_EXPIRES;','yyyy-mm-dd hh24:mi:ss') + to_date('&DEFAULT_ALIASES_EXPIRES;','yyyy-mm-dd hh24:mi:ss') Date and time when this entry expires. @@ -124,7 +124,7 @@ datetime time &DEFAULT_DATETIME; - to_date('&DEFAULT_DATETIME;','yyyy-mm-dd hh24:mi:ss') + to_date('&DEFAULT_DATETIME;','yyyy-mm-dd hh24:mi:ss') Date and time when this entry was last modified. diff --git a/src/lib/srdb1/schema/location_attrs.xml b/src/lib/srdb1/schema/location_attrs.xml index 24bf14e2e..c5150d994 100644 --- a/src/lib/srdb1/schema/location_attrs.xml +++ b/src/lib/srdb1/schema/location_attrs.xml @@ -10,7 +10,7 @@
location_attrs1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Persistent user location attributes for the usrloc module. More information can be found at: @@ -28,7 +28,7 @@ &table_id_len; - int,auto + int,auto unique ID @@ -88,7 +88,7 @@ last_modified datetime &DEFAULT_DATETIME; - to_date('&DEFAULT_DATETIME;','yyyy-mm-dd hh24:mi:ss') + to_date('&DEFAULT_DATETIME;','yyyy-mm-dd hh24:mi:ss') Date and time when this entry was last modified. diff --git a/src/lib/srdb1/schema/location_pcscf.xml b/src/lib/srdb1/schema/location_pcscf.xml index 8538bf72e..0a7ce10e2 100644 --- a/src/lib/srdb1/schema/location_pcscf.xml +++ b/src/lib/srdb1/schema/location_pcscf.xml @@ -10,7 +10,7 @@
pcscf_location7 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Persistent user location information for the ims_usrloc_pcscf module. More information can be found at: @@ -28,7 +28,7 @@ &table_id_len; - int,auto + int,auto unique ID @@ -129,7 +129,7 @@ time &DEFAULT_LOCATION_EXPIRES; - to_date('&DEFAULT_LOCATION_EXPIRES;','yyyy-mm-dd hh24:mi:ss') + to_date('&DEFAULT_LOCATION_EXPIRES;','yyyy-mm-dd hh24:mi:ss') Date and time when this entry expires. diff --git a/src/lib/srdb1/schema/matrix.xml b/src/lib/srdb1/schema/matrix.xml index 9eb58f01f..772af40f5 100644 --- a/src/lib/srdb1/schema/matrix.xml +++ b/src/lib/srdb1/schema/matrix.xml @@ -10,7 +10,7 @@
matrix1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the matrix module: @@ -27,7 +27,7 @@ &table_id_len; - int,auto + int,auto unique ID diff --git a/src/lib/srdb1/schema/missed_calls.xml b/src/lib/srdb1/schema/missed_calls.xml index bfa9d79ce..1be893aba 100644 --- a/src/lib/srdb1/schema/missed_calls.xml +++ b/src/lib/srdb1/schema/missed_calls.xml @@ -10,7 +10,7 @@
missed_calls4 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the ACC module for keeping track of missed calls. This table is similar to the 'acc' table. More @@ -29,7 +29,7 @@ &table_id_len; - int,auto + int,auto unique ID diff --git a/src/lib/srdb1/schema/mohqcalls.xml b/src/lib/srdb1/schema/mohqcalls.xml index 5951cf3fa..22d4f9a34 100644 --- a/src/lib/srdb1/schema/mohqcalls.xml +++ b/src/lib/srdb1/schema/mohqcalls.xml @@ -10,7 +10,7 @@
mohqcalls1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the mohqueue module to store call information. This is a read-only table from the viewpoint of outside @@ -29,7 +29,7 @@ &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb1/schema/mohqueues.xml b/src/lib/srdb1/schema/mohqueues.xml index 32d473668..1ec911339 100644 --- a/src/lib/srdb1/schema/mohqueues.xml +++ b/src/lib/srdb1/schema/mohqueues.xml @@ -10,7 +10,7 @@
mohqueues1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the mohqueue module to store queue definitions. This is a read-only table from the viewpoint of the @@ -29,7 +29,7 @@ &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb1/schema/mtree.xml b/src/lib/srdb1/schema/mtree.xml index bfe0fa45a..b7c2347a4 100644 --- a/src/lib/srdb1/schema/mtree.xml +++ b/src/lib/srdb1/schema/mtree.xml @@ -10,7 +10,7 @@
mtree1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the mtree module to load values in the shared memory tree at start up. More information about the mtree @@ -29,7 +29,7 @@ &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb1/schema/mtrees.xml b/src/lib/srdb1/schema/mtrees.xml index 200e3933c..dad39871b 100644 --- a/src/lib/srdb1/schema/mtrees.xml +++ b/src/lib/srdb1/schema/mtrees.xml @@ -10,7 +10,7 @@
mtrees2 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the mtree module to load values in shared memory trees at start up. More information about the mtree @@ -29,7 +29,7 @@ &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb1/schema/nds_trusted_domains.xml b/src/lib/srdb1/schema/nds_trusted_domains.xml index 32b1938fe..fecc03c8b 100644 --- a/src/lib/srdb1/schema/nds_trusted_domains.xml +++ b/src/lib/srdb1/schema/nds_trusted_domains.xml @@ -10,7 +10,7 @@
nds_trusted_domains1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Table for trusted domains in IMS. More information at: @@ -27,7 +27,7 @@ &table_id_len; - int,auto + int,auto Unique ID for the trusted domain diff --git a/src/lib/srdb1/schema/pdt.xml b/src/lib/srdb1/schema/pdt.xml index 513a41610..f65580cc2 100644 --- a/src/lib/srdb1/schema/pdt.xml +++ b/src/lib/srdb1/schema/pdt.xml @@ -10,7 +10,7 @@
pdt1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Prefix-Domain Translation means to change the host and port in R-URI, based on the prefix found in R-URI and source domain @@ -29,7 +29,7 @@ &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb1/schema/pipelimit.xml b/src/lib/srdb1/schema/pipelimit.xml index 8585e19d0..1a5bd925a 100644 --- a/src/lib/srdb1/schema/pipelimit.xml +++ b/src/lib/srdb1/schema/pipelimit.xml @@ -10,7 +10,7 @@
pl_pipes1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table us used by the pipelimit module to keep the definition of pipes. More information about the pipelimit module @@ -29,7 +29,7 @@ &table_id_len; - int,auto + int,auto unique ID diff --git a/src/lib/srdb1/schema/pr_active_watchers.xml b/src/lib/srdb1/schema/pr_active_watchers.xml index 6d32187c2..4b9304682 100644 --- a/src/lib/srdb1/schema/pr_active_watchers.xml +++ b/src/lib/srdb1/schema/pr_active_watchers.xml @@ -10,7 +10,7 @@
active_watchers12 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Table for the presence module. More information can be found at: @@ -28,7 +28,7 @@ &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb1/schema/pr_presentity.xml b/src/lib/srdb1/schema/pr_presentity.xml index 56a8044c2..c694a182f 100644 --- a/src/lib/srdb1/schema/pr_presentity.xml +++ b/src/lib/srdb1/schema/pr_presentity.xml @@ -10,7 +10,7 @@
presentity5 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Table for the presence module. More information can be found at: @@ -28,7 +28,7 @@ &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb1/schema/pr_pua.xml b/src/lib/srdb1/schema/pr_pua.xml index 5cab1a5eb..740fe19b5 100644 --- a/src/lib/srdb1/schema/pr_pua.xml +++ b/src/lib/srdb1/schema/pr_pua.xml @@ -10,7 +10,7 @@
pua7 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Table for the presence related pua module. More information can be @@ -29,7 +29,7 @@ &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb1/schema/pr_watchers.xml b/src/lib/srdb1/schema/pr_watchers.xml index 919cf42a0..14f1f0af7 100644 --- a/src/lib/srdb1/schema/pr_watchers.xml +++ b/src/lib/srdb1/schema/pr_watchers.xml @@ -10,7 +10,7 @@
watchers3 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Table for the presence module. More information can be found at: @@ -28,7 +28,7 @@ &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb1/schema/pr_xcap.xml b/src/lib/srdb1/schema/pr_xcap.xml index 2eb1fc1a9..fe9315c52 100644 --- a/src/lib/srdb1/schema/pr_xcap.xml +++ b/src/lib/srdb1/schema/pr_xcap.xml @@ -10,7 +10,7 @@
xcap4 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Table for the presence module. More information can be found at: @@ -27,7 +27,7 @@ unsigned int &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb1/schema/purplemap.xml b/src/lib/srdb1/schema/purplemap.xml index d4fa6f1d3..e088f3c29 100644 --- a/src/lib/srdb1/schema/purplemap.xml +++ b/src/lib/srdb1/schema/purplemap.xml @@ -10,7 +10,7 @@
purplemap1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Table for the purple module. More information can be found at: @@ -28,7 +28,7 @@ &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb1/schema/re_grp.xml b/src/lib/srdb1/schema/re_grp.xml index 0bc3ae9f9..d71970937 100644 --- a/src/lib/srdb1/schema/re_grp.xml +++ b/src/lib/srdb1/schema/re_grp.xml @@ -10,7 +10,7 @@
re_grp1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the group module to check membership based on @@ -30,7 +30,7 @@ &table_id_len; - int,auto + int,auto unique ID diff --git a/src/lib/srdb1/schema/rls_presentity.xml b/src/lib/srdb1/schema/rls_presentity.xml index a75edab54..f7ef982f2 100644 --- a/src/lib/srdb1/schema/rls_presentity.xml +++ b/src/lib/srdb1/schema/rls_presentity.xml @@ -10,7 +10,7 @@
rls_presentity1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Table for the RLS module: @@ -28,7 +28,7 @@ &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb1/schema/rls_watchers.xml b/src/lib/srdb1/schema/rls_watchers.xml index 1500e40ad..c409835ea 100644 --- a/src/lib/srdb1/schema/rls_watchers.xml +++ b/src/lib/srdb1/schema/rls_watchers.xml @@ -10,7 +10,7 @@
rls_watchers3 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Table for RLS module used for storing resource lists subscribe @@ -29,7 +29,7 @@ &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb1/schema/ro_session.xml b/src/lib/srdb1/schema/ro_session.xml index cf3366536..681ff5692 100644 --- a/src/lib/srdb1/schema/ro_session.xml +++ b/src/lib/srdb1/schema/ro_session.xml @@ -10,7 +10,7 @@
ro_session3 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; More information about the domain module can be found at: @@ -27,7 +27,7 @@ &table_id_len; - int,auto + int,auto unique ID diff --git a/src/lib/srdb1/schema/rtpengine.xml b/src/lib/srdb1/schema/rtpengine.xml index 64444606a..2cf85628d 100644 --- a/src/lib/srdb1/schema/rtpengine.xml +++ b/src/lib/srdb1/schema/rtpengine.xml @@ -10,7 +10,7 @@
rtpengine1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the rtpengine module. It contains the sets @@ -30,7 +30,7 @@ &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb1/schema/rtpproxy.xml b/src/lib/srdb1/schema/rtpproxy.xml index 538f74347..f80054c7c 100644 --- a/src/lib/srdb1/schema/rtpproxy.xml +++ b/src/lib/srdb1/schema/rtpproxy.xml @@ -10,7 +10,7 @@
rtpproxy1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the rtpproxy module. It contains the sets of @@ -30,7 +30,7 @@ &table_id_len; - int,auto + int,auto unique ID diff --git a/src/lib/srdb1/schema/s_cscf.xml b/src/lib/srdb1/schema/s_cscf.xml index 774f32f2b..2749b6d2e 100644 --- a/src/lib/srdb1/schema/s_cscf.xml +++ b/src/lib/srdb1/schema/s_cscf.xml @@ -10,7 +10,7 @@
s_cscf1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Table for Session Control Function (SCF) in IMS. More information at: @@ -27,7 +27,7 @@ &table_id_len; - int,auto + int,auto Unique ID for the SCF diff --git a/src/lib/srdb1/schema/s_cscf_capabilities.xml b/src/lib/srdb1/schema/s_cscf_capabilities.xml index aed1f9b2e..fcd8024c5 100644 --- a/src/lib/srdb1/schema/s_cscf_capabilities.xml +++ b/src/lib/srdb1/schema/s_cscf_capabilities.xml @@ -10,7 +10,7 @@
s_cscf_capabilities1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Table for SCF capabilities in IMS. More information at: @@ -27,7 +27,7 @@ &table_id_len; - int,auto + int,auto Unique ID for the capability diff --git a/src/lib/srdb1/schema/sca.xml b/src/lib/srdb1/schema/sca.xml index 3be9985eb..179c2b824 100644 --- a/src/lib/srdb1/schema/sca.xml +++ b/src/lib/srdb1/schema/sca.xml @@ -10,7 +10,7 @@
sca_subscriptions2 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the sca module to store active subscriptions. @@ -31,7 +31,7 @@ &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb1/schema/secfilter.xml b/src/lib/srdb1/schema/secfilter.xml index 0b3cbc887..5bf80ccc7 100644 --- a/src/lib/srdb1/schema/secfilter.xml +++ b/src/lib/srdb1/schema/secfilter.xml @@ -10,7 +10,7 @@
secfilter1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the secfilter module. It contains the sets of @@ -30,7 +30,7 @@ &table_id_len; - int,auto + int,auto unique ID diff --git a/src/lib/srdb1/schema/silo.xml b/src/lib/srdb1/schema/silo.xml index 6883ecf86..a7d2df753 100644 --- a/src/lib/srdb1/schema/silo.xml +++ b/src/lib/srdb1/schema/silo.xml @@ -10,7 +10,7 @@
silo8 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table us used by the msilo module to provide offline message @@ -29,7 +29,7 @@ &table_id_len; - int,auto + int,auto unique ID diff --git a/src/lib/srdb1/schema/sip_trace.xml b/src/lib/srdb1/schema/sip_trace.xml index 21b4f0ef6..472558046 100644 --- a/src/lib/srdb1/schema/sip_trace.xml +++ b/src/lib/srdb1/schema/sip_trace.xml @@ -10,7 +10,7 @@
sip_trace4 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used to store incoming/outgoing SIP messages in @@ -30,7 +30,7 @@ &table_id_len; - int,auto + int,auto unique ID @@ -38,7 +38,7 @@ time_stamp datetime &DEFAULT_DATETIME; - to_date('&DEFAULT_DATETIME;','yyyy-mm-dd hh24:mi:ss') + to_date('&DEFAULT_DATETIME;','yyyy-mm-dd hh24:mi:ss') Time stamp of processing the SIP message diff --git a/src/lib/srdb1/schema/speed_dial.xml b/src/lib/srdb1/schema/speed_dial.xml index d7ad1b8bb..8cfb6f9b2 100644 --- a/src/lib/srdb1/schema/speed_dial.xml +++ b/src/lib/srdb1/schema/speed_dial.xml @@ -10,7 +10,7 @@
speed_dial2 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the speeddial module to provide on-server @@ -30,7 +30,7 @@ &table_id_len; - int,auto + int,auto unique ID diff --git a/src/lib/srdb1/schema/subscriber.xml b/src/lib/srdb1/schema/subscriber.xml index 8aaa03976..f51d51cab 100644 --- a/src/lib/srdb1/schema/subscriber.xml +++ b/src/lib/srdb1/schema/subscriber.xml @@ -10,7 +10,7 @@
subscriber7 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used to provide authentication information. More @@ -29,7 +29,7 @@ &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb1/schema/subscriber_scscf.xml b/src/lib/srdb1/schema/subscriber_scscf.xml index e55adf656..945308f4c 100644 --- a/src/lib/srdb1/schema/subscriber_scscf.xml +++ b/src/lib/srdb1/schema/subscriber_scscf.xml @@ -10,7 +10,7 @@
subscriber_scscf6 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Table for storage engine for SCSCF contacts. More information at: @@ -27,7 +27,7 @@ &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb1/schema/template.xml b/src/lib/srdb1/schema/template.xml index aff3a8938..d564d5201 100644 --- a/src/lib/srdb1/schema/template.xml +++ b/src/lib/srdb1/schema/template.xml @@ -10,7 +10,7 @@
table_name1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; table documentation @@ -21,7 +21,7 @@ &table_id_len; - int,auto + int,auto unique ID diff --git a/src/lib/srdb1/schema/topos_d.xml b/src/lib/srdb1/schema/topos_d.xml index ea7d3b989..8128f8eac 100644 --- a/src/lib/srdb1/schema/topos_d.xml +++ b/src/lib/srdb1/schema/topos_d.xml @@ -10,7 +10,7 @@
topos_d2 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used to store topos structures in database. More informations can be found in the topos module documentation at: @@ -28,7 +28,7 @@ &table_id_len; - int,auto + int,auto unique ID diff --git a/src/lib/srdb1/schema/topos_t.xml b/src/lib/srdb1/schema/topos_t.xml index 0d32b1488..9edf10dc6 100644 --- a/src/lib/srdb1/schema/topos_t.xml +++ b/src/lib/srdb1/schema/topos_t.xml @@ -10,7 +10,7 @@
topos_t2 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used to store topos structures in database. More informations can be found in the topos module documentation at: @@ -28,7 +28,7 @@ &table_id_len; - int,auto + int,auto unique ID diff --git a/src/lib/srdb1/schema/trusted.xml b/src/lib/srdb1/schema/trusted.xml index 24228371c..f127f3638 100644 --- a/src/lib/srdb1/schema/trusted.xml +++ b/src/lib/srdb1/schema/trusted.xml @@ -10,7 +10,7 @@
trusted6 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the permissions module to determine if a call @@ -30,7 +30,7 @@ &table_id_len; - int,auto + int,auto unique ID diff --git a/src/lib/srdb1/schema/uacreg.xml b/src/lib/srdb1/schema/uacreg.xml index ff5648004..59945fffa 100644 --- a/src/lib/srdb1/schema/uacreg.xml +++ b/src/lib/srdb1/schema/uacreg.xml @@ -10,7 +10,7 @@
uacreg5 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the uac module to load user details for remote @@ -29,7 +29,7 @@ &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb1/schema/uid_credentials.xml b/src/lib/srdb1/schema/uid_credentials.xml index 1b4a605c1..e0488e824 100644 --- a/src/lib/srdb1/schema/uid_credentials.xml +++ b/src/lib/srdb1/schema/uid_credentials.xml @@ -10,7 +10,7 @@
uid_credentials7 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Credentials table maps credentials, identified by username and realm to users identified by uid. Credentials can be used in digest authentication @@ -30,7 +30,7 @@ &table_id_len; - int,auto + int,auto Unique ID @@ -237,7 +237,7 @@ uid - uuid + uuid string &id_len; @@ -255,7 +255,7 @@ uid - uuid + uuid diff --git a/src/lib/srdb1/schema/uid_domain.xml b/src/lib/srdb1/schema/uid_domain.xml index b40be6391..1898dff45 100644 --- a/src/lib/srdb1/schema/uid_domain.xml +++ b/src/lib/srdb1/schema/uid_domain.xml @@ -9,7 +9,7 @@
uid_domain2 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; @@ -41,7 +41,7 @@ &table_id_len; - int,auto + int,auto Unique ID @@ -207,7 +207,7 @@ - + - + uid_domain_attrs 1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Each domain can have several attribute-value pairs assigned. They are used to store additional information about the domain, such as digest realm to @@ -28,7 +28,7 @@ &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb1/schema/uid_global_attrs.xml b/src/lib/srdb1/schema/uid_global_attrs.xml index 1ed092d59..26927062e 100644 --- a/src/lib/srdb1/schema/uid_global_attrs.xml +++ b/src/lib/srdb1/schema/uid_global_attrs.xml @@ -9,7 +9,7 @@
uid_global_attrs1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; The table contains value for global attributes. Global attributes are often used to implement default value for attributes that are not present @@ -22,7 +22,7 @@ &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb1/schema/uid_uri.xml b/src/lib/srdb1/schema/uid_uri.xml index d6a00d5da..2f1d0aef1 100644 --- a/src/lib/srdb1/schema/uid_uri.xml +++ b/src/lib/srdb1/schema/uid_uri.xml @@ -10,7 +10,7 @@
uid_uri3 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; id @@ -18,13 +18,13 @@ &table_id_len; - int,auto + int,auto Unique ID uid - uuid + uuid string &id_len; @@ -77,7 +77,7 @@ - + - + uid_uri_attrs 2 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; id @@ -18,7 +18,7 @@ &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb1/schema/uid_user_attrs.xml b/src/lib/srdb1/schema/uid_user_attrs.xml index 3db77eee4..41b03003c 100644 --- a/src/lib/srdb1/schema/uid_user_attrs.xml +++ b/src/lib/srdb1/schema/uid_user_attrs.xml @@ -10,7 +10,7 @@
uid_user_attrs3 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; Per user attributes loaded with uid_avp_db module. @@ -21,13 +21,13 @@ &table_id_len; - int,auto + int,auto Unique ID uid - uuid + uuid string &id_len; diff --git a/src/lib/srdb1/schema/uri.xml b/src/lib/srdb1/schema/uri.xml index dc0deb80f..0865c2e29 100644 --- a/src/lib/srdb1/schema/uri.xml +++ b/src/lib/srdb1/schema/uri.xml @@ -10,7 +10,7 @@
uri1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by uri_db module to implement various SIP URI @@ -29,7 +29,7 @@ &table_id_len; - int,auto + int,auto @@ -63,7 +63,7 @@ last_modified datetime &DEFAULT_DATETIME; - to_date('&DEFAULT_DATETIME;','yyyy-mm-dd hh24:mi:ss') + to_date('&DEFAULT_DATETIME;','yyyy-mm-dd hh24:mi:ss') Date and time when this record was last modified. diff --git a/src/lib/srdb1/schema/userblocklist.xml b/src/lib/srdb1/schema/userblocklist.xml index cbf604c1e..53555337f 100644 --- a/src/lib/srdb1/schema/userblocklist.xml +++ b/src/lib/srdb1/schema/userblocklist.xml @@ -10,7 +10,7 @@
userblocklist1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table is used by the userblocklist module for the user specific @@ -29,7 +29,7 @@ &table_id_len; - int,auto + int,auto unique ID diff --git a/src/lib/srdb1/schema/usr_preferences.xml b/src/lib/srdb1/schema/usr_preferences.xml index dc2be2b14..07ffb3640 100644 --- a/src/lib/srdb1/schema/usr_preferences.xml +++ b/src/lib/srdb1/schema/usr_preferences.xml @@ -10,7 +10,7 @@
usr_preferences2 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; This table us used by the avpops module to implement Attribute @@ -30,7 +30,7 @@ &table_id_len; - int,auto + int,auto Unique ID @@ -88,7 +88,7 @@ last_modified datetime &DEFAULT_DATETIME; - to_date('&DEFAULT_DATETIME;','yyyy-mm-dd hh24:mi:ss') + to_date('&DEFAULT_DATETIME;','yyyy-mm-dd hh24:mi:ss') Date and time when this record was last modified. diff --git a/src/lib/srdb1/schema/version.xml b/src/lib/srdb1/schema/version.xml index 2b65f68da..6607498f7 100644 --- a/src/lib/srdb1/schema/version.xml +++ b/src/lib/srdb1/schema/version.xml @@ -6,12 +6,13 @@ ]> -
> +
> version1 - &MYSQL_TABLE_TYPE; + &MYSQL_TABLE_TYPE; - + This table is used by Kamailio modules to check if the structure of database tables has the expected number. @@ -23,7 +24,7 @@ &table_id_len; - int,auto + int,auto Unique ID diff --git a/src/lib/srdb2/schema/acc.xml b/src/lib/srdb2/schema/acc.xml index 4222475e7..2659640d9 100644 --- a/src/lib/srdb2/schema/acc.xml +++ b/src/lib/srdb2/schema/acc.xml @@ -33,9 +33,9 @@ id int - INT AUTO_INCREMENT - SERIAL - int,auto + INT AUTO_INCREMENT + SERIAL + int,auto ID that uniquely identifies each row. This is automatically generated by the database server. This id is useful for post processing. diff --git a/src/lib/srdb2/schema/attr_types.xml b/src/lib/srdb2/schema/attr_types.xml index 55368fcf4..deaff1e03 100644 --- a/src/lib/srdb2/schema/attr_types.xml +++ b/src/lib/srdb2/schema/attr_types.xml @@ -105,7 +105,7 @@ access - attr_access + attr_access int 0 diff --git a/src/lib/srdb2/schema/contact_attrs.xml b/src/lib/srdb2/schema/contact_attrs.xml index 9151e81be..699e5c812 100644 --- a/src/lib/srdb2/schema/contact_attrs.xml +++ b/src/lib/srdb2/schema/contact_attrs.xml @@ -13,7 +13,7 @@ uid - uuid + uuid string &id_len; diff --git a/src/lib/srdb2/schema/cpl.xml b/src/lib/srdb2/schema/cpl.xml index f29275d3f..19cb21728 100644 --- a/src/lib/srdb2/schema/cpl.xml +++ b/src/lib/srdb2/schema/cpl.xml @@ -13,7 +13,7 @@ uid - uuid + uuid string &id_len; diff --git a/src/lib/srdb2/schema/credentials.xml b/src/lib/srdb2/schema/credentials.xml index 335b55478..1c4dc9744 100644 --- a/src/lib/srdb2/schema/credentials.xml +++ b/src/lib/srdb2/schema/credentials.xml @@ -226,7 +226,7 @@ uid - uuid + uuid string &id_len; @@ -244,7 +244,7 @@ uid - uuid + uuid diff --git a/src/lib/srdb2/schema/customers.xml b/src/lib/srdb2/schema/customers.xml index 097b18b3a..067682221 100644 --- a/src/lib/srdb2/schema/customers.xml +++ b/src/lib/srdb2/schema/customers.xml @@ -19,9 +19,9 @@ cid unsigned int - INT AUTO_INCREMENT - SERIAL - int,auto + INT AUTO_INCREMENT + SERIAL + int,auto Unique id of the customer. The value is auto generated by the database server. diff --git a/src/lib/srdb2/schema/domain.xml b/src/lib/srdb2/schema/domain.xml index 955f95d0f..de4b5842c 100644 --- a/src/lib/srdb2/schema/domain.xml +++ b/src/lib/srdb2/schema/domain.xml @@ -197,7 +197,7 @@ - + - + uid - uuid + uuid string &user_len; diff --git a/src/lib/srdb2/schema/gw_grp.xml b/src/lib/srdb2/schema/gw_grp.xml index f9007db2c..84ee38137 100644 --- a/src/lib/srdb2/schema/gw_grp.xml +++ b/src/lib/srdb2/schema/gw_grp.xml @@ -14,9 +14,9 @@ grp_id int - INT AUTO_INCREMENT - SERIAL - int,auto + INT AUTO_INCREMENT + SERIAL + int,auto diff --git a/src/lib/srdb2/schema/location.xml b/src/lib/srdb2/schema/location.xml index a98875adc..ddb842fd9 100644 --- a/src/lib/srdb2/schema/location.xml +++ b/src/lib/srdb2/schema/location.xml @@ -18,7 +18,7 @@ uid - uuid + uuid string &id_len; diff --git a/src/lib/srdb2/schema/missed_calls.xml b/src/lib/srdb2/schema/missed_calls.xml index aa7dbc23b..e53f51fe8 100644 --- a/src/lib/srdb2/schema/missed_calls.xml +++ b/src/lib/srdb2/schema/missed_calls.xml @@ -28,9 +28,9 @@ id int - INT AUTO_INCREMENT - SERIAL - int,auto + INT AUTO_INCREMENT + SERIAL + int,auto ID that uniquely identifies each row. This is automatically generated by the database server. This id is useful for post processing. diff --git a/src/lib/srdb2/schema/offline_winfo.xml b/src/lib/srdb2/schema/offline_winfo.xml index adf0c85fb..432a90521 100644 --- a/src/lib/srdb2/schema/offline_winfo.xml +++ b/src/lib/srdb2/schema/offline_winfo.xml @@ -22,7 +22,7 @@ uid - uuid + uuid string &id_len; UID of presentity. @@ -80,9 +80,9 @@ dbid unsigned int 10 - INT(10) UNSIGNED AUTO_INCREMENT - SERIAL - int,auto + INT(10) UNSIGNED AUTO_INCREMENT + SERIAL + int,auto Auto-generated key. diff --git a/src/lib/srdb2/schema/phonebook.xml b/src/lib/srdb2/schema/phonebook.xml index ea6834853..788e4913c 100644 --- a/src/lib/srdb2/schema/phonebook.xml +++ b/src/lib/srdb2/schema/phonebook.xml @@ -17,9 +17,9 @@ id unsigned int - INT AUTO_INCREMENT - SERIAL - int,auto + INT AUTO_INCREMENT + SERIAL + int,auto Unique id of the row. The value is auto generated by the database server. @@ -28,7 +28,7 @@ uid - uuid + uuid string &id_len; diff --git a/src/lib/srdb2/schema/presentity.xml b/src/lib/srdb2/schema/presentity.xml index 565882ff3..0cb53e2e6 100644 --- a/src/lib/srdb2/schema/presentity.xml +++ b/src/lib/srdb2/schema/presentity.xml @@ -35,7 +35,7 @@ uid Presentity UID (unique user identification in SER). - uuid + uuid string &id_len; diff --git a/src/lib/srdb2/schema/ser.xml b/src/lib/srdb2/schema/ser.xml index c3967f08c..eb1e9c6ea 100644 --- a/src/lib/srdb2/schema/ser.xml +++ b/src/lib/srdb2/schema/ser.xml @@ -84,7 +84,7 @@ - + - + - + mid int - INT AUTO_INCREMENT - SERIAL - int,auto + INT AUTO_INCREMENT + SERIAL + int,auto @@ -39,7 +39,7 @@ uid - uuid + uuid string &id_len; diff --git a/src/lib/srdb2/schema/speed_dial.xml b/src/lib/srdb2/schema/speed_dial.xml index 3f49f6f04..3f41c42aa 100644 --- a/src/lib/srdb2/schema/speed_dial.xml +++ b/src/lib/srdb2/schema/speed_dial.xml @@ -14,14 +14,14 @@ id int - INT AUTO_INCREMENT - SERIAL - int,auto + INT AUTO_INCREMENT + SERIAL + int,auto uid - uuid + uuid string &id_len; diff --git a/src/lib/srdb2/schema/uri.xml b/src/lib/srdb2/schema/uri.xml index 5af9750b8..af229cace 100644 --- a/src/lib/srdb2/schema/uri.xml +++ b/src/lib/srdb2/schema/uri.xml @@ -13,7 +13,7 @@ uid - uuid + uuid string &id_len; @@ -66,7 +66,7 @@ - + - + uid - uuid + uuid string &id_len; diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt index be55da5f0..efa49d993 100644 --- a/src/modules/CMakeLists.txt +++ b/src/modules/CMakeLists.txt @@ -12,13 +12,22 @@ include(${CMAKE_SOURCE_DIR}/cmake/groups.cmake) set(AVAILABLE_GROUP_NAMES ${AVAILABLE_GROUPS}) set(MODULE_GROUP_NAME "DEFAULT" - CACHE STRING - "Group of modules to build (one or multiple space seperated group)") -set_property(CACHE MODULE_GROUP_NAME PROPERTY STRINGS ${AVAILABLE_GROUP_NAMES}) + CACHE STRING "Groups of modules to build (one or multiple space seperated group)" +) # User may provide multiple groups seperated by space separate_arguments(MODULE_GROUP_LIST UNIX_COMMAND "${MODULE_GROUP_NAME}") -message(STATUS "Building groups: ${MODULE_GROUP_LIST}") + +# Deduplicate the list +list(REMOVE_DUPLICATES MODULE_GROUP_LIST) +list(FIND MODULE_GROUP_LIST "ALL_PACKAGED" INDEX) + +if(INDEX GREATER -1) + # Remove it from the lists + list(REMOVE_AT MODULE_GROUP_LIST ${INDEX}) + list(APPEND MODULE_GROUP_LIST ${MODULE_GROUP_PACKAGE_GROUPS}) + message(STATUS "Building all packaged modules along with other provided groups.") +endif() # Check if elements in MODULE_GROUP_LIST are valid by checking against # AVAILABLE_GROUP_NAMES @@ -27,7 +36,8 @@ foreach(group_name IN LISTS MODULE_GROUP_LIST) list(FIND AVAILABLE_GROUP_NAMES "${group_name}" INDEX) if(INDEX EQUAL -1) message(FATAL_ERROR "Invalid module group specified: ${group_name}. - Available groups: ${AVAILABLE_GROUPS}") + Available groups: ${AVAILABLE_GROUPS}" + ) else() list(APPEND FULL_MODULE_GROUP_NAMES "MODULE_GROUP_${group_name}") # get_property(MODULE_GROUP VARIABLE PROPERTY "MODULE_GROUP_${GROUP_NAME}") @@ -35,27 +45,32 @@ foreach(group_name IN LISTS MODULE_GROUP_LIST) # message(STATUS "Modules: ${MODULE_GROUP}") endif() endforeach() +message(STATUS "Building groups: ${MODULE_GROUP_LIST}") # message(STATUS "Expanded module groups: ${FULL_MODULE_GROUP_NAMES}") # Allow users to specify extra modules to build set(INCLUDE_MODULES "" - CACHE STRING "List of extra modules to build (space-separated)") + CACHE STRING "List of extra modules to build (space-separated)" +) set(EXCLUDE_MODULES "" - CACHE STRING "List of modules to exclude from building (space-separated)") + CACHE STRING "List of modules to exclude from building (space-separated)" +) include(${CMAKE_SOURCE_DIR}/cmake/modules-docs.cmake) # Function to add modules from a list -function(add_module_group group_modules) +function(add_module_group group_name group_modules) + # message(STATUS "Adding modules for group: ${group_name}") + # message(STATUS "Modules: ${group_modules}") + foreach(module_name IN LISTS group_modules) # Check if the module has already been added get_property(ALREADY_ADDED GLOBAL PROPERTY ADDED_MODULES_LIST) if("${module_name}" IN_LIST ALREADY_ADDED) - message( - STATUS "Module ${module_name} has already been added. Skipping...") + message(STATUS "Module ${module_name} has already been added. Skipping...") elseif("${module_name}" IN_LIST EXCLUDED_MODULES_LIST) message(STATUS "Module ${module_name} is excluded. Skipping...") list(REMOVE_ITEM ADDED_MODULES_LIST ${module_name}) @@ -80,33 +95,40 @@ function(add_module_group group_modules) target_link_libraries(${module_name} PRIVATE common_modules) target_compile_definitions( - ${module_name} PRIVATE MOD_NAMEID=${module_name} - MOD_NAME=\"${module_name}\") + ${module_name} PRIVATE MOD_NAMEID=${module_name} MOD_NAME=\"${module_name}\" + ) target_compile_options( ${module_name} - PRIVATE - "-ffile-prefix-map=${CMAKE_SOURCE_DIR}/src/modules/${module_name}/=" + PRIVATE "-ffile-prefix-map=${CMAKE_SOURCE_DIR}/src/modules/${module_name}/=" ) # Set the RPATH of the module to include the installation directory of set_target_properties( - ${module_name} PROPERTIES INSTALL_RPATH - "${CMAKE_INSTALL_FULL_LIBDIR}/${MAIN_NAME}") + ${module_name} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}/${MAIN_NAME}" + ) # Install the module to the appropriate directory under the installation # prefix install( TARGETS ${module_name} DESTINATION ${CMAKE_INSTALL_LIBDIR}/${MAIN_NAME}/modules - COMPONENT kamailio_modules) + COMPONENT ${group_name} + ) # Add the module to the list of added modules set_property(GLOBAL APPEND PROPERTY ADDED_MODULES_LIST ${module_name}) - docs_add_module(${module_name}) - set_property(GLOBAL APPEND PROPERTY ALL_MODULE_DOC_TARGETS - ${module_name}_doc) + if(NOT EXISTS ${CMAKE_SOURCE_DIR}/src/modules/${module_name}/doc/${module_name}.xml) + message(WARNING "No documentation found for module ${module_name}.") + return() + else() + docs_add_module(${group_name} ${module_name}) + set_property(GLOBAL APPEND PROPERTY ALL_MODULE_DOC_TARGETS ${module_name}_doc) + endif() + else() - message(FATAL_ERROR "Module directory ${module_path} does not exist.") + message( + FATAL_ERROR "Module directory ${module_path} does not exist or CMakeLists.txt is missing." + ) endif() endif() endforeach() @@ -116,40 +138,68 @@ endfunction() # dependencies to them. add_custom_target( kamailio_docs_readme - COMMENT - "Generating modules readme. Note: This will overwrite REAMDEs found in source tree" + COMMENT "Generating modules readme. Note: This will overwrite REAMDEs found in source tree" ) add_custom_target(kamailio_docs_man COMMENT "Generating man pages") # Parse and add extra modules specified by the user separate_arguments(INCLUDE_MODULES_LIST UNIX_COMMAND "${INCLUDE_MODULES}") -message( - STATUS - "Extra modules (if module already included already from group is ignored): - ${INCLUDE_MODULES_LIST}") +message(STATUS "Extra modules (if module already included already from group is ignored): + ${INCLUDE_MODULES_LIST}" +) list(APPEND USER_MODULES_LIST ${INCLUDE_MODULES_LIST}) separate_arguments(EXCLUDED_MODULES_LIST UNIX_COMMAND "${EXCLUDE_MODULES}") message(STATUS "Excluded modules (exlcude even if in included modules): - ${EXCLUDED_MODULES_LIST}") + ${EXCLUDED_MODULES_LIST}" +) # Add each group of modules foreach(group IN LISTS FULL_MODULE_GROUP_NAMES) get_property(MODULES_IN_GROUP VARIABLE PROPERTY "${group}") if(VERBOSE) + list(SORT MODULES_IN_GROUP) message(STATUS "Modules in ${group}: ${MODULES_IN_GROUP}") endif() - add_module_group("${MODULES_IN_GROUP}") + # remove module_group_prefix. + # TODO: This feels like a hack since user already provided + # the group name. Move the check above in these for maybe? + string(REPLACE "MODULE_GROUP_" "" group_name "${group}") + # message(WARNING "Adding module group: ${group_name}") + add_module_group("${group_name}" "${MODULES_IN_GROUP}") endforeach() -add_module_group("${USER_MODULES_LIST}") + +# Function need first argument to be a string (empty string is fine) +# Name of group_name (cmake component name) to add user specified modules +add_module_group("user_specified_list" "${USER_MODULES_LIST}") get_property(ADDED_MODULES_LIST GLOBAL PROPERTY ADDED_MODULES_LIST) +list(SORT ADDED_MODULES_LIST) message(STATUS "Modules to be built: ${ADDED_MODULES_LIST}") # TODO: Comment is not showing. probably a bug in CMAKE # https://gitlab.kitware.com/cmake/cmake/-/issues/26571 add_custom_target(modules COMMENT "Building modules") -add_dependencies(modules ${ADDED_MODULES_LIST}) +if(NOT ADDED_MODULES_LIST) + message(WARNING "No modules to build. Did you forget to add a module group or include module?") +else() + add_dependencies(modules ${ADDED_MODULES_LIST}) +endif() + +add_custom_target( + print-modules + COMMAND ${CMAKE_COMMAND} -E echo + "----------------------------------------------------------------" + COMMAND ${CMAKE_COMMAND} -E echo "Module Selection Summary:" + COMMAND ${CMAKE_COMMAND} -E echo + "----------------------------------------------------------------" + COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --green + "The following modules were chosen to be included:${INCLUDE_MODULES_LIST}" + COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --red + "The following modules will be excluded: ${EXCLUDED_MODULES_LIST}" + COMMAND ${CMAKE_COMMAND} -E echo "The following modules will be built: ${ADDED_MODULES_LIST}" + VERBATIM +) get_property(ALL_MODULE_DOC_TARGETS GLOBAL PROPERTY ALL_MODULE_DOC_TARGETS) # message(STATUS "ALL_MODULE_DOC_TARGETS: ${ALL_MODULE_DOC_TARGETS}") @@ -157,12 +207,16 @@ get_property(ALL_MODULE_DOC_TARGETS GLOBAL PROPERTY ALL_MODULE_DOC_TARGETS) # Add a kamailio_docs target that depends on all module documentation targets add_custom_target( kamailio_docs + ${docs_in_all_target} DEPENDS ${ALL_MODULE_DOC_TARGETS} - COMMENT "Generating Kamailio documentation") + COMMENT "Generating Kamailio documentation" +) +# No component kamailio_docs is defined after component based installation +# TODO: Fix if possible add_custom_target( install_kamailio_docs - COMMAND ${CMAKE_COMMAND} --install ${CMAKE_BINARY_DIR} --component - kamailio_docs + COMMAND ${CMAKE_COMMAND} --install ${CMAKE_BINARY_DIR} --component kamailio_docs DEPENDS kamailio_docs - COMMENT "Installing Kamailio documentation") + COMMENT "Installing Kamailio documentation" +) diff --git a/src/modules/app_perl/CMakeLists.txt b/src/modules/app_perl/CMakeLists.txt index f2fd387e7..a6d5b03c3 100644 --- a/src/modules/app_perl/CMakeLists.txt +++ b/src/modules/app_perl/CMakeLists.txt @@ -69,10 +69,10 @@ if(NOT PERL_TYPEMAP) ERROR_VARIABLE PERL_LIBPATH_ERROR # error of the command if any OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE ) - message(WARNING "PERL_LIBPATH: ${PERL_LIBPATH}") + message(STATUS "PERL_LIBPATH: ${PERL_LIBPATH}") endif() set(PERL_TYPEMAP ${PERL_LIBPATH}/ExtUtils/typemap) - message(WARNING "PERL_TYPEMAP: ${PERL_TYPEMAP}") + message(STATUS "PERL_TYPEMAP: ${PERL_TYPEMAP}") endif() set(PERL_PODFILES ${CMAKE_CURRENT_SOURCE_DIR}/kamailioxs.xs) @@ -84,9 +84,8 @@ list(APPEND PERL_PODFILES ${PERL_PODFILES_PM}) # and we don't want to change them. add_custom_command( OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/kamailioxs.c - COMMAND - xsubpp -typemap ${PERL_TYPEMAP} -typemap ${CMAKE_CURRENT_SOURCE_DIR}/typemap - kamailioxs.xs > ${CMAKE_CURRENT_SOURCE_DIR}/kamailioxs.c + COMMAND xsubpp -typemap ${PERL_TYPEMAP} -typemap ${CMAKE_CURRENT_SOURCE_DIR}/typemap kamailioxs.xs + > ${CMAKE_CURRENT_SOURCE_DIR}/kamailioxs.c WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Generating kamailioxs.c" VERBATIM @@ -96,8 +95,7 @@ add_custom_command( target_sources(${module_name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/kamailioxs.c) # Add the flag option only for the generated file set_source_files_properties( - ${CMAKE_CURRENT_SOURCE_DIR}/kamailioxs.c PROPERTIES COMPILE_OPTIONS - -Wno-unused + ${CMAKE_CURRENT_SOURCE_DIR}/kamailioxs.c PROPERTIES COMPILE_OPTIONS -Wno-unused ) # Doc target @@ -108,18 +106,17 @@ add_custom_target(perlpod) # Requires libpod-2-docbook-perl packages add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/doc/app_perl_pod.sgml - COMMAND cat ${PERL_PODFILES} | pod2docbook --doctype=chapter --title='Kamailio - Perl API' --no-header - ${CMAKE_CURRENT_BINARY_DIR}/app_perl_pod.sgml + COMMAND cat ${PERL_PODFILES} | pod2docbook --doctype=chapter --title='Kamailio Perl API' + --no-header - ${CMAKE_CURRENT_BINARY_DIR}/app_perl_pod.sgml WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Generating app_perl_pod.sgml" ) -add_custom_target( - ${module_name}_pod.sgml - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/doc/app_perl_pod.sgml -) +add_custom_target(${module_name}_pod.sgml DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/doc/app_perl_pod.sgml) # Install nessecary files -install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib/perl - DESTINATION ${CMAKE_INSTALL_LIBDIR}/${MAIN_NAME} +install( + DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib/perl + DESTINATION ${CMAKE_INSTALL_LIBDIR}/${MAIN_NAME} + COMPONENT ${group_name} ) diff --git a/src/modules/auth/api.c b/src/modules/auth/api.c index 83b9eef69..5469e7af0 100644 --- a/src/modules/auth/api.c +++ b/src/modules/auth/api.c @@ -305,6 +305,33 @@ int auth_check_response(dig_cred_t *cred, str *method, char *ha1) } +/* + * wrapper to calculate H(A1) as per spec + */ +void auth_calc_HA1(ha_alg_t _alg, str *_username, str *_realm, str *_password, + str *_nonce, str *_cnonce, HASHHEX _sess_key) +{ + calc_HA1(_alg, _username, _realm, _password, _nonce, _cnonce, _sess_key); +} + +/* + * wrapper to calculate request-digest/response-digest as per HTTP Digest spec + */ +void auth_calc_response(HASHHEX _ha1, /* H(A1) */ + str *_nonce, /* nonce from server */ + str *_nc, /* 8 hex digits */ + str *_cnonce, /* client nonce */ + str *_qop, /* qop-value: "", "auth", "auth-int" */ + int _auth_int, /* 1 if auth-int is used */ + str *_method, /* method from the request */ + str *_uri, /* requested URL */ + HASHHEX _hentity, /* H(entity body) if qop="auth-int" */ + HASHHEX _response) /* request-digest or response-digest */ +{ + calc_response(_ha1, _nonce, _nc, _cnonce, _qop, _auth_int, _method, _uri, + _hentity, _response); +} + int bind_auth_s(auth_api_s_t *api) { if(!api) { @@ -316,8 +343,8 @@ int bind_auth_s(auth_api_s_t *api) api->post_auth = post_auth; api->build_challenge = build_challenge_hf; api->qop = &auth_qop; - api->calc_HA1 = calc_HA1; - api->calc_response = calc_response; + api->calc_HA1 = auth_calc_HA1; + api->calc_response = auth_calc_response; api->check_response = auth_check_response; api->auth_challenge_hftype = auth_challenge_hftype; api->pv_authenticate = pv_authenticate; diff --git a/src/modules/auth/api.h b/src/modules/auth/api.h index 75d95b800..397edeb44 100644 --- a/src/modules/auth/api.h +++ b/src/modules/auth/api.h @@ -60,6 +60,22 @@ typedef enum auth_cfg_result #define AUTH_CHECK_ID_F 1 << 0 #define AUTH_CHECK_SKIPFWD_F 1 << 1 +/** + * flags to control auth functions + */ +/* password parameter is HA1 format */ +#define AUTH_FLAG_PASSWDHA1 1 +/* challenge header with no qop and add it to avp */ +#define AUTH_FLAG_HDRQOPNONE 2 +/* challenge header with qop=auth and add it to avp */ +#define AUTH_FLAG_HDRQOPAUTH 4 +/* challenge header with qop=auth-int and add it to avp */ +#define AUTH_FLAG_HDRQOPAUTHINT 8 +/* challenge header with stale=true */ +#define AUTH_FLAG_CLGSTALE 16 +/* do not invalidate nc on authentication failure */ +#define AUTH_FLAG_NOINVNC 32 + /** * return codes to auth API functions */ @@ -119,9 +135,9 @@ int auth_challenge_hftype( struct sip_msg *msg, str *realm, int flags, int hftype); typedef int (*pv_authenticate_f)(struct sip_msg *msg, str *realm, str *passwd, - int flags, int hftype, str *method); + int flags, int hftype, hdr_field_t **hdr, str *method); int pv_authenticate(struct sip_msg *msg, str *realm, str *passwd, int flags, - int hftype, str *method); + int hftype, hdr_field_t **hdr, str *method); typedef int (*consume_credentials_f)(struct sip_msg *msg); int consume_credentials(struct sip_msg *msg); diff --git a/src/modules/auth/auth_mod.c b/src/modules/auth/auth_mod.c index cf0ede401..31bebc852 100644 --- a/src/modules/auth/auth_mod.c +++ b/src/modules/auth/auth_mod.c @@ -557,9 +557,9 @@ static int auth_check_hdr_md5_noupdate( * @brief do WWW-Digest authentication with password taken from cfg var */ int pv_authenticate(struct sip_msg *msg, str *realm, str *passwd, int flags, - int hftype, str *method) + int hftype, hdr_field_t **hdr, str *method) { - struct hdr_field *h; + struct hdr_field *h = NULL; auth_body_t *cred; auth_cfg_result_t ret; auth_result_t rauth; @@ -573,7 +573,7 @@ int pv_authenticate(struct sip_msg *msg, str *realm, str *passwd, int flags, ret = AUTH_ERROR; #ifdef USE_NC - if(nc_enabled && (flags & 32)) + if(nc_enabled && (flags & AUTH_FLAG_NOINVNC)) check_auth_hdr = auth_check_hdr_md5_noupdate; #endif @@ -617,7 +617,7 @@ int pv_authenticate(struct sip_msg *msg, str *realm, str *passwd, int flags, cred = (auth_body_t *)h->parsed; /* compute HA1 if needed */ - if((flags & 1) == 0) { + if((flags & AUTH_FLAG_PASSWDHA1) == 0) { /* Plaintext password is stored in PV, calculate HA1 */ calc_HA1( HA_MD5, &cred->digest.username.whole, realm, passwd, 0, 0, ha1); @@ -647,7 +647,7 @@ int pv_authenticate(struct sip_msg *msg, str *realm, str *passwd, int flags, #ifdef USE_NC /* On success we need to update the nonce if flag 32 is set */ - if(nc_enabled && ret == AUTH_OK && (flags & 32)) { + if(nc_enabled && ret == AUTH_OK && (flags & AUTH_FLAG_NOINVNC)) { if(check_nonce(cred, &secret1, &secret2, msg, 1) < 0) { LM_ERR("check_nonce failed after post_auth"); ret = AUTH_ERROR; @@ -656,13 +656,16 @@ int pv_authenticate(struct sip_msg *msg, str *realm, str *passwd, int flags, #endif end: + if(hdr != NULL) { + *hdr = h; + } if(ret < 0) { /* check if required to add challenge header as avp */ if(!(flags & 14)) return ret; - if(flags & 8) { + if(flags & AUTH_FLAG_HDRQOPAUTHINT) { qop = &auth_qauthint; - } else if(flags & 4) { + } else if(flags & AUTH_FLAG_HDRQOPAUTH) { qop = &auth_qauth; } if(get_challenge_hf(msg, (cred ? cred->stale : 0), realm, NULL, @@ -692,7 +695,7 @@ end: static int ki_pv_proxy_authenticate( sip_msg_t *msg, str *realm, str *passwd, int flags) { - return pv_authenticate(msg, realm, passwd, flags, HDR_PROXYAUTH_T, + return pv_authenticate(msg, realm, passwd, flags, HDR_PROXYAUTH_T, NULL, &msg->first_line.u.request.method); } @@ -731,7 +734,7 @@ static int pv_proxy_authenticate( goto error; } return pv_authenticate(msg, &srealm, &spasswd, vflags, HDR_PROXYAUTH_T, - &msg->first_line.u.request.method); + NULL, &msg->first_line.u.request.method); error: return AUTH_ERROR; @@ -743,7 +746,7 @@ error: static int ki_pv_www_authenticate( sip_msg_t *msg, str *realm, str *passwd, int flags) { - return pv_authenticate(msg, realm, passwd, flags, HDR_AUTHORIZATION_T, + return pv_authenticate(msg, realm, passwd, flags, HDR_AUTHORIZATION_T, NULL, &msg->first_line.u.request.method); } @@ -754,7 +757,7 @@ static int ki_pv_www_authenticate_method( sip_msg_t *msg, str *realm, str *passwd, int flags, str *method) { return pv_authenticate( - msg, realm, passwd, flags, HDR_AUTHORIZATION_T, method); + msg, realm, passwd, flags, HDR_AUTHORIZATION_T, NULL, method); } /** @@ -792,7 +795,7 @@ static int pv_www_authenticate( goto error; } return pv_authenticate(msg, &srealm, &spasswd, vflags, HDR_AUTHORIZATION_T, - &msg->first_line.u.request.method); + NULL, &msg->first_line.u.request.method); error: return AUTH_ERROR; @@ -841,8 +844,8 @@ static int pv_www_authenticate2(struct sip_msg *msg, char *realm, char *passwd, goto error; } - return pv_authenticate( - msg, &srealm, &spasswd, vflags, HDR_AUTHORIZATION_T, &smethod); + return pv_authenticate(msg, &srealm, &spasswd, vflags, HDR_AUTHORIZATION_T, + NULL, &smethod); error: return AUTH_ERROR; @@ -861,15 +864,14 @@ static int pv_auth_check( sip_uri_t *furi = NULL; str suser; - if(msg->REQ_METHOD == METHOD_REGISTER) + if(msg->REQ_METHOD == METHOD_REGISTER) { ret = pv_authenticate(msg, srealm, spasswd, vflags, HDR_AUTHORIZATION_T, - &msg->first_line.u.request.method); - else + &hdr, &msg->first_line.u.request.method); + } else { ret = pv_authenticate(msg, srealm, spasswd, vflags, HDR_PROXYAUTH_T, - &msg->first_line.u.request.method); - + &hdr, &msg->first_line.u.request.method); + } if(ret == AUTH_OK && (vchecks & AUTH_CHECK_ID_F)) { - hdr = (msg->proxy_auth == 0) ? msg->authorization : msg->proxy_auth; if(hdr == NULL) { if(msg->REQ_METHOD & (METHOD_ACK | METHOD_CANCEL | METHOD_PRACK)) { return AUTH_OK; diff --git a/src/modules/auth_db/authorize.c b/src/modules/auth_db/authorize.c index a1629f062..f1c4b6d62 100644 --- a/src/modules/auth_db/authorize.c +++ b/src/modules/auth_db/authorize.c @@ -237,7 +237,7 @@ static int digest_authenticate_hdr(sip_msg_t *msg, str *realm, str *table, char ha1[256]; auth_cfg_result_t ret; auth_result_t rauth; - struct hdr_field *h; + struct hdr_field *h = NULL; auth_body_t *cred; db1_res_t *result = NULL; @@ -283,8 +283,6 @@ static int digest_authenticate_hdr(sip_msg_t *msg, str *realm, str *table, } cred = (auth_body_t *)h->parsed; - if(ahdr != NULL) - *ahdr = h; rauth = get_ha1(&cred->digest.username, realm, table, ha1, &result); if(rauth < 0) { @@ -326,6 +324,9 @@ static int digest_authenticate_hdr(sip_msg_t *msg, str *realm, str *table, } end: + if(ahdr != NULL) { + *ahdr = h; + } if(result) auth_dbf.free_result(auth_db_handle, result); return ret; diff --git a/src/modules/auth_radius/CMakeLists.txt b/src/modules/auth_radius/CMakeLists.txt index 37a2350f4..403b665e2 100644 --- a/src/modules/auth_radius/CMakeLists.txt +++ b/src/modules/auth_radius/CMakeLists.txt @@ -27,10 +27,12 @@ install( PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) endif() " - COMPONENT ${module_name}-cfg) + COMPONENT ${group_name} +) +# Custom target to install only the specific config file add_custom_target( ${module_name}-install-cfg COMMENT "Installing auth_radius dictionary.${CFG_NAME} configuration file" - COMMAND ${CMAKE_COMMAND} --install ${CMAKE_BINARY_DIR} --component - ${module_name}-cfg) + COMMAND ${CMAKE_COMMAND} --install ${CMAKE_BINARY_DIR} --component ${module_name}-cfg +) diff --git a/src/modules/auth_radius/sterman.c b/src/modules/auth_radius/sterman.c index 9f2a9e2fd..e8c5700fe 100644 --- a/src/modules/auth_radius/sterman.c +++ b/src/modules/auth_radius/sterman.c @@ -67,7 +67,7 @@ static inline int extract_avp( char *p, *q, *r; LM_DBG("vp->name '%.*s'\n", (int)strlen(vp->name), vp->name); - LM_DBG("vp->attribute '%d'\n", vp->attribute); + LM_DBG("vp->attribute '%d'\n", (int)vp->attribute); LM_DBG("vp->type '%d'\n", vp->type); LM_DBG("vp->lvalue '%d'\n", vp->lvalue); if(vp->type == PW_TYPE_STRING) @@ -152,7 +152,7 @@ static int generate_avps(VALUE_PAIR *received) vp = rc_avpair_get(vp, attrs[A_SIP_AVP].v, 0); for(; vp; vp = ((ar_radius_avps_mode) ? vp->next : rc_avpair_get(vp->next, - attrs[A_SIP_AVP].v, 0))) { + attrs[A_SIP_AVP].v, 0))) { flags = 0; if(!extract_avp(vp, &flags, &name, &val)) { LM_ERR("error while extracting AVP '%.*s'\n", (int)strlen(vp->name), diff --git a/src/modules/benchmark/README b/src/modules/benchmark/README index 7f2a0a56e..652070f14 100644 --- a/src/modules/benchmark/README +++ b/src/modules/benchmark/README @@ -124,9 +124,17 @@ Chapter 1. Admin Guide adding this module's functions via the configuration file or through its API, Kamailio can log profiling information for every function. - The duration between calls to start_timer and log_timer is stored and - logged via Kamailio's logging facility. Please note that all durations - are given as microseconds (don't confuse with milliseconds!). + The duration between calls to bm_start_timer() and bm_log_timer() is + stored and logged via Kamailio's logging facility. Please note that all + durations are given as microseconds (do not confuse with milliseconds). + Support for nanosecond precission can be enabled by compiling with + librt (see the Makefile of the module). + + Note: the measurement can be done only in the context of the same + application process. It does not work to measure the duration of + execution between actions before suspending the transaction in one + process and after resuming the processing in another process (e.g., + functions from async or http_async_client modules). 2. Dependencies diff --git a/src/modules/benchmark/doc/benchmark_admin.xml b/src/modules/benchmark/doc/benchmark_admin.xml index 10f94b2b5..5c1f11f34 100644 --- a/src/modules/benchmark/doc/benchmark_admin.xml +++ b/src/modules/benchmark/doc/benchmark_admin.xml @@ -22,9 +22,18 @@ can log profiling information for every function. - The duration between calls to start_timer and log_timer is stored and logged + The duration between calls to bm_start_timer() and bm_log_timer() is stored and logged via &kamailio;'s logging facility. Please note that all durations are given as - microseconds (don't confuse with milliseconds!). + microseconds (do not confuse with milliseconds). Support for nanosecond + precission can be enabled by compiling with librt (see the Makefile of + the module). + + + Note: the measurement can be done only in the context of the same application + process. It does not work to measure the duration of execution between + actions before suspending the transaction in one process and after resuming + the processing in another process (e.g., functions from async or http_async_client + modules).
@@ -431,4 +440,3 @@ bm_log_timer("usrloc-lookup");
- diff --git a/src/modules/cdp/cdp_tls.c b/src/modules/cdp/cdp_tls.c index f2c7c7b8b..7ecfa10dc 100644 --- a/src/modules/cdp/cdp_tls.c +++ b/src/modules/cdp/cdp_tls.c @@ -256,9 +256,13 @@ cleanup: #if OPENSSL_VERSION_NUMBER >= 0x10100000L void cleanup_ssl(SSL_CTX *tls_ctx, SSL *tls_conn) { - SSL_shutdown(tls_conn); - SSL_free(tls_conn); - SSL_CTX_free(tls_ctx); + if(tls_conn) { + SSL_shutdown(tls_conn); + SSL_free(tls_conn); + } + if(tls_ctx) { + SSL_CTX_free(tls_ctx); + } } #endif diff --git a/src/modules/crypto/CMakeLists.txt b/src/modules/crypto/CMakeLists.txt index 63d56fb6a..a111e1f27 100644 --- a/src/modules/crypto/CMakeLists.txt +++ b/src/modules/crypto/CMakeLists.txt @@ -2,6 +2,6 @@ file(GLOB MODULE_SOURCES "*.c") add_library(${module_name} SHARED ${MODULE_SOURCES}) -find_package(OpenSSL REQUIRED COMPONENTS SSL Crypto) +find_package(OpenSSL REQUIRED) target_link_libraries(${module_name} PRIVATE OpenSSL::SSL OpenSSL::Crypto) diff --git a/src/modules/db2_ldap/CMakeLists.txt b/src/modules/db2_ldap/CMakeLists.txt index 3fddc416c..f948c5bc1 100644 --- a/src/modules/db2_ldap/CMakeLists.txt +++ b/src/modules/db2_ldap/CMakeLists.txt @@ -13,5 +13,4 @@ find_package(Ldap REQUIRED) # LDAP_DEPRECATED is required for LDAP support else it will throw compile error target_compile_definitions(${module_name} PRIVATE LDAP_DEPRECATED) target_include_directories(${module_name} PRIVATE ${Ldap_INCLUDE_DIRS}) -target_link_libraries(${module_name} PRIVATE ${LDAP_LIBRARIES} - libsasl2::libsasl2) +target_link_libraries(${module_name} PRIVATE ${LDAP_LIBRARIES} libsasl2::libsasl2) diff --git a/src/modules/db_berkeley/CMakeLists.txt b/src/modules/db_berkeley/CMakeLists.txt index f2884f8e5..91b16bbb0 100644 --- a/src/modules/db_berkeley/CMakeLists.txt +++ b/src/modules/db_berkeley/CMakeLists.txt @@ -9,6 +9,9 @@ target_link_libraries(${module_name} PRIVATE BerkeleyDB::BerkeleyDB) # Build also the util function found in utils/db_berkeley/ # This is needed to build the kamdb_recover utility -add_subdirectory(${CMAKE_SOURCE_DIR}/utils/db_berkeley - ${CMAKE_BINARY_DIR}/utils/db_berkeley) +add_subdirectory(${CMAKE_SOURCE_DIR}/utils/db_berkeley ${CMAKE_BINARY_DIR}/utils/db_berkeley) add_dependencies(${module_name} kamdb_recover) + +include(${CMAKE_SOURCE_DIR}/cmake/db_files.cmake) +add_kamctl_db_files(${group_name} kamctl.db_berkeley) +add_kamdbctl_db_files(${group_name} kamdbctl.db_berkeley) diff --git a/src/modules/db_mysql/CMakeLists.txt b/src/modules/db_mysql/CMakeLists.txt index 0efde1546..9f0a1aaf2 100644 --- a/src/modules/db_mysql/CMakeLists.txt +++ b/src/modules/db_mysql/CMakeLists.txt @@ -12,4 +12,6 @@ endif() target_include_directories(${module_name} PRIVATE ${MariaDBClient_INCLUDE_DIRS}) target_link_libraries(${module_name} PRIVATE ${MariaDBClient_LIBRARIES}) -# TODO Install script files for kamctl +include(${CMAKE_SOURCE_DIR}/cmake/db_files.cmake) +add_kamctl_db_files(${group_name} kamctl.mysql) +add_kamdbctl_db_files(${group_name} kamdbctl.mysql) diff --git a/src/modules/db_oracle/CMakeLists.txt b/src/modules/db_oracle/CMakeLists.txt index 66a4ab5eb..de707d347 100644 --- a/src/modules/db_oracle/CMakeLists.txt +++ b/src/modules/db_oracle/CMakeLists.txt @@ -8,3 +8,7 @@ find_package(Oracle REQUIRED) # /usr/include/oracle/18.3/client64) target_include_directories(${module_name} PRIVATE ${ORACLE_INCLUDE_DIR}) target_link_libraries(${module_name} PRIVATE ${ORACLE_LIBRARIES}) + +include(${CMAKE_SOURCE_DIR}/cmake/db_files.cmake) +add_kamctl_db_files(${group_name} kamctl.oracle) +add_kamdbctl_db_files(${group_name} kamdbctl.oracle kamdbfunc.oracle) diff --git a/src/modules/db_postgres/CMakeLists.txt b/src/modules/db_postgres/CMakeLists.txt index 0e2bc5e08..f93abbfc5 100644 --- a/src/modules/db_postgres/CMakeLists.txt +++ b/src/modules/db_postgres/CMakeLists.txt @@ -7,3 +7,7 @@ find_package(PostgreSQL REQUIRED) target_compile_definitions(${module_name} PRIVATE ${PostgreSQL_DEFINITIONS}) target_include_directories(${module_name} PRIVATE ${PostgreSQL_INCLUDE_DIRS}) target_link_libraries(${module_name} PRIVATE ${PostgreSQL_LIBRARIES}) + +include(${CMAKE_SOURCE_DIR}/cmake/db_files.cmake) +add_kamctl_db_files(${group_name} kamctl.pgsql) +add_kamdbctl_db_files(${group_name} kamdbctl.pgsql) diff --git a/src/modules/db_redis/CMakeLists.txt b/src/modules/db_redis/CMakeLists.txt index 0a1c48a53..031ba738b 100644 --- a/src/modules/db_redis/CMakeLists.txt +++ b/src/modules/db_redis/CMakeLists.txt @@ -3,9 +3,27 @@ file(GLOB MODULE_SOURCES "*.c") add_library(${module_name} SHARED ${MODULE_SOURCES}) find_package(PkgConfig REQUIRED) -pkg_check_modules(redis REQUIRED IMPORTED_TARGET hiredis) -add_library(redis::redis ALIAS PkgConfig::redis) +pkg_check_modules(hiredis REQUIRED IMPORTED_TARGET hiredis) +add_library(hiredis::hiredis ALIAS PkgConfig::hiredis) -# TODO: Check with Makefile for cluster stuff +target_link_libraries(${module_name} PRIVATE hiredis::hiredis) + +# Check for hiredis SSL support +pkg_check_modules(hiredis_ssl IMPORTED_TARGET hiredis_ssl) + +if(hiredis_ssl_FOUND) + find_package(OpenSSL REQUIRED) + # hiredis_ssl found via pkg-config + add_library(hiredis::hiredis_ssl ALIAS PkgConfig::hiredis_ssl) + target_compile_definitions(${module_name} PRIVATE WITH_SSL) + target_link_libraries(${module_name} PRIVATE hiredis::hiredis_ssl) + # https://github.com/redis/hiredis?tab=readme-ov-file#using-it + target_link_libraries(${module_name} PRIVATE OpenSSL::SSL OpenSSL::Crypto) +endif() -target_link_libraries(${module_name} PRIVATE redis::redis) +# TODO: Revise when this definition is needed +# ifeq (,$(findstring hiredis,$(HIREDISDEFS))) +# DEFS+=-DWITH_HIREDIS_PATH +# endif + +# TODO: Check with Makefile for cluster stuff diff --git a/src/modules/db_redis/redis_dbase.c b/src/modules/db_redis/redis_dbase.c index ac8b40756..b98f40120 100644 --- a/src/modules/db_redis/redis_dbase.c +++ b/src/modules/db_redis/redis_dbase.c @@ -1743,7 +1743,7 @@ static int db_redis_perform_query(const db1_con_t *_h, km_redis_con_t *con, max = 0; if(*keys_count == num_rows) - max = (*keys_count) % 1000; + max = (*keys_count == 1000) ? 1000 : *keys_count % 1000; else if(num_rows % 1000 == 0) max = 1000; diff --git a/src/modules/db_sqlite/CMakeLists.txt b/src/modules/db_sqlite/CMakeLists.txt index 186030431..106d79b3e 100644 --- a/src/modules/db_sqlite/CMakeLists.txt +++ b/src/modules/db_sqlite/CMakeLists.txt @@ -5,3 +5,7 @@ add_library(${module_name} SHARED ${MODULE_SOURCES}) find_package(SQLite3 REQUIRED) target_link_libraries(${module_name} PRIVATE SQLite::SQLite3) + +include(${CMAKE_SOURCE_DIR}/cmake/db_files.cmake) +add_kamctl_db_files(${group_name} kamctl.sqlite) +add_kamdbctl_db_files(${group_name} kamdbctl.sqlite) diff --git a/src/modules/db_text/CMakeLists.txt b/src/modules/db_text/CMakeLists.txt index 413075517..b0d035f93 100644 --- a/src/modules/db_text/CMakeLists.txt +++ b/src/modules/db_text/CMakeLists.txt @@ -2,3 +2,13 @@ file(GLOB MODULE_SOURCES "*.c") add_library(${module_name} SHARED ${MODULE_SOURCES}) target_compile_definitions(${module_name} PRIVATE DBT_EXTRA_DEBUG) + +include(${CMAKE_SOURCE_DIR}/cmake/db_files.cmake) + +add_kamctl_db_files(${group_name} kamctl.dbtext) +add_kamdbctl_db_files(${group_name} kamdbctl.dbtext) +install( + PROGRAMS ${CMAKE_SOURCE_DIR}/utils/kamctl/dbtextdb/dbtextdb.py + DESTINATION ${CMAKE_INSTALL_LIBDIR}/${MAIN_NAME}/kamctl/dbtextdb + COMPONENT kamailio-core +) diff --git a/src/modules/dialog/dialog.c b/src/modules/dialog/dialog.c index 4cdfe7ac6..9ccb07397 100644 --- a/src/modules/dialog/dialog.c +++ b/src/modules/dialog/dialog.c @@ -1064,6 +1064,28 @@ static int w_get_profile_size2(struct sip_msg *msg, char *profile, char *result) } +/*! + * \brief Update dialog sflags and trigger database persistence + * \param d dialog cell + * + * This function handles the database update logic for sflags changes. + * In REALTIME mode, it immediately triggers a database update. + * In DELAYED/SHUTDOWN modes, it sets flags that will be processed + * by the timer or shutdown handler. + */ +static void dlg_update_sflags_db(dlg_cell_t *d) +{ + d->dflags |= DLG_FLAG_CHANGED_SFLAGS; + if(dlg_db_mode == DB_MODE_REALTIME) { + d->dflags |= DLG_FLAG_CHANGED; + update_dialog_dbinfo(d); + } else if(dlg_db_mode == DB_MODE_DELAYED + || dlg_db_mode == DB_MODE_SHUTDOWN) { + /* Flag will be processed by timer or shutdown handler */ + d->dflags |= DLG_FLAG_CHANGED; + } +} + static int ki_dlg_setflag(struct sip_msg *msg, int val) { dlg_ctx_t *dctx; @@ -1078,6 +1100,7 @@ static int ki_dlg_setflag(struct sip_msg *msg, int val) d = dlg_get_by_iuid(&dctx->iuid); if(d != NULL) { d->sflags |= 1 << val; + dlg_update_sflags_db(d); dlg_release(d); } return 1; @@ -1110,6 +1133,7 @@ static int ki_dlg_resetflag(struct sip_msg *msg, int val) d = dlg_get_by_iuid(&dctx->iuid); if(d != NULL) { d->sflags &= ~(1 << val); + dlg_update_sflags_db(d); dlg_release(d); } return 1; diff --git a/src/modules/dialog/dlg_db_handler.c b/src/modules/dialog/dlg_db_handler.c index 18ecdcaa6..43e53ffc7 100644 --- a/src/modules/dialog/dlg_db_handler.c +++ b/src/modules/dialog/dlg_db_handler.c @@ -1009,8 +1009,39 @@ int update_dialog_dbinfo_unsafe(struct dlg_cell *cell) jdoc.free_fn(jdoc.buf.s); jdoc.buf.s = NULL; } - srjson_DestroyDoc(&jdoc); + /* Handle sflags updates separately after main dialog updates + * This ensures sflags changes are persisted to database when + * dlg_setflag() or dlg_resetflag() are called */ + if((cell->dflags & DLG_FLAG_CHANGED_SFLAGS) != 0) { + LM_DBG("updating sflags for dialog [%d:%d], sflags=%u\n", cell->h_entry, + cell->h_id, cell->sflags); + + if(use_dialog_table() != 0) { + goto error; + } + + VAL_TYPE(values) = VAL_TYPE(values + 1) = DB1_INT; + VAL_TYPE(values + 18) = DB1_INT; + + VAL_NULL(values) = VAL_NULL(values + 1) = VAL_NULL(values + 18) = 0; + VAL_INT(values) = cell->h_entry; + VAL_INT(values + 1) = cell->h_id; + VAL_INT(values + 18) = cell->sflags; + if((dialog_dbf.update(dialog_db_handle, (insert_keys), 0, (values), + (insert_keys + 18), (values + 18), 2, 1)) + != 0) { + LM_ERR("could not update sflags in database for dialog [%d:%d]\n", + cell->h_entry, cell->h_id); + goto error; + } + + LM_DBG("sflags successfully updated in database for dialog [%d:%d]\n", + cell->h_entry, cell->h_id); + cell->dflags &= ~(DLG_FLAG_CHANGED_SFLAGS); + } + + srjson_DestroyDoc(&jdoc); return 0; error: diff --git a/src/modules/dialog/dlg_hash.h b/src/modules/dialog/dlg_hash.h index 5d1984146..20b0371fc 100644 --- a/src/modules/dialog/dlg_hash.h +++ b/src/modules/dialog/dlg_hash.h @@ -73,6 +73,9 @@ #define DLG_FLAG_CHANGED_PROF (1 << 11) /*!< dialog-profiles changed - DMQ */ #define DLG_FLAG_DB_LOAD_EXTRA (1 << 12) /*!< dialog loaded extra from db */ +#define DLG_FLAG_CHANGED_SFLAGS \ + (1 << 13) /*!< sflags changed - needs db update */ + /* internal flags stored in db */ #define DLG_IFLAG_TIMEOUTBYE (1 << 0) /*!< send bye on time-out */ #define DLG_IFLAG_KA_SRC (1 << 1) /*!< send keep alive to src */ diff --git a/src/modules/dialog/dlg_req_within.c b/src/modules/dialog/dlg_req_within.c index 1e7c71c17..e1d4331f1 100644 --- a/src/modules/dialog/dlg_req_within.c +++ b/src/modules/dialog/dlg_req_within.c @@ -872,9 +872,7 @@ int dlg_bye_all(struct dlg_cell *dlg, str *hdrs) } ret = send_bye(dlg, DLG_CALLER_LEG, &all_hdrs, 0); - if(ret == 0) { - ret |= send_bye(dlg, DLG_CALLEE_LEG, &all_hdrs, 1); - } + ret |= send_bye(dlg, DLG_CALLEE_LEG, &all_hdrs, 1); pkg_free(all_hdrs.s); diff --git a/src/modules/dispatcher/README b/src/modules/dispatcher/README index d111d59b5..f9ee0f8d0 100644 --- a/src/modules/dispatcher/README +++ b/src/modules/dispatcher/README @@ -846,15 +846,14 @@ modparam("dispatcher", "ds_retain_latency_stats", 1) 3.28. ds_latency_estimator_alpha (int) - The value to be used to control the memory of the estimator EWMA - "exponential weighted moving average" or "the speed at which the older - samples are dampened" a good explanation can be found here : - http://www.itl.nist.gov/div898/handbook/pmc/section3/pmc324.htm Because - Kamailio doesn't support float parameter types, the value in the - parameter is divided by 1000 and stored as float. For example, if you - want to set the alpha to be 0.75, use value 750 here. + The parameter decides how important each latency ping observation is in + the calculation of the EWMA. The higher the value of alpha, the more + closely the EWMA tracks the original time series. Because Kamailio + doesn't support float parameter types, the value in the parameter is + divided by 1000 and stored as float. For example, if you want to set + the alpha to be 0.25, use value 250 here. - Default value is “900 => 0.9”. + Default value is “100 => 0.1”. Example 1.30. Set the “ds_latency_estimator_alpha” parameter ... @@ -1198,11 +1197,13 @@ modparam("dispatcher", "ds_interval_mode", 7200) lowered by 1 for every ms of estimated congestion, a 'rweight' value of 50 is recommended. See the example "configuring load balancing with congestion detection" below. - The congestion estimation is done using an EWMA (see - ds_latency_estimator_alpha). If all the gateways in a set are - above their congestion threshold(weight), the load - distribution is instead done using the ratio of estimated - congestion ms. + The congestion estimation is done using an Exponentially + Weighted Moving Average (EWMA). More information about the + algorithm can be found at + http://www.itl.nist.gov/div898/handbook/pmc/section3/pmc324.ht + m. If all the gateways in a set are above their congestion + threshold(weight), the load distribution is instead done using + the ratio of estimated congestion ms. See also the description of the 'rweight' attribute in the 'Special Attributes' section. + “12” - dispatch to all destinations in setid at once (parallel @@ -2302,7 +2303,7 @@ route[DISPATCH] { exit; } -# Try next destionations in failure route +# Try next destinations in failure route failure_route[RTF_DISPATCH] { if (t_is_canceled()) { exit; diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c index b7aeb5f31..8b6c161ea 100644 --- a/src/modules/dispatcher/dispatch.c +++ b/src/modules/dispatcher/dispatch.c @@ -3144,8 +3144,8 @@ static inline void latency_stats_update( latency_stats->estimate = latency_stats->average; } else { latency_stats->estimate = - latency_stats->estimate * ds_latency_estimator_alpha - + latency * (1 - ds_latency_estimator_alpha); + latency * ds_latency_estimator_alpha + + latency_stats->estimate * (1 - ds_latency_estimator_alpha); } } @@ -3332,7 +3332,7 @@ int ds_get_state(int group, str *address) } /** - * Update destionation's state + * Update destination's state */ int ds_update_state(sip_msg_t *msg, int group, str *address, int state, int mode, ds_rctx_t *rctx) diff --git a/src/modules/dispatcher/dispatch.h b/src/modules/dispatcher/dispatch.h index 22bf5fcba..b6489cdb7 100644 --- a/src/modules/dispatcher/dispatch.h +++ b/src/modules/dispatcher/dispatch.h @@ -277,7 +277,7 @@ typedef struct _ds_set { typedef struct _ds_select_state { int setid; /* dispatcher set id (group id) */ - int alg; /* algorithm to select destionations */ + int alg; /* algorithm to select destinations */ int umode; /* update mode - push to: r-uri, d-uri, xavp */ uint32_t limit; /* limit of destination addresses to be selected */ int cnt; /* output: number of xavps set with destination addresses */ diff --git a/src/modules/dispatcher/dispatcher.c b/src/modules/dispatcher/dispatcher.c index 6641e79bd..beda9bcd1 100644 --- a/src/modules/dispatcher/dispatcher.c +++ b/src/modules/dispatcher/dispatcher.c @@ -104,8 +104,8 @@ str ds_ping_from = str_init("sip:dispatcher@localhost"); static int ds_ping_interval = 0; int ds_ping_latency_stats = 0; int ds_retain_latency_stats = 0; -int ds_latency_estimator_alpha_i = 900; -float ds_latency_estimator_alpha = 0.9f; +int ds_latency_estimator_alpha_i = 100; +float ds_latency_estimator_alpha = 0.1f; int ds_probing_mode = DS_PROBE_NONE; static str ds_ping_reply_codes_str= STR_NULL; diff --git a/src/modules/dispatcher/doc/dispatcher.cfg b/src/modules/dispatcher/doc/dispatcher.cfg index 0d0e3ec30..6ad3e6988 100644 --- a/src/modules/dispatcher/doc/dispatcher.cfg +++ b/src/modules/dispatcher/doc/dispatcher.cfg @@ -275,7 +275,7 @@ route[DISPATCH] { exit; } -# Try next destionations in failure route +# Try next destinations in failure route failure_route[RTF_DISPATCH] { if (t_is_canceled()) { exit; diff --git a/src/modules/dispatcher/doc/dispatcher_admin.xml b/src/modules/dispatcher/doc/dispatcher_admin.xml index 589889cc7..d64d5d71d 100644 --- a/src/modules/dispatcher/doc/dispatcher_admin.xml +++ b/src/modules/dispatcher/doc/dispatcher_admin.xml @@ -791,15 +791,14 @@ modparam("dispatcher", "ds_retain_latency_stats", 1)
<varname>ds_latency_estimator_alpha</varname> (int) - The value to be used to control the memory of the estimator EWMA "exponential weighted moving average" or - "the speed at which the older samples are dampened" - a good explanation can be found here : http://www.itl.nist.gov/div898/handbook/pmc/section3/pmc324.htm + The parameter decides how important each latency ping observation is in the calculation of the EWMA. + The higher the value of alpha, the more closely the EWMA tracks the original time series. Because Kamailio doesn't support float parameter types, the value in the parameter is divided by 1000 and stored as float. - For example, if you want to set the alpha to be 0.75, use value 750 here. + For example, if you want to set the alpha to be 0.25, use value 250 here. - Default value is 900 => 0.9. + Default value is 100 => 0.1. @@ -1364,7 +1363,10 @@ modparam("dispatcher", "ds_interval_mode", 7200) congestion detection" below. - The congestion estimation is done using an EWMA (see ds_latency_estimator_alpha). + The congestion estimation is done using an Exponentially Weighted Moving Average (EWMA). + More information about the algorithm can be found at + + http://www.itl.nist.gov/div898/handbook/pmc/section3/pmc324.htm. If all the gateways in a set are above their congestion threshold(weight), the load distribution is instead done using the ratio of estimated congestion ms. diff --git a/src/modules/dmq/dmq_funcs.c b/src/modules/dmq/dmq_funcs.c index a5ba3b486..19caed3a1 100644 --- a/src/modules/dmq/dmq_funcs.c +++ b/src/modules/dmq/dmq_funcs.c @@ -236,14 +236,20 @@ int dmq_send_message(dmq_peer_t *peer, str *body, dmq_node_t *node, return -1; } /* add Max-Forwards and Content-Type headers */ - str_hdr.len = 34 + content_type->len + (CRLF_LEN * 2); + str_hdr.len = 40 + content_type->len + (CRLF_LEN * 2); str_hdr.s = pkg_malloc(str_hdr.len); if(str_hdr.s == NULL) { PKG_MEM_ERROR; return -1; } - len += sprintf(str_hdr.s, "Max-Forwards: %d" CRLF "Content-Type: %.*s" CRLF, - max_forwards, content_type->len, content_type->s); + len = snprintf(str_hdr.s, str_hdr.len, + "Max-Forwards: %d" CRLF "Content-Type: %.*s" CRLF, max_forwards, + content_type->len, content_type->s); + if(len < 0 || len >= str_hdr.len) { + LM_ERR("failed to create the headers\n"); + pkg_free(str_hdr.s); + return -1; + } str_hdr.len = len; cb_param = shm_malloc(sizeof(*cb_param)); diff --git a/src/modules/dmq/notification_peer.c b/src/modules/dmq/notification_peer.c index 0b8a41b3b..1fd234e5a 100644 --- a/src/modules/dmq/notification_peer.c +++ b/src/modules/dmq/notification_peer.c @@ -227,6 +227,7 @@ int get_dmq_host_list( for(prec = phead; prec; prec = prec->next) { /********** * o check max + * o skip non-A records (e.g., CNAME) * o create URI **********/ @@ -235,6 +236,11 @@ int get_dmq_host_list( free_rdata_list(phead); return host_cnt; } + /* Skip non-A records - get_record may return CNAME records + * when DNS search list expansion is used */ + if(prec->type != T_A) { + continue; + } len = ip4tosbuf( ((struct a_rdata *)prec->rdata)->ip, pIP, IP4_MAX_STR_SIZE); pIP[len] = '\0'; diff --git a/src/modules/dnssec/CMakeLists.txt b/src/modules/dnssec/CMakeLists.txt index 64f26f250..3177aff9a 100644 --- a/src/modules/dnssec/CMakeLists.txt +++ b/src/modules/dnssec/CMakeLists.txt @@ -2,10 +2,11 @@ file(GLOB MODULE_SOURCES "*.c") add_library(${module_name} SHARED ${MODULE_SOURCES}) -find_package(OpenSSL REQUIRED COMPONENTS SSL Crypto) +find_package(OpenSSL REQUIRED) find_package(Threads REQUIRED) # TODO: library libval not foud on recent distributions: whichi library is sres? # Consider depreciating this module? -target_link_libraries(${module_name} PRIVATE val-threads sres Threads::Threads - OpenSSL::SSL OpenSSL::Crypto) +target_link_libraries( + ${module_name} PRIVATE val-threads sres Threads::Threads OpenSSL::SSL OpenSSL::Crypto +) diff --git a/src/modules/gcrypt/CMakeLists.txt b/src/modules/gcrypt/CMakeLists.txt index 690e5cf57..914808acc 100644 --- a/src/modules/gcrypt/CMakeLists.txt +++ b/src/modules/gcrypt/CMakeLists.txt @@ -3,7 +3,38 @@ file(GLOB MODULE_SOURCES "*.c") add_library(${module_name} SHARED ${MODULE_SOURCES}) find_package(PkgConfig REQUIRED) -pkg_check_modules(gcrypt REQUIRED IMPORTED_TARGET libgcrypt) -add_library(gcrypt::gcrypt ALIAS PkgConfig::gcrypt) +pkg_check_modules(gcrypt IMPORTED_TARGET libgcrypt) + +# Fallback to libgcrypt-config if pkg-config fails (RHEL8-based systems) +if(NOT gcrypt_FOUND) + message(STATUS "Trying to find libgcrypt-config instead...") + find_program(LIBGCRYPT_CONFIG_EXECUTABLE NAMES libgcrypt-config) + if(NOT LIBGCRYPT_CONFIG_EXECUTABLE) + message(FATAL_ERROR "libgcrypt-config not found. Please install libgcrypt development package.") + endif() + message(STATUS "Trying to find libgcrypt-config... - Found: ${LIBGCRYPT_CONFIG_EXECUTABLE}") + execute_process( + COMMAND ${LIBGCRYPT_CONFIG_EXECUTABLE} --cflags + OUTPUT_VARIABLE LIBGCRYPT_CFLAGS + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + execute_process( + COMMAND ${LIBGCRYPT_CONFIG_EXECUTABLE} --libs + OUTPUT_VARIABLE LIBGCRYPT_LIBS + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + + # Create an interface library to hold the compile options and link libraries + # These will contain already the necessary -I and -L flags. + # Might need to remove for non-gcc compatible compilers + add_library(gcrypt_libs INTERFACE) + set_target_properties( + gcrypt_libs PROPERTIES INTERFACE_COMPILE_OPTIONS "${LIBGCRYPT_CFLAGS}" INTERFACE_LINK_LIBRARIES + "${LIBGCRYPT_LIBS}" + ) + add_library(gcrypt::gcrypt ALIAS gcrypt_libs) +else() + add_library(gcrypt::gcrypt ALIAS PkgConfig::gcrypt) +endif() target_link_libraries(${module_name} PRIVATE gcrypt::gcrypt) diff --git a/src/modules/ims_ipsec_pcscf/sec_agree.c b/src/modules/ims_ipsec_pcscf/sec_agree.c index 8a785c33d..4ad62a69d 100644 --- a/src/modules/ims_ipsec_pcscf/sec_agree.c +++ b/src/modules/ims_ipsec_pcscf/sec_agree.c @@ -115,6 +115,32 @@ static int process_sec_agree_param( return 0; } +/** + * @brief Check whether UE IPsec parameters have been selected/populated. + * + * Verifies that all required fields of the provided ipsec_t structure are + * present (non-zero for integer fields and non-zero length for length-bearing + * fields). This function is used to decide if the UE has provided IPsec + * parameters for use in the session. + * + * @param params Pointer to an ipsec_t structure to inspect. Must be non-NULL; + * passing NULL yields undefined behavior. + * + * @return 1 if all required parameters are present: + * 0 if any of the above checks fail. + */ +static int is_ue_ipsec_params_selected(ipsec_t *params) +{ + if(params->spi_uc == 0 || params->spi_us == 0 || params->port_uc == 0 + || params->port_us == 0 || params->prot.len == 0 + || params->mod.len == 0 || params->r_alg.len == 0 + || params->r_ealg.len == 0) { + return 0; + } + + return 1; +} + static security_t *parse_sec_agree(struct hdr_field *h) { int i = 0; @@ -195,13 +221,31 @@ static security_t *parse_sec_agree(struct hdr_field *h) i = 0; if(name.len && value.len) { - if(strncasecmp(name.s, "alg", name.len) == 0) { - if(preferred_alg_found && preferred_ealg_found) { + if(ipsec_preferred_alg.len && ipsec_preferred_ealg.len) { + if(preferred_alg_found && preferred_ealg_found + && is_ue_ipsec_params_selected( + params->data.ipsec)) { break; } preferred_alg_found = 0; preferred_ealg_found = 0; } + if(ipsec_preferred_alg.len && !ipsec_preferred_ealg.len) { + if(preferred_alg_found + && is_ue_ipsec_params_selected( + params->data.ipsec)) { + break; + } + preferred_alg_found = 0; + } + if(!ipsec_preferred_alg.len && ipsec_preferred_ealg.len) { + if(preferred_ealg_found + && is_ue_ipsec_params_selected( + params->data.ipsec)) { + break; + } + preferred_ealg_found = 0; + } char alg_found = 0; char ealg_found = 0; diff --git a/src/modules/ims_qos_npn/rx_aar.c b/src/modules/ims_qos_npn/rx_aar.c index 7d7aae7ca..3d3bea48d 100644 --- a/src/modules/ims_qos_npn/rx_aar.c +++ b/src/modules/ims_qos_npn/rx_aar.c @@ -555,15 +555,15 @@ int add_media_components_using_current_flow_description( int add_media_components(AAAMessage *aar, struct sip_msg *req, struct sip_msg *rpl, enum dialog_direction direction, AAASession *auth) { - int sdp_session_num; - int sdp_stream_num; - sdp_session_cell_t *req_sdp_session, *rpl_sdp_session; - sdp_stream_cell_t *req_sdp_stream, *rpl_sdp_stream; + int sdp_session_num = 0; + int sdp_stream_num = 0; + sdp_session_cell_t *req_sdp_session = NULL, *rpl_sdp_session = NULL; + sdp_stream_cell_t *req_sdp_stream = NULL, *rpl_sdp_stream = NULL; int add_flow = 1; str ttag = {0, 0}; str ftag = {0, 0}; int request_originated_from_callee = 0; - str ipA, ipB, portA, portB; + str ipA = {0, 0}, ipB = {0, 0}, portA = {0, 0}, portB = {0, 0}; int intportB = 0, intportA = 0; rx_authsessiondata_t *p_session_data = 0; diff --git a/src/modules/ims_registrar_scscf/registrar_notify.c b/src/modules/ims_registrar_scscf/registrar_notify.c index 25425af7a..63bd3ea59 100644 --- a/src/modules/ims_registrar_scscf/registrar_notify.c +++ b/src/modules/ims_registrar_scscf/registrar_notify.c @@ -1521,6 +1521,13 @@ int aor_to_contact(str *aor, str *contact) contact->len = p - contact->s; } + // remove default port 5060 + if((p = memchr(contact->s, ':', contact->len))) { + if(contact->len - (p - contact->s) == 5 && !memcmp(p, ":5060", 5)) { + contact->len -= 5; + } + } + return ret; } diff --git a/src/modules/ims_usrloc_scscf/contact_dlg_handlers.c b/src/modules/ims_usrloc_scscf/contact_dlg_handlers.c index c872fbef4..0e7dd8717 100644 --- a/src/modules/ims_usrloc_scscf/contact_dlg_handlers.c +++ b/src/modules/ims_usrloc_scscf/contact_dlg_handlers.c @@ -44,6 +44,34 @@ void contact_dlg_create_handler( LM_DBG("Successfully registered contact dialog handler\n"); } + +/** removes the default port ':5060' from the string in order compare later + * returns: + * 0 => found + * 1 => not found + * < 0 => error + */ +static int filter_default_port(str *src, str *dst) +{ + str default_port = str_init(":5060"); + char *port; + + if((port = str_search(src, &default_port))) { + dst->len = port - src->s; + memcpy(dst->s, src->s, dst->len); + memcpy(dst->s + dst->len, port + 5, src->len - dst->len - 5); + dst->len = src->len - 5; + return 0; + } + if(dst->len < src->len) { + LM_BUG("dst len < src len\n"); + return -1; + } + dst->len = src->len; + memcpy(dst->s, src->s, src->len); + return 1; +} + /** * Search for a contact related to an IMPU based on an original contact string (uri) * @param impu impurecord we will search through @@ -58,24 +86,29 @@ static inline int find_contact_from_impu( char *s_term; char *c_term; char *alias_term; - + char sbuf[512], cbuf[512]; + str str_aor = {sbuf, 512}, str_c = {cbuf, 512}; if(!search_aor) return 1; - LM_DBG("Looking for contact [%.*s] for IMPU [%.*s]\n", search_aor->len, - search_aor->s, impu->public_identity.len, impu->public_identity.s); + if(filter_default_port(search_aor, &str_aor) < 0) { + return 1; + } + + LM_DBG("Looking for contact [%.*s] for IMPU [%.*s]\n", STR_FMT(&str_aor), + STR_FMT(&impu->public_identity)); /* Filter out sip: and anything before @ from search URI */ - s_term = strstr(search_aor->s, "@"); + s_term = strstr(str_aor.s, "@"); if(!s_term) { - s_term = strstr(search_aor->s, ":"); + s_term = strstr(str_aor.s, ":"); } s_term += 1; - if(s_term - search_aor->s >= search_aor->len) { + if(s_term - str_aor.s >= str_aor.len) { goto error; } - i_searchlen = search_aor->len - (s_term - search_aor->s); + i_searchlen = str_aor.len - (s_term - str_aor.s); /* Compare the entire contact including alias, if not until alias IP */ alias_term = strstr(s_term, "~"); @@ -90,28 +123,37 @@ static inline int find_contact_from_impu( while(impucontact) { if(impucontact->contact) { + // clean up previous contact + str_c.len = 512; + memset(str_c.s, 0, 512); - c_term = strstr(impucontact->contact->c.s, "@"); + if(filter_default_port(&impucontact->contact->c, &str_c) < 0) { + LM_DBG("Skipping %.*s\n", STR_FMT(&impucontact->contact->c)); + impucontact = impucontact->next; + continue; + } + c_term = strstr(str_c.s, "@"); if(!c_term) { - c_term = strstr(impucontact->contact->c.s, ":"); + c_term = strstr(str_c.s, ":"); } c_term += 1; - c_searchlen = impucontact->contact->c.len - - (c_term - impucontact->contact->c.s); - + c_searchlen = str_c.len - (c_term - str_c.s); LM_DBG("Comparing [%.*s] and [%.*s]\n", i_searchlen, s_term, c_searchlen, c_term); - LM_DBG("Comparing [%.*s] and [%.*s]\n", alias_searchlen, s_term, - c_searchlen, c_term); - if((strncmp(c_term, s_term, i_searchlen) == 0) - || (strncmp(c_term, s_term, alias_searchlen) == 0)) { + if(strncmp(c_term, s_term, i_searchlen) == 0) { *scontact = impucontact->contact; return 0; } + if(alias_term) { + LM_DBG("Comparing [%.*s] and [%.*s]\n", alias_searchlen, s_term, + c_searchlen, c_term); + if(strncmp(c_term, s_term, alias_searchlen) == 0) { + *scontact = impucontact->contact; + return 0; + } + } + LM_DBG("Skipping %.*s\n", STR_FMT(&impucontact->contact->c)); } - if(impucontact->contact) - LM_DBG("Skipping %.*s\n", impucontact->contact->c.len, - impucontact->contact->c.s); impucontact = impucontact->next; } error: diff --git a/src/modules/ims_usrloc_scscf/impurecord.c b/src/modules/ims_usrloc_scscf/impurecord.c index f3ddaba3a..b0ef84395 100644 --- a/src/modules/ims_usrloc_scscf/impurecord.c +++ b/src/modules/ims_usrloc_scscf/impurecord.c @@ -712,6 +712,13 @@ int aor_to_contact(str *aor, str *contact) contact->len = p - contact->s; } + // remove default port 5060 + if((p = memchr(contact->s, ':', contact->len))) { + if(contact->len - (p - contact->s) == 5 && !memcmp(p, ":5060", 5)) { + contact->len -= 5; + } + } + return ret; } diff --git a/src/modules/json/json_mod.c b/src/modules/json/json_mod.c index d267e5029..46d5851db 100644 --- a/src/modules/json/json_mod.c +++ b/src/modules/json/json_mod.c @@ -41,7 +41,9 @@ char tr_json_escape_char = '%'; /* clang-format off */ /* Exported functions */ static tr_export_t mod_trans[] = { - {{"json", sizeof("json") - 1}, json_tr_parse}, {{0, 0}, 0}}; + {{"json", sizeof("json") - 1}, json_tr_parse}, + {{0, 0}, 0} +}; static cmd_export_t cmds[] = { {"json_get_field", (cmd_function)json_get_field, 3, fixup_get_field, @@ -49,10 +51,13 @@ static cmd_export_t cmds[] = { {"json_get_string", (cmd_function)json_get_string, 3, fixup_get_field, fixup_get_field_free, ANY_ROUTE}, {"bind_json", (cmd_function)bind_json, 0, 0, 0, ANY_ROUTE}, - {0, 0, 0, 0, 0, 0}}; + {0, 0, 0, 0, 0, 0} +}; static param_export_t params[] = { - {"json_escape_char", PARAM_STR, &tr_json_escape_str}, {0, 0, 0}}; + {"json_escape_char", PARAM_STR, &tr_json_escape_str}, + {0, 0, 0} +}; struct module_exports exports = { "json", /* module name */ diff --git a/src/modules/json/json_trans.c b/src/modules/json/json_trans.c index ea570cb0c..356636f18 100644 --- a/src/modules/json/json_trans.c +++ b/src/modules/json/json_trans.c @@ -226,7 +226,6 @@ int json_tr_eval( pv_value_t *pv; pv_value_t v; str v2 = {0, 0}; - void *v1 = NULL; if(val == NULL || (val->flags & PV_VAL_NULL)) return -1; @@ -260,7 +259,6 @@ int json_tr_eval( val->rs.len = pv->rs.len; json_destroy_pv_value(pv); - json_free_pv_value(val); break; case TR_JSON_PARSE: @@ -272,40 +270,32 @@ int json_tr_eval( return -1; } - pv = json_alloc_pv_value(); - if(pv == NULL) { - LM_ERR("JSON encode transform : no more private memory\n"); - return -1; - } - - if(tp->type == TR_PARAM_STRING) { - v1 = tp->v.s.s; - if(fixup_spve_null(&v1, 1) != 0) { - LM_ERR("cannot get spve_value from TR_PARAM_STRING : " - "%.*s\n", - tp->v.s.len, tp->v.s.s); - pkg_free(pv); - return -1; - } - if(fixup_get_svalue(msg, (gparam_p)v1, &v2) != 0) { - LM_ERR("cannot get value from TR_PARAM_STRING\n"); - fixup_free_spve_null(&v1, 1); - pkg_free(pv); - return -1; + if(str_search_char(&tp->v.s, '$') == NULL) { + v2 = tp->v.s; + } else { + if(pv_eval_str(msg, &v2, &tp->v.s) < 0) { + LM_ERR("cannot get the value from TR_PARAM_STRING : " + "%.*s\n", + tp->v.s.len, tp->v.s.s); + return -1; + } } - fixup_free_spve_null(&v1, 1); sv = v2; } else { if(pv_get_spec_value(msg, (pv_spec_p)tp->v.data, &v) != 0 || (!(v.flags & PV_VAL_STR)) || v.rs.len <= 0) { LM_ERR("value cannot get spec value in json transform\n"); - json_destroy_pv_value(pv); return -1; } sv = v.rs; } + pv = json_alloc_pv_value(); + if(pv == NULL) { + LM_ERR("JSON parse transform : no more private memory\n"); + return -1; + } if(tr_json_get_field_ex(&val->rs, &sv, pv) != 1) { LM_ERR("error getting json\n"); @@ -322,7 +312,6 @@ int json_tr_eval( val->rs.len = pv->rs.len; json_destroy_pv_value(pv); - json_free_pv_value(val); break; diff --git a/src/modules/kazoo/CMakeLists.txt b/src/modules/kazoo/CMakeLists.txt index 3a45806b8..d05ff7546 100644 --- a/src/modules/kazoo/CMakeLists.txt +++ b/src/modules/kazoo/CMakeLists.txt @@ -18,7 +18,8 @@ pkg_check_modules(json-c REQUIRED IMPORTED_TARGET json-c) add_library(json-c::json-c ALIAS PkgConfig::json-c) # endif() -find_package(rabbitmq-c 0.13) +# rabbitmq provides cmake support for versions 0.13 and above. +find_package(rabbitmq-c QUIET) if(NOT rabbitmq-c_FOUND) message(STATUS "rabbitmq-c not found. looking with pkg-config") find_package(PkgConfig REQUIRED) @@ -26,9 +27,7 @@ if(NOT rabbitmq-c_FOUND) add_library(rabbitmq::rabbitmq ALIAS PkgConfig::rabbitmq-c) endif() -find_package(PkgConfig REQUIRED) pkg_check_modules(UUID REQUIRED IMPORTED_TARGET uuid) add_library(uuid::uuid ALIAS PkgConfig::UUID) -target_link_libraries(${module_name} PRIVATE json-c::json-c rabbitmq::rabbitmq - uuid::uuid) +target_link_libraries(${module_name} PRIVATE json-c::json-c rabbitmq::rabbitmq uuid::uuid) diff --git a/src/modules/lrkproxy/lrkproxy.c b/src/modules/lrkproxy/lrkproxy.c index ef6a34710..939b8c6a3 100644 --- a/src/modules/lrkproxy/lrkproxy.c +++ b/src/modules/lrkproxy/lrkproxy.c @@ -1367,7 +1367,7 @@ retry: /* Try to enable if it's time to try. */ node->ln_enable = lrkp_test(node); if(node->ln_enable) //get lrk proxy config if it is enable. - // lrkp_get_config(node); + // lrkp_get_config(node); lrkp_keep_alive(node); } @@ -1406,7 +1406,7 @@ retry: /* Try to enable if it's time to try. */ node->ln_enable = lrkp_test(node); if(node->ln_enable) //get lrk proxy config if it is enable. - // lrkp_get_config(node); + // lrkp_get_config(node); lrkp_keep_alive(node); } @@ -1556,21 +1556,21 @@ static int change_media_sdp(sip_msg_t *msg, struct lrkproxy_hash_entry *e, // snprintf(sdp_new_o, 128, "o=lrkproxy %s %s IN IP4 %s\r", SUP_CPROTOVER, REQ_CPROTOVER, ip_selected); snprintf(sdp_new_o, 128, "o=lrkproxy %ld %ld IN IP4 %s\r", seconds, seconds, ip_selected); - strncat(newbody.s, sdp_new_o, strlen(sdp_new_o)); + strcat(newbody.s, sdp_new_o); off += len + 1; continue; } if((int)(start_sdp_s - off) == 0) { memset(sdp_new_s, 0, 128); snprintf(sdp_new_s, 128, "s=lrkproxy Support only Audio Call\r"); - strncat(newbody.s, sdp_new_s, strlen(sdp_new_s)); + strcat(newbody.s, sdp_new_s); off += len + 1; continue; } if((int)(start_sdp_c - off) == 0) { memset(sdp_new_c, 0, 128); snprintf(sdp_new_c, 128, "c=IN IP4 %s\r", ip_selected); - strncat(newbody.s, sdp_new_c, strlen(sdp_new_c)); + strcat(newbody.s, sdp_new_c); off += len + 1; continue; } @@ -1594,7 +1594,7 @@ static int change_media_sdp(sip_msg_t *msg, struct lrkproxy_hash_entry *e, (int)(len - (avp_flags - off)), avp_flags); // snprintf(sdp_new_m, 128, "m=audio %d %.*s\r",e->node->lrkp_n_c->current_port, (int)(len - (avp_flags-off)), avp_flags); // printf("%.*s\n\n", len - (avp_flags-off), avp_flags); - strncat(newbody.s, sdp_new_m, strlen(sdp_new_m)); + strcat(newbody.s, sdp_new_m); off += len + 1; continue; } diff --git a/src/modules/ndb_redis/CMakeLists.txt b/src/modules/ndb_redis/CMakeLists.txt index c4ca770ac..77e4932eb 100644 --- a/src/modules/ndb_redis/CMakeLists.txt +++ b/src/modules/ndb_redis/CMakeLists.txt @@ -3,7 +3,25 @@ file(GLOB MODULE_SOURCES "*.c") add_library(${module_name} SHARED ${MODULE_SOURCES}) find_package(PkgConfig REQUIRED) -pkg_check_modules(redis REQUIRED IMPORTED_TARGET hiredis) -add_library(redis::redis ALIAS PkgConfig::redis) +pkg_check_modules(hiredis REQUIRED IMPORTED_TARGET hiredis) +add_library(hiredis::hiredis ALIAS PkgConfig::hiredis) -target_link_libraries(${module_name} PRIVATE redis::redis) +target_link_libraries(${module_name} PRIVATE hiredis::hiredis) + +# Check for hiredis SSL support +pkg_check_modules(hiredis_ssl IMPORTED_TARGET hiredis_ssl) + +if(hiredis_ssl_FOUND) + find_package(OpenSSL REQUIRED) + # hiredis_ssl found via pkg-config + add_library(hiredis_ssl::hiredis_ssl ALIAS PkgConfig::hiredis_ssl) + target_compile_definitions(${module_name} PRIVATE WITH_SSL) + target_link_libraries(${module_name} PRIVATE hiredis_ssl::hiredis_ssl) + # https://github.com/redis/hiredis?tab=readme-ov-file#using-it + target_link_libraries(${module_name} PRIVATE OpenSSL::SSL OpenSSL::Crypto) +endif() + +# TODO: Revise when this definition is needed +# ifeq (,$(findstring hiredis,$(HIREDISDEFS))) +# DEFS+=-DWITH_HIREDIS_PATH +# endif diff --git a/src/modules/nghttp2/CMakeLists.txt b/src/modules/nghttp2/CMakeLists.txt index 686e57efd..3def490e8 100644 --- a/src/modules/nghttp2/CMakeLists.txt +++ b/src/modules/nghttp2/CMakeLists.txt @@ -11,5 +11,6 @@ add_library(nghttp2::nghttp2 ALIAS PkgConfig::nghttp2) pkg_check_modules(event REQUIRED IMPORTED_TARGET libevent libevent_openssl) add_library(event::event ALIAS PkgConfig::event) -target_link_libraries(${module_name} PRIVATE nghttp2::nghttp2 event::event - OpenSSL::SSL OpenSSL::Crypto) +target_link_libraries( + ${module_name} PRIVATE nghttp2::nghttp2 event::event OpenSSL::SSL OpenSSL::Crypto +) diff --git a/src/modules/nsq/CMakeLists.txt b/src/modules/nsq/CMakeLists.txt index e6acfa9a2..40b0a48d9 100644 --- a/src/modules/nsq/CMakeLists.txt +++ b/src/modules/nsq/CMakeLists.txt @@ -24,5 +24,6 @@ find_package(CURL REQUIRED) # maintaned anymore - eprecate? -lnsq -levbuffsock # TODO: verify if -l is required to avoid linking to itself -target_link_libraries(${module_name} PRIVATE json-c::json-c CURL::libcurl - Libev::Libev -lnsq evbuffsock) +target_link_libraries( + ${module_name} PRIVATE json-c::json-c CURL::libcurl Libev::Libev -lnsq evbuffsock +) diff --git a/src/modules/phonenum/CMakeLists.txt b/src/modules/phonenum/CMakeLists.txt index 1003c5115..ef82b9dfe 100644 --- a/src/modules/phonenum/CMakeLists.txt +++ b/src/modules/phonenum/CMakeLists.txt @@ -18,12 +18,10 @@ else() if(libphonenumber_LIBRARY AND libgeocoding_LIBRARY) set(libphonenum_LIBRARY ${libphonenumber_LIBRARY} ${libgeocoding_LIBRARY}) - find_path(libphonenumber_INCLUDE_DIR - phonenumbers/geocoding/phonenumber_offline_geocoder.h - phonenumbers/phonenumberutil.h) - message( - STATUS - "Found libphonenumber include directory: ${libphonenumber_INCLUDE_DIR}") + find_path(libphonenumber_INCLUDE_DIR phonenumbers/geocoding/phonenumber_offline_geocoder.h + phonenumbers/phonenumberutil.h + ) + message(STATUS "Found libphonenumber include directory: ${libphonenumber_INCLUDE_DIR}") message(STATUS "Found libphonenumber library: ${libphonenum_LIBRARY}") else() message(FATAL_ERROR "libphonenumber library not found") @@ -41,8 +39,8 @@ target_compile_options( $<$>:-Wno-deprecated> $<$>:-Wno-unused-function> $<$>:-Wno-sign-compare> - $<$>:-Wno-strict-aliasing>) + $<$>:-Wno-strict-aliasing> +) -target_include_directories(${module_name} - PRIVATE ${libphonenumber_INCLUDE_DIRS}) +target_include_directories(${module_name} PRIVATE ${libphonenumber_INCLUDE_DIRS}) target_link_libraries(${module_name} PRIVATE ${libphonenum_LIBRARY}) diff --git a/src/modules/rabbitmq/CMakeLists.txt b/src/modules/rabbitmq/CMakeLists.txt index 9ad3b4c81..e9bcef86b 100644 --- a/src/modules/rabbitmq/CMakeLists.txt +++ b/src/modules/rabbitmq/CMakeLists.txt @@ -2,7 +2,8 @@ file(GLOB MODULE_SOURCES "*.c") add_library(${module_name} SHARED ${MODULE_SOURCES}) -find_package(rabbitmq-c 0.13 QUIET) +# rabbitmq provides cmake support for versions 0.13 and above. +find_package(rabbitmq-c QUIET) if(NOT rabbitmq-c_FOUND) message(STATUS "rabbitmq-c not found. looking with pkg-config") find_package(PkgConfig REQUIRED) diff --git a/src/modules/rr/rr_mod.c b/src/modules/rr/rr_mod.c index 5d4423b24..dbdebdd00 100644 --- a/src/modules/rr/rr_mod.c +++ b/src/modules/rr/rr_mod.c @@ -583,19 +583,19 @@ static int pv_get_route_uri_f( /* Parse the message until the First-Route-Header: */ if(parse_headers(msg, HDR_ROUTE_F, 0) == -1) { LM_ERR("while parsing message\n"); - return -1; + return pv_get_null(msg, param, res); } if(!msg->route) { LM_INFO("No route header present.\n"); - return -1; + return pv_get_null(msg, param, res); } hdr = msg->route; /* Parse the contents of the header: */ if(parse_rr(hdr) == -1) { LM_ERR("Error while parsing Route header\n"); - return -1; + return pv_get_null(msg, param, res); } diff --git a/src/modules/rtp_media_server/CMakeLists.txt b/src/modules/rtp_media_server/CMakeLists.txt index 59a1d868d..151148919 100644 --- a/src/modules/rtp_media_server/CMakeLists.txt +++ b/src/modules/rtp_media_server/CMakeLists.txt @@ -2,18 +2,15 @@ file(GLOB MODULE_SOURCES "*.c") add_library(${module_name} SHARED ${MODULE_SOURCES}) -find_package(ortp QUIET) -if(NOT ortp_FOUND) - find_package(PkgConfig REQUIRED) - pkg_check_modules(ortp REQUIRED IMPORTED_TARGET ortp) - add_library(ortp ALIAS PkgConfig::ortp) -endif() +find_package(PkgConfig REQUIRED) -find_package(mediastreamer2 QUIET) -if(NOT mediastreamer2_FOUND) - find_package(PkgConfig REQUIRED) - pkg_check_modules(mediastreamer2 REQUIRED IMPORTED_TARGET mediastreamer) - add_library(mediastreamer2 ALIAS PkgConfig::mediastreamer2) -endif() +# ortp and mediastreamer2 do have cmake support on newer version but +# is not up to standard and complicates things. +# So we use pkg-config to find them. +pkg_check_modules(ortp REQUIRED IMPORTED_TARGET ortp) +add_library(ortp ALIAS PkgConfig::ortp) + +pkg_check_modules(mediastreamer2 REQUIRED IMPORTED_TARGET mediastreamer) +add_library(mediastreamer2 ALIAS PkgConfig::mediastreamer2) target_link_libraries(${module_name} PRIVATE ortp mediastreamer2) diff --git a/src/modules/rtpengine/README b/src/modules/rtpengine/README index 8145d99bb..99c613cd7 100644 --- a/src/modules/rtpengine/README +++ b/src/modules/rtpengine/README @@ -48,143 +48,144 @@ Joey Golan 1. Admin Guide 1. Overview - 2. Usage With Multiple RTPEngine Instances - 3. Dependencies - - 3.1. Kamailio Modules - 3.2. External Libraries or Applications - - 4. Parameters - - 4.1. rtpengine_sock (string) - 4.2. rtpengine_disable_tout (integer) - 4.3. aggressive_redetection (integer) - 4.4. rtpengine_tout_ms (integer) - 4.5. rtpengine_allow_op (integer) - 4.6. queried_nodes_limit (integer) - 4.7. rtpengine_retr (integer) - 4.8. extra_id_pv (string) - 4.9. setid_avp (string) - 4.10. force_send_interface (string) - 4.11. read_sdp_pv (string) - 4.12. write_sdp_pv (string) - 4.13. write_sdp_pv_mode (int) - 4.14. rtp_inst_pvar (string) - 4.15. hash_table_size (integer) - 4.16. hash_table_tout (integer) - 4.17. db_url (string) - 4.18. table_name (string) - 4.19. setid_col (string) - 4.20. url_col (string) - 4.21. weight_col (string) - 4.22. disabled_col (string) - 4.23. setid_default (integer) - 4.24. media_duration (string) - 4.25. mos_min_pv (string) - 4.26. mos_min_at_pv (string) - 4.27. mos_min_packetloss_pv (string) - 4.28. mos_min_jitter_pv (string) - 4.29. mos_min_roundtrip_pv (string) - 4.30. mos_max_pv (string) - 4.31. mos_max_at_pv (string) - 4.32. mos_max_packetloss_pv (string) - 4.33. mos_max_jitter_pv (string) - 4.34. mos_max_roundtrip_pv (string) - 4.35. mos_average_pv (string) - 4.36. mos_average_packetloss_pv (string) - 4.37. mos_average_jitter_pv (string) - 4.38. mos_average_roundtrip_pv (string) - 4.39. mos_average_samples_pv (string) - 4.40. mos_A_label_pv (string) - 4.41. mos_min_A_pv (string) - 4.42. mos_min_at_A_pv (string) - 4.43. mos_min_packetloss_A_pv (string) - 4.44. mos_min_jitter_A_pv (string) - 4.45. mos_min_roundtrip_A_pv (string) - 4.46. mos_min_roundtrip_leg_A_pv (string) - 4.47. mos_max_A_pv (string) - 4.48. mos_max_at_A_pv (string) - 4.49. mos_max_packetloss_A_pv (string) - 4.50. mos_max_jitter_A_pv (string) - 4.51. mos_max_roundtrip_A_pv (string) - 4.52. mos_max_roundtrip_leg_A_pv (string) - 4.53. mos_average_A_pv (string) - 4.54. mos_average_packetloss_A_pv (string) - 4.55. mos_average_jitter_A_pv (string) - 4.56. mos_average_roundtrip_A_pv (string) - 4.57. mos_average_roundtrip_leg_A_pv (string) - 4.58. mos_average_samples_A_pv (string) - 4.59. mos_B_label_pv (string) - 4.60. mos_min_B_pv (string) - 4.61. mos_min_at_B_pv (string) - 4.62. mos_min_packetloss_B_pv (string) - 4.63. mos_min_jitter_B_pv (string) - 4.64. mos_min_roundtrip_B_pv (string) - 4.65. mos_min_roundtrip_leg_B_pv (string) - 4.66. mos_max_B_pv (string) - 4.67. mos_max_at_B_pv (string) - 4.68. mos_max_packetloss_B_pv (string) - 4.69. mos_max_jitter_B_pv (string) - 4.70. mos_max_roundtrip_B_pv (string) - 4.71. mos_max_roundtrip_leg_B_pv (string) - 4.72. mos_average_B_pv (string) - 4.73. mos_average_packetloss_B_pv (string) - 4.74. mos_average_jitter_B_pv (string) - 4.75. mos_average_roundtrip_B_pv (string) - 4.76. mos_average_roundtrip_leg_B_pv (string) - 4.77. mos_average_samples_B_pv (string) - 4.78. dtmf_event_callid (string) - 4.79. dtmf_event_source_tag (string) - 4.80. dtmf_event_timestamp (string) - 4.81. dtmf_event (string) - 4.82. control_cmd_tos (integer) - 4.83. hash_algo (integer) - 4.84. wsapi (string) - 4.85. dtmf_events_sock (string) - 4.86. ping_mode (integer) - - 5. ping_interval (integer) - 6. Functions - - 6.1. set_rtpengine_set(setid[, setid]) - 6.2. rtpengine_offer([flags][,via-branch]) - 6.3. rtpengine_answer([flags][,via-branch]) - 6.4. rtpengine_info([flags][,via-branch]) - 6.5. rtpengine_delete([flags][,via-branch]) - 6.6. rtpengine_destroy([flags][,via-branch]) - 6.7. rtpengine_query([flags][,via-branch]) - 6.8. rtpengine_query_v(fmt, var) - 6.9. rtpengine_manage([flags][,via-branch]) - 6.10. start_recording([flags]) - 6.11. stop_recording([flags]) - 6.12. block_dtmf([flags]) - 6.13. unblock_dtmf([flags]) - 6.14. block_media([flags]) - 6.15. unblock_media([flags]) - 6.16. silence_media([flags]) - 6.17. unsilence_media([flags]) - 6.18. start_forwarding([flags]) - 6.19. stop_forwarding([flags]) - 6.20. play_media([flags]) - 6.21. stop_media([flags]) - 6.22. play_dtmf([flags]) - - 7. Exported Pseudo Variables - - 7.1. $rtpestat - 7.2. $rtpstat - - 8. RPC Commands - - 8.1. rtpengine.reload - 8.2. rtpengine.enable proxy_url/all 0/1 - 8.3. rtpengine.show proxy_url/all - 8.4. rtpengine.ping proxy_url/all - 8.5. rtpengine.get_hash_total - - 9. Event routes - - 9.1. rtpengine:dtmf-event + 2. Recommended Version + 3. Usage With Multiple RTPEngine Instances + 4. Dependencies + + 4.1. Kamailio Modules + 4.2. External Libraries or Applications + + 5. Parameters + + 5.1. rtpengine_sock (string) + 5.2. rtpengine_disable_tout (integer) + 5.3. aggressive_redetection (integer) + 5.4. rtpengine_tout_ms (integer) + 5.5. rtpengine_allow_op (integer) + 5.6. queried_nodes_limit (integer) + 5.7. rtpengine_retr (integer) + 5.8. extra_id_pv (string) + 5.9. setid_avp (string) + 5.10. force_send_interface (string) + 5.11. read_sdp_pv (string) + 5.12. write_sdp_pv (string) + 5.13. write_sdp_pv_mode (int) + 5.14. rtp_inst_pvar (string) + 5.15. hash_table_size (integer) + 5.16. hash_table_tout (integer) + 5.17. db_url (string) + 5.18. table_name (string) + 5.19. setid_col (string) + 5.20. url_col (string) + 5.21. weight_col (string) + 5.22. disabled_col (string) + 5.23. setid_default (integer) + 5.24. media_duration (string) + 5.25. mos_min_pv (string) + 5.26. mos_min_at_pv (string) + 5.27. mos_min_packetloss_pv (string) + 5.28. mos_min_jitter_pv (string) + 5.29. mos_min_roundtrip_pv (string) + 5.30. mos_max_pv (string) + 5.31. mos_max_at_pv (string) + 5.32. mos_max_packetloss_pv (string) + 5.33. mos_max_jitter_pv (string) + 5.34. mos_max_roundtrip_pv (string) + 5.35. mos_average_pv (string) + 5.36. mos_average_packetloss_pv (string) + 5.37. mos_average_jitter_pv (string) + 5.38. mos_average_roundtrip_pv (string) + 5.39. mos_average_samples_pv (string) + 5.40. mos_A_label_pv (string) + 5.41. mos_min_A_pv (string) + 5.42. mos_min_at_A_pv (string) + 5.43. mos_min_packetloss_A_pv (string) + 5.44. mos_min_jitter_A_pv (string) + 5.45. mos_min_roundtrip_A_pv (string) + 5.46. mos_min_roundtrip_leg_A_pv (string) + 5.47. mos_max_A_pv (string) + 5.48. mos_max_at_A_pv (string) + 5.49. mos_max_packetloss_A_pv (string) + 5.50. mos_max_jitter_A_pv (string) + 5.51. mos_max_roundtrip_A_pv (string) + 5.52. mos_max_roundtrip_leg_A_pv (string) + 5.53. mos_average_A_pv (string) + 5.54. mos_average_packetloss_A_pv (string) + 5.55. mos_average_jitter_A_pv (string) + 5.56. mos_average_roundtrip_A_pv (string) + 5.57. mos_average_roundtrip_leg_A_pv (string) + 5.58. mos_average_samples_A_pv (string) + 5.59. mos_B_label_pv (string) + 5.60. mos_min_B_pv (string) + 5.61. mos_min_at_B_pv (string) + 5.62. mos_min_packetloss_B_pv (string) + 5.63. mos_min_jitter_B_pv (string) + 5.64. mos_min_roundtrip_B_pv (string) + 5.65. mos_min_roundtrip_leg_B_pv (string) + 5.66. mos_max_B_pv (string) + 5.67. mos_max_at_B_pv (string) + 5.68. mos_max_packetloss_B_pv (string) + 5.69. mos_max_jitter_B_pv (string) + 5.70. mos_max_roundtrip_B_pv (string) + 5.71. mos_max_roundtrip_leg_B_pv (string) + 5.72. mos_average_B_pv (string) + 5.73. mos_average_packetloss_B_pv (string) + 5.74. mos_average_jitter_B_pv (string) + 5.75. mos_average_roundtrip_B_pv (string) + 5.76. mos_average_roundtrip_leg_B_pv (string) + 5.77. mos_average_samples_B_pv (string) + 5.78. dtmf_event_callid (string) + 5.79. dtmf_event_source_tag (string) + 5.80. dtmf_event_timestamp (string) + 5.81. dtmf_event (string) + 5.82. control_cmd_tos (integer) + 5.83. hash_algo (integer) + 5.84. wsapi (string) + 5.85. dtmf_events_sock (string) + 5.86. ping_mode (integer) + + 6. ping_interval (integer) + 7. Functions + + 7.1. set_rtpengine_set(setid[, setid]) + 7.2. rtpengine_offer([flags][,via-branch]) + 7.3. rtpengine_answer([flags][,via-branch]) + 7.4. rtpengine_info([flags][,via-branch]) + 7.5. rtpengine_delete([flags][,via-branch]) + 7.6. rtpengine_destroy([flags][,via-branch]) + 7.7. rtpengine_query([flags][,via-branch]) + 7.8. rtpengine_query_v(fmt, var) + 7.9. rtpengine_manage([flags][,via-branch]) + 7.10. start_recording([flags]) + 7.11. stop_recording([flags]) + 7.12. block_dtmf([flags]) + 7.13. unblock_dtmf([flags]) + 7.14. block_media([flags]) + 7.15. unblock_media([flags]) + 7.16. silence_media([flags]) + 7.17. unsilence_media([flags]) + 7.18. start_forwarding([flags]) + 7.19. stop_forwarding([flags]) + 7.20. play_media([flags]) + 7.21. stop_media([flags]) + 7.22. play_dtmf([flags]) + + 8. Exported Pseudo Variables + + 8.1. $rtpestat + 8.2. $rtpstat + + 9. RPC Commands + + 9.1. rtpengine.reload + 9.2. rtpengine.enable proxy_url/all 0/1 + 9.3. rtpengine.show proxy_url/all + 9.4. rtpengine.ping proxy_url/all + 9.5. rtpengine.get_hash_total + + 10. Event routes + + 10.1. rtpengine:dtmf-event 2. Frequently Asked Questions @@ -314,156 +315,171 @@ Chapter 1. Admin Guide Table of Contents 1. Overview - 2. Usage With Multiple RTPEngine Instances - 3. Dependencies - - 3.1. Kamailio Modules - 3.2. External Libraries or Applications - - 4. Parameters - - 4.1. rtpengine_sock (string) - 4.2. rtpengine_disable_tout (integer) - 4.3. aggressive_redetection (integer) - 4.4. rtpengine_tout_ms (integer) - 4.5. rtpengine_allow_op (integer) - 4.6. queried_nodes_limit (integer) - 4.7. rtpengine_retr (integer) - 4.8. extra_id_pv (string) - 4.9. setid_avp (string) - 4.10. force_send_interface (string) - 4.11. read_sdp_pv (string) - 4.12. write_sdp_pv (string) - 4.13. write_sdp_pv_mode (int) - 4.14. rtp_inst_pvar (string) - 4.15. hash_table_size (integer) - 4.16. hash_table_tout (integer) - 4.17. db_url (string) - 4.18. table_name (string) - 4.19. setid_col (string) - 4.20. url_col (string) - 4.21. weight_col (string) - 4.22. disabled_col (string) - 4.23. setid_default (integer) - 4.24. media_duration (string) - 4.25. mos_min_pv (string) - 4.26. mos_min_at_pv (string) - 4.27. mos_min_packetloss_pv (string) - 4.28. mos_min_jitter_pv (string) - 4.29. mos_min_roundtrip_pv (string) - 4.30. mos_max_pv (string) - 4.31. mos_max_at_pv (string) - 4.32. mos_max_packetloss_pv (string) - 4.33. mos_max_jitter_pv (string) - 4.34. mos_max_roundtrip_pv (string) - 4.35. mos_average_pv (string) - 4.36. mos_average_packetloss_pv (string) - 4.37. mos_average_jitter_pv (string) - 4.38. mos_average_roundtrip_pv (string) - 4.39. mos_average_samples_pv (string) - 4.40. mos_A_label_pv (string) - 4.41. mos_min_A_pv (string) - 4.42. mos_min_at_A_pv (string) - 4.43. mos_min_packetloss_A_pv (string) - 4.44. mos_min_jitter_A_pv (string) - 4.45. mos_min_roundtrip_A_pv (string) - 4.46. mos_min_roundtrip_leg_A_pv (string) - 4.47. mos_max_A_pv (string) - 4.48. mos_max_at_A_pv (string) - 4.49. mos_max_packetloss_A_pv (string) - 4.50. mos_max_jitter_A_pv (string) - 4.51. mos_max_roundtrip_A_pv (string) - 4.52. mos_max_roundtrip_leg_A_pv (string) - 4.53. mos_average_A_pv (string) - 4.54. mos_average_packetloss_A_pv (string) - 4.55. mos_average_jitter_A_pv (string) - 4.56. mos_average_roundtrip_A_pv (string) - 4.57. mos_average_roundtrip_leg_A_pv (string) - 4.58. mos_average_samples_A_pv (string) - 4.59. mos_B_label_pv (string) - 4.60. mos_min_B_pv (string) - 4.61. mos_min_at_B_pv (string) - 4.62. mos_min_packetloss_B_pv (string) - 4.63. mos_min_jitter_B_pv (string) - 4.64. mos_min_roundtrip_B_pv (string) - 4.65. mos_min_roundtrip_leg_B_pv (string) - 4.66. mos_max_B_pv (string) - 4.67. mos_max_at_B_pv (string) - 4.68. mos_max_packetloss_B_pv (string) - 4.69. mos_max_jitter_B_pv (string) - 4.70. mos_max_roundtrip_B_pv (string) - 4.71. mos_max_roundtrip_leg_B_pv (string) - 4.72. mos_average_B_pv (string) - 4.73. mos_average_packetloss_B_pv (string) - 4.74. mos_average_jitter_B_pv (string) - 4.75. mos_average_roundtrip_B_pv (string) - 4.76. mos_average_roundtrip_leg_B_pv (string) - 4.77. mos_average_samples_B_pv (string) - 4.78. dtmf_event_callid (string) - 4.79. dtmf_event_source_tag (string) - 4.80. dtmf_event_timestamp (string) - 4.81. dtmf_event (string) - 4.82. control_cmd_tos (integer) - 4.83. hash_algo (integer) - 4.84. wsapi (string) - 4.85. dtmf_events_sock (string) - 4.86. ping_mode (integer) - - 5. ping_interval (integer) - 6. Functions - - 6.1. set_rtpengine_set(setid[, setid]) - 6.2. rtpengine_offer([flags][,via-branch]) - 6.3. rtpengine_answer([flags][,via-branch]) - 6.4. rtpengine_info([flags][,via-branch]) - 6.5. rtpengine_delete([flags][,via-branch]) - 6.6. rtpengine_destroy([flags][,via-branch]) - 6.7. rtpengine_query([flags][,via-branch]) - 6.8. rtpengine_query_v(fmt, var) - 6.9. rtpengine_manage([flags][,via-branch]) - 6.10. start_recording([flags]) - 6.11. stop_recording([flags]) - 6.12. block_dtmf([flags]) - 6.13. unblock_dtmf([flags]) - 6.14. block_media([flags]) - 6.15. unblock_media([flags]) - 6.16. silence_media([flags]) - 6.17. unsilence_media([flags]) - 6.18. start_forwarding([flags]) - 6.19. stop_forwarding([flags]) - 6.20. play_media([flags]) - 6.21. stop_media([flags]) - 6.22. play_dtmf([flags]) - - 7. Exported Pseudo Variables - - 7.1. $rtpestat - 7.2. $rtpstat - - 8. RPC Commands - - 8.1. rtpengine.reload - 8.2. rtpengine.enable proxy_url/all 0/1 - 8.3. rtpengine.show proxy_url/all - 8.4. rtpengine.ping proxy_url/all - 8.5. rtpengine.get_hash_total - - 9. Event routes - - 9.1. rtpengine:dtmf-event + 2. Recommended Version + 3. Usage With Multiple RTPEngine Instances + 4. Dependencies + + 4.1. Kamailio Modules + 4.2. External Libraries or Applications + + 5. Parameters + + 5.1. rtpengine_sock (string) + 5.2. rtpengine_disable_tout (integer) + 5.3. aggressive_redetection (integer) + 5.4. rtpengine_tout_ms (integer) + 5.5. rtpengine_allow_op (integer) + 5.6. queried_nodes_limit (integer) + 5.7. rtpengine_retr (integer) + 5.8. extra_id_pv (string) + 5.9. setid_avp (string) + 5.10. force_send_interface (string) + 5.11. read_sdp_pv (string) + 5.12. write_sdp_pv (string) + 5.13. write_sdp_pv_mode (int) + 5.14. rtp_inst_pvar (string) + 5.15. hash_table_size (integer) + 5.16. hash_table_tout (integer) + 5.17. db_url (string) + 5.18. table_name (string) + 5.19. setid_col (string) + 5.20. url_col (string) + 5.21. weight_col (string) + 5.22. disabled_col (string) + 5.23. setid_default (integer) + 5.24. media_duration (string) + 5.25. mos_min_pv (string) + 5.26. mos_min_at_pv (string) + 5.27. mos_min_packetloss_pv (string) + 5.28. mos_min_jitter_pv (string) + 5.29. mos_min_roundtrip_pv (string) + 5.30. mos_max_pv (string) + 5.31. mos_max_at_pv (string) + 5.32. mos_max_packetloss_pv (string) + 5.33. mos_max_jitter_pv (string) + 5.34. mos_max_roundtrip_pv (string) + 5.35. mos_average_pv (string) + 5.36. mos_average_packetloss_pv (string) + 5.37. mos_average_jitter_pv (string) + 5.38. mos_average_roundtrip_pv (string) + 5.39. mos_average_samples_pv (string) + 5.40. mos_A_label_pv (string) + 5.41. mos_min_A_pv (string) + 5.42. mos_min_at_A_pv (string) + 5.43. mos_min_packetloss_A_pv (string) + 5.44. mos_min_jitter_A_pv (string) + 5.45. mos_min_roundtrip_A_pv (string) + 5.46. mos_min_roundtrip_leg_A_pv (string) + 5.47. mos_max_A_pv (string) + 5.48. mos_max_at_A_pv (string) + 5.49. mos_max_packetloss_A_pv (string) + 5.50. mos_max_jitter_A_pv (string) + 5.51. mos_max_roundtrip_A_pv (string) + 5.52. mos_max_roundtrip_leg_A_pv (string) + 5.53. mos_average_A_pv (string) + 5.54. mos_average_packetloss_A_pv (string) + 5.55. mos_average_jitter_A_pv (string) + 5.56. mos_average_roundtrip_A_pv (string) + 5.57. mos_average_roundtrip_leg_A_pv (string) + 5.58. mos_average_samples_A_pv (string) + 5.59. mos_B_label_pv (string) + 5.60. mos_min_B_pv (string) + 5.61. mos_min_at_B_pv (string) + 5.62. mos_min_packetloss_B_pv (string) + 5.63. mos_min_jitter_B_pv (string) + 5.64. mos_min_roundtrip_B_pv (string) + 5.65. mos_min_roundtrip_leg_B_pv (string) + 5.66. mos_max_B_pv (string) + 5.67. mos_max_at_B_pv (string) + 5.68. mos_max_packetloss_B_pv (string) + 5.69. mos_max_jitter_B_pv (string) + 5.70. mos_max_roundtrip_B_pv (string) + 5.71. mos_max_roundtrip_leg_B_pv (string) + 5.72. mos_average_B_pv (string) + 5.73. mos_average_packetloss_B_pv (string) + 5.74. mos_average_jitter_B_pv (string) + 5.75. mos_average_roundtrip_B_pv (string) + 5.76. mos_average_roundtrip_leg_B_pv (string) + 5.77. mos_average_samples_B_pv (string) + 5.78. dtmf_event_callid (string) + 5.79. dtmf_event_source_tag (string) + 5.80. dtmf_event_timestamp (string) + 5.81. dtmf_event (string) + 5.82. control_cmd_tos (integer) + 5.83. hash_algo (integer) + 5.84. wsapi (string) + 5.85. dtmf_events_sock (string) + 5.86. ping_mode (integer) + + 6. ping_interval (integer) + 7. Functions + + 7.1. set_rtpengine_set(setid[, setid]) + 7.2. rtpengine_offer([flags][,via-branch]) + 7.3. rtpengine_answer([flags][,via-branch]) + 7.4. rtpengine_info([flags][,via-branch]) + 7.5. rtpengine_delete([flags][,via-branch]) + 7.6. rtpengine_destroy([flags][,via-branch]) + 7.7. rtpengine_query([flags][,via-branch]) + 7.8. rtpengine_query_v(fmt, var) + 7.9. rtpengine_manage([flags][,via-branch]) + 7.10. start_recording([flags]) + 7.11. stop_recording([flags]) + 7.12. block_dtmf([flags]) + 7.13. unblock_dtmf([flags]) + 7.14. block_media([flags]) + 7.15. unblock_media([flags]) + 7.16. silence_media([flags]) + 7.17. unsilence_media([flags]) + 7.18. start_forwarding([flags]) + 7.19. stop_forwarding([flags]) + 7.20. play_media([flags]) + 7.21. stop_media([flags]) + 7.22. play_dtmf([flags]) + + 8. Exported Pseudo Variables + + 8.1. $rtpestat + 8.2. $rtpstat + + 9. RPC Commands + + 9.1. rtpengine.reload + 9.2. rtpengine.enable proxy_url/all 0/1 + 9.3. rtpengine.show proxy_url/all + 9.4. rtpengine.ping proxy_url/all + 9.5. rtpengine.get_hash_total + + 10. Event routes + + 10.1. rtpengine:dtmf-event 1. Overview This is a module that enables media streams to be proxied via an RTP proxy. The only RTP proxy currently known to work with this module is - the Sipwise rtpengine https://github.com/sipwise/rtpengine. The - rtpengine module is a modified version of the original rtpproxy module - using a new control protocol. The module is designed to be a drop-in - replacement for the old module from a configuration file point of view, - however due to the incompatible control protocol, it only works with - RTP proxies which specifically support it. - -2. Usage With Multiple RTPEngine Instances + Sipwise rtpengine. The rtpengine module is a modified version of the + original rtpproxy module using a new control protocol. The module is + designed to be a drop-in replacement for the old module from a + configuration file point of view, however due to the incompatible + control protocol, it only works with RTP proxies which specifically + support it. + +2. Recommended Version + + This control module is compatible with a wide range of versions of + Sipwise rtpengine. The version numbers follow the schema “mrXX.Y.ZZZ”, + with “XX” being the major release number, “Y” the minor release number, + and “ZZZ” the patch level suffix. Releases with “Y” equalling 5 are LTS + releases and receive bug fixes for several years. The recommended + version therefore is either the latest LTS release on the latest patch + level (e.g. “mr12.5.1.46”), or the latest non-LTS release if newer + features are desired (e.g. “mr13.4.1.5”). This version of Kamailio + includes a field in the control protocol which is not supported by + versions of rtpengine older than “mr12.4” and will trigger a warning + log message in these older versions. This is purely cosmetic. + +3. Usage With Multiple RTPEngine Instances The rtpengine module can support multiple RTPEngine instances for balancing/distribution and control/selection purposes. @@ -522,114 +538,114 @@ Chapter 1. Admin Guide All the nodes are pinged in the beginning by all the processes, even if the node list is shared memory. -3. Dependencies +4. Dependencies - 3.1. Kamailio Modules - 3.2. External Libraries or Applications + 4.1. Kamailio Modules + 4.2. External Libraries or Applications -3.1. Kamailio Modules +4.1. Kamailio Modules The following modules must be loaded before this module: * tm module - (optional) if you want to have rtpengine_manage() fully functional * lwsc module - (optional) if you plan to use “wsapi” parameter -3.2. External Libraries or Applications +4.2. External Libraries or Applications The following libraries or applications must be installed before running Kamailio with this module loaded: * None. -4. Parameters - - 4.1. rtpengine_sock (string) - 4.2. rtpengine_disable_tout (integer) - 4.3. aggressive_redetection (integer) - 4.4. rtpengine_tout_ms (integer) - 4.5. rtpengine_allow_op (integer) - 4.6. queried_nodes_limit (integer) - 4.7. rtpengine_retr (integer) - 4.8. extra_id_pv (string) - 4.9. setid_avp (string) - 4.10. force_send_interface (string) - 4.11. read_sdp_pv (string) - 4.12. write_sdp_pv (string) - 4.13. write_sdp_pv_mode (int) - 4.14. rtp_inst_pvar (string) - 4.15. hash_table_size (integer) - 4.16. hash_table_tout (integer) - 4.17. db_url (string) - 4.18. table_name (string) - 4.19. setid_col (string) - 4.20. url_col (string) - 4.21. weight_col (string) - 4.22. disabled_col (string) - 4.23. setid_default (integer) - 4.24. media_duration (string) - 4.25. mos_min_pv (string) - 4.26. mos_min_at_pv (string) - 4.27. mos_min_packetloss_pv (string) - 4.28. mos_min_jitter_pv (string) - 4.29. mos_min_roundtrip_pv (string) - 4.30. mos_max_pv (string) - 4.31. mos_max_at_pv (string) - 4.32. mos_max_packetloss_pv (string) - 4.33. mos_max_jitter_pv (string) - 4.34. mos_max_roundtrip_pv (string) - 4.35. mos_average_pv (string) - 4.36. mos_average_packetloss_pv (string) - 4.37. mos_average_jitter_pv (string) - 4.38. mos_average_roundtrip_pv (string) - 4.39. mos_average_samples_pv (string) - 4.40. mos_A_label_pv (string) - 4.41. mos_min_A_pv (string) - 4.42. mos_min_at_A_pv (string) - 4.43. mos_min_packetloss_A_pv (string) - 4.44. mos_min_jitter_A_pv (string) - 4.45. mos_min_roundtrip_A_pv (string) - 4.46. mos_min_roundtrip_leg_A_pv (string) - 4.47. mos_max_A_pv (string) - 4.48. mos_max_at_A_pv (string) - 4.49. mos_max_packetloss_A_pv (string) - 4.50. mos_max_jitter_A_pv (string) - 4.51. mos_max_roundtrip_A_pv (string) - 4.52. mos_max_roundtrip_leg_A_pv (string) - 4.53. mos_average_A_pv (string) - 4.54. mos_average_packetloss_A_pv (string) - 4.55. mos_average_jitter_A_pv (string) - 4.56. mos_average_roundtrip_A_pv (string) - 4.57. mos_average_roundtrip_leg_A_pv (string) - 4.58. mos_average_samples_A_pv (string) - 4.59. mos_B_label_pv (string) - 4.60. mos_min_B_pv (string) - 4.61. mos_min_at_B_pv (string) - 4.62. mos_min_packetloss_B_pv (string) - 4.63. mos_min_jitter_B_pv (string) - 4.64. mos_min_roundtrip_B_pv (string) - 4.65. mos_min_roundtrip_leg_B_pv (string) - 4.66. mos_max_B_pv (string) - 4.67. mos_max_at_B_pv (string) - 4.68. mos_max_packetloss_B_pv (string) - 4.69. mos_max_jitter_B_pv (string) - 4.70. mos_max_roundtrip_B_pv (string) - 4.71. mos_max_roundtrip_leg_B_pv (string) - 4.72. mos_average_B_pv (string) - 4.73. mos_average_packetloss_B_pv (string) - 4.74. mos_average_jitter_B_pv (string) - 4.75. mos_average_roundtrip_B_pv (string) - 4.76. mos_average_roundtrip_leg_B_pv (string) - 4.77. mos_average_samples_B_pv (string) - 4.78. dtmf_event_callid (string) - 4.79. dtmf_event_source_tag (string) - 4.80. dtmf_event_timestamp (string) - 4.81. dtmf_event (string) - 4.82. control_cmd_tos (integer) - 4.83. hash_algo (integer) - 4.84. wsapi (string) - 4.85. dtmf_events_sock (string) - 4.86. ping_mode (integer) - -4.1. rtpengine_sock (string) +5. Parameters + + 5.1. rtpengine_sock (string) + 5.2. rtpengine_disable_tout (integer) + 5.3. aggressive_redetection (integer) + 5.4. rtpengine_tout_ms (integer) + 5.5. rtpengine_allow_op (integer) + 5.6. queried_nodes_limit (integer) + 5.7. rtpengine_retr (integer) + 5.8. extra_id_pv (string) + 5.9. setid_avp (string) + 5.10. force_send_interface (string) + 5.11. read_sdp_pv (string) + 5.12. write_sdp_pv (string) + 5.13. write_sdp_pv_mode (int) + 5.14. rtp_inst_pvar (string) + 5.15. hash_table_size (integer) + 5.16. hash_table_tout (integer) + 5.17. db_url (string) + 5.18. table_name (string) + 5.19. setid_col (string) + 5.20. url_col (string) + 5.21. weight_col (string) + 5.22. disabled_col (string) + 5.23. setid_default (integer) + 5.24. media_duration (string) + 5.25. mos_min_pv (string) + 5.26. mos_min_at_pv (string) + 5.27. mos_min_packetloss_pv (string) + 5.28. mos_min_jitter_pv (string) + 5.29. mos_min_roundtrip_pv (string) + 5.30. mos_max_pv (string) + 5.31. mos_max_at_pv (string) + 5.32. mos_max_packetloss_pv (string) + 5.33. mos_max_jitter_pv (string) + 5.34. mos_max_roundtrip_pv (string) + 5.35. mos_average_pv (string) + 5.36. mos_average_packetloss_pv (string) + 5.37. mos_average_jitter_pv (string) + 5.38. mos_average_roundtrip_pv (string) + 5.39. mos_average_samples_pv (string) + 5.40. mos_A_label_pv (string) + 5.41. mos_min_A_pv (string) + 5.42. mos_min_at_A_pv (string) + 5.43. mos_min_packetloss_A_pv (string) + 5.44. mos_min_jitter_A_pv (string) + 5.45. mos_min_roundtrip_A_pv (string) + 5.46. mos_min_roundtrip_leg_A_pv (string) + 5.47. mos_max_A_pv (string) + 5.48. mos_max_at_A_pv (string) + 5.49. mos_max_packetloss_A_pv (string) + 5.50. mos_max_jitter_A_pv (string) + 5.51. mos_max_roundtrip_A_pv (string) + 5.52. mos_max_roundtrip_leg_A_pv (string) + 5.53. mos_average_A_pv (string) + 5.54. mos_average_packetloss_A_pv (string) + 5.55. mos_average_jitter_A_pv (string) + 5.56. mos_average_roundtrip_A_pv (string) + 5.57. mos_average_roundtrip_leg_A_pv (string) + 5.58. mos_average_samples_A_pv (string) + 5.59. mos_B_label_pv (string) + 5.60. mos_min_B_pv (string) + 5.61. mos_min_at_B_pv (string) + 5.62. mos_min_packetloss_B_pv (string) + 5.63. mos_min_jitter_B_pv (string) + 5.64. mos_min_roundtrip_B_pv (string) + 5.65. mos_min_roundtrip_leg_B_pv (string) + 5.66. mos_max_B_pv (string) + 5.67. mos_max_at_B_pv (string) + 5.68. mos_max_packetloss_B_pv (string) + 5.69. mos_max_jitter_B_pv (string) + 5.70. mos_max_roundtrip_B_pv (string) + 5.71. mos_max_roundtrip_leg_B_pv (string) + 5.72. mos_average_B_pv (string) + 5.73. mos_average_packetloss_B_pv (string) + 5.74. mos_average_jitter_B_pv (string) + 5.75. mos_average_roundtrip_B_pv (string) + 5.76. mos_average_roundtrip_leg_B_pv (string) + 5.77. mos_average_samples_B_pv (string) + 5.78. dtmf_event_callid (string) + 5.79. dtmf_event_source_tag (string) + 5.80. dtmf_event_timestamp (string) + 5.81. dtmf_event (string) + 5.82. control_cmd_tos (integer) + 5.83. hash_algo (integer) + 5.84. wsapi (string) + 5.85. dtmf_events_sock (string) + 5.86. ping_mode (integer) + +5.1. rtpengine_sock (string) Definition of socket(s) used to connect to (a set) RTP proxy. It may specify an IPv4/IPv6 UDP socket or a websocket URI. @@ -656,7 +672,7 @@ modparam("rtpengine", "rtpengine_sock", "2 == udp:localhost:12225") ... -4.2. rtpengine_disable_tout (integer) +5.2. rtpengine_disable_tout (integer) Once an RTP proxy was found unreachable and marked as disabled, the rtpengine module will not attempt to establish communication to that @@ -673,7 +689,7 @@ t 20 modparam("rtpengine", "rtpengine_disable_tout", 20) ... -4.3. aggressive_redetection (integer) +5.3. aggressive_redetection (integer) This parameter determines what happens when all potential rtpengines are found to be unreachable. If enabled, the sip server will send pings @@ -691,7 +707,7 @@ n 1 modparam("rtpengine", "aggressive_redetection", 1) ... -4.4. rtpengine_tout_ms (integer) +5.4. rtpengine_tout_ms (integer) Timeout value expressed in milliseconds in waiting for reply from RTP proxy. @@ -707,7 +723,7 @@ modparam("rtpengine", "aggressive_redetection", 1) modparam("rtpengine", "rtpengine_tout_ms", 2000) ... -4.5. rtpengine_allow_op (integer) +5.5. rtpengine_allow_op (integer) Enable this setting to allow finishing the current sessions while denying new sessions for deactivated nodes. @@ -739,7 +755,7 @@ modparam("rtpengine", "rtpengine_tout_ms", 2000) modparam("rtpengine", "rtpengine_allow_op", 1) ... -4.6. queried_nodes_limit (integer) +5.6. queried_nodes_limit (integer) The total number of nodes inside a set (sets are configurable via rtpengine_sock function) to be queried before giving up establishing a @@ -757,7 +773,7 @@ modparam("rtpengine", "rtpengine_allow_op", 1) modparam("rtpengine", "queried_nodes_limit", 5) ... -4.7. rtpengine_retr (integer) +5.7. rtpengine_retr (integer) How many times the module should retry to send and receive after timeout was generated. @@ -772,7 +788,7 @@ modparam("rtpengine", "queried_nodes_limit", 5) modparam("rtpengine", "rtpengine_retr", 2) ... -4.8. extra_id_pv (string) +5.8. extra_id_pv (string) The parameter sets the PV definition to use when the “via-branch” parameter is used on rtpengine_delete(), rtpengine_offer(), @@ -785,7 +801,7 @@ modparam("rtpengine", "rtpengine_retr", 2) modparam("rtpengine", "extra_id_pv", "$avp(extra_id)") ... -4.9. setid_avp (string) +5.9. setid_avp (string) The parameter defines an AVP that, if set, determines which RTP proxy set rtpengine_offer(), rtpengine_answer(), rtpengine_delete(), and @@ -798,7 +814,7 @@ modparam("rtpengine", "extra_id_pv", "$avp(extra_id)") modparam("rtpengine", "setid_avp", "$avp(setid)") ... -4.10. force_send_interface (string) +5.10. force_send_interface (string) Forces all control messages between the SIP proxy and the RTP proxy to be sent from the specified local interface. Both IPv4 and IPv6 @@ -819,7 +835,7 @@ modparam("rtpengine", "force_send_interface", "2001:8d8:1ff:10c0:9a90:96ff:fea8: fd99") ... -4.11. read_sdp_pv (string) +5.11. read_sdp_pv (string) If this parameter is set to a valid AVP or script var specifier, rtpengine will take the input SDP from this pv instead of the message @@ -837,7 +853,7 @@ route { rtpengine_manage(); } -4.12. write_sdp_pv (string) +5.12. write_sdp_pv (string) If this parameter is set to a valid AVP or script var specifier, the SDP returned by rtpengine in the offer/answer operations is returned in @@ -855,7 +871,7 @@ route { set_body("$avp(sdp)a=baz123\r\n", "application/sdp"); } -4.13. write_sdp_pv_mode (int) +5.13. write_sdp_pv_mode (int) If this parameter is set to 1, the returned SDP is written to pv and also set to message body. @@ -873,7 +889,7 @@ route { xinfo("new sdp: $avp(sdp)\n"); } -4.14. rtp_inst_pvar (string) +5.14. rtp_inst_pvar (string) A pseudo variable to store the chosen RTP Engine IP address. If this parameter is set, the IP address and port of the instance chosen will @@ -886,7 +902,7 @@ route { modparam("rtpengine", "rtp_inst_pvar", "$avp(RTP_INSTANCE)") ... -4.15. hash_table_size (integer) +5.15. hash_table_size (integer) To maintain information about a selected rtp machine node for a given call, entries are added in a hashtable of (callid, node) pairs. This @@ -900,7 +916,7 @@ modparam("rtpengine", "rtp_inst_pvar", "$avp(RTP_INSTANCE)") modparam("rtpengine", "hash_table_size", 123) ... -4.16. hash_table_tout (integer) +5.16. hash_table_tout (integer) Number of seconds after an rtpengine hash table entry is marked for deletion. By default, this parameter is set to 3600 (seconds). @@ -923,7 +939,7 @@ modparam("rtpengine", "hash_table_size", 123) modparam("rtpengine", "hash_table_tout", 300) ... -4.17. db_url (string) +5.17. db_url (string) The rtpengine database url. If present and valid, it activates database mode. In this mode the node information is read from database, not from @@ -936,7 +952,7 @@ modparam("rtpengine", "hash_table_tout", 300) modparam("rtpengine", "db_url", "mysql://pass@localhost/db") ... -4.18. table_name (string) +5.18. table_name (string) The rtpengine table name. If database mode is activated (i.e. valid db_url), sets the name of the rtpengine table, on startup. @@ -978,7 +994,7 @@ mysql> select * from version; | rtpengine | 1 | +---------------------------+---------------+ -4.19. setid_col (string) +5.19. setid_col (string) Column name for the "setid" in the rtpengine table. If database mode is activated (i.e. valid db_url), set the setid of rtp nodes according to @@ -992,7 +1008,7 @@ mysql> select * from version; modparam("rtpengine", "setid_col", "setid_column_name") ... -4.20. url_col (string) +5.20. url_col (string) Column name for the url in the rtpengine table. If database mode is activated (i.e. valid db_url), set the url of rtp nodes according to @@ -1006,7 +1022,7 @@ modparam("rtpengine", "setid_col", "setid_column_name") modparam("rtpengine", "url_col", "url_column_name") ... -4.21. weight_col (string) +5.21. weight_col (string) Column name for weight in the rtpengine table. If database mode is activated (i.e. valid db_url), set the weight of rtp nodes according to @@ -1020,7 +1036,7 @@ modparam("rtpengine", "url_col", "url_column_name") modparam("rtpengine", "weight_col", "weight_column_name") ... -4.22. disabled_col (string) +5.22. disabled_col (string) Column name in the rtpengine table. If database mode is activated (i.e. valid db_url), set the state of rtp nodes according to this column, on @@ -1033,7 +1049,7 @@ modparam("rtpengine", "weight_col", "weight_column_name") modparam("rtpengine", "disabled_col", "disabled_column_name") ... -4.23. setid_default (integer) +5.23. setid_default (integer) The default set of nodes to be used. @@ -1047,7 +1063,7 @@ modparam("rtpengine", "disabled_col", "disabled_column_name") modparam("rtpengine", "setid_default", 11) ... -4.24. media_duration (string) +5.24. media_duration (string) The name of a pseudovariable to be filled in with the length of the media being played back after a call to “play_media”, expressed in @@ -1061,7 +1077,7 @@ modparam("rtpengine", "setid_default", 11) modparam("rtpengine", "media_duration", "$avp(MEDIA_DURATION)") ... -4.25. mos_min_pv (string) +5.25. mos_min_pv (string) The name of a pseudovariable to hold the minimum encountered MOS (Mean Opinion Score) value for the call. The value typically has a range of @@ -1078,7 +1094,7 @@ modparam("rtpengine", "media_duration", "$avp(MEDIA_DURATION)") modparam("rtpengine", "mos_min_pv", "$avp(mos_min)") ... -4.26. mos_min_at_pv (string) +5.26. mos_min_at_pv (string) The name of a pseudovariable to hold the timestamp of when the minimum MOS value was encountered during the call, such as “0:30” for 30 @@ -1095,7 +1111,7 @@ modparam("rtpengine", "mos_min_pv", "$avp(mos_min)") modparam("rtpengine", "mos_min_at_pv", "$avp(mos_min_at)") ... -4.27. mos_min_packetloss_pv (string) +5.27. mos_min_packetloss_pv (string) The name of a pseudovariable to hold the amount of packetloss in percent at the time the minimum MOS value was encountered; @@ -1111,7 +1127,7 @@ modparam("rtpengine", "mos_min_at_pv", "$avp(mos_min_at)") modparam("rtpengine", "mos_min_packetloss_pv", "$avp(mos_min_packetloss)") ... -4.28. mos_min_jitter_pv (string) +5.28. mos_min_jitter_pv (string) The name of a pseudovariable to hold the amount of jitter in milliseconds at the time the minimum MOS value was encountered; @@ -1127,7 +1143,7 @@ modparam("rtpengine", "mos_min_packetloss_pv", "$avp(mos_min_packetloss)") modparam("rtpengine", "mos_min_jitter_pv", "$avp(mos_min_jitter)") ... -4.29. mos_min_roundtrip_pv (string) +5.29. mos_min_roundtrip_pv (string) The name of a pseudovariable to hold the packet round-trip time in microseconds at the time the minimum MOS value was encountered; @@ -1143,7 +1159,7 @@ modparam("rtpengine", "mos_min_jitter_pv", "$avp(mos_min_jitter)") modparam("rtpengine", "mos_min_roundtrip_pv", "$avp(mos_min_roundtrip)") ... -4.30. mos_max_pv (string) +5.30. mos_max_pv (string) The name of a pseudovariable to hold the maximum encountered MOS value for the call. The value typically has a range of 1.0 through 5.0. @@ -1159,7 +1175,7 @@ modparam("rtpengine", "mos_min_roundtrip_pv", "$avp(mos_min_roundtrip)") modparam("rtpengine", "mos_max_pv", "$avp(mos_max)") ... -4.31. mos_max_at_pv (string) +5.31. mos_max_at_pv (string) The name of a pseudovariable to hold the timestamp of when the maximum MOS value was encountered during the call, such as “0:30” for 30 @@ -1176,7 +1192,7 @@ modparam("rtpengine", "mos_max_pv", "$avp(mos_max)") modparam("rtpengine", "mos_max_at_pv", "$avp(mos_max_at)") ... -4.32. mos_max_packetloss_pv (string) +5.32. mos_max_packetloss_pv (string) The name of a pseudovariable to hold the amount of packetloss in percent at the time the maximum MOS value was encountered; @@ -1192,7 +1208,7 @@ modparam("rtpengine", "mos_max_at_pv", "$avp(mos_max_at)") modparam("rtpengine", "mos_max_packetloss_pv", "$avp(mos_max_packetloss)") ... -4.33. mos_max_jitter_pv (string) +5.33. mos_max_jitter_pv (string) The name of a pseudovariable to hold the amount of jitter in milliseconds at the time the maximum MOS value was encountered; @@ -1208,7 +1224,7 @@ modparam("rtpengine", "mos_max_packetloss_pv", "$avp(mos_max_packetloss)") modparam("rtpengine", "mos_max_jitter_pv", "$avp(mos_max_jitter)") ... -4.34. mos_max_roundtrip_pv (string) +5.34. mos_max_roundtrip_pv (string) The name of a pseudovariable to hold the packet round-trip time in microseconds at the time the maximum MOS value was encountered; @@ -1224,7 +1240,7 @@ modparam("rtpengine", "mos_max_jitter_pv", "$avp(mos_max_jitter)") modparam("rtpengine", "mos_max_roundtrip_pv", "$avp(mos_max_roundtrip)") ... -4.35. mos_average_pv (string) +5.35. mos_average_pv (string) The name of a pseudovariable to hold the average (median) MOS value for the call. The value typically has a range of 1.0 through 5.0. @@ -1240,7 +1256,7 @@ modparam("rtpengine", "mos_max_roundtrip_pv", "$avp(mos_max_roundtrip)") modparam("rtpengine", "mos_average_pv", "$avp(mos_average)") ... -4.36. mos_average_packetloss_pv (string) +5.36. mos_average_packetloss_pv (string) The name of a pseudovariable to hold the average (median) amount of packetloss in percent present throughout the call. @@ -1257,7 +1273,7 @@ modparam("rtpengine", "mos_average_packetloss_pv", "$avp(mos_average_packetloss) ") ... -4.37. mos_average_jitter_pv (string) +5.37. mos_average_jitter_pv (string) The name of a pseudovariable to hold the average (median) amount of jitter in milliseconds present throughout the call. @@ -1273,7 +1289,7 @@ modparam("rtpengine", "mos_average_packetloss_pv", "$avp(mos_average_packetloss) modparam("rtpengine", "mos_average_jitter_pv", "$avp(mos_average_jitter)") ... -4.38. mos_average_roundtrip_pv (string) +5.38. mos_average_roundtrip_pv (string) The name of a pseudovariable to hold the average (median) packet round-trip time in milliseconds present throughout the call. @@ -1289,7 +1305,7 @@ modparam("rtpengine", "mos_average_jitter_pv", "$avp(mos_average_jitter)") modparam("rtpengine", "mos_average_roundtrip_pv", "$avp(mos_average_roundtrip)") ... -4.39. mos_average_samples_pv (string) +5.39. mos_average_samples_pv (string) The name of a pseudovariable to hold the number of samples used to determine the other “average” MOS data points. @@ -1305,7 +1321,7 @@ modparam("rtpengine", "mos_average_roundtrip_pv", "$avp(mos_average_roundtrip)") modparam("rtpengine", "mos_average_samples_pv", "$avp(mos_average_samples)") ... -4.40. mos_A_label_pv (string) +5.40. mos_A_label_pv (string) The name of a pseudovariable to hold a custom label used in rtpengine signalling. If set, all the statistics pseudovariables with the “_A” @@ -1322,7 +1338,7 @@ modparam("rtpengine", "mos_average_samples_pv", "$avp(mos_average_samples)") modparam("rtpengine", "mos_A_label_pv", "$avp(mos_A_label)") ... -4.41. mos_min_A_pv (string) +5.41. mos_min_A_pv (string) The name of a pseudovariable to hold the minimum encountered MOS value for the call. The value typically has a range of 1.0 through 5.0. @@ -1341,7 +1357,7 @@ modparam("rtpengine", "mos_A_label_pv", "$avp(mos_A_label)") modparam("rtpengine", "mos_min_A_pv", "$avp(mos_min_A)") ... -4.42. mos_min_at_A_pv (string) +5.42. mos_min_at_A_pv (string) The name of a pseudovariable to hold the timestamp of when the minimum MOS value was encountered during the call, such as “0:30” for 30 @@ -1361,7 +1377,7 @@ modparam("rtpengine", "mos_min_A_pv", "$avp(mos_min_A)") modparam("rtpengine", "mos_min_at_A_pv", "$avp(mos_min_at_A)") ... -4.43. mos_min_packetloss_A_pv (string) +5.43. mos_min_packetloss_A_pv (string) The name of a pseudovariable to hold the amount of packetloss in percent at the time the minimum MOS value was encountered; @@ -1380,7 +1396,7 @@ modparam("rtpengine", "mos_min_at_A_pv", "$avp(mos_min_at_A)") modparam("rtpengine", "mos_min_packetloss_A_pv", "$avp(mos_min_packetloss_A)") ... -4.44. mos_min_jitter_A_pv (string) +5.44. mos_min_jitter_A_pv (string) The name of a pseudovariable to hold the amount of jitter in milliseconds at the time the minimum MOS value was encountered; @@ -1399,7 +1415,7 @@ modparam("rtpengine", "mos_min_packetloss_A_pv", "$avp(mos_min_packetloss_A)") modparam("rtpengine", "mos_min_jitter_A_pv", "$avp(mos_min_jitter_A)") ... -4.45. mos_min_roundtrip_A_pv (string) +5.45. mos_min_roundtrip_A_pv (string) The name of a pseudovariable to hold the packet round-trip time in microseconds at the time the minimum MOS value was encountered; @@ -1418,7 +1434,7 @@ modparam("rtpengine", "mos_min_jitter_A_pv", "$avp(mos_min_jitter_A)") modparam("rtpengine", "mos_min_roundtrip_A_pv", "$avp(mos_min_roundtrip_A)") ... -4.46. mos_min_roundtrip_leg_A_pv (string) +5.46. mos_min_roundtrip_leg_A_pv (string) The name of a pseudovariable to hold the packet round-trip time of the specific call leg in microseconds at the time the minimum MOS value was @@ -1439,7 +1455,7 @@ modparam("rtpengine", "mos_min_roundtrip_leg_A_pv", "$avp(mos_min_roundtrip_leg_ A)") ... -4.47. mos_max_A_pv (string) +5.47. mos_max_A_pv (string) The name of a pseudovariable to hold the maximum encountered MOS value for the call. The value typically has a range of 1.0 through 5.0. @@ -1458,7 +1474,7 @@ A)") modparam("rtpengine", "mos_max_A_pv", "$avp(mos_max_A)") ... -4.48. mos_max_at_A_pv (string) +5.48. mos_max_at_A_pv (string) The name of a pseudovariable to hold the timestamp of when the maximum MOS value was encountered during the call, such as “0:30” for 30 @@ -1478,7 +1494,7 @@ modparam("rtpengine", "mos_max_A_pv", "$avp(mos_max_A)") modparam("rtpengine", "mos_max_at_A_pv", "$avp(mos_max_at_A)") ... -4.49. mos_max_packetloss_A_pv (string) +5.49. mos_max_packetloss_A_pv (string) The name of a pseudovariable to hold the amount of packetloss in percent at the time the maximum MOS value was encountered; @@ -1497,7 +1513,7 @@ modparam("rtpengine", "mos_max_at_A_pv", "$avp(mos_max_at_A)") modparam("rtpengine", "mos_max_packetloss_A_pv", "$avp(mos_max_packetloss_A)") ... -4.50. mos_max_jitter_A_pv (string) +5.50. mos_max_jitter_A_pv (string) The name of a pseudovariable to hold the amount of jitter in milliseconds at the time the maximum MOS value was encountered; @@ -1516,7 +1532,7 @@ modparam("rtpengine", "mos_max_packetloss_A_pv", "$avp(mos_max_packetloss_A)") modparam("rtpengine", "mos_max_jitter_A_pv", "$avp(mos_max_jitter_A)") ... -4.51. mos_max_roundtrip_A_pv (string) +5.51. mos_max_roundtrip_A_pv (string) The name of a pseudovariable to hold the packet round-trip time in microseconds at the time the maximum MOS value was encountered; @@ -1535,7 +1551,7 @@ modparam("rtpengine", "mos_max_jitter_A_pv", "$avp(mos_max_jitter_A)") modparam("rtpengine", "mos_max_roundtrip_A_pv", "$avp(mos_max_roundtrip_A)") ... -4.52. mos_max_roundtrip_leg_A_pv (string) +5.52. mos_max_roundtrip_leg_A_pv (string) The name of a pseudovariable to hold the packet round-trip time of the specific call leg in microseconds at the time the maximum MOS value was @@ -1556,7 +1572,7 @@ modparam("rtpengine", "mos_max_roundtrip_leg_A_pv", "$avp(mos_max_roundtrip_leg_ A)") ... -4.53. mos_average_A_pv (string) +5.53. mos_average_A_pv (string) The name of a pseudovariable to hold the average (median) MOS value for the call. The value typically has a range of 1.0 through 5.0. @@ -1575,7 +1591,7 @@ A)") modparam("rtpengine", "mos_average_A_pv", "$avp(mos_average_A)") ... -4.54. mos_average_packetloss_A_pv (string) +5.54. mos_average_packetloss_A_pv (string) The name of a pseudovariable to hold the average (median) amount of packetloss in percent present throughout the call. @@ -1595,7 +1611,7 @@ modparam("rtpengine", "mos_average_packetloss_A_pv", "$avp(mos_average_packetlos s_A)") ... -4.55. mos_average_jitter_A_pv (string) +5.55. mos_average_jitter_A_pv (string) The name of a pseudovariable to hold the average (median) amount of jitter in milliseconds present throughout the call. @@ -1614,7 +1630,7 @@ s_A)") modparam("rtpengine", "mos_average_jitter_A_pv", "$avp(mos_average_jitter_A)") ... -4.56. mos_average_roundtrip_A_pv (string) +5.56. mos_average_roundtrip_A_pv (string) The name of a pseudovariable to hold the average (median) packet round-trip time in microseconds present throughout the call. @@ -1634,7 +1650,7 @@ modparam("rtpengine", "mos_average_roundtrip_A_pv", "$avp(mos_average_roundtrip_ A)") ... -4.57. mos_average_roundtrip_leg_A_pv (string) +5.57. mos_average_roundtrip_leg_A_pv (string) The name of a pseudovariable to hold the average (median) packet round-trip time of the specific call leg in microseconds present @@ -1655,7 +1671,7 @@ modparam("rtpengine", "mos_average_roundtrip_leg_A_pv", "$avp(mos_average_roundt rip_leg_A)") ... -4.58. mos_average_samples_A_pv (string) +5.58. mos_average_samples_A_pv (string) The name of a pseudovariable to hold the number of samples used to determine the other “average” MOS data points. @@ -1674,7 +1690,7 @@ rip_leg_A)") modparam("rtpengine", "mos_average_samples_A_pv", "$avp(mos_average_samples_A)") ... -4.59. mos_B_label_pv (string) +5.59. mos_B_label_pv (string) The name of a pseudovariable to hold a custom label used in rtpengine signalling. If set, all the statistics pseudovariables with the “_B” @@ -1691,7 +1707,7 @@ modparam("rtpengine", "mos_average_samples_A_pv", "$avp(mos_average_samples_A)") modparam("rtpengine", "mos_B_label_pv", "$avp(mos_B_label)") ... -4.60. mos_min_B_pv (string) +5.60. mos_min_B_pv (string) The name of a pseudovariable to hold the minimum encountered MOS value for the call. The value typically has a range of 1.0 through 5.0. @@ -1710,7 +1726,7 @@ modparam("rtpengine", "mos_B_label_pv", "$avp(mos_B_label)") modparam("rtpengine", "mos_min_B_pv", "$avp(mos_min_B)") ... -4.61. mos_min_at_B_pv (string) +5.61. mos_min_at_B_pv (string) The name of a pseudovariable to hold the timestamp of when the minimum MOS value was encountered during the call, such as “0:30” for 30 @@ -1730,7 +1746,7 @@ modparam("rtpengine", "mos_min_B_pv", "$avp(mos_min_B)") modparam("rtpengine", "mos_min_at_B_pv", "$avp(mos_min_at_B)") ... -4.62. mos_min_packetloss_B_pv (string) +5.62. mos_min_packetloss_B_pv (string) The name of a pseudovariable to hold the amount of packetloss in percent at the time the minimum MOS value was encountered; @@ -1749,7 +1765,7 @@ modparam("rtpengine", "mos_min_at_B_pv", "$avp(mos_min_at_B)") modparam("rtpengine", "mos_min_packetloss_B_pv", "$avp(mos_min_packetloss_B)") ... -4.63. mos_min_jitter_B_pv (string) +5.63. mos_min_jitter_B_pv (string) The name of a pseudovariable to hold the amount of jitter in milliseconds at the time the minimum MOS value was encountered; @@ -1768,7 +1784,7 @@ modparam("rtpengine", "mos_min_packetloss_B_pv", "$avp(mos_min_packetloss_B)") modparam("rtpengine", "mos_min_jitter_B_pv", "$avp(mos_min_jitter_B)") ... -4.64. mos_min_roundtrip_B_pv (string) +5.64. mos_min_roundtrip_B_pv (string) The name of a pseudovariable to hold the packet round-trip time in microseconds at the time the minimum MOS value was encountered; @@ -1787,7 +1803,7 @@ modparam("rtpengine", "mos_min_jitter_B_pv", "$avp(mos_min_jitter_B)") modparam("rtpengine", "mos_min_roundtrip_B_pv", "$avp(mos_min_roundtrip_B)") ... -4.65. mos_min_roundtrip_leg_B_pv (string) +5.65. mos_min_roundtrip_leg_B_pv (string) The name of a pseudovariable to hold the packet round-trip time of the specific call leg in microseconds at the time the minimum MOS value was @@ -1808,7 +1824,7 @@ modparam("rtpengine", "mos_min_roundtrip_leg_B_pv", "$avp(mos_min_roundtrip_leg_ B)") ... -4.66. mos_max_B_pv (string) +5.66. mos_max_B_pv (string) The name of a pseudovariable to hold the maximum encountered MOS value for the call. The value typically has a range of 1.0 through 5.0. @@ -1827,7 +1843,7 @@ B)") modparam("rtpengine", "mos_max_B_pv", "$avp(mos_max_B)") ... -4.67. mos_max_at_B_pv (string) +5.67. mos_max_at_B_pv (string) The name of a pseudovariable to hold the timestamp of when the maximum MOS value was encountered during the call, such as “0:30” for 30 @@ -1847,7 +1863,7 @@ modparam("rtpengine", "mos_max_B_pv", "$avp(mos_max_B)") modparam("rtpengine", "mos_max_at_B_pv", "$avp(mos_max_at_B)") ... -4.68. mos_max_packetloss_B_pv (string) +5.68. mos_max_packetloss_B_pv (string) The name of a pseudovariable to hold the amount of packetloss in percent at the time the maximum MOS value was encountered; @@ -1866,7 +1882,7 @@ modparam("rtpengine", "mos_max_at_B_pv", "$avp(mos_max_at_B)") modparam("rtpengine", "mos_max_packetloss_B_pv", "$avp(mos_max_packetloss_B)") ... -4.69. mos_max_jitter_B_pv (string) +5.69. mos_max_jitter_B_pv (string) The name of a pseudovariable to hold the amount of jitter in milliseconds at the time the maximum MOS value was encountered; @@ -1885,7 +1901,7 @@ modparam("rtpengine", "mos_max_packetloss_B_pv", "$avp(mos_max_packetloss_B)") modparam("rtpengine", "mos_max_jitter_B_pv", "$avp(mos_max_jitter_B)") ... -4.70. mos_max_roundtrip_B_pv (string) +5.70. mos_max_roundtrip_B_pv (string) The name of a pseudovariable to hold the packet round-trip time in microseconds at the time the maximum MOS value was encountered; @@ -1904,7 +1920,7 @@ modparam("rtpengine", "mos_max_jitter_B_pv", "$avp(mos_max_jitter_B)") modparam("rtpengine", "mos_max_roundtrip_B_pv", "$avp(mos_max_roundtrip_B)") ... -4.71. mos_max_roundtrip_leg_B_pv (string) +5.71. mos_max_roundtrip_leg_B_pv (string) The name of a pseudovariable to hold the packet round-trip time of the specific call leg in microseconds at the time the maximum MOS value was @@ -1925,7 +1941,7 @@ modparam("rtpengine", "mos_max_roundtrip_leg_B_pv", "$avp(mos_max_roundtrip_leg_ B)") ... -4.72. mos_average_B_pv (string) +5.72. mos_average_B_pv (string) The name of a pseudovariable to hold the average (median) MOS value for the call. The value typically has a range of 1.0 through 5.0. @@ -1944,7 +1960,7 @@ B)") modparam("rtpengine", "mos_average_B_pv", "$avp(mos_average_B)") ... -4.73. mos_average_packetloss_B_pv (string) +5.73. mos_average_packetloss_B_pv (string) The name of a pseudovariable to hold the average (median) amount of packetloss in percent present throughout the call. @@ -1964,7 +1980,7 @@ modparam("rtpengine", "mos_average_packetloss_B_pv", "$avp(mos_average_packetlos s_B)") ... -4.74. mos_average_jitter_B_pv (string) +5.74. mos_average_jitter_B_pv (string) The name of a pseudovariable to hold the average (median) amount of jitter in milliseconds present throughout the call. @@ -1983,7 +1999,7 @@ s_B)") modparam("rtpengine", "mos_average_jitter_B_pv", "$avp(mos_average_jitter_B)") ... -4.75. mos_average_roundtrip_B_pv (string) +5.75. mos_average_roundtrip_B_pv (string) The name of a pseudovariable to hold the average (median) packet round-trip time in microseconds present throughout the call. @@ -2003,7 +2019,7 @@ modparam("rtpengine", "mos_average_roundtrip_B_pv", "$avp(mos_average_roundtrip_ B)") ... -4.76. mos_average_roundtrip_leg_B_pv (string) +5.76. mos_average_roundtrip_leg_B_pv (string) The name of a pseudovariable to hold the average (median) packet round-trip time of the specific call leg in microseconds present @@ -2024,7 +2040,7 @@ modparam("rtpengine", "mos_average_roundtrip_leg_B_pv", "$avp(mos_average_roundt rip_leg_B)") ... -4.77. mos_average_samples_B_pv (string) +5.77. mos_average_samples_B_pv (string) The name of a pseudovariable to hold the number of samples used to determine the other “average” MOS data points. @@ -2043,7 +2059,7 @@ rip_leg_B)") modparam("rtpengine", "mos_average_samples_B_pv", "$avp(mos_average_samples_B)") ... -4.78. dtmf_event_callid (string) +5.78. dtmf_event_callid (string) The name of a pseudovariable to be filled in with the callid of the triggered dtmf event. @@ -2055,7 +2071,7 @@ modparam("rtpengine", "mos_average_samples_B_pv", "$avp(mos_average_samples_B)") modparam("rtpengine", "dtmf_event_callid", "$avp(dtmf_event_callid)") ... -4.79. dtmf_event_source_tag (string) +5.79. dtmf_event_source_tag (string) The name of a pseudovariable to be filled in with the source tag that triggered the dtmf event. @@ -2067,7 +2083,7 @@ modparam("rtpengine", "dtmf_event_callid", "$avp(dtmf_event_callid)") modparam("rtpengine", "dtmf_event_source_tag", "$avp(dtmf_event_source_tag)") ... -4.80. dtmf_event_timestamp (string) +5.80. dtmf_event_timestamp (string) The name of a pseudovariable to be filled in with the timestamp when the dtmf event was triggered. @@ -2079,7 +2095,7 @@ modparam("rtpengine", "dtmf_event_source_tag", "$avp(dtmf_event_source_tag)") modparam("rtpengine", "dtmf_event_timestamp", "$avp(dtmf_event_timestamp)") ... -4.81. dtmf_event (string) +5.81. dtmf_event (string) The name of a pseudovariable to be filled in with the triggered DTMF value. @@ -2091,7 +2107,7 @@ modparam("rtpengine", "dtmf_event_timestamp", "$avp(dtmf_event_timestamp)") modparam("rtpengine", "dtmf_event", "$avp(dtmf_event)") ... -4.82. control_cmd_tos (integer) +5.82. control_cmd_tos (integer) The parameter is used to set the value of “type of service (tos)” for the control commands (such as rtpengine_offer(), rtpengine_answer() @@ -2106,7 +2122,7 @@ modparam("rtpengine", "dtmf_event", "$avp(dtmf_event)") modparam("rtpengine", "control_cmd_tos", 144) ... -4.83. hash_algo (integer) +5.83. hash_algo (integer) Hashing algorithm to be used in node selection algorithm. Now there are 3 possibilities: legacy algorithm - 0 (very basic hash over callid), @@ -2126,7 +2142,7 @@ modparam("rtpengine", "hash_algo", 1) modparam("rtpengine", "hash_algo", 2) ... -4.84. wsapi (string) +5.84. wsapi (string) Configure a backend API for websocket usage. Currently the only supported setting is “lwsc” (libwebsockets). If unset, then the @@ -2137,7 +2153,7 @@ modparam("rtpengine", "hash_algo", 2) modparam("rtpengine", "wsapi", "lwsc") ... -4.85. dtmf_events_sock (string) +5.85. dtmf_events_sock (string) Definition of IPv4/IPv6 UDP socket used to receive dtmf events from RTPEngine. @@ -2152,7 +2168,7 @@ modparam("rtpengine", "wsapi", "lwsc") modparam("rtpengine", "dtmf_events_sock", "127.0.0.1:2223") ... -4.86. ping_mode (integer) +5.86. ping_mode (integer) Specify if the RTPEngine instances have to be pinged at startup to detect if they are active. Set it to 0 to disable pinging and to 1 to @@ -2165,7 +2181,7 @@ modparam("rtpengine", "dtmf_events_sock", "127.0.0.1:2223") modparam("rtpengine", "ping_mode", 0) ... -5. ping_interval (integer) +6. ping_interval (integer) Specify the interval in seconds between pings to all rtpengines registered. @@ -2177,32 +2193,32 @@ modparam("rtpengine", "ping_mode", 0) modparam("rtpengine", "ping_interval", 10) ... -6. Functions - - 6.1. set_rtpengine_set(setid[, setid]) - 6.2. rtpengine_offer([flags][,via-branch]) - 6.3. rtpengine_answer([flags][,via-branch]) - 6.4. rtpengine_info([flags][,via-branch]) - 6.5. rtpengine_delete([flags][,via-branch]) - 6.6. rtpengine_destroy([flags][,via-branch]) - 6.7. rtpengine_query([flags][,via-branch]) - 6.8. rtpengine_query_v(fmt, var) - 6.9. rtpengine_manage([flags][,via-branch]) - 6.10. start_recording([flags]) - 6.11. stop_recording([flags]) - 6.12. block_dtmf([flags]) - 6.13. unblock_dtmf([flags]) - 6.14. block_media([flags]) - 6.15. unblock_media([flags]) - 6.16. silence_media([flags]) - 6.17. unsilence_media([flags]) - 6.18. start_forwarding([flags]) - 6.19. stop_forwarding([flags]) - 6.20. play_media([flags]) - 6.21. stop_media([flags]) - 6.22. play_dtmf([flags]) - -6.1. set_rtpengine_set(setid[, setid]) +7. Functions + + 7.1. set_rtpengine_set(setid[, setid]) + 7.2. rtpengine_offer([flags][,via-branch]) + 7.3. rtpengine_answer([flags][,via-branch]) + 7.4. rtpengine_info([flags][,via-branch]) + 7.5. rtpengine_delete([flags][,via-branch]) + 7.6. rtpengine_destroy([flags][,via-branch]) + 7.7. rtpengine_query([flags][,via-branch]) + 7.8. rtpengine_query_v(fmt, var) + 7.9. rtpengine_manage([flags][,via-branch]) + 7.10. start_recording([flags]) + 7.11. stop_recording([flags]) + 7.12. block_dtmf([flags]) + 7.13. unblock_dtmf([flags]) + 7.14. block_media([flags]) + 7.15. unblock_media([flags]) + 7.16. silence_media([flags]) + 7.17. unsilence_media([flags]) + 7.18. start_forwarding([flags]) + 7.19. stop_forwarding([flags]) + 7.20. play_media([flags]) + 7.21. stop_media([flags]) + 7.22. play_dtmf([flags]) + +7.1. set_rtpengine_set(setid[, setid]) Sets the ID of the RTP proxy set to be used for the next rtpengine_delete(), rtpengine_offer(), rtpengine_answer() or @@ -2229,7 +2245,7 @@ set_rtpengine_set("2"); rtpengine_offer(); ... -6.2. rtpengine_offer([flags][,via-branch]) +7.2. rtpengine_offer([flags][,via-branch]) Rewrites SDP body to ensure that media is passed through an RTP proxy. To be invoked on INVITE for the cases the SDP bodies are in INVITE and @@ -2604,7 +2620,7 @@ t-source label=callee OSRTP-accept transport-protocol=RTP/AVP address-family=IP4 ... } -6.3. rtpengine_answer([flags][,via-branch]) +7.3. rtpengine_answer([flags][,via-branch]) Rewrites SDP body to ensure that media is passed through an RTP proxy. To be invoked on 200 OK for the cases the SDP bodies are in INVITE and @@ -2620,7 +2636,7 @@ t-source label=callee OSRTP-accept transport-protocol=RTP/AVP address-family=IP4 See rtpengine_offer() function example above for example. -6.4. rtpengine_info([flags][,via-branch]) +7.4. rtpengine_info([flags][,via-branch]) Send an updated offer to rtpengine. This is meant to be used when processing Trickle ICE SDP Fragments that are carried in SIP INFO @@ -2639,7 +2655,7 @@ t-source label=callee OSRTP-accept transport-protocol=RTP/AVP address-family=IP4 rtpengine_info(); ... -6.5. rtpengine_delete([flags][,via-branch]) +7.5. rtpengine_delete([flags][,via-branch]) Tears down the RTP proxy session for the current call. This populates the statistics pseudovariables (such “mos_min_pv” etc). @@ -2654,7 +2670,7 @@ rtpengine_info(); rtpengine_delete(); ... -6.6. rtpengine_destroy([flags][,via-branch]) +7.6. rtpengine_destroy([flags][,via-branch]) Same as rtpengine_delete(). @@ -2663,7 +2679,7 @@ rtpengine_delete(); rtpengine_destroy(); ... -6.7. rtpengine_query([flags][,via-branch]) +7.7. rtpengine_query([flags][,via-branch]) Queries the RTP proxy about the current status and statistics of a running call. This populates the statistics pseudovariables (such @@ -2679,7 +2695,7 @@ rtpengine_destroy(); rtpengine_query(); ... -6.8. rtpengine_query_v(fmt, var) +7.8. rtpengine_query_v(fmt, var) Queries the RTP proxy about the current status and statistics of a running call, converts the response to JSON according to fmt and sets @@ -2699,7 +2715,7 @@ if(rtpengine_query_v("j", "$var(rdata)")) { } ... -6.9. rtpengine_manage([flags][,via-branch]) +7.9. rtpengine_manage([flags][,via-branch]) Manage the RTPEngine session - it combines the functionality of rtpengine_offer(), rtpengine_answer() and rtpengine_delete(), detecting @@ -2735,7 +2751,7 @@ if(rtpengine_query_v("j", "$var(rdata)")) { rtpengine_manage(); ... -6.10. start_recording([flags]) +7.10. start_recording([flags]) This function will send a signal to the RTP relay to record the RTP stream flowing through it. See also the option “record-call=on” for @@ -2754,7 +2770,7 @@ rtpengine_manage(); start_recording(); ... -6.11. stop_recording([flags]) +7.11. stop_recording([flags]) This function will send a signal to the RTP relay to stop recording the RTP stream flowing through it. See also the option “record-call=off” @@ -2773,7 +2789,7 @@ start_recording(); stop_recording(); ... -6.12. block_dtmf([flags]) +7.12. block_dtmf([flags]) This function will instruct the RTP proxy to start blocking DTMF event packets (RFC 4733). DTMF events will still be processed by the RTP @@ -2799,7 +2815,7 @@ block_dtmf("directional"); block_dtmf("address=192.168.42.42"); ... -6.13. unblock_dtmf([flags]) +7.13. unblock_dtmf([flags]) Reverses the effects of a previously issued block_dtmf call. See above for a description of which flags can be used. @@ -2814,7 +2830,7 @@ unblock_dtmf(); unblock_dtmf("all"); ... -6.14. block_media([flags]) +7.14. block_media([flags]) Analogous to “block_dtmf”, but blocks media RTP packets instead of DTMF events. When media is blocked, DTMF events still pass through the RTP @@ -2829,7 +2845,7 @@ block_media("directional"); block_media("address=192.168.42.42"); ... -6.15. unblock_media([flags]) +7.15. unblock_media([flags]) Analogous to “unblock_dtmf”, but applies to media RTP packets instead of DTMF events. @@ -2842,7 +2858,7 @@ unblock_media(); unblock_media("all"); ... -6.16. silence_media([flags]) +7.16. silence_media([flags]) Identical to “block_media” except that media RTP packets are not simply blocked, but instead have their audio payload replaced by silence @@ -2858,7 +2874,7 @@ silence_media("directional"); silence_media("address=192.168.42.42"); ... -6.17. unsilence_media([flags]) +7.17. unsilence_media([flags]) Identical to “unblock_media” except that it's the counterpart to “silence_media”. @@ -2871,7 +2887,7 @@ unsilence_media(); unsilence_media("all"); ... -6.18. start_forwarding([flags]) +7.18. start_forwarding([flags]) Controls the PCM forwarding feature of the recording daemon. Unlike the recording feature, PCM forwarding can be done directionally for @@ -2887,7 +2903,7 @@ start_forwarding("directional"); start_forwarding("address=192.168.42.42"); ... -6.19. stop_forwarding([flags]) +7.19. stop_forwarding([flags]) Analogous to “unblock_dtmf”, but controls the PCM forwarding feature instead of DTMF blocking. @@ -2900,7 +2916,7 @@ stop_forwarding(); stop_forwarding("all"); ... -6.20. play_media([flags]) +7.20. play_media([flags]) Instructs rtpengine to play a prerecorded announcement to the selected call participant, either from a local file or from a file stored in a @@ -2919,7 +2935,7 @@ play_media("file=/use/share/media/hello.wav"); play_media("from-tag=tfugklbildfydrtuykgfv db-id=12345"); ... -6.21. stop_media([flags]) +7.21. stop_media([flags]) Stops the playback of media previously started by “play_media”. Media playback is automatically stopped when the end of the media file is @@ -2931,7 +2947,7 @@ stop_media(); stop_media("from-tag=5yqaeriguhxcikxj"); ... -6.22. play_dtmf([flags]) +7.22. play_dtmf([flags]) Injects a DTMF event into the media stream. Depending on which codecs were negotiated, this either injects an RFC 2833/4733 DTMF event, or an @@ -2962,12 +2978,12 @@ play_dtmf("from-tag=5yqaeriguhxcikxj code=#"); play_dtmf("code=1 volume=5 duration=300 pause=150"); ... -7. Exported Pseudo Variables +8. Exported Pseudo Variables - 7.1. $rtpestat - 7.2. $rtpstat + 8.1. $rtpestat + 8.2. $rtpstat -7.1. $rtpestat +8.1. $rtpestat Returns the RTP statistics from the RTP relay. The RTP statistics from the RTP relay are provided as a string and it does contain several @@ -2982,19 +2998,19 @@ play_dtmf("code=1 volume=5 duration=300 pause=150"); ackets, 0 errors ... -7.2. $rtpstat +8.2. $rtpstat Same as $rtpestat. -8. RPC Commands +9. RPC Commands - 8.1. rtpengine.reload - 8.2. rtpengine.enable proxy_url/all 0/1 - 8.3. rtpengine.show proxy_url/all - 8.4. rtpengine.ping proxy_url/all - 8.5. rtpengine.get_hash_total + 9.1. rtpengine.reload + 9.2. rtpengine.enable proxy_url/all 0/1 + 9.3. rtpengine.show proxy_url/all + 9.4. rtpengine.ping proxy_url/all + 9.5. rtpengine.get_hash_total -8.1. rtpengine.reload +9.1. rtpengine.reload Reloads the database node table content if configured. Returns specific message related to success, failure and no db_url configured. @@ -3011,7 +3027,7 @@ ackets, 0 errors $ kamcmd rtpengine.reload ... -8.2. rtpengine.enable proxy_url/all 0/1 +9.2. rtpengine.enable proxy_url/all 0/1 Enables a RTP proxy if the second parameter value is greater than 0. Disables it if a zero value is given. The first parameter is either a @@ -3044,7 +3060,7 @@ $ kamcmd rtpengine.enable ::udp6:fe80::9a90:96ff:fea8:fd99:9999 1 $ kamcmd rtpengine.enable all 1 ... -8.3. rtpengine.show proxy_url/all +9.3. rtpengine.show proxy_url/all Displays all the RTP proxies and their information: set and status (disabled or not, weight and recheck_ticks). If a RTP proxy has been @@ -3067,7 +3083,7 @@ $ kamcmd rtpengine.show ::udp6:fe80::9a90:96ff:fea8:fd99:9999 $ kamcmd rtpengine.show all ... -8.4. rtpengine.ping proxy_url/all +9.4. rtpengine.ping proxy_url/all Sends an application ping command to the RTP proxy. If the proxy does not respond, it will be disabled, but not permanent. If the proxy @@ -3087,7 +3103,7 @@ $ kamcmd rtpengine.ping ::udp6:fe80::9a90:96ff:fea8:fd99:9999 $ kamcmd rtpengine.ping all ... -8.5. rtpengine.get_hash_total +9.5. rtpengine.get_hash_total Print the total number of hash entries in the hash table at a given moment. @@ -3097,11 +3113,11 @@ $ kamcmd rtpengine.ping all $ kamcmd rtpengine.get_hash_total ... -9. Event routes +10. Event routes - 9.1. rtpengine:dtmf-event + 10.1. rtpengine:dtmf-event -9.1. rtpengine:dtmf-event +10.1. rtpengine:dtmf-event When defined, the module calls event_route[rtpengine:dtmf-event] when a DTMF is received. diff --git a/src/modules/rtpengine/doc/rtpengine_admin.xml b/src/modules/rtpengine/doc/rtpengine_admin.xml index bfd4aa92a..9df4f20c0 100644 --- a/src/modules/rtpengine/doc/rtpengine_admin.xml +++ b/src/modules/rtpengine/doc/rtpengine_admin.xml @@ -19,8 +19,8 @@ This is a module that enables media streams to be proxied via an &rtp; proxy. The only &rtp; proxy currently known to work - with this module is the Sipwise rtpengine - . + with this module is + Sipwise rtpengine. The rtpengine module is a modified version of the original rtpproxy module using a new control protocol. The module is designed to be a drop-in replacement for the old module from @@ -30,6 +30,27 @@
+
+ Recommended Version + + This control module is compatible with a wide range of versions + of Sipwise rtpengine. The version numbers follow the schema + mrXX.Y.ZZZ, with XX being the major + release number, Y the minor release number, and + ZZZ the patch level suffix. Releases with + Y equalling 5 are LTS releases and receive bug + fixes for several years. The recommended version therefore is + either the latest LTS release on the latest patch level (e.g. + mr12.5.1.46), or the latest non-LTS release if + newer features are desired (e.g. mr13.4.1.5). + + This version of &kamailio; includes a field in the control + protocol which is not supported by versions of rtpengine older + than mr12.4 and will trigger a warning log message + in these older versions. This is purely cosmetic. + +
+
Usage With Multiple RTPEngine Instances diff --git a/src/modules/rtpengine/rtpengine.c b/src/modules/rtpengine/rtpengine.c index e28051ba5..3d6fa1aee 100644 --- a/src/modules/rtpengine/rtpengine.c +++ b/src/modules/rtpengine/rtpengine.c @@ -3354,9 +3354,6 @@ static bencode_item_t *rtpp_function_call(bencode_buffer_t *bencbuf, /* initialize some basic bencode items */ if(!extra_dict) { ng_flags.dict = bencode_dictionary(bencbuf); - if(parse_by_module) { - ng_flags.flags = bencode_list(bencbuf); - } } else { ng_flags.dict = extra_dict; ng_flags.flags = bencode_dictionary_get(ng_flags.dict, "flags"); @@ -3366,6 +3363,9 @@ static bencode_item_t *rtpp_function_call(bencode_buffer_t *bencbuf, } } + if (!ng_flags.flags) + ng_flags.flags = bencode_list(bencbuf); + if(parse_by_module) { ng_flags.received_from = bencode_list(bencbuf); } @@ -3440,9 +3440,6 @@ static bencode_item_t *rtpp_function_call(bencode_buffer_t *bencbuf, if(ng_flags.direction && ng_flags.direction->child) bencode_dictionary_add( ng_flags.dict, "direction", ng_flags.direction); - /* flags */ - if(ng_flags.flags && ng_flags.flags->child) - bencode_dictionary_add(ng_flags.dict, "flags", ng_flags.flags); /* replace */ if(ng_flags.replace && ng_flags.replace->child) bencode_dictionary_add(ng_flags.dict, "replace", ng_flags.replace); @@ -3522,6 +3519,10 @@ static bencode_item_t *rtpp_function_call(bencode_buffer_t *bencbuf, sip_type_strings[msg->first_line.type]); } + /* flags */ + if(ng_flags.flags && ng_flags.flags->child) + bencode_dictionary_add(ng_flags.dict, "flags", ng_flags.flags); + /* add rtpp flags, if parsed by daemon */ if(!parse_by_module && flags) bencode_dictionary_add_str(ng_flags.dict, "rtpp-flags", flags); diff --git a/src/modules/ruxc/CMakeLists.txt b/src/modules/ruxc/CMakeLists.txt index ba7a3c822..2c128ad5f 100644 --- a/src/modules/ruxc/CMakeLists.txt +++ b/src/modules/ruxc/CMakeLists.txt @@ -7,7 +7,6 @@ pkg_check_modules(libruxc REQUIRED IMPORTED_TARGET libruxc) add_library(libruxc::libruxc ALIAS PkgConfig::libruxc) if(APPLE) - target_link_libraries(${module_name} PRIVATE "-framework CoreFoundation" - "-framework Security") + target_link_libraries(${module_name} PRIVATE "-framework CoreFoundation" "-framework Security") endif() target_link_libraries(${module_name} PRIVATE libruxc::libruxc) diff --git a/src/modules/sctp/CMakeLists.txt b/src/modules/sctp/CMakeLists.txt index 0913855cb..760adaed1 100644 --- a/src/modules/sctp/CMakeLists.txt +++ b/src/modules/sctp/CMakeLists.txt @@ -6,7 +6,8 @@ add_library(${module_name} SHARED ${MODULE_SOURCES}) find_path( SCTP_INCLUDE_DIR NAMES sctp.h - PATHS /usr/include /usr/local/include /usr/include/netinet) + PATHS /usr/include /usr/local/include /usr/include/netinet +) if(NOT SCTP_INCLUDE_DIR) message(FATAL_ERROR "sctp.h not found. maybe missing libsctp-dev?") @@ -18,7 +19,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") find_library( SCTP_LIBRARY NAMES sctp - PATHS /usr/lib /usr/local/lib) + PATHS /usr/lib /usr/local/lib + ) target_link_libraries(${module_name} PRIVATE ${SCTP_LIBRARY}) endif() diff --git a/src/modules/secsipid_proc/CMakeLists.txt b/src/modules/secsipid_proc/CMakeLists.txt index 56477b483..c429a3f82 100644 --- a/src/modules/secsipid_proc/CMakeLists.txt +++ b/src/modules/secsipid_proc/CMakeLists.txt @@ -9,8 +9,7 @@ pkg_check_modules(secsipid-1 REQUIRED IMPORTED_TARGET secsipid-1) add_library(secsipid ALIAS PkgConfig::secsipid-1) if(APPLE) - target_link_libraries(${module_name} PRIVATE "-framework CoreFoundation" - "-framework Security") + target_link_libraries(${module_name} PRIVATE "-framework CoreFoundation" "-framework Security") endif() target_link_libraries(${module_name} PRIVATE secsipid Threads::Threads) diff --git a/src/modules/sms/libsms_getsms.c b/src/modules/sms/libsms_getsms.c index 1909c78bc..f7cfdd6f3 100644 --- a/src/modules/sms/libsms_getsms.c +++ b/src/modules/sms/libsms_getsms.c @@ -187,9 +187,9 @@ static int fetchsms(struct modem *mdm, int sim, char *pdu) memcpy(pdu, beginning, clen); pdu[clen] = '\0'; } else { - /* truncate */ - memcpy(pdu, beginning, SMS_BUF_SIZE - 1); - pdu[SMS_BUF_SIZE - 1] = '\0'; + /* unsuppported length */ + LM_ERR("failed storing message for sim %i (len: %d)\n", sim, clen); + return 0; } return sim; @@ -248,7 +248,7 @@ int check_memory(struct modem *mdm, int flag) } } } /* if(strstr) */ - } /* if(put_command) */ + } /* if(put_command) */ /* if we are here -> some error happened */ if(checkmodem(mdm) != 0) { LM_WARN("something happened with the modem -> was reinit -> let's " @@ -432,6 +432,10 @@ static int splitpdu(struct modem *mdm, char *pdu, struct incame_sms *sms) start += 3; end = strstr(start, "\","); if(end != 0) { + if(end - start >= SMS_NAME_LEN) { + /* too long */ + return -1; + } memcpy(sms->name, start, end - start); sms->name[end - start] = 0; } else { diff --git a/src/modules/snmpstats/CMakeLists.txt b/src/modules/snmpstats/CMakeLists.txt index ac416979d..3c5f24282 100644 --- a/src/modules/snmpstats/CMakeLists.txt +++ b/src/modules/snmpstats/CMakeLists.txt @@ -10,5 +10,7 @@ target_link_libraries(${module_name} PRIVATE NETSNMP::NETSNMP) install( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/mibs - DESTINATION ${CMAKE_INSTALL_DATADIR}/snmp/ - OPTIONAL) + DESTINATION ${CMAKE_INSTALL_DATADIR}/snmp + OPTIONAL + COMPONENT ${group_name} +) diff --git a/src/modules/statsd/README b/src/modules/statsd/README index ed29ed492..9acd78770 100644 --- a/src/modules/statsd/README +++ b/src/modules/statsd/README @@ -25,25 +25,33 @@ Eloy Coto Pereiro 3. Functions - 3.1. statsd_set(key, value) - 3.2. statsd_gauge(key, value) - 3.3. statsd_histogram(key, value) + 3.1. statsd_set(key, value[, labels]) + 3.2. statsd_gauge(key, value[, labels]) + 3.3. statsd_histogram(key, value[, labels]) 3.4. statsd_start(key) - 3.5. statsd_stop(key) - 3.6. statsd_incr(key) - 3.7. statsd_decr(key) + 3.5. statsd_stop(key[, labels]) + 3.6. statsd_incr(key[, labels]) + 3.7. statsd_decr(key[, labels]) + + 4. KEMI bindings List of Examples 1.1. Set ip parameter 1.2. Set port parameter 1.3. statsd_set usage - 1.4. statsd_gauge usage - 1.5. statsd_histogram usage - 1.6. statsd_start usage - 1.7. statsd_stop usage - 1.8. statsd_incr usage - 1.9. statsd_decr usage + 1.4. statsd_set usage with labels + 1.5. statsd_gauge usage + 1.6. statsd_gauge usage with labels + 1.7. statsd_histogram usage + 1.8. statsd_histogram usage with labels + 1.9. statsd_start usage + 1.10. statsd_stop usage + 1.11. statsd_stop usage with labels + 1.12. statsd_incr usage + 1.13. statsd_incr usage with labels + 1.14. statsd_decr usage + 1.15. statsd_decr usage with labels Chapter 1. Admin Guide @@ -57,23 +65,27 @@ Chapter 1. Admin Guide 3. Functions - 3.1. statsd_set(key, value) - 3.2. statsd_gauge(key, value) - 3.3. statsd_histogram(key, value) + 3.1. statsd_set(key, value[, labels]) + 3.2. statsd_gauge(key, value[, labels]) + 3.3. statsd_histogram(key, value[, labels]) 3.4. statsd_start(key) - 3.5. statsd_stop(key) - 3.6. statsd_incr(key) - 3.7. statsd_decr(key) + 3.5. statsd_stop(key[, labels]) + 3.6. statsd_incr(key[, labels]) + 3.7. statsd_decr(key[, labels]) + + 4. KEMI bindings 1. Overview - The module provides the ability to send commands to statsd (you can use - InfluxDB too) with different types of information. It provides native - integration with statsd (https://github.com/etsy/statsd/) and graphite - (http://graphite.wikidot.com/). + The module implements the statsd text protocol, allowing Kamailio to + emit counters, gauges, histograms and timers to any server that + understands statsd semantics. Typical destinations include the + reference Etsy/Graphite daemon, InfluxDB via Telegraf listeners, or any + other statsd-compatible collector. - The module does not have any special dependency, it does a direct - socket connection to Graphite. + The implementation has no special external dependencies; it opens a UDP + socket to the configured host and sends the raw statsd datagrams, so + any standards-compliant server can receive them. 2. Parameters @@ -104,21 +116,24 @@ modparam("statsd", "port", "8125") 3. Functions - 3.1. statsd_set(key, value) - 3.2. statsd_gauge(key, value) - 3.3. statsd_histogram(key, value) + 3.1. statsd_set(key, value[, labels]) + 3.2. statsd_gauge(key, value[, labels]) + 3.3. statsd_histogram(key, value[, labels]) 3.4. statsd_start(key) - 3.5. statsd_stop(key) - 3.6. statsd_incr(key) - 3.7. statsd_decr(key) + 3.5. statsd_stop(key[, labels]) + 3.6. statsd_incr(key[, labels]) + 3.7. statsd_decr(key[, labels]) -3.1. statsd_set(key, value) +3.1. statsd_set(key, value[, labels]) Sets count the number of unique values passed to a key. If this method is called multiple times with the same userid in the same sample period, that userid will only be counted once. + Optional labels supply a comma-separated list of key:value tags; omit + the argument to emit the metric untagged. + This function can be used in ALL ROUTES. Example 1.3. statsd_set usage @@ -130,7 +145,12 @@ failure_route[tryagain] { } ... -3.2. statsd_gauge(key, value) + Example 1.4. statsd_set usage with labels +... +statsd_set("active_users", $var(count), "cluster:a,region:$var(region)"); +... + +3.2. statsd_gauge(key, value[, labels]) Gauges are a constant data type. They are not subject to averaging and they don't change unless you change them. That is, once you set a gauge @@ -142,8 +162,10 @@ failure_route[tryagain] { This function can be used in ALL ROUTES. The statsd server collects gauges under the stats.gauges prefix. + Optional labels supply a comma-separated list of key:value tags; omit + the argument to emit the metric untagged. - Example 1.4. statsd_gauge usage + Example 1.5. statsd_gauge usage ... route [gauge_method]{ statsd_gauge("method"+$rm, "+1"); @@ -151,7 +173,12 @@ route [gauge_method]{ } ... -3.3. statsd_histogram(key, value) + Example 1.6. statsd_gauge usage with labels +... +statsd_gauge("method"+$rm, "+1", "node:$si"); +... + +3.3. statsd_histogram(key, value[, labels]) The histograms are a measure of time, but they are calculated at the server side. As the data exported by the client is the same, this is @@ -160,13 +187,19 @@ route [gauge_method]{ This function can be used in ALL ROUTES. The statsd server collects histograms under the stats.histograms - prefix. + prefix. Optional labels supply a comma-separated list of key:value + tags; omit the argument to emit the metric untagged. - Example 1.5. statsd_histogram usage + Example 1.7. statsd_histogram usage ... statsd_histogram("latency", 1000); ... + Example 1.8. statsd_histogram usage with labels +... +statsd_histogram("latency", 1000, "method:"+$rm+",peer:"+$si); +... + 3.4. statsd_start(key) statsd_start set an avp with the key name, and when statsd_stop(key) is @@ -181,51 +214,89 @@ route [gauge_method]{ count of each timer for each period (by the time it can be seen in graphite, that's usually per minute). - Example 1.6. statsd_start usage + Example 1.9. statsd_start usage ... statsd_start("long_mysql_query"); sql_query("ca", "select sleep(0.2)", "ra"); statsd_stop("long_mysql_query"); ... -3.5. statsd_stop(key) +3.5. statsd_stop(key[, labels]) statsd_stop(key) get the avp string with the key and calculate the difference from the start time. When finished the milliseconds used will be sent to statsd. + Optional labels supply a comma-separated list of key:value tags; omit + the argument to emit the metric untagged. + This function can be used in all routes. - Example 1.7. statsd_stop usage + Example 1.10. statsd_stop usage ... statsd_start("long_mysql_query"); sql_query("ca", "select sleep(0.2)", "ra"); statsd_stop("long_mysql_query"); ... -3.6. statsd_incr(key) + Example 1.11. statsd_stop usage with labels +... +statsd_start("long_mysql_query"); +sql_query("ca", "select sleep(0.2)", "ra"); +statsd_stop("long_mysql_query", "db:replica,shard:$var(shard)"); +... + +3.6. statsd_incr(key[, labels]) Increment a statsd counter This function can be used in all routes. - Example 1.8. statsd_incr usage + Optional labels supply a comma-separated list of key:value tags; omit + the argument to emit the metric untagged. + + Example 1.12. statsd_incr usage ... if(geoip_match("$si", "src")){ statsd_incr("country."+$(gip(src=>cc))); } ... -3.7. statsd_decr(key) + Example 1.13. statsd_incr usage with labels +... +if(geoip_match("$si", "src")){ + statsd_incr("country."+$(gip(src=>cc)), "asn:"+$(gip(src=>asn))); +} +... + +3.7. statsd_decr(key[, labels]) Decrement a counter This function can be used in all routes. - Example 1.9. statsd_decr usage + Example 1.14. statsd_decr usage ... if (t_check_status("408")) { statsd_decr("kamailio.successfulCalls"); statsd_incr("kamailio.reply.timeout"); } ... + + Example 1.15. statsd_decr usage with labels +... +if (t_check_status("408")) { + statsd_decr("kamailio.successfulCalls", "response:timeout"); + statsd_incr("kamailio.reply.timeout", "response:timeout"); +} +... + +4. KEMI bindings + + All of the functionality above is also exported to Kamailio's scripting + interfaces (Lua, Python, JS, etc.) via the statsd KEMI module. For + every function that accepts labels there is a companion name suffixed + with _labels. For example, statsd_gauge and statsd_labels_gauge, + statsd_histogram and statsd_labels_histogram, statsd_set and + statsd_labels_set, statsd_incr and statsd_labels_incr, and so on. + Timers are exposed as statsd_start, statsd_stop and statsd_labels_stop. diff --git a/src/modules/statsd/doc/statsd_admin.xml b/src/modules/statsd/doc/statsd_admin.xml index 2be8355f4..723364d9f 100644 --- a/src/modules/statsd/doc/statsd_admin.xml +++ b/src/modules/statsd/doc/statsd_admin.xml @@ -16,14 +16,16 @@
Overview - The module provides the ability to send commands to statsd - (you can use InfluxDB too) with different types of information. - It provides native integration with statsd (https://github.com/etsy/statsd/) - and graphite (http://graphite.wikidot.com/). + The module implements the statsd + text protocol, allowing Kamailio to emit counters, gauges, histograms and + timers to any server that understands statsd semantics. Typical + destinations include the reference Etsy/Graphite daemon, InfluxDB via + Telegraf listeners, or any other statsd-compatible collector. - The module does not have any special dependency, it does a direct - socket connection to Graphite. + The implementation has no special external dependencies; it opens a UDP + socket to the configured host and sends the raw statsd datagrams, so any + standards-compliant server can receive them.
@@ -68,21 +70,25 @@ modparam("statsd", "port", "8125")
Functions -
- - <function moreinfo="none">statsd_set(key, value)</function> - - - Sets count the number of unique values passed to a key. - - - If this method is called multiple times with the same userid in the same sample period, that userid will only be counted once. - - - This function can be used in ALL ROUTES. - - - <function>statsd_set</function> usage +
+ + <function moreinfo="none">statsd_set(key, value[, labels])</function> + + + Sets count the number of unique values passed to a key. + + + If this method is called multiple times with the same userid in the same sample period, that userid will only be counted once. + + + Optional labels supply a comma-separated list of key:value tags; omit + the argument to emit the metric untagged. + + + This function can be used in ALL ROUTES. + + + <function>statsd_set</function> usage ... failure_route[tryagain] { @@ -93,12 +99,20 @@ failure_route[tryagain] { ... + + <function>statsd_set</function> usage with labels + +... +statsd_set("active_users", $var(count), "cluster:a,region:$var(region)"); +... + +
-
- - <function moreinfo="none">statsd_gauge(key, value)</function> - +
+ + <function moreinfo="none">statsd_gauge(key, value[, labels])</function> + Gauges are a constant data type. They are not subject to averaging and they don't change unless you change them. That is, once you set @@ -111,10 +125,12 @@ failure_route[tryagain] { This function can be used in ALL ROUTES. - The statsd server collects gauges under the stats.gauges prefix. - - - <function>statsd_gauge</function> usage + The statsd server collects gauges under the stats.gauges prefix. Optional + labels supply a comma-separated list of key:value tags; omit the argument + to emit the metric untagged. + + + <function>statsd_gauge</function> usage ... route [gauge_method]{ @@ -124,12 +140,20 @@ route [gauge_method]{ ... + + <function>statsd_gauge</function> usage with labels + +... +statsd_gauge("method"+$rm, "+1", "node:$si"); +... + +
-
- - <function moreinfo="none">statsd_histogram(key, value)</function> - +
+ + <function moreinfo="none">statsd_histogram(key, value[, labels])</function> + The histograms are a measure of time, but they are calculated at the server side. As the data exported by the client is the same, this is just an alias for the Timer type. @@ -139,19 +163,29 @@ route [gauge_method]{ The statsd server collects histograms under the stats.histograms prefix. - - - <function>statsd_histogram</function> usage + Optional labels supply a comma-separated list of key:value tags; omit + the argument to emit the metric untagged. + + + <function>statsd_histogram</function> usage ... statsd_histogram("latency", 1000); ... + + <function>statsd_histogram</function> usage with labels + +... +statsd_histogram("latency", 1000, "method:"+$rm+",peer:"+$si); +... + +
-
- - <function moreinfo="none">statsd_start(key)</function> + <section id="statsd.f.statsd_start"> + <title> + <function moreinfo="none">statsd_start(key)</function> statsd_start set an avp with the key name, and when @@ -167,7 +201,7 @@ route [gauge_method]{ timer for each period (by the time it can be seen in graphite, that's usually per minute). - <function>statsd_start</function> usage + <function>statsd_start</function> usage ... statsd_start("long_mysql_query"); @@ -179,19 +213,23 @@ statsd_stop("long_mysql_query");
-
- - <function moreinfo="none">statsd_stop(key)</function> - - - statsd_stop(key) get the avp string with the key and calculate the - difference from the start time. When finished the milliseconds used will be sent to statsd. - +
+ + <function moreinfo="none">statsd_stop(key[, labels])</function> + + + statsd_stop(key) get the avp string with the key and calculate the + difference from the start time. When finished the milliseconds used will be sent to statsd. + + + Optional labels supply a comma-separated list of key:value tags; omit the + argument to emit the metric untagged. + This function can be used in all routes. - <function>statsd_stop</function> usage + <function>statsd_stop</function> usage ... statsd_start("long_mysql_query"); @@ -200,20 +238,34 @@ statsd_stop("long_mysql_query"); ... + + <function>statsd_stop</function> usage with labels + +... +statsd_start("long_mysql_query"); +sql_query("ca", "select sleep(0.2)", "ra"); +statsd_stop("long_mysql_query", "db:replica,shard:$var(shard)"); +... + +
-
- - <function moreinfo="none">statsd_incr(key)</function> - +
+ + <function moreinfo="none">statsd_incr(key[, labels])</function> + Increment a statsd counter This function can be used in all routes. + + Optional labels supply a comma-separated list of key:value tags; omit the + argument to emit the metric untagged. + - <function>statsd_incr</function> usage + <function>statsd_incr</function> usage ... if(geoip_match("$si", "src")){ @@ -222,12 +274,22 @@ if(geoip_match("$si", "src")){ ... -
+ + <function>statsd_incr</function> usage with labels + +... +if(geoip_match("$si", "src")){ + statsd_incr("country."+$(gip(src=>cc)), "asn:"+$(gip(src=>asn))); +} +... + + +
-
- - <function moreinfo="none">statsd_decr(key)</function> - +
+ + <function moreinfo="none">statsd_decr(key[, labels])</function> + Decrement a counter @@ -235,7 +297,7 @@ if(geoip_match("$si", "src")){ This function can be used in all routes. - <function>statsd_decr</function> usage + <function>statsd_decr</function> usage ... if (t_check_status("408")) { @@ -245,7 +307,35 @@ if (t_check_status("408")) { ... -
-
- + + <function>statsd_decr</function> usage with labels + +... +if (t_check_status("408")) { + statsd_decr("kamailio.successfulCalls", "response:timeout"); + statsd_incr("kamailio.reply.timeout", "response:timeout"); +} +... + + +
+
+
+ KEMI bindings + + All of the functionality above is also exported to Kamailio's scripting + interfaces (Lua, Python, JS, etc.) via the statsd KEMI module. For every + function that accepts labels there is a companion name suffixed with + _labels. For example, + statsd_gauge and statsd_labels_gauge, + statsd_histogram and + statsd_labels_histogram, + statsd_set and statsd_labels_set, + statsd_incr and statsd_labels_incr, + and so on. Timers are exposed as statsd_start, + statsd_stop and statsd_labels_stop. + +
+ + diff --git a/src/modules/stun/kam_stun.c b/src/modules/stun/kam_stun.c index b5f2c105b..68ee45bbb 100644 --- a/src/modules/stun/kam_stun.c +++ b/src/modules/stun/kam_stun.c @@ -125,7 +125,7 @@ int process_stun_msg(char *buf, unsigned len, struct receive_info *ri) #endif /* send STUN response */ - if(msg_send(&dst, msg_res.msg.buf.s, msg_res.msg.buf.len) != 0) { + if(msg_send_buffer(&dst, msg_res.msg.buf.s, msg_res.msg.buf.len, 1) != 0) { goto error; } diff --git a/src/modules/sworker/README b/src/modules/sworker/README index 132f3165f..d0c587d59 100644 --- a/src/modules/sworker/README +++ b/src/modules/sworker/README @@ -30,7 +30,7 @@ Daniel-Constantin Mierla 4. Functions 4.1. sworker_active() - 4.2. swork_task(gname) + 4.2. sworker_task(gname) List of Examples @@ -55,7 +55,7 @@ Chapter 1. Admin Guide 4. Functions 4.1. sworker_active() - 4.2. swork_task(gname) + 4.2. sworker_task(gname) 1. Overview @@ -113,7 +113,7 @@ modparam("sworker", "xdata", "$var(xdata)") 4. Functions 4.1. sworker_active() - 4.2. swork_task(gname) + 4.2. sworker_task(gname) 4.1. sworker_active() @@ -132,7 +132,7 @@ request_route { } ... -4.2. swork_task(gname) +4.2. sworker_task(gname) Delegate the processing of SIP message to a group of async workers. The function is restricted to be used inside event_route[core:pre-routing]. diff --git a/src/modules/sworker/doc/sworker_admin.xml b/src/modules/sworker/doc/sworker_admin.xml index 3f8d5148d..408776cb4 100644 --- a/src/modules/sworker/doc/sworker_admin.xml +++ b/src/modules/sworker/doc/sworker_admin.xml @@ -120,9 +120,9 @@ request_route {
-
+
- <function moreinfo="none">swork_task(gname)</function> + <function moreinfo="none">sworker_task(gname)</function> Delegate the processing of SIP message to a group of async workers. The diff --git a/src/modules/timer/doc/timer.xml b/src/modules/timer/doc/timer.xml index cbfb23941..97d0dbbf0 100644 --- a/src/modules/timer/doc/timer.xml +++ b/src/modules/timer/doc/timer.xml @@ -28,274 +28,6 @@ - - Admin Guide -
- Overview - - The module supports triggering a specific route block on a specific timer. - The timer can be activated and de-activated from the routing script at runtime. - -
+ -
- Dependencies -
- &kamailio; Modules - - The following modules must be loaded before this module: - - - - none - - - - -
-
- External Libraries or Applications - - The following libraries or applications must be - installed before - running &kamailio; with this module loaded: - - - - none. - - - - -
-
- -
- ABNF syntax - -... - timer_id = alphanum - slow_fast = "slow" | "fast" - declare_timer_syntax = timer_id "=" (route#|route_name) "," interval "," slow_fast "," ["enable"] - enable_disable = "0" | "1" -... - -
- -
- - Parameters - -
- <varname>declare_timer</varname> (string) - - Declares timer route which will be called in specific interval. - - - The format is: - - - declare_timer = declare_timer_syntax - - - - - timer_id is timer identifier. - - - route is handler to be called when - timer is triggered. It has to be a route block name when native - scripting is used, or Kemi function name. The Kemi function - name receives one string parameter (for now it has a static - value, respectively the module name). - - - interval is timer interval in milliseconds, - - - slow_fast determines if handler will be - hooked in slow or fast timer queue, fast timer handler returns - as quickly as possible, slow timer handler may spend longer time, - see kamailio/doc/timers.txt documentation. - - - enable - enable timer when &kamailio; is starting, - otherwise use timer_enable to start it later. - - - - - Example <varname>declare_timer</varname> - -... -modparam("timer", "declare_timer", "MY_TIMER=MY_TIMER_ROUTE,10,slow,enable"); -... - - -
- -
- -
- Functions - -
- - <function>timer_enable(timer_id, enable_disable)</function> - - - Enable/disable timer route specified by timer_id. - Because of timer core API the callback - is not disabled immediately but is removed from handler by - itself not to decrease performance. - Disabling and enabling in sequence may be tricky. - - - timer_id references to timer declared by - declare_timer. - - - enable_disable - set to 1 to enable timer, - to 0 to disable. - - - - - - <function>timer_enable</function> usage - -... -timer_enable("MY_TIMER", 1); -... - - -
-
- -
- Selects -
- - <function>@timer.timer.timer_id.enabled</function> - - - Return true ("1") if timer specified by timer_id is enabled, - otherwise returns false ("0"). - - - - <function>timer.timer.timer_id.enabled</function> usage - -... -if (@timer.timer.MY_TIMER.enabled == "1") { - ... -} -... - - -
- -
- - <function>@timer.executed</function> - - - Returns name of timer which has been executed, i.e. non empty value is returned only - when handler is being processed. - - - - <function>timer.executed</function> usage - -... -if (@timer.executed != "") { - # timer is being handled - ... -} -... - - -
-
- -
- Examples - - Common example using timer module - -... -loadmodule "xlog.so" -loadmodule "timer.so" - -modparam("timer", "declare_timer", "tmr1=ONTIMER,1000"); -modparam("timer", "declare_timer", "tmr2=ONTIMER2,2000,slow,enable"); - -route["print"] { - xlog("fired: $sel(@timer.executed)\n"); -} - -route["ONTIMER"] { - # do something - route("print");} - - -route["ONTIMER2"] { - # do something - timer_enable("tmr1", 0); - route("print"); -} -... - - - - - Using timer module with kemi - -... -loadmodule "timer.so" - -modparam("timer", "declare_timer", "tmr1=ksr_timer,1000"); -... - -... --- timer event callback function implemented in Lua -function ksr_timer(evname) - KSR.info("===== timer module triggered event\n"); - return 1; -end -... - - - - Using timer module for testing a functionality - - The timer module may be used to test a functionality being developed and - not requiring real request. A developer may put tested code in route section - which is called once after &kamailio; starts. - - -... -loadmodule "timer"; -loadmodule "xlog"; - -modparam("timer", "declare_timer", "TIMER_TEST=TEST,100,,enable"); - -request_route { - xlog("main route"); -} - -route[TEST] { - timer_enable("TIMER_TEST", "0"); - xlog("test start\n"); - - # add here tested functionality - - xlog("test end\n"); -} -... - - - -
-
diff --git a/src/modules/timer/doc/timer_admin.xml b/src/modules/timer/doc/timer_admin.xml new file mode 100644 index 000000000..4cba4f979 --- /dev/null +++ b/src/modules/timer/doc/timer_admin.xml @@ -0,0 +1,281 @@ + + + +%docentities; + +]> + + + + Admin Guide +
+ Overview + + The module supports triggering a specific route block on a specific timer. + The timer can be activated and de-activated from the routing script at runtime. + +
+ +
+ Dependencies +
+ &kamailio; Modules + + The following modules must be loaded before this module: + + + + none + + + + +
+
+ External Libraries or Applications + + The following libraries or applications must be + installed before + running &kamailio; with this module loaded: + + + + none. + + + + +
+
+ +
+ ABNF syntax + +... + timer_id = alphanum + slow_fast = "slow" | "fast" + declare_timer_syntax = timer_id "=" (route#|route_name) "," interval "," slow_fast "," ["enable"] + enable_disable = "0" | "1" +... + +
+ +
+ + Parameters + +
+ <varname>declare_timer</varname> (string) + + Declares timer route which will be called in specific interval. + + + The format is: + + + declare_timer = declare_timer_syntax + + + + + timer_id is timer identifier. + + + route is handler to be called when + timer is triggered. It has to be a route block name when native + scripting is used, or Kemi function name. The Kemi function + name receives one string parameter (for now it has a static + value, respectively the module name). + + + interval is timer interval in milliseconds, + + + slow_fast determines if handler will be + hooked in slow or fast timer queue, fast timer handler returns + as quickly as possible, slow timer handler may spend longer time, + see kamailio/doc/timers.txt documentation. + + + enable - enable timer when &kamailio; is starting, + otherwise use timer_enable to start it later. + + + + + Example <varname>declare_timer</varname> + +... +modparam("timer", "declare_timer", "MY_TIMER=MY_TIMER_ROUTE,10,slow,enable"); +... + + +
+ +
+ +
+ Functions + +
+ + <function>timer_enable(timer_id, enable_disable)</function> + + + Enable/disable timer route specified by timer_id. + Because of timer core API the callback + is not disabled immediately but is removed from handler by + itself not to decrease performance. + Disabling and enabling in sequence may be tricky. + + + timer_id references to timer declared by + declare_timer. + + + enable_disable - set to 1 to enable timer, + to 0 to disable. + + + + + + <function>timer_enable</function> usage + +... +timer_enable("MY_TIMER", 1); +... + + +
+
+ +
+ Selects +
+ + <function>@timer.timer.timer_id.enabled</function> + + + Return true ("1") if timer specified by timer_id is enabled, + otherwise returns false ("0"). + + + + <function>timer.timer.timer_id.enabled</function> usage + +... +if (@timer.timer.MY_TIMER.enabled == "1") { + ... +} +... + + +
+ +
+ + <function>@timer.executed</function> + + + Returns name of timer which has been executed, i.e. non empty value is returned only + when handler is being processed. + + + + <function>timer.executed</function> usage + +... +if (@timer.executed != "") { + # timer is being handled + ... +} +... + + +
+
+ +
+ Examples + + Common example using timer module + +... +loadmodule "xlog.so" +loadmodule "timer.so" + +modparam("timer", "declare_timer", "tmr1=ONTIMER,1000"); +modparam("timer", "declare_timer", "tmr2=ONTIMER2,2000,slow,enable"); + +route["print"] { + xlog("fired: $sel(@timer.executed)\n"); +} + +route["ONTIMER"] { + # do something + route("print");} + + +route["ONTIMER2"] { + # do something + timer_enable("tmr1", 0); + route("print"); +} +... + + + + + Using timer module with kemi + +... +loadmodule "timer.so" + +modparam("timer", "declare_timer", "tmr1=ksr_timer,1000"); +... + +... +-- timer event callback function implemented in Lua +function ksr_timer(evname) + KSR.info("===== timer module triggered event\n"); + return 1; +end +... + + + + Using timer module for testing a functionality + + The timer module may be used to test a functionality being developed and + not requiring real request. A developer may put tested code in route section + which is called once after &kamailio; starts. + + +... +loadmodule "timer"; +loadmodule "xlog"; + +modparam("timer", "declare_timer", "TIMER_TEST=TEST,100,,enable"); + +request_route { + xlog("main route"); +} + +route[TEST] { + timer_enable("TIMER_TEST", "0"); + xlog("test start\n"); + + # add here tested functionality + + xlog("test end\n"); +} +... + + + +
+
diff --git a/src/modules/tls/CMakeLists.txt b/src/modules/tls/CMakeLists.txt index f52a303a6..bf59de34f 100644 --- a/src/modules/tls/CMakeLists.txt +++ b/src/modules/tls/CMakeLists.txt @@ -4,11 +4,11 @@ add_library(${module_name} SHARED ${MODULE_SOURCES}) # Options option(LIBSSL_STATIC "Link with static libraries" OFF) -option(LIBSSL_STATIC_SRCLIB "Link with static libraries compiled from source" - OFF) +option(LIBSSL_STATIC_SRCLIB "Link with static libraries compiled from source" OFF) set(LIBSSL_STATIC_SRCPATH "/usr/local/src/openssl" - CACHE PATH "Path to the folder with static libraries compiled from source") + CACHE PATH "Path to the folder with static libraries compiled from source" +) # Find packages find_package(ZLIB REQUIRED) @@ -20,8 +20,7 @@ find_package(Threads REQUIRED) if(LIBSSL_STATIC) target_compile_definitions(${module_name} KSR_LIBSSL_STATIC) if(LIBSSL_STATIC_SRCLIB) - target_include_directories(${module_name} - PRIVATE ${LIBSSL_STATIC_SRCPATH}/include) + target_include_directories(${module_name} PRIVATE ${LIBSSL_STATIC_SRCPATH}/include) target_link_directories(${module_name} PRIVATE ${LIBSSL_STATIC_SRCPATH}) else() # Static linking with system libraries Note: This assumes the static @@ -29,13 +28,13 @@ if(LIBSSL_STATIC) set(OPENSSL_USE_STATIC_LIBS TRUE) find_package(OpenSSL REQUIRED) # TODO: Check if this is needed: -Wl,-Bstatic - target_link_libraries(${module_name} PRIVATE OpenSSL::SSL OpenSSL::Crypto - ZLIB::ZLIB) + target_link_libraries(${module_name} PRIVATE OpenSSL::SSL OpenSSL::Crypto ZLIB::ZLIB) endif() else() find_package(OpenSSL REQUIRED) - target_link_libraries(${module_name} PRIVATE OpenSSL::SSL OpenSSL::Crypto - ZLIB::ZLIB Threads::Threads) + target_link_libraries( + ${module_name} PRIVATE OpenSSL::SSL OpenSSL::Crypto ZLIB::ZLIB Threads::Threads + ) endif() # Install the configuration file (tls.cfg) using a CODE block to check @@ -58,7 +57,8 @@ install( PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) endif() " - COMPONENT tls-cfg) + COMPONENT ${group_name} +) add_custom_command( OUTPUT tls.cfg.sample @@ -66,7 +66,8 @@ add_custom_command( sed -e "s#\/usr/local/etc/kamailio/#${CMAKE_INSTALL_FULL_SYSCONFDIR}#g" -e "s#kamailio-selfsigned#${MAIN_NAME}-selfsigned#g" < tls.cfg > ${CMAKE_CURRENT_BINARY_DIR}/tls.cfg.sample - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +) # Always build/generate tls.cfg.sample in the build directory # This is needed for the default install target to pick it up @@ -75,7 +76,8 @@ add_custom_target(tls_cfg_sample ALL DEPENDS tls.cfg.sample) add_custom_target( tls-install-cfg COMMAND ${CMAKE_COMMAND} --install ${CMAKE_BINARY_DIR} --component tls-cfg - COMMENT "Installing tls.cfg.sample to ${MAIN_NAME} config directory") + COMMENT "Installing tls.cfg.sample to ${MAIN_NAME} config directory" +) add_dependencies(tls-install-cfg tls_cfg_sample) # Add tls-cert target @@ -84,4 +86,5 @@ add_custom_target( COMMAND ${CMAKE_COMMAND} -E env MAIN_NAME=${MAIN_NAME} ./tls_cert.sh -d ${CMAKE_INSTALL_FULL_SYSCONFDIR} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMENT "Generating self-signed certificates for ${MAIN_NAME}") + COMMENT "Generating self-signed certificates for ${MAIN_NAME}" +) diff --git a/src/modules/tlsa/CMakeLists.txt b/src/modules/tlsa/CMakeLists.txt index d60560c39..a72f900d8 100644 --- a/src/modules/tlsa/CMakeLists.txt +++ b/src/modules/tlsa/CMakeLists.txt @@ -12,8 +12,7 @@ find_package(Threads REQUIRED) if(LIBSSL_STATIC) target_compile_definitions(${module_name} KSR_LIBSSL_STATIC) if(LIBSSL_STATIC_SRCLIB) - target_include_directories(${module_name} - PRIVATE ${LIBSSL_STATIC_SRCPATH}/include) + target_include_directories(${module_name} PRIVATE ${LIBSSL_STATIC_SRCPATH}/include) target_link_directories(${module_name} PRIVATE ${LIBSSL_STATIC_SRCPATH}) else() # Static linking with system libraries Note: This assumes the static @@ -21,11 +20,11 @@ if(LIBSSL_STATIC) set(OPENSSL_USE_STATIC_LIBS TRUE) find_package(OpenSSL REQUIRED) # TODO: Check if this is needed: -Wl,-Bstatic - target_link_libraries(${module_name} PRIVATE OpenSSL::SSL OpenSSL::Crypto - ZLIB::ZLIB) + target_link_libraries(${module_name} PRIVATE OpenSSL::SSL OpenSSL::Crypto ZLIB::ZLIB) endif() else() find_package(OpenSSL REQUIRED) - target_link_libraries(${module_name} PRIVATE OpenSSL::SSL OpenSSL::Crypto - ZLIB::ZLIB Threads::Threads) + target_link_libraries( + ${module_name} PRIVATE OpenSSL::SSL OpenSSL::Crypto ZLIB::ZLIB Threads::Threads + ) endif() diff --git a/src/modules/tm/CMakeLists.txt b/src/modules/tm/CMakeLists.txt index ba90e2400..fcc0c0260 100644 --- a/src/modules/tm/CMakeLists.txt +++ b/src/modules/tm/CMakeLists.txt @@ -2,6 +2,4 @@ file(GLOB MODULE_SOURCES "*.c") add_library(${module_name} SHARED ${MODULE_SOURCES}) -if(${FLAVOUR} STREQUAL "kamailio") - target_compile_definitions(${module_name} PRIVATE WITH_EVENT_LOCAL_REQUEST) -endif() +target_compile_definitions(${module_name} PRIVATE WITH_EVENT_LOCAL_REQUEST) diff --git a/src/modules/tm/h_table.c b/src/modules/tm/h_table.c index 632303b67..81cfb4a12 100644 --- a/src/modules/tm/h_table.c +++ b/src/modules/tm/h_table.c @@ -275,7 +275,7 @@ void free_cell_helper( } -static inline void init_synonym_id(struct sip_msg *p_msg, char *hash) +static inline void init_synonym_id(struct sip_msg *p_msg, char *hashval) { int size; char *c; @@ -286,7 +286,7 @@ static inline void init_synonym_id(struct sip_msg *p_msg, char *hash) * calculated out of header-fields forming * transaction key */ - char_msg_val(p_msg, hash); + char_msg_val(p_msg, hashval); } else { /* char value for a UAC transaction is created * randomly -- UAC is an originating stateful element @@ -295,7 +295,7 @@ static inline void init_synonym_id(struct sip_msg *p_msg, char *hash) */ /* HACK : not long enough */ myrand = kam_rand(); - c = hash; + c = hashval; size = MD5_LEN; memset(c, '0', size); int2reverse_hex(&c, &size, myrand); diff --git a/src/modules/tm/t_msgbuilder.c b/src/modules/tm/t_msgbuilder.c index d9231486c..86e8ede0d 100644 --- a/src/modules/tm/t_msgbuilder.c +++ b/src/modules/tm/t_msgbuilder.c @@ -1786,7 +1786,9 @@ char *build_uac_req(str *method, str *headers, str *body, dlg_t *dialog, /* Server signature */ if(server_signature && user_agent_hdr.len > 0) { memapp(w, user_agent_hdr.s, user_agent_hdr.len); - memapp(w, CRLF, CRLF_LEN); + if(user_agent_hdr.s[user_agent_hdr.len - 1] != '\n') { + memapp(w, CRLF, CRLF_LEN); + } } if(headers && headers->len > 2) { memapp(w, headers->s, headers->len); diff --git a/src/modules/tm/uac.c b/src/modules/tm/uac.c index c28067c9d..16a98425a 100644 --- a/src/modules/tm/uac.c +++ b/src/modules/tm/uac.c @@ -671,11 +671,12 @@ static inline int t_uac_prepare( #ifdef DIALOG_CALLBACKS run_trans_dlg_callbacks(uac_r->dialog, new_cell, request); #endif /* DIALOG_CALLBACKS */ - if(dst_req) + if(dst_req != NULL) { *dst_req = request; - if(dst_cell) + } + if(dst_cell != NULL) { *dst_cell = new_cell; - else if(is_ack && dst_req == 0) { + } else if(is_ack && dst_req == NULL) { free_cell(new_cell); } @@ -749,6 +750,7 @@ static inline int send_prepared_request_impl( struct ua_client *uac; struct ip_addr ip; /* logging */ int ret; + int osnd; t = request->my_T; uac = &t->uac[branch]; @@ -765,9 +767,11 @@ static inline int send_prepared_request_impl( LM_DBG("uac: %p branch: %d to %s:%d\n", uac, branch, ip_addr2a(&ip), su_getport(&uac->request.dst.to)); - if(run_onsend(p_msg, &uac->request.dst, uac->request.buffer, - uac->request.buffer_len) - == 0) { + osnd = run_onsend(p_msg, &uac->request.dst, uac->request.buffer, + uac->request.buffer_len); + t_uas_request_clean_parsed(t); + + if(osnd == 0) { uac->last_received = _tm_reply_408_code; su2ip_addr(&ip, &uac->request.dst.to); LM_DBG("onsend_route dropped msg. to %s:%d (%d)\n", ip_addr2a(&ip), diff --git a/src/modules/topoh/th_msg.c b/src/modules/topoh/th_msg.c index 54d3caffe..63a6eb72d 100644 --- a/src/modules/topoh/th_msg.c +++ b/src/modules/topoh/th_msg.c @@ -828,7 +828,6 @@ int th_update_hdr_replaces(sip_msg_t *msg) struct lump *l; str out; - LM_DBG("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); if(th_param_mask_callid == 0) return 0; @@ -843,6 +842,7 @@ int th_update_hdr_replaces(sip_msg_t *msg) if(hf == NULL) return 0; + LM_DBG("preparing to update the Replaces header\n"); replaces = hf->body; trim(&replaces); rcallid.s = replaces.s; diff --git a/src/modules/topos/tps_msg.c b/src/modules/topos/tps_msg.c index 7fff763fe..f2d823343 100644 --- a/src/modules/topos/tps_msg.c +++ b/src/modules/topos/tps_msg.c @@ -331,8 +331,13 @@ int tps_dlg_message_update(sip_msg_t *msg, tps_data_t *ptsd, int ctmode) return 1; } /* find the r-uri parameter */ - ret = tps_get_param_value( - &msg->parsed_uri.params, &_tps_cparam_name, &tuuid); + if(msg->parsed_uri.sip_params.len > 0) { + ret = tps_get_param_value( + &msg->parsed_uri.sip_params, &_tps_cparam_name, &tuuid); + } else { + ret = tps_get_param_value( + &msg->parsed_uri.params, &_tps_cparam_name, &tuuid); + } if(ret < 0) { LM_ERR("failed to parse param\n"); return -1; diff --git a/src/modules/topos/tps_storage.h b/src/modules/topos/tps_storage.h index 245a15956..ef2a81067 100644 --- a/src/modules/topos/tps_storage.h +++ b/src/modules/topos/tps_storage.h @@ -48,7 +48,7 @@ #define TPS_DBU_TIME (1 << 4) #define TPS_DBU_ALL (0xffffffff) -#define TPS_DATA_SIZE 8192 +#define TPS_DATA_SIZE 16384 typedef struct tps_data { char cbuf[TPS_DATA_SIZE]; diff --git a/src/modules/topos_redis/CMakeLists.txt b/src/modules/topos_redis/CMakeLists.txt index c4ca770ac..fdc521777 100644 --- a/src/modules/topos_redis/CMakeLists.txt +++ b/src/modules/topos_redis/CMakeLists.txt @@ -3,7 +3,7 @@ file(GLOB MODULE_SOURCES "*.c") add_library(${module_name} SHARED ${MODULE_SOURCES}) find_package(PkgConfig REQUIRED) -pkg_check_modules(redis REQUIRED IMPORTED_TARGET hiredis) -add_library(redis::redis ALIAS PkgConfig::redis) +pkg_check_modules(hiredis REQUIRED IMPORTED_TARGET hiredis) +add_library(hiredis::hiredis ALIAS PkgConfig::hiredis) -target_link_libraries(${module_name} PRIVATE redis::redis) +target_link_libraries(${module_name} PRIVATE hiredis::hiredis) diff --git a/src/modules/tsilo/CMakeLists.txt b/src/modules/tsilo/CMakeLists.txt index ba90e2400..fcc0c0260 100644 --- a/src/modules/tsilo/CMakeLists.txt +++ b/src/modules/tsilo/CMakeLists.txt @@ -2,6 +2,4 @@ file(GLOB MODULE_SOURCES "*.c") add_library(${module_name} SHARED ${MODULE_SOURCES}) -if(${FLAVOUR} STREQUAL "kamailio") - target_compile_definitions(${module_name} PRIVATE WITH_EVENT_LOCAL_REQUEST) -endif() +target_compile_definitions(${module_name} PRIVATE WITH_EVENT_LOCAL_REQUEST) diff --git a/src/modules/uac/replace.c b/src/modules/uac/replace.c index b7a2b8b38..61d57bbfd 100644 --- a/src/modules/uac/replace.c +++ b/src/modules/uac/replace.c @@ -50,9 +50,9 @@ extern struct rr_binds uac_rrb; extern str restore_from_avp; extern str restore_to_avp; -extern unsigned short restore_from_avp_type; +extern avp_flags_t restore_from_avp_type; extern int_str restore_from_avp_name; -extern unsigned short restore_to_avp_type; +extern avp_flags_t restore_to_avp_type; extern int_str restore_to_avp_name; struct dlg_binds dlg_api; diff --git a/src/modules/uac/uac.c b/src/modules/uac/uac.c index 456781eae..9d2773e05 100644 --- a/src/modules/uac/uac.c +++ b/src/modules/uac/uac.c @@ -439,6 +439,7 @@ static int child_init(int rank) if(cfg_child_init()) return -1; + cfg_update(); uac_reg_load_db(); LM_DBG("run initial uac registration routine\n"); uac_reg_timer(0); diff --git a/src/modules/xhttp_pi/CMakeLists.txt b/src/modules/xhttp_pi/CMakeLists.txt index 227e2dfff..ac2a97354 100644 --- a/src/modules/xhttp_pi/CMakeLists.txt +++ b/src/modules/xhttp_pi/CMakeLists.txt @@ -26,10 +26,12 @@ install( PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) endif() " - COMPONENT xhttp_pi-cfg) + COMPONENT ${group_name} +) +# TODO: component does not exist. fix this add_custom_target( xhttp_pi-install-cfg COMMENT "Installing pi_framework.xml" - COMMAND ${CMAKE_COMMAND} --install ${CMAKE_BINARY_DIR} --component - xhttp_pi-cfg) + COMMAND ${CMAKE_COMMAND} --install ${CMAKE_BINARY_DIR} --component xhttp_pi-cfg +) diff --git a/src/modules/xhttp_prom/prom.c b/src/modules/xhttp_prom/prom.c index a1aedcc7e..da4f5e1cd 100644 --- a/src/modules/xhttp_prom/prom.c +++ b/src/modules/xhttp_prom/prom.c @@ -191,14 +191,19 @@ static int metric_generate( (uint64_t)ts); /* Print metric name. */ - if(prom_body_name_printf(ctx, "%.*s%.*s_%.*s%s", xhttp_prom_beginning.len, - xhttp_prom_beginning.s, group->len, group->s, name->len, name->s, - xhttp_prom_tags_braces) + if(prom_body_name_printf(ctx, "%.*s%.*s_%.*s", xhttp_prom_beginning.len, + xhttp_prom_beginning.s, group->len, group->s, name->len, name->s) == -1) { LM_ERR("Fail to print\n"); return -1; } + /* xhttp_prom_tags_braces is not sanitized any more because UTF-8 characters are allowed */ + if(prom_body_printf(ctx, "%s", xhttp_prom_tags_braces) == -1) { + LM_ERR("Fail to print\n"); + return -1; + } + if(prom_body_printf(ctx, " %lu %" PRIu64 "\n", counter_val, (uint64_t)ts) == -1) { LM_ERR("Fail to print\n"); @@ -296,7 +301,7 @@ static int prom_metric_pkgmem_print(prom_ctx_t *ctx) goto error; } if(prom_body_printf(ctx, - "%.*spkgmem_total_size{pid=\"%u\", rank=\"%d\" " + "%.*spkgmem_total_size{pid=\"%u\", rank=\"%d\", " "desc=\"%s\"%s} %lu %" PRIu64 "\n", xhttp_prom_beginning.len, xhttp_prom_beginning.s, pkg_proc_stats[i].pid, pkg_proc_stats[i].rank, pt[i].desc, diff --git a/src/modules/xhttp_rpc/xhttp_rpc.c b/src/modules/xhttp_rpc/xhttp_rpc.c index b9c627631..37f768195 100644 --- a/src/modules/xhttp_rpc/xhttp_rpc.c +++ b/src/modules/xhttp_rpc/xhttp_rpc.c @@ -322,7 +322,11 @@ static int print_value(rpc_ctx_t *ctx, char fmt, va_list *ap, str *id) break; case 'S': sp = va_arg(*ap, str *); - body = *sp; + if(sp) { + body = *sp; + } else { + body = (str)str_init("<null>"); + } break; default: body.len = 0; diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt index 87238d50e..55d2ab29a 100644 --- a/utils/CMakeLists.txt +++ b/utils/CMakeLists.txt @@ -2,11 +2,13 @@ file( GLOB children RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} LIST_DIRECTORIES true - *) + * +) foreach(child ${children}) if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${child} - AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${child}/CMakeLists.txt) + AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${child}/CMakeLists.txt + ) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${child}) endif() endforeach() diff --git a/utils/db_berkeley/CMakeLists.txt b/utils/db_berkeley/CMakeLists.txt index e6b8fddbc..a6e378b24 100644 --- a/utils/db_berkeley/CMakeLists.txt +++ b/utils/db_berkeley/CMakeLists.txt @@ -9,4 +9,6 @@ target_link_libraries(kamdb_recover PRIVATE BerkeleyDB::BerkeleyDB) install( TARGETS kamdb_recover DESTINATION ${CMAKE_INSTALL_SBINDIR} - OPTIONAL) + OPTIONAL + COMPONENT ${group_name} +) diff --git a/utils/kamcmd/CMakeLists.txt b/utils/kamcmd/CMakeLists.txt index f984415ed..d6efb555d 100644 --- a/utils/kamcmd/CMakeLists.txt +++ b/utils/kamcmd/CMakeLists.txt @@ -3,11 +3,12 @@ set(KAMCMD_UTIL_SRC_NAME "kamcmd") set(KAMCMD_CUSTOM_NAME "" - CACHE STRING "Custom name for the kamcmd util") + CACHE STRING "Custom name for the kamcmd util" +) if(NOT KAMCMD_CUSTOM_NAME) set(NAME "kamcmd") # Hardcoded name if empty -elseif() +else() set(NAME "${KAMCMD_CUSTOM_NAME}") endif() @@ -25,17 +26,22 @@ endif() include(${CMAKE_SOURCE_DIR}/cmake/utils.cmake) -target_sources(${NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/kamcmd.c - ${CMAKE_CURRENT_SOURCE_DIR}/parse_listen_id.c) +target_sources( + ${NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/kamcmd.c + ${CMAKE_CURRENT_SOURCE_DIR}/parse_listen_id.c +) target_link_libraries(${NAME} PRIVATE common_utils) target_compile_definitions( - ${NAME} - PRIVATE NAME="${NAME}" SRNAME="${MAIN_NAME}" VERSION="${KAMCMD_RELEASE}" - RUN_DIR="/${CMAKE_INSTALL_LOCALSTATEDIR}/run/${MAIN_NAME}" - __OS_${OS_LOWER}) + ${NAME} PRIVATE NAME="${NAME}" SRNAME="${MAIN_NAME}" VERSION="${KAMCMD_RELEASE}" + RUN_DIR="/${CMAKE_INSTALL_LOCALSTATEDIR}/run/${MAIN_NAME}" __OS_${OS_LOWER} +) -install(TARGETS ${NAME} DESTINATION ${CMAKE_INSTALL_SBINDIR}) +install( + TARGETS ${NAME} + DESTINATION ${CMAKE_INSTALL_SBINDIR} + COMPONENT kamailio-core +) # Man page generation add_custom_command( @@ -44,16 +50,17 @@ add_custom_command( sed -e "s#/etc/${CFG_NAME}/${CFG_NAME}\.cfg#${CMAKE_INSTALL_FULL_SYSCONFDIR}/${MAIN_NAME}/${MAIN_NAME}.cfg#g" -e "s#/usr/sbin/#${CMAKE_INSTALL_FULL_SBINDIR}/#g" -e - "s#/usr/lib/${CFG_NAME}/modules/#${CMAKE_INSTALL_FULL_LIBDIR}/${MAIN_NAME}/#g" - -e "s#/usr/share/doc/${CFG_NAME}/#${CMAKE_INSTALL_FULL_DOCDIR}/#g" -e - "s#${SRC_NAME}#${MAIN_NAME}#g" < ${CMAKE_CURRENT_SOURCE_DIR}/kamcmd.8 > - ${CMAKE_CURRENT_BINARY_DIR}/kamcmd.8 - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/kamcmd.8) + "s#/usr/lib/${CFG_NAME}/modules/#${CMAKE_INSTALL_FULL_LIBDIR}/${MAIN_NAME}/#g" -e + "s#/usr/share/doc/${CFG_NAME}/#${CMAKE_INSTALL_FULL_DOCDIR}/#g" < + ${CMAKE_CURRENT_SOURCE_DIR}/kamcmd.8 > ${CMAKE_CURRENT_BINARY_DIR}/kamcmd.8 + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/kamcmd.8 +) add_custom_target(kamcmd_man DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/kamcmd.8) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kamcmd.8 DESTINATION ${CMAKE_INSTALL_MANDIR}/man8 - COMPONENT kamailio_man - OPTIONAL) + COMPONENT kamailio-core + OPTIONAL +) diff --git a/utils/kamctl/CMakeLists.txt b/utils/kamctl/CMakeLists.txt index ec59dfb61..80c70544f 100644 --- a/utils/kamctl/CMakeLists.txt +++ b/utils/kamctl/CMakeLists.txt @@ -2,128 +2,60 @@ project(kamailio_utils) get_property(FINAL_MODULES_LIST GLOBAL PROPERTY ADDED_MODULES_LIST) -set(BIN_DIR "${CMAKE_INSTALL_FULL_SBINDIR}") -set(LIB_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/${MAIN_NAME}") -set(CFG_DIR "${CMAKE_INSTALL_FULL_SYSCONFDIR}/${MAIN_NAME}") -set(SHARE_DIR "${CMAKE_INSTALL_FULL_DATADIR}/${MAIN_NAME}") +include(${CMAKE_SOURCE_DIR}/cmake/db_files.cmake) -set(KAMCTL_BASE_FILES kamctl.base kamctl.ctlbase kamctl.rpcfifo kamctl.ser - kamctl.sqlbase) - -if("db_berkeley" IN_LIST FINAL_MODULES_LIST) - set(KAMCTL_DB_FILES ${KAMCTL_DB_FILES} kamctl.db_berkeley) -endif() -if("db_text" IN_LIST FINAL_MODULES_LIST) - set(KAMCTL_DB_FILES ${KAMCTL_DB_FILES} kamctl.dbtext) -endif() -if("db_mysql" IN_LIST FINAL_MODULES_LIST) - set(KAMCTL_DB_FILES ${KAMCTL_DB_FILES} kamctl.mysql) -endif() -if("db_oracle" IN_LIST FINAL_MODULES_LIST) - set(KAMCTL_DB_FILES ${KAMCTL_DB_FILES} kamctl.oracle) -endif() -if("db_postgres" IN_LIST FINAL_MODULES_LIST) - set(KAMCTL_DB_FILES ${KAMCTL_DB_FILES} kamctl.pgsql) -endif() -if("db_sqlite" IN_LIST FINAL_MODULES_LIST) - set(KAMCTL_DB_FILES ${KAMCTL_DB_FILES} kamctl.sqlite) -endif() - -# Create the depependencies list for the target kamctl -set(KAMCTL_DEPENDENCIES "") +# --- kamctl --- +set(KAMCTL_BASE_FILES kamctl.base kamctl.ctlbase kamctl.rpcfifo kamctl.ser kamctl.sqlbase) # Install kamctl.base and the rest -foreach(file IN LISTS KAMCTL_BASE_FILES KAMCTL_DB_FILES) - # Append to the depependencies list for the target kamctl - list(APPEND KAMCTL_DEPENDENCIES "${CMAKE_CURRENT_BINARY_DIR}/${file}") - # Process the file with sed and install it - add_custom_command( - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${file}" - COMMAND - sed -e "s#/usr/local/sbin#${BIN_DIR}#g" < - ${CMAKE_CURRENT_SOURCE_DIR}/${file} > ${CMAKE_CURRENT_BINARY_DIR}/${file} - COMMENT "Processed ${file} with sed") - install( - PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${file} - DESTINATION ${CMAKE_INSTALL_LIBDIR}/${MAIN_NAME}/kamctl - COMPONENT kamailio-utils-bin) +foreach(file IN LISTS KAMCTL_BASE_FILES) + add_kamctl_db_files("kamailio-core" ${file}) endforeach() # Kamctl target to depend on all kamctl files # Install kamctl and it's database files +get_property(KAMCTL_DEPENDENCIES GLOBAL PROPERTY KAMCTL_DEPENDENCIES) add_custom_target( kamctl ALL COMMAND - sed -e "s#/usr/local/sbin#${BIN_DIR}#g" -e - "s#/usr/local/lib/kamailio#${LIB_DIR}#g" -e - "s#/usr/local/etc/kamailio#${CFG_DIR}#g" < - ${CMAKE_CURRENT_SOURCE_DIR}/kamctl > ${CMAKE_CURRENT_BINARY_DIR}/kamctl - DEPENDS ${KAMCTL_DEPENDENCIES} - COMMENT "Build kamctl and its dependencies") + sed -e "s#/usr/local/sbin#${BIN_DIR}#g" -e "s#/usr/local/lib/kamailio#${LIB_DIR}#g" -e + "s#/usr/local/etc/kamailio#${CFG_DIR}#g" < ${CMAKE_CURRENT_SOURCE_DIR}/kamctl > + ${CMAKE_CURRENT_BINARY_DIR}/kamctl + COMMENT "Build kamctl and its dependencies" +) +add_dependencies(kamctl ${KAMCTL_DEPENDENCIES}) install( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/kamctl DESTINATION ${CMAKE_INSTALL_SBINDIR} - COMPONENT kamailio-utils-bin) + COMPONENT kamailio-core +) -# Set up and install kamdbctl stuff +# --- kamdbctl --- +# Setup and install kamdbctl stuff set(KAMDBCTL_BASE_FILES kamdbctl.base) -if("db_berkeley" IN_LIST FINAL_MODULES_LIST) - set(KAMDBCTL_DB_FILES ${KAMDBCTL_DB_FILES} kamdbctl.db_berkeley) -endif() -if("db_text" IN_LIST FINAL_MODULES_LIST) - set(KAMDBCTL_DB_FILES ${KAMDBCTL_DB_FILES} kamdbctl.dbtext) - install(PROGRAMS dbtextdb/dbtextdb.py - DESTINATION ${CMAKE_INSTALL_LIBDIR}/${MAIN_NAME}/kamctl/dbtextdb) -endif() -if("db_mysql" IN_LIST FINAL_MODULES_LIST) - set(KAMDBCTL_DB_FILES ${KAMDBCTL_DB_FILES} kamdbctl.mysql) -endif() -if("db_oracle" IN_LIST FINAL_MODULES_LIST) - set(KAMDBCTL_DB_FILES ${KAMDBCTL_DB_FILES} kamdbctl.oracle kamdbfunc.oracle) -endif() -if("db_postgres" IN_LIST FINAL_MODULES_LIST) - set(KAMDBCTL_DB_FILES ${KAMDBCTL_DB_FILES} kamdbctl.pgsql) -endif() -if("db_sqlite" IN_LIST FINAL_MODULES_LIST) - set(KAMDBCTL_DB_FILES ${KAMDBCTL_DB_FILES} kamdbctl.sqlite) -endif() - # Install kamdbctl -set(KAMDB_DEPENDENCIES "") - -foreach(file IN LISTS KAMDBCTL_BASE_FILES KAMDBCTL_DB_FILES) - list(APPEND KAMDB_DEPENDENCIES "${CMAKE_CURRENT_BINARY_DIR}/${file}") - # Install db setup base script - add_custom_command( - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${file}" - COMMAND - sed -e "s#/usr/local/sbin#${BIN_DIR}#g" -e - "s#/usr/local/etc/kamailio#${CFG_DIR}#g" -e - "s#/usr/local/share/kamailio#${SHARE_DIR}#g" < - ${CMAKE_CURRENT_SOURCE_DIR}/${file} > ${CMAKE_CURRENT_BINARY_DIR}/${file} - COMMENT "Processed ${file}") - install( - PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${file} - DESTINATION ${CMAKE_INSTALL_LIBDIR}/${MAIN_NAME}/kamctl - COMPONENT kamailio-utils-bin) +foreach(file IN LISTS KAMDBCTL_BASE_FILES) + add_kamdbctl_db_files("kamailio-core" ${file}) endforeach() +get_property(KAMDBCTL_DEPENDENCIES GLOBAL PROPERTY KAMDBCTL_DEPENDENCIES) add_custom_target( kamdbctl ALL COMMAND - sed -e "s#/usr/local/sbin#${BIN_DIR}#g" -e - "s#/usr/local/lib/kamailio#${LIB_DIR}#g" -e - "s#/usr/local/etc/kamailio#${CFG_DIR}#g" < - ${CMAKE_CURRENT_SOURCE_DIR}/kamdbctl > ${CMAKE_CURRENT_BINARY_DIR}/kamdbctl - DEPENDS ${KAMDB_DEPENDENCIES} - COMMENT "Build kamdbctl and its dependencies") + sed -e "s#/usr/local/sbin#${BIN_DIR}#g" -e "s#/usr/local/lib/kamailio#${LIB_DIR}#g" -e + "s#/usr/local/etc/kamailio#${CFG_DIR}#g" < ${CMAKE_CURRENT_SOURCE_DIR}/kamdbctl > + ${CMAKE_CURRENT_BINARY_DIR}/kamdbctl + COMMENT "Build kamdbctl and its dependencies" +) +add_dependencies(kamdbctl ${KAMDBCTL_DEPENDENCIES}) install( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/kamdbctl DESTINATION ${CMAKE_INSTALL_SBINDIR} - COMPONENT kamailio-utils-bin) + COMPONENT kamailio-core +) # Install the configuration file (kamctlrc) using a CODE block to check # existence at install time instead of configure time @@ -135,17 +67,18 @@ install( message(STATUS \"kamctlrc already exists in\${dir}/kamctlrc. Installing as kamctlrc.sample\") file(INSTALL \"${CMAKE_CURRENT_SOURCE_DIR}/kamctlrc\" - DESTINATION \"${CMAKE_INSTALL_FULL_SYSCONFDIR}/${MAIN_NAME}\" + DESTINATION \"$ENV{DESTDIR}${CMAKE_INSTALL_FULL_SYSCONFDIR}/${MAIN_NAME}\" RENAME \"kamctlrc.sample\" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ ) else() file(INSTALL \"${CMAKE_CURRENT_SOURCE_DIR}/kamctlrc\" - DESTINATION \"${CMAKE_INSTALL_FULL_SYSCONFDIR}/${MAIN_NAME}\" + DESTINATION \"$ENV{DESTDIR}${CMAKE_INSTALL_FULL_SYSCONFDIR}/${MAIN_NAME}\" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) endif() " - COMPONENT kamailio-utils-cfg) + COMPONENT kamailio-core +) # Man pages generation and installation add_custom_command( @@ -154,10 +87,11 @@ add_custom_command( sed -e "s#/etc/${CFG_NAME}/${CFG_NAME}\.cfg#${CMAKE_INSTALL_FULL_SYSCONFDIR}/${MAIN_NAME}/${MAIN_NAME}.cfg#g" -e "s#/usr/sbin/#${CMAKE_INSTALL_FULL_SBINDIR}/#g" -e - "s#/usr/lib/${CFG_NAME}/modules/#${CMAKE_INSTALL_FULL_LIBDIR}/${MAIN_NAME}/#g" - -e "s#/usr/share/doc/${CFG_NAME}/#${CMAKE_INSTALL_FULL_DOCDIR}/#g" < + "s#/usr/lib/${CFG_NAME}/modules/#${CMAKE_INSTALL_FULL_LIBDIR}/${MAIN_NAME}/#g" -e + "s#/usr/share/doc/${CFG_NAME}/#${CMAKE_INSTALL_FULL_DOCDIR}/#g" < ${CMAKE_CURRENT_SOURCE_DIR}/kamctl.8 > ${CMAKE_CURRENT_BINARY_DIR}/kamctl.8 - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/kamctl.8) + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/kamctl.8 +) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/kamdbctl.8 @@ -165,206 +99,41 @@ add_custom_command( sed -e "s#/etc/${CFG_NAME}/${CFG_NAME}\.cfg#${CMAKE_INSTALL_FULL_SYSCONFDIR}/${MAIN_NAME}/${MAIN_NAME}.cfg#g" -e "s#/usr/sbin/#${CMAKE_INSTALL_FULL_SBINDIR}/#g" -e - "s#/usr/lib/${CFG_NAME}/modules/#${CMAKE_INSTALL_FULL_LIBDIR}/${MAIN_NAME}/#g" - -e "s#/usr/share/doc/${CFG_NAME}/#${CMAKE_INSTALL_FULL_DOCDIR}/#g" < - ${CMAKE_CURRENT_SOURCE_DIR}/kamdbctl.8 > - ${CMAKE_CURRENT_BINARY_DIR}/kamdbctl.8 - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/kamdbctl.8) + "s#/usr/lib/${CFG_NAME}/modules/#${CMAKE_INSTALL_FULL_LIBDIR}/${MAIN_NAME}/#g" -e + "s#/usr/share/doc/${CFG_NAME}/#${CMAKE_INSTALL_FULL_DOCDIR}/#g" < + ${CMAKE_CURRENT_SOURCE_DIR}/kamdbctl.8 > ${CMAKE_CURRENT_BINARY_DIR}/kamdbctl.8 + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/kamdbctl.8 +) -add_custom_target(kamctl_man DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/kamctl.8 - ${CMAKE_CURRENT_BINARY_DIR}/kamdbctl.8) +add_custom_target( + kamctl_man DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/kamctl.8 ${CMAKE_CURRENT_BINARY_DIR}/kamdbctl.8 +) +# In order for these files to be installed, one has to built the kamctl_man target install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/kamctl.8 - ${CMAKE_CURRENT_BINARY_DIR}/kamdbctl.8 + FILES ${CMAKE_CURRENT_BINARY_DIR}/kamctl.8 ${CMAKE_CURRENT_BINARY_DIR}/kamdbctl.8 DESTINATION ${CMAKE_INSTALL_MANDIR}/man8 - COMPONENT kamailio_man - OPTIONAL) + COMPONENT kamailio-core + OPTIONAL +) # Install targets +# TODO: FIX IF POSSIBLE after component based-installed components do not exist # Custom target for installing the kamailio-cfg component add_custom_target( install-kamailio-utils-cfg - COMMAND ${CMAKE_COMMAND} --install ${CMAKE_BINARY_DIR} --component - kamailio-utils-cfg - COMMENT "Installing kamailio-utils-cfg component") + COMMAND ${CMAKE_COMMAND} --install ${CMAKE_BINARY_DIR} --component kamailio-utils-cfg + COMMENT "Installing kamailio-utils-cfg component" +) # Custom target for installing the kamailio-utils-bin component add_custom_target( install-kamailio-utils-bin - COMMAND ${CMAKE_COMMAND} --install ${CMAKE_BINARY_DIR} --component - kamailio-utils-bin + COMMAND ${CMAKE_COMMAND} --install ${CMAKE_BINARY_DIR} --component kamailio-utils-bin COMMENT "Installing kamailio-utils-bin component" - DEPENDS kamctl kamdbctl) + DEPENDS kamctl kamdbctl +) # Custom target for installing the kamailio-utils component add_custom_target(install-kamailio-utils COMMENT "Installing utils components") -add_dependencies(install-kamailio-utils install-kamailio-utils-cfg - install-kamailio-utils-bin) - -# ---------- - -# ---------- -# dbschema target: Old Makefiles: make dbschema declared in src/ Makefile This -# was using the makefile found in src/lib/srdb1/schema folder. -# -# TODO: Revise where we want the target declared. New CMakelists.txt Declare the -# target in srdb1 CMakeLists.txt file. - -find_program(XSLTPROC_EXECUTABLE xsltproc QUIET) - -if(NOT XSLTPROC_EXECUTABLE) - message(STATUS "xsltproc is not found. Skip dbschema target.") -else() - option(XSLT_VALIDATE, "Enable schema validation during XSL transformations" - ON) - option(XSLT_VERBOSE, "Enable verbose output for XSL transformations" OFF) - - set(XSLTPROC_FLAGS --xinclude) - if(NOT ${XSLT_VALIDATE}) - set(XSLTPROC_FLAGS ${XSLTPROC_FLAGS} --novalid) - endif() - if(${XSLT_VERBOSE}) - set(XSLTPROC_FLAGS ${XSLTPROC_FLAGS} --verbose) - endif() - - # Set the root directories - set(ROOTDIR ${CMAKE_SOURCE_DIR}) - set(STYLESHEETS ${ROOTDIR}/doc/stylesheets/dbschema_k/xsl) - set(CATALOG ${ROOTDIR}/doc/stylesheets/dbschema_k/catalog.xml) - - # List of XML files - file(GLOB TABLES "${CMAKE_SOURCE_DIR}/src/lib/srdb1/schema/kamailio-*.xml") - # message(WARNING "TABLES : ${TABLES}") - set(EXTRACTED_TABLES "") - foreach(table ${TABLES}) - get_filename_component(TABLE_NAME "${table}" NAME) - string(REPLACE "kamailio-" "" TABLE_NAME "${TABLE_NAME}") - string(REPLACE ".xml" "" TABLE_NAME "${TABLE_NAME}") - list(APPEND EXTRACTED_TABLES "${TABLE_NAME}") - endforeach() - # Output the extracted table names - if(VERBOSE) - message( - STATUS "Extracted Tables for DB schema generation: ${EXTRACTED_TABLES}") - endif() - - # Function to add a target for each database type prefix with dbschema ie - # db_name = redis -> target = dbschema_redis - function(add_db_target db_name xsl_file) - # Change name for the folder - if(db_name STREQUAL "pi_framework_table" OR db_name STREQUAL - "pi_framework_mod") - set(db_name_folder xhttp_pi) - else() - set(db_name_folder ${db_name}) - endif() - - add_custom_target( - dbschema_${db_name} - COMMAND ${CMAKE_COMMAND} -E make_directory "${db_name_folder}" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMENT "Creating schemas for ${db_name}") - - # Loop through each table and add a command for xsltproc - foreach(table ${EXTRACTED_TABLES}) - # Determine the prefix based on db_name - if(db_name STREQUAL "db_berkeley" - OR db_name STREQUAL "db_redis" - OR db_name STREQUAL "dbtext" - OR db_name STREQUAL "mongodb") - set(prefix '') - set(folder_suffix "${MAIN_NAME}") - else() - set(prefix "${table}-") - set(folder_suffix '') - endif() - - add_custom_command( - TARGET dbschema_${db_name} - PRE_BUILD - COMMAND - XML_CATALOG_FILES=${CATALOG} ${XSLTPROC_EXECUTABLE} ${XSLTPROC_FLAGS} - --stringparam dir - ${CMAKE_CURRENT_BINARY_DIR}/${db_name_folder}/${folder_suffix} - --stringparam prefix ${prefix} --stringparam db ${db_name} ${xsl_file} - "kamailio-${table}.xml" - WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/src/lib/srdb1/schema" - COMMENT "Processing ${table} for ${db_name}") - endforeach() - - # Before installing, ensure the target is built `dbschema_${db_name}` - install( - DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${db_name_folder} - DESTINATION ${CMAKE_INSTALL_DATADIR}/${MAIN_NAME} - OPTIONAL) - - add_custom_target( - dbschema_${db_name}_clean - COMMAND ${CMAKE_COMMAND} -E remove_directory - "${CMAKE_CURRENT_BINARY_DIR}/${db_name_folder}" - COMMENT "Cleaning ${db_name} schema files") - endfunction() - - # Add targets for each database type Pi framework targets should combined into - # one - add_custom_target(dbschema COMMENT "Generating schemas for all dbs...") - add_custom_target(dbschema_clean COMMENT "Cleaning schemas for all dbs...") - - if("xhttp_pi" IN_LIST FINAL_MODULES_LIST) - add_db_target(pi_framework_table "${STYLESHEETS}/pi_framework_table.xsl") - add_db_target(pi_framework_mod "${STYLESHEETS}/pi_framework_mod.xsl") - add_custom_target(dbschema_xhttp_pi) - add_dependencies(dbschema_xhttp_pi dbschema_pi_framework_table - dbschema_pi_framework_mod) - - add_custom_target(dbschema_xhttp_pi_clean) - add_dependencies(dbschema_xhttp_pi dbschema_pi_framework_table_clean - dbschema_pi_framework_mod_clean) - - add_dependencies(dbschema dbschema_pi_framework_table - dbschema_pi_framework_mod) - add_dependencies(dbschema_clean dbschema_pi_framework_table_clean - dbschema_pi_framework_mod_clean) - endif() - if("db_mysql" IN_LIST FINAL_MODULES_LIST) - add_db_target(mysql "${STYLESHEETS}/mysql.xsl") - add_dependencies(dbschema dbschema_mysql) - add_dependencies(dbschema_clean dbschema_mysql_clean) - endif() - if("db_postgres" IN_LIST FINAL_MODULES_LIST) - add_db_target(postgres "${STYLESHEETS}/postgres.xsl") - add_dependencies(dbschema dbschema_postgres) - add_dependencies(dbschema_clean dbschema_postgres_clean) - endif() - if("db_oracle" IN_LIST FINAL_MODULES_LIST) - add_db_target(oracle "${STYLESHEETS}/oracle.xsl") - add_dependencies(dbschema dbschema_oracle) - add_dependencies(dbschema_clean dbschema_oracle_clean) - endif() - if("db_text" IN_LIST FINAL_MODULES_LIST) - add_db_target(dbtext "${STYLESHEETS}/dbtext.xsl") - add_dependencies(dbschema dbschema_dbtext) - add_dependencies(dbschema_clean dbschema_dbtext_clean) - endif() - if("db_berkeley" IN_LIST FINAL_MODULES_LIST) - add_db_target(db_berkeley "${STYLESHEETS}/db_berkeley.xsl") - add_dependencies(dbschema dbschema_db_berkeley) - add_dependencies(dbschema_clean dbschema_db_berkeley_clean) - endif() - if("db_sqlite" IN_LIST FINAL_MODULES_LIST) - add_db_target(db_sqlite "${STYLESHEETS}/db_sqlite.xsl") - add_dependencies(dbschema dbschema_db_sqlite) - add_dependencies(dbschema_clean dbschema_db_sqlite_clean) - endif() - if("db_mongodb" IN_LIST FINAL_MODULES_LIST) - add_db_target(mongodb "${STYLESHEETS}/mongodb.xsl") - add_dependencies(dbschema dbschema_mongodb) - add_dependencies(dbschema_clean dbschema_mongodb_clean) - endif() - if("db_redis" IN_LIST FINAL_MODULES_LIST) - add_db_target(db_redis "${STYLESHEETS}/db_redis.xsl") - add_dependencies(dbschema dbschema_db_redis) - add_dependencies(dbschema_clean dbschema_db_redis_clean) - endif() -endif() +add_dependencies(install-kamailio-utils install-kamailio-utils-cfg install-kamailio-utils-bin) diff --git a/utils/kamctl/generate_version_create_mongo.sh b/utils/kamctl/generate_version_create_mongo.sh new file mode 100644 index 000000000..9e95ab14d --- /dev/null +++ b/utils/kamctl/generate_version_create_mongo.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env sh + +OUTPUT_FILE="$1" +JSON_DIR="$2" + +# Create the version-create.mongo file +echo "use kamailio;" > "$OUTPUT_FILE" +echo "db.createCollection(\"version\");" >> "$OUTPUT_FILE" + +for FILE in "$JSON_DIR"/*.json; do + if [ -f "$FILE" ]; then + if [ "$FILE" != "$JSON_DIR/version.json" ]; then + VN=$(grep '"version":' "$FILE" | grep -o -E '[0-9]+') + FN=$(basename "$FILE" .json) + echo "db.getCollection(\"version\").insert({ table_name: \"$FN\", table_version: NumberInt($VN) });" >> "$OUTPUT_FILE" + fi + fi +done diff --git a/utils/kamctl/kamctlrc b/utils/kamctl/kamctlrc index 64cf34692..6971ed9f7 100644 --- a/utils/kamctl/kamctlrc +++ b/utils/kamctl/kamctlrc @@ -139,10 +139,7 @@ # ALIASES_TYPE="DB" ## control engine: RPCFIFO -## - default RPCFIFO -# CTLENGINE="RPCFIFO" - -## path to FIFO file for engine RPCFIFO +## path to FIFO file for control engine RPCFIFO # RPCFIFOPATH="/run/kamailio/kamailio_rpc.fifo" ## check ACL names; default on (1); off (0)