New upstream version 5.8.4

mr13.1 upstream/5.8.4
Victor Seva 7 months ago
parent c26360f2ce
commit 03d9b6c654

@ -1,3 +1,785 @@
===================== 2024-11-12 Version 5.8.4 Released =====================
===================== Changes Since Version 5.8.3 ===========================
commit 7d216c69fa226a06f6163a2dd006ec798d57cd95
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Nov 12 10:57:22 2024 +0100
Makefile.defs: version set to 5.8.4
commit f1b73eab3f6ab5221b65a260a9069a09535a6d86
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Nov 12 10:55:41 2024 +0100
pkg/kamailio: version set 5.8.4 for rpms and alpine
commit b0c5f1340fdedde605aafe57d2a6568b4f170249
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Nov 12 10:54:41 2024 +0100
pkg/kamailio/deb: set version to 5.8.4
commit 7c3b8823ce7ba1395e5b6c59c7e0c2aa0bbeb900
Author: anmartan <a.martin@zaleos.net>
Date: Thu Jul 4 09:30:02 2024 +0200
core: Improved URN parsing according to RFC8141
- Improved URN parsing to allow consuming URNs that contain 3 or more colons. Previosly URI parser treated some of the colons as separator between host and port causing the URN parsing to fail.
(cherry picked from commit 6cdd56bb85e1a10ebbb29c2633fb47bf7b56585e)
commit 4d7baba092a0b84ed91171af90ceaee71d0e1e05
Author: Kamailio Dev <kamailio.dev@kamailio.org>
Date: Wed Nov 6 10:31:18 2024 +0100
modules: readme files regenerated - modules ... [skip ci]
commit bf038a0a84bdecd69d749464880826f8c4b894e6
Author: Henning Westerholt <hw@gilawa.com>
Date: Tue Nov 5 16:46:11 2024 +0000
sst: use proper name for ims dialog module in docs
(cherry picked from commit 3b3c60f94dd93e460d5bda40c73b2052a4f1bf33)
commit b292837507dd60f45ebc1cca8317b6c0d8c3d369
Author: Henning Westerholt <hw@gilawa.com>
Date: Tue Nov 5 16:45:50 2024 +0000
snmpstats: use proper name for ims module in docs
(cherry picked from commit 6c408ff8c7b558a725d67898d5f1a8dc3d717c61)
commit a52fe973b064e288d9f150a6c36cb35eecb4a161
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Sun Nov 3 19:38:46 2024 +0100
timer: docs - updates to examples
(cherry picked from commit 21c7066842a034d8674e5fac2b7c6fd38b0073e8)
commit 351157cad257986a014dc659231ae0ee48a8d538
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Oct 29 08:20:44 2024 +0100
core: parser sdp - check body end for extract_ice_option()
(cherry picked from commit 79d7fae0f26f577356f017cfff5e00c348cf259c)
commit e233bc60092242e886a0336104435cd412c6ddd9
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Oct 28 20:52:19 2024 +0100
timer: export timer_enable(...) to kemi
- GH #4008
(cherry picked from commit ad919796b24d0c38af136cbad2563e6f98df4b74)
commit 08b4a6d280f851389252f4016e9032533a82e12d
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Sun Oct 27 19:45:07 2024 +0100
timer: formatted exported structures
(cherry picked from commit 8e2541ec6126b5665e92cde5eaf17f5a4970cb8d)
commit 72f08c6fff97d3a2498498eb01ce6c11a8e9f41c
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Sat Oct 26 19:33:26 2024 +0200
topos: deal with BYE without contact header for mode 1
(cherry picked from commit a4f0ee5da93ad64d449c7a95ecad2f3d70aeb975)
commit 18dad74a091e693a0bf939dddf144348409e6402
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri Oct 25 20:45:59 2024 +0200
core: parser sdp - check len gor extracting fmtp
(cherry picked from commit d10257fbfdbb3e3e73c0fe60a224585822bdd7b3)
commit fa9965d33cec01fd503bb89f2076b93aa173fd18
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Oct 24 17:40:04 2024 +0200
dispatcher: debug messages for checking active destinations
(cherry picked from commit 3e5f8deced0cb05710e631601e9098505f1d230a)
commit 19729e29b24915b84079831a37e9ade5b3a9d473
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Wed Oct 23 08:21:16 2024 +0200
topos: extended error log message
- ensure headers are parsed for storage record
(cherry picked from commit a6b924be7fd7d4ce6a92ad5a0247077b09a29474)
commit 61d3cc66f97f283c78bec77244bc61610a191ee2
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Wed Oct 23 07:48:34 2024 +0200
topos: catch ACK without contact that needs no storage updates
(cherry picked from commit 824e81319b60054feb81c37b3a8be80523f8c95d)
commit ac908d6a4cee146c35c28210fa937aa55f1cda70
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Tue Oct 22 16:29:58 2024 +0200
lrkproxy: use core str comparison functions and macros
(cherry picked from commit c67d8fa0b1015d73b34430f6f8a6afe22ca10cbe)
commit 466c5419634a7cb9c9f3cf38b15f36d603bdc1da
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Tue Oct 22 16:17:35 2024 +0200
pipelimit: use core str comparison functions
(cherry picked from commit 9ee189883549faffb21d3ae113dafd7ad95757af)
commit af963c81775b9c93d37428fe86264cb96b357f05
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Tue Oct 22 16:12:42 2024 +0200
ratelimit: use core str comparison functions
(cherry picked from commit c44a349964081d397ab9efa3504737bf369f8cf5)
commit cfb143196d0b727f16add51590bc007badde41cf
Author: Xenofon Karamanos <22965395+xkaraman@users.noreply.github.com>
Date: Thu Oct 3 08:28:50 2024 +0000
db_schema: Add ims_icscf db schema
(cherry picked from commit e2ea727988828a9683ef112637e25ee4d58032f7)
commit a97199e0114b9cfc0804c3d8f73471f58aec3432
Author: Dragos Vingarzan <vingarzan@gmail.com>
Date: Wed Oct 2 14:47:43 2024 +0200
ims_registrar_scscf: fixing em_max_expires
(cherry picked from commit 3f38206d88af0fae4c64ee3072eb78ea68f813cb)
commit 0408c2cb412f0df0a17b70aa4d15026a9ef3a9a7
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Oct 22 07:41:08 2024 +0200
core: parser sdp - check length for rtpmap extract
(cherry picked from commit c823f41350ab9186a323707e9be32e31922bec17)
commit 255db278f078c8868f28e6451d92b808fc3b6687
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Oct 22 07:34:29 2024 +0200
jwt: print decode result in error log message
(cherry picked from commit 0cbb2eb035c7d2a29ae707cde94a2c0573e0ffd5)
commit a688b24ac777cb93306a1a777e687de625d6e4d0
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Oct 17 08:21:43 2024 +0200
core: parser sdp - check if body is enough for rtpmap
(cherry picked from commit c7f89e81504c425a83f3423bc4b4d9d1a8a48909)
commit ba194c482f72618a896864d5a9738def33813050
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Wed Oct 16 11:46:37 2024 +0200
async: docs updates for async_sleep()
(cherry picked from commit cce29af41120cf30c4c22979e772d1ca666408c6)
commit 98032a98eaf764140825c4a2c0eb64a927a55c3d
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Wed Oct 16 10:49:16 2024 +0200
core: socket info - skip ipv6 link local on interface discovery
(cherry picked from commit a5b1099c9061551a0b31db8ef88efb2e376b290c)
commit 8c3eb992e07bbb0f0f9a123c124b23d510250c9b
Author: Eik Rentzow <rentzow@gmx.de>
Date: Tue Oct 8 09:11:53 2024 +0200
siputils: bug fix for sip_p_charging_vector
- Bug fix for #3929 and further improvements.
- New buffer usage for P-Charging-Vector handling.
- Added $pcv(status) pseudo-var.
- Added return values for sip_p_charging_vector().
- Much improved error case handling.
- Use send interface for icid-genearted-at:
The icid-generated-at parameter should carry the ip adress of the
egress interface and not of the interface where the message was received.
This is in accordance with other SBC solutions.
(cherry picked from commit d7c8bc5c58f672004894733d0e6d2a7cb00efe7a)
commit 13579e6d39898afbe6064c645d5a0f8ec7a69b62
Author: Eik Rentzow <rentzow@gmx.de>
Date: Tue Oct 8 07:16:55 2024 +0000
siputils/doc: updated pcv documentation [skip ci]
- Updated documentation to reflect the changes to the $pcv pseudo-var
and the sip_p_charging_vector() function.
(cherry picked from commit 05a30ed53fc5657a2d86e1c1bdb9277571a8d17e)
commit e650ace5948c76ea2d8eb7eaeebb5c349970447d
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri Oct 11 12:37:08 2024 +0200
core: parser sdp - check field length when extracting the value
(cherry picked from commit e802f9187383feb7fdd96c4ded44fda403da4535)
commit eb058dba967bb772c8413356163ec6c13533ab6b
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri Oct 11 12:00:53 2024 +0200
core: parse sdp - check for body limit on mixed content
(cherry picked from commit d4bbde619bbf808edebb31e131b3783ba2a4b34d)
commit 0ba1666fec15ed292e7fe1764bfa985ef282d84e
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri Oct 11 11:41:02 2024 +0200
core: parser sdp - check for length of sendrecv attribute
(cherry picked from commit fc4817064f81ef9a82b1b1468b1b8a4ae352c1f2)
commit a1e79755f4d2827a68f092dea1f138d02ff51f0b
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri Oct 11 11:02:35 2024 +0200
siptrace: docs for data_mode param
(cherry picked from commit 337c06b6b43606536f1d37ebfd6e4240aab9cf5a)
commit 9a24032160de4205585a890c2195c3f587247c2f
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri Oct 11 10:57:05 2024 +0200
siptrace: added parameter data_mode
- control if bind address of advertised address are used
(cherry picked from commit 9d8432f3ffb1f9d07874452e23140be21e75c530)
commit faf27cef7118a35bfab4aed5185148df6b16769b
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Wed Oct 9 19:50:48 2024 +0200
siptrace: use advertise address if set for trace mode 1 callbacks
(cherry picked from commit 9fb15e2ef93a0d606fa4c6d695a2f13a4b0a8031)
commit fab08023dc425919c77dc960b0944eb876650092
Author: aelezovic <adnan.elezovic@infobip.com>
Date: Wed Oct 9 12:17:54 2024 +0200
mongodb: fix cursor error resulting empty result set
(cherry picked from commit afebe6b2e597755ae37fd37bdf011fbb2fbbf8fe)
commit 66243e19149d3f4324089f4f54bf86089b8b72b9
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Tue Oct 8 15:03:55 2024 +0200
http_async_client: fix warning deprecated-non-prototype
> Warning: ./http_multi.h:64:5: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a subsequent definition [-Wdeprecated-non-prototype]
> 64 | int init_http_multi();
> | ^
> http_multi.c:403:5: note: conflicting prototype is here
> 403 | int init_http_multi(struct event_base *evbase, struct http_m_global *wg)
> | ^
> 1 warning generated.
(cherry picked from commit 2737bb19a363be7c0d67749b75f11c7e9d2d09f3)
commit 844a7a072abf5fad466a20bcae33e1d85844d1f4
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Tue Oct 8 14:58:40 2024 +0200
sms: fix warning and remove old logic
> Warning: libsms_getsms.c:107:25: warning: implicit conversion from 'int' to 'char' changes value from 183 to -73 [-Wconstant-conversion]
> 107 | ascii[charcounter] = 183;
> | ~ ^~~
> 1 warning generated.
(cherry picked from commit ee052fd0a7e7dc703a186a01926a8e64c635d636)
commit 8db46badd40606e910350e4ea3c28f816d3c02b6
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Tue Oct 8 14:27:03 2024 +0200
kazoo: fix deprecation warning
fixes #3466
From https://github.com/alanxz/rabbitmq-c/blob/c3e4176659aac7d0e497da90a46c08c63b98282a/include/rabbitmq-c/ssl_socket.h#L250
> * \deprecated Since v0.13.0 this is a no-op. OpenSSL automatically manages
> * library initialization and uninitialization.
> Warning: kz_amqp.c:857:3: warning: 'amqp_set_initialize_ssl_library' is deprecated [-Wdeprecated-declarations]
> amqp_set_initialize_ssl_library(1);
> ^
> /usr/include/rabbitmq-c/ssl_socket.h:249:1: note: 'amqp_set_initialize_ssl_library' has been explicitly marked deprecated here
> AMQP_DEPRECATED_EXPORT
> ^
> /usr/include/rabbitmq-c/export.h:29:46: note: expanded from macro 'AMQP_DEPRECATED_EXPORT'
> # define AMQP_DEPRECATED_EXPORT AMQP_EXPORT AMQP_DEPRECATED
> ^
> /usr/include/rabbitmq-c/export.h:25:43: note: expanded from macro 'AMQP_DEPRECATED'
> # define AMQP_DEPRECATED __attribute__ ((__deprecated__))
> ^
> 1 warning generated.
(cherry picked from commit eeb17678d77548073a59b54c0a08ebdb48b25fa2)
commit 02efd2aad688b2eec0bff7b743ce4b97128f0db1
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Tue Oct 8 14:17:34 2024 +0200
rabbitmq: remove deprecation warning
From https://github.com/alanxz/rabbitmq-c/blob/c3e4176659aac7d0e497da90a46c08c63b98282a/include/rabbitmq-c/ssl_socket.h#L250
> * \deprecated Since v0.13.0 this is a no-op. OpenSSL automatically manages
> * library initialization and uninitialization.
> Warning: rabbitmq.c:574:3: warning: 'amqp_set_initialize_ssl_library' is deprecated [-Wdeprecated-declarations]
> amqp_set_initialize_ssl_library(1);
> ^
> /usr/include/rabbitmq-c/ssl_socket.h:249:1: note: 'amqp_set_initialize_ssl_library' has been explicitly marked deprecated here
> AMQP_DEPRECATED_EXPORT
> ^
> /usr/include/rabbitmq-c/export.h:29:46: note: expanded from macro 'AMQP_DEPRECATED_EXPORT'
> # define AMQP_DEPRECATED_EXPORT AMQP_EXPORT AMQP_DEPRECATED
> ^
> /usr/include/rabbitmq-c/export.h:25:43: note: expanded from macro 'AMQP_DEPRECATED'
> # define AMQP_DEPRECATED __attribute__ ((__deprecated__))
> ^
> 1 warning generated.
(cherry picked from commit a2f7147dded679d025a902aa12beb048ee714c32)
commit 2ad5b019f6c2a2afee8f0d575f92a02d375c0b54
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Tue Oct 8 13:26:32 2024 +0200
ims_usrloc_pcscf: fix warning deprecated-non-prototype
> In file included from usrloc_db.c:12:
> Warning: ./usrloc_db.h:131:5: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a subsequent definition [-Wdeprecated-non-prototype]
> int use_location_pcscf_table();
> ^
> usrloc_db.c:113:5: note: conflicting prototype is here
> int use_location_pcscf_table(str *domain)
> ^
> 1 warning generated.
(cherry picked from commit 35a87c98f4e84b65f82376dfb57050f43d0f355f)
commit b55acf4ce764da70f7bd78e05598b681ef92775c
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Tue Oct 8 13:20:18 2024 +0200
ims_usrloc_pcscf: fix warnings deprecated-non-prototype
> In file included from pcontact.c:46:
> Warning: ./pcontact.h:63:5: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a subsequent definition [-Wdeprecated-non-prototype]
> int new_pcontact(
> ^
> pcontact.c:166:5: note: conflicting prototype is here
> int new_pcontact(struct udomain *_d, str *_contact, struct pcontact_info *_ci,
> ^
> 1 warning generated.
> Warning: udomain.c:232:17: warning: passing arguments to 'new_pcontact' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
> if(new_pcontact(_d->name, _contact, _ci, _c) < 0) {
> ^
> 1 warning generated.
(cherry picked from commit 7dcc8405ccec19132d27516426137e35e464d4ad)
commit 6bec8ed087c308c504da7ad217b55e1b5d81a090
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Tue Oct 8 13:10:57 2024 +0200
cdp: fix warning deprecated-non-prototype
> Warning: peerstatemachine.c:120:19: warning: passing arguments to 'log_peer_list' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
> log_peer_list(L_INFO);
> ^
> Warning: peerstatemachine.c:182:19: warning: passing arguments to 'log_peer_list' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
> log_peer_list(L_INFO);
> ^
> Warning: peerstatemachine.c:395:19: warning: passing arguments to 'log_peer_list' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
> log_peer_list(L_INFO);
> ^
> Warning: peerstatemachine.c:400:19: warning: passing arguments to 'log_peer_list' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
> log_peer_list(L_INFO);
> ^
> Warning: peerstatemachine.c:420:19: warning: passing arguments to 'log_peer_list' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
> log_peer_list(L_INFO);
> ^
> Warning: peerstatemachine.c:462:19: warning: passing arguments to 'log_peer_list' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
> log_peer_list(L_INFO);
> ^
> Warning: peerstatemachine.c:467:19: warning: passing arguments to 'log_peer_list' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
> log_peer_list(L_INFO);
> ^
> 7 warnings generated.
(cherry picked from commit f49012d15a06b27875cf6bca211ad953968b5217)
commit fa959e8cfda491612b7a13d1a18772400ddb8b96
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Tue Oct 8 13:07:37 2024 +0200
presence: fix warning conflicting prototype
> Warning: presence_dmq.c:38:5: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a subsequent definition [-Wdeprecated-non-prototype]
> int pres_dmq_send_all_presentities();
> ^
> presence_dmq.c:487:5: note: conflicting prototype is here
> int pres_dmq_send_all_presentities(dmq_node_t *dmq_node)
> ^
> 1 warning generated.
(cherry picked from commit 03e49d4e1d806f39ee6aadaedd183a6578108d96)
commit 170d35f1f14f71f69bdfa6586997def8ddbdfd11
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Tue Oct 8 13:01:03 2024 +0200
tm: fix warning uninitialized variable
> Warning: t_fwd.c:1919:46: warning: variable 'port' is uninitialized when used here [-Wuninitialized]
> ret = forward_request_uac(p_msg, &host, port, &dst);
> ^~~~
> t_fwd.c:1843:21: note: initialize the variable 'port' to silence this warning
> unsigned short port;
> ^
> = 0
> 1 warning generated.
(cherry picked from commit ce4107a6f654a4bc4462efb90f3cc5e8c73bf9ed)
commit b553882d8d87d3891f387832fe2d56223ef03624
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Tue Oct 8 10:59:16 2024 +0200
core/rand: fix -Wdeprecated-non-prototype
> Warning: core/rand/isaac/rand.c:28:6: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
> void isaac(ctx) randctx *ctx;
> ^
> Warning: core/rand/isaac/rand.c:81:6: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
> void randinit(ctx, flag) randctx *ctx;
(cherry picked from commit 9475837b209c91366e8bb40416552b02c13aaf3a)
commit 1d216f8764ebb0e8f78764e3778f34ab1cb3fa23
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Sep 30 15:40:47 2024 +0200
core: socket info - do not use interface index as internal array index
- there are cases when the interface number is high, even if there are
only a few real network interfaces, which can result in inability to
listen on them
(cherry picked from commit 7acfe7723b4772ca45ce31ae98bf3d0b6948f50a)
commit f3d510f6f1f59bb33ff6e3df08863f6a81d67d5d
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Sep 30 12:54:11 2024 +0200
core: socket info - relocate check for index to get more debugging details
(cherry picked from commit b7dcbc37aceaefecf9a0f7367526a331d42269ea)
commit 004e0e056178dfbaa1aca6e8d7364417dd115bb4
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Wed Sep 25 10:07:44 2024 +0200
core: print errno on tcp bind failure
- log message with value of sr_bind_ipv6_link_local
(cherry picked from commit 621f3132708405939d3a40fb98ae57b793cd246e)
commit 95371808084c547e01daf3ecdc7124c70dde78f5
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Wed Sep 18 19:22:53 2024 +0200
core: reqorked check for incompatible modes of bind_ipv6_link_local
(cherry picked from commit f7045d1c08d37e91ee7e96e415c06b218aee98fd)
commit 8331cb1f87b31f66f87a90e7fbaa2553ea3f2728
Author: Thomas <1258170+ThomasSevestre@users.noreply.github.com>
Date: Mon Sep 2 20:27:26 2024 +0200
topos_redis : show redis error for post mortem analysis
(cherry picked from commit 72889e945041b6475a43c371aa4e20e99f5d1240)
commit 24651787d54746647614be111ee5cb583e3da430
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Wed Sep 18 09:52:32 2024 +0200
core: use advertise port only when set for via header
(cherry picked from commit abaf42a735b00af8cbfec90888d2ef3397e5040d)
commit 96ebad5d1a3650961ca6e3cd22d4da0dec0929a6
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Mon Sep 16 19:37:03 2024 +0200
app_jsdt: add support for loong64
From: liuxiang <liuxiang@loongson.cn>
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1060901
fixes #3976
(cherry picked from commit 5746db1c5a99eaeaf7f97d520232f014548c912d)
commit 1cd3b749e699f2b83752a5b6c1b29f16084820d0
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Sep 16 15:27:42 2024 +0200
core: proper condition for bind_ipv6_link_local modes
(cherry picked from commit 99710daa8b05a0a37ef3bb35e2ffd723908037f4)
commit c62a1b6efd10f5c46cf87a9ea33ee4fff2bfdabb
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Sep 16 12:18:54 2024 +0200
core: use macro to check send_port_str value
(cherry picked from commit 15d81a0151aa46a20f95fb8c6dc2665d03e741aa)
commit af0ec5445393939288c86e976eba8f530a4100b1
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Sep 16 10:42:19 2024 +0200
core: use advertised port for recv socket only when set
(cherry picked from commit c09a29369f03f6c5e621a94b5b853047490568aa)
commit e3969c489b24490c667eb4680ee452f191da9577
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Sep 16 09:15:40 2024 +0200
core: use advertised port only when explicitely set
- do not fallback to socket port
(cherry picked from commit 0f423f97607416edcff8d0f1612fad7af29b6064)
commit 240b66b8d9ea9bf58e897bf9b35c4d91beb5c5ca
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Sat Sep 14 22:07:35 2024 +0200
core: skip interfaces with index over max iface limit
(cherry picked from commit fa17af660dc754cd46c747ec8c3216ef52fd4fcc)
commit 499be2dcbefe30be2ed616064a04bc0b6ee42b29
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Fri Sep 13 22:07:26 2024 +0200
ldap: remove unused variable in child_init
fixes #3974
> ldap_mod.c: In function ‘child_init’:
> ldap_mod.c:156:13: warning: unused variable ‘ret’ [-Wunused-variable]
> 156 | int ret = 0;
(cherry picked from commit a078f14050b6d31bfbcd3562306923c0c4ad73e3)
commit 54c6ac01e98866905c8654a42873f023c4e1ec7a
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri Sep 13 08:50:35 2024 +0200
core: check for incompatible modes for bind_ipv6_link_local
- a few more debug messages
(cherry picked from commit 86770d203bde6859284ec8862be66d78efd2715a)
commit 9947b5a548ff1802de70acccc1d8306d1b6ed76d
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Sep 12 16:23:02 2024 +0200
core: socket info - set address also for link local items
- updates to log messages
(cherry picked from commit fd95b95035a7da088a94888132326d463191da83)
commit 4647ecd9c20a79967a8beed14262ad74dfdba661
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Sep 12 10:34:55 2024 +0200
core: check for items with emtpy address when discovering the network interfaces
- it may be returned on some OSes, preventing to start
(cherry picked from commit bd4c068ee9c8e18dc76f8154d3fa4c438972b79c)
commit 081e17b925a019c9971bf1296bc9a70d8df9d8ae
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Sep 12 10:10:33 2024 +0200
core: log message about interface flags made info
- small updates to a couple of error messages
(cherry picked from commit 15823c3eda3a332d22d9132a873d755aa024892f)
commit 62a76d2fe3547ef6701e8b86f195396158f15660
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Sep 10 18:01:57 2024 +0200
core: option to skip auto-bind on ipv6 local link
- set bind_ipv6_link_local=2
(cherry picked from commit 2bcd29a7a2981670baea0b7fb2e8454b5ad9f4d7)
commit 4cb602385b4bb7b9df5cff9aac60ea0fa4f02f8f
Author: Lucian Balaceanu <lucian.balaceanu@1and1.ro>
Date: Wed Sep 4 11:55:57 2024 +0300
core: parser - use sip_parser_log
Silencing messages that tend to appear when processing HEP.
(cherry picked from commit e6a3b3554af01e5141ba063df408a06b28261927)
commit f6b6aeb9297b6782655199de9bcb82cc79de50a8
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Sep 5 11:28:08 2024 +0200
registrar: safety check for uri and remove duplicated aor extract
- follow up of changes from previous commit
(cherry picked from commit 60165196ad3144597c24eb9f7bb7fb0cd56f8c25)
commit 32987e68f85500e2b37134c7a542ab7cefce5384
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Sep 5 09:01:52 2024 +0200
core: try to lookup connection for WSS when TCPCONN_MATCH_STRICT is set
- URIs have always transport ws, but most likely the connection is wss
- GH #3969
(cherry picked from commit aa794581ecf105b5313d2f5b8bcfe516ab337936)
commit 065e0514144f4e4f160ae15b515948c83711ff57
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Wed Sep 4 13:02:19 2024 +0200
registrar: use parsed uri parameter when provided for save()
- instead of to-uri, aor being built from uri parameter
(cherry picked from commit 21e2d96672ccbe65eebdf64f839a1ce465a11b7c)
commit 6c88ef7c6abc45f72571aaa713f1d0dfb2d626e6
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Wed Sep 4 12:43:59 2024 +0200
auth_xkey: use memcpy() instead of strncpy()
(cherry picked from commit 29686758e1ce51abb8d8dd5bebb0d7fa1a019dc6)
commit d5f13655909632a4f6e58ebb6ea2a13655511270
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Sep 3 23:24:49 2024 +0200
registrar: when provided, use host part from uri parameter
- instread of the To URI, which can be different
(cherry picked from commit 1c2cb9980082a6a1a8e3986330d9b80c49ef7801)
commit 113ff4b080546a7cd7c06f1ebc1ba303e329b309
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Mon Sep 23 08:59:47 2024 +0200
pkg/kamailio/deb: support Ubuntu 24.04 (Noble Numbat) [skip ci]
commit 672c3e75c4679681c1ddfb42f852682d93e42c31
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Sep 19 08:54:32 2024 +0200
tm: remove extra + used before MAXFWD_HEADER_LEN
(cherry picked from commit 307d6db88c218ffd5dc9d6e7de6425ac4ef24748)
commit ab3530e753dece24e7b2851b0943fa23154d62ef
Author: Sergey Safarov <s.safarov@gmail.com>
Date: Fri Sep 13 22:08:17 2024 +0300
pkg/kamailio: fixed python module build on RHEL based dists
(cherry picked from commit b1c9dac2c382a98997d5771921af5aa3235876c0)
commit 98e094331d09b573985e98a54ff442166bc86594
Author: S-P Chan <shihping.chan@gmail.com>
Date: Thu Aug 29 16:11:22 2024 +0800
app_python3: bump to 3.12 for el8/el9
(cherry picked from commit 4d87f29248d36d873784827204f272116050343d)
commit be1fe948b188ba84ec542e5622377d3772463e5b
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Wed Sep 4 19:36:34 2024 +0200
nathelper: add_contact_alias() with parameters to enclose ipv6 in square brackets
- the add_contact_alias() without parameters was doing it already
- discovered while investigating GH #3968
(cherry picked from commit 744e5ac9678c0c9ef07bfb0de44c7c478a2debdc)
commit 3c89405ed74152fd59365ad7dacb144092f5516a
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Wed Sep 4 18:54:22 2024 +0200
nathelper: check if alias ipv6 has already square brackets
- GH #3968
(cherry picked from commit 6e01172a138d395fa3f7c3f25238647934137dba)
===================== 2024-09-04 Version 5.8.3 Released =====================
===================== Changes Since Version 5.8.2 ===========================

@ -4,7 +4,7 @@
# Maintainer: Nathan Angelacos <nangel@alpinelinux.org>
pkgname=kamailio
pkgver=5.8.3
pkgver=5.8.4
pkgrel=0
# If building from a git snapshot, specify the gitcommit

@ -1,3 +1,9 @@
kamailio (5.8.4) unstable; urgency=medium
* version set 5.8.4
-- Victor Seva <vseva@debian.org> Tue, 12 Nov 2024 10:53:35 +0100
kamailio (5.8.3) unstable; urgency=medium
* version set 5.8.3

@ -1,3 +1,9 @@
kamailio (5.8.4) unstable; urgency=medium
* version set 5.8.4
-- Victor Seva <vseva@debian.org> Tue, 12 Nov 2024 10:53:35 +0100
kamailio (5.8.3) unstable; urgency=medium
* version set 5.8.3

@ -1,3 +1,9 @@
kamailio (5.8.4) unstable; urgency=medium
* version set 5.8.4
-- Victor Seva <vseva@debian.org> Tue, 12 Nov 2024 10:53:35 +0100
kamailio (5.8.3) unstable; urgency=medium
* version set 5.8.3

@ -1,3 +1,9 @@
kamailio (5.8.4) unstable; urgency=medium
* version set 5.8.4
-- Victor Seva <vseva@debian.org> Tue, 12 Nov 2024 10:53:35 +0100
kamailio (5.8.3) unstable; urgency=medium
* version set 5.8.3

@ -0,0 +1,42 @@
#!/bin/bash
#
# Target dist: Ubuntu 24.04 (Noble Numbat)
DIST=noble
rm -rf ${DIST}
cp -r debian ${DIST}
# No dnssec module:
sed -i -e '/libval-dev/d' -e '/^Package: kamailio-dnssec-modules/,/^$/d' \
${DIST}/control
sed -i -e '/^PACKAGE_GROUPS += dnssec/d' ${DIST}/rules
sed -i -e '/--EXCLUDED--/i EXTRA_EXCLUDED_MODULES += dnssec' ${DIST}/rules
# No app_java due lack of gcj-jdk
sed -i -e '/gcj-jdk/d' -e '/^Package: kamailio-java-modules/,/^$/d' \
${DIST}/control
sed -i -e '/^export JAVA_HOME/d' ${DIST}/rules
sed -i -e '/^PACKAGE_GROUPS += java/d' ${DIST}/rules
sed -i -e '/--EXCLUDED--/i EXTRA_EXCLUDED_MODULES += java' ${DIST}/rules
# no dh-systemd
sed -i -e '/dh-systemd/d' ${DIST}/control
# no python2
sed -i -e '/^ python,/d' -e '/python-dev/d' \
-e '/^Package: kamailio-python-modules/,/^$/d' \
${DIST}/control
sed -i -e '/^PACKAGE_GROUPS += python$/d' ${DIST}/rules
sed -i -e '/--EXCLUDED--/i EXTRA_EXCLUDED_MODULES += python' ${DIST}/rules
# no lsb-base
sed -i -e '/lsb-base/d' ${DIST}/control
# libncurses
sed -i -e 's/libncurses5-dev/libncurses-dev/g' ${DIST}/control
wrap-and-sort -sat -d ${DIST}
# clean backports scripts
rm -rf ${DIST}/backports
exit 0

@ -1,3 +1,9 @@
kamailio (5.8.4) unstable; urgency=medium
* version set 5.8.4
-- Victor Seva <vseva@debian.org> Tue, 12 Nov 2024 10:53:35 +0100
kamailio (5.8.3) unstable; urgency=medium
* version set 5.8.3

@ -1,3 +1,9 @@
kamailio (5.8.4) unstable; urgency=medium
* version set 5.8.4
-- Victor Seva <vseva@debian.org> Tue, 12 Nov 2024 10:53:35 +0100
kamailio (5.8.3) unstable; urgency=medium
* version set 5.8.3

@ -1,3 +1,9 @@
kamailio (5.8.4) unstable; urgency=medium
* version set 5.8.4
-- Victor Seva <vseva@debian.org> Tue, 12 Nov 2024 10:53:35 +0100
kamailio (5.8.3) unstable; urgency=medium
* version set 5.8.3

@ -1,3 +1,9 @@
kamailio (5.8.4) unstable; urgency=medium
* version set 5.8.4
-- Victor Seva <vseva@debian.org> Tue, 12 Nov 2024 10:53:35 +0100
kamailio (5.8.3) unstable; urgency=medium
* version set 5.8.3

@ -0,0 +1,59 @@
kamailio (5.8.4) unstable; urgency=medium
* version set 5.8.4
-- Victor Seva <vseva@debian.org> Tue, 12 Nov 2024 10:53:35 +0100
kamailio (5.8.3) unstable; urgency=medium
* version set 5.8.3
-- Victor Seva <vseva@debian.org> Wed, 04 Sep 2024 09:29:45 +0200
kamailio (5.8.2) unstable; urgency=medium
* version set 5.8.2
-- Victor Seva <vseva@debian.org> Wed, 12 Jun 2024 09:00:17 +0200
kamailio (5.8.1) unstable; urgency=medium
* version set 5.8.1
-- Victor Seva <vseva@debian.org> Wed, 03 Apr 2024 08:21:53 +0200
kamailio (5.8.0) unstable; urgency=medium
* version set 5.8.0
-- Victor Seva <vseva@debian.org> Thu, 07 Mar 2024 11:40:20 +0100
kamailio (5.8.0~rc0) unstable; urgency=medium
* version set 5.8.0~rc0
-- Victor Seva <vseva@debian.org> Fri, 23 Feb 2024 20:04:35 +0100
kamailio (5.8.0~pre0) unstable; urgency=medium
* version set 5.8.0~pre0
-- Victor Seva <vseva@debian.org> Fri, 02 Feb 2024 15:20:05 +0100
kamailio (5.8.0~dev2) unstable; urgency=medium
* version set 5.8.0~dev2
-- Victor Seva <vseva@debian.org> Tue, 05 Dec 2023 12:04:06 +0100
kamailio (5.8.0~dev1) unstable; urgency=medium
* version set 5.8.0~dev1
-- Victor Seva <vseva@debian.org> Wed, 28 Jun 2023 15:03:56 +0200
kamailio (5.8.0~dev0) unstable; urgency=medium
* version set 5.8.0~dev0
-- Victor Seva <vseva@debian.org> Thu, 04 May 2023 21:45:08 +0200

@ -0,0 +1,942 @@
Source: kamailio
Section: net
Priority: optional
Maintainer: Kamailio Admin Group <kadmin.hq@lists.kamailio.org>
Uploaders:
Victor Seva <vseva@debian.org>,
Build-Depends:
bison,
debhelper (>= 9),
default-libmysqlclient-dev,
docbook-xml,
dpkg-dev (>= 1.16.1.1),
erlang-dev,
flex,
libcurl4-openssl-dev,
libdb-dev (>= 4.6.19),
libev-dev,
libevent-dev,
libexpat1-dev,
libgeoip-dev (>= 1.4.5),
libhiredis-dev (>= 0.10.0),
libjansson-dev,
libjson-c-dev,
libldap2-dev,
liblua5.1-0-dev,
libmaxminddb-dev,
libmemcached-dev,
libmicrohttpd-dev,
libmnl-dev,
libmongoc-dev,
libmono-2.0-dev [amd64 armel armhf i386 mipsel kfreebsd-amd64 kfreebsd-i386 ppc64 ppc64el s390x],
libmosquitto-dev,
libnats-dev,
libncurses-dev,
libpcre2-dev,
libperl-dev,
libphonenumber-dev (>= 7),
libpq-dev,
librabbitmq-dev,
libradcli-dev,
libreadline-dev,
libsasl2-dev,
libsctp-dev [any],
libsecsipid-dev [amd64 arm64 armel armhf hurd-i386 i386 powerpc ppc64 ppc64el riscv64 s390x],
libsnmp-dev,
libsqlite3-dev,
libssl-dev,
libsystemd-dev,
libunistring-dev,
libwebsockets-dev,
libwolfssl-dev,
libxml2-dev,
openssl,
pkg-config,
python3,
python3-dev,
ruby-dev,
unixodbc-dev,
uuid-dev,
xsltproc,
zlib1g-dev,
Standards-Version: 4.6.0.1
Homepage: https://www.kamailio.org/
Vcs-Git: https://github.com/kamailio/kamailio.git
Vcs-Browser: https://github.com/kamailio/kamailio/
Rules-Requires-Root: no
Package: kamailio
Architecture: any
Multi-Arch: foreign
Pre-Depends:
${misc:Pre-Depends},
Depends:
adduser,
python3,
${misc:Depends},
${shlibs:Depends},
Replaces:
kamailio-carrierroute-modules,
Suggests:
kamailio-berkeley-modules,
kamailio-cpl-modules,
kamailio-dbg,
kamailio-ldap-modules,
kamailio-lua-modules,
kamailio-mysql-modules,
kamailio-perl-modules,
kamailio-postgres-modules,
kamailio-presence-modules,
kamailio-python-modules,
kamailio-radius-modules,
kamailio-snmpstats-modules,
kamailio-tls-modules,
kamailio-unixodbc-modules,
kamailio-xml-modules,
kamailio-xmpp-modules,
stun-server | turn-server,
Provides:
sip-router,
Description: very fast, dynamic and configurable SIP server
Kamailio is a very fast and flexible SIP (RFC3261)
server. Written entirely in C, kamailio can handle thousands requests
per second even on low-budget hardware. It can be configured to act
as a SIP proxy, application server, session border controller,
or call load balancer to handle a set of media servers.
.
A C Shell like scripting language provides full control over the server's
behaviour. It's easy to integrate Kamailio with 3rd party API's and applications
using HTTP, AMQP, database drivers, LDAP, Radius and many other solutions.
In addition there is support for scripting using Lua, Python, Perl, Java and
a set of other languages using Mono.
.
Kamailio's modular architecture allows only required functionality to be loaded.
There are over 100 modules available: WebSockets for WebRTC, authentication,
multiple databases - both traditional SQL databases as well as no-SQL,
message bus systems like Rabbit MQ, instant messaging, a presence agent,
integration with REST-ful APIs using HTTP and JSON or XML,
radius authentication, record routing, an SMS gateway, a XMPP/jabber gateway, a
transaction and dialog module, OSP module, statistics support,
registrar and user location services, SNMP, SIMPLE Presence and much more.
.
This package contains the main Kamailio binary along with the principal modules
and support binaries.
Package: kamailio-dbg
Priority: extra
Section: debug
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
Description: very fast and configurable SIP server [debug symbols]
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 contains the debugging symbols for the Kamailio binaries and
modules. You only need to install it if you need to debug Kamailio.
Package: kamailio-geoip-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: The geoip 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 geoip module, an extension enabling
usage of the GeoIP API within the Kamailio configuration file.
Package: kamailio-geoip2-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: The geoip2 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 geoip2 module, an extension enabling
real-time queries against the Max Mind GeoIP2 database within the Kamailio
configuration file.
Package: kamailio-sqlite-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Recommends:
sqlite3,
Description: SQLite database connectivity 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 SQLite database driver for Kamailio.
Package: kamailio-json-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: Json parser and Json-RPC modules 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 a JSON parser for use in the Kamailio
configuration file and the JSON-RPC client over netstrings.
Package: kamailio-memcached-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Replaces:
kamailio-memcached-module,
Description: interface to the memcached server, 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 memcached module, an interface to the memcached
server, a high-performance, distributed memory object caching system.
Package: kamailio-lua-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: The app_lua module for Kamailio Lua support
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 app_lua module, an extension allowing to
execute embedded Lua applications within the configuration file as
well as writing the entire configuration file in Lua.
Package: kamailio-mono-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: The app_mono 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 app_mono module, an extension allowing to
execute embedded Mono applications within the Kamailio SIP routing script.
Package: kamailio-python3-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: The app_python3 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 app_python3 module, an extension allowing to
execute embedded Python applications within the Kamailio SIP routing script.
Package: kamailio-ruby-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: The app_ruby module for Kamailio Ruby support
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 app_ruby module, an extension allowing to
execute embedded Ruby applications within the Kamailio SIP routing script.
Package: kamailio-redis-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: Redis database connectivity 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 Redis NOSQL database driver for Kamailio.
Package: kamailio-mysql-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
default-mysql-client | virtual-mysql-client,
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: MySQL database connectivity module for Kamailio
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 MySQL database driver for Kamailio.
Package: kamailio-postgres-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
postgresql-client,
${misc:Depends},
${shlibs:Depends},
Description: PostgreSQL database connectivity 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 PostgreSQL database driver for Kamailio.
Package: kamailio-cpl-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: CPL module (CPL interpreter engine) 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 a CPL (Call Processing Language) interpreter for
Kamailio, turning Kamailio into a CPL server (storage and interpreter).
Package: kamailio-radius-modules
Architecture: any
Multi-Arch: same
Breaks:
kamailio (<<5.1),
Replaces:
kamailio (<<5.1),
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: RADIUS modules 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 a set of RADIUS modules for Kamailio, for
authentication, peering, group membership and messages URIs checking against a
RADIUS server.
Package: kamailio-unixodbc-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: unixODBC database connectivity 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 unixODBC database driver for Kamailio.
Package: kamailio-presence-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: SIP presence modules for Kamailio
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 several Kamailio modules for implementing a presence
server and presence user agent for rich presence, registrar-based presence,
external triggered presence with SIMPLE and XCAP support, as well as a
set of other SIP event packages..
Package: kamailio-perl-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: Perl extensions and database driver 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 an interface for Kamailio to write Perl extensions and
the perlvdb database driver for Kamailio.
Package: kamailio-snmpstats-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
snmpd,
${misc:Depends},
${shlibs:Depends},
Description: SNMP AgentX subagent 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 snmpstats module for Kamailio. This module acts
as an AgentX subagent which connects to a master agent. The Kamailio MIBS are
included.
Package: kamailio-xmpp-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: XMPP gateway 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 SIP to XMPP IM translator module for Kamailio.
Package: kamailio-xml-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Replaces:
kamailio-xml-module,
kamailio-xmlrpc-module,
Provides:
kamailio-xmlrpc-modules,
Description: XML based extensions for Kamailio's Management Interface
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 XMLRPC transport implementations for Kamailio's
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
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: LDAP modules 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 ldap and h350 modules for Kamailio, enabling LDAP
queries from the Kamailio routing scripts and storage of SIP account data in an LDAP
directory.
Package: kamailio-ims-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: IMS 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 contains various Diameter interfaces and modules for Kamailio
to run as an IMS core.
Package: kamailio-utils-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: Utility functions 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 a set of utility functions for Kamailio, as well
as modules for restful HTTP API access using the CURL library in the
http_client module.
Package: kamailio-sctp-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: SCTP SIP transport 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 SCTP SIP transport module for Kamailio.
Package: kamailio-tls-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: TLS support for the Kamailio SIP server (authentication, transport)
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 TLS support for encrypted and authenticated
SIP connections as well as generic TLS support for many Kamailio modules.
Package: kamailio-tls-wolfssl-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: TLS support for the Kamailio SIP server (authentication, transport)
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 TLS support for encrypted and authenticated using wolfssl
SIP connections as well as generic TLS support for many Kamailio modules.
Package: kamailio-outbound-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: SIP Outbound 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 contains the "outbound" module implementing SIP outbound extension.
Package: kamailio-websocket-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: WebSocket 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 contains the module implementing WebSocket transport layer
for use in SIP over WebSockets, in combination with WebRTC media sessions..
Package: kamailio-autheph-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: authentication using ephemeral credentials 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 ephemeral authentication module for Kamailio,
enabling authentication using a Restful HTTP API.
Package: kamailio-kazoo-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: kazoo modules 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 Kazoo application server integration module for Kamailio.
Package: kamailio-rabbitmq-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: RabbitMQ and AMQP integration modules 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 RabbitMQ module for Kamailio, enabling AMQP
integration into the SIP routing scripts for third party service
support.
Package: kamailio-cnxcc-modules
Architecture: any
Multi-Arch: same
Breaks:
kamailio (<<5.1),
Replaces:
kamailio (<<5.1),
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: cnxcc modules 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 cnxcc call charging control module for Kamailio.
Package: kamailio-erlang-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: Erlang modules 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 Kamailio module provides interaction with the Erlang node from the Kamailio
SIP routing scripts. The module allows sending, receiving Erlang messages
and RPC calls between each other.
Package: kamailio-systemd-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: systemd logging modules 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 logging to systemd journal directly from the
Kamailio configuration and routing scripts.
Package: kamailio-phonenum-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: phonenum modules 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 real-time queries against the libphonenumber to be
performed directly from the Kamailio configuration and routing scripts.
Package: kamailio-mongodb-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: mongodb modules 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 mongodb database driver and non-db connector for
Kamailio.
Package: kamailio-mqtt-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: MQTT modules 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.
.
MQTT module allows bidirectional publish/subscribe communication by
connecting Kamailio to a MQTT Broker.
.
Messages can be published from any point in the routing script. Also
the subscriptions can be fully controlled by scripting commands.
Package: kamailio-secsipid-modules
Architecture: amd64 arm64 armel armhf hurd-i386 i386 powerpc ppc64 ppc64el riscv64 s390x
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: contains the secsipid module
Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls
per second even on low-budget hardware.
.
This package contains the secsipid Module.
Package: kamailio-lwsc-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: Libwebsockets 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 contains the lwcs module, which provides a client-side WebSockets
API through libwebsockets.
Package: kamailio-nats-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: Nats 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 contains the nats module, which provides a NATS consumer for Kamailio.
NATS is a real time distributed messaging platform, more details about it can be
found at nats.io.
Package: kamailio-microhttpd-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: Microhttpd 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 an embedded HTTP server using libmicrohttpd.
Package: kamailio-extra-modules
Architecture: any
Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: Extra modules 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 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
Package: kamailio-nth
Architecture: any
Pre-Depends:
${misc:Pre-Depends},
Depends:
binutils,
bison,
bvi,
flex,
gcc,
gdb,
iftop,
less | most,
lsof,
mc,
ngrep,
psmisc,
screen,
sipsak,
tcpdump,
vim,
${misc:Depends},
Description: Kamailio SIP server - package for "nice to have" utilities
This is a metapackage for easy installation various useful tools that may be
handy on server with Kamailio installed.

@ -0,0 +1,309 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: Kamailio
Upstream-Contact: sr-dev@lists.kamailio.org
Source: https://www.kamailio.org/pub/kamailio/
Files: *
Copyright:
2001-2003 FhG Fokus
2006-2010 iptelorg GmbH
Various others (see AUTHORS file)
License: GPL-2.0+
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'.
Files: debian/*
Copyright: 2012, 2013, 2014 Victor Seva <linuxmaniac@torreviejawireless.org>
2009, 2010, 2011, Daniel-Constantin Mierla <miconda@gmail.com>
2010, Jon Bonilla <manwe@aholab.ehu.es>
2009, Jonas Bergler <jonas.bergler@staff.snap.net.nz>
2009, Henning Westerholt <henning.westerholt@1und1.de>
2007, Julien BLACHE <jblache@debian.org>
License: GPL-2+
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'.
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.*
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/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
src/core/shm_init.* src/core/sip_msg_clone.* src/core/sock_ut.*
src/core/sr_compat.* src/core/str_hash.h src/core/switch.*
src/core/tcp_ev.h src/core/tcp_int_send.h src/core/tcp_options.*
src/core/tcp_read.h src/core/tcp_stats.* src/core/timer_proc.*
src/core/tls_hooks.* src/core/tls_hooks_init.h src/core/ver.*
Copyright: 2006-2010 iptelorg GmbH
License: ISC
Files: src/modules/tls/tls_select.* src/modules/tls/tls_dump_vf.*
Copyright: 2005-2010 iptelorg GmbH
License: GPL-2 + OpenSSL exception
Files: src/modules/websocket/* src/modules/outbound/* src/modules/auth_ephemeral/*
Copyright: 2012-2013 Crocodile RCS Ltd
License: GPL-2 + 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/f_malloc.c src/core/pt.* src/core/sched_yield.h src/core/ut.*
Copyright: 2001-2003 FhG Fokus
License: ISC
Files: src/core/events.* src/modules/topoh/*
Copyright: 2009 SIP-Router.org
License: ISC
Files: src/modules/pv/pv_xavp.* src/modules/usrloc/ul_rpc.*
src/core/ppcfg.* src/core/xavp.*
Copyright: 2009-2010 Daniel-Constantin Mierla (asipto.com)
License: ISC
Files: src/modules/xmpp/xsnprintf.c
Copyright: 1995-1998, The Apache Group
License: Apache-1.0
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
.
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
.
3. All advertising materials mentioning features or use of this
software must display the following acknowledgment:
"This product includes software developed by the Apache Group
for use in the Apache HTTP server project (http://www.apache.org/)."
.
4. The names "Apache Server" and "Apache Group" must not be used to
endorse or promote products derived from this software without
prior written permission.
.
5. Redistributions of any form whatsoever must retain the following
acknowledgment:
"This product includes software developed by the Apache Group
for use in the Apache HTTP server project (http://www.apache.org/)."
.
THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
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
Copyright: 1991, 1993 The Regents of the University of California
License: BSD-3-clause
Files: src/modules/tm/t_serial.*
Copyright: 2008 Juha Heinanen
License: BSD-2-clause
Files: src/core/parser/sdp/sdp.* src/core/parser/sdp/sdp_helpr_funcs.*
src/core/parser/sdp/sdp_cloner.h
Copyright:
2008-2009 SOMA Networks, INC.
2010 VoIP Embedded, Inc
License: BSD-2-clause
Files: src/modules/tls/fixed_c_zlib.h
Copyright:1998-2005 The OpenSSL Project
Comment: file copied from OpenSSL 0.9.8, refers to OpenSSL License. Note that
this code will not build by default in the Debian packaging.
License: OpenSSL
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
.
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
.
3. All advertising materials mentioning features or use of this
software must display the following acknowledgment:
"This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
.
4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
endorse or promote products derived from this software without
prior written permission. For written permission, please contact
openssl-core@openssl.org.
.
5. Products derived from this software may not be called "OpenSSL"
nor may "OpenSSL" appear in their names without prior written
permission of the OpenSSL Project.
.
6. Redistributions of any form whatsoever must retain the following
acknowledgment:
"This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/)"
.
THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
Files: src/core/crypto/md5.* src/core/crypto/md5utils.c
Copyright: 1991-2, RSA Data Security, Inc
Comment: Note that md5.c and md5.h have been replaced in the patches
plum_md5*.patch .
.
As for md5utils.c, according to a mail from Upstream (Daniel-Constantin
Mierla): while the initial commit log for it states that it is derived
from mddriver.c of RFC 1321, it seems that it was, in fact, written from
scratch by Jiri Kuthan (a core developer of SER at that time, working for
FhG Fokus Institute). As you can see it's rather trivial and uses a data
type of SER ("str"). I didn't reimplement it as it's too trivial and
looks like there's no other way to implement it.
License: RSA-MD5
License to copy and use this software is granted provided that it
is identified as the "RSA Data Security, Inc. MD5 Message-Digest
Algorithm" in all material mentioning or referencing this software
or this function.
.
License is also granted to make and use derivative works provided
that such works are identified as "derived from the RSA Data
Security, Inc. MD5 Message-Digest Algorithm" in all material
mentioning or referencing the derived work.
.
RSA Data Security, Inc. makes no representations concerning either
the merchantability of this software or the suitability of this
software for any particular purpose. It is provided "as is"
without express or implied warranty of any kind.
.
These notices must be retained in any copies of any part of this
documentation and/or software.
Files: src/core/mem/dl_*
Copyright: n/a
License: public-domain
This is a version (aka dlmalloc) of malloc/free/realloc written by
Doug Lea and released to the public domain, as explained at
http://creativecommons.org/licenses/publicdomain. Send questions,
comments, complaints, performance data, etc to dl@cs.oswego.edu
Files: src/core/rand/isaac/*
Copyright: n/a
License: public-domain
By Bob Jenkins. My random number generator, ISAAC. Public Domain.
License: ISC
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
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.*
Copyright: 2009 Dave Gamble
License: MIT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
,
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
License: GPL-2 + 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
* formed by combining OpenSSL toolkit software and the code in this file,
* such as linking with software components and libraries released under
* OpenSSL project license.
License: BSD-3-clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
4. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
License: BSD-2-clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
.
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
.
THIS SOFTWARE IS PROVIDED BY THE FREEBSD PROJECT ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL THE FREEBSD PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

@ -0,0 +1 @@
kamailio-autheph-modules binary: possible-gpl-code-linked-with-openssl

@ -0,0 +1 @@
kamailio-dnssec-modules binary: possible-gpl-code-linked-with-openssl

@ -0,0 +1 @@
kamailio-outbound-modules binary: possible-gpl-code-linked-with-openssl

@ -0,0 +1 @@
kamailio-secsipid-modules binary: library-not-linked-against-libc

@ -0,0 +1 @@
kamailio-systemd-modules binary: library-not-linked-against-libc

@ -0,0 +1,4 @@
kamailio-tls-modules binary: possible-gpl-code-linked-with-openssl
kamailio-tls-modules binary: library-not-linked-against-libc
# error only on stretch
kamailio-tls-modules binary: embedded-library

@ -0,0 +1 @@
kamailio-websocket-modules binary: possible-gpl-code-linked-with-openssl

@ -0,0 +1,39 @@
Kamailio for Debian
-------------------
* init script check for fork=no
-------------------------------
The Kamailio init script will not start Kamailio on boot if fork=no is
specified in the config file. The check in the initscript will match
any occurrence of fork=no in the file, even inside C-style comments.
You can disable this check in the init script if you wish; just comment
out the calls to the check_fork function in the script. Your changes to
the init script will be preserved upon upgrade, as the file is tagged
as a conffile.
* Kamailio setup
----------------
To setup Kamailio, you need to:
- configure Kamailio properly to suit your needs
- edit /etc/default/kamailio, adjust the MEMORY parameter and set
RUN_KAMAILIO to "yes"
If you are building an HA cluster using heartbeat or similar, you'll want
to disable the init script by running:
update-rc.d kamailio remove
so that Kamailio will not be launched at system startup. You still need
to set RUN_KAMAILIO to "yes" if you want to use the /etc/init.d/kamailio init
script.
Set the DUMP_CORE parameter in /etc/default/kamailio to "yes" if you want to
get a core dump in case Kamailio crashes. The debug symbols for Kamailio are
provided by the kamailio-dbg package.
-- Victor Seva <linuxmaniac@torreviejawireless.org> Wed, 11 Dec 2013 16:07:11 +0100

@ -0,0 +1,36 @@
#
# Kamailio startup options
#
# Set to yes to enable kamailio, once configured properly.
#RUN_KAMAILIO=yes
# User to run as
#USER=kamailio
# Group to run as
#GROUP=kamailio
# On systemd, to change username or group please create drop-in
# /etc/systemd/system/kamailio.service.d/10-user_group.conf file, like
# ```
# [Service]
# User=kamuser
# Group=kamgroup
# ```
# Amount of shared and private memory to allocate
# for the running Kamailio server (in Mb)
#SHM_MEMORY=64
#PKG_MEMORY=8
# Config file
#CFGFILE=/etc/kamailio/kamailio.cfg
# Enable the server to leave a core file when it crashes.
# Set this to 'yes' to enable Kamailio to leave a core file when it crashes
# or 'no' to disable this feature. This option is case sensitive and only
# accepts 'yes' and 'no' and only in lowercase letters.
# On some systems it is necessary to specify a directory for the core files
# to get a dump. Look into the kamailio init file for an example configuration.
#DUMP_CORE=yes

@ -0,0 +1,162 @@
#! /bin/sh
#
### BEGIN INIT INFO
# Provides: kamailio
# Required-Start: $syslog $network $local_fs $remote_fs $time
# Should-Start: $named slapd mysql postgresql snmpd radiusd
# Should-Stop: $named slapd mysql postgresql snmpd radiusd
# Required-Stop: $syslog $network $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start the Kamailio SIP proxy server
# Description: Start the Kamailio SIP proxy server
### END INIT INFO
. /lib/lsb/init-functions
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/kamailio
NAME=`basename "$0"`
DESC="Kamailio SIP Server"
HOMEDIR=/run/$NAME
PIDFILE=$HOMEDIR/$NAME.pid
DEFAULTS=/etc/default/$NAME
CFGFILE=/etc/$NAME/kamailio.cfg
RUN_KAMAILIO=no
USER=kamailio
GROUP=kamailio
# Amount of shared and private memory to allocate
# for the running Kamailio server (in Mb)
SHM_MEMORY=64
PKG_MEMORY=8
DUMP_CORE=no
# Do not start kamailio if fork=no is set in the config file
# otherwise the boot process will just stop
check_fork ()
{
if grep -q "^[[:space:]]*fork[[:space:]]*=[[:space:]]*no.*" $CFGFILE; then
log_failure_msg "Not starting $DESC: fork=no specified in config file; run /etc/init.d/kamailio debug instead"
exit 0
fi
}
check_kamailio_config ()
{
# Check if kamailio configuration is valid before starting the server
set +e
out=$($DAEMON -f $CFGFILE -M $PKG_MEMORY -c 2>&1 > /dev/null)
retcode=$?
set -e
if [ "$retcode" != '0' ]; then
log_failure_msg "Not starting $DESC: invalid configuration file!"
log_failure_msg
log_failure_msg "$out"
log_failure_msg
exit 1
fi
}
create_radius_seqfile ()
{
# Create a radius sequence file to be used by the radius client if
# radius accounting is enabled. This is needed to avoid any issue
# with the file not being writable if kamailio first starts as user
# root because DUMP_CORE is enabled and creates this file as user
# root and then later it switches back to user kamailio and cannot
# write to the file. If the file exists before kamailio starts, it
# won't change its ownership and will be writable for both root
# and kamailio, no matter what options are chosen at install time
RADIUS_SEQ_FILE="$HOMEDIR/kamailio_radius.seq"
if [ -d $HOMEDIR ]; then
chown ${USER}:${GROUP} $HOMEDIR
if [ ! -f $RADIUS_SEQ_FILE ]; then
touch $RADIUS_SEQ_FILE
fi
chown ${USER}:${GROUP} $RADIUS_SEQ_FILE
chmod 660 $RADIUS_SEQ_FILE
fi
}
test -f $DAEMON || exit 0
# Load startup options if available
if [ -f $DEFAULTS ]; then
. $DEFAULTS || true
fi
if [ "$RUN_KAMAILIO" != "yes" ]; then
log_failure_msg "Kamailio not yet configured. Edit /etc/default/$NAME first."
exit 0
fi
set -e
SHM_MEMORY=$((`echo $SHM_MEMORY | sed -e 's/[^0-9]//g'`))
PKG_MEMORY=$((`echo $PKG_MEMORY | sed -e 's/[^0-9]//g'`))
[ -z "$USER" ] && USER=kamailio
[ -z "$GROUP" ] && GROUP=kamailio
[ $SHM_MEMORY -le 0 ] && SHM_MEMORY=64
[ $PKG_MEMORY -le 0 ] && PKG_MEMORY=4
if test "$DUMP_CORE" = "yes" ; then
# set proper ulimit
ulimit -c unlimited
# directory for the core dump files
# COREDIR=/home/corefiles
# [ -d $COREDIR ] || mkdir $COREDIR
# chmod 777 $COREDIR
# echo "$COREDIR/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern
fi
# $HOMEDIR can be a tmpfs
if [ ! -d $HOMEDIR ]; then
mkdir -p $HOMEDIR
chown ${USER}:${GROUP} $HOMEDIR
fi
OPTIONS="-f $CFGFILE -P $PIDFILE -m $SHM_MEMORY -M $PKG_MEMORY -u $USER -g $GROUP --atexit=no"
case "$1" in
start|debug)
check_kamailio_config
create_radius_seqfile
if [ "$1" != "debug" ]; then
check_fork
fi
log_daemon_msg "Starting $DESC: $NAME"
start-stop-daemon --start --quiet --pidfile $PIDFILE \
--exec $DAEMON -- $OPTIONS || log_failure_msg " already running"
log_end_msg 0
;;
stop)
log_daemon_msg "Stopping $DESC: $NAME"
start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
--exec $DAEMON --retry 5
log_end_msg 0
;;
restart|force-reload)
check_kamailio_config
create_radius_seqfile
$0 stop
$0 start
;;
status)
log_daemon_msg "Status of $DESC: "
status_of_proc -p"$PIDFILE" $NAME $NAME
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload|status|debug}" >&2
exit 1
;;
esac
exit 0

@ -0,0 +1 @@
kamailio binary: example-interpreter-not-absolute *

@ -0,0 +1,23 @@
#! /bin/sh
set -e
case "$1" in
configure)
adduser --quiet --system --group --disabled-password \
--shell /bin/false --gecos "Kamailio SIP Server" \
--home /run/kamailio kamailio || true
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#

@ -0,0 +1,27 @@
[Unit]
Description=Kamailio - the Open Source SIP Server
Wants=network-online.target
After=network-online.target
[Service]
Type=forking
User=kamailio
Group=kamailio
Environment='CFGFILE=/etc/kamailio/kamailio.cfg'
Environment='SHM_MEMORY=64'
Environment='PKG_MEMORY=8'
EnvironmentFile=-/etc/default/kamailio
EnvironmentFile=-/etc/default/kamailio.d/*
# PIDFile requires a full absolute path
PIDFile=/run/kamailio/kamailio.pid
# ExecStart requires a full absolute path
ExecStart=/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY --atexit=no
Restart=on-failure
# /run/kamailio in tmpfs
RuntimeDirectory=kamailio
RuntimeDirectoryMode=0770
# necessary for chown of control files e.g. for jsonrpcs and ctl modules
AmbientCapabilities=CAP_CHOWN
[Install]
WantedBy=multi-user.target

@ -0,0 +1,270 @@
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/pkg-info.mk
# Enable parallel builds.
NUMJOBS = 1
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MAKEFLAGS += -j$(NUMJOBS)
endif
export RADCLI=1
export WOLFSSL_INTERNAL=no
# tlsa
export KTLS_INCLUDE_TLSA=yes
export LIBSSL_STATIC_SRCLIB=yes
export LIBSSL_STATIC_SRCPATH=/usr/$(LIBDIR)
# Modules not in the "main" kamailio package:
EXCLUDED_MODULES =
# Extra modules to skip, because they are not compilable now:
# - regardless if they go to the main kamailio package or to some module
# package, they will be excluded from compile and install of all.
EXTRA_EXCLUDED_MODULES += bdb
EXTRA_EXCLUDED_MODULES += dbtext
EXTRA_EXCLUDED_MODULES += oracle
EXTRA_EXCLUDED_MODULES += pa
EXTRA_EXCLUDED_MODULES += iptrtpproxy
EXTRA_EXCLUDED_MODULES += dnssec
EXTRA_EXCLUDED_MODULES += java
EXTRA_EXCLUDED_MODULES += python
## --EXCLUDED--
# Module groups that are packaged in separate packages (with the name
# kamailio-$(group_name)-modules).
# Note: the order is important (should be in dependency order, the one
# on which other depend first)
PACKAGE_GROUPS += mysql
PACKAGE_GROUPS += postgres
PACKAGE_GROUPS += berkeley
PACKAGE_GROUPS += unixodbc
PACKAGE_GROUPS += radius
PACKAGE_GROUPS += presence
PACKAGE_GROUPS += ldap
PACKAGE_GROUPS += xml
PACKAGE_GROUPS += perl
PACKAGE_GROUPS += utils
PACKAGE_GROUPS += lua
PACKAGE_GROUPS += memcached
PACKAGE_GROUPS += snmpstats
PACKAGE_GROUPS += carrierroute
PACKAGE_GROUPS += xmpp
PACKAGE_GROUPS += cpl
PACKAGE_GROUPS += redis
PACKAGE_GROUPS += geoip
PACKAGE_GROUPS += geoip2
PACKAGE_GROUPS += sqlite
PACKAGE_GROUPS += json
PACKAGE_GROUPS += mono
PACKAGE_GROUPS += ruby
PACKAGE_GROUPS += ims
PACKAGE_GROUPS += sctp
PACKAGE_GROUPS += tls
PACKAGE_GROUPS += outbound
PACKAGE_GROUPS += websocket
PACKAGE_GROUPS += autheph
PACKAGE_GROUPS += kazoo
PACKAGE_GROUPS += cnxcc
PACKAGE_GROUPS += erlang
PACKAGE_GROUPS += systemd
PACKAGE_GROUPS += phonenum
PACKAGE_GROUPS += mongodb
PACKAGE_GROUPS += rabbitmq
PACKAGE_GROUPS += python3
PACKAGE_GROUPS += mqtt
PACKAGE_GROUPS += secsipid
PACKAGE_GROUPS += lwsc
PACKAGE_GROUPS += nats
PACKAGE_GROUPS += tls_wolfssl
PACKAGE_GROUPS += microhttpd
# Module groups to be packaged onto kamailio-extra-modules.
EXTRA_GROUPS += ev
EXTRA_GROUPS += gzcompress
EXTRA_GROUPS += jansson
EXTRA_GROUPS += uuid
EXTRA_GROUPS += http_async
.PHONY: skip-modules
skip-modules:
@echo "$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)"
D = $(CURDIR)/debian/$(DEB_SOURCE)
# Name of libdir in the path for libraries (e.g., the multiarch triplet).
export LIBDIR ?= lib/$(DEB_HOST_MULTIARCH)
# Directories with possible duplicate libraries (that should be deleted
# from current module* packages).
DUP_LIBS_DIRS = $(D)/usr/$(LIBDIR)/kamailio \
$(D)-db-modules/usr/$(LIBDIR)/kamailio
# CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
CC_EXTRA_OPTS := $(shell dpkg-buildflags --get CPPFLAGS)
CC_EXTRA_OPTS += $(shell dpkg-buildflags --get CFLAGS)
CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS)
# LDFLAGS -> LD_EXTRA_OPTS
LD_EXTRA_OPTS := $(shell dpkg-buildflags --get LDFLAGS)
# https://wiki.debian.org/ReproducibleBuilds/
CC_EXTRA_OPTS += -DVERSION_NODATE
BUILD_MODULES := $(addprefix build_, $(PACKAGE_GROUPS) $(EXTRA_GROUPS))
INSTALL_MODULES := $(addprefix install_, $(PACKAGE_GROUPS))
INSTALL_EXTRA := $(addprefix install_, $(EXTRA_GROUPS))
.PHONY: test_build_all $(BUILD_MODULES) $(INSTALL_MODULES) $(INSTALL_EXTRA)
test_build_all: configure
dh_testdir
$(MAKE) all quiet=verbose
$(BUILD_MODULES): test_build_all
$(MAKE) every-module group_include="k$(subst build_,,$@)" quiet=verbose
test_install_all-stamp: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs
$(MAKE) install quiet=verbose LIBDIR=$(LIBDIR) group_include="kstandard"
touch test_install_all-stamp
# tls_wolfssl => tls-wolfssl
$(INSTALL_MODULES): module = $(subst _,-,$(subst install_,,$@))
$(INSTALL_MODULES): grp = $(subst install_,,$@)
$(INSTALL_MODULES): test_install_all-stamp
$(MAKE) install-modules-all \
quiet=verbose \
LIBDIR=$(LIBDIR) \
BASEDIR=$(D)-$(module)-modules \
cfg_prefix=$(D)-$(module)-modules \
doc-dir=share/doc/$(DEB_SOURCE)-$(module)-modules \
group_include="k$(grp)"
# Eliminate duplicate libs.
for d in $(DUP_LIBS_DIRS); do \
test "$$d" != "$(D)-$(module)-modules/usr/$(LIBDIR)/kamailio" && \
for r in `find $$d -name 'lib*' | xargs`; do \
echo "removing $(module) lib `basename $$r` present also in $$d"; \
rm -f $(D)-$(module)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"`; \
done ; \
done
# clean empty dirs
find $(D)-$(module)-modules -depth -empty -type d -exec rmdir {} \;
$(INSTALL_EXTRA): test_install_all-stamp
$(MAKE) install-modules-all \
quiet=verbose \
LIBDIR=$(LIBDIR) \
BASEDIR=$(D)-extra-modules \
cfg_prefix=$(D)-extra-modules \
doc-dir=share/doc/$(DEB_SOURCE)-extra-modules \
group_include="k$(subst install_,,$@)"
# Eliminate duplicate extra libs.
for d in $(DUP_LIBS_DIRS); do \
test "$$d" != "$(D)-extra-modules/usr/$(LIBDIR)/kamailio" && \
for r in `find $$d -name 'lib*' | xargs`; do \
echo "removing extra lib `basename $$r` present also in $$d"; \
rm -f $(D)-extra-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"`; \
done ; \
done
# clean empty dirs
find $(D)-extra-modules -depth -empty -type d -exec rmdir {} \;
configure: configure-stamp
configure-stamp:
dh_testdir
# Add here commands to configure the package.
$(MAKE) FLAVOUR=kamailio cfg prefix=/usr cfg_prefix=$(D) \
cfg_target=/etc/kamailio/ \
BASEDIR=$(D) \
skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
CC_EXTRA_OPTS="$(CC_EXTRA_OPTS)" \
LD_EXTRA_OPTS="$(LD_EXTRA_OPTS)" \
group_include="kstandard" quiet=verbose
touch configure-stamp
build: build-stamp
build-arch: build-stamp
build-indep: build-stamp
build-stamp: configure-stamp $(BUILD_MODULES)
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp test_install_all-stamp
# Add here commands to clean up after the build process.
$(MAKE) maintainer-clean
dh_clean
install: build $(INSTALL_MODULES) $(INSTALL_EXTRA)
mv $(D)-berkeley-modules/usr/sbin/kambdb_recover \
$(D)-berkeley-bin/usr/sbin/kambdb_recover
# install /etc/default/kamailio file
mkdir -p $(D)/etc/default
cp -f debian/kamailio.default $(D)/etc/default/kamailio
# delete /run/kamailio dir
rm -rf $(D)/usr/local
# This single target is used to build all the packages, all at once, or
# one at a time. So keep in mind: any options passed to commands here will
# affect _all_ packages. Anything you want to only affect one package
# should be put in another target, such as the install target.
binary-common:
dh_testdir
dh_testroot
dh_installdebconf
dh_installdocs
dh_installexamples -Xobsoleted -Xsr
dh_installmenu
dh_systemd_enable -pkamailio
dh_installinit -pkamailio -- defaults 23
dh_systemd_start -pkamailio
dh_installcron
dh_installman
dh_installinfo
dh_lintian
dh_installchangelogs ChangeLog
dh_link
dh_strip --dbg-package=kamailio-dbg
dh_compress
dh_fixperms
dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
# Build architecture-independent packages using the common target
binary-indep: build install
# (Uncomment this next line if you have such packages.)
# $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
# We have nothing to do by default.
# Build architecture-dependent packages using the common target
binary-arch: build install
$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
# Any other binary targets build just one binary package at a time.
binary-%: build install
$(MAKE) -f debian/rules binary-common DH_OPTIONS=-p$*
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure

@ -0,0 +1 @@
kamailio source: debian-watch-file-in-native-package

@ -0,0 +1,3 @@
version=3
opts=dversionmangle=s/\~svn([\d]+)//; \
https://www.kamailio.org/pub/kamailio/([\d.]+)/src/kamailio-([\d.]+)_src\.tar\.gz

@ -1,3 +1,9 @@
kamailio (5.8.4) unstable; urgency=medium
* version set 5.8.4
-- Victor Seva <vseva@debian.org> Tue, 12 Nov 2024 10:53:35 +0100
kamailio (5.8.3) unstable; urgency=medium
* version set 5.8.3

@ -1,3 +1,9 @@
kamailio (5.8.4) unstable; urgency=medium
* version set 5.8.4
-- Victor Seva <vseva@debian.org> Tue, 12 Nov 2024 10:53:35 +0100
kamailio (5.8.3) unstable; urgency=medium
* version set 5.8.3

@ -1,3 +1,9 @@
kamailio (5.8.4) unstable; urgency=medium
* version set 5.8.4
-- Victor Seva <vseva@debian.org> Tue, 12 Nov 2024 10:53:35 +0100
kamailio (5.8.3) unstable; urgency=medium
* version set 5.8.3

@ -1,3 +1,9 @@
kamailio (5.8.4) unstable; urgency=medium
* version set 5.8.4
-- Victor Seva <vseva@debian.org> Tue, 12 Nov 2024 10:53:35 +0100
kamailio (5.8.3) unstable; urgency=medium
* version set 5.8.3

@ -1,3 +1,9 @@
kamailio (5.8.4) unstable; urgency=medium
* version set 5.8.4
-- Victor Seva <vseva@debian.org> Tue, 12 Nov 2024 10:53:35 +0100
kamailio (5.8.3) unstable; urgency=medium
* version set 5.8.3

@ -1,3 +1,9 @@
kamailio (5.8.4) unstable; urgency=medium
* version set 5.8.4
-- Victor Seva <vseva@debian.org> Tue, 12 Nov 2024 10:53:35 +0100
kamailio (5.8.3) unstable; urgency=medium
* version set 5.8.3

@ -1,5 +1,5 @@
%define name kamailio
%define ver 5.8.3
%define ver 5.8.4
%define rel dev1.0%{dist}
%if 0%{?fedora}
@ -812,9 +812,9 @@ Requires: python2, kamailio = %ver
BuildRequires: python2, python2-devel
%endif
%if %{with python3}
%if 0%{?rhel} == 8
Requires: python39, kamailio = %ver
BuildRequires: python39, python39-devel
%if 0%{?rhel} == 8 || 0%{?rhel} == 9
Requires: python3.12, kamailio = %ver
BuildRequires: python3.12, python3.12-devel
%else
Requires: python3, kamailio = %ver
BuildRequires: python3, python3-devel
@ -1212,7 +1212,7 @@ make every-module skip_modules="app_mono db_cassandra db_oracle iptrtpproxy \
FREERADIUS=1 \
%endif
%if 0%{?rhel} >= 8
PYTHON3=python3.9 \
PYTHON3=python3.12 \
%endif
WOLFSSL_INTERNAL=no \
group_include="kstandard kautheph kberkeley kcarrierroute \
@ -1325,7 +1325,7 @@ make install-modules-all skip_modules="app_mono db_cassandra db_oracle \
FREERADIUS=1 \
%endif
%if 0%{?rhel} >= 8
PYTHON3=python3.9 \
PYTHON3=python3.12 \
%endif
WOLFSSL_INTERNAL=no \
group_include="kstandard kautheph kberkeley kcarrierroute \

@ -106,7 +106,7 @@ INSTALL_FLAVOUR=$(FLAVOUR)
# version number
VERSION = 5
PATCHLEVEL = 8
SUBLEVEL = 3
SUBLEVEL = 4
EXTRAVERSION =
# memory manager switcher

@ -2,6 +2,6 @@
* DO NOT EDIT IT
*/
#define REPO_VER "6f8a04"
#define REPO_HASH "6f8a04"
#define REPO_VER "f1d83d"
#define REPO_HASH "f1d83d"
#define REPO_STATE ""

@ -985,8 +985,14 @@ assign_stm:
ksr_ipv6_hex_style.len = strlen(ksr_ipv6_hex_style.s);
}
| IPV6_HEX_STYLE error { yyerror("string value expected"); }
| BIND_IPV6_LINK_LOCAL EQUAL NUMBER {sr_bind_ipv6_link_local = $3;}
| BIND_IPV6_LINK_LOCAL error { yyerror("boolean value expected"); }
| BIND_IPV6_LINK_LOCAL EQUAL NUMBER {
sr_bind_ipv6_link_local = $3;
if((sr_bind_ipv6_link_local & KSR_IPV6_LINK_LOCAL_BIND)
&& (sr_bind_ipv6_link_local & KSR_IPV6_LINK_LOCAL_SKIP)) {
yyerror("incompatible modes set");
}
}
| BIND_IPV6_LINK_LOCAL error { yyerror("number expected"); }
| DST_BLST_INIT EQUAL NUMBER { IF_DST_BLOCKLIST(dst_blocklist_init=$3); }
| DST_BLST_INIT error { yyerror("boolean value expected"); }
| USE_DST_BLST EQUAL NUMBER {

@ -132,6 +132,7 @@ static inline int msg_send_buffer(
union sockaddr_union local_addr;
struct tcp_connection *con = NULL;
struct ws_event_info wsev;
int dproto;
int ret;
#endif
@ -187,9 +188,21 @@ static inline int msg_send_buffer(
if(likely(port)) {
su2ip_addr(&ip, &dst->to);
if(tcp_connection_match == TCPCONN_MATCH_STRICT) {
/* lookup first for WSS, because transport=ws is in URI,
* but WS is less likely */
if(dst->proto == PROTO_WSS || dst->proto == PROTO_WS) {
dproto = PROTO_WSS;
} else {
dproto = dst->proto;
}
con = tcpconn_lookup(dst->id, &ip, port, from,
(dst->send_sock) ? dst->send_sock->port_no : 0, 0,
dst->proto);
dproto);
if(con == NULL && dst->proto == PROTO_WS) {
con = tcpconn_lookup(dst->id, &ip, port, from,
(dst->send_sock) ? dst->send_sock->port_no : 0, 0,
PROTO_WS);
}
} else {
con = tcpconn_get(dst->id, &ip, port, from, 0);
}

@ -607,7 +607,7 @@ static inline int lumps_len(
}; \
break; \
case SUBST_RCV_PORT: \
if(msg->rcv.bind_address && STR_WITHVAL(recv_port_str)) { \
if(STR_WITHVAL(recv_port_str)) { \
new_len += recv_port_str->len; \
} else { \
LM_CRIT(" rcv port - null bind_address\n"); \
@ -704,10 +704,10 @@ static inline int lumps_len(
}; \
break; \
case SUBST_SND_PORT: \
if(send_sock) { \
if(STR_WITHVAL(send_port_str)) { \
new_len += send_port_str->len; \
} else { \
LM_CRIT("null send_sock\n"); \
LM_CRIT("null send sock port\n"); \
}; \
break; \
case SUBST_SND_PROTO: \
@ -748,8 +748,7 @@ static inline int lumps_len(
send_address_str->len) \
!= NULL)) \
new_len += 2; \
if((send_sock->port_no != SIP_PORT) \
|| (send_port_str != &(send_sock->port_no_str))) { \
if(STR_WITHVAL(send_port_str)) { \
/* add :port_no */ \
new_len += 1 + send_port_str->len; \
} \
@ -815,12 +814,17 @@ static inline int lumps_len(
send_address_str = &(send_sock->address_str);
send_af = send_sock->address.af;
}
if(send_sock && send_sock->useinfo.port_no > 0)
send_port_str = &(send_sock->useinfo.port_no_str);
else if(msg->set_global_port.len)
if(send_sock && send_sock->useinfo.name.len > 0) {
if(send_sock->useinfo.port_no > 0) {
send_port_str = &(send_sock->useinfo.port_no_str);
}
} else if(msg->set_global_port.len) {
send_port_str = &(msg->set_global_port);
else
send_port_str = &(send_sock->port_no_str);
} else if(send_sock) {
if(send_sock->port_no != SIP_PORT) {
send_port_str = &(send_sock->port_no_str);
}
}
if(send_sock) {
if(send_sock->useinfo.proto != PROTO_NONE)
send_proto_id = send_sock->useinfo.proto;
@ -836,9 +840,11 @@ static inline int lumps_len(
recv_address_str = &(msg->rcv.bind_address->address_str);
recv_af = msg->rcv.bind_address->address.af;
}
if(msg->rcv.bind_address->useinfo.port_no > 0) {
recv_port_str = &(msg->rcv.bind_address->useinfo.port_no_str);
recv_port_no = msg->rcv.bind_address->useinfo.port_no;
if(msg->rcv.bind_address->useinfo.name.len > 0) {
if(msg->rcv.bind_address->useinfo.port_no > 0) {
recv_port_str = &(msg->rcv.bind_address->useinfo.port_no_str);
recv_port_no = msg->rcv.bind_address->useinfo.port_no;
}
} else {
recv_port_str = &(msg->rcv.bind_address->port_no_str);
recv_port_no = msg->rcv.bind_address->port_no;
@ -1027,7 +1033,7 @@ void process_lumps(struct sip_msg *msg, struct lump *lumps, char *new_buf,
}; \
break; \
case SUBST_RCV_PORT: \
if(msg->rcv.bind_address && STR_WITHVAL(recv_port_str)) { \
if(STR_WITHVAL(recv_port_str)) { \
memcpy(new_buf + offset, recv_port_str->s, \
recv_port_str->len); \
offset += recv_port_str->len; \
@ -1145,12 +1151,12 @@ void process_lumps(struct sip_msg *msg, struct lump *lumps, char *new_buf,
}; \
break; \
case SUBST_SND_PORT: \
if(send_sock) { \
if(STR_WITHVAL(send_port_str)) { \
memcpy(new_buf + offset, send_port_str->s, \
send_port_str->len); \
offset += send_port_str->len; \
} else { \
LM_CRIT("null send_sock\n"); \
LM_CRIT("null send sock port\n"); \
}; \
break; \
case SUBST_SND_ALL: \
@ -1175,8 +1181,7 @@ void process_lumps(struct sip_msg *msg, struct lump *lumps, char *new_buf,
offset++; \
} \
/* :port */ \
if((send_sock->port_no != SIP_PORT) \
|| (send_port_str != &(send_sock->port_no_str))) { \
if(STR_WITHVAL(send_port_str)) { \
new_buf[offset] = ':'; \
offset++; \
memcpy(new_buf + offset, send_port_str->s, \
@ -1343,12 +1348,17 @@ void process_lumps(struct sip_msg *msg, struct lump *lumps, char *new_buf,
send_address_str = &(send_sock->address_str);
send_af = send_sock->address.af;
}
if(send_sock && send_sock->useinfo.port_no > 0)
send_port_str = &(send_sock->useinfo.port_no_str);
else if(msg->set_global_port.len)
if(send_sock && send_sock->useinfo.name.len > 0) {
if(send_sock->useinfo.port_no > 0) {
send_port_str = &(send_sock->useinfo.port_no_str);
}
} else if(msg->set_global_port.len) {
send_port_str = &(msg->set_global_port);
else
send_port_str = &(send_sock->port_no_str);
} else if(send_sock) {
if(send_sock->port_no != SIP_PORT) {
send_port_str = &(send_sock->port_no_str);
}
}
if(send_sock) {
if(send_sock->useinfo.proto != PROTO_NONE)
send_proto_id = send_sock->useinfo.proto;
@ -1364,9 +1374,11 @@ void process_lumps(struct sip_msg *msg, struct lump *lumps, char *new_buf,
recv_address_str = &(msg->rcv.bind_address->address_str);
recv_af = msg->rcv.bind_address->address.af;
}
if(msg->rcv.bind_address->useinfo.port_no > 0) {
recv_port_str = &(msg->rcv.bind_address->useinfo.port_no_str);
recv_port_no = msg->rcv.bind_address->useinfo.port_no;
if(msg->rcv.bind_address->useinfo.name.len > 0) {
if(msg->rcv.bind_address->useinfo.port_no > 0) {
recv_port_str = &(msg->rcv.bind_address->useinfo.port_no_str);
recv_port_no = msg->rcv.bind_address->useinfo.port_no;
}
} else {
recv_port_str = &(msg->rcv.bind_address->port_no_str);
recv_port_no = msg->rcv.bind_address->port_no;
@ -2910,12 +2922,17 @@ char *via_builder(unsigned int *len, sip_msg_t *msg,
}
}
if(port_str == NULL) {
if(hp && hp->port->len)
if(hp && hp->port->len) {
port_str = hp->port;
else if(send_sock->useinfo.port_no > 0)
port_str = &(send_sock->useinfo.port_no_str);
else
port_str = &(send_sock->port_no_str);
} else if(send_sock->useinfo.name.len > 0) {
if(send_sock->useinfo.port_no > 0) {
port_str = &(send_sock->useinfo.port_no_str);
}
} else {
if(send_sock->port_no != SIP_PORT) {
port_str = &(send_sock->port_no_str);
}
}
}
proto = PROTO_NONE;
if(msg && (msg->msg_flags & FL_USE_XAVP_VIA_FIELDS)
@ -2959,7 +2976,7 @@ char *via_builder(unsigned int *len, sip_msg_t *msg,
via_prefix_len = MY_VIA_LEN + (proto == PROTO_SCTP);
max_len = via_prefix_len + address_str->len /* space in MY_VIA */
+ 2 /* just in case it is a v6 address ... [ ] */
+ 1 /*':'*/ + port_str->len
+ 1 /*':'*/ + (port_str ? port_str->len : 0)
+ (branch ? (MY_BRANCH_LEN + branch->len) : 0)
+ (extra_params ? extra_params->len : 0) + comp_len
+ comp_name_len + CRLF_LEN + 1;
@ -3044,8 +3061,7 @@ char *via_builder(unsigned int *len, sip_msg_t *msg,
}
memcpy(line_buf + via_prefix_len + extra_len, address_str->s,
address_str->len);
if((send_sock->port_no != SIP_PORT)
|| (port_str != &send_sock->port_no_str)) {
if(port_str != NULL && port_str->len > 0) {
line_buf[via_len] = ':';
via_len++;
memcpy(line_buf + via_len, port_str->s, port_str->len);

@ -95,7 +95,7 @@ char *get_hdr_field(
tmp = parse_hname(buf, end, hdr);
if(hdr->type == HDR_ERROR_T) {
ERR("bad header\n");
LOG(cfg_get(core, core_cfg, sip_parser_log), "bad header\n");
goto error;
}
@ -336,7 +336,8 @@ int parse_headers(
rest = get_hdr_field(tmp, end, hf);
switch(hf->type) {
case HDR_ERROR_T:
ERR("bad header field [%.*s]\n",
LOG(cfg_get(core, core_cfg, sip_parser_log),
"bad header field [%.*s]\n",
(end - tmp > 100) ? 100 : (int)(end - tmp), tmp);
goto error;
case HDR_EOH_T:

@ -278,7 +278,8 @@ char *parse_sip_header_name(char *const begin, const char *const end,
if(*p != ' ' && *p != '\t') {
/* no white space - bad header name format */
if(likely(logmode)) {
LM_ERR("invalid header name for [%.*s]\n", (int)(end - begin),
LOG(cfg_get(core, core_cfg, sip_parser_log),
"invalid header name for [%.*s]\n", (int)(end - begin),
begin);
}
hdr->type = HDR_ERROR_T;

@ -237,28 +237,30 @@ int parse_uri(char *buf, int len, struct sip_uri *uri)
} else \
goto error_bad_char
#define check_host_end \
case ':': \
/* found the host */ \
uri->host.s = s; \
uri->host.len = p - s; \
state = URI_PORT; \
s = p + 1; \
break; \
case ';': \
uri->host.s = s; \
uri->host.len = p - s; \
state = URI_PARAM; \
s = p + 1; \
break; \
case '?': \
uri->host.s = s; \
uri->host.len = p - s; \
state = URI_HEADERS; \
s = p + 1; \
break; \
case '&': \
case '@': \
#define check_host_end \
case ':': \
/* found the host */ \
if(scheme != URN_SCH) { \
uri->host.s = s; \
uri->host.len = p - s; \
state = URI_PORT; \
s = p + 1; \
} \
break; \
case ';': \
uri->host.s = s; \
uri->host.len = p - s; \
state = URI_PARAM; \
s = p + 1; \
break; \
case '?': \
uri->host.s = s; \
uri->host.len = p - s; \
state = URI_HEADERS; \
s = p + 1; \
break; \
case '&': \
case '@': \
goto error_bad_char
@ -493,7 +495,7 @@ int parse_uri(char *buf, int len, struct sip_uri *uri)
case '@': /* error no user part, or
* be forgiving and accept it ? */
default:
state = URI_USER;
state = (scheme == URN_SCH) ? URI_HOST : URI_USER;
}
break;
case URI_USER:

@ -810,9 +810,11 @@ static int parse_mixed_content(str *mixed_body, str delimiter, sdp_info_t *_sdp)
} /* end of while */
/* and now we need to parse the content */
if(start_parsing) {
while(('\n' == *rest) || ('\r' == *rest) || ('\t' == *rest)
|| (' ' == *rest))
while((rest < bodylimit)
&& (('\n' == *rest) || ('\r' == *rest) || ('\t' == *rest)
|| (' ' == *rest))) {
rest++; /* Skip any whitespace */
}
_sdp->raw_sdp.s = rest;
_sdp->raw_sdp.len = d2p - rest;
/* LM_DBG("we need to check session %d: <%.*s>\n", session_num, _sdp.raw_sdp.len, _sdp.raw_sdp.s); */

@ -151,8 +151,12 @@ int extract_rtpmap(str *body, str *rtpmap_payload, str *rtpmap_encoding,
char *cp, *cp1;
int len;
if(body->len <= 9) {
return -1;
}
if(strncasecmp(body->s, "a=rtpmap:", 9) != 0) {
/*LM_DBG("We are not pointing to an a=rtpmap: attribute =>`%.*s'\n", body->len, body->s); */
/*LM_DBG("We are not pointing to an a=rtpmap: attribute =>`%.*s'\n",
* body->len, body->s); */
return -1;
}
@ -214,8 +218,12 @@ int extract_fmtp(str *body, str *fmtp_payload, str *fmtp_string)
char *cp, *cp1;
int len;
if(body->len <= 7) {
return -1;
}
if(strncasecmp(body->s, "a=fmtp:", 7) != 0) {
/*LM_DBG("We are not pointing to an a=fmtp: attribute =>`%.*s'\n", body->len, body->s); */
/*LM_DBG("We are not pointing to an a=fmtp: attribute =>`%.*s'\n",
* body->len, body->s); */
return -1;
}
@ -346,13 +354,16 @@ int extract_candidate(str *body, sdp_stream_cell_t *stream)
}
/* generic method for attribute extraction
/* generic method for attribute value extraction
* field must has format "a=attrname:" */
int extract_field(str *body, str *value, str field)
{
if(strncmp(body->s, field.s, field.len < body->len ? field.len : body->len)
!= 0) {
/*LM_DBG("We are not pointing to an %.* attribute =>`%.*s'\n", field.len, field.s, body->len, body->s); */
if(body->len < field.len) {
return -1;
}
if(strncmp(body->s, field.s, field.len) != 0) {
/* LM_DBG("We are not pointing to an %.* attribute =>`%.*s'\n",
field.len, field.s, body->len, body->s); */
return -1;
}
@ -368,22 +379,24 @@ int extract_ice_option(str *body, sdp_stream_cell_t *stream)
sdp_ice_opt_t *ice_opt;
char *ptr_src;
char *end;
int max_options =
10; /* protection - max options can be listed in one line */
int length = 0; /* each option length */
/* a=ice-options: */
if((body->len < 14) || (strncasecmp(body->s, ICE_OPTIONS, 14) != 0))
if((body->len <= 14) || (strncasecmp(body->s, ICE_OPTIONS, 14) != 0))
return -1;
end = body->s + body->len;
ptr_src = body->s + 14;
if(*ptr_src == 32)
ptr_src++; /* if starts with a space, skip it */
/* identify all existing ICE options, if they are listed in one row */
while(*ptr_src && *ptr_src != '\r' && *ptr_src != '\n'
while(ptr_src < end && *ptr_src && *ptr_src != '\r' && *ptr_src != '\n'
&& max_options-- > 0) {
while(*ptr_src != 32 && *ptr_src && *ptr_src != '\r'
while(ptr_src < end && *ptr_src && *ptr_src != 32 && *ptr_src != '\r'
&& *ptr_src != '\n') {
length++;
ptr_src++;
@ -447,6 +460,9 @@ int extract_sendrecv_mode(str *body, str *sendrecv_mode, int *is_on_hold)
{
char *cp1;
if(body->len < 10) {
return -1;
}
cp1 = body->s;
if(!((strncasecmp(cp1, "a=sendrecv", 10) == 0)
|| (strncasecmp(cp1, "a=recvonly", 10) == 0))) {

@ -25,7 +25,7 @@ MODIFIED:
*(r++) = b = ind(mm, y >> RANDSIZL) + x; \
}
void isaac(ctx) randctx *ctx;
void isaac(randctx *ctx)
{
register ub4 a, b, x, y, *m, *mm, *m2, *r, *mend;
mm = ctx->randmem;
@ -78,8 +78,7 @@ void isaac(ctx) randctx *ctx;
}
/* if (flag==TRUE), then use the contents of randrsl[] to initialize mm[]. */
void randinit(ctx, flag) randctx *ctx;
word flag;
void randinit(randctx *ctx, word flag)
{
word i;
ub4 a, b, c, d, e, f, g, h;

@ -1792,7 +1792,8 @@ int str2ipbuf(str *st, ip_addr_t *ipb)
/* just in case that e.g. the VIA parser get confused */
if(unlikely(!st->s || st->len <= 0)) {
LM_ERR("invalid name, no conversion to IP address possible\n");
LM_ERR("invalid name (%p,%d), no conversion to IP address possible\n",
st->s, st->len);
return -1;
}
s = (unsigned char *)st->s;
@ -1902,7 +1903,8 @@ int str2ip6buf(str *st, ip_addr_t *ipb)
/* just in case that e.g. the VIA parser get confused */
if(unlikely(!st->s || st->len <= 0)) {
LM_ERR("invalid name, no conversion to IP address possible\n");
LM_ERR("invalid name (%p,%d), no conversion to IP address possible\n",
st->s, st->len);
return -1;
}
/* init */

@ -207,6 +207,10 @@ static int init_addr_info(struct addr_info *a, char *name, enum si_flags flags)
memset(a, 0, sizeof(*a));
a->name.len = strlen(name);
if(a->name.len <= 0) {
LM_ERR("invalid or empty name value\n");
return -1;
}
a->name.s = pkg_malloc(a->name.len + 1); /* include \0 */
if(a->name.s == 0)
goto error;
@ -224,16 +228,15 @@ static inline struct addr_info *new_addr_info(char *name, enum si_flags gf)
{
struct addr_info *al;
al = pkg_malloc(sizeof(*al));
if(al == 0)
al = pkg_mallocxz(sizeof(*al));
if(al == 0) {
PKG_MEM_ERROR;
goto error;
al->next = 0;
al->prev = 0;
}
if(init_addr_info(al, name, gf) != 0)
goto error;
return al;
error:
PKG_MEM_ERROR;
if(al) {
if(al->name.s)
pkg_free(al->name.s);
@ -1420,7 +1423,7 @@ static int get_flags(int family)
if(nlp->nlmsg_len < NLMSG_LENGTH(sizeof(ifi)))
goto error;
LM_ERR("Interface with index %d has flags %d\n", ifi->ifi_index,
LM_INFO("Interface with index %d has flags %d\n", ifi->ifi_index,
ifi->ifi_flags);
if(ifaces == NULL) {
LM_ERR("get_flags must not be called on empty interface list");
@ -1467,6 +1470,8 @@ static int build_iface_list(void)
int families[] = {AF_INET, AF_INET6};
char name[MAX_IF_LEN];
int is_link_local = 0;
int num = 0;
int ifidx = 0;
if(ifaces == NULL) {
if((ifaces = (struct idxlist *)pkg_malloc(
@ -1528,16 +1533,13 @@ static int build_iface_list(void)
rtl = IFA_PAYLOAD(nlp);
index = ifi->ifa_index;
if(index >= MAX_IFACE_NO) {
LM_ERR("Invalid interface index returned: %d\n", index);
goto error;
}
entry = (struct idx *)pkg_malloc(sizeof(struct idx));
if(entry == 0) {
PKG_MEM_ERROR;
goto error;
}
LM_DBG("trying network interface index: %d (n: %d)\n", index, num);
entry->next = 0;
entry->family = families[i];
@ -1548,24 +1550,24 @@ static int build_iface_list(void)
for(; RTA_OK(rtap, rtl); rtap = RTA_NEXT(rtap, rtl)) {
switch(rtap->rta_type) {
case IFA_ADDRESS:
inet_ntop(families[i], RTA_DATA(rtap), entry->addr,
MAX_IF_LEN);
if((*(int *)RTA_DATA(rtap)) == htons(0xfe80)) {
LM_DBG("Link Local Address, ignoring ...\n");
LM_DBG("Link Local Address is '%s'\n", entry->addr);
is_link_local = 1;
break;
}
inet_ntop(families[i], RTA_DATA(rtap), entry->addr,
MAX_IF_LEN);
LM_DBG("iface <IFA_ADDRESS> addr is %s\n",
LM_DBG("iface <IFA_ADDRESS> address is '%s'\n",
entry->addr);
break;
case IFA_LOCAL:
inet_ntop(families[i], RTA_DATA(rtap), entry->addr,
MAX_IF_LEN);
if((*(int *)RTA_DATA(rtap)) == htons(0xfe80)) {
LM_DBG("Link Local Address, ignoring ...\n");
LM_DBG("Link Local Address is '%s'\n", entry->addr);
is_link_local = 1;
}
inet_ntop(families[i], RTA_DATA(rtap), entry->addr,
MAX_IF_LEN);
LM_DBG("iface <IFA_LOCAL> addr is %s\n", entry->addr);
LM_DBG("iface <IFA_LOCAL> address is '%s'\n",
entry->addr);
break;
case IFA_LABEL:
LM_DBG("iface name is %s\n", (char *)RTA_DATA(rtap));
@ -1581,30 +1583,58 @@ static int build_iface_list(void)
}
}
if(is_link_local) {
if(sr_bind_ipv6_link_local == 0) {
if(sr_bind_ipv6_link_local & KSR_IPV6_LINK_LOCAL_SKIP) {
/* skip - config option */
LM_DBG("skip binding on '%s' (bind mode: %d)\n",
entry->addr, sr_bind_ipv6_link_local);
pkg_free(entry);
continue;
}
if(!(sr_bind_ipv6_link_local & KSR_IPV6_LINK_LOCAL_BIND)) {
/* skip - link local addresses are not bindable without scope */
LM_DBG("not set to on '%s' (bind mode: %d)\n", entry->addr,
sr_bind_ipv6_link_local);
pkg_free(entry);
continue;
}
}
if(strlen(ifaces[index].name) == 0 && strlen(name) > 0) {
memcpy(ifaces[index].name, name, MAX_IF_LEN - 1);
ifaces[index].name[MAX_IF_LEN - 1] = '\0';
for(ifidx = 0; ifidx < MAX_IFACE_NO; ifidx++) {
if(ifaces[ifidx].index == index) {
/* interface with same index already found */
break;
}
}
if(ifidx == MAX_IFACE_NO) {
if(num == MAX_IFACE_NO) {
LM_ERR("too many interfaces: %d (n: %d) - skipping\n",
index, num);
pkg_free(entry);
goto done;
}
ifidx = num;
num++;
}
ifaces[index].index = index;
if(strlen(ifaces[ifidx].name) == 0 && strlen(name) > 0) {
memcpy(ifaces[ifidx].name, name, MAX_IF_LEN - 1);
ifaces[ifidx].name[MAX_IF_LEN - 1] = '\0';
}
if(ifaces[index].addresses == 0)
ifaces[index].addresses = entry;
ifaces[ifidx].index = index;
if(ifaces[ifidx].addresses == 0)
ifaces[ifidx].addresses = entry;
else {
for(tmp = ifaces[index].addresses; tmp->next;
for(tmp = ifaces[ifidx].addresses; tmp->next;
tmp = tmp->next) /*empty*/
;
tmp->next = entry;
}
}
}
done:
if(nl_sock > 0)
close(nl_sock);
/* the socket should be closed so we can bind again */
@ -1649,13 +1679,18 @@ int add_interfaces_via_netlink(char *if_name, int family, unsigned short port,
//if(! (ifaces[i].flags & IFF_UP) ) continue;
for(tmp = ifaces[i].addresses; tmp; tmp = tmp->next) {
LM_DBG("in add_iface_via_netlink Name %s Address %s\n",
LM_DBG("in add_iface_via_netlink Name '%s' Address '%s'\n",
ifaces[i].name, tmp->addr);
if(strlen(tmp->addr) == 0) {
LM_DBG("interface '%s' - skip item with empty address\n",
ifaces[i].name);
continue;
}
/* match family */
if(family && family == tmp->family) {
/* check if loopback */
if(ifaces[i].flags & IFF_LOOPBACK) {
LM_DBG("INTERFACE %s is loopback", ifaces[i].name);
LM_DBG("INTERFACE '%s' is loopback\n", ifaces[i].name);
flags |= SI_IS_LO;
}
/* save the info */
@ -1705,6 +1740,16 @@ int add_interfaces(char *if_name, int family, unsigned short port,
continue;
if(family && family != ifa->ifa_addr->sa_family)
continue;
if(ifa->ifa_addr->sa_family == AF_INET6) {
struct sockaddr_in6 *caddr = (struct sockaddr_in6 *)ifa->ifa_addr;
if((sr_bind_ipv6_link_local & KSR_IPV6_LINK_LOCAL_SKIP)
&& IN6_IS_ADDR_LINKLOCAL(&(caddr->sin6_addr))) {
LM_DBG("skipping iface [%s] fam: [%x] flg: [%lx] addr: [%s]\n",
ifa->ifa_name, ifa->ifa_addr->sa_family,
(unsigned long)ifa->ifa_flags, tmp);
continue;
}
}
sockaddr2ip_addr(&addr, (struct sockaddr *)ifa->ifa_addr);
tmp = ip_addr2a(&addr);
if(ifa->ifa_flags & IFF_LOOPBACK)
@ -1741,7 +1786,7 @@ static int fix_hostname(str *name, struct ip_addr *address, str *address_str,
/* get "official hostnames", all the aliases etc. */
he = resolvehost(name->s);
if(he == 0) {
LM_ERR("could not resolve %s\n", name->s);
LM_ERR("could not resolve '%s'\n", name->s);
goto error;
}
/* check if we got the official name */

@ -44,6 +44,9 @@
/* Maximum length for advertise string of listen socket */
#define MAX_SOCKET_ADVERTISE_STR 511
#define KSR_IPV6_LINK_LOCAL_BIND (1)
#define KSR_IPV6_LINK_LOCAL_SKIP (1 << 1)
int socket2str(char *s, int *len, struct socket_info *si);
int socketinfo2str(char *s, int *len, struct socket_info *si, int mode);

@ -3145,6 +3145,13 @@ int tcp_init(struct socket_info *sock_info)
#endif
addr = &sock_info->su;
if((addr->s.sa_family == AF_INET6)
&& (sr_bind_ipv6_link_local & KSR_IPV6_LINK_LOCAL_SKIP)
&& IN6_IS_ADDR_LINKLOCAL(&addr->sin6.sin6_addr)) {
LM_DBG("skip binding on %s (bind mode: %d)\n", sock_info->address_str.s,
sr_bind_ipv6_link_local);
return 0;
}
/* sock_info->proto=PROTO_TCP; */
if(init_su(addr, &sock_info->address, sock_info->port_no) < 0) {
LM_ERR("could no init sockaddr_union\n");
@ -3212,8 +3219,9 @@ int tcp_init(struct socket_info *sock_info)
LM_WARN("setsockopt v6 tos: %s (%d)\n", strerror(errno), tos);
/* continue since this is not critical */
}
if(sr_bind_ipv6_link_local != 0) {
LM_INFO("setting scope of %s\n", sock_info->address_str.s);
if(sr_bind_ipv6_link_local & KSR_IPV6_LINK_LOCAL_BIND) {
LM_INFO("setting scope of %s (bind mode: %d)\n",
sock_info->address_str.s, sr_bind_ipv6_link_local);
addr->sin6.sin6_scope_id =
ipv6_get_netif_scope(sock_info->address_str.s);
}
@ -3276,9 +3284,15 @@ int tcp_init(struct socket_info *sock_info)
}
#endif
if(bind(sock_info->socket, &addr->s, sockaddru_len(*addr)) == -1) {
LM_ERR("bind(%x, %p, %d) on %s:%d : %s\n", sock_info->socket, &addr->s,
(unsigned)sockaddru_len(*addr), sock_info->address_str.s,
sock_info->port_no, strerror(errno));
LM_ERR("bind(%x, %p, %d) on [%s]:%d : (%d / %s)\n", sock_info->socket,
&addr->s, (unsigned)sockaddru_len(*addr),
sock_info->address_str.s, sock_info->port_no, errno,
strerror(errno));
if(addr->s.sa_family == AF_INET6) {
LM_ERR("might be caused by using a link local address, is "
"'bind_ipv6_link_local' set (now: %d)?\n",
sr_bind_ipv6_link_local);
}
goto error;
}
if(listen(sock_info->socket, TCP_LISTEN_BACKLOG) == -1) {

@ -411,6 +411,14 @@ int udp_init(struct socket_info *sock_info)
unsigned char m_ttl, m_loop;
#endif
addr = &sock_info->su;
if((addr->s.sa_family == AF_INET6)
&& (sr_bind_ipv6_link_local & KSR_IPV6_LINK_LOCAL_SKIP)
&& IN6_IS_ADDR_LINKLOCAL(&addr->sin6.sin6_addr)) {
LM_DBG("skip binding on %s (mode: %d)\n", sock_info->address_str.s,
sr_bind_ipv6_link_local);
return 0;
}
/*
addr=(union sockaddr_union*)pkg_malloc(sizeof(union sockaddr_union));
if (addr==0){
@ -453,8 +461,9 @@ int udp_init(struct socket_info *sock_info)
LM_WARN("setsockopt v6 tos: %s\n", strerror(errno));
/* continue since this is not critical */
}
if(sr_bind_ipv6_link_local != 0) {
LM_INFO("setting scope of %s\n", sock_info->address_str.s);
if(sr_bind_ipv6_link_local & KSR_IPV6_LINK_LOCAL_BIND) {
LM_INFO("setting scope of %s (bind mode: %d)\n",
sock_info->address_str.s, sr_bind_ipv6_link_local);
addr->sin6.sin6_scope_id =
ipv6_get_netif_scope(sock_info->address_str.s);
}

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE database PUBLIC "-//kamailio.org//DTD DBSchema V1.1//EN"
"http://kamailio.org/pub/kamailio/dbschema/dtd/1.1/dbschema.dtd" [
<!ENTITY % entities SYSTEM "entities.xml">
%entities;
]>
<database xmlns:xi="http://www.w3.org/2001/XInclude">
<name>IMS ICSCF Module</name>
<xi:include href="nds_trusted_domains.xml"/>
<xi:include href="s_cscf.xml"/>
<xi:include href="s_cscf_capabilities.xml"/>
</database>

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE table PUBLIC "-//kamailio.org//DTD DBSchema V1.1//EN"
"http://kamailio.org/pub/kamailio/dbschema/dtd/1.1/dbschema.dtd" [
<!ENTITY % entities SYSTEM "entities.xml">
%entities;
]>
<table id="nds_trusted_domains" xmlns:db="http://docbook.org/ns/docbook">
<name>nds_trusted_domains</name>
<version>1</version>
<type db="mysql">&MYSQL_TABLE_TYPE;</type>
<description>
<db:para>Table for trusted domains in IMS. More information at:
<itemizedlist>
<listitem>
<ulink url="&KAMAILIO_MOD_DOC;ims_icscf.html">&KAMAILIO_MOD_DOC;ims_icscf.html</ulink>.
</listitem>
</itemizedlist>
</db:para>
</description>
<column id="id">
<name>id</name>
<type>int</type>
<size>&table_id_len;</size>
<autoincrement/>
<primary/>
<type db="dbtext">int,auto</type>
<description>Unique ID for the trusted domain</description>
</column>
<column id="trusted_domain">
<name>trusted_domain</name>
<type>string</type>
<size>83</size>
<default/>
<description>Trusted domain name</description>
</column>
</table>

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE table PUBLIC "-//kamailio.org//DTD DBSchema V1.1//EN"
"http://kamailio.org/pub/kamailio/dbschema/dtd/1.1/dbschema.dtd" [
<!ENTITY % entities SYSTEM "entities.xml">
%entities;
]>
<table id="s_cscf" xmlns:db="http://docbook.org/ns/docbook">
<name>s_cscf</name>
<version>1</version>
<type db="mysql">&MYSQL_TABLE_TYPE;</type>
<description>
<db:para>Table for Session Control Function (SCF) in IMS. More information at:
<itemizedlist>
<listitem>
<ulink url="&KAMAILIO_MOD_DOC;ims_icscf.html">&KAMAILIO_MOD_DOC;ims_icscf.html</ulink>.
</listitem>
</itemizedlist>
</db:para>
</description>
<column id="id">
<name>id</name>
<type>int</type>
<size>&table_id_len;</size>
<autoincrement/>
<primary/>
<type db="dbtext">int,auto</type>
<description>Unique ID for the SCF</description>
</column>
<column id="name">
<name>name</name>
<type>string</type>
<size>83</size>
<default/>
<description>Name of the SCF</description>
</column>
<column id="s_cscf_uri">
<name>s_cscf_uri</name>
<type>string</type>
<size>83</size>
<default/>
<description>URI of the SCF</description>
</column>
</table>

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE table PUBLIC "-//kamailio.org//DTD DBSchema V1.1//EN"
"http://kamailio.org/pub/kamailio/dbschema/dtd/1.1/dbschema.dtd" [
<!ENTITY % entities SYSTEM "entities.xml">
%entities;
]>
<table id="s_cscf_capabilities" xmlns:db="http://docbook.org/ns/docbook">
<name>s_cscf_capabilities</name>
<version>1</version>
<type db="mysql">&MYSQL_TABLE_TYPE;</type>
<description>
<db:para>Table for SCF capabilities in IMS. More information at:
<itemizedlist>
<listitem>
<ulink url="&KAMAILIO_MOD_DOC;ims_icscf.html">&KAMAILIO_MOD_DOC;ims_icscf.html</ulink>.
</listitem>
</itemizedlist>
</db:para>
</description>
<column id="id">
<name>id</name>
<type>int</type>
<size>&table_id_len;</size>
<autoincrement/>
<primary/>
<type db="dbtext">int,auto</type>
<description>Unique ID for the capability</description>
</column>
<column id="id_s_cscf">
<name>id_s_cscf</name>
<type>int</type>
<size>11</size>
<default>0</default>
<description>ID of the associated SCF</description>
</column>
<column id="capability">
<name>capability</name>
<type>int</type>
<size>11</size>
<default>0</default>
<description>Capability value</description>
</column>
<index>
<name>idx_capability</name>
<colref linkend="capability"/>
</index>
<index>
<name>idx_id_s_cscf</name>
<colref linkend="id_s_cscf"/>
</index>
</table>

@ -304,6 +304,11 @@
#endif
#endif /* __riscv */
/* LOONGARCH64, https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html */
#if defined(__loongarch64)
#define DUK_F_LOONGARCH64
#endif
/* SuperH */
#if defined(__sh__) || defined(__sh1__) || defined(__SH1__) \
|| defined(__sh2__) || defined(__SH2__) || defined(__sh3__) \
@ -979,6 +984,11 @@
/* SPARC byte order varies so rely on autodetection. */
#undef DUK_USE_PACKED_TVAL
#define DUK_F_PACKED_TVAL_PROVIDED
#elif defined(DUK_F_LOONGARCH64)
#define DUK_USE_ARCH_STRING "loongarch64"
#define DUK_USE_BYTEORDER 1
#undef DUK_USE_PACKED_TVAL
#define DUK_F_PACKED_TVAL_PROVIDED
#elif defined(DUK_F_RISCV32)
/* --- RISC-V 32-bit --- */
#define DUK_USE_ARCH_STRING "riscv32"

@ -241,13 +241,19 @@ route[RESUME] {
4.3. async_sleep(seconds)
Simulate a sleep of 'seconds' and then continue the processing of SIP
request with the next action. In case of internal errors, the function
returns false.
request with the next action. Note that the processing continues till
the last action in the current route block. Consider using
async_route() instead if you want to control better what is executed
after the wait time. Beacuse the execution is resumed in another
process, do not use private memory variables before and after the async
sleep.
The sleep parameter represent the number of seconds to suspend the
processing of SIP request. Maximum value is 100. The parameter can be a
static integer or a variable holding an integer.
In case of internal errors, the function returns false.
This function can be used from REQUEST_ROUTE.
Example 1.6. async_sleep usage
@ -259,10 +265,9 @@ exit;
4.4. async_ms_sleep(milliseconds)
Simulate a sleep of 'milliseconds' and then continue the processing of
SIP request with the next action. In case of internal errors, the
function returns false. This function works only if the ms_timer
parameter has a value greater than 0.
Similar to async_sleep(), but with a 'milliseconds' parameter. This
function works only if the ms_timer parameter has a value greater than
0.
The sleep parameter represent the number of milliseconds to suspend the
processing of SIP request. Maximum value is 30000 (30 sec). The

@ -234,8 +234,11 @@ route[RESUME] {
</title>
<para>
Simulate a sleep of 'seconds' and then continue the processing of SIP
request with the next action. In case of internal errors, the function
returns false.
request with the next action. Note that the processing continues till
the last action in the current route block. Consider using async_route()
instead if you want to control better what is executed after the wait
time. Beacuse the execution is resumed in another process, do not use
private memory variables before and after the async sleep.
</para>
<para>
The sleep parameter represent the number of seconds to suspend the
@ -243,6 +246,9 @@ route[RESUME] {
a static integer or a variable holding an integer.
</para>
<para>
In case of internal errors, the function returns false.
</para>
<para>
This function can be used from REQUEST_ROUTE.
</para>
<example>
@ -262,15 +268,13 @@ exit;
<function moreinfo="none">async_ms_sleep(milliseconds)</function>
</title>
<para>
Simulate a sleep of 'milliseconds' and then continue the processing of SIP
request with the next action. In case of internal errors, the function
returns false.
This function works only if the ms_timer parameter has a value greater than 0.
Similar to async_sleep(), but with a 'milliseconds' parameter. This
function works only if the ms_timer parameter has a value greater than 0.
</para>
<para>
The sleep parameter represent the number of milliseconds to suspend the
processing of SIP request. Maximum value is 30000 (30 sec). The parameter can be
a static integer or a variable holding an integer.
processing of SIP request. Maximum value is 30000 (30 sec). The parameter
can be a static integer or a variable holding an integer.
</para>
<para>
This function can be used from REQUEST_ROUTE.

@ -250,10 +250,10 @@ int auth_xkeys_add(sip_msg_t *msg, str *hdr, str *key, str *alg, str *data)
return -1;
}
strncpy(xdata.s, hdr->s, hdr->len);
memcpy(xdata.s, hdr->s, hdr->len);
xdata.s[hdr->len] = ':';
xdata.s[hdr->len + 1] = ' ';
strncpy(xdata.s + hdr->len + 2, xout, xdata.len);
memcpy(xdata.s + hdr->len + 2, xout, xdata.len);
xdata.len += hdr->len + 2;
xdata.s[xdata.len] = '\r';
xdata.s[xdata.len + 1] = '\n';

@ -117,7 +117,7 @@ int sm_process(
R_Disc(p);
p->state = Closed;
}
log_peer_list(L_INFO);
log_peer_list();
break;
case Stop:
/* just ignore this state */
@ -134,7 +134,7 @@ int sm_process(
case I_Rcv_Conn_Ack:
p->state = Wait_I_CEA;
I_Snd_CER(p);
if (p->state == Closed)
if(p->state == Closed)
sm_process(p, Start, 0, 1, 0);
break;
case I_Rcv_Conn_NAck:
@ -179,7 +179,7 @@ int sm_process(
Cleanup(p, p->I_sock);
p->state = Closed;
}
log_peer_list(L_INFO);
log_peer_list();
break;
case R_Conn_CER:
if(p->r_cer)
@ -392,12 +392,12 @@ int sm_process(
Snd_DPA(p, msg, AAA_SUCCESS, p->R_sock);
R_Disc(p);
p->state = Closed;
log_peer_list(L_INFO);
log_peer_list();
break;
case R_Peer_Disc:
R_Disc(p);
p->state = Closed;
log_peer_list(L_INFO);
log_peer_list();
break;
case R_Rcv_CER:
result_code = Process_CER(p, msg);
@ -417,7 +417,7 @@ int sm_process(
/*R_Disc(p);p.state = Closed;*/
p->state = R_Open; /* Or maybe I should disconnect it?*/
}
log_peer_list(L_INFO);
log_peer_list();
break;
default:
LM_ERR("sm_process(): In state %s invalid event %s\n",
@ -459,12 +459,12 @@ int sm_process(
Snd_DPA(p, msg, 2001, p->I_sock);
I_Disc(p);
p->state = Closed;
log_peer_list(L_INFO);
log_peer_list();
break;
case I_Peer_Disc:
I_Disc(p);
p->state = Closed;
log_peer_list(L_INFO);
log_peer_list();
break;
case I_Rcv_CER:
result_code = Process_CER(p, msg);
@ -669,13 +669,13 @@ void I_Snd_CER(peer *p)
if((ret = getsockname(p->I_sock, &(addr_u.addr), &addrlen)) == -1) {
LM_ERR("I_Snd_CER(): Error on finding local host address > %s\n",
strerror(errno));
Cleanup(p,p->I_sock);
Cleanup(p, p->I_sock);
p->state = Closed;
AAAFreeMessage(&cer);
return;
}
if (ret != -1) {
if(ret != -1) {
switch(addr_u.addr.sa_family) {
case AF_INET:
set_2bytes(x, 1);

@ -838,6 +838,7 @@ static int db_mongodb_store_result(const db1_con_t *_h, db1_res_t **_r)
|| !mongoc_cursor_next(mgres->cursor, &itdoc) || !itdoc) {
if(mongoc_cursor_error(mgres->cursor, &error)) {
LM_DBG("An error occurred: %s\n", error.message);
goto error;
} else {
LM_DBG("no result from mongodb\n");
}

@ -3779,11 +3779,15 @@ int ds_is_active_uri(sip_msg_t *msg, int group, str *uri)
for(j = 0; j < list->nr; j++) {
if(!ds_skip_dst(list->dlist[j].flags)) {
if(uri == NULL || uri->s == NULL || uri->len <= 0) {
LM_DBG("one destination active: %d %.*s\n", group,
list->dlist[j].uri.len, list->dlist[j].uri.s);
return 1;
}
if((list->dlist[j].uri.len == uri->len)
&& (memcmp(list->dlist[j].uri.s, uri->s, uri->len)
== 0)) {
LM_DBG("destination active: %d %.*s\n", group,
list->dlist[j].uri.len, list->dlist[j].uri.s);
return 1;
}
}

@ -61,7 +61,7 @@ extern int curl_verbose;
extern int curl_follow_redirect;
void set_curl_mem_callbacks(void);
int init_http_multi();
int init_http_multi(struct event_base *evbase, struct http_m_global *wg);
int multi_timer_cb(CURLM *multi, long timeout_ms, struct http_m_global *g);
void timer_cb(int fd, short kind, void *userp);
int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp);

@ -31,19 +31,19 @@
#include "config.h"
struct cfg_group_registrar default_registrar_cfg = {
3600, /* default_expires */
0, /* default_expires_range */
60, /* min_expires */
0, /* max_expires */
3600, /* emergency contact default expires */
60, /* emergency contact max expires */
0, /* emergency contact min expires */
0, /* max_contacts */
0, /* retry_after */
0, /* case_sensitive */
Q_UNSPECIFIED, /* default_q */
1, /* append_branches */
"" /* realm_pref */
.default_expires = 3600, /* default_expires */
.default_expires_range = 0, /* default_expires_range */
.min_expires = 60, /* min_expires */
.max_expires = 600000, /* max_expires */
.em_default_expires = 1800, /* emergency contact default expires */
.em_max_expires = 3600, /* emergency contact max expires */
.em_min_expires = 0, /* emergency contact min expires */
.max_contacts = 0, /* max_contacts */
.retry_after = 0, /* retry_after */
.case_sensitive = 0, /* case_sensitive */
.default_q = Q_UNSPECIFIED, /* default_q */
.append_branches = 1, /* append_branches */
.realm_pref = "" /* realm_pref */
};
void *registrar_cfg = &default_registrar_cfg;

@ -284,7 +284,7 @@ static param_export_t params[] = {
{"max_expires", INT_PARAM, &default_registrar_cfg.max_expires},
{"em_default_expires", INT_PARAM,
&default_registrar_cfg.em_default_expires},
{"em_min_expires", INT_PARAM, &default_registrar_cfg.em_max_expires},
{"em_max_expires", INT_PARAM, &default_registrar_cfg.em_max_expires},
{"em_min_expires", INT_PARAM, &default_registrar_cfg.em_min_expires},
{"default_q", INT_PARAM, &default_registrar_cfg.default_q},

@ -125,20 +125,24 @@ static inline int calc_contact_expires(
: default_registrar_cfg.default_expires;
goto end;
}
if(!sos_reg && r < default_registrar_cfg.min_expires) {
if(!sos_reg && r < default_registrar_cfg.min_expires
&& default_registrar_cfg.min_expires != 0) {
r = default_registrar_cfg.min_expires;
goto end;
}
if(sos_reg && r < default_registrar_cfg.em_min_expires) {
if(sos_reg && r < default_registrar_cfg.em_min_expires
&& default_registrar_cfg.em_min_expires != 0) {
r = default_registrar_cfg.em_min_expires;
goto end;
}
if(!sos_reg && r > default_registrar_cfg.max_expires) {
if(!sos_reg && r > default_registrar_cfg.max_expires
&& default_registrar_cfg.max_expires != 0) {
r = default_registrar_cfg.max_expires;
goto end;
}
if(sos_reg && r > default_registrar_cfg.em_max_expires) {
r = default_registrar_cfg.em_min_expires;
if(sos_reg && r > default_registrar_cfg.em_max_expires
&& default_registrar_cfg.em_max_expires != 0) {
r = default_registrar_cfg.em_max_expires;
goto end;
}
end:

@ -192,7 +192,7 @@ int new_pcontact(struct udomain *_d, str *_contact, struct pcontact_info *_ci,
memcpy(p, _contact->s, _contact->len);
p += _contact->len;
(*_c)->aor.len = _contact->len;
(*_c)->domain = (str *)_d;
(*_c)->domain = _d->name;
if(parse_uri((*_c)->aor.s, (*_c)->aor.len, &sip_uri) != 0) {
LM_ERR("unable to determine contact host from uri [%.*s\n",

@ -60,8 +60,8 @@ void insert_ppublic(struct pcontact *_c, ppublic_t *_p);
int new_ppublic(str *public_identity, int is_default, ppublic_t **_p);
void free_ppublic(ppublic_t *_p);
int new_pcontact(
/*str* _dom, str* public_identity, int reg_state, int barring, ims_subscription** s, str* ccf1, str* ccf2, str* ecf1, str* ecf2, impurecord_t** _r*/);
int new_pcontact(struct udomain *_d, str *_contact, struct pcontact_info *_ci,
struct pcontact **_c);
void free_pcontact(pcontact_t *_c);
void print_pcontact(FILE *_f, pcontact_t *_r);
ppublic_t *mem_insert_ppublic(

@ -229,7 +229,7 @@ int mem_insert_pcontact(struct udomain *_d, str *_contact,
{
int sl;
if(new_pcontact(_d->name, _contact, _ci, _c) < 0) {
if(new_pcontact(_d, _contact, _ci, _c) < 0) {
LM_ERR("creating pcontact failed\n");
return -1;
}

@ -128,7 +128,7 @@ typedef struct reusable_buffer
int data_len;
} t_reusable_buffer;
int use_location_pcscf_table();
int use_location_pcscf_table(str *domain);
void destroy_db();
int init_db(const str *db_url, int db_update_period, int fetch_num_rows);
int connect_db(const str *db_url);

@ -498,7 +498,7 @@ static int ki_jwt_verify_key(
ret = jwt_decode(
&jwt, jwtval->s, (unsigned char *)kdata.s, (size_t)kdata.len);
if(ret != 0 || jwt == NULL) {
LM_ERR("failed to decode jwt value\n");
LM_ERR("failed to decode jwt value (ret: %d jwt: %p)\n", ret, jwt);
goto error;
}
if(jwt_validate(jwt, jwt_valid) != 0) {

@ -846,17 +846,17 @@ void kz_amqp_channel_close(kz_amqp_conn_ptr rmq, amqp_channel_t channel)
kz_amqp_error("closing channel",
amqp_channel_close(rmq->conn, channel, AMQP_REPLY_SUCCESS));
}
#if AMQP_VERSION_MAJOR == 0 && AMQP_VERSION_MINOR < 13
int kz_ssl_initialized = 0;
#endif
int kz_amqp_connection_open_ssl(kz_amqp_conn_ptr rmq)
{
#if AMQP_VERSION_MAJOR == 0 && AMQP_VERSION_MINOR < 13
if(!kz_ssl_initialized) {
kz_ssl_initialized = 1;
amqp_set_initialize_ssl_library(1);
}
#endif
if(!(rmq->conn = amqp_new_connection())) {
LM_ERR("Failed to create new AMQP connection\n");
goto error;

@ -153,7 +153,6 @@ static int child_init(int rank)
{
int i = 0, ld_count = 0;
char *ld_name;
int ret = 0;
/* don't do anything for non-worker processes */
if(rank == PROC_INIT || rank == PROC_MAIN || rank == PROC_TCP_MAIN)

@ -34,24 +34,6 @@ static void lrkproxy_hash_table_free_row_lock(gen_lock_t *row_lock);
static struct lrkproxy_hash_table *lrkproxy_hash_table;
/* get from sipwise rtpengine */
static int str_cmp_str(const str a, const str b)
{
if(a.len < b.len)
return -1;
if(a.len > b.len)
return 1;
if(a.len == 0 && b.len == 0)
return 0;
return memcmp(a.s, b.s, a.len);
}
/* get from sipwise rtpengine */
static int str_equal(str a, str b)
{
return (str_cmp_str(a, b) == 0);
}
/* get from sipwise rtpengine */
static unsigned int str_hash(str s)
{
@ -321,8 +303,8 @@ int lrkproxy_hash_table_insert(
while(entry) {
// if found, don't add new entry
if(str_equal(entry->callid, new_entry->callid)
&& str_equal(entry->viabranch, new_entry->viabranch)) {
if(STR_EQ(entry->callid, new_entry->callid)
&& STR_EQ(entry->viabranch, new_entry->viabranch)) {
// unlock
lock_release(lrkproxy_hash_table->row_locks[hash_index]);
LM_NOTICE("callid=%.*s, viabranch=%.*s already in hashtable, "
@ -403,13 +385,13 @@ int lrkproxy_hash_table_remove(str callid, str viabranch, enum lrk_operation op)
viabranch.len, viabranch.s, entry->viabranch.len,
entry->viabranch.s);
// if callid found, delete entry
if((str_equal(entry->callid, callid)
&& str_equal(entry->viabranch, viabranch))
|| (str_equal(entry->callid, callid) && viabranch.len == 0
if((STR_EQ(entry->callid, callid)
&& STR_EQ(entry->viabranch, viabranch))
|| (STR_EQ(entry->callid, callid) && viabranch.len == 0
&& op == OP_DELETE)
|| str_equal(entry->callid, callid)) {
// if ((str_equal(entry->callid, callid) && str_equal(entry->viabranch, viabranch)) ||
// (str_equal(entry->callid, callid) && viabranch.len == 0 && op == OP_DELETE)) {
|| STR_EQ(entry->callid, callid)) {
// if ((STR_EQ(entry->callid, callid) && STR_EQ(entry->viabranch, viabranch)) ||
// (STR_EQ(entry->callid, callid) && viabranch.len == 0 && op == OP_DELETE)) {
// set pointers; exclude entry
// set pointers; exclude entry
@ -496,10 +478,10 @@ struct lrkproxy_hash_entry *lrkproxy_hash_table_lookup(
while(entry) {
// if callid found, return entry
if((str_equal(entry->callid, callid)
&& str_equal(entry->viabranch, viabranch))
|| (str_equal(entry->callid, callid) && viabranch.len == 0)
|| str_equal(entry->callid, callid)) {
if((STR_EQ(entry->callid, callid)
&& STR_EQ(entry->viabranch, viabranch))
|| (STR_EQ(entry->callid, callid) && viabranch.len == 0)
|| STR_EQ(entry->callid, callid)) {
// node = entry->node;
// unlock

@ -998,6 +998,8 @@ static int add_contact_alias_3(
struct lump *anchor;
struct sip_uri uri;
char *bracket, *lt, *param, *at, *start;
int is_ipv6 = 0;
int i;
/* Do nothing if Contact header does not exist */
if(!msg->contact) {
@ -1058,8 +1060,8 @@ static int add_contact_alias_3(
}
/* Create ;alias param */
param_len = _ksr_contact_salias.len + IP6_MAX_STR_SIZE
+ 1 /* ~ */ + 5 /* port */
param_len = _ksr_contact_salias.len + 1 /* [ */ + IP6_MAX_STR_SIZE
+ 1 /* ] */ + 1 /* ~ */ + 5 /* port */
+ 1 /* ~ */ + 1 /* proto */ + 1 /* closing > */;
param = (char *)pkg_malloc(param_len);
if(!param) {
@ -1068,8 +1070,20 @@ static int add_contact_alias_3(
}
at = param;
/* ip address */
for(i = 0; i < ip_str->len; i++) {
if(ip_str->s[i] == ':') {
is_ipv6 = 1;
break;
}
}
if(is_ipv6 && ip_str->s[0] != '[') {
append_chr(at, '[');
}
append_str(at, _ksr_contact_salias.s, _ksr_contact_salias.len);
append_str(at, ip_str->s, ip_str->len);
if(is_ipv6 && ip_str->s[0] != '[') {
append_chr(at, ']');
}
/* port */
append_chr(at, '~');
append_str(at, port_str->s, port_str->len);
@ -1140,6 +1154,7 @@ static int ki_handle_ruri_alias_mode(struct sip_msg *msg, int mode)
*trans, *start;
unsigned int len, rest_len, val_len, alias_len, proto_type, cur_uri_len,
ip_len, ip_port_len, port_len, i;
int is_ipv6 = 0;
if(parse_sip_msg_uri(msg) < 0) {
LM_ERR("while parsing Request-URI\n");
@ -1188,7 +1203,6 @@ static int ki_handle_ruri_alias_mode(struct sip_msg *msg, int mode)
// IPv6 needs some [] added when composing a SIP URI, which further
// complicates this code.
ip_len = port - val;
int is_ipv6 = 0;
for(i = 0; i < ip_len; i++) {
if(val[i] == ':') {
is_ipv6 = 1;
@ -1206,7 +1220,7 @@ static int ki_handle_ruri_alias_mode(struct sip_msg *msg, int mode)
append_str(at, "sip:", 4);
ip_port_len = trans - val;
alias_len = _ksr_contact_salias.len + ip_port_len + 2 /* ~n */;
if(is_ipv6) {
if(is_ipv6 && val[0] != '[') {
// IPv6 - add '[' ']' around IP
// then append ':' and copy the port
append_chr(at, '[');

@ -98,16 +98,6 @@ typedef struct str_map
extern str_map_t algo_names[];
static inline int str_cmp(const str *a, const str *b)
{
return !(a->len == b->len && !strncmp(a->s, b->s, a->len));
}
static inline int str_i_cmp(const str *a, const str *b)
{
return !(a->len == b->len && !strncasecmp(a->s, b->s, a->len));
}
/**
* converts a mapped str to an int
* \return 0 if found, -1 otherwise
@ -115,7 +105,7 @@ static inline int str_i_cmp(const str *a, const str *b)
static inline int str_map_str(const str_map_t *map, const str *key, int *ret)
{
for(; map->str.s; map++)
if(!str_i_cmp(&map->str, key)) {
if(!str_strcasecmp(&map->str, key)) {
*ret = map->id;
return 0;
}

@ -35,7 +35,7 @@ dmq_api_t pres_dmqb;
dmq_peer_t *pres_dmq_peer = NULL;
dmq_resp_cback_t pres_dmq_resp_callback = {&pres_dmq_resp_callback_f, 0};
int pres_dmq_send_all_presentities();
int pres_dmq_send_all_presentities(dmq_node_t *dmq_node);
int pres_dmq_request_sync();
/**

@ -87,7 +87,9 @@ static int max_reconnect_attempts = 1;
static int timeout_sec = 1;
static int timeout_usec = 0;
static int direct_reply_to = 0;
#if AMQP_VERSION_MAJOR == 0 && AMQP_VERSION_MINOR < 13
static int amqp_ssl_init_called = 0;
#endif
/* module helper functions */
static int rabbitmq_connect(amqp_connection_state_t *conn);
@ -570,12 +572,14 @@ static int rabbitmq_connect(amqp_connection_state_t *conn)
int log_ret;
// amqp_rpc_reply_t reply;
#if AMQP_VERSION_MAJOR == 0 && AMQP_VERSION_MINOR < 13
// amqp_ssl_init_called should only be called once
if(amqp_info.ssl && !amqp_ssl_init_called) {
amqp_set_initialize_ssl_library(1);
amqp_ssl_init_called = 1;
LM_DBG("AMQP SSL library initialized\n");
}
#endif
// establish a new connection to RabbitMQ server
*conn = amqp_new_connection();

@ -60,9 +60,6 @@ MODULE_VERSION
#define RXL(m, str, i) (int)((m)[i].rm_eo - (m)[i].rm_so)
#define RXS(m, str, i) (str) + (m)[i].rm_so
static inline int str_cmp(const str *a, const str *b);
static inline int str_i_cmp(const str *a, const str *b);
typedef struct str_map
{
str str;
@ -256,7 +253,7 @@ struct module_exports exports = {
static int str_map_str(const str_map_t *map, const str *key, int *ret)
{
for(; map->str.s; map++)
if(!str_cmp(&map->str, key)) {
if(!str_strcmp(&map->str, key)) {
*ret = map->id;
return 0;
}
@ -704,16 +701,6 @@ static void destroy(void)
}
static inline int str_cmp(const str *a, const str *b)
{
return !(a->len == b->len && !strncmp(a->s, b->s, a->len));
}
static inline int str_i_cmp(const str *a, const str *b)
{
return !(a->len == b->len && !strncasecmp(a->s, b->s, a->len));
}
str queue_other = str_init("*");
/**
@ -727,10 +714,10 @@ static int find_queue(struct sip_msg *msg, str *method, int *queue)
*queue = -1;
for(i = 0; i < *nqueues; i++)
if(!str_i_cmp(queues[i].method, method)) {
if(!str_strcasecmp(queues[i].method, method)) {
*queue = i;
return 0;
} else if(!str_i_cmp(queues[i].method, &queue_other)) {
} else if(!str_strcasecmp(queues[i].method, &queue_other)) {
*queue = i;
}

@ -926,6 +926,7 @@ int save(struct sip_msg *_m, udomain_t *_d, int _cflags, str *_uri)
str aor;
int ret;
sip_uri_t *u;
sip_uri_t turi;
rr_t *route;
struct sip_uri puri;
param_hooks_t hooks;
@ -935,7 +936,23 @@ int save(struct sip_msg *_m, udomain_t *_d, int _cflags, str *_uri)
int novariation = 0;
u = parse_to_uri(_m);
if(_uri != NULL && _uri->len > 0) {
if(extract_aor(_uri, &aor, &turi) < 0) {
LM_ERR("failed to extract Address Of Record\n");
return -1;
}
u = &turi;
} else {
u = parse_to_uri(_m);
if(u == NULL) {
LM_ERR("failed to extract Address Of Record\n");
return -1;
}
if(extract_aor(&(get_to(_m)->uri), &aor, NULL) < 0) {
LM_ERR("failed to extract Address Of Record\n");
return -1;
}
}
if(u == NULL)
goto error;
@ -1026,11 +1043,6 @@ int save(struct sip_msg *_m, udomain_t *_d, int _cflags, str *_uri)
get_act_time();
c = get_first_contact(_m);
if(extract_aor((_uri) ? _uri : &get_to(_m)->uri, &aor, NULL) < 0) {
LM_ERR("failed to extract Address Of Record\n");
goto error;
}
mem_only = is_cflag_set(REG_SAVE_MEM_FL) ? FL_MEM : FL_NONE;
novariation = is_cflag_set(REG_SAVE_NOVARIATION_FL) ? 1 : 0;
@ -1094,22 +1106,29 @@ int unregister(struct sip_msg *_m, udomain_t *_d, str *_uri, str *_ruid)
{
str aor = {0, 0};
sip_uri_t *u;
sip_uri_t turi;
urecord_t *r;
ucontact_t *c;
int res;
if(_ruid == NULL) {
if(_ruid == NULL || _ruid->len <= 0) {
/* No ruid provided - remove all contacts for aor */
if(extract_aor(_uri, &aor, NULL) < 0) {
LM_ERR("failed to extract Address Of Record\n");
return -1;
}
u = parse_to_uri(_m);
if(u == NULL) {
LM_ERR("failed to extract Address Of Record\n");
return -1;
if(_uri != NULL && _uri->len > 0) {
if(extract_aor(_uri, &aor, &turi) < 0) {
LM_ERR("failed to extract Address Of Record\n");
return -1;
}
u = &turi;
} else {
u = parse_to_uri(_m);
if(u == NULL) {
LM_ERR("failed to extract Address Of Record\n");
return -1;
}
if(extract_aor(&(get_to(_m)->uri), &aor, NULL) < 0) {
LM_ERR("failed to extract Address Of Record\n");
return -1;
}
}
if(star(_m, _d, &aor, &u->host) < 0) {
@ -1118,9 +1137,7 @@ int unregister(struct sip_msg *_m, udomain_t *_d, str *_uri, str *_ruid)
}
} else {
/* ruid provided - remove a specific contact */
if(_uri->len > 0) {
if(_uri != NULL && _uri->len > 0) {
if(extract_aor(_uri, &aor, NULL) < 0) {
LM_ERR("failed to extract Address Of Record\n");
return -1;
@ -1138,9 +1155,7 @@ int unregister(struct sip_msg *_m, udomain_t *_d, str *_uri, str *_ruid)
return -2;
}
_reg_ul.unlock_udomain(_d, &aor);
} else {
res = _reg_ul.delete_urecord_by_ruid(_d, _ruid);
switch(res) {
case -1:

@ -61,10 +61,11 @@ Camille Oudot
3.20. force_send_sock (str)
3.21. trace_init_mode (integer)
3.22. trace_mode (integer)
3.23. auth_key (integer)
3.24. evcb_msg (str)
3.25. trace_dialog_ack (str)
3.26. trace_dialog_spiral (str)
3.23. data_mode (integer)
3.24. auth_key (integer)
3.25. evcb_msg (str)
3.26. trace_dialog_ack (str)
3.27. trace_dialog_spiral (str)
4. Functions
@ -107,15 +108,16 @@ Camille Oudot
1.19. Set send_sock_addr parameter
1.20. Set trace_init_mode parameter
1.21. Set trace_mode parameter
1.22. Set auth_key parameter
1.23. Set evcb_msg parameter
1.24. Set trace_dialog_ack parameter
1.25. Set trace_dialog_spiral parameter
1.26. sip_trace() usage
1.27. sip_trace_mode() usage
1.28. sip_trace_msg() usage
1.29. hlog() usage
1.30. Send relayed ACK message
1.22. Set data_mode parameter
1.23. Set auth_key parameter
1.24. Set evcb_msg parameter
1.25. Set trace_dialog_ack parameter
1.26. Set trace_dialog_spiral parameter
1.27. sip_trace() usage
1.28. sip_trace_mode() usage
1.29. sip_trace_msg() usage
1.30. hlog() usage
1.31. Send relayed ACK message
Chapter 1. Admin Guide
@ -151,10 +153,11 @@ Chapter 1. Admin Guide
3.20. force_send_sock (str)
3.21. trace_init_mode (integer)
3.22. trace_mode (integer)
3.23. auth_key (integer)
3.24. evcb_msg (str)
3.25. trace_dialog_ack (str)
3.26. trace_dialog_spiral (str)
3.23. data_mode (integer)
3.24. auth_key (integer)
3.25. evcb_msg (str)
3.26. trace_dialog_ack (str)
3.27. trace_dialog_spiral (str)
4. Functions
@ -238,10 +241,11 @@ Chapter 1. Admin Guide
3.20. force_send_sock (str)
3.21. trace_init_mode (integer)
3.22. trace_mode (integer)
3.23. auth_key (integer)
3.24. evcb_msg (str)
3.25. trace_dialog_ack (str)
3.26. trace_dialog_spiral (str)
3.23. data_mode (integer)
3.24. auth_key (integer)
3.25. evcb_msg (str)
3.26. trace_dialog_ack (str)
3.27. trace_dialog_spiral (str)
3.1. db_url (str)
@ -553,42 +557,55 @@ modparam("siptrace", "trace_mode", 1)
modparam("siptrace", "trace_mode", 3)
...
3.23. auth_key (integer)
3.23. data_mode (integer)
A set of flags to control what data is used for the trace. If flag 1
(value 1) is set, then advertised address (when set) is used instead of
socket bind address.
Default value is 0.
Example 1.22. Set data_mode parameter
...
modparam("siptrace", "data_mode", 1)
...
3.24. auth_key (integer)
A string with an authorization key. Supported on HEPv3 only.
Default value is empty.
Example 1.22. Set auth_key parameter
Example 1.23. Set auth_key parameter
...
modparam("siptrace", "auth_key", "spoihepuirthpeuia")
...
3.24. evcb_msg (str)
3.25. evcb_msg (str)
Set the name of KEMI function to be executed instead of
event_route[siptrace:msg].
Default value is empty.
Example 1.23. Set evcb_msg parameter
Example 1.24. Set evcb_msg parameter
...
modparam("siptrace", "evcb_msg", "ksr_siptrace_msg")
...
3.25. trace_dialog_ack (str)
3.26. trace_dialog_ack (str)
Enable tracing of in-dialog ACK. Before this param, one must have set
the onsend() route and captured the outgoing ACK there.
Default value is 1 (enabled).
Example 1.24. Set trace_dialog_ack parameter
Example 1.25. Set trace_dialog_ack parameter
...
modparam("siptrace", "trace_dialog_ack", 1)
...
3.26. trace_dialog_spiral (str)
3.27. trace_dialog_spiral (str)
Enable tracing of dialog spirals. A spiraled dialog is a dialog
established by a SIP INVITE that loops back to the same kamailio (as
@ -597,7 +614,7 @@ modparam("siptrace", "trace_dialog_ack", 1)
Default value is 1 (enabled).
Example 1.25. Set trace_dialog_spiral parameter
Example 1.26. Set trace_dialog_spiral parameter
...
modparam("siptrace", "trace_dialog_spiral", 1)
...
@ -633,7 +650,7 @@ modparam("siptrace", "trace_dialog_spiral", 1)
ONREPLY_ROUTE, BRANCH_ROUTE.
Default value is "NULL".
Example 1.26. sip_trace() usage
Example 1.27. sip_trace() usage
...
sip_trace();
...
@ -659,7 +676,7 @@ sip_trace("sip:10.1.1.2:5085", "$ci-abc", "d");
This function can be used in ANY_ROUTE.
Example 1.27. sip_trace_mode() usage
Example 1.28. sip_trace_mode() usage
...
sip_trace_mode("t");
...
@ -674,7 +691,7 @@ sip_trace_mode("t");
This function can be used in ANY_ROUTE.
Example 1.28. sip_trace_msg() usage
Example 1.29. sip_trace_msg() usage
...
sip_trace_msg("$var(msg)", "udp:127.0.0.1:5062", "udp:127.0.0.1:5064", "sip:127.
0.0.1:5090", "");
@ -692,7 +709,7 @@ sip_trace_msg("$var(msg)", "udp:127.0.0.1:5062", "udp:127.0.0.1:5064", "sip:127.
* message - The text to send to Homer as log event. (This parameter
may contain PVs)
Example 1.29. hlog() usage
Example 1.30. hlog() usage
...
hlog("[cfg:$cfg(line)] This is a log from kamailio to Homer");
...
@ -766,7 +783,7 @@ event_route[siptrace:msg] {
this name will result in overlapping internal avp used by the module
therefore causing unknown consequences.
Example 1.30. Send relayed ACK message
Example 1.31. Send relayed ACK message
...
onsend_route {
if (is_method("ACK")) {

@ -610,6 +610,26 @@ modparam("siptrace", "trace_mode", 1)
...
modparam("siptrace", "trace_mode", 3)
...
</programlisting>
</example>
</section>
<section id="siptrace.p.data_mode">
<title><varname>data_mode</varname> (integer)</title>
<para>
A set of flags to control what data is used for the trace.
If flag 1 (value 1) is set, then advertised address (when set)
is used instead of socket bind address.
</para>
<para>
Default value is <emphasis>0</emphasis>.
</para>
<example>
<title>Set <varname>data_mode</varname>
parameter</title>
<programlisting format="linespecific">
...
modparam("siptrace", "data_mode", 1)
...
</programlisting>
</example>
</section>
@ -949,4 +969,3 @@ onsend_route {
</section>
</chapter>

@ -133,6 +133,9 @@ int siptrace_net_data_sent(sr_event_param_t *evp);
static int _siptrace_init_mode = 0;
static int _siptrace_mode = 0;
#define SIPTRACE_DATA_MODE_ADVADDR 1 /* use advertised address */
static int _siptrace_data_mode = 0;
static str db_url = str_init(DEFAULT_DB_URL);
static str siptrace_table = str_init("sip_trace");
@ -272,6 +275,7 @@ static param_export_t params[] = {
{"trace_db_mode", INT_PARAM, &trace_db_mode},
{"trace_init_mode", PARAM_INT, &_siptrace_init_mode},
{"trace_mode", PARAM_INT, &_siptrace_mode},
{"data_mode", PARAM_INT, &_siptrace_data_mode},
{"evcb_msg", PARAM_STR, &_siptrace_evcb_msg},
{"trace_dialog_ack", PARAM_INT, &trace_dialog_ack},
{"trace_dialog_spiral", PARAM_INT, &trace_dialog_spiral},
@ -2308,15 +2312,27 @@ int siptrace_net_data_recv(sr_event_param_t *evp)
sto.fromip.s = sto.fromip_buff;
}
sto.toip.len = snprintf(sto.toip_buff, SIPTRACE_ADDR_MAX, "%s:%s:%d",
siptrace_proto_name(nd->rcv->proto), ip_addr2strz(&nd->rcv->dst_ip),
(int)nd->rcv->dst_port);
if(sto.toip.len < 0 || sto.toip.len >= SIPTRACE_ADDR_MAX) {
LM_ERR("failed to format toip buffer (%d)\n", sto.toip.len);
sto.toip.s = SIPTRACE_ANYADDR;
sto.toip.len = SIPTRACE_ANYADDR_LEN;
} else {
if((_siptrace_data_mode & SIPTRACE_DATA_MODE_ADVADDR)
&& nd->rcv->bind_address != NULL
&& nd->rcv->bind_address->useinfo.sock_str.len > 0
&& (nd->rcv->bind_address->useinfo.sock_str.len
< SIPTRACE_ADDR_MAX - 1)) {
sto.toip.len = nd->rcv->bind_address->useinfo.sock_str.len;
memcpy(sto.toip_buff, nd->rcv->bind_address->useinfo.sock_str.s,
sto.toip.len);
sto.toip_buff[sto.toip.len] = '\0';
sto.toip.s = sto.toip_buff;
} else {
sto.toip.len = snprintf(sto.toip_buff, SIPTRACE_ADDR_MAX, "%s:%s:%d",
siptrace_proto_name(nd->rcv->proto),
ip_addr2strz(&nd->rcv->dst_ip), (int)nd->rcv->dst_port);
if(sto.toip.len < 0 || sto.toip.len >= SIPTRACE_ADDR_MAX) {
LM_ERR("failed to format toip buffer (%d)\n", sto.toip.len);
sto.toip.s = SIPTRACE_ANYADDR;
sto.toip.len = SIPTRACE_ANYADDR_LEN;
} else {
sto.toip.s = sto.toip_buff;
}
}
sto.dir = "in";
@ -2408,6 +2424,7 @@ int siptrace_net_data_sent(sr_event_param_t *evp)
int proto;
int evcb_ret;
int ret = 0;
str vsock;
if(evp->data == 0)
return -1;
@ -2437,14 +2454,19 @@ int siptrace_net_data_sent(sr_event_param_t *evp)
sto.fromip.len = SIPTRACE_ANYADDR_LEN;
proto = PROTO_UDP;
} else {
if(new_dst.send_sock->sock_str.len >= SIPTRACE_ADDR_MAX - 1) {
LM_ERR("socket string is too large: %d\n",
new_dst.send_sock->sock_str.len);
if((_siptrace_data_mode & SIPTRACE_DATA_MODE_ADVADDR)
&& new_dst.send_sock->useinfo.sock_str.len > 0) {
vsock = new_dst.send_sock->useinfo.sock_str;
} else {
vsock = new_dst.send_sock->sock_str;
}
if(vsock.len >= SIPTRACE_ADDR_MAX - 1) {
LM_ERR("socket string is too large: %d\n", vsock.len);
return -1;
}
strncpy(sto.fromip_buff, new_dst.send_sock->sock_str.s,
new_dst.send_sock->sock_str.len);
sto.fromip.len = new_dst.send_sock->sock_str.len;
memcpy(sto.fromip_buff, vsock.s, vsock.len);
sto.fromip.len = vsock.len;
sto.fromip_buff[sto.fromip.len] = '\0';
proto = new_dst.send_sock->proto;
}
sto.fromip.s = sto.fromip_buff;

@ -36,6 +36,8 @@ Bogdan-Andrei Iancu
Gabriel Vasile
Eik Rentzow
Copyright © 2008, 2005, 2003 1&1 Internet AG, FhG Fokus, Voice Sistem
SRL
__________________________________________________________________
@ -113,6 +115,7 @@ Gabriel Vasile
5.3. $pcv(genaddr)
5.4. $pcv(orig)
5.5. $pcv(term)
5.6. $pcv(status)
List of Examples
@ -240,6 +243,7 @@ Chapter 1. Admin Guide
5.3. $pcv(genaddr)
5.4. $pcv(orig)
5.5. $pcv(term)
5.6. $pcv(status)
1. Overview
@ -1051,7 +1055,19 @@ if(is_first_hop("1")) { ... }
4.35. sip_p_charging_vector(flags)
Manage the P-Charging-Vector header (RFC7315). The flags can be: 'r' -
remove; 'g' - generate; 'f' - force (remove + generate).
remove; 'g' - generate; 'f' - force (remove + generate). Once a new PCV
has been generated by 'g' or 'f' the PCV cannot be changed again. The
icid-generated-at parameter of a generated PCV will be set to the
sending interface.IP address.
Return Codes:
* 1 - Nothing was done.
* (2 - intentionally left out)
* 3 - P-Charging-Vector header has been newly generated.
* 4 - P-Charging-Vector header has been deleted.
* 5 - P-Charging-Vector header has been replaced or inserted after
deletion.
* negative - Any error occured during execution.
This function can be used from ANY_ROUTE.
@ -1176,6 +1192,7 @@ if (!hdr_date_check("10")) {
5.3. $pcv(genaddr)
5.4. $pcv(orig)
5.5. $pcv(term)
5.6. $pcv(status)
5.1. $pcv(all)
@ -1196,3 +1213,16 @@ if (!hdr_date_check("10")) {
5.5. $pcv(term)
term-ioi field (see RFC7315 section 5.6)
5.6. $pcv(status)
Returns whether the PCV header was successfully parsed, deleted, newly
generated or other.
* 0 - No P-Charging-Vector header in message.
* 1 - P-Charging-Vector header in message and parsed successfully.
* 2 - P-Charging-Vector is present, but has no valid icid-value
parameter.
* 3 - P-Charging-Vector header has been newly generated or replaced.
* 4 - P-Charging-Vector header has been deleted.
Negative values indicate an internal error during the parsing process.

@ -31,29 +31,48 @@
#define SIZE_CONF_ID 16
#define P_CHARGING_VECTOR "P-Charging-Vector"
#define P_CHARGING_VECTOR_HEADERNAME_LEN (sizeof(P_CHARGING_VECTOR) - 1)
#define P_CHARGING_VECTOR_PREFIX_LEN (P_CHARGING_VECTOR_HEADERNAME_LEN + 2)
#define LOOPBACK_IP 16777343
#define PCV_BUF_SIZE 256
static char _siputils_pcv_buf[PCV_BUF_SIZE];
static str _siputils_pcv = {_siputils_pcv_buf, 0};
static str _siputils_pcv_id = {NULL, 0};
static str _siputils_pcv_host = {NULL, 0};
static str _siputils_pcv_orig = {NULL, 0};
static str _siputils_pcv_term = {NULL, 0};
static str _siputils_pcv_id = STR_NULL;
static str _siputils_pcv_genaddr = STR_NULL;
static str _siputils_pcv_orig = STR_NULL;
static str _siputils_pcv_term = STR_NULL;
static uint64_t _siputils_pcv_counter = 0;
static struct hdr_field *_siputils_pcv_hf_pcv = NULL;
enum PCV_Status
{
PCV_NONE = 0,
PCV_PARSED = 1,
PCV_GENERATED = 2
PCV_ICID_MISSING = 2,
PCV_GENERATED = 3,
PCV_DELETED = 4,
PCV_REPLACED = 5,
PCV_NOP = PCV_PARSED
};
static const char *sstatus[] = {
"NONE", "PARSED", "ICID_MISSING", "GENERATED", "DELETED", "REPLACED"};
enum PCV_Parameter
{
PCV_PARAM_ALL = 1,
PCV_PARAM_GENADDR = 2,
PCV_PARAM_ID = 3,
PCV_PARAM_ORIG = 4,
PCV_PARAM_TERM = 5,
PCV_PARAM_STATUS = 6
};
static enum PCV_Status _siputils_pcv_status = PCV_NONE;
static unsigned int _siputils_pcv_current_msg_id = (unsigned int)-1;
static void sip_generate_charging_vector(char *pcv)
static void sip_generate_charging_vector(char *pcv, const unsigned int maxsize)
{
char s[PATH_MAX] = {0};
struct hostent *host = NULL;
@ -66,8 +85,15 @@ static void sip_generate_charging_vector(char *pcv)
struct in_addr *in = NULL;
static struct in_addr ip = {0};
unsigned char newConferenceIdentifier[SIZE_CONF_ID] = {0};
int len = SIZE_CONF_ID;
/* if supplied buffer cannot carry 16 (SIZE_CONF_ID) hex characters and a null
terminator (=33 bytes), then reduce length of generated icid-value */
if(maxsize < (len * 2 + 1)) {
LM_WARN("generator buffer too small for new pcv icid-value!\n");
len = (maxsize - 1) / 2;
}
memset(pcv, 0, SIZE_CONF_ID);
pid = getpid();
if(ip.s_addr == 0) {
@ -117,19 +143,18 @@ static void sip_generate_charging_vector(char *pcv)
idx++;
}
LM_DBG("PCV generate\n");
int i = 0;
pcv[0] = '\0';
for(i = 0; i < SIZE_CONF_ID; i++) {
char hex[4] = {0};
char *ptr = pcv;
const char *endptr = ptr + maxsize - 1;
snprintf(hex, 4, "%02X", newConferenceIdentifier[i]);
strcat(pcv, hex);
for(int i = 0; i < len && ptr < endptr; i++) {
ptr += (snprintf(ptr, 3, "%02X", newConferenceIdentifier[i]) - 1);
}
}
static unsigned int sip_param_end(const char *s, unsigned int len)
static unsigned int sip_param_end(const char *s, const char *end)
{
unsigned int i;
unsigned int len = end - s;
for(i = 0; i < len; i++) {
if(s[i] == '\0' || s[i] == ' ' || s[i] == ';' || s[i] == ','
@ -140,61 +165,78 @@ static unsigned int sip_param_end(const char *s, unsigned int len)
return len;
}
static inline void sip_initialize_parse_buffers()
{
_siputils_pcv_id = (str)STR_NULL;
_siputils_pcv_genaddr = (str)STR_NULL;
_siputils_pcv_orig = (str)STR_NULL;
_siputils_pcv_term = (str)STR_NULL;
}
static inline void sip_initialize_pcv_buffers()
{
memset(_siputils_pcv.s, 0, sizeof(_siputils_pcv_buf));
_siputils_pcv.len = 0;
sip_initialize_parse_buffers();
}
static int sip_parse_charging_vector(const char *pcv_value, unsigned int len)
{
/* now point to each PCV component */
LM_DBG("parsing PCV header [%s]\n", pcv_value);
LM_DBG("parsing PCV header [%.*s]\n", len, pcv_value);
char *s = NULL;
const char *pcv_value_end = pcv_value + len;
s = strstr(pcv_value, "icid-value=");
if(s != NULL) {
_siputils_pcv_id.s = s + strlen("icid-value=");
_siputils_pcv_id.len = sip_param_end(_siputils_pcv_id.s, len);
_siputils_pcv_id.len = sip_param_end(_siputils_pcv_id.s, pcv_value_end);
LM_DBG("parsed P-Charging-Vector icid-value=%.*s\n",
_siputils_pcv_id.len, _siputils_pcv_id.s);
STR_FMT(&_siputils_pcv_id));
} else {
LM_WARN("mandatory icid-value not found\n");
_siputils_pcv_id.s = NULL;
_siputils_pcv_id.len = 0;
_siputils_pcv_id = (str)STR_NULL;
}
s = strstr(pcv_value, "icid-generated-at=");
if(s != NULL) {
_siputils_pcv_host.s = s + strlen("icid-generated-at=");
_siputils_pcv_host.len = sip_param_end(_siputils_pcv_host.s, len);
_siputils_pcv_genaddr.s = s + strlen("icid-generated-at=");
_siputils_pcv_genaddr.len =
sip_param_end(_siputils_pcv_genaddr.s, pcv_value_end);
LM_DBG("parsed P-Charging-Vector icid-generated-at=%.*s\n",
_siputils_pcv_host.len, _siputils_pcv_host.s);
STR_FMT(&_siputils_pcv_genaddr));
} else {
LM_DBG("icid-generated-at not found\n");
_siputils_pcv_host.s = NULL;
_siputils_pcv_host.len = 0;
_siputils_pcv_genaddr = (str)STR_NULL;
}
s = strstr(pcv_value, "orig-ioi=");
if(s != NULL) {
_siputils_pcv_orig.s = s + strlen("orig-ioi=");
_siputils_pcv_orig.len = sip_param_end(_siputils_pcv_orig.s, len);
_siputils_pcv_orig.len =
sip_param_end(_siputils_pcv_orig.s, pcv_value_end);
LM_INFO("parsed P-Charging-Vector orig-ioi=%.*s\n",
_siputils_pcv_orig.len, _siputils_pcv_orig.s);
STR_FMT(&_siputils_pcv_orig));
} else {
_siputils_pcv_orig.s = NULL;
_siputils_pcv_orig.len = 0;
_siputils_pcv_orig = (str)STR_NULL;
}
s = strstr(pcv_value, "term-ioi=");
if(s != NULL) {
_siputils_pcv_term.s = s + strlen("term-ioi=");
_siputils_pcv_term.len = sip_param_end(_siputils_pcv_term.s, len);
_siputils_pcv_term.len =
sip_param_end(_siputils_pcv_term.s, pcv_value_end);
LM_INFO("parsed P-Charging-Vector term-ioi=%.*s\n",
_siputils_pcv_term.len, _siputils_pcv_term.s);
STR_FMT(&_siputils_pcv_term));
} else {
_siputils_pcv_term.s = NULL;
_siputils_pcv_term.len = 0;
_siputils_pcv_term = (str)STR_NULL;
}
// only icid-value is mandatory, log anyway when missing icid-generated-at
if(_siputils_pcv_host.s == NULL && _siputils_pcv_id.s != NULL && len > 0) {
if(_siputils_pcv_genaddr.s == NULL && _siputils_pcv_id.s != NULL
&& len > 0) {
LM_WARN("icid-generated-at is missing %.*s\n", len, pcv_value);
}
@ -205,8 +247,9 @@ static int sip_get_charging_vector(
struct sip_msg *msg, struct hdr_field **hf_pcv)
{
struct hdr_field *hf;
char *hdrname_cstr = P_CHARGING_VECTOR;
str hdrname = {hdrname_cstr, strlen(hdrname_cstr)};
int hf_body_len;
str hdrname = STR_STATIC_INIT(P_CHARGING_VECTOR);
/* we need to be sure we have parsed all headers */
if(parse_headers(msg, HDR_EOH_F, 0) < 0) {
@ -214,52 +257,55 @@ static int sip_get_charging_vector(
return -1;
}
sip_initialize_pcv_buffers();
for(hf = msg->headers; hf; hf = hf->next) {
if(hf->name.s[0] != 'P') {
continue;
}
if(cmp_hdrname_str(&hf->name, &hdrname) == 0) {
/*
* append p charging vector values after the header name "P-Charging-Vector" and
* the ": " (+2)
*/
char *pcv_body = _siputils_pcv_buf + strlen(P_CHARGING_VECTOR) + 2;
char *pcv_body = _siputils_pcv_buf;
*hf_pcv = hf;
if(hf->body.len > 0) {
memcpy(pcv_body, hf->body.s, hf->body.len);
_siputils_pcv.len =
hf->body.len + strlen(P_CHARGING_VECTOR) + 2;
pcv_body[hf->body.len] = '\0';
if(sip_parse_charging_vector(pcv_body, hf->body.len) == 0) {
if(hf->body.len > sizeof(_siputils_pcv_buf)) {
LM_WARN("received charging vector header is longer than "
"reserved buffer - truncating.");
hf_body_len = sizeof(_siputils_pcv_buf);
} else
hf_body_len = hf->body.len;
memcpy(pcv_body, hf->body.s, hf_body_len);
_siputils_pcv.len = hf_body_len;
if(sip_parse_charging_vector(pcv_body, hf_body_len) == 0) {
LM_ERR("P-Charging-Vector header found but failed to parse "
"value [%s].\n",
pcv_body);
_siputils_pcv_status = PCV_NONE;
_siputils_pcv.s = NULL;
_siputils_pcv.len = 0;
_siputils_pcv_status = PCV_ICID_MISSING;
sip_initialize_parse_buffers();
} else {
_siputils_pcv_status = PCV_PARSED;
_siputils_pcv.s = hf->body.s;
_siputils_pcv.len = hf->body.len;
}
return 2;
} else {
_siputils_pcv_id.s = 0;
_siputils_pcv_id.len = 0;
_siputils_pcv_host.s = 0;
_siputils_pcv_host.len = 0;
LM_WARN("P-Charging-Vector header found but no value.\n");
LM_WARN("P-Charging-Vector header found but has no body.\n");
_siputils_pcv_status = PCV_ICID_MISSING;
return 1;
}
*hf_pcv = hf;
}
}
LM_DBG("No valid P-Charging-Vector header found.\n");
_siputils_pcv_status = PCV_NONE;
*hf_pcv = NULL;
return 1;
}
// Remove PCV if it is in the inbound request (if it was found by sip_get_charging_vector)
static int sip_remove_charging_vector(struct sip_msg *msg, struct hdr_field *hf)
static int sip_remove_charging_vector(
struct sip_msg *msg, struct hdr_field *hf, struct lump **anchor)
{
struct lump *l;
@ -269,36 +315,58 @@ static int sip_remove_charging_vector(struct sip_msg *msg, struct hdr_field *hf)
LM_ERR("no memory\n");
return -1;
}
if(anchor != NULL) {
*anchor = l;
}
return 2;
} else {
return 1;
}
}
static int sip_add_charging_vector(struct sip_msg *msg)
static int sip_add_charging_vector(
struct sip_msg *msg, const str *pcv_hf, struct lump *anchor)
{
struct lump *anchor;
char *s;
str buf = STR_NULL;
anchor = anchor_lump(msg, msg->unparsed - msg->buf, 0, 0);
if(anchor == 0) {
LM_ERR("can't get anchor\n");
return -1;
if(anchor == NULL) {
LM_DBG("add pcv with new lump\n");
anchor = anchor_lump(msg, msg->unparsed - msg->buf, 0, 0);
if(anchor == 0) {
LM_ERR("can't get anchor\n");
return -1;
}
}
s = (char *)pkg_malloc(_siputils_pcv.len);
if(!s) {
PKG_MEM_ERROR;
return -1;
}
memcpy(s, _siputils_pcv.s, _siputils_pcv.len);
buf.s = (char *)pkg_malloc(pcv_hf->len);
if(!buf.s)
goto out3;
memcpy(buf.s, pcv_hf->s, pcv_hf->len);
if((anchor = insert_new_lump_before(anchor, buf.s, pcv_hf->len, 0)) == 0)
goto out1;
if((anchor = insert_subst_lump_before(anchor, SUBST_SND_IP, 0)) == 0)
goto out2;
buf.s = (char *)pkg_malloc(CRLF_LEN + 1);
if(!buf.s)
goto out3;
buf.len = sprintf(buf.s, CRLF);
if((anchor = insert_new_lump_before(anchor, buf.s, buf.len, 0)) == 0)
goto out1;
if(insert_new_lump_before(anchor, s, _siputils_pcv.len, 0) == 0) {
LM_ERR("can't insert lump\n");
pkg_free(s);
return -1;
}
return 1;
out1:
pkg_free(buf.s);
out2:
LM_ERR("can't insert lump\n");
return -1;
out3:
PKG_MEM_ERROR;
return -1;
}
int sip_handle_pcv(struct sip_msg *msg, char *flags, char *str2)
@ -307,13 +375,12 @@ int sip_handle_pcv(struct sip_msg *msg, char *flags, char *str2)
int remove_pcv = 0;
int replace_pcv = 0;
int i;
str flag_str;
struct hdr_field *hf_pcv = NULL;
int action = PCV_NOP;
_siputils_pcv.len = 0;
_siputils_pcv_status = PCV_NONE;
str flag_str;
struct lump *deleted_pcv_lump = NULL;
if(fixup_get_svalue(msg, (gparam_p)flags, &flag_str) < 0) {
if(get_str_fparam(&flag_str, msg, (gparam_p)flags) < 0) {
LM_ERR("failed to retrieve parameter value\n");
return -1;
}
@ -342,16 +409,40 @@ int sip_handle_pcv(struct sip_msg *msg, char *flags, char *str2)
}
}
sip_get_charging_vector(msg, &hf_pcv);
if(_siputils_pcv_current_msg_id != msg->id
|| _siputils_pcv_status == PCV_NONE) {
if(sip_get_charging_vector(msg, &_siputils_pcv_hf_pcv) > 0) {
_siputils_pcv_current_msg_id = msg->id;
}
}
switch(_siputils_pcv_status) {
case PCV_GENERATED:
LM_WARN("P-Charging-Vector can't be changed after generation. "
"Skipping command '%.*s'!",
STR_FMT(&flag_str));
return PCV_NOP;
case PCV_DELETED:
/* be consistent with the return value in this case */
if(remove_pcv)
return PCV_NOP;
default:
break;
}
/*
* We need to remove the original PCV if it was present and either
* we were asked to remove it or we were asked to replace it
* or when it was broken anyway
*/
if(_siputils_pcv_status == PCV_PARSED && (replace_pcv || remove_pcv)) {
i = sip_remove_charging_vector(msg, hf_pcv);
if((_siputils_pcv_status == PCV_PARSED && (replace_pcv || remove_pcv))
|| _siputils_pcv_status == PCV_ICID_MISSING) {
i = sip_remove_charging_vector(
msg, _siputils_pcv_hf_pcv, &deleted_pcv_lump);
if(i <= 0)
return (i == 0) ? -1 : i;
sip_initialize_pcv_buffers();
_siputils_pcv_status = PCV_DELETED;
action = PCV_DELETED;
}
/* Generate PCV if
@ -361,103 +452,98 @@ int sip_handle_pcv(struct sip_msg *msg, char *flags, char *str2)
if(replace_pcv
|| (generate_pcv && _siputils_pcv_status != PCV_GENERATED
&& _siputils_pcv_status != PCV_PARSED)) {
strcpy(_siputils_pcv_buf, P_CHARGING_VECTOR);
strcat(_siputils_pcv_buf, ": ");
char *pcv_body = _siputils_pcv_buf + 19;
char pcv_value[40];
/* We use the IP address of the interface that received the message as generated-at */
if(msg->rcv.bind_address == NULL
|| msg->rcv.bind_address->address_str.s == NULL) {
LM_ERR("No IP address for message. Failed to generate charging "
"vector.\n");
return -2;
}
char generated_pcv_buf[PCV_BUF_SIZE] = {0};
str generated_pcv = {generated_pcv_buf, 0};
strcpy(generated_pcv_buf, P_CHARGING_VECTOR);
strcat(generated_pcv_buf, ": ");
sip_generate_charging_vector(pcv_value);
char *pcv_body = generated_pcv_buf + P_CHARGING_VECTOR_PREFIX_LEN;
int body_len = 0;
char pcv_value[40] = {0};
_siputils_pcv.len = snprintf(pcv_body, PCV_BUF_SIZE - 19,
"icid-value=%.*s; icid-generated-at=%.*s\r\n", 32, pcv_value,
msg->rcv.bind_address->address_str.len,
msg->rcv.bind_address->address_str.s);
_siputils_pcv.len += 19;
sip_generate_charging_vector(pcv_value, sizeof(pcv_value));
_siputils_pcv_status = PCV_GENERATED;
body_len = snprintf(pcv_body,
PCV_BUF_SIZE - P_CHARGING_VECTOR_PREFIX_LEN,
"icid-value=%.*s;icid-generated-at=", (int)sizeof(pcv_value),
pcv_value);
generated_pcv.len = body_len + P_CHARGING_VECTOR_PREFIX_LEN;
/* if generated, reparse it */
sip_parse_charging_vector(pcv_body, _siputils_pcv.len - 19);
/* if it was generated, we need to send it out as a header */
LM_INFO("Generated PCV header %.*s\n", _siputils_pcv.len - 2,
_siputils_pcv_buf);
i = sip_add_charging_vector(msg);
LM_INFO("Generated new PCV header %.*s\n", PCV_BUF_SIZE,
generated_pcv_buf);
i = sip_add_charging_vector(msg, &generated_pcv, deleted_pcv_lump);
if(i <= 0) {
LM_ERR("Failed to add P-Charging-Vector header\n");
return (i == 0) ? -1 : i;
}
/* if generated and added, copy buffer and reparse it */
sip_initialize_pcv_buffers();
_siputils_pcv.len = body_len - CRLF_LEN;
memcpy(_siputils_pcv.s, pcv_body, _siputils_pcv.len);
if(sip_parse_charging_vector(
_siputils_pcv_buf, sizeof(_siputils_pcv_buf))) {
action = (_siputils_pcv_status == PCV_DELETED) ? PCV_REPLACED
: PCV_GENERATED;
_siputils_pcv_status = PCV_GENERATED;
}
}
_siputils_pcv_current_msg_id = msg->id;
return 1;
LM_DBG("Charging vector status is now %s\n", sstatus[_siputils_pcv_status]);
return action;
}
int pv_get_charging_vector(
struct sip_msg *msg, pv_param_t *param, pv_value_t *res)
{
str pcv_pv;
str pcv_pv = STR_NULL;
if(_siputils_pcv_current_msg_id != msg->id
|| _siputils_pcv_status == PCV_NONE) {
struct hdr_field *hf_pcv = NULL;
if(sip_get_charging_vector(msg, &hf_pcv) > 0) {
if(sip_get_charging_vector(msg, &_siputils_pcv_hf_pcv) > 0) {
_siputils_pcv_current_msg_id = msg->id;
}
LM_DBG("Parsed charging vector for pseudo-var\n");
LM_DBG("Parsed charging vector for pseudo-var, current state is %s\n",
sstatus[_siputils_pcv_status]);
} else {
LM_DBG("Charging vector is in state %d for pseudo-var\n",
_siputils_pcv_status);
LM_DBG("Charging vector is in state %s for pseudo-var and buffered.",
sstatus[_siputils_pcv_status]);
}
switch(_siputils_pcv_status) {
case PCV_GENERATED:
LM_DBG("pcv_status==PCV_GENERATED\n");
case PCV_PARSED:
LM_DBG("pcv_status==PCV_PARSED\n");
switch(param->pvn.u.isname.name.n) {
case 5:
pcv_pv = _siputils_pcv_term;
break;
case 4:
pcv_pv = _siputils_pcv_orig;
break;
case 2:
pcv_pv = _siputils_pcv_host;
break;
case 3:
pcv_pv = _siputils_pcv_id;
break;
case 1:
default:
pcv_pv = _siputils_pcv;
break;
}
if(pcv_pv.len > 0)
return pv_get_strval(msg, param, res, &pcv_pv);
else
LM_WARN("No value for pseudo-var $pcv but status was %d.\n",
_siputils_pcv_status);
switch(param->pvn.u.isname.name.n) {
case PCV_PARAM_TERM:
pcv_pv = _siputils_pcv_term;
break;
case PCV_NONE:
case PCV_PARAM_ORIG:
pcv_pv = _siputils_pcv_orig;
break;
case PCV_PARAM_GENADDR:
pcv_pv = _siputils_pcv_genaddr;
break;
case PCV_PARAM_ID:
pcv_pv = _siputils_pcv_id;
break;
case PCV_PARAM_STATUS:
return pv_get_sintval(msg, param, res, _siputils_pcv_status);
break;
case PCV_PARAM_ALL:
default:
pcv_pv = _siputils_pcv;
break;
}
if(pcv_pv.len > 0)
return pv_get_strval(msg, param, res, &pcv_pv);
else if(param->pvn.u.isname.name.n == PCV_PARAM_ID
|| param->pvn.u.isname.name.n <= PCV_PARAM_ALL)
LM_WARN("No value for pseudo-var $pcv but status was %s.\n",
sstatus[_siputils_pcv_status]);
return pv_get_null(msg, param, res);
}
@ -469,27 +555,33 @@ int pv_parse_charging_vector_name(pv_spec_p sp, str *in)
switch(in->len) {
case 3:
if(strncmp(in->s, "all", 3) == 0)
sp->pvp.pvn.u.isname.name.n = 1;
sp->pvp.pvn.u.isname.name.n = PCV_PARAM_ALL;
else
goto error;
break;
case 4:
if(strncmp(in->s, "orig", 4) == 0)
sp->pvp.pvn.u.isname.name.n = 4;
sp->pvp.pvn.u.isname.name.n = PCV_PARAM_ORIG;
else if(strncmp(in->s, "term", 4) == 0)
sp->pvp.pvn.u.isname.name.n = 5;
sp->pvp.pvn.u.isname.name.n = PCV_PARAM_TERM;
else
goto error;
break;
case 5:
if(strncmp(in->s, "value", 5) == 0)
sp->pvp.pvn.u.isname.name.n = 3;
sp->pvp.pvn.u.isname.name.n = PCV_PARAM_ID;
else
goto error;
break;
case 6:
if(strncmp(in->s, "status", 6) == 0)
sp->pvp.pvn.u.isname.name.n = PCV_PARAM_STATUS;
else
goto error;
break;
case 7:
if(strncmp(in->s, "genaddr", 7) == 0)
sp->pvp.pvn.u.isname.name.n = 2;
sp->pvp.pvn.u.isname.name.n = PCV_PARAM_GENADDR;
else
goto error;
break;

@ -95,6 +95,14 @@
</address>
</editor>
<editor>
<firstname>Eik</firstname>
<surname>Rentzow</surname>
<address>
<email>rentzow@gmx.de</email>
</address>
</editor>
</authorgroup>
<copyright>
<year>2008</year>

@ -1237,7 +1237,33 @@ if(is_first_hop("1")) { ... }
<para>
Manage the P-Charging-Vector header (RFC7315). The flags can be:
'r' - remove; 'g' - generate; 'f' - force (remove + generate).
Once a new PCV has been generated by 'g' or 'f' the PCV cannot be changed again.
The icid-generated-at parameter of a generated PCV will be set to
the sending interface.IP address.
</para>
<para>
Return Codes:
</para>
<itemizedlist>
<listitem><para>
<emphasis>1</emphasis> - Nothing was done.
</para></listitem>
<listitem><para>
<emphasis>(2</emphasis> - <emphasis>intentionally left out)</emphasis>
</para></listitem>
<listitem><para>
<emphasis>3</emphasis> - P-Charging-Vector header has been newly generated.
</para></listitem>
<listitem><para>
<emphasis>4</emphasis> - P-Charging-Vector header has been deleted.
</para></listitem>
<listitem><para>
<emphasis>5</emphasis> - P-Charging-Vector header has been replaced or inserted after deletion.
</para></listitem>
<listitem><para>
<emphasis>negative</emphasis> - Any error occured during execution.
</para></listitem>
</itemizedlist>
<para>
This function can be used from ANY_ROUTE.
</para>
@ -1469,6 +1495,32 @@ if (!hdr_date_check("10")) {
term-ioi field (see RFC7315 section 5.6)
</para>
</section>
<section id="siputils.v.pcv_status">
<title><varname>$pcv(status)</varname></title>
<para>
Returns whether the PCV header was successfully parsed, deleted,
newly generated or other.
<itemizedlist>
<listitem><para>
<emphasis>0</emphasis> - No P-Charging-Vector header in message.
</para></listitem>
<listitem><para>
<emphasis>1</emphasis> - P-Charging-Vector header in message and parsed successfully.
</para></listitem>
<listitem><para>
<emphasis>2</emphasis> - P-Charging-Vector is present, but has no valid
<emphasis>icid-value</emphasis> parameter.
</para></listitem>
<listitem><para>
<emphasis>3</emphasis> - P-Charging-Vector header has been newly generated or replaced.
</para></listitem>
<listitem><para>
<emphasis>4</emphasis> - P-Charging-Vector header has been deleted.
</para></listitem>
</itemizedlist>
Negative values indicate an internal error during the parsing process.
</para>
</section>
</section>
</chapter>

@ -101,12 +101,7 @@ static int pdu2ascii(char *pdu, char *ascii)
bitposition++;
c = (c >> 1) & 127; /* The shift fills with 1, but I want 0 */
}
if(/*cs_convert*/ 1)
ascii[charcounter] = sms2ascii(c);
else if(c == 0)
ascii[charcounter] = 183;
else
ascii[charcounter] = c;
ascii[charcounter] = sms2ascii(c);
}
ascii[count] = 0;
return count;

@ -282,10 +282,11 @@ Chapter 1. Admin Guide
* usrloc - all scalars and tables relating to users and contacts are
dependent on the usrloc module. If the module is not loaded, the
respective tables will be empty.
* dialog or dialog-ng - all scalars relating to the number of dialogs
are dependent on the presence of a dialog module. Furthermore, if
the module is not loaded, then the kamailioDialogLimitMinorEvent,
and kamailioDialogLimitMajorEvent alarm will be disabled.
* dialog or ims_dialog - all scalars relating to the number of
dialogs are dependent on the presence of a dialog module.
Furthermore, if the module is not loaded, then the
kamailioDialogLimitMinorEvent, and kamailioDialogLimitMajorEvent
alarm will be disabled.
The contents of the kamailioSIPMethodSupportedTable change depending on
which modules are loaded.

@ -215,7 +215,7 @@
<listitem>
<para>
<emphasis>dialog or dialog-ng</emphasis> - all scalars relating to the number of dialogs are
<emphasis>dialog or ims_dialog</emphasis> - all scalars relating to the number of dialogs are
dependent on the presence of a dialog module. Furthermore, if the module is
not loaded, then the kamailioDialogLimitMinorEvent, and kamailioDialogLimitMajorEvent
alarm will be disabled.

@ -170,7 +170,7 @@ Chapter 1. Admin Guide
3.1. Kamailio Modules
The following modules must be loaded before this module:
* dialog or dialog-ng - dialog module and its dependencies. (tm)
* dialog or ims_dialog - dialog module and its dependencies. (tm)
* sl - stateless module.
3.2. External Libraries or Applications

@ -123,7 +123,7 @@
<itemizedlist>
<listitem>
<para>
<emphasis>dialog</emphasis> or <emphasis>dialog-ng</emphasis>
<emphasis>dialog</emphasis> or <emphasis>ims_dialog</emphasis>
- dialog module and its dependencies. (tm)
</para>
</listitem>

@ -183,14 +183,14 @@ if (@timer.executed != "") {
Example 1.5. Common example using timer module
...
loadmodule "modules/xprint/xprint.so"
loadmodule "modules/timer/timer.so"
loadmodule "xlog.so"
loadmodule "timer.so"
modparam("timer", "declare_timer", "tmr1=ONTIMER,1000");
modparam("timer", "declare_timer", "tmr2=ONTIMER2,2000,slow,enable");
route["print"] {
xplog("L_INFO", "fired: %@timer.executed\n");
xlog("fired: $sel(@timer.executed)\n");
}
route["ONTIMER"] {
@ -227,20 +227,20 @@ end
route section which is called once after Kamailio starts.
...
loadmodule "timer";
loadmodule "xprint";
loadmodule "xlog";
modparam("timer", "declare_timer", "TIMER_TEST=TEST,100,,enable");
request_route {
xplog("L_E","main route");
xlog("main route");
}
route[TEST] {
timer_enable("TIMER_TEST", "0");
xplog("L_E","test start\n");
xlog("test start\n");
# add here tested functionality
xplog("L_E","test end\n");
}
xlog("test end\n");
}
...

@ -224,14 +224,14 @@ if (@timer.executed != "") {
<title>Common example using timer module</title>
<programlisting>
...
loadmodule "modules/xprint/xprint.so"
loadmodule "modules/timer/timer.so"
loadmodule "xlog.so"
loadmodule "timer.so"
modparam("timer", "declare_timer", "tmr1=ONTIMER,1000");
modparam("timer", "declare_timer", "tmr2=ONTIMER2,2000,slow,enable");
route["print"] {
xplog("L_INFO", "fired: %@timer.executed\n");
xlog("fired: $sel(@timer.executed)\n");
}
route["ONTIMER"] {
@ -276,22 +276,22 @@ end
<programlisting>
...
loadmodule "timer";
loadmodule "xprint";
loadmodule "xlog";
modparam("timer", "declare_timer", "TIMER_TEST=TEST,100,,enable");
request_route {
xplog("L_E","main route");
xlog("main route");
}
route[TEST] {
timer_enable("TIMER_TEST", "0");
xplog("L_E","test start\n");
xlog("test start\n");
# add here tested functionality
xplog("L_E","test end\n");
}
xlog("test end\n");
}
...
</programlisting>
@ -299,4 +299,3 @@ route[TEST] {
</section>
</chapter>
</book>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save