diff --git a/ChangeLog b/ChangeLog index 913ff5211..981791104 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,2827 @@ +===================== 2025-03-20 Version 5.8.6 Released ===================== + +===================== Changes Since Version 5.8.5 =========================== + + +commit b51884ad027033ee00fbc64ff3aca9499c1f6c75 +Author: Daniel-Constantin Mierla +Date: Thu Mar 20 08:26:32 2025 +0100 + + Makefile.defs: version set to 5.8.6 + +commit a66faa10092aac8c4ec2122ceb77e285a2fecbce +Author: Daniel-Constantin Mierla +Date: Thu Mar 20 08:21:34 2025 +0100 + + pkg/kamailio: version set 5.8.6 for rpms and alpine + +commit d6d1641b81e130fa14b8daf617d595fe2818f084 +Author: Daniel-Constantin Mierla +Date: Thu Mar 20 08:19:59 2025 +0100 + + pkg/kamailio/deb: set version to 5.8.6 + +commit e83be98778dde043df7251155ac63c5d651ed45b +Author: João Capucho +Date: Thu Mar 6 02:50:12 2025 +0000 + + pua_reginfo: handle_notify - fix AoR key parsing + + - The AoR key generated by handle_notify no longer includes the domain + of the AoR when usrloc use_domain isn't enabled + + (cherry picked from commit b7e16294ae1bbfe8cc469facf59fc9e3960ff2a4) + (cherry picked from commit 00544a66aad09faf345d54bef7f464f2749ef548) + +commit 89b1f907da5428de79670df28d0fd7135a8379ff +Author: Daniel-Constantin Mierla +Date: Mon Mar 17 09:15:39 2025 +0100 + + microhttpd: handle all incoming body data + + - GH #4176 + + (cherry picked from commit 96392eda8fac1cb075e7f407c0155085acc92c5f) + (cherry picked from commit f24315c2bc4ec7b9507516a96603e91ae2ce0fd1) + +commit 1d3eed5c186d2b4584459fb5d3fcdd8458a01186 +Author: Daniel-Constantin Mierla +Date: Sun Mar 16 08:50:52 2025 +0100 + + microhttpd: create response with MHD_RESPMEM_MUST_COPY flag + + (cherry picked from commit 1569a7b71af26f5b3cb7cb25de7d2425c75f5587) + (cherry picked from commit f761cad5b462820af060d6e07410f0dd84c1a52f) + +commit c9503124f1e5d066163c505470124b9a1bd4b9e6 +Author: Daniel-Constantin Mierla +Date: Sat Mar 15 20:27:22 2025 +0100 + + microhttpd: debug message for http response queue + + (cherry picked from commit 7a793a257b12f946e54bca3d3d92b6c07602fb20) + (cherry picked from commit 813d3ed6a532cc0baa98d27ef9eea579e5ca1688) + +commit f807c4d249bff27007dc8898a338ad7be4f45ea7 +Author: Daniel-Constantin Mierla +Date: Wed Mar 12 11:20:11 2025 +0100 + + tls: get wss connections as well for selects and vars + + - GH #4167 + + (cherry picked from commit 3a3856c68cf0cc04385921f8bbec72420cf8f656) + (cherry picked from commit b3cb2b38c5d81c48b0b6315cb7feb99d236d15e3) + +commit 2b0b8714b7f75d13be6f8156f4f8efbf6401f0b7 +Author: Daniel-Constantin Mierla +Date: Wed Mar 12 11:07:15 2025 +0100 + + dialog: enforce second bye towards callee for dlg_bye() + + - GH #4169 + + (cherry picked from commit 7de1693573fc08e54db1955095d66c495b2051b9) + (cherry picked from commit 0cbf7eede6dbd3198664160b77d1b4d0337833b8) + +commit 0f0b34aaffffbab3e9454f2cbfa03af849868a55 +Author: Victor Seva +Date: Tue Mar 11 13:22:38 2025 +0100 + + core: fix NAPTR dns cache print + + fix #4173 + + (cherry picked from commit df1eff2a52d0670900ee5bf15f2e7a2cd4d74da0) + (cherry picked from commit 2b3dd3b477afef88421377b703aefe217b9e915b) + +commit 0890a38d534e57527f87802b83c2b9d69cea843c +Author: Daniel-Constantin Mierla +Date: Thu Mar 6 13:36:52 2025 +0100 + + Revert "secfilter: fix secf_check_dst bug" + + This reverts commit 874148e9335fdf22e9187ff3dce524dc0fa21879. + +commit 11af1f47dd40d57a38848fbbd358054ee42043a2 +Author: Daniel-Constantin Mierla +Date: Mon Feb 24 09:57:38 2025 +0100 + + sl: stats for 1xx replies + + - GH #4144 + + (cherry picked from commit f43c132db9b1dc71f623d592fb46d487ba492c7d) + (cherry picked from commit ed21e7c97677572d732fa1020528fe92f3a9ee35) + +commit 83d8ebf769ec1313228e5b89164a13cb9314ab4d +Author: Dennis Yurasov +Date: Fri Feb 21 10:42:58 2025 +0100 + + dialog: fixed DLG_FLAG_CHANGED_PROF value and setting DLG_FLAG_DEL + + - GH #4151 + + (cherry picked from commit 2b1ca7813cf5014553c807c1a5034c404b3685a5) + (cherry picked from commit c20ad4abaec2632acfa069a73b1c0b195ccb8334) + +commit 211abf00128a20b667a760b89d0ccb60b03692cd +Author: Daniel-Constantin Mierla +Date: Fri Feb 21 10:35:22 2025 +0100 + + dialog: get vars via value instead of reference for kemi functions + + - do lock/unlock + - GH #4151 + + (cherry picked from commit 3b213f1d008656682f1733d59f6c3bacd474c4b9) + (cherry picked from commit ea0fc8e213f6703d87a000216a2cc18764732fce) + +commit da3a94f0ce67709806f0aedfd6818e9be65432f8 +Author: Daniel-Constantin Mierla +Date: Sun Feb 16 12:06:57 2025 +0100 + + dialog: set keepalive local cseq value to 0 + + (cherry picked from commit 5d3ae2acfab38eda88c6369c0db18a286faba2e3) + (cherry picked from commit 0c09b213cbd0a8b12128fa4fb16c01907684b0a6) + +commit 2a076e07ba9a1289ee89f4eba2cba872d65d36df +Author: Daniel-Constantin Mierla +Date: Sun Feb 16 10:36:57 2025 +0100 + + core: socket info - print index values in error message for overflow + + (cherry picked from commit 413c90202975886f4dfcb579a1157a19c3065341) + (cherry picked from commit be47356fda7ee3862f335fd5b192e54c33dfe85c) + +commit 2e5863f54086ae695564861569f009c96b58dbf1 +Author: Daniel-Constantin Mierla +Date: Sun Feb 16 10:23:18 2025 +0100 + + registrar: remove unnecessary condition + + (cherry picked from commit 6b7af1beb7fdaaec1b5d069fdfff3e3af5ca43ca) + (cherry picked from commit dddb8b0c99f2822be5fff2693a105b391480bc77) + +commit 9fbc51b7f9d4bcb618f68a2b54427ce17d4362aa +Author: Daniel-Constantin Mierla +Date: Sat Feb 15 15:28:35 2025 +0100 + + db_redis: clean the keyname variable + + (cherry picked from commit aae4cb323d4ea9d07b4b8aec61a6c9bc03e2ab83) + (cherry picked from commit c59d29abbdc65784ea6fbe6eb237dbadd3fb370d) + +commit 7e5cf1d7dbcb027dd6aaeca3ad7df582bef2265e +Author: Daniel-Constantin Mierla +Date: Fri Feb 14 12:38:04 2025 +0100 + + tsilo: free duplicated ruri and contact on error cases + + (cherry picked from commit d029de6380f8e30e0c82435b820744c21a5fbc78) + (cherry picked from commit a6e99ff231ca5a42bd053d3a8f2f9d02682ab07d) + +commit e3c734871f1858e88617060f859c347788bd23b0 +Author: Daniel-Constantin Mierla +Date: Fri Feb 14 12:23:39 2025 +0100 + + dlgs: return -1 for 0 tags count + + (cherry picked from commit 6a2a82555ee8bbfaca1e825c19d1532f22c2c629) + (cherry picked from commit 975d3449ae01a9078009772e0e1b86c9a996d982) + +commit 99852d486bd4180c4f571864bfccda526f3e259d +Author: Daniel-Constantin Mierla +Date: Fri Feb 14 12:17:23 2025 +0100 + + http_client: free dumplicated name in case of errors + + (cherry picked from commit 39ba53a2499dd1f0e080bb011d7438a60ea5faec) + (cherry picked from commit 7274e353d7c05f5387c64aaf90197c9a8e8d1dd4) + +commit e804235ebdd344020891307b838769fbb3ad8385 +Author: Daniel-Constantin Mierla +Date: Fri Feb 14 12:03:57 2025 +0100 + + call_control: free pv field in case of error + + (cherry picked from commit 8a96379cc1ef7aa42bc4be49834c538a3bffdf14) + (cherry picked from commit 44764414c48fed1b90580cf62dd33e975f1f7ecd) + +commit 23de8c670eea22ae6cce3f3d8e5b9d7d3f7dd9b4 +Author: Daniel-Constantin Mierla +Date: Fri Feb 14 11:39:11 2025 +0100 + + sca: free replaces hdr on anchor lump failure + + (cherry picked from commit 01782191418f3d65c4aa5cb273140fec928d153a) + (cherry picked from commit c8acc1f6e5441fd4514c2b7ead1e2bbe441f7895) + +commit eaa0d1af8a46fe9a74d0eb1bbb2fbf2089f4e3fb +Author: Daniel-Constantin Mierla +Date: Fri Feb 14 10:16:00 2025 +0100 + + xmlrpc: removed unnecessary code + + (cherry picked from commit e65b03cdd946d735a3ef33ae3582bcfad464d2c7) + (cherry picked from commit 6d06293f3fe1c5897a3e01272fdc9ac409925f3d) + +commit 83a4165fc62710027ddf006058c66f082d01b51f +Author: Daniel-Constantin Mierla +Date: Fri Feb 14 08:37:23 2025 +0100 + + ctl: refactored error handling and removed unnecessary code + + (cherry picked from commit edbb5b11e9453be3519e6e9a945937307c95709e) + (cherry picked from commit 691eb2600c1fcf24d0d1f9b2648e7257499537a8) + +commit ce55c093d490fd19f10c50e11d12e188b64c1686 +Author: Daniel-Constantin Mierla +Date: Thu Feb 13 11:45:06 2025 +0100 + + pv: free next field on error when parsing xav* names + + (cherry picked from commit b875e7368dcc8e221007caafa3599c3e354404f7) + (cherry picked from commit 8b7637140c5362bf90046ccb3b34ea74ef658c0a) + +commit 33aebcd3a4f17df390153ad38cf73b4a701fd74f +Author: Daniel-Constantin Mierla +Date: Thu Feb 13 11:01:20 2025 +0100 + + topoh: check on pointer only for via decode return + + - code reformatted + + (cherry picked from commit d0cd3c4b40fd791143122622a6d74703e1375832) + (cherry picked from commit c7a4dd132478ff2d5f46c85594a44fee9c570f6d) + +commit 33921fd3fc01f95dae2c0a8e7e146c798d8c2338 +Author: Daniel-Constantin Mierla +Date: Thu Feb 13 10:50:32 2025 +0100 + + tm: rpc uac - jump to error when failing to create delayed context + + (cherry picked from commit aa081dbd1ee1901c6174ffddd556bda47b6ef732) + (cherry picked from commit d0df1eef55cd9bb0bca2b0db007d94dbe4e8e95c) + +commit 34d093a1e7a60f9d13458fed46a513c5efdeaffa +Author: Daniel-Constantin Mierla +Date: Thu Feb 13 10:42:27 2025 +0100 + + tm: jump to error when failing to built content length for uac cancel + + (cherry picked from commit 27e1e9102f07047a3d2c2f28baa708f14be556a6) + (cherry picked from commit d505c876c534cc4a4b8aff5ef1b5e28b151d8d06) + +commit 994bc2e752f2f969d04067329f34b29aadd77934 +Author: Daniel-Constantin Mierla +Date: Thu Feb 13 10:32:51 2025 +0100 + + tm: split reverse rte list function + + (cherry picked from commit e85d07e5b42ff25f81b74f68ab412e0ab27e7170) + (cherry picked from commit a5576fb3476e327ef10135a85cf20f2e720803db) + +commit ad7a3cc3751af2417e6000a2d689c35e9dddda36 +Author: Daniel-Constantin Mierla +Date: Thu Feb 13 09:48:33 2025 +0100 + + xprint: break on first resolved ip address + + (cherry picked from commit 7c908137826071b8180bd93ff8ba3994be66da3a) + (cherry picked from commit de5986433283b2fcff09b064420d43327270d390) + +commit 90122e3a46169e9f10dc7d8e01638d5f89cfaae5 +Author: Daniel-Constantin Mierla +Date: Thu Feb 13 09:43:43 2025 +0100 + + ctl: fifo - clean intermediary buffer + + (cherry picked from commit 4c4d7f7967a99d4dd4acdc5e198bce493bf15d67) + (cherry picked from commit c68522f5c3c59cb915feb873bd3351e57a8db579) + +commit 1f6dc4df8572c07280478858087182f273c25fe3 +Author: Daniel-Constantin Mierla +Date: Thu Feb 13 09:40:00 2025 +0100 + + xmlrpc: clean allocated buffer + + (cherry picked from commit ff712539566c903312ebba2f8e2585f9c80ffdcf) + (cherry picked from commit e1398e53e9825db6c20590e1576d960ac0c3c429) + +commit 184f25c845bffc39d3aabff90d1f5683d0cb009c +Author: Daniel-Constantin Mierla +Date: Thu Feb 13 09:18:00 2025 +0100 + + xprint: init globals when declared + + (cherry picked from commit b17038ec072b1854fa2fae1c2d4725c1471ef8ac) + (cherry picked from commit cf3b3849cb2a3c4060281377e2adee09de5d47d9) + +commit 5e836af2ff198481bde0485a315bbfdf39043f9d +Author: Daniel-Constantin Mierla +Date: Wed Feb 12 17:48:42 2025 +0100 + + ctl: free rpc struct in case of error + + (cherry picked from commit 4a71d3c9e6a4f92ef33ce8e62372b2c4dba62a56) + (cherry picked from commit 5024235f876df4b3239ef746de700ade362cc7b2) + +commit f123ebae553624525ca04d34ddd4c9453eac855a +Author: Daniel-Constantin Mierla +Date: Tue Feb 11 12:41:26 2025 +0100 + + core: check for unexpected long value return by pathconf() + + (cherry picked from commit 2ba6d4ff2727031e7bca5d3d1da016bfe508b8df) + (cherry picked from commit 718692c6d402b6942e0b1e8ebd8e64b306813495) + +commit 42260f34079ddad7662742a64696d2550ee1cce9 +Author: Daniel-Constantin Mierla +Date: Tue Feb 11 11:30:34 2025 +0100 + + core: pass fd - check for unexpected read size overflow + + (cherry picked from commit 6c12477f1dad2279431d703d1a4f63fcfc6543b8) + (cherry picked from commit ac0a4a5052e9aaf6531130675c8140fdd5c11e97) + +commit 77f2671979d0dcd70cdd3f490a0dad00ba5c8fc5 +Author: Daniel-Constantin Mierla +Date: Tue Feb 11 10:25:34 2025 +0100 + + tsilo: clean allocated memory on error for append by contact + + (cherry picked from commit 6fb38cb33095c11a1c90d7b88140ac159b9fd5ca) + (cherry picked from commit f1549b99a69bf0dec4aad564afa1d6e328621752) + +commit 874148e9335fdf22e9187ff3dce524dc0fa21879 +Author: pepelux +Date: Fri Feb 7 19:08:56 2025 +0100 + + secfilter: fix secf_check_dst bug + + (cherry picked from commit 578c2abb36b9101bfc1dddc1505f7239e928b98e) + (cherry picked from commit 086d228b29ab414a65521da78695786a979ef754) + +commit 8473c30705289dd5bf94c6426d2e8ba4c49e19b5 +Author: Daniel-Constantin Mierla +Date: Thu Feb 6 08:07:46 2025 +0100 + + core: socket info - use unsigned for current size in buffer for get flags + + (cherry picked from commit 462f9730eb55a3abbd50b9170eb6318eb43eb999) + (cherry picked from commit eed2ccbb658b28433e71a95e9715934aa64c4cfb) + +commit 88780735710c688293dcc3e1d52fd8aba2f2bb75 +Author: Daniel-Constantin Mierla +Date: Wed Feb 5 13:30:17 2025 +0100 + + textops: catch return 0 when removing via param + + (cherry picked from commit 65645c761e94cedde04f100764d5c506590cb200) + (cherry picked from commit a88946a84133660d5b2a466a231dff226c9db995) + +commit 0f8b36091a64de012377bd2460e299529886a45c +Author: Daniel-Constantin Mierla +Date: Tue Feb 4 08:05:28 2025 +0100 + + msrp: send failure response after referening the buffer + + (cherry picked from commit 5f8adb625b6bae81ef44613d774106bf3a943bb0) + (cherry picked from commit 4ff58bb3e02b76e2489144867c8b0dc5041dc621) + +commit 96945faccf3d689c1a2e90aca3b65bf69926647f +Author: Daniel-Constantin Mierla +Date: Mon Feb 3 13:36:10 2025 +0100 + + core: mem f malloc - additional check when getting to search very big fragments + + (cherry picked from commit ac909a7a019922676076bc47a28a3801c749becc) + (cherry picked from commit 9d3392a55831124121b078201985c417c9f9982d) + +commit 724a58813d50dcfe965e69914fbdc93291811a85 +Author: Daniel-Constantin Mierla +Date: Sat Feb 1 07:40:11 2025 +0100 + + msrp: variable for extra headers used in local replies + + (cherry picked from commit 7a73e08b0e5b4c3fbeb4f097c1f891d06c74651d) + (cherry picked from commit c29d9d661b3954906cdee7e98a4f9b6502673490) + +commit f270f8a6c86cc2541801914223858da13f39de7d +Author: Daniel-Constantin Mierla +Date: Thu Jan 30 11:32:53 2025 +0100 + + seas: remove redundant check + + (cherry picked from commit ab1b032771be9adbb1d643cd44beac0e09a31553) + (cherry picked from commit c8be39750902ad69818f8247898070fce2d6a3a3) + +commit f4aed91f5ab78cddbe782e94306c3cf4c49b09c6 +Author: Sergey Safarov +Date: Wed Jan 29 09:12:44 2025 +0200 + + janssonrpcc: fixed warning var may be used uninitialized + + (cherry picked from commit 3039c02404e05da05a031f6ccf68913a8c1c80eb) + (cherry picked from commit ddd98b09c80dc0d15af080e37961b59ecde17689) + +commit dfe9da5c1c79612cb6166dfabf89abd1cea9baf7 +Author: pinacolada1610 +Date: Thu Jan 23 16:21:04 2025 +0300 + + tcp: fix for local TCP/TLS socket matching with 'tcp_reuse_port' enabled + + - Changed the logic for matching a listening TCP/TLS-socket in tcp_reuse_port scenario, now it considers local port as well. + With 'tcp_reuse_port' option enabled, the local port is meaningful and helps to differenciate between sockets on the same IP but different ports. + + (cherry picked from commit 0cb6e35d581398d2c5a7086a0d98b113fbb16138) + (cherry picked from commit 1e362f2ba51c6ee9a9e005675a30202e42ceb3a7) + +commit 270ac18eeb5601fa5043a85961a62a4b2fb466f9 +Author: Ovidiu Sas +Date: Wed Jan 29 01:40:24 2025 +0000 + + db_oracle: fix warning: passing argument 2 of ‘db_do_close’ from incompatible pointer type [-Wincompatible-pointer-types] + + (cherry picked from commit 577a87861a8566e00f2700dfb227dcc8b26393b4) + (cherry picked from commit 022940dec70272a19c86604d2fa9af83d8790bb1) + +commit 614e056628f6221cde6d6a307109edf489750095 +Author: Daniel-Constantin Mierla +Date: Mon Jan 27 16:06:04 2025 +0100 + + http_async_client: check returned cell inside check_multi_info() + + (cherry picked from commit b16550fa72d23084b4221769fe74b1f3c357c9fd) + (cherry picked from commit b4718cd7dca8e037664dbc49a1cfac684906ecea) + +commit ce3806e6b8ac668f149e655d07467826acb03775 +Author: Daniel-Constantin Mierla +Date: Mon Jan 27 10:20:49 2025 +0100 + + htable: wrapped maco code in do {} while(0) + + (cherry picked from commit 65a296b3478503ed3519ea9156d8f46f5cb9ce2a) + (cherry picked from commit dfa9239cf6df7644e9fe6b83cfc33aff518a19c6) + +commit 7997d33aa6cae817da0e55cca802eb49b145711b +Author: Bastian Triller +Date: Tue Jan 14 12:35:21 2025 +0100 + + htable: Fix expiry on assignment + + Update cell expiry on assignment for htables w/o updateexpiry (analogue to #4079). + + (cherry picked from commit 75994f40c99ffa2c7c33e5fce5e3d3cd8db7d780) + (cherry picked from commit b38925b0b3628539840de2b6240da75b9f9f3cc6) + +commit 626253c7d41a67fed8c5f3af64caa3c184a509d2 +Author: Daniel-Constantin Mierla +Date: Sun Jan 26 18:07:54 2025 +0100 + + core/parser/sdp: proper test for media ip separator + + (cherry picked from commit 200cdb318569191cd012dfe99b252f98fe9623b9) + (cherry picked from commit 9c44aec667fc3c088612dd31935bce2eb082812d) + +commit a8f9aa75a08b1fc0bcc66bfc8119e0fe278b1365 +Author: Daniel-Constantin Mierla +Date: Fri Jan 24 16:48:51 2025 +0100 + + presence: do not break on one notify sending failure + + - try all of them, debug message with successful and failure counters + - GH #4118 + + (cherry picked from commit 65e51b776290a1981e9ac27fbe6b47813516bc8b) + (cherry picked from commit 9e21ce85d0c97679f9e14f9c31108f2dcdad772e) + +commit ac730f356aee48488801951290123a758388c1a8 +Author: Daniel-Constantin Mierla +Date: Thu Jan 23 11:51:07 2025 +0100 + + core: more checks for extract_candidate() + + (cherry picked from commit 3198b66aa5dbda1c6a03f46a610073671cbd5157) + (cherry picked from commit a5ac9e04b91971da44256373904450501f9a4493) + +commit ed3d6809dcc66ac18efb313fbf9e3f7bd130a19d +Author: Daniel-Constantin Mierla +Date: Thu Jul 11 19:38:24 2024 +0200 + + htable: do not print item name before is computed + + (cherry picked from commit e2193b9cd7f59377c54e0424c0d4a1628a5a60de) + +commit fddfbdcce2587e9b40f6c2fe77334d3b3b1dbb6c +Author: Xenofon Karamanos +Date: Tue Jan 28 11:31:57 2025 +0000 + + outbound: Fix flow_token_secret bug + + - flow_token_secret is of type str and not char* + - check the length of the string instead of memory for initialization + + (cherry picked from commit 046ba41e431fec7fad0c82a9091ea9e27d9f677d) + +commit 95feca55b38991e045d57ab8cdb9b75bcdb7070e +Author: Victor Seva +Date: Thu Dec 12 14:50:42 2024 +0100 + + outbound: reformat exported structures + + (cherry picked from commit 793a494f5b23f2ef5e82664924c3bed3893105bb) + +commit 1b4aa300292dd6bdd64e174111939293fbbd76ed +Author: Daniel-Constantin Mierla +Date: Tue Jan 28 17:46:16 2025 +0100 + + kamctl: renegenerate db creation files + + - GH #4124 + +commit 0cf639eceb6a8fea50d19184add989e049dfb6ca +Author: Sergey Safarov +Date: Sat Nov 23 22:02:16 2024 +0200 + + pkg/kamailio: added support for CentOS 10 [skip-ci] + + (cherry picked from commit cdafda78c9fc98d9d9fdb7f94e77c9bc60ebf4d1) + +commit 0e51b497a19c525a89d5fead5e0854b2b18317dd +Author: Sergey Safarov +Date: Thu Jan 23 14:47:56 2025 +0200 + + pkg/kamailio: simplified systemd unit files installation [skip ci] + + (cherry picked from commit c47108eacba1a6cf7e8564a00ff0850f621d29aa) + +commit b05e8e854bde2ef4ac4c40f227e0794f1a6583ff +Author: Victor Seva +Date: Wed Dec 11 00:09:02 2024 +0100 + + db_unixodbc: fix incompatible-pointer-types warning + + > dbase.c: In function 'db_unixodbc_close_impl': + > dbase.c:261:32: error: passing argument 2 of 'db_do_close' from incompatible pointer type [-Wincompatible-pointer-types] + > 261 | return db_do_close(_h, db_unixodbc_free_connection); + > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ + > | | + > | void (*)(struct my_con *) + > In file included from val.h:34, + > from dbase.c:33: + > ../../lib/srdb1/db.h:495:40: note: expected 'void (*)(struct pool_con *)' but argument is of type 'void (*)(struct my_con *)' + > 495 | void db_do_close(db1_con_t *_h, void (*free_connection)(struct pool_con *)); + > | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + > make[2]: *** [../../Makefile.rules:101: dbase.o] Error 1 + + related #4064 + + (cherry picked from commit 7f24bc09863220b4c14e2046708c10ff0891c038) + +commit cd68ed205895b981d61d84de5138e25329455cd9 +Author: Victor Seva +Date: Tue Dec 10 23:58:06 2024 +0100 + + db_sqlite: fix incompatible-pointer-types warning + + fixes #4064 + + (cherry picked from commit 06cc2560e5358468178ef3e5c795a8a0ec67b693) + + + +===================== 2025-01-23 Version 5.8.5 Released ===================== + +===================== Changes Since Version 5.8.4 =========================== + + +commit 7c2db662b81ede6256a871a783146320a03904c6 +Author: Daniel-Constantin Mierla +Date: Thu Jan 23 09:08:43 2025 +0100 + + Makefile.defs: version set to 5.8.5 + +commit 13ef1a559a57087279ea5c0920ad7253e65b7c98 +Author: Daniel-Constantin Mierla +Date: Thu Jan 23 09:04:34 2025 +0100 + + core: extended logs for subst lumps + + (cherry picked from commit d307fee57b7a8a7e0b5ccf0956464a159e156b73) + +commit 2f7ff72109cb4097c095d86bc5d57d00b3024d7d +Author: Daniel-Constantin Mierla +Date: Thu Jan 23 08:31:59 2025 +0100 + + pkg/kamailio/deb: set version to 5.8.5 + +commit dbb7696bee3c43da69c4a12a9dc0bdf91b71460f +Author: Daniel-Constantin Mierla +Date: Thu Jan 23 08:30:04 2025 +0100 + + pkg/kamailio: version set 5.8.5 for rpms and alpine + +commit 6fd7fd2acf7d76e4e8ba7669c170dc837a84848d +Author: Daniel-Constantin Mierla +Date: Tue Jan 21 21:43:06 2025 +0100 + + core: reworked how rport, received and extra params are added to first via of generated replies + + (cherry picked from commit d613f30214782d47ed0aab8bf2fb55329d87862a) + +commit 8eff811614b72fbf80af6d546d65c65e6b59c1a5 +Author: Daniel-Constantin Mierla +Date: Tue Jan 21 21:22:38 2025 +0100 + + core: add extra params to first via only for generated replies + + (cherry picked from commit 9045c8d537b8960a18451f870effe2255cb4861d) + +commit b6360f4d8549c18efad507bc37ef599d9e3316d7 +Author: Daniel-Constantin Mierla +Date: Tue Jan 21 19:45:20 2025 +0100 + + core: add rport to generated replies after first via branch when no incoming rport + + (cherry picked from commit 09d1ba87f4d37c3e13153229c63698f09ca195bc) + +commit 132e5324bf9f794ea82df0f12ef094f6c12ee178 +Author: Daniel-Constantin Mierla +Date: Tue Jan 21 18:15:19 2025 +0100 + + etc/kamailio.org: do record route for REFER + + - it creates a subscription dialog + - https://datatracker.ietf.org/doc/html/rfc3515#section-2 + + (cherry picked from commit cfc9d69435b4bbc53dbe6748e0d22603760c48fd) + +commit 76ffc6d3d4053bc43b81c3363e837c10360b0089 +Author: Daniel-Constantin Mierla +Date: Mon Jan 20 17:10:05 2025 +0100 + + core: parser/sdp - check if still before end of the value + + (cherry picked from commit b96bc11a54f11ec688429c057bf5a90c40c147b3) + +commit 9b26093fa5cdf05cf664fa3a03619634ed226a47 +Author: Daniel-Constantin Mierla +Date: Mon Jan 20 12:58:18 2025 +0100 + + core: socket info - set receive timeout for netlink socket + + - GH #4098 + + (cherry picked from commit 6750e2e2f1d6c10f6b5e66897d38657a576a9732) + +commit 59a6a469d1627de069abb8b7755776a8e87c9008 +Author: Daniel-Constantin Mierla +Date: Fri Jan 17 09:29:45 2025 +0100 + + parser/sdp: more details in logs for setting fmtp payload + + (cherry picked from commit 81b84ef83f59981b6e5f199055e9ab6a94c58b38) + +commit f499cb1fffb0ec8ef7b659ecde90de303fde0553 +Author: Daniel-Constantin Mierla +Date: Thu Jan 16 10:47:25 2025 +0100 + + core: tcp - remove level and function name from log message + + (cherry picked from commit 5fe61ec6dbcd9d2dde3f2bd978dad5130ac5bff9) + +commit 50e69e9a269e5d5dba0251f893abc34907a12970 +Author: Daniel-Constantin Mierla +Date: Wed Jan 15 07:24:29 2025 +0100 + + sanity: log as debug when Content-Length is missing for datagram protocols + + - the header is optional for datagram protocols (RFC3261, 20.14) + + (cherry picked from commit e38c7f8bac1aef9890d266fa466cea1561346732) + +commit 1d79bd109bd5f1563a23189cfab9ed8e9bb821c9 +Author: Daniel-Constantin Mierla +Date: Tue Jan 14 13:16:12 2025 +0100 + + siputils: declare iterator out if for loop for C99 compiler + + - for sip_generate_charging_vector() + - variables declared at the begining of blocks + + (cherry picked from commit 6b0b8cb84b7d0e965d50bdf0dfa5423004879f55) + +commit 3772cdfda5c23d5267bac7059ace198418ef3986 +Author: Kamailio Dev +Date: Tue Jan 14 09:46:23 2025 +0100 + + modules: readme files regenerated - modules ... [skip ci] + +commit 8ef52b885212c21f5606c9a00abf6a532da57121 +Author: drTr0jan +Date: Fri Jan 10 10:53:19 2025 +0300 + + influxdbc: support for FreeBSD build + + (cherry picked from commit abcafe75de7adc524b4a5a3df103f427565f9627) + +commit 42aeb526d02ff4414504b28dd7803a27e3553840 +Author: drTr0jan +Date: Fri Jan 10 10:52:33 2025 +0300 + + Makefile.defs: support for FreeBSD build + + (cherry picked from commit 141f19a95bd0d97f1bd325291aafb844f46c7fd3) + +commit e6ceae072f462497584cafe5574298ee52a85538 +Author: Alexander Bakker +Date: Thu Jan 2 14:50:03 2025 +0100 + + core: parser - set URI type to TELS_URI_T for user=phone SIPS R-URI + + Fixes an issue where setting the ``$rU`` for a SIPS R-URI containing + ``user=phone`` would overwrite the scheme to ``sip``. + + (cherry picked from commit 8801cf72c77e9233c789a9a0a1536ac524d5abf6) + +commit b69b914ff514b9da92108636cdf206e2f64e7ffa +Author: Bastian Triller +Date: Wed Dec 18 17:13:13 2024 +0100 + + htable: Fix de-/increment w/ auto expire + + Update item expiration value during de-/incrementation for htables that + are configured with autoexpire and updateexpire disabled. + Otherwise an item cannot be used until timer cleaned it up. + + (cherry picked from commit b8062321572e1523bb9478fd2421c5a8bc8314af) + +commit c1850aa5a1eb13a1005c077ae538ba27844c73a1 +Author: Daniel-Constantin Mierla +Date: Fri Jan 3 12:11:22 2025 +0100 + + core: socket info - let the kernet to set nl_pid value inside nl_bound_sock() + + - GH #4094 + + (cherry picked from commit 1a6102098f78855283064f82a9075630b92412f3) + +commit 7e13eba5399329384ca79df972dbe2ca722092c0 +Author: Daniel-Constantin Mierla +Date: Fri Dec 20 09:41:14 2024 +0100 + + siprepo: docs - small typo + + (cherry picked from commit ed61054f3b4064523888897bb22ae4d53b84d949) + +commit 1520c3b1f05effa331bf4187d2cd7db3d0c87005 +Author: Daniel-Constantin Mierla +Date: Fri Dec 20 08:53:04 2024 +0100 + + htable: get current time once for pv counting items + + (cherry picked from commit 9abe414a186e2a6e9041dd03a1a8968f0efa954d) + +commit 7c35a85878e0923fcd354dab21b5a347ca8b3e19 +Author: Daniel-Constantin Mierla +Date: Fri Dec 20 08:19:14 2024 +0100 + + htable: skip expired items for pv counting them + + - GH #4080 + + (cherry picked from commit d92a990a4040279ed7ee4d71debf2a13fd4d6782) + +commit 59bf38394f97c1ed1ed6cfee862d9263791af95c +Author: Daniel-Constantin Mierla +Date: Thu Dec 19 09:24:41 2024 +0100 + + core: info log when no r-uri or branches found for print_dset() + + (cherry picked from commit f0095466c2847c996440c45a8f728adc16f09579) + +commit 57f18cfdaf9cd338eae9c69b8a4f88bf73c386db +Author: Daniel-Constantin Mierla +Date: Mon Dec 16 09:32:12 2024 +0100 + + auth: export pv_www/proxy_authenticate(...) to kemi + + - GH #4067 + + (cherry picked from commit fb1f6397cd58b8186558bfb719f73d9765281ff2) + +commit eb865d759f1b4274f602fbfa5bd85e21d3901d8a +Author: Victor Seva +Date: Thu Dec 12 12:06:38 2024 +0100 + + ims_diameter_server: fix retrieval ``$diameter_response`` value + + ``current_msg_id_repl is only`` changed if ``$diameter_reponse`` + is changed by via ``pv_set_response()``. The event_route is + executed with a ``fake_msg`` so it will not match if is setted + outside anyways. + + (cherry picked from commit 7c365f76560b18aca49096121ea55791ce8f3623) + +commit ca809718bc64779ecb4371c04c15e1d98af04cc3 +Author: Kilian Wöber +Date: Tue Oct 29 14:43:01 2024 +0100 + + ims_isc: bugfix: firstflag incorrect in isc_match_filter + + (cherry picked from commit 2bd70ed7ab8ec4cf59e12be3d561c735d84f2dea) + +commit 533f8ef3406a6fe299c2184cfd31098266a2a1fd +Author: Daniel-Constantin Mierla +Date: Thu Dec 12 12:23:41 2024 +0100 + + pua_dialoginfo: rename short global variable + + (cherry picked from commit 92f899f3689f0f0b291590e82e61751b76b2539c) + +commit 828b666ba577f812de8ed472d5775d9c506cabab +Author: Daniel-Constantin Mierla +Date: Thu Dec 12 10:22:27 2024 +0100 + + core: use one strlen for mod_path + + (cherry picked from commit f385148ff68e2125a2111d9c506022519f17d1c9) + +commit e00d184a6ccdb8c34f52aaf96a0481b997dce0cc +Author: Daniel-Constantin Mierla +Date: Thu Dec 12 09:18:17 2024 +0100 + + tm: check the type of contacts xavp value + + - GH #4063 + + (cherry picked from commit 3eb9e1d34988ebeba9d4526da8f4d804846a7316) + +commit 2ca1c47e066800323dd72daed8a47cfa61fa2d5a +Author: Daniel-Constantin Mierla +Date: Mon Dec 9 19:04:25 2024 +0100 + + lib/srdb1: new and free connection callbacks expect one parameter + + - new connection is executetd with a database id and free connection + with a pool con + - compiler warnings: + src/lib/srdb1/db.c:322:23: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] + 322 | con = new_connection(id); + src/lib/srdb1/db.c:361:18: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] + 361 | free_connection(con); + + (cherry picked from commit 8e398b8675079e1baac7c7575e70283175cdebe2) + +commit 538d8b756594aa6a03aea34f5afd624b2a6ae56f +Author: Matthias Urlichs +Date: Fri Nov 29 17:01:45 2024 +0100 + + app_python3s: fix exception handling + + Python's C interface contract states that C code must *either* + raise an exception and return NULL, *or* return a Python object. + + (cherry picked from commit ef73fb876f527c3bde4b425e3ec70d3f613fcb87) + +commit b5aceff9d75876908665516d847cf1e7292d850e +Author: Matthias Urlichs +Date: Fri Nov 29 17:01:45 2024 +0100 + + app_python3: fix exception handling + + Python's C interface contract states that C code must *either* + raise an exception and return NULL, *or* return a Python object. + + (cherry picked from commit 91dc75e65bb2a6643b8b322024416c420caf5d64) + +commit 42241e6c054d6d92f6710210ed57425091206437 +Author: Daniel-Constantin Mierla +Date: Sun Dec 8 21:28:48 2024 +0100 + + tm: small updates about timer avp params and compatibility modes + + (cherry picked from commit 5e0bc1a5c9764ce472354a0aa242b7469d79eb7f) + +commit 158d1feb8f5ebe4b8a4af34e85c71c11cb144cea +Author: Curt J. Sampson +Date: Wed Dec 4 15:53:36 2024 +0900 + + misc: examples/ims/scscf/README - fix typo in .sql filename [skip ci] + + (cherry picked from commit ee81e1e017c62063a5b1fd20ac61c5783ee4eab4) + +commit 68e3447e04c06059d47e1f001ae0b34e7f88b2f5 +Author: Daniel-Constantin Mierla +Date: Tue Dec 3 08:03:57 2024 +0100 + + xlog: evaluate prefix for kemi functions + + (cherry picked from commit 76e18d0d13a41e93094f9084ac44e0809f91b109) + +commit 98f20996606a200f025dd78f96fbb50cd426f756 +Author: Daniel-Constantin Mierla +Date: Mon Dec 2 20:19:45 2024 +0100 + + xlog: use crit level with prefix for kemi xcrit() and xlog() + + - GH #4048 + + (cherry picked from commit a493e2e0006f89d2f8b5e903134407109ef587da) + +commit 1ad61f8238ce5966bb68c5d48667ca5800e94dad +Author: Daniel-Constantin Mierla +Date: Mon Dec 2 12:39:17 2024 +0100 + + ims_ipsec_pcscf: clang format + + (cherry picked from commit c7bb0965bde055aaf76cad526eae248ae2165280) + +commit 0363fe3f334840ff028b8a14bba932fa3274a2bd +Author: Lennart Rosam +Date: Tue Nov 19 23:42:04 2024 +0100 + + ims_ipsec_pcscf: Add error logging + + Currently the module initialization fails when the ipsec listen + interfaces cannot be bound and it does not produce a helpful log message + for the user. This commit addresses that. + + Co-authored-by: Alexander Couzens + (cherry picked from commit 785659417bcc1984f12d5ebe35c134b15d614483) + +commit b359bd6c7adf1a287637892c0be0c9897c477d4d +Author: Lennart Rosam +Date: Tue Nov 19 22:00:07 2024 +0100 + + ims_scscf: Add more logging to ipsec_create() + + Currently there are scenarios where ipsec_create() fails with no more + information in the logs. This should make debugging issues a bit easier. + + Co-authored-by: Alexander Couzens + (cherry picked from commit 353b788bb3c78a4c0e8c390decdc420322b4927c) + +commit 0259f3a6c8c97121f9f691441c1a600ce3d4a782 +Author: souradeep.bera +Date: Sun Nov 24 14:29:57 2024 +0530 + + topoh: improve debug info for topoh crash + + - print entire socket address for ease of debugging with empty mask ip + + (cherry picked from commit c6a485b04c2ed14b77e8747ffcd822f0743d56dd) + +commit 85d1278034303c597fba4d2db21a9cd227c1730d +Author: Daniel-Constantin Mierla +Date: Sun Dec 1 09:02:12 2024 +0100 + + db_mongodb: use STR_VTOZ() macro + + (cherry picked from commit dca29a87467fd074bcb63a5f20b6834a87fadc5f) + +commit 076fb25f515c76a734281094e1b8a0fa095b0d65 +Author: Daniel-Constantin Mierla +Date: Sat Nov 30 10:39:20 2024 +0100 + + ndb_mongodb: mongoc_collection_command_with_opts() for mongodb_cmd() + + - mongoc_collection_command() is deprecated with lib v1.29.0 + - GH #4037 + + (cherry picked from commit 3991350b1acdcd8b3cd575cdbc8932b4f8540e13) + +commit 871dc9bbc13cea3a328afba0e40cf77862a89d8b +Author: Daniel-Constantin Mierla +Date: Fri Nov 29 09:33:58 2024 +0100 + + lost: removed use of deprecated xmlKeepBlanksDefault() + + - XML_PARSE_NOBLANKS seems to be used, which is suggested in deprecation + message + - GH #4038 + + (cherry picked from commit 784f55cdb31de9eda6971e04ee12c2cb88556835) + +commit 6f78cc028b0418a20c2b73f97a4fc4af72c7106f +Author: Daniel-Constantin Mierla +Date: Fri Nov 29 09:15:59 2024 +0100 + + lost: clang format + + (cherry picked from commit 4a9bb81a69fbef11d92d294fa1db0711ff8e78db) + +commit 264e23e830072ef3804c974ffa6d85fb4b981370 +Author: Daniel-Constantin Mierla +Date: Fri Nov 29 09:13:49 2024 +0100 + + lost: use buffer size for snprintf + + (cherry picked from commit be2d3bfe537a692efa8cdc2bd4e4441eed5d0840) + +commit d816c822dbd4ee4c910e53a757003bf2a306d02d +Author: Daniel-Constantin Mierla +Date: Fri Nov 29 07:53:31 2024 +0100 + + ndb_mongodb: fix for deprecated bson_as_json() from v1.29.0 + + - GH #4037 + + (cherry picked from commit 8e6a8e0baf8a700f36c81d3f808391f03a37c9d1) + +commit 9266c0051158b9c65ae49bf9ab478dd94b55d7e5 +Author: Daniel-Constantin Mierla +Date: Fri Nov 29 07:33:58 2024 +0100 + + db_mongodb: fix for deprecated bson_as_json() from v1.29.0 + + - GH #4037 + + (cherry picked from commit a4a86bd1a84ee16630660873486ec7d870a4e361) + +commit a45daead40a07a4f6e3d9913ba27f9e6cd5f8bde +Author: Daniel-Constantin Mierla +Date: Thu Nov 28 14:38:08 2024 +0100 + + lib/ims: libxml2 is not needed - removed from makefile + + (cherry picked from commit 5eac8fd5356cc424d87cac4b4102c99e97054414) + +commit 40a9c5a96d837e35ecdc166f10476386c3c7e7a6 +Author: Daniel-Constantin Mierla +Date: Thu Nov 28 10:51:56 2024 +0100 + + http_async_client: remove unnecessary str len + + (cherry picked from commit c36dd7e9c8b01aae5f35e8c576188cd34b1f8aa6) + +commit 738cd9d4b7c1b14ec77fe2e7fa6422b814c97836 +Author: Daniel-Constantin Mierla +Date: Thu Nov 28 10:39:44 2024 +0100 + + keepalive: use memcpy for coping data + + (cherry picked from commit eab6682e4d8bebaf97f85c55b0863ad435e1d133) + +commit 7e0310160d1a934e573733b563a5464630881a2e +Author: Daniel-Constantin Mierla +Date: Thu Nov 28 10:36:47 2024 +0100 + + core: removed unnecessary use of strlen + + (cherry picked from commit 926988487358e1ae3ba79ca999629c452e2d32df) + +commit ce55b7d9ee5ee33d4cf9dc60328d6c55e42950e1 +Author: Daniel-Constantin Mierla +Date: Thu Nov 28 10:35:19 2024 +0100 + + core: modparam - use memcpy for data cloning + + (cherry picked from commit c2ff02b6d07c0f84dcbe5d0d47de3f12ed791e3a) + +commit fab2b2bb1e20e700756dec38a70f6d35393bdfec +Author: Daniel-Constantin Mierla +Date: Thu Nov 28 08:33:14 2024 +0100 + + async: fixed typo in log message + + (cherry picked from commit 78f272da156ff7796dd84697bbf04522b7a08009) + +commit b512a9e809a658dc9ac731a359afce8fa8acd049 +Author: Daniel-Constantin Mierla +Date: Wed Nov 27 15:36:33 2024 +0100 + + corez: set sndinfo attributes for corex_sip_reply_out() + + (cherry picked from commit b003a7184a02da5fd6dfe27def8d928d363e36ce) + +commit 76bb3b687a171bdbec77a4f7d121f9ac8a690e80 +Author: Daniel-Constantin Mierla +Date: Tue Nov 26 15:41:44 2024 +0100 + + jsonrpcs: docs - example for jsonrpc_exec() with rpc params + + (cherry picked from commit 5437ad1a1dd691707e6ea1774e5c8ff6a72d30a7) + +commit f026dab48d17e2f9b4391f2a2dd1bbb2fde8e72b +Author: Dragos Vingarzan +Date: Tue Nov 19 14:08:33 2024 +0100 + + cdp: fixed issues discovered during static code analysis + + This fixes: + - 4-bytes (typically uint32_t) used for time_t storage (Y2K38) + - print of time_t with %d instead of %ld + - reuse of same loop index variable in a sub-loop + - use of random(), when kam_rand() could theoretically be better + - copy-paste mistake in sp2/sp parameter, where sp2 was meant and sp is probably NULL + + (cherry picked from commit 1ceeba7364b745b6ca2840e830d006a37460d10e) + +commit ea08d49c50d31ed5fc5cdeb786db474a9f069607 +Author: Daniel-Constantin Mierla +Date: Mon Nov 25 10:27:11 2024 +0100 + + core: tcp read - convert ips to different buffers for log messages + + (cherry picked from commit e58dc89324b30f09853a7430620e632ec5efaad5) + +commit e7cb341eb09cc4e59f8cc2da85d2baa8d4eb32d0 +Author: Daniel-Constantin Mierla +Date: Mon Nov 25 10:16:07 2024 +0100 + + core: helper functions to convert ip to string using a pool of buffers + + (cherry picked from commit c82aa6e92d3475bb56db761ba65abb64e8f712fd) + +commit c2c3e8f8430f53738192eec996b5506680ae7ec1 +Author: Daniel-Constantin Mierla +Date: Thu Nov 21 19:59:05 2024 +0100 + + core: ppcfg - use define for size of the buffer for core defined values + + (cherry picked from commit 26d6a518c974cfe509d23e41fe9db6b02f357930) + +commit 5766583c17792d64c579599412a3defb1bc4da2c +Author: Daniel-Constantin Mierla +Date: Thu Nov 21 16:55:45 2024 +0100 + + core: use defines for tls threads mode values + + (cherry picked from commit 81450df0c1b247bbd7582c47e00f358f8e20317c) + +commit f608b218da40449dd67ebfb83747550c222279d4 +Author: Victor Seva +Date: Wed Nov 6 19:10:01 2024 +0100 + + cnxcc: fix possible mem leaks on errors + + (cherry picked from commit 1bbb1472d8d940814e4658ac0adcdf809ac7f5ab) + +commit b7607abc683949d64d01bbf0481fd7aa4f2b2a80 +Author: PertsevRoman +Date: Wed Nov 20 09:11:14 2024 +0100 + + db_redis: fix: hiredis-cluster build fix + + - fixed preprocessing issues if WITH_HIREDIS_CLUSTER specified + - GH #4015 + + (cherry picked from commit b14044fac93ef4b43584dd0e14f2b985d41745d6) + +commit 1b40c22489d057675259163088a838f473aa7047 +Author: Daniel-Constantin Mierla +Date: Tue Nov 19 16:20:46 2024 +0100 + + rtpengine: doc - fix quote tag + + (cherry picked from commit cc4e51c45d23b4450d082ba606445b515788ba61) + +commit 5e4b7044f147d3efbe03b52fc03203e567e47b51 +Author: Daniel-Constantin Mierla +Date: Tue Nov 19 16:18:01 2024 +0100 + + pv: made is_uri_enclosed() condition function inline + + (cherry picked from commit d93e0bc19f577114ef7e07afad3ce329c399a488) + +commit 6367a41f64ed165792ffe71ea310fd917947ccba +Author: Xenofon Karamanos <22965395+xkaraman@users.noreply.github.com> +Date: Wed Aug 7 16:07:56 2024 +0000 + + pv: Ensure URI enclosed in <> when changing Display Name + + (cherry picked from commit 75e17db22afa92929054ccf36c8ca9b5daafccd8) + +commit f8ec60e717ba27ab187bf9a0800b46736b000f86 +Author: Remco van Vugt +Date: Fri Oct 18 14:02:40 2024 +0000 + + kazoo: fixed segfault when using kazoo_query + + - Refactored parts of the code to be more readable and DRY + - Split up functions for 3/4/5 arguments passed to avoid segfault + - Fixed pseudovar allocation for returning results + - Tested in 8.5.2 + + (cherry picked from commit 5a4b91e92b03160e13ef83ad486fb64fdae71c7f) + +commit f465639c69074342b863978417210a75c30502d1 +Author: Anton Yabchinskiy +Date: Mon Oct 7 15:32:49 2024 +0200 + + modules/snmpstats: exit with ksr_exit() instead of standard exit() + + The former respects the `--atexit=no` from Kamailio command line. + + See note on `atexit` in TLS module "Overview". + + (cherry picked from commit ed5899b8213a28eb5659edfd5b1b9740ba6a5ab5) + +commit df933053216b91d83233b12f08c7d1d04a5f1634 +Author: Ihor Olkhovskyi +Date: Fri Oct 11 11:30:25 2024 +0200 + + rtpengine: update doc + + - explicit mention of label= flag + - add explanations regarding mos_A/B_label_pv parameters + - typo fixes + + (cherry picked from commit 43f4c0f9455d57f5b4e4963358fe214c85532bc6) + +commit 22351aeb5b2a6db5112493da1c29fe7fcafc33fa +Author: Kent +Date: Fri Oct 25 14:44:03 2024 -0500 + + lib/srdb1: Allow '/' in database URL passwords + + - Modify parsing of a database URL so that a '/' character is accepted + as a valid character in the password part of the URL. + + (cherry picked from commit 91abfdf6ebf942cbb0234be36812a9513f92f96b) + +commit 4291c952360e9607387a60cb807f4f5ea97f4042 +Author: Eik Rentzow +Date: Fri Nov 15 14:06:34 2024 +0100 + + siputils: generated icid-value too short + + - icid-value is only 17 charaters and not unique + - Re-parsing of generated PCV with icid-generated is 2 characters too short, + cutting generated-by value or creating false warning + + (cherry picked from commit 66350831872370a5a06f2ee44e8609ceb0164592) + +commit fed058976c845a9f6a96a06f074ea23f2a6162fc +Author: Daniel-Constantin Mierla +Date: Mon Nov 18 14:19:38 2024 +0100 + + core: socket info - relocate ip address conversion for log message + + (cherry picked from commit 5957ba50c8da1c543272643994190ba015221432) + +commit 1aa14dba39125d3736f4f41d6080e2ed1905debb +Author: Daniel-Constantin Mierla +Date: Sun Nov 17 02:18:29 2024 +0100 + + tm: exports get/set t/branch functions to intermodule api + + (cherry picked from commit da33e5bdefb45730f9b0536ec86d0ef7abc8e3d8) + +commit 8025e8f1cee8cf24c615a2aa8be7255fca3e0a05 +Author: Daniel-Constantin Mierla +Date: Fri Nov 15 09:44:54 2024 +0100 + + tm: backup/restor current T/branch for rpc reply commands + + (cherry picked from commit db2672636a9f029f624059eb6ef69db86a559ff1) + +commit b202ab5c1472edd98ee5bfc600d12e9339113eff +Author: Daniel-Constantin Mierla +Date: Fri Nov 15 09:36:32 2024 +0100 + + tm: rpc_cancel() switch to get/set T/branch helpers + + (cherry picked from commit ec30f5831ed3b6684715103b0242ed220e0159be) + +commit 366f33b341d30cd3bc52ad63e1ce918999e34077 +Author: Daniel-Constantin Mierla +Date: Fri Nov 15 09:33:52 2024 +0100 + + tm: small helper functions to get/set current T and branch + + - pair for coherent naming + + (cherry picked from commit 027ca1b2e1d0857ac039ff8fee9fecadd88bbda0) + +commit 2c37d7927769f316d33b3e0e9ecab9ae45799ea4 +Author: Daniel-Constantin Mierla +Date: Thu Nov 14 10:51:58 2024 +0100 + + tm: backup and restore existing T-references for rpc tm.cancel + + - GH #4011 + + (cherry picked from commit 879e074c4517cdda7bbdad343191dcfc9dedcb3c) + +commit 348f7118f86421bc4aaac8cc7d353be1f18d7ec6 +Author: Daniel-Constantin Mierla +Date: Thu Nov 14 09:57:52 2024 +0100 + + jwt: use JWT_VALIDATION_SUCCESS for validate check + + (cherry picked from commit 76b250c8b4c2b5bd81b5e776e9e726350bb65b7b) + +commit bda9e15d85dce8468a78858ca632749e9f4be9c9 +Author: Daniel-Constantin Mierla +Date: Wed Nov 13 14:58:16 2024 +0100 + + topoh: check if socket name is set for building sockets strings + + (cherry picked from commit 85456e17df760b3d716aa1207a59ef0c3a29b4b4) + +commit 143f96074618572829dae46bb59d08a704e34125 +Author: Victor Seva +Date: Thu Jan 9 19:54:43 2025 +0100 + + pkg/kamailio/deb: refresh files to include new kamailio@.service template + +commit 183c4d1168f10d73e16ba605f202077128dbbb95 +Author: Xenofon Karamanos <22965395+xkaraman@users.noreply.github.com> +Date: Wed Jul 3 15:32:13 2024 +0000 + + pkg: Add systemd template for starting multiple kamailio services + + (cherry picked from commit a8cb23903b271a1b78456fed5da8e10474aee405) + +commit f65cfc6d6de1c44a0e53bb28f3c38d0b490f7e1c +Author: Victor Seva +Date: Tue Jan 7 18:37:52 2025 +0100 + + db_redis: stop searching for keys if scan_key is set + + (cherry picked from commit 73914396c127529e7e0d58f3e92170891840cbc2) + +commit 1e6738e7f2c554ffa16e11125673c7ea4e092935 +Author: S-P Chan +Date: Fri Dec 20 09:02:49 2024 +0800 + + tls_wolfssl: update internal submodule to v5.7.4-stable tag + +commit 5981059909f6d767fcad60d639dbeff5f54bfe3f +Author: Nikolay Ivanuschak +Date: Mon Nov 4 22:58:44 2024 +0300 + + http_async_client: fixed crash on curl callback + +commit d01fbe59b386ad025466bd13d71495f4c765f85d +Author: Sergey Safarov +Date: Fri Dec 6 15:05:52 2024 +0200 + + pkg/kamailio/obs: added systemd template to start multiple kamailio services + + GH#3904 + + (cherry picked from commit b4ec854c0822a61790ea4fa1bc6387cddce4cf35) + +commit d33e4bc5fc8b8f482b740bb4fc63ff4c3d7e29ef +Author: Sergey Safarov +Date: Thu Nov 14 17:47:10 2024 +0200 + + pkg/kamailio: packaged jwt module [skip ci] + + (cherry picked from commit 2d745d21764485c725e2beea91b67cbda83c96f3) + +commit 6816f992696fe894b3a47cd511a59e1b5a0ed89b +Author: Victor Seva +Date: Fri Nov 15 11:09:34 2024 +0100 + + doc: update manpage with missing -B option [skip ci] + + (cherry picked from commit 77f03aabd871dbf86c5106a93eb32ce67d7762bf) + +commit 701ebefaf630cb7f6039f0030f66f736f384af69 +Author: Xenofon Karamanos +Date: Thu Nov 14 16:10:38 2024 +0000 + + tm: Fix log level + + (cherry picked from commit af0f0000c4755d01f668570bc6db71f2f534a5c0) + +commit 67c09d2e470797deb0ac1b28f38293afe3f8c074 +Author: Xenofon Karamanos <22965395+xkaraman@users.noreply.github.com> +Date: Wed Sep 18 12:04:10 2024 +0000 + + tm: move local-request event route to the right location to access CANCEL + + (cherry picked from commit ccc106922802213253f03f181d10fe83aa93da94) + +commit c08bade8f570e0505a2498131faded9785c7fae0 +Author: Xenofon Karamanos <22965395+xkaraman@users.noreply.github.com> +Date: Tue Aug 27 13:59:31 2024 +0000 + + tm: Emit request event when cancel is called + + (cherry picked from commit faca8e7a20255d90a4786fd4043005ead9dfc5df) + + +===================== 2024-11-12 Version 5.8.4 Released ===================== + +===================== Changes Since Version 5.8.3 =========================== + + +commit 7d216c69fa226a06f6163a2dd006ec798d57cd95 +Author: Daniel-Constantin Mierla +Date: Tue Nov 12 10:57:22 2024 +0100 + + Makefile.defs: version set to 5.8.4 + +commit f1b73eab3f6ab5221b65a260a9069a09535a6d86 +Author: Daniel-Constantin Mierla +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 +Date: Tue Nov 12 10:54:41 2024 +0100 + + pkg/kamailio/deb: set version to 5.8.4 + +commit 7c3b8823ce7ba1395e5b6c59c7e0c2aa0bbeb900 +Author: anmartan +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 +Date: Wed Nov 6 10:31:18 2024 +0100 + + modules: readme files regenerated - modules ... [skip ci] + +commit bf038a0a84bdecd69d749464880826f8c4b894e6 +Author: Henning Westerholt +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 +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 +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 +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 +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 +Date: Sun Oct 27 19:45:07 2024 +0100 + + timer: formatted exported structures + + (cherry picked from commit 8e2541ec6126b5665e92cde5eaf17f5a4970cb8d) + +commit 72f08c6fff97d3a2498498eb01ce6c11a8e9f41c +Author: Daniel-Constantin Mierla +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +Date: Mon Sep 16 19:37:03 2024 +0200 + + app_jsdt: add support for loong64 + + From: liuxiang + > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1060901 + + fixes #3976 + + (cherry picked from commit 5746db1c5a99eaeaf7f97d520232f014548c912d) + +commit 1cd3b749e699f2b83752a5b6c1b29f16084820d0 +Author: Daniel-Constantin Mierla +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 =========================== + +commit 38b407b353131b74032892e6eb0269731d00145f +Author: Daniel-Constantin Mierla +Date: Wed Sep 4 09:49:06 2024 +0200 + + pkg/kamailio: version set 5.8.3 for rpms and alpine + +commit 6b0e0e0dd0415077371a45a63dc00b13f9611d7e +Author: Daniel-Constantin Mierla +Date: Wed Sep 4 09:47:28 2024 +0200 + + Makefile.defs: version set to 5.8.3 + +commit abedff80d532b3b9896ff46fd28e1c9a68da0702 +Author: Kamailio Dev +Date: Wed Sep 4 09:46:17 2024 +0200 + + modules: readme files regenerated - modules ... [skip ci] + +commit 4f891e5343ba74b4ca459285438c2a064a363a60 +Author: Daniel-Constantin Mierla +Date: Tue Sep 3 18:08:44 2024 +0200 + + secsipid: docs update about libsecsipid installation + + (cherry picked from commit 7abbc93d8db807077ca2afc10b026be0835f4b65) + +commit 60423dbe90d3603fa98e0aaf161b7bef7f8b2a23 +Author: Victor Seva +Date: Fri Aug 30 12:52:46 2024 +0200 + + http_client: clang-format + + (cherry picked from commit fde8bd21dca9c8b45b314b04b21f742363f028b1) + +commit 6ee9bc2f34f9b20b576510e2e81a96bbfcc5a3be +Author: Daniel-Constantin Mierla +Date: Fri Aug 30 11:36:29 2024 +0200 + + sca: remove function name from log message + + (cherry picked from commit 4a57efa0f7ed2560420e10d0fe70037a14a12c12) + +commit d86350ea9078b89677323ac86053b0f37b7d1722 +Author: Victor Seva +Date: Wed Sep 4 09:30:26 2024 +0200 + + pkg/kamailio/deb: set version to 5.8.3 + +commit 9e0f6acc23313f5b25300660b6a4b75aab5bd168 +Author: Michel Pelletier +Date: Wed Aug 28 12:49:46 2024 -0600 + + app_python3: Fixes Kemi TypeError thrown when latency_limit_action is exceeded. + + Replace PyBytes_AsString(..) calls with calls to PyUnicode_AsUTF8(..) in the PY_VERSION_HEX >= 0x030B0000 block of apy_kemi.c. + The PyBytes_AsString expects a Bytes value but receives a Unicode value instead, thus causing the TypeError exception. + + (cherry picked from commit 6cae3661419d8d79fc8fb0463f6787b06911fa9d) + +commit 661b2670168530c21ee4dd23fcb29abf8b5bc3ba +Author: Daniel-Constantin Mierla +Date: Wed Aug 28 10:51:44 2024 +0200 + + usrloc: mark contacts with keepalive sent + + - properly detect if the contact record has to be expired or not + + (cherry picked from commit 6502872d35d9bd7043bf54cd1d640dd64ae87115) + +commit 2dbc8b5bf3353fdd3b05f265075e6a3cac8c02d4 +Author: Daniel-Constantin Mierla +Date: Tue Aug 27 14:30:17 2024 +0200 + + core: use defined type for flags inside build_req_buf_from_sip_req() + + - partial backport from 9ff1080cc6452343e6bc2de00350b2f7bcecf6d2 + +commit a9769ca3692f11fe36e86b29af37d94f9f0fc4c6 +Author: Andrii Pogrebennyk +Date: Wed Aug 21 11:17:40 2024 +0200 + + pua_reginfo: free pkg memory after getting the content of each XML attribute + + - free the memory from the state XML attribute that was returned and immediately + used in another function call without freeing leaving one small mem leak; + - add comments but keep the dead code regarding parsed but unused attrs. + + (cherry picked from commit ed6730aa64e0e7c1580584d6f808e76a665e5882) + +commit 6a22677e281de00dc0088ad23d7c7a5ca6e69f84 +Author: Victor Seva +Date: Thu Aug 22 11:20:17 2024 +0200 + + pua_dialoginfo: reformat exported structures more human friendly + + (cherry picked from commit 748da56717800c36c43bb6fe3739011f3d3105e0) + +commit b2bfdd8eb6b40b1e70a2876cee46890813a0c699 +Author: Victor Seva +Date: Thu Aug 22 11:06:47 2024 +0200 + + pua_dialoginfo: add section ID's to documentation + + (cherry picked from commit aba56a5aa3b8fa4f07d0c52cd7fd2d56103ca56c) + +commit f32d67f1b4b08a8cc8dbae917e1a2d0c08adeb93 +Author: Daniel-Constantin Mierla +Date: Sat Aug 17 17:08:31 2024 +0200 + + msilo: removed duplicatred exported function + + (cherry picked from commit b712ddc4db9a9c1bb30b236a0a86082108b23f07) + +commit ee5853b4eab6553821113ff64e9eed24a5c9d6b7 +Author: Daniel-Constantin Mierla +Date: Sat Aug 17 16:30:21 2024 +0200 + + msilo: added fixup free functions to exports structure + + (cherry picked from commit b6dea98ada293a3bbad004aa1b194d4bf44a60ab) + +commit e9d5d37271e03cdec6cf87647e488c3b4f175258 +Author: Daniel-Constantin Mierla +Date: Wed Aug 14 18:37:06 2024 +0200 + + phonenum: add fixup free functions to exports structure + + (cherry picked from commit 7d2fd09103680454aaaba30f5e46f83b362513eb) + +commit 92e999228eb75856911386d280ab48389aeb7d3f +Author: Daniel-Constantin Mierla +Date: Tue Aug 13 21:01:51 2024 +0200 + + phonenum: export match_cn() to kemi + + (cherry picked from commit e9dd041ce6af9ee4b9cc2e29b4417787a8056776) + +commit 57b9c66cb7811c045caceb2f61047e07a108aabc +Author: Morten Tryfoss +Date: Mon Aug 5 12:14:04 2024 +0200 + + cdp: Error log caused crash + + (cherry picked from commit 4aaaca60ef2207100dd3f4e16ae63428aadc7dc5) + +commit a024fb3c028b8df18a9b855fff99bcddc3a61ef2 +Author: Daniel-Constantin Mierla +Date: Tue Jul 30 09:07:36 2024 +0200 + + corex: switch to unsigned long long for iflag lookup + + (cherry picked from commit 072c44330297c653675b5078fb0facdc399a5ab4) + +commit d102f40856512d2c51707bf5ec5a6c949c550890 +Author: Daniel-Constantin Mierla +Date: Tue Jul 30 08:55:08 2024 +0200 + + corex: proper check for iflag lookup return code + + (cherry picked from commit fdb0ef987ca2b013104b06ece006f67bf8ae07d3) + +commit e14522cab01eba9c5fa636a7c0f6ed40200c6871 +Author: Daniel-Constantin Mierla +Date: Tue Jul 30 08:44:03 2024 +0200 + + corex: small formatting of iflag list + + (cherry picked from commit 70606e3ea575228b3ccc662d6f9048aa0eb899ce) + +commit 2e4920fd292b6f1d064a75503dd3be3ca27fdeb5 +Author: Daniel-Constantin Mierla +Date: Mon Jul 29 10:07:43 2024 +0200 + + cplc: use long long constants for operations + + (cherry picked from commit 49a9c0a0f391c2e9fc45dff7c37a087dde0f7ba3) + +commit bc8ea1022718c94fbdf9bb93c35759e1a6ce3cde +Author: Daniel-Constantin Mierla +Date: Sun Jul 28 18:44:45 2024 +0200 + + core: tcp - use long long constants for operations + + (cherry picked from commit fc2f34e8bab022b0c99e8313aee3e4a87c1f2e52) + +commit 1eb7db2f18724b91d18c6b30b529b51117d176b0 +Author: Daniel-Constantin Mierla +Date: Sat Jul 27 18:16:40 2024 +0200 + + db_berkeley: buffer size set to the argument of strftime() + + (cherry picked from commit e86d6ee30227a3fc5cff98e7983d4a80f0c42c4b) + +commit dfc2531cf7db70e315613b3242d1b5b41ac20857 +Author: Daniel-Constantin Mierla +Date: Fri Jul 26 19:49:57 2024 +0200 + + core: cfg select - check res when getting the variable + + (cherry picked from commit 3333611a3ef9078cbcb9867db88921f0c48fce1b) + +commit bbfb24d3cb841b37e6e1b84892b68daf6c237c46 +Author: Daniel-Constantin Mierla +Date: Fri Jul 26 19:00:29 2024 +0200 + + xprint: return on mod init error case + + (cherry picked from commit 660a019263b81d318700c205531bf4e042c912cf) + +commit f8201e6d4848081a2dd564e0d5b216fca47ef3f0 +Author: Daniel-Constantin Mierla +Date: Thu Jul 25 10:58:40 2024 +0200 + + janssonrpcc: free new servers list on error + + (cherry picked from commit b4efe7725728392d0c8921c006d6fbc6455e9b8f) + +commit 61eb4fe44e66a952ba14e39e1c664878ef52919d +Author: Daniel-Constantin Mierla +Date: Thu Jul 25 08:44:15 2024 +0200 + + core: cfg select - check res before initializing + + (cherry picked from commit a6c415713bb209b03ff110d4ae891173d04ac471) + +commit 5baf49a179194ba0eaa5e7f4caba613c72859b0c +Author: Daniel-Constantin Mierla +Date: Wed Jul 24 10:43:18 2024 +0200 + + jsonrpcc: declare variables are the beginning of function + + (cherry picked from commit 7ba313f6f96ffa6042c163027c0c7bb65106fef7) + +commit c447bf60d528d8fdc1f5aee52a796ed5f77b2f5a +Author: Daniel-Constantin Mierla +Date: Wed Jul 24 10:37:21 2024 +0200 + + jsonrpcc: free allocated pkg buffer on error + + (cherry picked from commit 796bcc038d7885e01dbad34abc68bf612062c533) + +commit f57accd1820b26b40f14d420465402188cb13df1 +Author: Daniel-Constantin Mierla +Date: Tue Jul 23 11:57:48 2024 +0200 + + erlang: init xavps for safety destroy on error + + (cherry picked from commit 29510872607deb3238411b358c422d004fb307b7) + +commit e016d1ada08edca0adacd42ffa67ffd3c8c2c384 +Author: Daniel-Constantin Mierla +Date: Mon Jul 22 11:01:16 2024 +0200 + + utils: jump to error on pkg allocation failure + + (cherry picked from commit 34749ab13b31504358761c964f794b283931394c) + +commit dd4d5e44a60a658772e8288d94193596f7a982a7 +Author: Daniel-Constantin Mierla +Date: Sun Jul 21 22:41:45 2024 +0200 + + tls: check lenght when parsing pv alt name + + (cherry picked from commit 79a668b8bdb0e085adb3581d718e5fd5ae73e2e4) + +commit 4732a4a88df9f4cbd2260564b94269157b3c0647 +Author: Daniel-Constantin Mierla +Date: Sun Jul 21 22:23:29 2024 +0200 + + tls: remove uselss pv format parsing in pv_parse_alt_name() + + (cherry picked from commit 7c06997a1b6e77ae0642d369f532219dc35ef8e0) + +commit e006c2c53d6b013253f6a95b96c0f81f016bc440 +Author: Daniel-Constantin Mierla +Date: Sat Jul 20 20:02:07 2024 +0200 + + xprint: check to avoid double free + + (cherry picked from commit 5a1f80f266069dbc453b44a856f225c254e7c050) + +commit fa8f0a401980f5dccdfe35983fb5b55040ef9e9c +Author: Daniel-Constantin Mierla +Date: Fri Jul 19 19:59:20 2024 +0200 + + topoh: 0-init alocated structures + + (cherry picked from commit dc71c0a5791ebc1306648b5ed338613050e32f5c) + +commit 39d4d48abf9e3e2e1edd2f22780fb1bf233c9697 +Author: Daniel-Constantin Mierla +Date: Fri Jul 19 19:53:47 2024 +0200 + + core: removed unnecessary destroy + + (cherry picked from commit 20f2096d314253e7e74688da664de2830289a276) + +commit 445659c38bd54e26d085d8c5b07bfb8edba7762e +Author: Dennis Yurasov +Date: Thu Jul 18 13:48:42 2024 +0300 + + tcpops: fix memory leak in $tcp(conid) + + - reference counter to tcp session not decremented, so shm for session never free + + (cherry picked from commit acf50d86b502af36e3635d61745feaa5c577231d) + +commit 7ca33c475b52703216f7d8d4e6c78530a8d7e723 +Author: Daniel-Constantin Mierla +Date: Thu Jul 18 12:29:05 2024 +0200 + + core: remove unnecessary check after using the structure + + (cherry picked from commit 84ea36b4b79c07c4fc0a8c9e119184433353764e) + +commit d69e65fa4e9448701729ac8f41b069dad294a51e +Author: Daniel-Constantin Mierla +Date: Thu Jul 18 12:17:10 2024 +0200 + + core: set digit 0 in the md5 buffer in case of error inside char_msg_val() + + (cherry picked from commit 15b2a5467f11e009ae4efad1ee29af860326095f) + +commit 92a3cc4549073d70b1b229149b29017e3a9cf06f +Author: Daniel-Constantin Mierla +Date: Thu Jul 18 12:00:47 2024 +0200 + + core: init res inside select_cfg_var() + + (cherry picked from commit a471d34d6162387a1427f5d0c5b3c6079a2b0bdc) + +commit b307c7eb8e58b43dca41deb3493b0888ec7e9aa4 +Author: emvondo <106535097+emvondo@users.noreply.github.com> +Date: Thu Jul 18 09:10:33 2024 +0100 + + siprepo: fix int params and wrong copy data in siprepo_msg_async_pull (#3919) + + * siprepo: fix int params and wrong copy data in siprepo_msg_async_pull + + --------- + + Co-authored-by: emvondo + (cherry picked from commit a3a63655dbcbf1bc8067f34c36f4a7295b2a1745) + +commit 0ffd281b77ac48f24c04655cd962b4870ee00ba3 +Author: Daniel-Constantin Mierla +Date: Wed Jul 17 13:56:30 2024 +0200 + + dispatcher: remove reference to MI in comments + + (cherry picked from commit 8c3b5ab3818c86b90b02e20aa4631654e0b51745) + +commit fc29c81bbc6e3fb0709e3367e2f1d803b2bf0669 +Author: Daniel-Constantin Mierla +Date: Tue Jul 16 08:27:42 2024 +0200 + + core: remove unnecessary cleanup when locating a module + + (cherry picked from commit eda03789f693bb72ec4ee05a8b2b4723e5080504) + +commit 89339b1fa6f08024a44d898ed9877f08911e4f68 +Author: Dragos Vingarzan +Date: Fri Jul 12 13:30:41 2024 +0200 + + nathelper: fixed handle_ruri_alias() for alias being an IPv6 + + (cherry picked from commit 52ab6f3dcf5ad8d967be8bdecaa64ef31cbfbe33) + +commit 743ebe918b89a42ce94b10fb9dc2fe2a807eb88b +Author: Daniel-Constantin Mierla +Date: Sun Jul 14 09:00:01 2024 +0200 + + evrexec: remove unnecessary safety exit loop + + (cherry picked from commit d5076b557728b3f9d80df391ae71e2eab2c896dc) + +commit ffa4eeded62507f15e4e9b26aa5b3ba519fa6513 +Author: Daniel-Constantin Mierla +Date: Fri Jul 12 12:05:40 2024 +0200 + + pua: use long for time value diff operation + + (cherry picked from commit fc8bee5b87e95e43bda2635e65457b2025eab6f9) + +commit a3f40f3c407d34b25717416b3ac500e61f9300cb +Author: Daniel-Constantin Mierla +Date: Fri Jul 12 11:49:10 2024 +0200 + + rls: remove unnecessary assignment + + (cherry picked from commit c97145862119e9001874cd07de9b20ad8e96ff54) + +commit e11c132cbf57ea1ae6289e734f601104ba83fc25 +Author: Daniel-Constantin Mierla +Date: Fri Jul 12 08:06:36 2024 +0200 + + stun: check message len for response + + (cherry picked from commit 87e1a4a7f5d565a59a362f22e9372697f2f2f2af) + +commit 164d1ecca7e94beba24013f31276bdc1f2ee04a1 +Author: Victor Seva +Date: Thu Jul 18 17:26:33 2024 +0200 + + sipcapture: add missing headers for inet_ntop() + + fixes #3927 + + (cherry picked from commit fe505c9654541ec60f14e5a50896bb11751e61e4) + +commit 685f45c4adf911ac41c14b55ad36dd4b8b51897c +Author: Victor Seva +Date: Thu Jul 18 13:40:24 2024 +0200 + + dialplan: remove pcre2_free() warning + + related to #3851 + + (cherry picked from commit 70563ca0629a8de5aa5427b003f441e6c3a40c6a) + +commit 64a01ebec255ece59be3683bab421b35505d745d +Author: Victor Seva +Date: Thu Jul 18 13:38:10 2024 +0200 + + lcr: remove pcre2_free() warning + + related to #3851 + + (cherry picked from commit 310b631007082f553117d126b6b9bd915be596ac) + +commit 1946e35c4d144fba3067d3fee5d1bd030dc4a609 +Author: Victor Seva +Date: Thu Jul 18 13:36:09 2024 +0200 + + regex: remove pcre2_free() warning + + related to #3851 + + (cherry picked from commit b86030cfbd66ba95f33f312595edae29e2b5cde0) + +commit dbe51dc4ee53f6e4f00450745db709a9d741c481 +Author: S-P Chan +Date: Tue Jul 9 10:53:07 2024 +0800 + + db_mysql: fix check for enum MYSQL_OPT_SSL_CA for CentOS 7/5.5.x + + - MYSQL_OPT_SSL_CA is an enum not a macro + - base check on MYSQL_VERSION_ID - 50568 used in CentOS 7 + + Addresses #3910 + + (cherry-picked from commit 92cfedaaffb034db536f3bcf68695b433db92706) + +commit 3161964efba19e5e7bd730bf656d019cac2c6ed8 +Author: Kamailio Dev +Date: Mon Jul 1 09:16:18 2024 +0200 + + modules: readme files regenerated - modules ... [skip ci] + +commit ca3d4b3515024732805038509dd0d9f0b60ab273 +Author: Daniel-Constantin Mierla +Date: Thu Jun 27 10:07:11 2024 +0200 + + cnxcc: check if final pulse is 0 + + - avoid dividing with it in such case + - GH #3859 + + (cherry picked from commit 7061a79fe64066dd5a6598e38d714bd40bf2eabc) + +commit f59f980d03b884f2494892eb4d007293b7ad4e34 +Author: Daniel-Constantin Mierla +Date: Wed Jun 26 07:22:38 2024 +0200 + + core: dns cache - check warnings made debug + + (cherry picked from commit 754f9ae28c9a731fc0bfd6d08411bf0913a7dbfc) + +commit 4fa5fc10370d81d534d75b034322a6250c7e2557 +Author: Daniel-Constantin Mierla +Date: Mon Jun 24 10:22:25 2024 +0200 + + core: removed duplicated break + + (cherry picked from commit 588b9c710b6555371bc8bbee21e474466bb099dd) + +commit 70cf3ebd2b52c341a90c9b9b6149985667a6b96c +Author: Daniel-Constantin Mierla +Date: Sat Jun 22 17:52:34 2024 +0200 + + textopsx: docs - note about @hf_value2 select + + (cherry picked from commit d13c741d90c3887cdf144a9094a78c0c7cb9856d) + +commit 7bf787d00f9f7ed8a2d758219d6d1413b2b5c975 +Author: Dragos Vingarzan +Date: Fri Jun 21 10:54:36 2024 +0200 + + textopx/doc: fixed hard-to-read documentation for textopsx + + - was missing line-wraps in examples list, hence very hard to read + + (cherry picked from commit 48d97c1941f660aa396b5ef100584611cf92ad21) + +commit 4c75991aa662bddc1bbe65c83f7861cb72a65a61 +Author: Victor Seva +Date: Wed Jun 19 15:00:12 2024 +0200 + + db_mysql: switch warn to dbg for log messages for opt_ssl_ca option + + fixes #3884 + + (cherry picked from commit be5172a84b02a1ab4fc7e97e7dc0813056302bdd) + +commit ec27c0207a364fd4f563707b740877ab77bfb5a5 +Author: Victor Seva +Date: Wed Jun 19 10:12:10 2024 +0200 + + rabbitmq: don't try to use ssl_socket functions to a tcp_socket + + fixes #3883 + + (cherry picked from commit 3a803770d4fb80347ba70dac94625b0e9aeab44d) + +commit e430a7b5eac9311cde1ea6a4d6f9fddacebe7302 +Author: Kamailio Dev +Date: Wed Jun 19 11:16:19 2024 +0200 + + modules: readme files regenerated - modules ... [skip ci] + +commit 7360ab7fbe672259c7433b1a5199467d24183d79 +Author: Daniel-Constantin Mierla +Date: Wed Jun 19 10:43:12 2024 +0200 + + db_mysql: switch warn to dbg for log messages for opt_ssl_mode + + - GH #3884 + + (cherry picked from commit 8f98317e92da61160a1c416e0da45938a205d358) + +commit 1a6907f11b1c8455c14cd24f3a55aff7a3aa0184 +Author: H.Yavari +Date: Tue Jun 11 13:21:32 2024 -0700 + + ims_usrloc_pcscf: Update the module document + + - Fixing the db_url param value from int to string in admin document. + + (cherry picked from commit 04e065af3d46e4b0def5ed3de6502442466f04bc) + +commit 9cbe3176f5c8c298956ed2d4b83818ceb64af528 +Author: H.Yavari +Date: Tue Jun 11 13:05:00 2024 -0700 + + ims_icscf: add missing documents for database params + + - Adding missing ims_icscf database parameters to admin documents. + - Change the default value for ims_icscf db_url to Kamailio default db_url value. + + (cherry picked from commit 57087e42f1b1cae86132c558aa9497f4839af7e0) + +commit c73ea949c046697916fd86eaf614b59075264b73 +Author: herlesupreeth +Date: Tue Jun 4 10:44:34 2024 +0200 + + ims_ipsec_pcscf: update security params of newly created ipsec tunnel in contact + + (cherry picked from commit bf863877f666dd8350e855bf933270b2fd8ad0fd) + +commit f861301003d96fec599bef936c2e1f181b170d9f +Author: herlesupreeth +Date: Tue Jun 4 10:43:52 2024 +0200 + + ims_registrar_pcscf: fix typo in comments + + (cherry picked from commit d17b97a864585782e03eedada6d226550630f7bb) + +commit 2606c4e07e598ea41cb5a8814e3587bf49f94c1e +Author: Dennis Yurasov +Date: Thu May 2 12:28:11 2024 +0300 + + siptrace: add SND_F_FORCE_SOCKET flag if send_sock_name/send_sock_address config parameters are used + + - send_sock_name/send_sock_address is ineffective for tcp based transports if SND_F_FORCE_SOCKET flag is not set + + (cherry picked from commit 1b97a0271b27794263b3eff61f4acfa81e66069f) + +commit be76a51422df3294c533accae1b6a621ee9d3a7d +Author: Victor Seva +Date: Wed Jun 12 10:13:56 2024 +0200 + + tls: remove confusing error message when trying to print socket for server + + > CRITICAL: [core/ip_addr.c:232]: ip_addr2sbuf(): unknown address family 0 + > NOTICE: tls [tls_domain.c:1176]: ksr_tls_fix_domain(): registered server_name callback handler for socket [:0], server_name='' ... + + (cherry picked from commit 87c8290ab934fd27f8baebabaf66d1fb4168ba72) + +commit bdb3f32991f756b852d4bc695dc44e634e5ffc6c +Author: Victor Seva +Date: Thu Jun 13 18:21:47 2024 +0200 + + pkg/kamailio/deb: refresh fix for tls_wolfssl + +commit 65873cd2cdd390ce10ec99888fb35b0095a90c65 +Author: Victor Seva +Date: Thu Jun 13 17:01:36 2024 +0200 + + pkg/kamailio/deb: fix tls_wolfssl packaging + + * packages can't have '_' in name + * distinguish grp module and deb module name + '_' => '-' so tls_wolfssl => tls-wolfssl + + (cherry picked from commit 1d82805ef084d90e5ea14e4894f3e5076e29e2f3) + +commit 8a027b99cf8dc4f7e889aa7644f1f7699c7cb08e +Author: Daniel-Constantin Mierla +Date: Wed Jun 12 16:21:34 2024 +0200 + + core: tcp - change log levels for failing to set source for tcp connections + + - it is not possible always and it can fill the logs + + (cherry picked from commit 15403a543d83e337ee578ad37dc1d84316e4cf16) + + ===================== 2024-06-12 Version 5.8.2 Released ===================== ===================== Changes Since Version 5.8.1 =========================== @@ -31,7 +2855,7 @@ Author: Xenofon Karamanos <22965395+xkaraman@users.noreply.github.com> Date: Fri Jun 7 14:00:43 2024 +0000 pua_dialoginfo: Fix ruri length - + (cherry picked from commit 2c7c2d215ec9277fa706053579a38f058f15ae85) commit ed0cdf3a3c85a8d05aacec8917fe35a24dcdd62e @@ -39,7 +2863,7 @@ Author: Bastian Triller Date: Fri Jun 7 13:24:17 2024 +0200 ims_ipsec_pcscf: Fix typo - + (cherry picked from commit 16e1b38fcc1593ad09eb03d86cd056ab8ff7f7f7) commit 5571ea0ff8877a8a19b3fb76030af19b59f141db @@ -47,7 +2871,7 @@ Author: Daniel-Constantin Mierla Date: Tue Jun 4 16:29:50 2024 +0200 dmq_usrloc: reformat exported structures - + (cherry picked from commit e94812149c6f2867a5b23f1218a9af139590bf51) commit e8dc8506dbc4d8964e02c3be175d7f18f5fe69a4 @@ -55,7 +2879,7 @@ Author: Xenofon Karamanos <22965395+xkaraman@users.noreply.github.com> Date: Tue Jun 4 09:37:01 2024 +0000 nathelper: remove magic constant - + (cherry picked from commit 3d187336f22e30800acefd28e4d0f98e0f677a49) commit eb4ec6f9305e334d9749e1fd56ad195c383cef77 @@ -63,7 +2887,7 @@ Author: codenot Date: Wed May 29 10:10:28 2024 +0800 nathelper: fixed handle_ruri_alias_mode(1) cannot proper handle multi alias - + (cherry picked from commit 8e0b2e4b6450fa50bd573fa013dc888aaaccd2bf) commit 5999529be9ac2187dad465518bea3dee1b06d0f7 @@ -71,7 +2895,7 @@ Author: Xenofon Karamanos <22965395+xkaraman@users.noreply.github.com> Date: Fri May 24 08:03:49 2024 +0000 core/resolve: Check dns_cache_init and choose appropriate functions - + (cherry picked from commit 06d583e356351ae9d8a559c9f5de3e57fb128a38) commit eb4a8e326b10d0c3e922cc524d8f46d2ba7e6eff @@ -79,9 +2903,9 @@ Author: Daniel-Constantin Mierla Date: Sun Jun 2 21:28:19 2024 +0200 iims_registrar_scscf: include header for common c functions - + - GH #3855 - + (cherry picked from commit b508ef253cf996a5efd8bf13ded0c804f3557ada) commit 54f9adb03ebbacf35eb0785dc46b55ce5dd00deb @@ -89,11 +2913,11 @@ Author: Bastian Triller Date: Mon Jun 3 08:48:40 2024 +0200 geoip2: Reload database before accessing it - + Re-add reloading of database. - + GH #3861 - + Fixes: 293193c55c ("geoip2: clang format module file") (cherry picked from commit 51dcab019a42e5b1f3b81247ca71ffcaf46180de) @@ -102,7 +2926,7 @@ Author: Daniel-Constantin Mierla Date: Sun Jun 2 04:58:23 2024 +0200 geoip2: clang format module file - + (cherry picked from commit 293193c55caaf5d0c39dc456babe92f574b58b3b) commit 45f2e2670a3eac768b97b58eeec228b06273050a @@ -110,11 +2934,11 @@ Author: Daniel-Constantin Mierla Date: Sun Jun 2 04:51:33 2024 +0200 geoip2: keep global structure per process - + - parsing db file allocates private memory - reworked reload to rely on a global counter - GH #3861 - + (cherry picked from commit baccbe0298f9fa46db285505bc4386f997de5a47) commit ae3be6af4ea8d50c29fe8e523c9548217956849a @@ -122,7 +2946,7 @@ Author: Daniel-Constantin Mierla Date: Sat Jun 1 07:50:45 2024 +0200 geoip2: rename global lock variable - + (cherry picked from commit 4bd619d3517f129362de3ce50eed2620d5002b42) commit 2cc901e8be63791432a49f87d434eeb009e48d28 @@ -130,9 +2954,9 @@ Author: Daniel-Constantin Mierla Date: Sat Jun 1 07:39:54 2024 +0200 geoip2: do not close global MMDB_s on destroy - + - GH #3861 - + (cherry picked from commit e066613cac308d1129baebc47d7c245b36eba4b0) commit 614b5601170578c2d0eb79e7e5c64e68d80d885b @@ -140,7 +2964,7 @@ Author: Daniel-Constantin Mierla Date: Fri May 31 19:23:41 2024 +0200 geoip2: init MMDB_s global pointer and check on destroy - + (cherry picked from commit 8ba4ee4e00798ca015adc48542d0e4de8ed9daad) commit 5c9c13080be2b15252492dca388777d06915045c @@ -148,13 +2972,13 @@ Author: Victor Seva Date: Thu May 30 16:24:03 2024 +0200 regex: fix pcre2 migration - + instead of reserving an array in pkg_mem and later copy the pointers to shm_mem just use shm_mem in the first place. - + fixes #3812 - + (cherry picked from commit d89333748662c0e7c72e3579d41fd14ef05c0fee) commit ebc8acef7617a69dcc06b163c47e88a99d835f9e @@ -162,9 +2986,9 @@ Author: Daniel-Constantin Mierla Date: Wed May 29 10:18:44 2024 +0200 siputils: free head of params list for get_uri_param() - + - GH #3857 - + (cherry picked from commit 8363208fff7c101a2779ff64783e5b7dbf8ffd7c) commit 833b93563f43fa95e4bfdd175b144670b66a11cd @@ -172,9 +2996,9 @@ Author: Daniel-Constantin Mierla Date: Wed May 29 10:15:21 2024 +0200 siputils: free head of params list for get_uri_param() - + - GH #3857 - + (cherry picked from commit d72a3fbc903da02ae3b26f3aae2ea228c9f8b255) commit f4eea76a15b220b15337b60a77f7978b0694b0fd @@ -182,7 +3006,7 @@ Author: Bastian Triller Date: Tue May 28 14:17:58 2024 +0200 rtpengine: Fix extra process in pkg.stats - + When DTMF events socket is not configured, pkg.stats RPC method returns an empty entry. { @@ -196,7 +3020,7 @@ Date: Tue May 28 14:17:58 2024 +0200 total_frags: 0 desc: } - + Fixes: 26f6e57c8f ("Register a new worker process for dtmf event listener") (cherry picked from commit e67f6048f4883d446df2d88fe7a7d7f2ff6daf8c) @@ -205,7 +3029,7 @@ Author: Daniel-Constantin Mierla Date: Tue May 28 11:45:37 2024 +0200 htable: error on not finding htable in pv get - + (cherry picked from commit 24b27214231166366cceb88fcb3724298cc53b32) commit 9a7e3e54f1c52ee69c68b1165de115894c2afc55 @@ -213,7 +3037,7 @@ Author: Daniel-Constantin Mierla Date: Mon May 27 09:11:48 2024 +0200 htable: error on not finding htable in pv set - + (cherry picked from commit 82cfea317fd8d02a6c94347bc1be18c8a06e580f) commit deb11ee814e1591698d120a113630aa7a9791ad7 @@ -221,10 +3045,10 @@ Author: Rick Barenthin Date: Thu Apr 25 19:16:58 2024 +0200 usrloc: delete location_attrs in db_only mode on delete_urecord - + When calling delete_urecord in DB_ONLY mode the location_attrs are not deleted. This fix makes sure to delete location_attrs when calling db_delete_urecord is called. - + (cherry picked from commit 6b8f6d3b5d563d91234b8d4b7e155b7e74b9d313) commit d53843c75da9115a9c3cb6b1b909fd3827b6c437 @@ -232,7 +3056,7 @@ Author: Sergey Safarov Date: Sat May 11 17:45:08 2024 +0300 db_mysql: fixed build on CentOS 7 - + (cherry picked from commit 767b3faee3af450d6482b919c81431ea6d707807) commit 5c4f687d0ed06d6c7a5696917982b1cf03f9c8bd @@ -240,9 +3064,9 @@ Author: Daniel-Constantin Mierla Date: Fri May 10 12:45:25 2024 +0200 sipcapture: use local static buffers for ip address and port - + - GH #3835 - + (cherry picked from commit d1f377ff23f491bfd5162cb7bf510759440dd8e5) commit f9bd2c5a4341913ac3e887e0324a19d5cd071a12 @@ -250,7 +3074,7 @@ Author: Daniel-Constantin Mierla Date: Thu May 9 08:17:15 2024 +0200 tcpops: reformat exported structures - + (cherry picked from commit 9b087fd618ab6c5cbd6a29c352b09c7198f1b594) commit c8e4fe87985a413dfe6871463c31375750d3a6f2 @@ -258,9 +3082,9 @@ Author: Victor Seva Date: Thu May 30 14:59:05 2024 +0200 dialplan: don't call free on empty pcre pointer - + fixes #3851 - + (cherry picked from commit 630a6f2c11c10c4f3be3570553d86486942d60fe) commit c1c8c066b29798189a50dd9b4f27c5af574d991d @@ -268,7 +3092,7 @@ Author: Xenofon Karamanos <22965395+xkaraman@users.noreply.github.com> Date: Mon Apr 29 13:37:24 2024 +0000 db_cluster: Update log levels - + (cherry picked from commit 467dbf3e1be16d5a760178d0801834ac67bad888) commit 3a34b468ad93904c507bd0fc7ef592b25321807f @@ -294,7 +3118,7 @@ Author: Henning Westerholt Date: Tue May 7 16:14:46 2024 +0000 sipcapture: fix default DB URL docs - + (cherry picked from commit aeeeb0c2f46c2575639dd725bef78fac64219a07) commit c3f424bd6c0f8b9a2557cd58a3e3f5ac586d8c99 @@ -308,7 +3132,7 @@ Author: Daniel-Constantin Mierla Date: Tue May 7 19:32:39 2024 +0200 tcpops: note about execution of event routes by TCP main process - + (cherry picked from commit be9af338e3afdab1045cdd7c30a72a9ecddcb680) commit 1ee553a6f406af5eb4838a8c46a992c4099dd30b @@ -322,9 +3146,9 @@ Author: Daniel-Constantin Mierla Date: Tue May 7 16:55:24 2024 +0200 ctl: info log on ECONNRESET (connection reset by peer) - + - not a type of error that can be controlled by kamailio - + (cherry picked from commit 446c75e0e2194b6e42d768d2e3c79b5f0222905f) commit 24e43d27544bdfa1acfce7ebb8b6e3ba7841fc13 @@ -332,7 +3156,7 @@ Author: Daniel-Constantin Mierla Date: Tue May 7 16:49:49 2024 +0200 ctl: removed level and function names from log messages - + (cherry picked from commit 65bafaffd6bcfebc508b774cfbb78120e68bb3f0) commit 11f0cfec4d2fc6043d282cdb2258520559f0fcd1 @@ -340,7 +3164,7 @@ Author: Daniel-Constantin Mierla Date: Sat May 4 20:18:18 2024 +0200 core: parse/contact: jump to error on too many contacts - + (cherry picked from commit f69b22d44cb5abc803c2b58790dd33f2310c1c59) commit d75dba611808322356fc8d1ebc9f8c30b4124a15 @@ -348,7 +3172,7 @@ Author: Daniel-Constantin Mierla Date: Fri May 3 14:57:47 2024 +0200 core: parser/contact - basic validation tests for contact uri - + (cherry picked from commit fc52a54370c085d6fa951da876eee99580677922) commit 5b97d29f1bbac2656eba506c7fd94b412dfb9b7f @@ -356,9 +3180,9 @@ Author: Daniel-Constantin Mierla Date: Fri May 3 14:36:29 2024 +0200 core: parser/contact - add limit for max number of contacts - + - defined to 256 - + (cherry picked from commit d6b0beb5a219ae57a62e9e7201a6ec1fe66e5a96) commit 244319c67a191cf1f093b2220fa1a8579179d734 @@ -366,7 +3190,7 @@ Author: Daniel-Constantin Mierla Date: Thu May 2 09:27:41 2024 +0200 pua: check if local requests are dropped and free the param - + (cherry picked from commit 53e1a29c265df1489c9bd91deddc0719f8ca2092) commit 46c8e1a5b0e11162eee2c0b201bb535529397a0a @@ -374,7 +3198,7 @@ Author: Daniel-Constantin Mierla Date: Wed May 1 07:00:58 2024 +0200 uac: check if local requests are dropped and free the param - + (cherry picked from commit 00aac8d48370fac356eecff535835d918c631cc5) commit 965a02ba4aca9283e4f43f8153ebeb81721835f1 @@ -382,10 +3206,10 @@ Author: Daniel-Constantin Mierla Date: Wed May 1 06:20:43 2024 +0200 presence: check if the local notify was dropped in event route - + - free tm cb parameter on drop - related to GH #3403 - + (cherry picked from commit d12fc31056cb37aac347ec05f9ada7bafa5f52de) commit e54b03fc41bc55486430b09d9a4839bcd52278fa @@ -393,7 +3217,7 @@ Author: Daniel-Constantin Mierla Date: Wed May 1 06:08:28 2024 +0200 pv_headers: print also the new TMCB_LOCAL_REQUEST_DROP in debug function - + (cherry picked from commit 68624c2da093ab789d4e8d35df65ef1bce024bca) commit a86d7d2bad119fc4cccf5c19719b4457ab066a04 @@ -401,7 +3225,7 @@ Author: Daniel-Constantin Mierla Date: Wed May 1 06:07:26 2024 +0200 tm: cb_flags made unsigned for uac_req - + (cherry picked from commit ebd1c6c75a1b832ce85d576aad134b99d47b5738) commit f9ca6854d88e4fcc161e1083a953f47142fca90d @@ -409,7 +3233,7 @@ Author: Daniel-Constantin Mierla Date: Wed May 1 05:57:46 2024 +0200 tm: cb flag to mark local uac on request drop - + (cherry picked from commit f5da773c5fa29edbf9d0e65a83a62f495928ddec) commit fc54fdcd67e244ad075c54b5f24bb6442998b4cb @@ -417,9 +3241,9 @@ Author: Daniel-Constantin Mierla Date: Wed May 1 05:28:18 2024 +0200 tm: free new buffer on drop for local requests - + - GH #3403 - + (cherry picked from commit ee06666c43d96029315dae7618e10d381265a85a) commit 3aac0c7379577480fb09902bfb31b9aed49e7f88 @@ -427,7 +3251,7 @@ Author: Jannik <40364587+volkland@users.noreply.github.com> Date: Tue Apr 30 12:28:20 2024 +0200 sipcapture: docs - fix default value for parameter - + (cherry picked from commit 265c948286f2df5136179c95fbb1d7f1255e4c71) commit 4e98a4ae06ec0bbff408af211680c97e1f41ca11 @@ -435,7 +3259,7 @@ Author: Daniel-Constantin Mierla Date: Tue Apr 30 10:19:35 2024 +0200 ims_ipsec_pcscf: cascade on options to get the uri for fill_contact() - + (cherry picked from commit 60d2ab6464657abf38136a771c297c6f5536e27a) commit 4b3620d0f0d7d636bf1d9e4c2b19bf50b8ac9da0 @@ -443,9 +3267,9 @@ Author: Alexander Couzens Date: Mon Mar 4 17:33:50 2024 +0100 ims_registrar_scscf: free_uint_fixup: fix memleak/freeing the wrong parameter - + The free_uint_fixup() freed the wrong parameter in the past. - + (cherry picked from commit c3e6c1edc7531406208efe2965243e6e81506127) commit 569662043b656063be97d0ea0e22dd8f6082320e @@ -453,7 +3277,7 @@ Author: Alexander Couzens Date: Mon Mar 4 17:32:00 2024 +0100 ims_registrar_scscf: fix typo in function name uint_fixup - + (cherry picked from commit 6f908f05d4691abcb1b3a745048d3cc2a9996676) commit 8bb9f0601eb94597f3bfab4ede97971de83cc1e7 @@ -461,10 +3285,10 @@ Author: Alexander Couzens Date: Mon Mar 4 17:21:25 2024 +0100 ims_registrar_scscf: refactor save_fixup4 - + Rename function to match argument number. Use assign_save_fixup3_async instead of the code copy - + (cherry picked from commit 82a6d7ea6edbaca60879a38c5e74e40920e89342) commit 4aa0920b2e573661959d5c9149ee04177cae8264 @@ -472,7 +3296,7 @@ Author: Alexander Couzens Date: Fri Mar 1 17:38:21 2024 +0100 ims_registrar_scscf: fix uninitialized arguments in save() - + The script "save" command can be used with different arguments: 2, 3 and 4. But internally for all save() calls the exact same function is use, w_save(). @@ -482,9 +3306,9 @@ Date: Fri Mar 1 17:38:21 2024 +0100 is called with 2 uninitialized arguments *mode, *c_flags. mode is unused, seems a legacy argument. c_flags is referenced resulting in a crash if not null. - + Use separate wrapper functions to handle different argument number. - + Fixes: a627c9a04a74 ("ims_registrar_scscf: Extend save() with optional flag") (cherry picked from commit 20a75004d53a06da0f22b11804a4d83496ad8919) @@ -493,7 +3317,7 @@ Author: Daniel-Constantin Mierla Date: Mon Apr 29 10:08:29 2024 +0200 ims_ipsec_pcscf: handle tls for replies - + (cherry picked from commit 48dab490965fa7f2f7200d95edd7dbb1407b2536) commit 9493dc0c895d1dde50239c903fd976c8c6e0325f @@ -501,7 +3325,7 @@ Author: Daniel-Constantin Mierla Date: Mon Apr 29 06:49:47 2024 +0200 ims_ipsec_pcscf: updated comments for ipsec_forward() flags - + (cherry picked from commit f7f93828993b5975dfe5f26ad63ba6c489aa69f7) commit 7e202ec38593462559e81db7b0f97e46567f379d @@ -509,7 +3333,7 @@ Author: Daniel-Constantin Mierla Date: Mon Apr 29 06:46:56 2024 +0200 ims_ipsec_pcscf: docs updated for ipsec_forward() flags - + (cherry picked from commit 575b17d23cd5fa060f775bc56b42c735048bc849) commit 1387c32dfa601496c38f9c10d554c490c867d4d7 @@ -517,12 +3341,12 @@ Author: Daniel-Constantin Mierla Date: Mon Apr 29 06:32:07 2024 +0200 ims_ipsec_pcscf: decouple IPSEC_FORWARD_USEVIA and IPSEC_TCPPORT_UEC for requests - + - both flags should be avaible for use at the same time in ipsec_forward() - for request IPSEC_FORWARD_USEVIA gets the protocol from the next hop address - + (cherry picked from commit ab261540d656ed456bac8876f77f940457a9baf6) commit 8af0605ade36566597ff691a2adc1e524081a6fa @@ -530,7 +3354,7 @@ Author: Daniel-Constantin Mierla Date: Sun Apr 28 23:28:38 2024 +0200 ims_registrar_scscf: init variable to fix analyzer warning - + (cherry picked from commit 8558947034f16b162c15eda39d18f5f5df4ef562) commit 89343b6031f186c59ecd6707109bd0269762075f @@ -538,39 +3362,39 @@ Author: Ostap Date: Mon Apr 29 00:15:28 2024 +0300 modules/statsd: ensure statsd failures do not stop execution (#3819) - + * modules/statsd: avoid stopping flow when sending statsd metric fails - + Currently statsd functions return bool: `true` or `false` depending when the function succeeds or fails respectively. - + This value gets implicitly converted to `int`: `true` -> `1`, `false` -> `0`. - + For Kamailio `1` means succesfull execution, but `0` means to stop processing messages, which is not what we want as statsd should not impact flow execution. Instead we want to return `-1` which signifies error, but the flow continues. - + * modules/statsd: do not fail module initilization when statsd init fails - + statsd_init executes `statsd_connect` which tries to connect to statd server. - + If connection fails then kamailio fails to start. This is not the desired behaviour as: 1. Kamailio should continue working even if statsd server is down, metrics should not impact runtime. 2. `statsd_connect` is also re-executed each time we try to send the metric https://github.com/salemove/kamailio/blame/master/src/modules/statsd/lib_statsd.c#L76, so it's initial result is not essential. - + Note, that before 5.8 the result of init was already ignored due to implicit conversion of `false` to `0` until after https://github.com/kamailio/kamailio/commit/0186246fce8f0e4bb46b30c05174983cd957a3ba was introduced (which could be considered a breaking change even if it seemingly fixes a bug in conversion). - + (cherry picked from commit 5e66ba23851f115bcb88d7e3f71f78ab33fc1e30) commit 620aa3f2a0faf3a4d54908bac0aa3ffcd8376ab5 @@ -578,7 +3402,7 @@ Author: Daniel-Constantin Mierla Date: Fri Apr 26 14:35:22 2024 +0200 ims_usrloc_scscf: enclose examples in dotted lines for better visibility - + (cherry picked from commit 8506a6fe781e6e0b0b1418f4087db50480db6b57) commit 1dd7c4038eb9a0c7eec506994a58a56d04e6cee5 @@ -586,7 +3410,7 @@ Author: Daniel-Constantin Mierla Date: Fri Apr 26 14:24:16 2024 +0200 ims_usrloc_scscf: reformat exported structures - + (cherry picked from commit 15d859e1e96552fca2708cf56047021beae29711) commit b2352bc1c6f3eff3aba85a087107f4ca29cedc22 @@ -594,7 +3418,7 @@ Author: Henning Westerholt Date: Fri Apr 26 05:54:27 2024 +0000 uid_auth_db: spelling fix in documentation - + (cherry picked from commit 9f28450312749dfbc021a8cbc23472c8a39d3fef) commit 0bf03aa1987b9cff2fc0d776605620e26c163609 @@ -602,7 +3426,7 @@ Author: Henning Westerholt Date: Fri Apr 26 05:53:30 2024 +0000 core: spelling fix in comment and log message - + (cherry picked from commit db176a4918c0b500f5f051cad16fd8d442450ab7) commit cafe437dcb637b0e571a2d2ffd04d911584404d9 @@ -610,13 +3434,13 @@ Author: S-P Chan Date: Mon Apr 29 09:24:16 2024 +0200 tls: clear thread-local variables up to tls_pthreads_key_mark - + - other libraries may set thread-locals via pthread_setspecific - assume that tls_pthreads_key_mark demarcates libssl's values - only clean thread-local values up to tls_pthreads_key_mark - + Currently only used by app_python[s] - + (cherry picked from commit fe6f4fcde2fa06a3c00479cef169c27dc32ae490) commit 03ff5051b640d2478dd68ea89ad74d516752ab0f @@ -630,7 +3454,7 @@ Author: Daniel-Constantin Mierla Date: Thu Apr 25 13:49:58 2024 +0200 tcpops: removed unused variable introduced recently - + (cherry picked from commit fe8f052c29528b656062927626f9784b32b7c8f6) commit 3ff024fd0057d3a9d045d3f20df5d1d7f7c9c7aa @@ -638,7 +3462,7 @@ Author: Daniel-Constantin Mierla Date: Wed Apr 24 21:34:28 2024 +0200 regex: reformat exported structures - + (cherry picked from commit 0ebfddd20b43396d602b4c68a88f7c2bc58ed211) commit c8f685359c411ac43000dd77cbc2e4f95b6cb3f4 @@ -646,9 +3470,9 @@ Author: Daniel-Constantin Mierla Date: Tue Apr 23 12:08:30 2024 +0200 regex: allocate pcres array - + - GH #3812 - + (cherry picked from commit 2cc62133db4f6875f55e73e044f37dafbb2274c2) commit eaacc171adbcd84fb2b95b4c182cd1e954624e2b @@ -656,7 +3480,7 @@ Author: Daniel-Constantin Mierla Date: Tue Apr 23 11:49:23 2024 +0200 regex: init globals for safer shutdown on failure - + (cherry picked from commit 84517c14ca38a8371c67b858077a42019c2217a8) commit 794c2edeaffe059bf8de6ab1d3df5db003ed4cb0 @@ -664,9 +3488,9 @@ Author: Daniel-Constantin Mierla Date: Tue Apr 23 11:19:30 2024 +0200 core: fmsg - parse loopback ip when initializing faked msg structure - + - GH #3817 - + (cherry picked from commit 66b3c04a9653425b1602c82dd2456a7eb7cf59d1) commit 7e987d8937349246f2abfa041679f568344ff402 @@ -674,7 +3498,7 @@ Author: Daniel-Constantin Mierla Date: Tue Apr 23 10:42:02 2024 +0200 pv: use global tcp connection callback for event route on $conid - + (cherry picked from commit f5c05a68ae72881ab0691bb8488112356fc67c79) commit 069de99576b5f8bff002176331ed2f545afe8158 @@ -682,7 +3506,7 @@ Author: Daniel-Constantin Mierla Date: Tue Apr 23 10:36:35 2024 +0200 core: tcp - set a global shortcut to tcp connection for event route - + (cherry picked from commit d114d11724dc4157e7e5809504531d26da6bcc57) commit c9fe59d6cd73179aa75e21b3b215bc0465b182aa @@ -690,7 +3514,7 @@ Author: Daniel-Constantin Mierla Date: Tue Apr 23 10:21:20 2024 +0200 tcpops: reworked some debug messages - + (cherry picked from commit 27e3b7f3f82957c6dc80f2ff89c40bdd87cecb81) commit db2e96ec2aacde1bd50b65ea6357388bad39e86f @@ -698,7 +3522,7 @@ Author: Daniel-Constantin Mierla Date: Tue Apr 23 10:19:29 2024 +0200 core: tcp - keep connection id on event route cb structure - + (cherry picked from commit 11e7d71e5c2ee9428298658ed3b9a0f625d40f00) commit 28bbcd5a50f45b8217125481706180a76323dc44 @@ -706,15 +3530,15 @@ Author: Rick Barenthin Date: Wed Apr 17 13:02:02 2024 +0200 usrloc: check on db delete the return value of memchr - + When inserting into the database the AOR is split at the @ sign and if there is no @ sign in the AOR only the domain part is filled and the user part is left empty. - + But for deleting this is not done and the query failed to be executed and the AOR is not deleted. This PR add this behaviour of only comparing against the domain part if the AOR doesn't contain a @ sign. - + (cherry picked from commit 49276a1f43b1a3bf4a8d681888df964000360c79) commit 3052565e3ce14d5d3c45d790877a562185085548 @@ -722,7 +3546,7 @@ Author: Xenofon Karamanos <22965395+xkaraman@users.noreply.github.com> Date: Wed Apr 10 11:14:45 2024 +0000 tcp_main: Match wss protocol - + (cherry picked from commit 175d755c40bc50b78b2cf4f18ad22429289af90d) commit 7d103cf3887401fca32d95f7ea7ee10f28e9e127 @@ -730,7 +3554,7 @@ Author: Xenofon Karamanos <22965395+xkaraman@users.noreply.github.com> Date: Wed Apr 10 11:13:32 2024 +0000 core/forward: Match protocol when forwarding - + (cherry picked from commit d81e5113884b933251499630d112ec5b1150b8a4) commit a19e6e0e49d9881ab990d23ad31a95773fe1a00b @@ -738,7 +3562,7 @@ Author: Xenofon Karamanos <22965395+xkaraman@users.noreply.github.com> Date: Mon Apr 8 09:42:49 2024 +0000 tcp_main: Update comment docs - + (cherry picked from commit 0a28a93c6e060081267dc686e342d45ef03358e7) commit 0c070443b585c597d2d6249ac6ac32490d9c7f48 @@ -746,7 +3570,7 @@ Author: Xenofon Karamanos <22965395+xkaraman@users.noreply.github.com> Date: Mon Apr 8 09:29:57 2024 +0000 tcp_main: Add proto argument to tcpconn_exists function - + (cherry picked from commit 6779efd430178adff0ae438d178e38c003e4e05c) commit 2661594bf7f31558e6ac7524f33ebb358aefce21 @@ -754,7 +3578,7 @@ Author: Xenofon Karamanos <22965395+xkaraman@users.noreply.github.com> Date: Fri Apr 5 13:23:56 2024 +0000 tcp_main: Add protocol argument for searching tcp/tls connections - + (cherry picked from commit 4a40b16d4f9bef9bc75d3272c83878e6348aa0b8) commit d2cf78f5c70977639f3b7f66b852350b764e4b13 @@ -763,7 +3587,7 @@ Date: Sat Apr 13 01:26:13 2024 +0530 rtpengine: fix pkg mem leak in send_rtpp_command() - freed request.s after sending request to websocket - + (cherry picked from commit b4753ae4216b0c960ac094f4be8232fb4d0147b0) commit 595d3f472179402dce7a51672c2dbfbcf3b54bd5 @@ -771,7 +3595,7 @@ Author: Xenofon Karamanos <22965395+xkaraman@users.noreply.github.com> Date: Thu Apr 11 10:47:11 2024 +0000 corex: Fix unknown af in list_sockets - + (cherry picked from commit 8bc64a9e6820243336387d9cd9acf81f24d89993) commit 800ed174b9402d1b253b2cb4ab04b5fb7030dc8d @@ -779,7 +3603,7 @@ Author: Daniel-Constantin Mierla Date: Fri Apr 5 21:41:21 2024 +0200 ims_ipsec_pcscf: log error message made info - + (cherry picked from commit 92d3573b500374d100639484e5a84cb640dc6b1d) commit 8d312ded02559b325cdd691bde61c54148b077a5 @@ -787,7 +3611,7 @@ Author: Daniel-Constantin Mierla Date: Fri Apr 5 16:19:42 2024 +0200 siputils: tel2sip2() - memset to 0 pkg allocs and recompute len of new uri - + (cherry picked from commit d1118064d04bb77c818540e68edf1766db1d560a) commit 7295607e680ad1dd5290b15dab7fed77c65bfb88 @@ -795,7 +3619,7 @@ Author: Daniel-Constantin Mierla Date: Fri Apr 5 07:54:12 2024 +0200 core: parser/sdp - rename parameter to suggest better its role - + (cherry picked from commit b03ec73589c12e566b11ce2c653401daa915c805) commit 855c76780c4399d6d9881ce3c525a7df56e111c4 @@ -803,7 +3627,7 @@ Author: Daniel-Constantin Mierla Date: Thu Apr 4 13:40:13 2024 +0200 sdpops: reformat the codecs map - + (cherry picked from commit 359a442e14a156b0bcf60dc5b2580cbc57924e34) commit f337f13cdbc7e8805c0130dbae3befaf4b684c7c @@ -811,15 +3635,15 @@ Author: Jannik Volkland Date: Thu Apr 4 11:06:10 2024 +0200 ndb_redis: docs - refine docs regarding client certificates [skip ci] - + The created ssl context does not use client certificates [1,2] which is against the default in current Redis configurations [3]. The used Redis server therefore needs to be configured to not use tls-auth-clients [3]. - + There is also a small typo in "ac_path" which was fixed to "ca_path". - + [1]: https://github.com/kamailio/kamailio/blob/8047c958b42ea5af2e8f9ede0152f892ac0eea3a/src/modules/db_redis/redis_connection.c#L168 [2]: https://github.com/kamailio/kamailio/blob/8047c958b42ea5af2e8f9ede0152f892ac0eea3a/src/modules/db_redis/redis_connection.c#L212 [3]: https://redis.io/docs/management/security/encryption/#client-certificate-authentication - + (cherry picked from commit 6faa180661e799187eff3a498f8b13e96719fa92) commit bb48da13adfe36716c3d958ed1d9c410424f4d19 @@ -827,15 +3651,15 @@ Author: Jannik Volkland Date: Thu Apr 4 11:03:32 2024 +0200 db_redis: docs - refine docs regarding client certificates [skip ci] - + The created ssl context does not use client certificates [1,2] which is against the default in current Redis configurations [3]. The used Redis server therefore needs to be configured to not use tls-auth-clients [3]. - + There is also a small typo in "ac_path" which was fixed to "ca_path". - + [1]: https://github.com/kamailio/kamailio/blob/8047c958b42ea5af2e8f9ede0152f892ac0eea3a/src/modules/db_redis/redis_connection.c#L168 [2]: https://github.com/kamailio/kamailio/blob/8047c958b42ea5af2e8f9ede0152f892ac0eea3a/src/modules/db_redis/redis_connection.c#L212 [3]: https://redis.io/docs/management/security/encryption/#client-certificate-authentication - + (cherry picked from commit 40a50243f0bae782b7acd97cf0a9b1138185068b) commit 215af59832efc6e485563b55e3af9d209121d0c5 @@ -843,7 +3667,7 @@ Author: Stefan-Cristian Mititelu Date: Mon Apr 8 11:35:38 2024 +0300 pdb server: allow carrier id 0 - + (cherry-picked from commit 60ded00a3b574a08457a696334d11d668595cc0b) @@ -862,7 +3686,7 @@ Author: Daniel-Constantin Mierla Date: Wed Apr 3 12:18:47 2024 +0200 core: msg translator - duplicate reply via xavp params and handle errors - + (cherry picked from commit 5f83d4f9c447f5a7e3de8336dc0e076b10e43833) commit 1caec71aeddb7f65afb93bf05cb9e0aae2a2c0cd @@ -870,7 +3694,7 @@ Author: Daniel-Constantin Mierla Date: Wed Apr 3 12:16:18 2024 +0200 core: xavp - added missing closing parenthesis in log messages - + (cherry picked from commit 3b09fd343575c56d9658a61efebd4851662de338) commit 4708758f1c428cc94d1abdf9bb706c7c509efebe @@ -896,7 +3720,7 @@ Author: Daniel-Constantin Mierla Date: Thu Mar 28 08:30:17 2024 +0100 blst: reformat exported structures - + (cherry picked from commit e39557c96d2f419184c826d779f1a3309acc4269) commit c0c8ee05ab25256b9154d2056ee04b07f3f2290a @@ -904,7 +3728,7 @@ Author: Daniel-Constantin Mierla Date: Wed Mar 27 08:19:03 2024 +0100 smsops: short reference section about variables - + (cherry picked from commit 9a94930ae1168d5df79e3dc1414841cdf23a2eba) commit b21a7aaa467f2b76a52308557657c65274e34087 @@ -912,7 +3736,7 @@ Author: Daniel-Constantin Mierla Date: Tue Mar 26 19:17:23 2024 +0100 smsops: reformat module exports structures - + (cherry picked from commit 9848d43cb367d6901a0b8c727759feb8a8fad930) commit 3f3c1940788a4713705169f8d96ae9a13ee2bad1 @@ -920,9 +3744,9 @@ Author: Daniel-Constantin Mierla Date: Mon Mar 25 23:25:19 2024 +0100 db_mysql: right position for define KSR_MYSQL_OPT_RECONNECT - + - follow up of previous commit - + (cherry picked from commit 14dc277e29a170b9ac51e7dda07fa25cbd9be048) commit 557d7e83c01c930df608b9d96791553d8f2bf724 @@ -930,10 +3754,10 @@ Author: Daniel-Constantin Mierla Date: Mon Mar 25 23:07:55 2024 +0100 db_mysql: MYSQL_OPT_RECONNECT is deprecated by MySQL 8.0.34 - + - https://dev.mysql.com/doc/c-api/8.0/en/c-api-auto-reconnect.html - MariaDB seems to still have it - + (cherry picked from commit da3d6e9a74b63fdb7b1c4063d6be017f1ce42bea) commit c9edb30ffa0c9544a10d0e72aabe84a1b3b2a103 @@ -941,7 +3765,7 @@ Author: Daniel-Constantin Mierla Date: Sat Mar 23 21:38:00 2024 +0100 keepalive: reformat module exports structures - + (cherry picked from commit dd221a6e5162838b979fd38ffdfb750663aef869) commit 3f44cabcfc0abc83ae1971ac74fbb0bd36829ce4 @@ -949,7 +3773,7 @@ Author: Elena-Ramona Modroiu Date: Sat Mar 23 09:58:46 2024 +0100 corex: fix conditions for dns_cache modparam srv attributes - + (cherry picked from commit 8114b2016d032484edafe4edd04fb02d52cfd058) commit dbf9208f3a402844c9981fb7ed09493a1338dfdd @@ -957,7 +3781,7 @@ Author: Elena-Ramona Modroiu Date: Sat Mar 23 09:51:47 2024 +0100 core: resolve/create_srv_pref_list() - insert at correct position in list - + (cherry picked from commit f35cf8904119dcf582ea2451648de5fef095466b) commit 0e00ae1db0242fc01e6f8c332e3920fd9465b3f9 @@ -965,7 +3789,7 @@ Author: Daniel-Constantin Mierla Date: Fri Mar 22 10:25:48 2024 +0100 core: socket info - parse advertise ip part to get address family - + (cherry picked from commit 5f901c3557f9f875545d82a7ab00f6d0c5c1fe52) commit c48fbea981c7b0bd281cd1fc2abedcda41d92c13 @@ -973,7 +3797,7 @@ Author: Daniel-Constantin Mierla Date: Wed Mar 20 13:40:28 2024 +0100 gcrypt: docs - module name used for section ids - + (cherry picked from commit 68c69966c38b56775a3966d07c33ff94c2a8ba95) commit 613e2cdfc3ae9242d259bf8b67b6ed715c0c0ad8 @@ -981,7 +3805,7 @@ Author: Xenofon Karamanos <22965395+xkaraman@users.noreply.github.com> Date: Wed Mar 27 15:48:50 2024 +0000 file_out: FIx ‘for’ loop initial declarations error - + (cherry picked from commit ae04ccac92225a1e7b573a28ded555789e8604cd) commit f4d44a9201a79acf0620a005008f2594ff8d26ee @@ -989,7 +3813,7 @@ Author: Xenofon Karamanos <22965395+xkaraman@users.noreply.github.com> Date: Wed Mar 27 15:48:25 2024 +0000 tls: Fix ‘for’ loop initial declarations error - + (cherry picked from commit 9f2abc69e27c4b3246628138ec81fced81d7bc7a) commit 3fac5afc42a606391d6a7c0337ef5e4e136d6b80 @@ -997,7 +3821,7 @@ Author: Xenofon Karamanos <22965395+xkaraman@users.noreply.github.com> Date: Fri Mar 22 10:24:05 2024 +0000 file_out: Cast to correct type of str - + (cherry picked from commit 4ada818099b5b7cb7deff1b1ce93b5aacaa1b84e) commit 028ba8f9d6bc40dcd47e6a0e5b40e5b3e2ea7b17 @@ -1005,7 +3829,7 @@ Author: Daniel-Constantin Mierla Date: Fri Mar 1 11:42:45 2024 +0100 file_out: additional checks for silenting warnings - + (cherry picked from commit 19894425684504e2a19622ae5a9cdfc565f16fd3) commit 814f5bdc9ee5d4594ffb0fd72843bca7b5fa79ea @@ -1013,11 +3837,11 @@ Author: Victor Seva Date: Sat Mar 23 00:00:44 2024 +0100 dmq: fix inter-lock on error - + triggered by intermittent DNS resolution error. dmq workers were getting locked at dmq_notification_callback_f() due to this missing lock_release() - + (cherry picked from commit 0d240e4e0dc3184ef37d338ba6872d295d6b16f2) commit 7bcef8ef487a713f5b6c6fadb7a3166ed41fb136 @@ -1031,7 +3855,7 @@ Author: Daniel-Constantin Mierla Date: Tue Mar 19 17:39:19 2024 +0100 ndb_redis: break on finding a server via sentinel inside redisc_reconnect_server() - + (cherry picked from commit 951ab118bb7d9955f8e69b66bec1f0c107d474a2) commit 86df978bc9842687035d6673ee1b71e542dcbd71 @@ -1039,7 +3863,7 @@ Author: Daniel-Constantin Mierla Date: Tue Mar 19 14:29:11 2024 +0100 ndb_redis: fix index on parsing sentinel address inside redisc_reconnect_server() - + (cherry picked from commit c8f3b496a05ae5bf29341dc7e2630f951d4effc5) commit a0dfa0ac81ed4aec33863fc20cf5cb3ee077a90c @@ -1047,7 +3871,7 @@ Author: Daniel-Constantin Mierla Date: Tue Mar 19 14:26:27 2024 +0100 ndb_redis: clang-format for WITH_SSL code - + (cherry picked from commit e54051d698b059aa168229493dc2d6bf3cdd757c) commit a7d4ce95b383dc26c547ef9ee07b05d51abc50f9 @@ -1055,7 +3879,7 @@ Author: Daniel-Constantin Mierla Date: Tue Mar 19 10:21:51 2024 +0100 keepalive: small formatting updates and comments to the ka dest structure - + (cherry picked from commit cee82c92b06a026b88fea654944f6146eb5cb4d8) commit 0b3aa00775a5c0b4b1dc4990f4c26bc637fc6de5 @@ -1063,9 +3887,9 @@ Author: Daniel-Constantin Mierla Date: Tue Mar 19 09:51:28 2024 +0100 keepalive: proper storing of last up/down timestamps - + - GH #3790 - + (cherry picked from commit 9e2a0ee545646bd4491ecdbe58d7fea770764b54) commit 91b0962679092f28abb5022d1505372356460f7d @@ -1073,7 +3897,7 @@ Author: Daniel-Constantin Mierla Date: Mon Mar 18 11:02:07 2024 +0100 acc: more log messages of failure arsing extra acc string - + (cherry picked from commit 04a73ace6572dd5c95a8f50b39b2ce712f7ebe84) commit 5daadecd248322e5f8eaf15555e46692f3d1c267 @@ -1081,12 +3905,12 @@ Author: Axel Sommerfeldt Date: Fri Mar 8 12:32:07 2024 +0100 ims_ipsec_pcscf: TLS support in ipsec_forward() improved - + This patch was initially done by Herle Supreeth in his fork but isn't present upstream yet: https://github.com/kamailio/kamailio/commit/8b9a2977e111d9adb8595d98ab59f8c8eb033120 - + See also: https://github.com/kamailio/kamailio/issues/3772 - + (cherry picked from commit 3154a0aba5543cab75153429bc8ec617c3484f71) commit 7df7508d7d2b7b9495dafab8b515a5721bd669ee @@ -1095,7 +3919,7 @@ Date: Mon Mar 11 14:22:37 2024 +0300 dispatcher: refine documentation - more clear documentation for the new ds_is_from_list flags - + (cherry picked from commit 761e963c0f7d9bf1b66c1ef18a409756b919ae2c) commit 90f8117f9669069b4dab7e9d747dfa06245ec8a0 @@ -1103,7 +3927,7 @@ Author: Daniel-Constantin Mierla Date: Fri Mar 15 21:24:42 2024 +0100 ctl: handle int input for double storage - + (cherry picked from commit 1380a4a0d18159c7130b70c0216134a253ad83f7) commit 0af55b0eac8c3457db859a9c37fea211ece91b8a @@ -1111,7 +3935,7 @@ Author: Stefan-Cristian Mititelu Date: Tue Mar 5 16:30:01 2024 +0200 pdb server: Return negative carrierid for failures. Clang format - + (cherry-picked from commit 88b698e0f62c39ed60af9f0a4fb3ca2dc6867d8f) commit 6410f375cd6d1e357afeb9e100bd3a3c51321280 @@ -1119,7 +3943,7 @@ Author: Stefan-Cristian Mititelu Date: Tue Mar 5 16:14:11 2024 +0200 pdb: Return negative carrierid for failures - + (cherry-picked from commit bf78b619ae28924361fb2c757a4d09eb1a39f5cd) commit d6cd0859158a8013e998ec779e956a550b493934 @@ -1127,7 +3951,7 @@ Author: Xenofon Karamanos <22965395+xkaraman@users.noreply.github.com> Date: Thu Mar 14 16:47:28 2024 +0000 file_out: Fix var position and initialize - + (cherry picked from commit e36b2232e9b097794845659f71543bc57ef58a35) commit f9b1cca33a45560f06b2708975c624da9728b6f5 @@ -1135,11 +3959,11 @@ Author: Oded Arbel Date: Sun Mar 10 19:55:20 2024 +0200 pkg/kamailio/obs: Allow builders to disable wolfssl module [skip ci] - + Building the WolfSSL module should be optional, even if it is on by default, builders should be able to choose to not need to install 4th party repositories. - + fixes #3781 - + (cherry picked from commit 5392dbf8070abf36734d9c857924df91186bc2dd) commit 45ee72fcf0ae8aeb135196ef8729fe0cea14048e @@ -1147,11 +3971,11 @@ Author: Daniel-Constantin Mierla Date: Sat Mar 9 20:11:07 2024 +0100 topos: properly handle cases of no user in contact for mode 1 - + - contact mode 1 accepted cases with no-user in contact uri but not in r-uri, however, requests within dialog can have one's contact in r-uri and then processing failed - + (cherry picked from commit 24e410f9a20d004f55bcc79cd10fb35cb26e4570) commit 772b464552cff0b9ebb769e57fae718c0357ba11 @@ -1159,10 +3983,10 @@ Author: Daniel-Constantin Mierla Date: Fri Mar 8 19:43:49 2024 +0100 topos: small rearangement by removing else after return in the true block - + - reduce level of indentation - a few wraps in curly braces for clearer view of the if block - + (cherry picked from commit b6fccea258e56b7d3195659245713a6d44acb013) commit 2122afae2a6604c0bc44a43ab37ee274a15a700a @@ -1182,7 +4006,7 @@ Author: Sergey Safarov Date: Thu Mar 7 13:32:22 2024 +0200 pkg/kamailio/obs: packaged README.file_out - + (cherry picked from commit 20edb64247a20a5d6b4b8bfb264b6e31d283b039) @@ -1222,7 +4046,7 @@ Author: Xenofon Karamanos <22965395+xkaraman@users.noreply.github.com> Date: Tue Mar 5 14:34:19 2024 +0000 tls/docs: Update certificate generation docs - + (cherry picked from commit 67785fea8f906236e4a30bc09bb11b3292c46572) commit 6533c42fc0bba6408376a8f8b41b02b97b04ca1b @@ -1230,7 +4054,7 @@ Author: Xenofon Karamanos <22965395+xkaraman@users.noreply.github.com> Date: Tue Mar 5 12:52:51 2024 +0000 tls/docs: Update tls.reload docs - + (cherry picked from commit 4c9cfa7a6a770a693ecb3b840ad042fb201db675) commit a814df7e828db7be0b34738c2eb78b133c22ddef @@ -1238,7 +4062,7 @@ Author: Daniel-Constantin Mierla Date: Tue Mar 5 20:53:47 2024 +0100 presence: docs - remove extra section end tag - + (cherry picked from commit ed32512f4594cc0ddc3437e274bcba5acfc16410) commit 500e5fabf9da31b5fa2949cac90956da99751223 @@ -1246,7 +4070,7 @@ Author: Daniel-Constantin Mierla Date: Mon Mar 4 15:31:18 2024 +0100 core: main - init local variables used for cli param parsing - + (cherry picked from commit 8a2894cd6180f904dd37acb4985db4e4935aa434) commit d45c78eeeaea6a9fc9dcb927436f834392d9d7c9 @@ -1254,9 +4078,9 @@ Author: Daniel-Constantin Mierla Date: Mon Mar 4 13:58:35 2024 +0100 ctl: reset log prefix on reading ctl traffic - + - it may be previously set in process by some event route - + (cherry picked from commit 5b8b2717ee2f57da932132683b27eb33cea3fd59) commit 42282a2c78fc24ff2b3856983a6dbb188a2912e3 @@ -1264,7 +4088,7 @@ Author: Daniel-Constantin Mierla Date: Mon Mar 4 09:07:22 2024 +0100 acc: cdr - do not free static empty string in case of error - + (cherry picked from commit 0fc0cdd791ce5157232dd2139238708403cdde1d) commit 4626cb7f0e0b273153ce0004900a92553783a893 @@ -1272,7 +4096,7 @@ Author: Daniel-Constantin Mierla Date: Sun Mar 3 20:57:45 2024 +0100 core: parser rr - check for rr value before serializing - + (cherry picked from commit 6ee26a3ae3293aaeb4507d5d0b16ad31173cc39a) commit 089bf63178039b13cde0beccfacab1536af76179 @@ -1280,7 +4104,7 @@ Author: Daniel-Constantin Mierla Date: Fri Mar 1 12:46:17 2024 +0100 core: select - handle ws and wss inside select_ip_port() - + (cherry picked from commit d8e0942c9e83c8cad7c182bf41c156ba35bf24d2) commit 4c78a564c5ad8662014cf686428a37238a6d8476 @@ -1288,7 +4112,7 @@ Author: Daniel-Constantin Mierla Date: Fri Mar 1 12:41:13 2024 +0100 core: ppcfg - jump to end when defexp eval does not get a str val - + (cherry picked from commit daac0bdb88f6f732bda7c683af45b90f87fdb7c9) commit 219c21fe62638e7191dd1b5ad32ba098273e2009 @@ -1296,7 +4120,7 @@ Author: Daniel-Constantin Mierla Date: Fri Mar 1 09:55:16 2024 +0100 influxdbc: copy with buffer size limit - + (cherry picked from commit 73c66150c604326c07d454002c12cb221289936a) commit 0747c18d5c4db2e7e8408ad2c7efa120ec76523e @@ -1304,7 +4128,7 @@ Author: Daniel-Constantin Mierla Date: Fri Mar 1 09:37:59 2024 +0100 core: rthreads - init return variable - + (cherry picked from commit 181c602616e13323786335e8e28f182871aa5e9b) commit c06ea12d0fff50569803ea0fef9486726ab428ce @@ -1312,7 +4136,7 @@ Author: herlesupreeth Date: Tue Feb 27 21:01:44 2024 +0100 ims_registrar_pcscf: update registered state to pending registration if contact exists - + (cherry picked from commit 4fb8accc6747ad56fec3dc84d70cb2b8bbd7316e) commit ab981daa54c1afc1017af16afbb67ef55567e6fa @@ -1320,7 +4144,7 @@ Author: herlesupreeth Date: Sun Feb 25 16:16:14 2024 +0100 ims_usrloc: make matching of username in contact conditional - + (cherry picked from commit 17bdbd34b1038de936f14c1a41ce55f571e6402a) commit 8835f04334981b81df7eed6c03e581fcc4070da8 @@ -1328,7 +4152,7 @@ Author: Daniel-Constantin Mierla Date: Tue Feb 27 09:50:05 2024 +0100 tcpops: if connection not found, return attributes from sip msg rcv - + (cherry picked from commit c3d753885b3cd1bc0cb9f46986e5798dfb5f6552) commit c2ac3ffc907ded71bcde59c3c5c0d6b69e997696 @@ -1336,7 +4160,7 @@ Author: Daniel-Constantin Mierla Date: Tue Feb 27 07:57:22 2024 +0100 tcpops: variables to get active connection attributes - + (cherry picked from commit 59230a07b8c6a79c4a574890bae775c3d166c471) commit 50c759030f024dd080c08a3d94127f1d1af544e2 @@ -1344,9 +4168,9 @@ Author: Daniel-Constantin Mierla Date: Mon Feb 26 14:06:38 2024 +0100 ndb_redis: init enabled for tcp-main and postchildinit callbacks - + - GH #3768 - + (cherry picked from commit 19e5bf3d4cfc2b7d47623e307fff7e60e73e8a18) commit 2d2006701f491f732ea07b36a48016f7fbe436bf @@ -1354,7 +4178,7 @@ Author: Daniel-Constantin Mierla Date: Mon Feb 26 13:09:27 2024 +0100 microhttpd: docs - note about variables available in the event route - + (cherry picked from commit 993583015b127b0a83603acd352925c8d6e6db70) commit 3415be29303bbacaf25b646d6c86027e93cf7c7e @@ -1362,7 +4186,7 @@ Author: Daniel-Constantin Mierla Date: Sun Feb 25 19:29:24 2024 +0100 evrexec: reformat exported structures - + (cherry picked from commit 65eef5c5446c1f6870eecf8bbc84d68d12271bc7) commit 15ffdf7c0721fb5d05772d96e133ac74412c0068 @@ -1370,7 +4194,7 @@ Author: Daniel-Constantin Mierla Date: Sun Feb 25 01:15:28 2024 +0100 ndb_redis: reformat exported structures - + (cherry picked from commit fb21f89dc544551b1bb65805303131fa990d2f44) commit dae15377dac1b019f2278baca208162154d5a7ad @@ -1378,7 +4202,7 @@ Author: S-P Chan Date: Tue Mar 5 09:59:41 2024 +0800 tls: NULL safety check - + (cherry picked from commit f6f9d90ada963b53b6552e1a172b8f2fd021c33b) commit 56aeb0723562409aa97098e51c602bcddc8b6789 @@ -1386,7 +4210,7 @@ Author: S-P Chan Date: Tue Mar 5 06:47:24 2024 +0800 etc/kamailio.cfg: document tls_threads_mode = 2 to use atfork handler - + (cherry picked from commit 5b4926b04ba0fcd8f65f5709789abd83181a381a) commit 0ba1ff1d430e5e51c7745d7eb1242dcae2557db9 @@ -1394,10 +4218,10 @@ Author: S-P Chan Date: Mon Mar 4 22:00:14 2024 +0800 tls: new option tls_threads_mode = 2 - + - use pthread_atfork to force all thread-locals to 0x0 after fork() - + (cherry picked from commit 464299c202f3ba963aed821b777075397e843856) commit 0a565d34b98b7ec4de0524a3e216e8d907661181 @@ -1405,7 +4229,7 @@ Author: S-P Chan Date: Mon Mar 4 21:49:10 2024 +0800 core/rthreads.h: add new option tls_threads_mode = 2 - + - add global handling of thread-locals with tls_threads_mode = 2 - this will run a pthread_atfork handler to reset @@ -1413,7 +4237,7 @@ Date: Mon Mar 4 21:49:10 2024 +0800 - alternative solution to running functions in thread executors - requires tls.so to be loaded to be effective - + (cherry picked from commit e7f040f219b46592081a6053b4ed1ae0d0552b1a) commit 3d80bc811c75eb0cbcf0f4aee8929a5082b4de6a @@ -1421,7 +4245,7 @@ Author: S-P Chan Date: Sat Mar 2 20:46:16 2024 +0800 tls: basic OpenSSL 3 support of provider keys (replaces ENGINE) - + - initial support for v3 provider keys (replaces ENGINE from v1.1.1) - can be disabled behind build flag -DOPENSSL_NO_PROVIDER - provider keys start with /uri: e.g @@ -1430,14 +4254,14 @@ Date: Sat Mar 2 20:46:16 2024 +0800 provider_quirks: 0 | 1 - 0 - default - 1 - create a new OSS_LIB_CTX* in the child - + This integration does not load any providers itself and depends on the usual - + export OPENSSL_CONF=my-openssl.cnf - + to configure providers. - + (cherry picked from commit 69883dd381368ca219cc52140e71d571775f95d5) commit 6ee443731a23032fce9a32ce9609ae5b7c6bd171 @@ -1445,7 +4269,7 @@ Author: S-P Chan Date: Sat Mar 2 21:41:11 2024 +0800 tls: remove unused ENGINE define - + (cherry-picked from commit 73e7123c2dd19b82db167ceee93444e43f70f446) commit 8e81774d5a71c06906df84fb4809bcfb73bd532e @@ -1453,9 +4277,9 @@ Author: Daniel-Constantin Mierla Date: Sat Mar 2 08:13:40 2024 +0100 tlsa: removed the map files used in the past for tls engine - + - sync with code of tls module - + (cherry picked from commit d443a1e37d85e0eec6f6c9875bb8e821b34c8d6b) commit 9d42e4aacab4a7bf18192701cd66cba95c2c98dd @@ -1463,11 +4287,11 @@ Author: S-P Chan Date: Sat Mar 2 08:29:31 2024 +0800 tls: clean-up of ENGINE - + - remove tls_map.* - not needed anymore - install an ENGINE in each worker SSL_CTX no need to replicate to all processes - + Cherry-pick from 5933893b91 commit 0ddbd961e91abf3e967285d80cc1c6f8d2aa5cf9 @@ -1475,7 +4299,7 @@ Author: S-P Chan Date: Fri Mar 1 08:06:13 2024 +0800 tls: make explicit ENGINE deprecation in OpenSSL 3 - + Cherry-pick from 0c68a5511e commit f53c6b49e158203ba0783ec6a6fbadd76c5fdde9 @@ -1483,7 +4307,7 @@ Author: S-P Chan Date: Thu Feb 29 19:01:14 2024 +0800 tls: fix OpenSSL 1.1.1 engine keys - + Cherry-pick from e535cc5eb2 commit 59ab58551e5895b710893985d0072c8c510c672c @@ -1491,7 +4315,7 @@ Author: Xenofon Karamanos <22965395+xkaraman@users.noreply.github.com> Date: Tue Feb 27 11:50:54 2024 +0000 file_out: Fix leaks - + (cherry picked from commit 8af509ae280b2ef155f1946acac5a7d977bb5c14) commit 6721fb7aae373d42c4059a630fc79815d2f709b7 @@ -1499,7 +4323,7 @@ Author: Xenofon Karamanos <22965395+xkaraman@users.noreply.github.com> Date: Mon Feb 26 11:17:19 2024 +0000 file_out: Add header guards - + (cherry picked from commit 967fb30b14fb63bcb396956f9e9ed0ca92028682) commit bc4c206999094ed74e77c73f5537e857111d0a30 @@ -1507,7 +4331,7 @@ Author: S-P Chan Date: Tue Feb 27 12:38:09 2024 +0800 http_async_client: libssl refactor thread executors for curl - + Cherry-pick from 6a0c86bba8 commit 533989406d0fa1e57ff007fd8d7f702f5831dacd @@ -1515,7 +4339,7 @@ Author: S-P Chan Date: Tue Feb 27 05:01:45 2024 +0800 xcap_client: libssl thread executor for curl_global_init() - + Cherry-pick from f5164b39c8 commit 49c3290fc6eb50de0b08661c50ff42663ff3de6b @@ -1523,7 +4347,7 @@ Author: S-P Chan Date: Tue Feb 27 05:01:31 2024 +0800 http_client: libssl thread executor for curl_global_init() - + Cherry-pick from f58225950c commit 5d4fae5c24eb4f13d585e1af4cb1753ea5a784c5 @@ -1531,7 +4355,7 @@ Author: S-P Chan Date: Tue Feb 27 05:01:14 2024 +0800 http_async_client: libssl thread executor for curl_global_init() - + Cherry-pick from 514635dc3e commit ce17fee304e9ffa5046194a0827f771742113640 @@ -1539,7 +4363,7 @@ Author: S-P Chan Date: Tue Feb 27 05:00:35 2024 +0800 core/rthreads.h: add thread executor for curl_global_init() - + Cherry-pick from db05449932 commit b1a308801430a5561c4c13c1d4602fe5d5542cf8 @@ -1553,7 +4377,7 @@ Author: S-P Chan Date: Mon Feb 26 10:25:19 2024 +0800 OpenSSL integration: manage curl_global_init(...) used by modules - + - http_client, http_async_client, xcap_client use libcurl - call curl_global_init in a thread executor as it invokes OpenSSL functions on Debian 12 @@ -1576,14 +4400,14 @@ Author: S-P Chan Date: Sun Feb 25 08:03:17 2024 +0800 tls: restore early init for other modules that use TLS - + Client modules (e.g. dispatcher) that require outbound TLS may race if tls init is too late. - + Restore tls init to PROC_INIT with a thread executor. - + Addresses GH #3765 - + Cherry-pick from 706d7b7ff3 commit 5af33b2e0ddc1098919008d44ab91959bc7dfb80 @@ -1609,7 +4433,7 @@ Author: Daniel-Constantin Mierla Date: Fri Feb 23 19:35:27 2024 +0100 Makefile.defs: version set to 5.8.0-rc0 - + - entering the phase to prepare releasing next major version series 5.8.x @@ -1618,7 +4442,7 @@ Author: Daniel-Constantin Mierla Date: Fri Feb 23 19:24:55 2024 +0100 Makefile.defs: version set to 5.8.0-pre1 - + - marking end of first phase of testing commit 7e22636bb2797f6ed9cac677678a7a1bfc4f2537 @@ -1626,7 +4450,7 @@ Author: Daniel-Constantin Mierla Date: Fri Feb 23 12:53:39 2024 +0100 dispatcher: rename interal define to reflect better is a mix of matching - + - rather than a full address matching commit 17536b1064b40c305f28c4c19392504afc0b9701 @@ -1634,7 +4458,7 @@ Author: Dennis Yurasov Date: Thu Jan 4 18:28:56 2024 +0300 dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching - + - Two new flgs added: DS_MATCH_SOCKET (8) to take in account socket/sockname attribute of gw DS_MATCH_TRY_FULLADDRSOCK (16) try to find the most complete "address/protocol/port/local socket" combination for all dispatcher targets @@ -1668,7 +4492,7 @@ Author: Torrey Searle Date: Wed Feb 21 08:05:10 2024 +0100 tools/kemi: fix bug in mock - + remove stray debug print statement that results in generated code being invalid @@ -1737,10 +4561,10 @@ Author: S-P Chan Date: Wed Feb 14 19:49:10 2024 +0800 db_mysql: libssl thread guard for db_mysql_query (and libmysqlclient) - + This function is observed to call SSL_read() when compiled with libmysqlclient.so.21 (but not libmariadb.so.3). - + Apply a thread executor just in case. commit 87ef83d23f68a43fc5265a81330cbeed6205f922 @@ -1754,9 +4578,9 @@ Author: S-P Chan Date: Wed Feb 14 15:17:26 2024 +0800 db_mysql: fix typos - + The option opt_ssl_ca is a string not integer. - + The comment for ea81e6cb should show the code fix as mysql_options(ptr->con, MYSQL_OPT_SSL_CA, (void *)db_mysql_opt_ssl_ca) @@ -1777,16 +4601,16 @@ Author: S-P Chan Date: Wed Feb 14 14:15:10 2024 +0800 db_mysql: new module param opt_ssl_ca to configure CA certs - + ERROR: db_mysql [km_my_con.c:200]: db_mysql_new_connection(): driver error: SSL connection error: CA certificate is required if ssl-mode is VERIFY_CA or VERIFY_IDENTITY - + When opt_ssl_mode = 4 | 5 libmysqclient requires that the trusted CAs be configured. Fixed with: mysql_options(ptr->con, MYSQL_OPT_SSL_CA, (void *)db_mysql_opt_ssl_mode) - + Note: libmariadb3 doesn't require this setting and uses the system trust store. @@ -1831,7 +4655,7 @@ Author: tsearle Date: Fri Feb 9 10:17:58 2024 +0100 tools/kemi: update kemi_mock for python (#3751) - + fixes code generation when python keywords are uses fixes formating issues of generated code fixes crash from pv.setl reporting parameters as null instead of 'none' @@ -1914,7 +4738,7 @@ Date: Tue Feb 6 21:43:22 2024 +0800 core/rthreads.h: use global ksr_tls_threads_mode to constrain thread wrapping - + - 0: run wrapped function directly - 1: run wrapped function in thread for process#0 else run directly - 2: always run wrapped function in thread @@ -1924,7 +4748,7 @@ Author: Daniel-Constantin Mierla Date: Tue Feb 6 14:24:08 2024 +0100 core: added tls_threads_mode global parameter - + - control how to execute functions that may be using libssl3 behind commit 475b4da798fce232eba6834c3cb05e3c97e12d03 @@ -1992,7 +4816,7 @@ Author: Victor Seva Date: Sat Feb 3 10:53:33 2024 +0100 outbound: fix build on xenial - + > outbound_mod.c: In function 'mod_init': > outbound_mod.c:122:2: error: too many arguments to function 'mod_init_openssl' > mod_init_openssl(NULL); @@ -2006,7 +4830,7 @@ Author: Victor Seva Date: Sat Feb 3 10:41:43 2024 +0100 db_mysql: fix build for stretch - + * mysql_optionsv is not there. We still use the deprecated flavour * MYSQL_OPT_SSL_ENFORCE is not there @@ -2015,9 +4839,9 @@ Author: Victor Seva Date: Sat Feb 3 09:47:46 2024 +0100 Revert "db_mysql: fix build for older releases" - + it doesn't fix anything - + This reverts commit f0e73eabee3be198dbad2e50752d9889e4aa8e5f. commit 80214d2f878b3f2d7547060c9d4bd578a9e1a837 @@ -2043,7 +4867,7 @@ Author: Victor Seva Date: Fri Feb 2 08:33:14 2024 +0100 db_mysql: fix build for older releases - + > km_my_con.c: In function 'db_mysql_new_connection': > km_my_con.c:132:4: warning: implicit declaration of function 'mysql_optionsv' [-Wimplicit-function-declaration] > mysql_optionsv(ptr->con, MYSQL_OPT_SSL_ENFORCE, (void *)&(int){1}); @@ -2065,7 +4889,7 @@ Author: Xenofon Karamanos Date: Fri Feb 2 10:56:41 2024 +0100 core: properly handle drop() action for kemi engines - + - GH #3718 commit a226823910735c315fc31df0e46132710db38def @@ -2079,7 +4903,7 @@ Author: Daniel-Constantin Mierla Date: Fri Feb 2 08:56:52 2024 +0100 Makefile.defs: version set to 5.8.0-pre0 - + - mark start of testing for v5.8.x series commit 8c5e97589fc0fed121ee6e8ca4adbf9ec63ad2eb @@ -2087,7 +4911,7 @@ Author: Daniel-Constantin Mierla Date: Fri Feb 2 08:55:38 2024 +0100 Makefile.defs: version set to 5.8.0-dev3 - + - mark end of development for v5.8.x series commit 03e60c809a0ac26b402bdf1154d6ec7b0476f26a @@ -2107,7 +4931,7 @@ Author: Daniel-Constantin Mierla Date: Thu Feb 1 21:19:11 2024 +0100 rtpengine: optional ping parameter for rpc reload command - + - specify if ping should be done to rtpengines at reload time commit df3d1e5cb80b7a6ac6ce93b582352aaa8e6fd369 @@ -2139,7 +4963,7 @@ Author: Xenofon Karamanos Date: Thu Feb 1 19:15:17 2024 +0200 file_out: Module to log custom strings to files (GH #3741) - + * add new module to log custom strings to files (GH #3741) * support for multiple files and also file balancing * smaller refactorings will be done afterwards (use string in function for names with internal matching, make worker sleep also configurable @@ -2162,7 +4986,7 @@ Author: Stefan-Cristian Mititelu Date: Thu Feb 1 14:00:14 2024 +0200 p_usrloc: Add new modparam 'preload' - + Useful when using kemi with p_usrloc, in order to preload location table. @@ -2237,7 +5061,7 @@ Author: S-P Chan Date: Tue Jan 30 16:49:32 2024 +0800 db_mysql: enable TLS when building with mariadb-connector-c - + - mariadb-connector-c requires at least one non-NULL configuration value to use TLS - emulate MySQL SSL_MODE_XXXX options @@ -2253,18 +5077,18 @@ Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Jan 29 21:22:54 2024 +0000 github: [skip ci]: bump wolletd/clang-format-checker from 1.10 to 1.11 - + Bumps [wolletd/clang-format-checker](https://github.com/wolletd/clang-format-checker) from 1.10 to 1.11. - [Release notes](https://github.com/wolletd/clang-format-checker/releases) - [Commits](https://github.com/wolletd/clang-format-checker/compare/v1.10...v1.11) - + --- updated-dependencies: - dependency-name: wolletd/clang-format-checker dependency-type: direct:production update-type: version-update:semver-minor ... - + Signed-off-by: dependabot[bot] commit 520b9dce03d695cd1d95432e6bf52ed47d046cd4 @@ -2272,18 +5096,18 @@ Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Jan 29 21:22:56 2024 +0000 github: [skip ci]: bump ammaraskar/gcc-problem-matcher - + Bumps [ammaraskar/gcc-problem-matcher](https://github.com/ammaraskar/gcc-problem-matcher) from 0.2.0 to 0.3.0. - [Release notes](https://github.com/ammaraskar/gcc-problem-matcher/releases) - [Commits](https://github.com/ammaraskar/gcc-problem-matcher/compare/0.2.0...0.3.0) - + --- updated-dependencies: - dependency-name: ammaraskar/gcc-problem-matcher dependency-type: direct:production update-type: version-update:semver-minor ... - + Signed-off-by: dependabot[bot] commit 3426b153d02d9d8d3e909eff9d18cb14108072ca @@ -2333,7 +5157,7 @@ Author: Daniel-Constantin Mierla Date: Sat Jan 27 09:57:24 2024 +0100 sdpops: added sdp line interator functions and variables - + - walk sdb lines in the message body (also for multipart body) - append/insert/remove line of the current iterator - variable to get the value of the curent iterator @@ -2391,7 +5215,7 @@ Author: Victor Seva Date: Fri Jan 26 09:03:37 2024 +0100 pkg/kamailio/deb: restore tls_wolfssl for bookworm and jammy - + fixed build error at 43ec11a7e0a37dfdaead873d555b26cb65589bd1 commit 4db5d7eb3fb34ad1282c9ded9b2d05b3f81fd476 @@ -2399,7 +5223,7 @@ Author: Daniel-Constantin Mierla Date: Thu Jan 25 20:11:19 2024 +0100 core: mem - relocated unfinished memory allocators to archive repository - + - many years without development activity commit 43ec11a7e0a37dfdaead873d555b26cb65589bd1 @@ -2407,7 +5231,7 @@ Author: S-P Chan Date: Thu Jan 25 21:44:07 2024 +0800 tls_wolfssl: allow building with debian libwolfssl35 - + - internal submodule is v5.6.6-stable - libwolfssl35 is at v5.5.4-stable @@ -2416,7 +5240,7 @@ Author: Victor Seva Date: Thu Jan 25 12:23:47 2024 +0100 pkg/kamailio/deb: remove support for tls_wolfssl on bookworm/jammy - + > module expects wolfssl ~ v5.6.6-stable which is equivalent to libwolfssl42(5.6.6-1.2) libwolfssl-dev_5.6.6 commit 5d3c11c5e0854ce74424a10a88b0cca4453cee75 @@ -2436,7 +5260,7 @@ Author: Morten Tryfoss Date: Wed Jan 24 21:16:08 2024 +0100 ims_charging: Add option to get and use P-Access-Network-Info for terminating scenario (#3726) - + Add option to configure node functionality for Ro requests commit ba36c65dfb2a6608dd7d51422a7ed021206bcae3 @@ -2450,7 +5274,7 @@ Author: Daniel-Constantin Mierla Date: Wed Jan 24 17:17:23 2024 +0100 tm: docs - update to use send_reply_error() when t_relay() fails - + - the transaction might be already created and needs a stateful reply commit 76b7beef6d089272b749aa53f29e100711aa4c50 @@ -2488,7 +5312,7 @@ Author: Daniel-Constantin Mierla Date: Tue Jan 23 21:05:41 2024 +0100 tm: release transaction on kill if a final response was sent - + - do not send another final response for error cases commit 0f8f4d6926e53ca5e526a11729f6ee6277b185b9 @@ -2508,7 +5332,7 @@ Author: S-P Chan Date: Sun Jan 21 18:17:37 2024 +0800 tls_wolfssl: refactor custom BIO - + - remove use of custom BIO at the expense of some memory copies commit 88f27e2b89142652ea1b8f133df1ff403f9f61b2 @@ -2522,7 +5346,7 @@ Author: S-P Chan Date: Thu Jan 18 12:38:09 2024 +0800 tls_wolfssl: clean-up OpenSSL compatibility - + - remove unneeded OpenSSL-isms commit 100d96bf3819082ac38f8a4fae1f3c64c8d0c5e1 @@ -2530,19 +5354,19 @@ Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Jan 22 21:58:56 2024 +0000 github: [skip ci]: bump tj-actions/changed-files from 41 to 42 - + Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 41 to 42. - [Release notes](https://github.com/tj-actions/changed-files/releases) - [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md) - [Commits](https://github.com/tj-actions/changed-files/compare/v41...v42) - + --- updated-dependencies: - dependency-name: tj-actions/changed-files dependency-type: direct:production update-type: version-update:semver-major ... - + Signed-off-by: dependabot[bot] commit 569b536404afd855742a42320d7c858a8bb4952b @@ -2550,7 +5374,7 @@ Author: Daniel-Constantin Mierla Date: Mon Jan 22 14:11:29 2024 +0100 tm: mark request with final reply flag - + - send error function checks flag and returns if set to avoid sending more than one final reply in case of failure @@ -2559,7 +5383,7 @@ Author: Daniel-Constantin Mierla Date: Mon Jan 22 14:02:47 2024 +0100 sl: mark request with final reply flag - + - send error function checks flag and returns if set to avoid sending more than one final reply in case of failures @@ -2610,7 +5434,7 @@ Author: Victor Seva Date: Fri Jan 19 15:40:06 2024 +0100 github: remove cleanup workflow [skip ci] - + it's removing untagged images that are layers of the tagged ones commit f59dacf7993da83553cd67de516fc31f493d2a7d @@ -2618,10 +5442,10 @@ Author: Stefan-Cristian Mititelu Date: Fri Jan 19 15:54:15 2024 +0200 p_usrloc: Add missing api function get_udomain() - + When registrar kemi save()/save_uri() function is called, then usrloc api function get_udomain() is called. - + This usrloc api function is missing in p_usrloc module and results in a segfault. @@ -2636,7 +5460,7 @@ Author: Daniel-Constantin Mierla Date: Fri Jan 19 10:18:33 2024 +0100 pv: increase the number of slots for transformations - + - safer handling of chained transformations commit 59104fe7d57bc8c75c835bbb75d5a1b7d01f6bda @@ -2692,7 +5516,7 @@ Author: Daniel-Constantin Mierla Date: Wed Jan 17 17:49:33 2024 +0100 kex: added is_myhost(uri) - check if host part only is local - + - similar to is_myself() but ignores the port and protocol commit 79697b4d565665b696ee39021e27d82e716bc176 @@ -2706,12 +5530,12 @@ Author: S-P Chan Date: Thu Jan 18 06:38:29 2024 +0800 pkg: RPM spec use automatic dependency for wolfssl - + - wolfssl doesn't follow semantic versioning - let RPM figure out the correct runtime library name depending on the -devel package used for building i.e. based on the package used for pkgconfig(wolfssl) - + e.g. if wolfssl35-devel - then libwolfssl.so.35 if wolfssl42-devel - then libwolfssl.so.42 @@ -2726,7 +5550,7 @@ Author: Elena-Ramona Modroiu Date: Tue Jan 16 16:07:43 2024 +0100 tls: set parameter name for tls_h_mod_randctx() - + - without it fails to compile on Unbuntu 22.04 with low latency kernel commit 14828091b06dca86c91659d705a4f58a6fead4d3 @@ -2734,7 +5558,7 @@ Author: Daniel-Constantin Mierla Date: Tue Jan 16 13:10:34 2024 +0100 rtp_media_server: use local user for building contact - + - GH #3380 commit 167d8af9ff1c55804a66cc948670ab1d3069e063 @@ -2766,7 +5590,7 @@ Author: Victor Seva Date: Tue Jan 16 09:33:20 2024 +0100 github: add default registry credentials [skip ci] - + > https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idcontainercredentials commit a752fde2fd2eb3615d16eb8940364ceea2f7d79c @@ -2780,7 +5604,7 @@ Author: Xenofon Karamanos Date: Mon Jan 15 17:22:06 2024 +0000 usrloc: synchronize attributes from DMQ (GH #3679) - + - make ucontact_xavp_store static and add some comments - change order of xavp operations in ucontact_xavp_store to not overwrite DMQ xavp - add logic to receive xavp information from DMQ and save it in the contact @@ -2808,7 +5632,7 @@ Author: Victor Seva Date: Mon Jan 15 15:03:15 2024 +0100 github: use CLEAN_PACKAGES secret at cleanup workflow - + kamailio-sync PAT with delete:packages permissions as described > https://github.com/camargo/delete-untagged-action @@ -2877,7 +5701,7 @@ Author: S-P Chan Date: Sun Jan 14 14:08:03 2024 +0800 tls: remove thread-enablement on EVP_RAND_CTX - + - with late initialisation it is not necessary to enable thread locking on EVP_RAND_CTX - the function remains but is not used in case requirements change @@ -2888,7 +5712,7 @@ Author: Дилян Палаузов Date: Thu Jan 11 08:21:00 2024 +0100 core: keep listen socket even if advertise address does not resolve - + - the core advertise_address parameter works in the same fashion - previously it was starting by skipping the listen, which resulted in unexpected runtime list of sockets @@ -2996,7 +5820,7 @@ Author: Daniel-Constantin Mierla Date: Wed Jan 10 13:07:14 2024 +0100 usrloc: option to randomize when keepalive is sent - + - default adds a range from 0 to 20 seconds to ka_interval commit 03f939e3d1a0dbf56791943f90942984984f2d72 @@ -3016,7 +5840,7 @@ Author: Daniel-Constantin Mierla Date: Wed Jan 10 12:24:39 2024 +0100 usrloc: added keepalive interval to set the step for sending - + - the keepalive is not going to be sent before the interval elapsed - the keepalive is no longer sent on every timer callback - default 40 seconds @@ -3038,7 +5862,7 @@ Author: Daniel-Constantin Mierla Date: Tue Jan 9 14:06:21 2024 +0100 htable: read rpc number value as long - + - remove autoconvert for number, it is only for string values - GH #3674 @@ -3071,7 +5895,7 @@ Author: Daniel-Constantin Mierla Date: Tue Jan 9 11:56:50 2024 +0100 gcrypt: added aes_mode parameter - + - specify AES encryption mode: - 0: ECB (GCRY_CIPHER_MODE_ECB) - default - 1: CBC (GCRY_CIPHER_MODE_CBC) @@ -3093,7 +5917,7 @@ Author: Daniel-Constantin Mierla Date: Tue Jan 9 10:49:48 2024 +0100 gcrypt: added functions to generate random call-id in uuid format - + - alternative to the option offered by crypto module commit db8dd08b5506ac40314b70386b9ea83b509e17b1 @@ -3107,7 +5931,7 @@ Author: Daniel-Constantin Mierla Date: Mon Jan 8 20:00:26 2024 +0100 gcrypt: new module for crypto functions - + - uses the GNU libgcrypt library - implemented AES256 ECB encrypt/decrypt functions @@ -3116,7 +5940,7 @@ Author: Xenofon Karamanos Date: Thu Jan 4 11:43:21 2024 +0000 parser/contact: Change addition order to the end of list - + - Contacts are now added at the end of the list. - hfl(Contact)[index] is now returning in the correct order. @@ -3167,7 +5991,7 @@ Author: Daniel-Constantin Mierla Date: Sat Jan 6 16:35:50 2024 +0100 pdb: pass structure by pointer to debug function - + - avoid copying large parameter value commit 95d8d9374a0e4385fd549078fcf56ecadef424a0 @@ -3193,7 +6017,7 @@ Author: Xenofon Karamanos Date: Thu Jan 4 09:53:29 2024 +0000 pv_core: Fix negative index bug for hfl() - + Before: -1 yielded null and -2 the last element of a header commit 1c70775530b1a3a905e8a983610cb0d092b0d240 @@ -3201,7 +6025,7 @@ Author: S-P Chan Date: Fri Jan 5 08:09:34 2024 +0800 tls: thread-local, revert 1a9b0b6361 as double-layer locking is redundant - + - the 2nd lock was put in place as defensive programming for shm contention - GH #3695: the underlying issue is early init of thread-locals @@ -3217,7 +6041,7 @@ Author: S-P Chan Date: Thu Jan 4 21:56:00 2024 +0800 tls: OpenSSL 1.1.1 thread-local, init libssl in thread - + - no need for RAND workaround; default is OpenSSL 1.1.1 RAND - linux/pthreads will handle forking @@ -3244,7 +6068,7 @@ Author: S-P Chan Date: Thu Jan 4 20:00:09 2024 +0800 tls: OpenSSL 3.x thread-local, init libssl in thread or PROC_SIPINIT - + - avoid initialising ERR_STATE in rank 0(thread#1) commit aef9cec329893f58b0c7df5aec2050b6c3cecc60 @@ -3276,7 +6100,7 @@ Author: Daniel-Constantin Mierla Date: Wed Jan 3 22:18:58 2024 +0100 lcr: added module prefix to db_url global variable - + - safety for symbols overlapping commit f0fbf4d74b8090614469b2a6a16f187275c4f067 @@ -3284,7 +6108,7 @@ Author: Daniel-Constantin Mierla Date: Wed Jan 3 22:14:32 2024 +0100 dmq: rename global variables with short name - + - safety for symbols overlapping commit ae90cb489cd07aac42994fbaa124966a34cd4514 @@ -3310,7 +6134,7 @@ Author: Daniel-Constantin Mierla Date: Mon Jan 1 22:23:07 2024 +0100 uac: global variable made static - + - renamed to avoid symbol conflicts commit 619c7fe6db9c090ef9645ec8a39d43d00ba215bf @@ -3324,7 +6148,7 @@ Author: Daniel-Constantin Mierla Date: Sun Dec 31 09:35:08 2023 +0100 sca: removed if on rc before being set - + - reorder some conditions on range commit 6c129bdc87352d0d883cc46fce0b78444e619084 @@ -3368,13 +6192,13 @@ Author: Daniel-Constantin Mierla Date: Fri Dec 29 09:43:10 2023 +0100 siputils: added tel2sip2() function - + - based on proposal presented at: https://github.com/kamailio/kamailio/issues/1173#issuecomment-315198949 - alternative to tel2sip() which has a simpler approach, but it does not follow all the RFC requirements. This is still kept as it proved to be useful over the years - + Co-authored-by: Donald Carr Co-authored-by: Supreeth Herle @@ -3419,7 +6243,7 @@ Author: Dennis Yurasov Date: Wed Dec 20 16:11:56 2023 +0300 dialog: fixed saving dialogs on shutdown that are already loaded at startup when using db_mode 3 - + - The dialogs that loaded at startup are not saved in DB on shutdown, and so not loaded at restart, fixes issue #3669 @@ -3428,7 +6252,7 @@ Author: Nikolay Ivanuschak Date: Mon Dec 18 22:20:50 2023 +0300 core: fixed haproxy protocol parser - + fixes GH #3683 commit 23a1d06737fa6d2509b6f88574ad171aa32cf275 @@ -3460,7 +6284,7 @@ Author: Daniel-Constantin Mierla Date: Tue Dec 26 17:42:48 2023 +0100 xhttp_prom: renamed global ctx variable - + - avoid short name code scanner warning and shadowing with function parameter @@ -3469,7 +6293,7 @@ Author: Daniel-Constantin Mierla Date: Tue Dec 26 17:11:34 2023 +0100 tm: remove redundant check in if condition - + - else branch is already for >= 200 commit 09318b6d0f224cace31d7db925f792b66cefd469 @@ -3477,7 +6301,7 @@ Author: Daniel-Constantin Mierla Date: Tue Dec 26 14:35:05 2023 +0100 seas: if expression on else not needed - + - evaluation of it is true on else branch commit 440a9955b4ce21b8c3dae9d6159d24a92ec28e7c @@ -3485,7 +6309,7 @@ Author: Daniel-Constantin Mierla Date: Mon Dec 25 22:12:24 2023 +0100 ss7ops: adapt if expression for uint - + - equal 0 or less than 1 is same in this case commit 439d451ab3172c1a22f88fd4ba0756ede2318191 @@ -3493,19 +6317,19 @@ Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Dec 25 21:41:49 2023 +0000 github: [skip ci]: bump tj-actions/changed-files from 40 to 41 - + Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 40 to 41. - [Release notes](https://github.com/tj-actions/changed-files/releases) - [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md) - [Commits](https://github.com/tj-actions/changed-files/compare/v40...v41) - + --- updated-dependencies: - dependency-name: tj-actions/changed-files dependency-type: direct:production update-type: version-update:semver-major ... - + Signed-off-by: dependabot[bot] commit 973803b0a3944b9de7ebdc4366b23e933e66ffbe @@ -3525,7 +6349,7 @@ Author: Daniel-Constantin Mierla Date: Sun Dec 24 17:21:57 2023 +0100 Makefile.groups: removed auth_identity module - + - relocated to kamailio-archive repository commit 5192e5d275761ccd1af49d4bf9dd12e1438947b7 @@ -3539,7 +6363,7 @@ Author: Daniel-Constantin Mierla Date: Sat Dec 23 17:20:40 2023 +0100 auth_identity: module relocated to kamailio-archive repository - + - module is considered obsolete, not maintained - based on precursor specs of stir/shaken, not actually deployed in production by carriers @@ -3557,7 +6381,7 @@ Author: Daniel-Constantin Mierla Date: Fri Dec 22 14:50:59 2023 +0100 tm: make lookup event_route[tm:local-response] only once - + - related to issue #3064 and PR #3687 commit 61efad28eeb84d8b8f80fe7fd38d7bbb634717f4 @@ -3565,7 +6389,7 @@ Author: Victor Seva Date: Fri Dec 22 10:02:45 2023 +0100 seas: fix build warning - + > CC (gcc) [M seas.so] encode_contact.o > encode_allow.c:40: warning: "_GNU_SOURCE" redefined > 40 | #define _GNU_SOURCE @@ -3577,7 +6401,7 @@ Author: Victor Seva Date: Fri Dec 22 10:00:32 2023 +0100 pv: fix build warning - + > CC (gcc) [M pv.so] pv_xavp.o > pv_core.c: In function 'pv_get_cnt': > pv_core.c:2841:61: warning: 'ravp' may be used uninitialized [-Wmaybe-uninitialized] @@ -3592,7 +6416,7 @@ Author: Victor Seva Date: Fri Dec 22 09:58:39 2023 +0100 db_text: fix build warning - + > CC (gcc) [M db_text.so] dbt_raw_query.o > dbt_raw_query.c:23: warning: "_GNU_SOURCE" redefined > 23 | #define _GNU_SOURCE @@ -3604,7 +6428,7 @@ Author: Victor Seva Date: Fri Dec 22 09:57:25 2023 +0100 cfgt: fix build warning - + > CC (gcc) [M cfgt.so] cfgt_mod.o > cfgt_int.c:22: warning: "_GNU_SOURCE" redefined > 22 | #define _GNU_SOURCE @@ -3616,7 +6440,7 @@ Author: Victor Seva Date: Fri Dec 22 09:56:08 2023 +0100 benchmark: fix build warning - + > CC (gcc) [M benchmark.so] benchmark.o > benchmark.c:41: warning: "_GNU_SOURCE" redefined > 41 | #define _GNU_SOURCE @@ -3628,7 +6452,7 @@ Author: Victor Seva Date: Fri Dec 22 09:53:16 2023 +0100 jansson: fix build warning - + > CC (gcc) [M jansson.so] jansson_utils.o > jansson_utils.c:23: warning: "_GNU_SOURCE" redefined > 23 | #define _GNU_SOURCE @@ -3640,7 +6464,7 @@ Author: Victor Seva Date: Fri Dec 22 09:51:28 2023 +0100 auth_identity: fix build warning - + > CC (gcc) [M auth_identity.so] auth_dynstr.o > auth_crypt.c:29: warning: "_GNU_SOURCE" redefined > 29 | #define _GNU_SOURCE @@ -3652,7 +6476,7 @@ Author: Victor Seva Date: Fri Dec 22 09:49:43 2023 +0100 main: fix build warning - + > CC (gcc) [kamailio] core/atomic_ops.o > main.c:34: warning: "_GNU_SOURCE" redefined > 34 | #define _GNU_SOURCE @@ -3664,7 +6488,7 @@ Author: Victor Seva Date: Fri Dec 22 09:32:10 2023 +0100 ims_qos: fix build warning - + > CC (gcc) [M ims_qos.so] rx_avp.o > [...] > /usr/include/fortify/stdio.h:122:16: warning: 'int_port_rctp_a' may be used uninitialized [-Wmaybe-uninitialized] @@ -3676,7 +6500,7 @@ Author: Victor Seva Date: Fri Dec 22 09:19:50 2023 +0100 core: fix build warning - + > core/parser/parse_diversion.c: In function 'parse_diversion_body': core/parser/parse_diversion.c:60:18: warning: the comparison will always evaluate as 'false' for the address of 'uri_b' will never be NULL [-Waddress] > 60 | if(uri_b == NULL) { > | ^~ @@ -3690,7 +6514,7 @@ Author: Victor Seva Date: Fri Dec 22 09:13:28 2023 +0100 pkg/kamailio/alpine: remove app_sqlang module [skip ci] - + module was moved to kamailio-archive repository commit 268147a7a7bcf68689a913a94faecc87128187fb @@ -3698,7 +6522,7 @@ Author: Victor Seva Date: Fri Dec 22 09:00:08 2023 +0100 core: fix build warning - + > CC (gcc) [M jansson.so] jansson_utils.o > jansson_utils.c:23: warning: "_GNU_SOURCE" redefined > 23 | #define _GNU_SOURCE @@ -3710,7 +6534,7 @@ Author: Victor Seva Date: Fri Dec 22 08:51:39 2023 +0100 ndb_redis: replace use of grep -P - + PCRE option is been removed in BusyBox #3686 commit 163028549df3abd3173a7c0ac8a9dc666c0e4879 @@ -3718,7 +6542,7 @@ Author: Victor Seva Date: Fri Dec 22 08:48:21 2023 +0100 db_redis: replace use of grep -P - + PCRE option is been removed in BusyBox #3686 commit 4c93985437122706bc68143b2f96a9d7f35be16d @@ -3738,7 +6562,7 @@ Author: Daniel-Constantin Mierla Date: Thu Dec 21 13:56:28 2023 +0100 sms: define buffer size for name field - + - check size before copy and trucate large messages commit b2045d559ed720789df80f543fc00923a07ada83 @@ -3776,7 +6600,7 @@ Author: Daniel-Constantin Mierla Date: Wed Dec 20 10:04:24 2023 +0100 app_sqlang: module relocated to kamailio-archive repository - + - module is considered obsolete, not maintained - app_jsdt should be considered a better alternative, or app_lua, app_python3/s @@ -3794,7 +6618,7 @@ Author: Daniel-Constantin Mierla Date: Wed Dec 20 09:33:17 2023 +0100 pipelimit: renamed global variable with module prefix - + - avoid overlapping global symbols commit 17e9e3f447867e34b8f320b8b93189f01fbc3f77 @@ -3802,7 +6626,7 @@ Author: Daniel-Constantin Mierla Date: Wed Dec 20 09:30:01 2023 +0100 sipcapture: removed unused global variable - + - renamed local function variable that was conflicting commit 1068bbbf9a7f2bf96d9ee2cefa1b81fbabac9805 @@ -3816,7 +6640,7 @@ Author: Daniel-Constantin Mierla Date: Tue Dec 19 10:50:56 2023 +0100 ims_dialog: refactored kemi get/set profile functions - + - expect final string values in the parameters, not with kamailio-specific variables, they can conflict in the external scripting languages and also leak pkg memory @@ -3838,18 +6662,18 @@ Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Dec 18 21:31:57 2023 +0000 github: [skip ci]: bump actions/upload-artifact from 3 to 4 - + Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v3...v4) - + --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... - + Signed-off-by: dependabot[bot] commit b2f1cd6ed2cd5da84fe8ff48db688fc41f129ccb @@ -3857,19 +6681,19 @@ Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Dec 18 21:31:53 2023 +0000 github: [skip ci]: bump github/codeql-action from 2 to 3 - + Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/v2...v3) - + --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-major ... - + Signed-off-by: dependabot[bot] commit 0e5b8178de281db5ddfe30af28244a1ebaf12382 @@ -4015,11 +6839,11 @@ Author: Sean Bright Date: Mon Dec 11 10:21:20 2023 -0500 utils: Prefer `printf` over `echo -e`. - + On Ubuntu, `/bin/sh` defaults to `dash` whose built-in `echo` command does not support the `-e` flag. `printf`, on the other hand, supports backslash escapes by default so we use that instead. - + In passing, also clean up some messy ANSI escape codes. commit 14e763fd15a846d4377214521cac06113ba6888d @@ -4027,19 +6851,19 @@ Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Dec 11 21:04:57 2023 +0000 github: [skip ci]: bump actions/stale from 8 to 9 - + Bumps [actions/stale](https://github.com/actions/stale) from 8 to 9. - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/stale/compare/v8...v9) - + --- updated-dependencies: - dependency-name: actions/stale dependency-type: direct:production update-type: version-update:semver-major ... - + Signed-off-by: dependabot[bot] commit ee2ad77aa71326d355e299625ebbd31f67f8ed20 @@ -4125,7 +6949,7 @@ Author: Daniel-Constantin Mierla Date: Fri Dec 8 12:34:56 2023 +0100 tls: init early the local lock for memory - + - needed to done before mod param init_mode is set - runtime uses the modparam to do lock/unlock - #3668 @@ -4165,7 +6989,7 @@ Author: Xenofon Karamanos Date: Fri Dec 8 11:01:39 2023 +0100 core: parser extended to handle diversion with multiple bodies - + - similar to PAI and PPI commit 6d14b4e439aec3d046addfa776a4be5f471a33f0 @@ -4173,7 +6997,7 @@ Author: Daniel-Constantin Mierla Date: Fri Dec 8 10:20:14 2023 +0100 lib/srdb1: rework store of long long values as number if value fits - + - GH #2106 commit c79f28b11f2683d11aafa72427efb15c95196b8b @@ -4187,7 +7011,7 @@ Author: Péter Barabás Date: Wed Dec 6 21:16:46 2023 +0100 uac: fix socket length settings - + - set _uac_req.s_sock.len value to 0 in pv_set_uac_req() method in case of "all" case - change setting of _uac_req.s_apasswd.len to _uac_req.s_sock.len in pv_set_uac_req() method in case of "sock" case @@ -4196,7 +7020,7 @@ Author: Daniel-Constantin Mierla Date: Thu Dec 7 13:00:50 2023 +0100 tls: rework init mode 1 to set PTHREAD_PROCESS_SHARED - + - pthread mutex set in shm - GH #3635 @@ -4205,7 +7029,7 @@ Author: Victor Seva Date: Thu Dec 7 11:41:44 2023 +0100 pv_headers: rearrange module parameters - + * pvh_ prefix for global variables commit 890dc5f017084481cd2b0f0d759939393fa115bc @@ -4225,7 +7049,7 @@ Author: Victor Seva Date: Wed Dec 6 12:54:50 2023 +0100 cfgt: rearrange mod parameters - + * use _cfgt_ prefix for init_flag commit b7b3f94f949feed3cf9e2e3adf3b4596e6e20eac @@ -4233,7 +7057,7 @@ Author: Daniel-Constantin Mierla Date: Wed Dec 6 08:42:41 2023 +0100 core: xavp - serialize long long values - + - they are printed as unsigned values, same as for long values commit e0909ab1c890b11204dd38b26283cba5fad289c7 @@ -4253,7 +7077,7 @@ Author: Daniel-Constantin Mierla Date: Tue Dec 5 19:30:21 2023 +0100 phonenum: Makefile - option to set C standard version - + - can be set via option CSTDVER - defaults now to c++17 - GH #3659 @@ -4263,7 +7087,7 @@ Author: Daniel-Constantin Mierla Date: Tue Dec 5 15:08:50 2023 +0100 core: remove unnecessary condition on msg - + - the structure is already used before commit 3a02bf42bc182e0eb809e63d8fe828e3ece5f1da @@ -4277,7 +7101,7 @@ Author: Daniel-Constantin Mierla Date: Tue Dec 5 12:18:33 2023 +0100 topoh: reorder conditions for safety of cleaning on error - + - in the part related to the new th_build_socket_strings() internal function commit 0d78a1add4292ff1e10347c0199f0d70d31678ea @@ -4297,7 +7121,7 @@ Author: Daniel-Constantin Mierla Date: Tue Dec 5 10:27:32 2023 +0100 dialog: prevent duplicate of leg1 attributes in json for dmq - + - reported by #3656 commit 2f98aaca9e4b71b8086abce4c2b41c215fb2a26f @@ -4329,10 +7153,10 @@ Author: Daniel-Constantin Mierla Date: Fri Dec 1 13:34:00 2023 +0100 ims_ipsec_pcscf: options for ipsec_forward() to use Via or try TCP - + - option to use Via attributes for routing reply - option to try over TCP if correxponding UDP socket is not found - + Co-authored-by: Supreeth Herle commit 580915bade64db034a2ee25c616addc38220c183 @@ -4340,10 +7164,10 @@ Author: Daniel-Constantin Mierla Date: Thu Nov 30 21:01:45 2023 +0100 ims_ipsec_pcscf: reparse request buffer to get contact when handling reply - + - clone aor in pkg to store the value - trim aor value when the parameters start - + Co-authored-by: Supreeth Herle commit 57794cd14205a16ed6c649fadb4efffca1561986 @@ -4381,7 +7205,7 @@ Author: Daniel-Constantin Mierla Date: Wed Nov 29 15:41:55 2023 +0100 ims_ipsec_pcscf: use core fixup helper functions - + - remove unused parameter for w_destroy_by_contact() commit 279454ff8d4e5804d92a8690c4de3a507efbc44f @@ -4389,7 +7213,7 @@ Author: Supreeth Herle Date: Wed Nov 29 15:39:39 2023 +0100 ims_ipsec_pcscf: new function to destroy IPSec based on Contact and received IP and port - + - the default ipsec_destroy() cannot be used to used destroy IPSec in any route and needed to be used exactly after all the de-registration process was complete. But, as per the kamailio P-CSCF config script, ipsec_destroy() was used in reply route of @@ -4415,7 +7239,7 @@ Author: Supreeth Herle Date: Wed Nov 29 14:09:02 2023 +0100 ims_qos: option to set DLG_MOBILE_ORIGINATING for rx_add_media_component_description_avp() - + - alternative to DLG_MOBILE_REGISTER that can be set with mod param dialog_direction @@ -4430,7 +7254,7 @@ Author: Supreeth Herle Date: Wed Nov 29 13:27:10 2023 +0100 ims_qos: option to use received ip, port and proto from via - + - can help with Rx_AAR_Register when EPC is behind a NAT - there could be an Rx AAR failure due to wrong IP address in Framed IP address field of Rx AAR message when EPC is behind a NAT @@ -4446,7 +7270,7 @@ Author: Supreeth Herle Date: Wed Nov 29 13:08:06 2023 +0100 ims_registrar_pcscf: option to delay record expiration instead of immediate delete - + - new parameter delete_delay commit 3b2bffc92ab0f684f8731c02f080d8df4392de5d @@ -4454,7 +7278,7 @@ Author: Supreeth Herle Date: Wed Nov 29 12:38:53 2023 +0100 ims_usrloc_scscf: improve contact lookup for an IMPU - + - commit e49469c0ce534879a7d366c71374356e7883c6f2 @@ -4468,7 +7292,7 @@ Author: Kristian Hogh Date: Thu Nov 30 06:19:15 2023 +0000 nathelper: add Max-Forwards headers which is mandatory for OPTIONS according to RFC 3261 (GH 3657) - + - add Max-Forwards headers which is mandatory for OPTIONS according to RFC 3261 - similar patch is used from several large customer installations since many years - GH #3657 with small formatting change @@ -4478,7 +7302,7 @@ Author: Victor Seva Date: Wed Nov 29 17:21:59 2023 +0100 Makefile.groups: fix ktls when KTLS_INCLUDE_TLSA is not set - + fix #3660 commit 2b27aba7f4f396e4ebd894255abfa8ce20950313 @@ -4504,7 +7328,7 @@ Author: Daniel-Constantin Mierla Date: Tue Nov 28 10:19:01 2023 +0100 jansson: rename parameter for janssonmod_get_field() - + - more suggestive relation with the meaning of the field name parameter commit 9eeab4396d8ec57781244ab80c4a96539d7338ec @@ -4518,7 +7342,7 @@ Author: Daniel-Constantin Mierla Date: Tue Nov 28 08:01:53 2023 +0100 jansson: use key as field name for jansson_get_field() - + - do no try to evaluate it as json path commit 525dc4523ac411e1154c3ae8af1ec6f8678d1dbc @@ -4568,7 +7392,7 @@ Author: Daniel-Constantin Mierla Date: Mon Nov 27 14:02:25 2023 +0100 topoh: mask_ip initialized again to 127.0.0.8 - + - docs updated - code formatting updated by pre-commit hooks @@ -4583,10 +7407,10 @@ Author: Victor Seva Date: Mon Nov 27 12:53:47 2023 +0100 github: react to PR/issue comments [skip ci] - + ``/notstale`` will remove ``stale`` label ``/notexpired`` will change the status to ``open`` - + > https://github.com/marketplace/actions/github-script commit 8bfe55c68a06492c93a327eff6813fa0da8399dd @@ -4594,9 +7418,9 @@ Author: TorPetterson <32388321+TorPetterson@users.noreply.github.com> Date: Mon Nov 27 13:50:09 2023 +0100 topoh: uses socket IP when no mask_ip is defined (#3341) - + * topoh: uses socket IP when no mask_ip is defined - + If the parameter mask_ip is not defined the module finds the socket IP and uses that as mask IP for the message. If the socket has an advertised IP it is used, otherwise the socket IP is used. @@ -4612,7 +7436,7 @@ Author: Wolfgang Kampichler Date: Sat Nov 25 11:06:21 2023 +0100 lost: support of shape representations (as in RFC5491) and new 3d parameter - + - A Presence Information Data Format Location Object (PIDF-LO) may contain one of the shape types as listed in RFC5491. A LoST findService request currently contains only a profile for @@ -4632,7 +7456,7 @@ Author: Daniel-Constantin Mierla Date: Fri Nov 24 12:14:14 2023 +0100 core: added core parameter mem_add_size - + - default value 0 - to be used to add extra space to allocated chunks for safety purposes when external libraries expose buffer overflows @@ -4642,7 +7466,7 @@ Author: Victor Seva Date: Fri Nov 24 12:49:29 2023 +0100 pkg/kamailio/deb: don't build tlsa for xenial [skip ci] - + We are getting errors on build: > gcc -shared -g -m64 -Wl,-O2 -Wl,-E -Wl,-Bsymbolic-functions -Wl,-z,relro -pthread -rdynamic "-ldl" -Wl,-Bsymbolic-functions tls_domain.o tls_cfg.o tls_init.o tls_verify.o tls_locking.o tls_select.o tls_dump_vf.o tls_bio.o tlsa_mod.o tls_server.o tls_rpc.o tls_ct_wrq.o tls_rand.o tls_map.o tls_util.o tls_config.o -lm /usr/lib/x86_64-linux-gnu/libssl.a /usr/lib/x86_64-linux-gnu/libcrypto.a -o tlsa.so > /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libssl.a(s3_meth.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC @@ -4661,7 +7485,7 @@ Author: Daniel-Constantin Mierla Date: Fri Nov 24 10:38:49 2023 +0100 Makefile.groups: tlsa in packaging group ktls if KTLS_INCLUDE_TLSA=yes - + - if not, then it is in separate group module_group_ktlsa commit 93609b53d70df84788741800fc2b80c5502a3358 @@ -4669,7 +7493,7 @@ Author: Daniel-Constantin Mierla Date: Thu Nov 23 12:35:48 2023 +0100 websocket: use literal module name for stats group - + - prevent conflicts with global exports commit 186ae3eef7f3e1b5ad6222c98a2f35a487deb316 @@ -4677,7 +7501,7 @@ Author: Daniel-Constantin Mierla Date: Thu Nov 23 12:35:47 2023 +0100 usrloc: use literal module name for stats group - + - prevent conflicts with global exports commit a9d29645ab417c9b0f7afc6745e6dd54bdac07b4 @@ -4685,7 +7509,7 @@ Author: Daniel-Constantin Mierla Date: Thu Nov 23 12:35:47 2023 +0100 tsilo: use literal module name for stats group - + - prevent conflicts with global exports commit d4c0e1bbcb0e423a545650aad4fbb4b2da8bb488 @@ -4693,7 +7517,7 @@ Author: Daniel-Constantin Mierla Date: Thu Nov 23 12:35:47 2023 +0100 tmx: use literal module name for stats group - + - prevent conflicts with global exports commit 96bdd69945af9f08e6c89fb725248b8b268ee71a @@ -4701,7 +7525,7 @@ Author: Daniel-Constantin Mierla Date: Thu Nov 23 12:35:47 2023 +0100 sst: use literal module name for stats group - + - prevent conflicts with global exports commit 92cdcb4bd280850743b3a952f1b6003be69daaf2 @@ -4709,7 +7533,7 @@ Author: Daniel-Constantin Mierla Date: Thu Nov 23 12:35:47 2023 +0100 siptrace: use literal module name for stats group - + - prevent conflicts with global exports commit 01abed3ef17f6a5f0f215675a2980f0b9a4267fd @@ -4717,7 +7541,7 @@ Author: Daniel-Constantin Mierla Date: Thu Nov 23 12:35:47 2023 +0100 sipcapture: use literal module name for stats group - + - prevent conflicts with global exports commit 0516fb802628ddb659a130aa2959df5b0b8e0c96 @@ -4725,7 +7549,7 @@ Author: Daniel-Constantin Mierla Date: Thu Nov 23 12:35:47 2023 +0100 registrar: use literal module name for stats group - + - prevent conflicts with global exports commit a951cb44ecbcd0f9cba937176ea5117c6a1d15b6 @@ -4733,7 +7557,7 @@ Author: Daniel-Constantin Mierla Date: Thu Nov 23 12:35:47 2023 +0100 p_usrloc: use literal module name for stats group - + - prevent conflicts with global exports commit f35f327a528670dcca0d7a767643a222f1aebd89 @@ -4741,7 +7565,7 @@ Author: Daniel-Constantin Mierla Date: Thu Nov 23 12:35:47 2023 +0100 nat_traversal: use literal module name for stats group - + - prevent conflicts with global exports commit 609960812c572d2d19ba774b064fdf7e2ac45765 @@ -4749,7 +7573,7 @@ Author: Daniel-Constantin Mierla Date: Thu Nov 23 12:35:47 2023 +0100 msilo: use literal module name for stats group - + - prevent conflicts with global exports commit d29b3d6515f74d4cd7417dc9030d8ca53d57054e @@ -4757,7 +7581,7 @@ Author: Daniel-Constantin Mierla Date: Thu Nov 23 12:35:47 2023 +0100 ims_usrloc_pcscf: use literal module name for stats group - + - prevent conflicts with global exports commit 641d29820f8536247c49d5fb4caa882764dbd9af @@ -4765,7 +7589,7 @@ Author: Daniel-Constantin Mierla Date: Thu Nov 23 12:35:47 2023 +0100 ims_registrar_scscf: use literal module name for stats group - + - prevent conflicts with global exports commit 39514660001b37eabfe3af6818949586fae9a4bf @@ -4773,7 +7597,7 @@ Author: Daniel-Constantin Mierla Date: Thu Nov 23 12:35:47 2023 +0100 ims_icscf: use literal module name for stats group - + - prevent conflicts with global exports commit 524eeca084e0a0e61ad80f349ea79f8b1c3031f6 @@ -4781,7 +7605,7 @@ Author: Daniel-Constantin Mierla Date: Thu Nov 23 12:35:47 2023 +0100 ims_auth: use literal module name for stats group - + - prevent conflicts with global exports commit 407168804cc1806b857c2ce78399e02a81692d1e @@ -4789,7 +7613,7 @@ Author: Daniel-Constantin Mierla Date: Thu Nov 23 12:35:47 2023 +0100 imc: use literal module name for stats group - + - prevent conflicts with global exports commit 40dd9f4e0fbe54046b7786e3572b491103af03d1 @@ -4797,7 +7621,7 @@ Author: Daniel-Constantin Mierla Date: Thu Nov 23 12:35:47 2023 +0100 http_async_client: use literal module name for stats group - + - prevent conflicts with global exports commit d434270933f06b4de43cdf6d4b464bd264a3cb92 @@ -4805,7 +7629,7 @@ Author: Daniel-Constantin Mierla Date: Thu Nov 23 12:35:47 2023 +0100 dialog: use literal module name for stats group - + - prevent conflicts with global exports commit 26d57116abc86e5d10bb1e5fe05c555e70e731c4 @@ -4819,7 +7643,7 @@ Author: Daniel-Constantin Mierla Date: Wed Nov 22 14:52:59 2023 +0100 dialog: do not print module name in log messages - + - it is added automatically commit 463d5b34390e330a2b733deb673c1c77e5be9fcb @@ -4827,7 +7651,7 @@ Author: Daniel-Constantin Mierla Date: Wed Nov 22 14:52:18 2023 +0100 avp: do not print module name in log messages - + - it is added automatically commit 89a95ce1abefd772c0f09054473b07bbfc5426bc @@ -4835,7 +7659,7 @@ Author: Daniel-Constantin Mierla Date: Wed Nov 22 14:26:23 2023 +0100 avpops: do not print module name in log messages - + - it is added automatically commit ba1c0424732f1f2ab01bfd078ee272221a6b3e10 @@ -4843,7 +7667,7 @@ Author: Daniel-Constantin Mierla Date: Wed Nov 22 14:20:13 2023 +0100 textops: do not print module name in log messages - + - it is added automatically commit 145659f9b81a0d489548fa8a0f75c0bd05660e2e @@ -4875,7 +7699,7 @@ Author: Daniel-Constantin Mierla Date: Wed Nov 22 10:06:24 2023 +0100 ims_ipsec_pcscf: do not change msg r-uri with ipsec_destroy() param - + - only changing r-uri shortcut inside sip msg field can have side effects, avoid it by providing the parameter to fill_contact() - use core fixup function for handling config parameter for aor @@ -4903,10 +7727,10 @@ Author: Morten Tryfoss Date: Wed Nov 15 12:50:56 2023 +0100 cdp: Avoid deadlock for callback on diameter timeout - + Callback function might do an operation which creates a new transaction, which will result in a deadlock. - + Fixes #3641 commit e17b554ba918dc33c60f41c2cee50ad2578fbbd3 @@ -4914,7 +7738,7 @@ Author: Morten Tryfoss Date: Tue Nov 14 10:12:16 2023 +0100 ims_charging: Various changes to make module compatible to other charging servers - + - Use origin-host of CCR response as destination-host of subsequent CCR requests, to make sure those requests are routed to the same charging server (when using relay). - use str_dup and str_free from ims_getters instead of locally defined. @@ -4939,7 +7763,7 @@ Author: Morten Tryfoss Date: Fri Nov 10 10:40:59 2023 +0100 cdp: Add support for re-auth on ro sessions initiated from charging server - + - handle missing valid_for in CCA correctly, for chargings server not using it - add AVP_Time_Quota_Threshold AVP, to support server controlled CCR-U threshold @@ -5074,7 +7898,7 @@ Author: Xenofon Karamanos Date: Wed Nov 15 09:44:15 2023 +0000 dmq: Add find dmq node by IP - + - Add find_dmq_node_ip - Add cmp_dmq_node_ip - Add check in notification peer @@ -5102,7 +7926,7 @@ Author: Daniel-Constantin Mierla Date: Mon Nov 20 13:27:33 2023 +0100 rtpproxy: print the ip address directly to local buffer - + - avoid extra copy commit 71969c6126e6885f2ba312c692c9c646d8f870ef @@ -5212,10 +8036,10 @@ Author: SPChan Date: Sat Nov 18 19:21:40 2023 +0800 tls_wolfssl: enable building with external package - + - build with git submodule: make ...WOLFSSL_INTERNAL=yes... - the default - build with external package: make ...WOLFSSL_INTERNAL=no... - + Debian recommended environment is libwolfssl41 5.6.4, libwolfssl-dev 5.6.4 commit 38aa7e5fffcb68979a9bb5771aaa6ef9e14b517d @@ -5243,7 +8067,7 @@ Author: Daniel-Constantin Mierla Date: Thu Nov 16 19:50:13 2023 +0100 core: copy the value between quotes for #!defexps - + - GH #3631 commit 996b61ebfdabcae8729725b5d06f268aefcd33a4 @@ -5257,7 +8081,7 @@ Author: Xenofon Karamanos Date: Thu Nov 16 10:09:18 2023 +0000 kamctl: Fix source order - + - Add check for already sourced rc file in kamctl commit 06ce65a2bbea826b890a3712cf1ac4f8b53e54cd @@ -7245,7 +10069,7 @@ Author: Morten Tryfoss Date: Thu Nov 9 13:16:15 2023 +0100 cdp: Support for diameter routing agent (DRA) / relay - + If an endpoint responds with a CEA indicating support for relaying (application-id 0xffffffff), let this endpoint be used for any application. @@ -7284,7 +10108,7 @@ Author: Daniel-Constantin Mierla Date: Fri Nov 10 14:08:09 2023 +0100 core: qm/fm memory align size can be set with define KSR_MEMORY_ALIGN - + - flexibility to be set at compile time via make or compiler parameter commit 7cc22301b37ae2a214900af9628b148f59dcce21 @@ -7292,7 +10116,7 @@ Author: Daniel-Constantin Mierla Date: Fri Nov 10 08:24:51 2023 +0100 core: mem - fm memory manager updated to align to 16 - + - same as malloc() on linux 64b - https://www.gnu.org/software/libc/manual/html_node/Aligned-Memory-Blocks.html - some libraries (e.g., libwolfssl) expect such alignement for specific optimizations @@ -7311,7 +10135,7 @@ Author: Daniel-Constantin Mierla Date: Fri Nov 10 07:31:38 2023 +0100 app_python3: enable error log mode for some of missing callback functions - + - tm-specific callbacks should trigger error log messages if not found commit eabd1e2c49b3e67455d5d8b13809332832036fa8 @@ -7325,7 +10149,7 @@ Author: Daniel-Constantin Mierla Date: Thu Nov 9 20:33:31 2023 +0100 core: mem - qm memory manager updated to align to 16 - + - same as malloc() on linux 64b - https://www.gnu.org/software/libc/manual/html_node/Aligned-Memory-Blocks.html - some libraries (e.g., libwolfssl) expect such alignement for specific optimizations @@ -7397,7 +10221,7 @@ Author: Victor Seva Date: Wed Nov 8 20:53:53 2023 +0100 dialplan: reformat exported structures more human friendly - + revert to the format it had before 01d0d1de2c8 commit 4642a12c109939f71f91ba7807ded1491e241e26 @@ -7405,7 +10229,7 @@ Author: Victor Seva Date: Wed Nov 8 20:03:49 2023 +0100 debugger: reformat exported structures more human friendly - + revert to the format it had before 656e147c470 commit f0cf082effe6a0fd8893299e49a519d90bfc6151 @@ -7413,7 +10237,7 @@ Author: Victor Seva Date: Wed Nov 8 19:44:38 2023 +0100 dialog: reformat exported structures more human friendly - + revert to the format it had before 783a416f1a5 commit a62d7118a2f86a82fd080ed4a89a0833e8c4d1a2 @@ -7445,7 +10269,7 @@ Author: Victor Seva Date: Wed Nov 8 08:52:11 2023 +0100 github: allow execute issue_management from panel [skip ci] - + * change order since we are hitting operations-per-run > https://github.com/marketplace/actions/close-stale-issues#ascending @@ -7460,7 +10284,7 @@ Author: Victor Seva Date: Tue Nov 7 23:20:33 2023 +0100 github: close-stale-issues - + As discussed at Kamailio developers meeting 2023 commit 4587d46d06fe4fe1d7c754b46b0f68910cbca633 @@ -7474,7 +10298,7 @@ Author: Christian Marangi Date: Mon Nov 6 16:13:55 2023 +0100 kamcmd: Makefile - use CUSTOM_NAME for specifying custom binary name - + - previous use of NAME can clash with environment variable NAME that could be set by OS or by Kamailio modules installation - GH #3628 @@ -7484,7 +10308,7 @@ Author: Daniel-Constantin Mierla Date: Mon Nov 6 14:20:53 2023 +0100 topos: handle NOTIFY during call setup - + - GH #3627 commit 184417a1089397baf47ed91a096660f1a421276c @@ -7498,7 +10322,7 @@ Author: Morten Tryfoss Date: Mon Oct 30 13:14:23 2023 +0100 ims_charging: Implemented restore of Ro sessions from database - + - realtime and shutdown mode support - removed duplicate entry in doc about "ro_auth_expiry" @@ -7555,7 +10379,7 @@ Author: Daniel-Constantin Mierla Date: Fri Nov 3 09:00:14 2023 +0100 sl: added send_reply_error() - + - wrapper around t_reply_error() and sl_reply_error() commit 2097922746d12d332ce923193af9c624429b7f96 @@ -7575,7 +10399,7 @@ Author: Daniel-Constantin Mierla Date: Thu Nov 2 13:15:55 2023 +0100 pdt: return 0 when add_to_tree() detect duplicated prefix with pdt mode 1 - + - GH #3626 commit d9189306f38e8f79c16e3a9ea38a2fe90fc82fb7 @@ -7589,7 +10413,7 @@ Author: Morten Tryfoss Date: Wed Oct 25 08:49:53 2023 +0200 cdp: Fix for undefined symbols when using older/unsupported OpenSSL - + This was originaly fixed in #3601, but that did not handle the change in #3612 very well. commit 02dd4e2c883585601f4dbcea0b63b858b4dd24d6 @@ -7597,15 +10421,15 @@ Author: Benjamin <92934023+tietzsg@users.noreply.github.com> Date: Thu Nov 2 13:09:57 2023 +0100 http_client: add information about parameter loading (#3619) - + * http_client: add information about parameter loading - + - Inform that the order of the parameters is important when httpcon is loaded first - + * http_client: docs - typos from previous commit - + --------- - + Co-authored-by: Daniel-Constantin Mierla commit 370991cfab3bd42fe0ca3cbff7dca7b40319f3f4 @@ -7631,7 +10455,7 @@ Author: Daniel-Constantin Mierla Date: Thu Nov 2 09:25:39 2023 +0100 tm: new function t_reply_error() - + - send stateful reply based on internal error code commit c76444da502325c90eb7ac0cbcc24e7bf16dd5d1 @@ -7669,7 +10493,7 @@ Author: Daniel-Constantin Mierla Date: Tue Oct 31 14:56:27 2023 +0100 secsipid_proc: remove files imported from libsecsipid project - + - they should be found in libsecsipid install folders commit a2468e66f530822094569cf847796d91b17d4be9 @@ -7677,7 +10501,7 @@ Author: Daniel-Constantin Mierla Date: Tue Oct 31 14:54:54 2023 +0100 secsipid_proc: Makefile - look for secsipid include and libs in localbase - + - done when pkg-config cannot find libsecsipid install details commit f4d8235e5da98e7b99fdc1431505b44ee1672f63 @@ -7709,7 +10533,7 @@ Author: Daniel-Constantin Mierla Date: Mon Oct 30 13:03:47 2023 +0100 secsipid_proc: updates for latest libsecsipid API - + - bind SecSIPIDSignJSONHPPrvKey(...) commit 2bc2bdf2ff158510f4f570a1f5abe3f72745234c @@ -7735,7 +10559,7 @@ Author: Daniel-Constantin Mierla Date: Thu Oct 26 13:34:51 2023 +0200 usrloc: new parameter to specify reply codes for keepalive handling - + - comma separated list of reply codes or reply class to be considered valid for keepalive handling @@ -7750,7 +10574,7 @@ Author: Daniel-Constantin Mierla Date: Wed Oct 25 18:06:36 2023 +0200 dmq_usrloc: avoid needless second local socket search - + - remove overwriting local socket string value with received item commit 19a32b863d9a79c0cbaf04a7a9864e0c08a914f7 @@ -7758,7 +10582,7 @@ Author: Victor Seva Date: Mon Oct 23 14:36:49 2023 +0200 pv_headers: pvh_xavi_get_child() fix fallback logic - + * don't fallback to Initial request headers for Replies commit dc42a1892282ffb7a95f731224a9ae88ac16c17d @@ -7772,28 +10596,28 @@ Author: Nicolas C Date: Tue Oct 24 17:10:09 2023 +0200 http_client: Add parameter timeout_mode (timeout in seconds or milliseconds) - + A new parameter timeout_mode is added. This parameter defines if timeouts are enabled, and in which unit timeout values are expressed. - 0 - Timeouts are disabled. - 1 - Timeout values are in seconds (default). - 2 - Timeout values are in milliseconds. - + Implementation detail: - + default global timeout = 0 (unconfigured). - + Parse connections as usual. If they have a timeout configured, use it. - + In mod_init: if global timeout == 0 (unconfigured), and timeout_mode is 1 or 2: if timeout_mode == 1 -> global timeout = 4 (seconds) if timeout_mode == 2 -> global timeout = 4000 (milliseconds) - + for each connection "conn" (fixup): if timeout_mode is not 1 or 2 -> conn.timeout = 0 (to reflect the fact that no timeout will be handled) else if conn.timeout is not configured -> conn.timeout = global timeout (in seconds or milliseconds, depending on timeout_mode). - + When doing Curl requests (curL_request_url): if timeout_mode == 1: set CURLOPT_TIMEOUT if timeout_mode == 2: set CURLOPT_TIMEOUT_MS @@ -7803,7 +10627,7 @@ Author: Xenofon Karamanos Date: Tue Oct 24 21:07:36 2023 +0300 cdp: Add and apply cdp_openssl_clear_errors function (#3612) - + * cdp: Add and apply cdp_openssl_clear_errors function - add new function to clear OpenSSL errors prior to any SSL_* call @@ -7860,7 +10684,7 @@ Author: Victor Seva Date: Mon Oct 23 10:33:51 2023 +0200 github: CODEOWNERS to protect workflows [skip ci] - + > https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners > https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-codeowners-to-monitor-changes @@ -7869,7 +10693,7 @@ Author: Daniel-Constantin Mierla Date: Sat Oct 21 09:05:44 2023 +0200 topos: remove check of th_param_mask_callid() for api callid masking - + - functions are not for topoh internal usage, but for intermodule API - reported as part of GH #3606 @@ -7878,7 +10702,7 @@ Author: Daniel-Constantin Mierla Date: Sat Oct 21 09:03:45 2023 +0200 core: set shm xsetfunc api field - + - fix wrong variable added in previous commit for pkg api commit e4f2cde596387cc81ff0a26d89654d9d0e24ae10 @@ -7904,7 +10728,7 @@ Author: Daniel-Constantin Mierla Date: Fri Oct 20 16:48:33 2023 +0200 corex: rpc corex.list_sockets prints advertise as full socket string - + - new field to print socket string field also for bind address commit 54d8cce28a5c4cbd944d39b1523571fbb5776baa @@ -7924,7 +10748,7 @@ Author: Daniel-Constantin Mierla Date: Fri Oct 20 14:55:53 2023 +0200 corex: rpc corex.list_aliases use now lowercase for field names - + - better coherence with the other rpc commands commit c2e8baad3b39b2e5871c0cdc796b3be48462c2a9 @@ -7956,13 +10780,13 @@ Author: Maksym Sobolyev Date: Tue Oct 10 11:23:49 2023 -0700 rtpproxy: Update rtpproxy module documentation. - + o Correct description of the timeout_socket; - + o Document timeout_tag_pv; - + o Update (c); - + o Remove reference to the ngcp-mediaproxy-ng which does not exist anymore. @@ -7971,11 +10795,11 @@ Author: Maksym Sobolyev Date: Tue Oct 10 11:21:31 2023 -0700 rtpproxy: Make timeout notification feature useable. - + Add an new "timeout_tag_pv" option to set notify tag along with the notification socket path. Both are required by the RTPProxy. - + Reported by: James Lipski commit f27eda6fe3d99d1352d4df86d79e4646b0a4c17a @@ -7983,7 +10807,7 @@ Author: Victor Seva Date: Tue Oct 17 14:12:57 2023 +0200 presence: active_watcher cleanup timer - + related #3074 commit 110ebbafadcc225f4e88749287f06ae29a6cfa2e @@ -7997,7 +10821,7 @@ Author: Juha Heinanen Date: Thu Oct 19 13:36:32 2023 +0200 core: change tcp_check_timer initialization - + - make tcp_check_timer default to depend on tcp_msg_data_timeout and ksr_tcp_msg_read_timeout values, set to half of the minimum of the two, it is not explicitely set @@ -8032,7 +10856,7 @@ Author: Victor Seva Date: Wed Oct 18 09:41:01 2023 +0200 github: disable CodeQL scan for pull requests [skip ci] - + job is failling due to "java.io.IOException: No space left on device" commit 4747f724325e69033a052d078b161186dc2e5c21 @@ -8064,7 +10888,7 @@ Author: Daniel-Constantin Mierla Date: Mon Oct 16 09:09:08 2023 +0200 core: added tcp_accept_iplimit parameter - + - set limit for accepted connections from the same ip address - default 1024 @@ -8073,7 +10897,7 @@ Author: Daniel-Constantin Mierla Date: Mon Oct 16 08:57:32 2023 +0200 core: added tcp_msg_data_timeout parameter - + - duration in seconds for how long to wait till data is received on a new tcp connection - default 20 @@ -8083,7 +10907,7 @@ Author: Daniel-Constantin Mierla Date: Mon Oct 16 08:35:09 2023 +0200 core: added tcp_check_timer parameter - + - set the check interval (in seconds) for tcp connections - default 10 @@ -8092,7 +10916,7 @@ Author: Daniel-Constantin Mierla Date: Sun Oct 15 19:20:13 2023 +0200 core: added tcp_msg_read_timeout parameter - + - specify read timeout for tcp messages commit b56037fab181037d48bfc90802f25b85ae8bee04 @@ -8100,7 +10924,7 @@ Author: Daniel-Constantin Mierla Date: Sat Oct 14 16:49:20 2023 +0200 core: added msg_recv_max_size global parameter - + - set limit for max size of received tcp or upd messages commit a902e4a032a85a7755de32eeadac800a1312e64f @@ -8108,7 +10932,7 @@ Author: Daniel-Constantin Mierla Date: Fri Oct 13 17:33:07 2023 +0200 core: tcp - limit number of accepted connections per src ip - + - default 1024 commit ddfe15f860555048f1ad6884727d4eb52f11910f @@ -8122,7 +10946,7 @@ Author: Daniel-Constantin Mierla Date: Fri Oct 13 16:31:10 2023 +0200 core: tcp - close connection without data traffic at all - + - default timeout: 20sec - cleanup is done on timer, it can take another 10sec @@ -8131,7 +10955,7 @@ Author: Daniel-Constantin Mierla Date: Fri Oct 13 16:02:12 2023 +0200 core: tcp - set limit for reading a message - + - default 10sec - if message is not read, close connection - cleanup is done on timer, it can take an additional 10sec to clean up connection @@ -8165,7 +10989,7 @@ Author: Daniel-Constantin Mierla Date: Thu Oct 12 17:46:00 2023 +0200 core: added proto file to use info structure - + - can be set via socket global parameter structure commit 4045f3d7c0302ae47f0d6c2160160767d56826eb @@ -8245,7 +11069,7 @@ Author: S-P Chan Date: Thu Oct 5 10:55:26 2023 +0800 pkg: RPM - add mock config for EL8/EL9 based on alma+epel-(8|9)-x86_64 - + This mock config can be used to build RPM packages from a kamailio src.rpm. - update pkg/kamailio/obs/README -> README.md to include mock instructions @@ -8257,7 +11081,7 @@ Author: S-P Chan Date: Thu Oct 5 09:45:23 2023 +0800 pkg: add example script to create tarball with submodules instantiated - + In preparation for packaging of tls_wolfssl, add an example script to create source tarball with submodule code. @@ -8266,7 +11090,7 @@ Author: Daniel-Constantin Mierla Date: Fri Oct 6 08:19:18 2023 +0200 kamctl: check if kamctlrc is readable - + - related to GH #3594 commit e01d1cbfb61e0111a4f73e58e36a2bd689a2f91f @@ -8274,7 +11098,7 @@ Author: Victor Seva Date: Fri Oct 6 00:43:23 2023 +0200 github: define DOCKER_REPO at alpine workflow [skip ci] - + > https://github.com/kamailio/kamailio-ci/commit/524fa4769d3b48add204c2bbd8303f60dfde2d61 commit 022f0f4cfd49e7a46efb2b6b4e1b9640c399e535 @@ -8282,7 +11106,7 @@ Author: Daniel-Constantin Mierla Date: Thu Oct 5 18:05:00 2023 +0200 misc/examples/kemi: add the option for using rtpengine in common cfg file - + - updated lua script removing the check of rtpproxy define, not being in the commng cfg file @@ -8303,7 +11127,7 @@ Author: S-P Chan Date: Thu Oct 5 00:58:57 2023 +0800 tls_wolfssl: clean up build - + Allow module to build if user specifies prefix= exec-prefix= on commandline @@ -8336,7 +11160,7 @@ Author: Victor Seva Date: Tue Oct 3 08:39:05 2023 +0200 github: define alpine permissions [skip ci] - + > unauthorized: access token has insufficient scopes commit 6b6c0663d3ae894e8e686eb32288f71387739cc7 @@ -8398,7 +11222,7 @@ Author: Victor Seva Date: Tue Sep 26 23:41:02 2023 +0200 pkg/kamailio/deb: remove ims module from stretch and xenial [skip ci] - + * libssl >= v1.1.1 is required commit d8a35b3b6c837b36779e232b65fce61c3aa93387 @@ -8424,7 +11248,7 @@ Author: Daniel-Constantin Mierla Date: Mon Sep 25 22:04:16 2023 +0200 tm: %llu specifier for printing msg_flags fields - + - GH #3585 commit 4deb3a7f7eb97fc30d42aa578082e496997e45d2 @@ -8444,7 +11268,7 @@ Author: Nikolay Ivanuschak Date: Mon Jul 24 14:09:31 2023 +0300 core: fixed wrong network interface selection. - + fixed incorrect source IP address selection for the SIP messages sending procedure when TCP transport is used or for UDP with the 'mhomed' setting set as 'mhomed=1'. @@ -8460,7 +11284,7 @@ Author: Дилян Палаузов Date: Thu Sep 14 10:40:51 2023 -0400 htable add column packing features - + - add support for changing the column delimeter in a hash table - add support for changing the column null character @@ -8526,7 +11350,7 @@ Author: Daniel-Constantin Mierla Date: Thu Sep 21 14:40:08 2023 +0200 app_lua: proper global parameter for request route callback function - + - fix of previous commit commit b045e5314834a312e6a7b6fa772641cafaa5aab6 @@ -8540,7 +11364,7 @@ Author: Daniel-Constantin Mierla Date: Wed Sep 20 12:05:11 2023 +0200 core: kemi - parameter for request route callback function name - + - it can be set with: kemi.request_route_callback - default: ksr_request_route @@ -8555,18 +11379,18 @@ Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Sep 18 21:47:39 2023 +0000 github: [skip ci]: bump docker/build-push-action from 4 to 5 - + Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4 to 5. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v4...v5) - + --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... - + Signed-off-by: dependabot[bot] commit 4ad01bad433a649116d3b42a811a80fa630d869c @@ -8574,19 +11398,19 @@ Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Sep 18 21:47:32 2023 +0000 github: [skip ci]: bump docker/metadata-action from 4 to 5 - + Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4 to 5. - [Release notes](https://github.com/docker/metadata-action/releases) - [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md) - [Commits](https://github.com/docker/metadata-action/compare/v4...v5) - + --- updated-dependencies: - dependency-name: docker/metadata-action dependency-type: direct:production update-type: version-update:semver-major ... - + Signed-off-by: dependabot[bot] commit 80c9196e3f5742066268df9a79406f15499145a1 @@ -8594,18 +11418,18 @@ Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Sep 18 21:47:26 2023 +0000 github: [skip ci]: bump docker/setup-buildx-action from 2 to 3 - + Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2 to 3. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v2...v3) - + --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-major ... - + Signed-off-by: dependabot[bot] commit 29ce9d8868604005fba8a215b6569a33c6478d3c @@ -8613,18 +11437,18 @@ Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Sep 18 21:47:22 2023 +0000 github: [skip ci]: bump docker/login-action from 2 to 3 - + Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/v2...v3) - + --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-major ... - + Signed-off-by: dependabot[bot] commit 2741a16ebe5efd352b485fdfc70644e4c68052f8 @@ -8638,9 +11462,9 @@ Author: Lucian Balaceanu Date: Mon Sep 18 16:37:19 2023 +0300 cdp: add TLS capability (#3548) - + * cdp: adding TLS capability to peer connections - + * cdp: documenting TLS capability related parameters commit a0ef326f4cc8b8463ec58939c20c978f844053b7 @@ -8726,20 +11550,20 @@ Author: Eloy Coto Date: Sun Jul 30 23:53:17 2023 +0200 statsd: Add labels to metrics. - + A user reached me to add a way to add the custom labels into the statsd module, so a better way to report metrics to the observability platform. - + I keep the same old functions and add a new parameter to the statsd modules to both interfaces cfg and kemi. - + The full documentation can be found here: https://docs.datadoghq.com/developers/dogstatsd/datagram_shell/?tab=metrics - + So, each function can be used like this: ``` statsd_set("fooo", 1, "inbound"); statsd_gauge("NotFound", "+1", "outbound,carrierFoo"); statsd_gauge("AuthFailed", "+1", "carrier:foo,priority:10"); ``` - + Signed-off-by: Eloy Coto Tested-by: Alex Antonevych Signed-off-by: Eloy Coto @@ -8761,7 +11585,7 @@ Author: Daniel-Constantin Mierla Date: Tue Sep 12 10:22:32 2023 +0200 pdt: docs for mode parameter - + - GH #3485 commit ad7df67cfd58713fc0993e2d2365a86d9d6068e1 @@ -8811,7 +11635,7 @@ Author: Victor Seva Date: Mon Sep 11 08:46:02 2023 +0200 path: fix prepend_path() - + bug introduced at dd04bceb99ba69bd59c67ba103f3c55d47a31dd6 commit ea2babf79d8b66cbfdccdae51ddf806964b16138 @@ -8837,7 +11661,7 @@ Author: Daniel-Constantin Mierla Date: Mon Sep 11 14:26:30 2023 +0200 textops: new function via_param_rm("name", idx) - + - remove paramter of a via body at a specific index commit d3acf9cc56f0ee73bee3c7cf1210c052d79a4c46 @@ -8863,7 +11687,7 @@ Author: Daniel-Constantin Mierla Date: Fri Sep 8 15:30:03 2023 +0200 core: parser - internal msg flags typedefed to unsigned long long - + - type msg_flags_t - unsigned int size flags were filled @@ -8932,7 +11756,7 @@ Author: Daniel-Constantin Mierla Date: Wed Sep 6 21:09:35 2023 +0200 cores: new function via_reply_add_xavp_params() - + - enable adding parameters to top via of replies from xavp fields commit 439eae7aa2154a25a0d9143345e526e22162b24f @@ -8940,7 +11764,7 @@ Author: Daniel-Constantin Mierla Date: Wed Sep 6 21:08:20 2023 +0200 core: ability to add paramters to top via of generated sip replies - + - parameters and values are taken from xavp specified by xavp_via_reply_params commit cf0e802bbf62ec4a19f26c786c07e7436ba07f0a @@ -8954,7 +11778,7 @@ Author: Daniel-Constantin Mierla Date: Wed Sep 6 21:02:42 2023 +0200 core: config parser extended with xavp_via_reply_params parameter - + - allows to specify xavp name that is going to hold parameters to be added to the top via of replies @@ -8963,7 +11787,7 @@ Author: Daniel-Constantin Mierla Date: Wed Sep 6 15:05:06 2023 +0200 pv: via-related variables can retun oc parameters - + - overload control - rfc7339 commit 062dbc7c7f74ebe705eff711e994c3eec5956e03 @@ -8971,7 +11795,7 @@ Author: Daniel-Constantin Mierla Date: Wed Sep 6 13:00:12 2023 +0200 dispatcher: added pactive and pinactive for $dsg(key) - + - return percent of active/inactive route in the group commit d07eb9e54a075716c6bc96b123c3bbb885466da8 @@ -9009,19 +11833,19 @@ Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Sep 4 21:31:49 2023 +0000 github: [skip ci]: bump actions/checkout from 3 to 4 - + Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) - + --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... - + Signed-off-by: dependabot[bot] commit ff323e8d7166fd781763608434da982e0918c7c9 @@ -9047,7 +11871,7 @@ Author: Daniel-Constantin Mierla Date: Wed Aug 30 17:08:07 2023 +0200 core: parser for overflow control parameters in via header - + - RFC7339 commit b56110aca34a5633029654ae457ff3ed4424e62f @@ -9097,7 +11921,7 @@ Author: Daniel-Constantin Mierla Date: Wed Aug 23 10:55:35 2023 +0200 pv_headers: compare result of pvh_set_xavi() with NULL for error cases - + - the function returns a pointer commit 027c2b30b39a7596c8630c06995ddc49bb42d789 @@ -9123,7 +11947,7 @@ Author: Daniel-Constantin Mierla Date: Tue Aug 22 11:09:56 2023 +0200 tls: updates to revive TLS_MALLOC_DBG - + - it still requires q_malloc to be used - GH #3532 @@ -9132,7 +11956,7 @@ Author: Daniel-Constantin Mierla Date: Tue Aug 22 10:25:53 2023 +0200 core: mem - shm api extended to enable setting func field of the chunk - + - implemented for q_malloc(), being needed for reviving tls extra debug mode commit a92de0dfc809f9257eb230093c93081606ee107e @@ -9158,7 +11982,7 @@ Author: Daniel-Constantin Mierla Date: Mon Aug 21 12:48:39 2023 +0200 tm: docs - note that t_relay() creates transaction if it does not exist - + - removed trailing spaces commit 4bcf0649a86965fc2e5c8ea5f3c6519e2918ba52 @@ -9172,11 +11996,11 @@ Author: Дилян Палаузов Date: Fri Aug 18 08:12:18 2023 -0400 rtpengine: set MIME Content-Length - + For MIME multipart SDPs, the embedded MIME section can contain a Content-Length header. Update this field if preset after rewriting the SDP. @@ -9194,7 +12018,7 @@ Author: Victor Seva Date: Wed Aug 9 15:43:13 2023 +0200 pkg/kamailio/deb: add pcre2 - + * first step for migration to pcre2 until all modules are migrated commit fcdeedb5e84ff31f25daa7ba8ffdb355f909afa9 @@ -9214,7 +12038,7 @@ Author: Daniel-Constantin Mierla Date: Thu Aug 17 18:33:09 2023 +0200 htable: added rpc htable.dmqresync command - + - reset and dmq sync for a specific hash table commit 722a79a9ba8ca2608e699ec14684ce004ae10d60 @@ -9222,9 +12046,9 @@ Author: Rick Barenthin Date: Tue Aug 15 22:30:58 2023 +0200 core: cfg.y typo in parsing XAVPVIAFIELDS - + In the XAVPVIAFIELDS block there is the string written to the wrong variable. - + The string is stored in _ksr_xavp_via_params.s but the lenght is stored in _ksr_xavp_via_fields.len. This breaks XAVPVIAPARAMS and XAVPVIAFIELDS. commit e859169628ed4c3dc1c5a9230e29046c9cb8fc46 @@ -9250,7 +12074,7 @@ Author: Henning Westerholt Date: Tue Aug 15 14:16:07 2023 +0000 ims_ipsec_pcscf: typo in spi_add function definition, GH #3513 - + - fix typo in spi_add function definition - patch from jbipre2, GH #3513 @@ -9301,7 +12125,7 @@ Author: Charles Chance Date: Wed Aug 9 10:22:19 2023 +0100 dispatcher: add option to retain existing latency stats when reloading destinations - + - also retain when adding/removing individual destinations via RPC commit 2fd5d881563126f7425730f798afcbfc2feeac65 @@ -9316,7 +12140,7 @@ Date: Fri Aug 11 13:23:29 2023 +0200 rabbitmq: Enabling rabbitmq_publish for any route and disabling peer verification - + Enabling rabbitmq_publish function on any route so we can send events on reply reception. Also disabling peer verification on the TLS handshake if no CA file is @@ -9339,7 +12163,7 @@ Author: Daniel-Constantin Mierla Date: Fri Aug 11 20:16:37 2023 +0200 http_async_client: docs - dependency on libevent - + - list style for dependencies and links to projects commit 18ae77207409b816d6dffb13b41e3be9c251d62c @@ -9359,7 +12183,7 @@ Author: Victor Seva Date: Thu Jul 13 00:26:58 2023 +0200 ctl: use snprintf() to set boundaries - + > https://github.com/kamailio/kamailio/security/code-scanning/1839 commit d893f3af1444c8c4c5db6cd53fb577703007c90c @@ -9367,7 +12191,7 @@ Author: Walter Schober Date: Mon Jul 31 15:16:31 2023 +0200 core: Add TCP_USER_TIMEOUT socket option on listening socket. - + Use tcp_send_timeout config option also on listening socket to timeout outbound messages sent on passive inbound connections. commit 63445544d994d7876ff76eb66203400c5a3a4b91 @@ -9393,14 +12217,14 @@ Author: Victor Seva Date: Thu Jul 20 14:04:30 2023 +0200 crypto: SHA1_Init deprecated at openssl 3.0 - + From https://www.openssl.org/docs/man3.0/man7/migration_guide.html - + > Use of low-level digest functions such as SHA1_Init(3) have been informally > discouraged from use for a long time. Applications should instead use the > high level EVP APIs EVP_DigestInit_ex(3), EVP_DigestUpdate(3) and > EVP_DigestFinal_ex(3), or the quick one-shot EVP_Q_digest(3). - + related to #3502 commit bad420e9f72c237bbd608a9ff06ae3b63bce9625 @@ -9408,9 +12232,9 @@ Author: Victor Seva Date: Thu Jul 20 10:11:03 2023 +0200 .devcontainer: Initial support for devcontainers [skip ci] - + Allows to develop inside a container using vscode - + > https://code.visualstudio.com/docs/devcontainers/containers commit c2f12479debe7bd5f5819f3c3b332929dd5fe703 @@ -9424,7 +12248,7 @@ Author: Victor Seva Date: Wed Jul 26 15:00:38 2023 +0200 sipcapture: make sure we null terminate the copy of the string - + bug introduced at cbd7810fff3d5145c1ce34c0e362b5590bb92a12 commit 3c1700fb7693c05025be1058e856fe610f4be031 @@ -9432,7 +12256,7 @@ Author: Victor Seva Date: Wed Jul 26 14:53:26 2023 +0200 rtpproxy: make sure we null terminate the copy of the string. - + bug introduced at d00ceda2c04 commit 2750e48b5445e9334cb7a062d7d53a1fb9a0a411 @@ -9440,7 +12264,7 @@ Author: Maksym Sobolyev Date: Tue Jul 25 12:29:02 2023 -0700 rtpproxy: make sure we null terminate the copy of the string. - + Broken in d00ceda2c04. commit 8b1139851d9f88add1fd7da0dbc0b2b56933cdd3 @@ -9472,13 +12296,13 @@ Author: Nir Simionovich Date: Mon Jul 17 11:26:18 2023 -0400 kamctl: add 2 new options to dispatcher management (#3512) - + *kamctl: add support for deleting a gateway or full setid in dispatcher. - + * kamctl: small style fix to help screen after previous change - + --------- - + Co-authored-by: Nir Simionovich commit 78c0275b9081d4ee18a89f702f3931e3c3f83489 @@ -9486,29 +12310,29 @@ Author: joelbax <98022231+joelbax@users.noreply.github.com> Date: Mon Jul 17 17:21:36 2023 +0200 rabbitmq: Adding amqps support (#3511) - + * rabbitmq: Adding amqps support - + Adding support for secure AMQP connections over TLS (amqps). - + * rabbitmq: Adding amqps support - + Adding support for secure AMQP connections over TLS (amqps). - + rabbitmq: Adding amqps support - + Adding support for secure AMQP connections over TLS (amqps). - + rabbitmq: Format fixes - + Some style format fixes - + * rabbitmq: Format fixes - + Fixing some missing spaces - + * rabbitmq: Typo fix - + Fixing inilialized by initialized commit 9f3356de1c769c610112df9dbcfdf6461de9f959 @@ -9570,7 +12394,7 @@ Author: Nikolay Ivanuschak Date: Wed Jun 28 23:29:04 2023 +0300 geoip2: added distance function - + Added distance function which allows to calculate the distance between the geocoordinates of the the IP-address passed as incoming parameter (coordinates for the IP are determined inside @@ -9737,9 +12561,9 @@ Author: Victor Seva Date: Tue Jul 4 18:47:57 2023 +0200 core: modparam use strncpy() for setting boundaries - + * use strncat() - + > https://github.com/kamailio/kamailio/security/code-scanning/1836 > https://github.com/kamailio/kamailio/security/code-scanning/1834 @@ -9748,9 +12572,9 @@ Author: Victor Seva Date: Tue Jun 27 14:20:59 2023 +0200 jsonrcps: use strncpy() for setting boundaries - + * use strncat() - + > https://github.com/kamailio/kamailio/security/code-scanning/2381 > https://github.com/kamailio/kamailio/security/code-scanning/2380 > https://github.com/kamailio/kamailio/security/code-scanning/1843 @@ -9761,7 +12585,7 @@ Author: Victor Seva Date: Tue Jun 27 10:27:47 2023 +0200 core: socket_info use strncpy() for setting boundaries - + > https://github.com/kamailio/kamailio/security/code-scanning/2586 commit 77ca2e93e945fe46783e953d58bc546d9d6d1b81 @@ -9769,7 +12593,7 @@ Author: Victor Seva Date: Tue Jun 27 10:20:57 2023 +0200 permissions: use strncpy() for setting boundaries - + > https://github.com/kamailio/kamailio/security/code-scanning/2616 > https://github.com/kamailio/kamailio/security/code-scanning/1845 @@ -9778,7 +12602,7 @@ Author: Victor Seva Date: Tue Jun 27 09:49:35 2023 +0200 path: use snprintf() instead of sprintf() - + > https://github.com/kamailio/kamailio/security/code-scanning/2612 > https://github.com/kamailio/kamailio/security/code-scanning/2613 > https://github.com/kamailio/kamailio/security/code-scanning/2614 @@ -9789,7 +12613,7 @@ Author: Victor Seva Date: Tue Jun 27 09:23:31 2023 +0200 rtpproxy: use memcpy instead of strcpy for coherence - + > https://github.com/kamailio/kamailio/security/code-scanning/2617 > https://github.com/kamailio/kamailio/security/code-scanning/2618 > https://github.com/kamailio/kamailio/security/code-scanning/2620 @@ -9799,7 +12623,7 @@ Author: Victor Seva Date: Tue Jun 27 08:48:10 2023 +0200 sipcapture: use memcpy instead of strncpy for coherence - + > https://github.com/kamailio/kamailio/security/code-scanning/2620 > https://github.com/kamailio/kamailio/security/code-scanning/2621 @@ -9892,7 +12716,7 @@ Author: Daniel-Constantin Mierla Date: Fri Jul 7 17:41:15 2023 +0200 registrar: increase max size for user and domain building aor - + - renamed max aor lenght define to match the user and domain style commit 883f6b77211a76b35a9df570a8ddbbc344b05472 @@ -9900,7 +12724,7 @@ Author: Daniel-Constantin Mierla Date: Thu Jul 6 21:26:28 2023 +0200 kex: safety checks when iterating stats list - + - GH #3186 commit 498e9f7276459b3f3963544527d9bd2ae5d36e40 @@ -9944,7 +12768,7 @@ Author: Daniel-Constantin Mierla Date: Mon Jul 3 08:26:07 2023 +0200 http_client: use LIBCURL_VERSION_NUM instead of CURL_AT_LEAST_VERSION - + - older distros have compilers that don't cope with the later commit b8cae4fbcd026ffb81e8242500212582d9672ad5 @@ -9994,7 +12818,7 @@ Author: Victor Seva Date: Wed Jun 28 13:59:10 2023 +0200 pkg/kamailio/deb: remove microhttpd from older versions - + > https://kamailio.sipwise.com/job/kamailiodev-nightly-binaries/2442/console commit 4baaba99fa729d4e5aae6f29c614c22cdaca452c @@ -10020,7 +12844,7 @@ Author: Daniel-Constantin Mierla Date: Tue Jun 27 13:05:52 2023 +0200 microhttpd: implemented request handler callback - + - execute event_route[microhttpd:request] when receiving an HTTP request commit 777ecf6bd8735538bf61f4f6e10d46ad7c39981b @@ -10028,7 +12852,7 @@ Author: Victor Seva Date: Tue Jun 27 10:00:26 2023 +0200 github: don't execute codeql for each push [skip ci] - + * set schedule cifuzz and codeql commit 7e94c365359ca24ae7410121a5e4b4f7382b0b79 @@ -10060,18 +12884,18 @@ Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Jun 26 23:36:35 2023 +0000 github: bump actions/upload-artifact from 1 to 3 - + Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 1 to 3. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v1...v3) - + --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... - + Signed-off-by: dependabot[bot] commit 549cca07beef76f734e9eafe06a66b5509170b07 @@ -10079,19 +12903,19 @@ Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Jun 26 23:29:55 2023 +0000 github: bump actions/checkout from 2 to 3 - + Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) - + --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... - + Signed-off-by: dependabot[bot] commit b306bab6fb87033dadbf7b5eefbfbd233e3dc51a @@ -10105,7 +12929,7 @@ Author: Victor Seva Date: Tue Jun 27 01:28:41 2023 +0200 github: remove updater.yaml [skip ci] - + * we are now using dependabot directly commit f73484df4d75aa8a82f3b3ecece9431a79be88f1 @@ -10119,7 +12943,7 @@ Author: Victor Seva Date: Mon Jun 26 23:36:28 2023 +0200 github: switch to bookworm for builds [skip ci] - + * codeql: add libmicrohttpd-dev dependency build was failing due to missing dependency @@ -10140,7 +12964,7 @@ Author: Victor Seva Date: Fri Jun 23 09:06:43 2023 +0200 utils/kamcmd: fix memory leak - + fixes #3478 commit 82f5fcbf88ee3058bd9da520b528c86393cc422a @@ -10148,7 +12972,7 @@ Author: Victor Seva Date: Thu Jun 22 17:29:48 2023 +0200 tls: fix build for openssl < 1.1.1 - + OPENSSL_INIT_ATFORK was introduced in libssl 1.1.1 error introduced at 9d6bfb96528c49e6aaa39aa47be877ca528c3537 @@ -10157,7 +12981,7 @@ Author: Daniel-Constantin Mierla Date: Thu Jun 22 14:37:18 2023 +0200 http_client: fix depecration of CURLOPT_REDIR_PROTOCOLS - + - GH #3492 commit 81be9e78c3731d45734480285d7afc17f8f9e87a @@ -10177,7 +13001,7 @@ Author: Daniel-Constantin Mierla Date: Wed Jun 21 09:27:28 2023 +0200 http_client: fix depecration of CURLOPT_PROTOCOLS and CURLINFO_SIZE_DOWNLOAD - + - GH #3484 commit 4985bc9cc764699297235d4220ec9a07a9286988 @@ -10197,7 +13021,7 @@ Author: Joey Golan Date: Tue Jun 13 08:16:41 2023 +0300 rtpengine: fix build failed on specific distribution - + Fix clang-format-checker errors commit 17da2e8344fc5f010ae08277a89b4b122dd8c56b @@ -10223,9 +13047,9 @@ Author: Victor Seva Date: Mon Jun 19 20:12:17 2023 +0200 tls: disable tls_rand for openssl >= 3.0 - + From https://www.openssl.org/docs/man3.0/man3/RAND_set_rand_method.html - + > All of the functions described on this page are deprecated. > Applications should instead use RAND_set_DRBG_type(3), EVP_RAND(3) and > EVP_RAND(7). @@ -10235,15 +13059,15 @@ Author: Victor Seva Date: Mon Jun 19 13:36:53 2023 +0200 tls: disable engine for openssl >= 3.0 - + From https://www.openssl.org/docs/man3.0/man7/migration_guide.html - + > The refactoring to support Providers conflicts internally with the APIs > used to support engines, including the ENGINE API and any function that > creates or modifies custom "METHODS" - + From https://www.openssl.org/docs/man3.0/man3/ENGINE_init.html: - + > All of the functions described on this page are deprecated. Applications > should instead use the provider APIs. @@ -10252,9 +13076,9 @@ Author: Victor Seva Date: Tue Jun 13 12:37:21 2023 +0200 tls: OPENSSL_fork_[prepare|parent|child] deprecated at openssl 3.0 - + From https://www.openssl.org/docs/man3.0/man3/OPENSSL_fork_prepare.html: - + > OPENSSL_fork_prepare, OPENSSL_fork_parent, OPENSSL_fork_child have been > deprecated since OpenSSL 3.0. > @@ -10282,7 +13106,7 @@ Author: Daniel-Constantin Mierla Date: Tue Jun 20 11:23:26 2023 +0200 Merge branch 'dilyanpalauzov-typos' - + * dilyanpalauzov-typos: (35 commits) modules: readme files regenerated - db_redis ... [skip ci] ndb_redis: Makefile - updated find command for libhiredis_ssl @@ -10317,7 +13141,7 @@ Author: Daniel-Constantin Mierla Date: Tue Jun 20 11:04:30 2023 +0200 ndb_redis: Makefile - updated find command for libhiredis_ssl - + - silent warnings about not existing directories commit e9cc9fc15b9ebb87d64478be93980e4c7766d941 @@ -10325,7 +13149,7 @@ Author: Daniel-Constantin Mierla Date: Tue Jun 20 11:03:04 2023 +0200 db_redis: Makefile - updated find command for libhiredis_ssl - + - silent warnings about not existing directories commit 279cf4e805838f897c2b71f2ea8c828de1725391 @@ -10333,7 +13157,7 @@ Author: Joel Centelles Date: Fri Jun 16 21:08:40 2023 +0200 ndb_redis: Fixing format - + Fixing some spaces and indentations commit 03ae83161307feeb95f36a60ef4f50d948a877b2 @@ -10341,7 +13165,7 @@ Author: Joel Centelles Date: Fri Jun 16 21:07:29 2023 +0200 db_redis: Format fixes - + Fixing some spaces commit 6c0bc1d276921fae02c06cadc0d96a8ff17b2a2f @@ -10349,7 +13173,7 @@ Author: Joel Centelles Date: Fri Jun 16 20:30:28 2023 +0200 ndb_redis: Searching SSL support in gcc search library path - + Checking libhiredis_ssl.so in gcc --print-search-dirs commit d0e84ab04921a01bfb980aa6ff5fb8df50ccd759 @@ -10357,7 +13181,7 @@ Author: Joel Centelles Date: Fri Jun 16 20:25:48 2023 +0200 db_redis: Searching SSL support in gcc search library path - + Checking libhiredis_ssl.so in gcc --print-search-dirs commit 1cde6d38a5d12950f5c405677ba652248881cd64 @@ -10365,7 +13189,7 @@ Author: Joel Centelles Date: Tue Jun 13 13:34:31 2023 +0200 ndb_redis: Missing uprotected redisSSLContext - + Fixing unprotected redisSSLContext reference in redis_client.h commit 053c65d731ceca121a64f6c599f8b78911636c25 @@ -10373,7 +13197,7 @@ Author: Joel Centelles Date: Mon Jun 12 13:30:39 2023 +0200 ndb_redis: Fixing global variables names - + Adding module name prefixing global variable names to prevent possible conflicts. Also using ca_path info in SSL context creation. @@ -10382,7 +13206,7 @@ Author: Joel Centelles Date: Mon Jun 12 13:24:31 2023 +0200 db_redis: Fixing global variables - + Adding module name prefix to global variables to reduce possible conflicts. commit 52d1959d6ed141ab7c2a96f1f79d8d6fd82cda00 @@ -10390,7 +13214,7 @@ Author: Joel Centelles Date: Fri Jun 9 13:34:15 2023 +0200 db_redis: Fixing Makefile - + Removing unprotected references to libhiredis_ssl.so commit 3162c80ee54eab842ddebef07c3c56792f30423b @@ -10398,7 +13222,7 @@ Author: Joel Centelles Date: Thu Jun 8 16:59:37 2023 +0200 db_redis: Fixing build - + Removing extra declaration outside from WITH_SSL block commit 93bcb36ee013e4ab02f71342fa2e2163dc380b8e @@ -10406,7 +13230,7 @@ Author: Joel Centelles Date: Thu Jun 8 16:57:04 2023 +0200 ndb_redis: Format fixes - + Fixing C formatting issues commit 23a54de62daf07ace22569baf0a52ee851645200 @@ -10414,7 +13238,7 @@ Author: Joel Centelles Date: Thu Jun 8 16:48:21 2023 +0200 db_redis: Missing format fixes - + Removing spaces from line ends. commit 6176c95a17f940c130f6219140593b6f08653e38 @@ -10422,7 +13246,7 @@ Author: Joel Centelles Date: Thu Jun 8 16:45:47 2023 +0200 db_redis: Fixing format - + Fixing malformed C lines commit 5b4d1d9e6160ab7aec8e77ab1a3e53651f2d37cc @@ -10430,7 +13254,7 @@ Author: Joel Centelles Date: Fri Jun 2 18:44:09 2023 +0200 ndb_redis: Adding TLS support - + Checks for the tls parameter in the BD schema and, if it's enabled, creates a temporary TLS conext that is used to initialize the redis context. Adds 1 new parameter: * ca_path: For specifying a folder containing valid certification chains. @@ -10440,13 +13264,13 @@ Author: Joel Centelles Date: Fri Jun 2 18:42:16 2023 +0200 db_redis: Adding TLS support - + Enhancing security options by enabling TLS connections and password definition. Added 3 new parameters: * opt_tls: For enabling TLS connections. * ca_path: For specifying a folder containing valid certification chains. * password: For providing DB access password. - + If opt_tls is provided a temporary SSL context is created to pass it to existing cluster or normal redis context. TLS support is automatically enabled/disabled by checking libhiredis_ssl.so existence. @@ -10461,7 +13285,7 @@ Author: Daniel-Constantin Mierla Date: Tue Jun 20 11:04:30 2023 +0200 ndb_redis: Makefile - updated find command for libhiredis_ssl - + - silent warnings about not existing directories commit d88d60a0f3d67f42e4201d6c871bbf993e6fa87b @@ -10469,7 +13293,7 @@ Author: Daniel-Constantin Mierla Date: Tue Jun 20 11:03:04 2023 +0200 db_redis: Makefile - updated find command for libhiredis_ssl - + - silent warnings about not existing directories commit 043f31ea0314c5d1d60a6ce8ce81e626922223c4 @@ -10477,7 +13301,7 @@ Author: Joel Centelles Date: Fri Jun 16 21:08:40 2023 +0200 ndb_redis: Fixing format - + Fixing some spaces and indentations commit cb96de742f1d729d01bf9c8c255a12aa089d6974 @@ -10485,7 +13309,7 @@ Author: Joel Centelles Date: Fri Jun 16 21:07:29 2023 +0200 db_redis: Format fixes - + Fixing some spaces commit d41924862a1729de186a5d1f4adddcfeb7fb7b7d @@ -10493,7 +13317,7 @@ Author: Joel Centelles Date: Fri Jun 16 20:30:28 2023 +0200 ndb_redis: Searching SSL support in gcc search library path - + Checking libhiredis_ssl.so in gcc --print-search-dirs commit f7a712b36918bd9c01256fb2b283754ad9ed7422 @@ -10501,7 +13325,7 @@ Author: Joel Centelles Date: Fri Jun 16 20:25:48 2023 +0200 db_redis: Searching SSL support in gcc search library path - + Checking libhiredis_ssl.so in gcc --print-search-dirs commit 77e74b974249b3c4e2e67cc074cc8ff26d50fde8 @@ -10509,7 +13333,7 @@ Author: Joel Centelles Date: Tue Jun 13 13:34:31 2023 +0200 ndb_redis: Missing uprotected redisSSLContext - + Fixing unprotected redisSSLContext reference in redis_client.h commit 90f977202af2d132fb63f20f76f9ad696a19656e @@ -10517,7 +13341,7 @@ Author: Joel Centelles Date: Mon Jun 12 13:30:39 2023 +0200 ndb_redis: Fixing global variables names - + Adding module name prefixing global variable names to prevent possible conflicts. Also using ca_path info in SSL context creation. @@ -10526,7 +13350,7 @@ Author: Joel Centelles Date: Mon Jun 12 13:24:31 2023 +0200 db_redis: Fixing global variables - + Adding module name prefix to global variables to reduce possible conflicts. commit 440e8cba9f9e8364e100a68283137da589e6f283 @@ -10534,7 +13358,7 @@ Author: Joel Centelles Date: Fri Jun 9 13:34:15 2023 +0200 db_redis: Fixing Makefile - + Removing unprotected references to libhiredis_ssl.so commit 4cca8c777020e5fea49e37940e3c521d766588f9 @@ -10542,7 +13366,7 @@ Author: Joel Centelles Date: Thu Jun 8 16:59:37 2023 +0200 db_redis: Fixing build - + Removing extra declaration outside from WITH_SSL block commit dd6ee7a7499fce6ce33c59c0dd15af81a140ae4f @@ -10550,7 +13374,7 @@ Author: Joel Centelles Date: Thu Jun 8 16:57:04 2023 +0200 ndb_redis: Format fixes - + Fixing C formatting issues commit 077980a000c37320bfade650c680da55af92154e @@ -10558,7 +13382,7 @@ Author: Joel Centelles Date: Thu Jun 8 16:48:21 2023 +0200 db_redis: Missing format fixes - + Removing spaces from line ends. commit ba080b16353b53c29c147740f3541ceecbe31c1d @@ -10566,7 +13390,7 @@ Author: Joel Centelles Date: Thu Jun 8 16:45:47 2023 +0200 db_redis: Fixing format - + Fixing malformed C lines commit 79d5ab3b86c0a1cc1b06efeee78ef5baa8d084f9 @@ -10574,7 +13398,7 @@ Author: Joel Centelles Date: Fri Jun 2 18:44:09 2023 +0200 ndb_redis: Adding TLS support - + Checks for the tls parameter in the BD schema and, if it's enabled, creates a temporary TLS conext that is used to initialize the redis context. Adds 1 new parameter: * ca_path: For specifying a folder containing valid certification chains. @@ -10584,13 +13408,13 @@ Author: Joel Centelles Date: Fri Jun 2 18:42:16 2023 +0200 db_redis: Adding TLS support - + Enhancing security options by enabling TLS connections and password definition. Added 3 new parameters: * opt_tls: For enabling TLS connections. * ca_path: For specifying a folder containing valid certification chains. * password: For providing DB access password. - + If opt_tls is provided a temporary SSL context is created to pass it to existing cluster or normal redis context. TLS support is automatically enabled/disabled by checking libhiredis_ssl.so existence. @@ -10612,7 +13436,7 @@ Author: Дилян Палаузов Date: Mon Jun 19 13:18:59 2023 +0200 core: kemi - propagate bool as a return value type - + - some scripting languages differentiate bool false|true vs int 0|1 values commit 9580adf9a478f161605a0f663099f4d10c0c93eb @@ -10748,7 +13572,7 @@ Author: Daniel-Constantin Mierla Date: Fri Jun 16 17:24:29 2023 +0200 cdp_avp: reformat code files with macros for code generation - + - clang format is not dealing nicely with such cases, disable formatting for those snippets @@ -10799,7 +13623,7 @@ Author: Victor Seva Date: Mon Aug 29 13:59:38 2022 +0200 pv_headers: rework pvh_remove_header_param, take two - + * pvh_set_xavi changes/removes xavi, so we need the new value * after pvh_remove_header, search for the header again @@ -10808,7 +13632,7 @@ Author: Victor Seva Date: Wed Mar 29 12:12:54 2023 +0200 cfgt: route_log modparam - + If enabled, cfgt will log (WARN) the execution time of routes. commit dd9c891bafe8de5dace630d676f9ea697152a4de @@ -10822,7 +13646,7 @@ Author: Victor Seva Date: Wed Apr 27 15:49:30 2022 +0200 cfgt: skip_unknown modparam - + If enabled, value different from 0, cfgt will not generate the report of any message that doesn't match the callid_prefix. @@ -10831,7 +13655,7 @@ Author: Victor Seva Date: Wed Jun 14 10:53:34 2023 +0200 pua_dialoginfo: fix dlg_var store and retrieval - + * pubruri_calle[e|r]_avp can have more than one value. Store values as comma separate strings at pubruri_calle[e|r]_dlg_var @@ -10880,7 +13704,7 @@ Author: Daniel-Constantin Mierla Date: Tue Jun 13 14:27:02 2023 +0200 cdp: changed function export macro for better list building - + - more readable exports formatting commit 2f23b3ccc2288e5d146aeac807935af24f5923b3 @@ -10894,7 +13718,7 @@ Author: Daniel-Constantin Mierla Date: Tue Jun 13 09:43:00 2023 +0200 cdp: fix always true condition in peer_timer() - + - extended the log message commit 1128df71dcba1cd97898c2970e7cd3221256adb1 @@ -10920,7 +13744,7 @@ Author: Daniel-Constantin Mierla Date: Tue Jun 13 08:40:54 2023 +0200 cdp: remove unnecessary checks inside Send_ASR() - + - updates to log messages commit 6a19434d4b93a8ec6e345b55ff1b83ff6bd38596 @@ -10976,7 +13800,7 @@ Author: Daniel-Constantin Mierla Date: Mon Jun 12 13:47:18 2023 +0200 pdb: use local log level for an info log message - + - new mod param to allow remapping local log level for info - related to GH #3296 @@ -10985,15 +13809,15 @@ Author: Daniel-Constantin Mierla Date: Mon Jun 12 13:43:31 2023 +0200 core: new log macros allowing to use local log levels per module - + - a variable has to be defined inside module like: - + ksr_loglevels_t _ksr_loglevels_MODNAME = KSR_LOGLEVELS_DEFAULTS; - + - for example, for pdb module: - + ksr_loglevels_t _ksr_loglevels_pdb = KSR_LOGLEVELS_DEFAULTS; - + - then use LLM_XYZ() macro instead of LM_XYZ() - for example, use LLM_INFO() instead of LM_INFO() @@ -11026,9 +13850,9 @@ Author: Jake Greene Date: Thu May 18 09:48:24 2023 -0500 presence: Add htable_db_restore RPC command. - + - Introduced `htable_db_restore` RPC command to load updates from the 'presentity' table into the 'publ_cache' specifically for 'publ_cache' modes 1 or 2. - + - update docs for htable_db_restore RPC command commit 90e172bad110c5a27da3908594b45f5bbe035d87 @@ -11078,7 +13902,7 @@ Author: Дилян Палаузов Date: Mon Jun 12 11:16:51 2023 +0200 Makefile: fixed paths for init.d scripts install on debian and centos - + - GH #3476 commit 7b1fe0483b684693c7baea9b62b471b64c6e22a9 @@ -11241,7 +14065,7 @@ Author: Victor Seva Date: Tue May 9 10:18:30 2023 +0200 core: pv_cache_dump - + related to #3440 commit 87ed3d9c3ae3ecfabe6d24f5fd3d656ef1182fac @@ -11261,7 +14085,7 @@ Author: Daniel-Constantin Mierla Date: Tue May 23 09:41:13 2023 +0200 ipops: create container items if not found for srv and naptr functions - + - GH #3419 commit 9c125234cd5bb7ff580e875c82002a8dd69fff82 @@ -11311,7 +14135,7 @@ Author: Victor Seva Date: Fri May 19 00:24:53 2023 +0200 README: remove travis-ci info [skip ci] - + no longer used commit 08fbc4fa8d44c2c0ee596e1f30b95b5b4fcfc823 @@ -12825,7 +15649,7 @@ Author: Victor Seva Date: Wed May 17 12:40:32 2023 +0200 github: add checkout before clang-format-checker [skip ci] - + > https://github.com/WolleTD/clang-format-checker/issues/15 commit 2c36d50ac56663c92bc007c85b18199a1fdff363 @@ -12845,7 +15669,7 @@ Author: Daniel-Constantin Mierla Date: Wed May 17 11:21:08 2023 +0200 Makefile.defs: set LIBSSL_SET_MUTEX_SHARED by default to 1 - + - one can set LIBSSL_SET_MUTEX_SHARED=0 in make command line to switch to detection mode if it is need to set it or not based on libssl version @@ -12856,9 +15680,9 @@ Author: Victor Seva Date: Wed May 17 10:07:56 2023 +0200 github: GitHub Actions Version Updater - + > https://github.com/marketplace/actions/github-actions-version-updater - + * PAT created using kamailio-sync * organization secret WORKFLOW_SECRET created @@ -12867,7 +15691,7 @@ Author: Daniel-Constantin Mierla Date: Wed May 17 09:57:20 2023 +0200 topoh: don't set 0 twice at the end of masked/unmasked call-id - + - fomatting updates commit 991de5e51e799a0110b7aa489eb27f4f01f5dfd2 @@ -12881,7 +15705,7 @@ Author: harish Date: Wed May 17 00:21:21 2023 +0530 topoh: memory leak fix for API call - + th_mask_callid_str & th_unmask_callid_str funtions used for API call to encode/decode call-ID uses static array declaration for callid_mbuf was unable to free callid data lump after use and leads to memory leak. @@ -12895,7 +15719,7 @@ Author: Victor Seva Date: Wed May 17 09:22:10 2023 +0200 siptrace: fix destination target parameter on ki_sip_trace_msg - + fixes #3457 commit bafefbc841eb7a6929baeff0b3fbe185860f4290 @@ -12939,7 +15763,7 @@ Author: harish Date: Fri Jan 27 01:20:59 2023 +0530 Topos: Added CallID Mask Document for Topos - + Added document for Call-ID Mask in Topos Module commit d98ff2aab3d3e379fa27da187fbd069c23fb0fe9 @@ -12947,7 +15771,7 @@ Author: harish Date: Fri Jan 27 01:15:46 2023 +0530 Topos: Added Call ID mask when sending to Downstream - + Added Call-ID mask while sending the request to Downstream and unmasking when receiveing from downstream @@ -12962,7 +15786,7 @@ Author: Daniel-Constantin Mierla Date: Tue May 16 12:45:57 2023 +0200 core: use unsigned long (j) for rpc core.shmmem - + - GH #3450 commit 1d5722e18e04e8935b342d303fe265c5d8f06e8e @@ -12994,7 +15818,7 @@ Author: Victor Seva Date: Mon May 15 22:34:59 2023 +0200 Revert "tls_wolfssl: use wolfssl lib from system if available" - + This reverts commit 14b1f79c29f317c74bbcbba75853ce45c353a865. commit d8a244c6286ea0b96f5466c281aeca37d86bb17f @@ -13002,7 +15826,7 @@ Author: Victor Seva Date: Mon May 15 22:34:47 2023 +0200 Revert "pkg/kamailio/deb: introduce wolftls package" - + This reverts commit 13430c2e8b9fccf7565ddcf38dcab8e516cebef0. commit 091dc9a76bcec5c8a4bc73e863ed10b1b9d76c92 @@ -13064,7 +15888,7 @@ Author: Victor Seva Date: Wed May 10 23:48:23 2023 +0200 pipelimit: fix documentation on default value of plp_limit_column [skip ci] - + fixes #3449 commit eca3bf7570290854561ecd4ef71dc093941e2d72 @@ -13108,7 +15932,7 @@ Author: Victor Seva Date: Tue May 9 23:28:04 2023 +0200 dialplan: fix ki_dp_translate() checks for input/output parameters - + fixes #3447 commit 84dbcdb812fce70d6d470050793125698c06d0fd @@ -13122,7 +15946,7 @@ Author: Stefan Mititelu Date: Fri Apr 28 11:15:36 2023 +0300 tls: Add rpc function to kill session by id - + Note that it may take few seconds for session to be killed. commit 439a1c7471c562b14d482c691107e88aaf694162 @@ -13130,7 +15954,7 @@ Author: Daniel-Constantin Mierla Date: Tue May 9 16:07:41 2023 +0200 registrar: use xavp->val.v.l for tcp connection id - + Co-authored-by: Bastian Triller commit 404ccb00ad294b39da58132772881143bc15fa04 @@ -13144,14 +15968,14 @@ Author: Richard Fuchs Date: Tue May 9 15:05:39 2023 +0200 rtpengine: fix unaligned memory access - + Make sure the pointers we return from our continuous memory buffer is always 64-bit aligned as it's used not only for strings, but also for structs/objects, and such unaligned memory access is undefined on some archs and flagged as such by ASAN. - + From https://github.com/sipwise/rtpengine/commit/ade8100d3b10308f1ff63f8cb06fdf292618edca - + fixes #3444 commit c75e4a087f73a0976e343789593a888524aa752b @@ -13177,7 +16001,7 @@ Author: Daniel-Constantin Mierla Date: Mon Apr 24 20:28:48 2023 +0200 siptrace: reworked sip_trace_msg() to specify source and target addresses - + - implemented for hep mirroring only - prototype: sip_trace_msg(data, saddr, taddr, duri, corrid) @@ -13198,7 +16022,7 @@ Author: Daniel-Constantin Mierla Date: Fri Apr 21 21:51:47 2023 +0200 siptrace: added sip_trace_msg(dst, corlid, vmsg) - + - send sip trace with the message provided as parmameter commit f9cbe7ad01331e97852872c29b612409bf571c8d @@ -13212,9 +16036,9 @@ Author: Victor Seva Date: Thu May 4 20:12:32 2023 +0200 lcr: fix crash be calling load_gw* via KEMI - + move the check of lcr_id to the helper - + fixes #3435 commit 1c924f9bc9d880f9c32fe5cb4d23722f27107be6 @@ -13222,7 +16046,7 @@ Author: Daniel-Constantin Mierla Date: Thu May 4 20:45:00 2023 +0200 Makefile.defs: version set to 5.8.0-dev0 - + - master branch is open for new features to be part of future release series 5.8.x diff --git a/doc/man/kamailio.8 b/doc/man/kamailio.8 index f4fc69ade..05460afbd 100644 --- a/doc/man/kamailio.8 +++ b/doc/man/kamailio.8 @@ -8,7 +8,7 @@ kamailio \- a very fast and configurable SIP server .SH SYNOPSIS .B kamailio [ -.B \-hfcmMdVIhEeblLnvKrRDTNWwtugPGSQOaAxXY +.B \-hfcmMdVIhEebBlLnvKrRDTNWwtugPGSQOaAxXY ] [ .BI \-a " auto\-aliases\-mode" ] [ @@ -16,6 +16,8 @@ kamailio \- a very fast and configurable SIP server ] [ .BI \-b " max_rcv_buf_size" ] [ +.BI \-B " max_snd_buf_size" +] [ .BI \-f " config\-file" ] [ .BI \-g " gid" @@ -68,7 +70,10 @@ default is yes. Add config pre-processor define (e.g., -A WITH_AUTH, -A N=1, -A X='"Y"') .TP .BI \-b " max_rcv_buf_size" -Maximum receive buffer size which will not be exceeded by the auto-probing procedure even if the OS allows. +Maximum OS UDP receive buffer size which will not be exceeded by auto-probing-and-increase procedure even if OS allows. +.TP +.BI \-B " max_snd_buf_size" +Maximum OS UDP send buffer size which will not be exceeded by auto-probing-and-increase procedure even if OS allows. .TP .BI \-c Checks the config file and displays the aliases and listen interface list. diff --git a/etc/kamailio.cfg b/etc/kamailio.cfg index 3f9a5fe79..d0a3d2754 100644 --- a/etc/kamailio.cfg +++ b/etc/kamailio.cfg @@ -561,7 +561,7 @@ request_route { # record routing for dialog forming requests (in case they are routed) # - remove preloaded route headers remove_hf("Route"); - if (is_method("INVITE|SUBSCRIBE")) { + if (is_method("INVITE|SUBSCRIBE|REFER")) { record_route(); } @@ -678,8 +678,8 @@ route[WITHINDLG] { } else if ( is_method("ACK") ) { # ACK is forwarded statelessly route(NATMANAGE); - } else if ( is_method("NOTIFY") ) { - # Add Record-Route for in-dialog NOTIFY as per RFC 6665. + } else if ( is_method("NOTIFY|REFER") ) { + # Add Record-Route for in-dialog NOTIFY and REFER (RFC6665, RFC3515) record_route(); } route(RELAY); diff --git a/misc/examples/ims/scscf/README.md b/misc/examples/ims/scscf/README.md index d28328cb4..beb3c69a7 100644 --- a/misc/examples/ims/scscf/README.md +++ b/misc/examples/ims/scscf/README.md @@ -12,6 +12,6 @@ The following tables (or files) are required: * ims_charging_create.sql * ims_dialog-create.sql - * ms_usrloc_scscf-create.sql + * ims_usrloc_scscf-create.sql * presence-create.sql * standard-create.sql diff --git a/pkg/kamailio/alpine/APKBUILD b/pkg/kamailio/alpine/APKBUILD index f68763c8c..f55461f9a 100644 --- a/pkg/kamailio/alpine/APKBUILD +++ b/pkg/kamailio/alpine/APKBUILD @@ -4,7 +4,7 @@ # Maintainer: Nathan Angelacos pkgname=kamailio -pkgver=5.8.2 +pkgver=5.8.6 pkgrel=0 # If building from a git snapshot, specify the gitcommit diff --git a/pkg/kamailio/deb/bionic/changelog b/pkg/kamailio/deb/bionic/changelog index c63d96509..51a405e5f 100644 --- a/pkg/kamailio/deb/bionic/changelog +++ b/pkg/kamailio/deb/bionic/changelog @@ -1,3 +1,27 @@ +kamailio (5.8.6) unstable; urgency=medium + + * version set 5.8.6 + + -- Victor Seva Thu, 20 Mar 2025 08:19:52 +0100 + +kamailio (5.8.5) unstable; urgency=medium + + * version set 5.8.5 + + -- Victor Seva Thu, 23 Jan 2025 08:31:22 +0100 + +kamailio (5.8.4) unstable; urgency=medium + + * version set 5.8.4 + + -- Victor Seva Tue, 12 Nov 2024 10:53:35 +0100 + +kamailio (5.8.3) unstable; urgency=medium + + * version set 5.8.3 + + -- Victor Seva Wed, 04 Sep 2024 09:29:45 +0200 + kamailio (5.8.2) unstable; urgency=medium * version set 5.8.2 diff --git a/pkg/kamailio/deb/bionic/control b/pkg/kamailio/deb/bionic/control index 553b57362..0f62b6889 100644 --- a/pkg/kamailio/deb/bionic/control +++ b/pkg/kamailio/deb/bionic/control @@ -636,6 +636,23 @@ Description: TLS support for the Kamailio SIP server (authentication, transport) 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 diff --git a/pkg/kamailio/deb/bionic/kamailio@.service b/pkg/kamailio/deb/bionic/kamailio@.service new file mode 100644 index 000000000..81c06394d --- /dev/null +++ b/pkg/kamailio/deb/bionic/kamailio@.service @@ -0,0 +1,26 @@ +[Unit] +Description=Kamailio - the Open Source SIP Server (instance %i) +Documentation=man:kamailio(8) +Wants=network-online.target +After=network-online.target + +[Service] +Type=forking +User=kamailio +Group=kamailio +Environment='CFGFILE=/etc/kamailio/kamailio-%i.cfg' +Environment='SHM_MEMORY=64' +Environment='PKG_MEMORY=8' +EnvironmentFile=-/etc/default/kamailio-%i +EnvironmentFile=-/etc/default/kamailio-%i.d/* +# PIDFile requires a full absolute path +PIDFile=/run/kamailio-%i/kamailio.pid +# ExecStart requires a full absolute path +ExecStart=/usr/sbin/kamailio -P /run/kamailio-%i/kamailio.pid -Y /run/kamailio-%i -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY +Restart=on-failure +# /run/kamailio in tmpfs +RuntimeDirectory=kamailio-%i +RuntimeDirectoryMode=0770 + +[Install] +WantedBy=multi-user.target diff --git a/pkg/kamailio/deb/bionic/rules b/pkg/kamailio/deb/bionic/rules index 1d16d9809..4a460e80e 100755 --- a/pkg/kamailio/deb/bionic/rules +++ b/pkg/kamailio/deb/bionic/rules @@ -140,24 +140,27 @@ test_install_all-stamp: build $(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)-$(subst install_,,$@)-modules \ - cfg_prefix=$(D)-$(subst install_,,$@)-modules \ - doc-dir=share/doc/$(DEB_SOURCE)-$(subst install_,,$@)-modules \ - group_include="k$(subst install_,,$@)" + 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" && \ + test "$$d" != "$(D)-$(module)-modules/usr/$(LIBDIR)/kamailio" && \ for r in `find $$d -name 'lib*' | xargs`; do \ - echo "removing $(subst install_,,$@) lib `basename $$r` present also in $$d"; \ - rm -f $(D)-$(subst install_,,$@)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"`; \ + 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)-$(subst install_,,$@)-modules -depth -empty -type d -exec rmdir {} \; + find $(D)-$(module)-modules -depth -empty -type d -exec rmdir {} \; $(INSTALL_EXTRA): test_install_all-stamp $(MAKE) install-modules-all \ diff --git a/pkg/kamailio/deb/bookworm/changelog b/pkg/kamailio/deb/bookworm/changelog index c63d96509..51a405e5f 100644 --- a/pkg/kamailio/deb/bookworm/changelog +++ b/pkg/kamailio/deb/bookworm/changelog @@ -1,3 +1,27 @@ +kamailio (5.8.6) unstable; urgency=medium + + * version set 5.8.6 + + -- Victor Seva Thu, 20 Mar 2025 08:19:52 +0100 + +kamailio (5.8.5) unstable; urgency=medium + + * version set 5.8.5 + + -- Victor Seva Thu, 23 Jan 2025 08:31:22 +0100 + +kamailio (5.8.4) unstable; urgency=medium + + * version set 5.8.4 + + -- Victor Seva Tue, 12 Nov 2024 10:53:35 +0100 + +kamailio (5.8.3) unstable; urgency=medium + + * version set 5.8.3 + + -- Victor Seva Wed, 04 Sep 2024 09:29:45 +0200 + kamailio (5.8.2) unstable; urgency=medium * version set 5.8.2 diff --git a/pkg/kamailio/deb/bookworm/control b/pkg/kamailio/deb/bookworm/control index 2ec6d74a4..e9eb8d58a 100644 --- a/pkg/kamailio/deb/bookworm/control +++ b/pkg/kamailio/deb/bookworm/control @@ -620,7 +620,7 @@ Description: TLS support for the Kamailio SIP server (authentication, transport) This package provides TLS support for encrypted and authenticated SIP connections as well as generic TLS support for many Kamailio modules. -Package: kamailio-wolftls-modules +Package: kamailio-tls-wolfssl-modules Architecture: any Multi-Arch: same Pre-Depends: diff --git a/pkg/kamailio/deb/bookworm/kamailio@.service b/pkg/kamailio/deb/bookworm/kamailio@.service new file mode 100644 index 000000000..81c06394d --- /dev/null +++ b/pkg/kamailio/deb/bookworm/kamailio@.service @@ -0,0 +1,26 @@ +[Unit] +Description=Kamailio - the Open Source SIP Server (instance %i) +Documentation=man:kamailio(8) +Wants=network-online.target +After=network-online.target + +[Service] +Type=forking +User=kamailio +Group=kamailio +Environment='CFGFILE=/etc/kamailio/kamailio-%i.cfg' +Environment='SHM_MEMORY=64' +Environment='PKG_MEMORY=8' +EnvironmentFile=-/etc/default/kamailio-%i +EnvironmentFile=-/etc/default/kamailio-%i.d/* +# PIDFile requires a full absolute path +PIDFile=/run/kamailio-%i/kamailio.pid +# ExecStart requires a full absolute path +ExecStart=/usr/sbin/kamailio -P /run/kamailio-%i/kamailio.pid -Y /run/kamailio-%i -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY +Restart=on-failure +# /run/kamailio in tmpfs +RuntimeDirectory=kamailio-%i +RuntimeDirectoryMode=0770 + +[Install] +WantedBy=multi-user.target diff --git a/pkg/kamailio/deb/bookworm/rules b/pkg/kamailio/deb/bookworm/rules index f7b603151..26df0ccaf 100755 --- a/pkg/kamailio/deb/bookworm/rules +++ b/pkg/kamailio/deb/bookworm/rules @@ -140,24 +140,27 @@ test_install_all-stamp: build $(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)-$(subst install_,,$@)-modules \ - cfg_prefix=$(D)-$(subst install_,,$@)-modules \ - doc-dir=share/doc/$(DEB_SOURCE)-$(subst install_,,$@)-modules \ - group_include="k$(subst install_,,$@)" + 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" && \ + test "$$d" != "$(D)-$(module)-modules/usr/$(LIBDIR)/kamailio" && \ for r in `find $$d -name 'lib*' | xargs`; do \ - echo "removing $(subst install_,,$@) lib `basename $$r` present also in $$d"; \ - rm -f $(D)-$(subst install_,,$@)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"`; \ + 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)-$(subst install_,,$@)-modules -depth -empty -type d -exec rmdir {} \; + find $(D)-$(module)-modules -depth -empty -type d -exec rmdir {} \; $(INSTALL_EXTRA): test_install_all-stamp $(MAKE) install-modules-all \ diff --git a/pkg/kamailio/deb/bullseye/changelog b/pkg/kamailio/deb/bullseye/changelog index c63d96509..51a405e5f 100644 --- a/pkg/kamailio/deb/bullseye/changelog +++ b/pkg/kamailio/deb/bullseye/changelog @@ -1,3 +1,27 @@ +kamailio (5.8.6) unstable; urgency=medium + + * version set 5.8.6 + + -- Victor Seva Thu, 20 Mar 2025 08:19:52 +0100 + +kamailio (5.8.5) unstable; urgency=medium + + * version set 5.8.5 + + -- Victor Seva Thu, 23 Jan 2025 08:31:22 +0100 + +kamailio (5.8.4) unstable; urgency=medium + + * version set 5.8.4 + + -- Victor Seva Tue, 12 Nov 2024 10:53:35 +0100 + +kamailio (5.8.3) unstable; urgency=medium + + * version set 5.8.3 + + -- Victor Seva Wed, 04 Sep 2024 09:29:45 +0200 + kamailio (5.8.2) unstable; urgency=medium * version set 5.8.2 diff --git a/pkg/kamailio/deb/bullseye/control b/pkg/kamailio/deb/bullseye/control index b9deb27c5..24e5b6226 100644 --- a/pkg/kamailio/deb/bullseye/control +++ b/pkg/kamailio/deb/bullseye/control @@ -638,6 +638,23 @@ Description: TLS support for the Kamailio SIP server (authentication, transport) 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 diff --git a/pkg/kamailio/deb/bullseye/kamailio@.service b/pkg/kamailio/deb/bullseye/kamailio@.service new file mode 100644 index 000000000..81c06394d --- /dev/null +++ b/pkg/kamailio/deb/bullseye/kamailio@.service @@ -0,0 +1,26 @@ +[Unit] +Description=Kamailio - the Open Source SIP Server (instance %i) +Documentation=man:kamailio(8) +Wants=network-online.target +After=network-online.target + +[Service] +Type=forking +User=kamailio +Group=kamailio +Environment='CFGFILE=/etc/kamailio/kamailio-%i.cfg' +Environment='SHM_MEMORY=64' +Environment='PKG_MEMORY=8' +EnvironmentFile=-/etc/default/kamailio-%i +EnvironmentFile=-/etc/default/kamailio-%i.d/* +# PIDFile requires a full absolute path +PIDFile=/run/kamailio-%i/kamailio.pid +# ExecStart requires a full absolute path +ExecStart=/usr/sbin/kamailio -P /run/kamailio-%i/kamailio.pid -Y /run/kamailio-%i -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY +Restart=on-failure +# /run/kamailio in tmpfs +RuntimeDirectory=kamailio-%i +RuntimeDirectoryMode=0770 + +[Install] +WantedBy=multi-user.target diff --git a/pkg/kamailio/deb/bullseye/rules b/pkg/kamailio/deb/bullseye/rules index e9089f94f..9157f0b3b 100755 --- a/pkg/kamailio/deb/bullseye/rules +++ b/pkg/kamailio/deb/bullseye/rules @@ -140,24 +140,27 @@ test_install_all-stamp: build $(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)-$(subst install_,,$@)-modules \ - cfg_prefix=$(D)-$(subst install_,,$@)-modules \ - doc-dir=share/doc/$(DEB_SOURCE)-$(subst install_,,$@)-modules \ - group_include="k$(subst install_,,$@)" + 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" && \ + test "$$d" != "$(D)-$(module)-modules/usr/$(LIBDIR)/kamailio" && \ for r in `find $$d -name 'lib*' | xargs`; do \ - echo "removing $(subst install_,,$@) lib `basename $$r` present also in $$d"; \ - rm -f $(D)-$(subst install_,,$@)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"`; \ + 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)-$(subst install_,,$@)-modules -depth -empty -type d -exec rmdir {} \; + find $(D)-$(module)-modules -depth -empty -type d -exec rmdir {} \; $(INSTALL_EXTRA): test_install_all-stamp $(MAKE) install-modules-all \ diff --git a/pkg/kamailio/deb/buster/changelog b/pkg/kamailio/deb/buster/changelog index c63d96509..51a405e5f 100644 --- a/pkg/kamailio/deb/buster/changelog +++ b/pkg/kamailio/deb/buster/changelog @@ -1,3 +1,27 @@ +kamailio (5.8.6) unstable; urgency=medium + + * version set 5.8.6 + + -- Victor Seva Thu, 20 Mar 2025 08:19:52 +0100 + +kamailio (5.8.5) unstable; urgency=medium + + * version set 5.8.5 + + -- Victor Seva Thu, 23 Jan 2025 08:31:22 +0100 + +kamailio (5.8.4) unstable; urgency=medium + + * version set 5.8.4 + + -- Victor Seva Tue, 12 Nov 2024 10:53:35 +0100 + +kamailio (5.8.3) unstable; urgency=medium + + * version set 5.8.3 + + -- Victor Seva Wed, 04 Sep 2024 09:29:45 +0200 + kamailio (5.8.2) unstable; urgency=medium * version set 5.8.2 diff --git a/pkg/kamailio/deb/buster/control b/pkg/kamailio/deb/buster/control index 553b57362..0f62b6889 100644 --- a/pkg/kamailio/deb/buster/control +++ b/pkg/kamailio/deb/buster/control @@ -636,6 +636,23 @@ Description: TLS support for the Kamailio SIP server (authentication, transport) 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 diff --git a/pkg/kamailio/deb/buster/kamailio@.service b/pkg/kamailio/deb/buster/kamailio@.service new file mode 100644 index 000000000..81c06394d --- /dev/null +++ b/pkg/kamailio/deb/buster/kamailio@.service @@ -0,0 +1,26 @@ +[Unit] +Description=Kamailio - the Open Source SIP Server (instance %i) +Documentation=man:kamailio(8) +Wants=network-online.target +After=network-online.target + +[Service] +Type=forking +User=kamailio +Group=kamailio +Environment='CFGFILE=/etc/kamailio/kamailio-%i.cfg' +Environment='SHM_MEMORY=64' +Environment='PKG_MEMORY=8' +EnvironmentFile=-/etc/default/kamailio-%i +EnvironmentFile=-/etc/default/kamailio-%i.d/* +# PIDFile requires a full absolute path +PIDFile=/run/kamailio-%i/kamailio.pid +# ExecStart requires a full absolute path +ExecStart=/usr/sbin/kamailio -P /run/kamailio-%i/kamailio.pid -Y /run/kamailio-%i -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY +Restart=on-failure +# /run/kamailio in tmpfs +RuntimeDirectory=kamailio-%i +RuntimeDirectoryMode=0770 + +[Install] +WantedBy=multi-user.target diff --git a/pkg/kamailio/deb/buster/rules b/pkg/kamailio/deb/buster/rules index 1d16d9809..4a460e80e 100755 --- a/pkg/kamailio/deb/buster/rules +++ b/pkg/kamailio/deb/buster/rules @@ -140,24 +140,27 @@ test_install_all-stamp: build $(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)-$(subst install_,,$@)-modules \ - cfg_prefix=$(D)-$(subst install_,,$@)-modules \ - doc-dir=share/doc/$(DEB_SOURCE)-$(subst install_,,$@)-modules \ - group_include="k$(subst install_,,$@)" + 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" && \ + test "$$d" != "$(D)-$(module)-modules/usr/$(LIBDIR)/kamailio" && \ for r in `find $$d -name 'lib*' | xargs`; do \ - echo "removing $(subst install_,,$@) lib `basename $$r` present also in $$d"; \ - rm -f $(D)-$(subst install_,,$@)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"`; \ + 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)-$(subst install_,,$@)-modules -depth -empty -type d -exec rmdir {} \; + find $(D)-$(module)-modules -depth -empty -type d -exec rmdir {} \; $(INSTALL_EXTRA): test_install_all-stamp $(MAKE) install-modules-all \ diff --git a/pkg/kamailio/deb/debian/backports/noble b/pkg/kamailio/deb/debian/backports/noble new file mode 100755 index 000000000..930e4b594 --- /dev/null +++ b/pkg/kamailio/deb/debian/backports/noble @@ -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 diff --git a/pkg/kamailio/deb/debian/changelog b/pkg/kamailio/deb/debian/changelog index c63d96509..51a405e5f 100644 --- a/pkg/kamailio/deb/debian/changelog +++ b/pkg/kamailio/deb/debian/changelog @@ -1,3 +1,27 @@ +kamailio (5.8.6) unstable; urgency=medium + + * version set 5.8.6 + + -- Victor Seva Thu, 20 Mar 2025 08:19:52 +0100 + +kamailio (5.8.5) unstable; urgency=medium + + * version set 5.8.5 + + -- Victor Seva Thu, 23 Jan 2025 08:31:22 +0100 + +kamailio (5.8.4) unstable; urgency=medium + + * version set 5.8.4 + + -- Victor Seva Tue, 12 Nov 2024 10:53:35 +0100 + +kamailio (5.8.3) unstable; urgency=medium + + * version set 5.8.3 + + -- Victor Seva Wed, 04 Sep 2024 09:29:45 +0200 + kamailio (5.8.2) unstable; urgency=medium * version set 5.8.2 diff --git a/pkg/kamailio/deb/debian/control b/pkg/kamailio/deb/debian/control index b454421bf..ee369ba7c 100644 --- a/pkg/kamailio/deb/debian/control +++ b/pkg/kamailio/deb/debian/control @@ -661,7 +661,7 @@ Description: TLS support for the Kamailio SIP server (authentication, transport) This package provides TLS support for encrypted and authenticated SIP connections as well as generic TLS support for many Kamailio modules. -Package: kamailio-wolftls-modules +Package: kamailio-tls-wolfssl-modules Architecture: any Multi-Arch: same Pre-Depends: diff --git a/pkg/kamailio/deb/debian/kamailio@.service b/pkg/kamailio/deb/debian/kamailio@.service new file mode 100644 index 000000000..81c06394d --- /dev/null +++ b/pkg/kamailio/deb/debian/kamailio@.service @@ -0,0 +1,26 @@ +[Unit] +Description=Kamailio - the Open Source SIP Server (instance %i) +Documentation=man:kamailio(8) +Wants=network-online.target +After=network-online.target + +[Service] +Type=forking +User=kamailio +Group=kamailio +Environment='CFGFILE=/etc/kamailio/kamailio-%i.cfg' +Environment='SHM_MEMORY=64' +Environment='PKG_MEMORY=8' +EnvironmentFile=-/etc/default/kamailio-%i +EnvironmentFile=-/etc/default/kamailio-%i.d/* +# PIDFile requires a full absolute path +PIDFile=/run/kamailio-%i/kamailio.pid +# ExecStart requires a full absolute path +ExecStart=/usr/sbin/kamailio -P /run/kamailio-%i/kamailio.pid -Y /run/kamailio-%i -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY +Restart=on-failure +# /run/kamailio in tmpfs +RuntimeDirectory=kamailio-%i +RuntimeDirectoryMode=0770 + +[Install] +WantedBy=multi-user.target diff --git a/pkg/kamailio/deb/debian/rules b/pkg/kamailio/deb/debian/rules index cbf680015..1cbace016 100755 --- a/pkg/kamailio/deb/debian/rules +++ b/pkg/kamailio/deb/debian/rules @@ -141,24 +141,27 @@ test_install_all-stamp: build $(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)-$(subst install_,,$@)-modules \ - cfg_prefix=$(D)-$(subst install_,,$@)-modules \ - doc-dir=share/doc/$(DEB_SOURCE)-$(subst install_,,$@)-modules \ - group_include="k$(subst install_,,$@)" + 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" && \ + test "$$d" != "$(D)-$(module)-modules/usr/$(LIBDIR)/kamailio" && \ for r in `find $$d -name 'lib*' | xargs`; do \ - echo "removing $(subst install_,,$@) lib `basename $$r` present also in $$d"; \ - rm -f $(D)-$(subst install_,,$@)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"`; \ + 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)-$(subst install_,,$@)-modules -depth -empty -type d -exec rmdir {} \; + find $(D)-$(module)-modules -depth -empty -type d -exec rmdir {} \; $(INSTALL_EXTRA): test_install_all-stamp $(MAKE) install-modules-all \ diff --git a/pkg/kamailio/deb/focal/changelog b/pkg/kamailio/deb/focal/changelog index c63d96509..51a405e5f 100644 --- a/pkg/kamailio/deb/focal/changelog +++ b/pkg/kamailio/deb/focal/changelog @@ -1,3 +1,27 @@ +kamailio (5.8.6) unstable; urgency=medium + + * version set 5.8.6 + + -- Victor Seva Thu, 20 Mar 2025 08:19:52 +0100 + +kamailio (5.8.5) unstable; urgency=medium + + * version set 5.8.5 + + -- Victor Seva Thu, 23 Jan 2025 08:31:22 +0100 + +kamailio (5.8.4) unstable; urgency=medium + + * version set 5.8.4 + + -- Victor Seva Tue, 12 Nov 2024 10:53:35 +0100 + +kamailio (5.8.3) unstable; urgency=medium + + * version set 5.8.3 + + -- Victor Seva Wed, 04 Sep 2024 09:29:45 +0200 + kamailio (5.8.2) unstable; urgency=medium * version set 5.8.2 diff --git a/pkg/kamailio/deb/focal/control b/pkg/kamailio/deb/focal/control index 0bea172d9..4e41c4d1f 100644 --- a/pkg/kamailio/deb/focal/control +++ b/pkg/kamailio/deb/focal/control @@ -637,6 +637,23 @@ Description: TLS support for the Kamailio SIP server (authentication, transport) 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 diff --git a/pkg/kamailio/deb/focal/kamailio@.service b/pkg/kamailio/deb/focal/kamailio@.service new file mode 100644 index 000000000..81c06394d --- /dev/null +++ b/pkg/kamailio/deb/focal/kamailio@.service @@ -0,0 +1,26 @@ +[Unit] +Description=Kamailio - the Open Source SIP Server (instance %i) +Documentation=man:kamailio(8) +Wants=network-online.target +After=network-online.target + +[Service] +Type=forking +User=kamailio +Group=kamailio +Environment='CFGFILE=/etc/kamailio/kamailio-%i.cfg' +Environment='SHM_MEMORY=64' +Environment='PKG_MEMORY=8' +EnvironmentFile=-/etc/default/kamailio-%i +EnvironmentFile=-/etc/default/kamailio-%i.d/* +# PIDFile requires a full absolute path +PIDFile=/run/kamailio-%i/kamailio.pid +# ExecStart requires a full absolute path +ExecStart=/usr/sbin/kamailio -P /run/kamailio-%i/kamailio.pid -Y /run/kamailio-%i -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY +Restart=on-failure +# /run/kamailio in tmpfs +RuntimeDirectory=kamailio-%i +RuntimeDirectoryMode=0770 + +[Install] +WantedBy=multi-user.target diff --git a/pkg/kamailio/deb/focal/rules b/pkg/kamailio/deb/focal/rules index 58a6020cd..3b2815f74 100755 --- a/pkg/kamailio/deb/focal/rules +++ b/pkg/kamailio/deb/focal/rules @@ -140,24 +140,27 @@ test_install_all-stamp: build $(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)-$(subst install_,,$@)-modules \ - cfg_prefix=$(D)-$(subst install_,,$@)-modules \ - doc-dir=share/doc/$(DEB_SOURCE)-$(subst install_,,$@)-modules \ - group_include="k$(subst install_,,$@)" + 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" && \ + test "$$d" != "$(D)-$(module)-modules/usr/$(LIBDIR)/kamailio" && \ for r in `find $$d -name 'lib*' | xargs`; do \ - echo "removing $(subst install_,,$@) lib `basename $$r` present also in $$d"; \ - rm -f $(D)-$(subst install_,,$@)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"`; \ + 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)-$(subst install_,,$@)-modules -depth -empty -type d -exec rmdir {} \; + find $(D)-$(module)-modules -depth -empty -type d -exec rmdir {} \; $(INSTALL_EXTRA): test_install_all-stamp $(MAKE) install-modules-all \ diff --git a/pkg/kamailio/deb/jammy/changelog b/pkg/kamailio/deb/jammy/changelog index c63d96509..51a405e5f 100644 --- a/pkg/kamailio/deb/jammy/changelog +++ b/pkg/kamailio/deb/jammy/changelog @@ -1,3 +1,27 @@ +kamailio (5.8.6) unstable; urgency=medium + + * version set 5.8.6 + + -- Victor Seva Thu, 20 Mar 2025 08:19:52 +0100 + +kamailio (5.8.5) unstable; urgency=medium + + * version set 5.8.5 + + -- Victor Seva Thu, 23 Jan 2025 08:31:22 +0100 + +kamailio (5.8.4) unstable; urgency=medium + + * version set 5.8.4 + + -- Victor Seva Tue, 12 Nov 2024 10:53:35 +0100 + +kamailio (5.8.3) unstable; urgency=medium + + * version set 5.8.3 + + -- Victor Seva Wed, 04 Sep 2024 09:29:45 +0200 + kamailio (5.8.2) unstable; urgency=medium * version set 5.8.2 diff --git a/pkg/kamailio/deb/jammy/control b/pkg/kamailio/deb/jammy/control index 9ed6ed531..5735e102f 100644 --- a/pkg/kamailio/deb/jammy/control +++ b/pkg/kamailio/deb/jammy/control @@ -621,7 +621,7 @@ Description: TLS support for the Kamailio SIP server (authentication, transport) This package provides TLS support for encrypted and authenticated SIP connections as well as generic TLS support for many Kamailio modules. -Package: kamailio-wolftls-modules +Package: kamailio-tls-wolfssl-modules Architecture: any Multi-Arch: same Pre-Depends: diff --git a/pkg/kamailio/deb/jammy/kamailio@.service b/pkg/kamailio/deb/jammy/kamailio@.service new file mode 100644 index 000000000..81c06394d --- /dev/null +++ b/pkg/kamailio/deb/jammy/kamailio@.service @@ -0,0 +1,26 @@ +[Unit] +Description=Kamailio - the Open Source SIP Server (instance %i) +Documentation=man:kamailio(8) +Wants=network-online.target +After=network-online.target + +[Service] +Type=forking +User=kamailio +Group=kamailio +Environment='CFGFILE=/etc/kamailio/kamailio-%i.cfg' +Environment='SHM_MEMORY=64' +Environment='PKG_MEMORY=8' +EnvironmentFile=-/etc/default/kamailio-%i +EnvironmentFile=-/etc/default/kamailio-%i.d/* +# PIDFile requires a full absolute path +PIDFile=/run/kamailio-%i/kamailio.pid +# ExecStart requires a full absolute path +ExecStart=/usr/sbin/kamailio -P /run/kamailio-%i/kamailio.pid -Y /run/kamailio-%i -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY +Restart=on-failure +# /run/kamailio in tmpfs +RuntimeDirectory=kamailio-%i +RuntimeDirectoryMode=0770 + +[Install] +WantedBy=multi-user.target diff --git a/pkg/kamailio/deb/jammy/rules b/pkg/kamailio/deb/jammy/rules index f7b603151..26df0ccaf 100755 --- a/pkg/kamailio/deb/jammy/rules +++ b/pkg/kamailio/deb/jammy/rules @@ -140,24 +140,27 @@ test_install_all-stamp: build $(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)-$(subst install_,,$@)-modules \ - cfg_prefix=$(D)-$(subst install_,,$@)-modules \ - doc-dir=share/doc/$(DEB_SOURCE)-$(subst install_,,$@)-modules \ - group_include="k$(subst install_,,$@)" + 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" && \ + test "$$d" != "$(D)-$(module)-modules/usr/$(LIBDIR)/kamailio" && \ for r in `find $$d -name 'lib*' | xargs`; do \ - echo "removing $(subst install_,,$@) lib `basename $$r` present also in $$d"; \ - rm -f $(D)-$(subst install_,,$@)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"`; \ + 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)-$(subst install_,,$@)-modules -depth -empty -type d -exec rmdir {} \; + find $(D)-$(module)-modules -depth -empty -type d -exec rmdir {} \; $(INSTALL_EXTRA): test_install_all-stamp $(MAKE) install-modules-all \ diff --git a/pkg/kamailio/deb/jessie/changelog b/pkg/kamailio/deb/jessie/changelog index c63d96509..51a405e5f 100644 --- a/pkg/kamailio/deb/jessie/changelog +++ b/pkg/kamailio/deb/jessie/changelog @@ -1,3 +1,27 @@ +kamailio (5.8.6) unstable; urgency=medium + + * version set 5.8.6 + + -- Victor Seva Thu, 20 Mar 2025 08:19:52 +0100 + +kamailio (5.8.5) unstable; urgency=medium + + * version set 5.8.5 + + -- Victor Seva Thu, 23 Jan 2025 08:31:22 +0100 + +kamailio (5.8.4) unstable; urgency=medium + + * version set 5.8.4 + + -- Victor Seva Tue, 12 Nov 2024 10:53:35 +0100 + +kamailio (5.8.3) unstable; urgency=medium + + * version set 5.8.3 + + -- Victor Seva Wed, 04 Sep 2024 09:29:45 +0200 + kamailio (5.8.2) unstable; urgency=medium * version set 5.8.2 diff --git a/pkg/kamailio/deb/jessie/control b/pkg/kamailio/deb/jessie/control index f67868f1a..0f0ba395b 100644 --- a/pkg/kamailio/deb/jessie/control +++ b/pkg/kamailio/deb/jessie/control @@ -636,6 +636,23 @@ Description: TLS support for the Kamailio SIP server (authentication, transport) 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 diff --git a/pkg/kamailio/deb/jessie/kamailio@.service b/pkg/kamailio/deb/jessie/kamailio@.service new file mode 100644 index 000000000..81c06394d --- /dev/null +++ b/pkg/kamailio/deb/jessie/kamailio@.service @@ -0,0 +1,26 @@ +[Unit] +Description=Kamailio - the Open Source SIP Server (instance %i) +Documentation=man:kamailio(8) +Wants=network-online.target +After=network-online.target + +[Service] +Type=forking +User=kamailio +Group=kamailio +Environment='CFGFILE=/etc/kamailio/kamailio-%i.cfg' +Environment='SHM_MEMORY=64' +Environment='PKG_MEMORY=8' +EnvironmentFile=-/etc/default/kamailio-%i +EnvironmentFile=-/etc/default/kamailio-%i.d/* +# PIDFile requires a full absolute path +PIDFile=/run/kamailio-%i/kamailio.pid +# ExecStart requires a full absolute path +ExecStart=/usr/sbin/kamailio -P /run/kamailio-%i/kamailio.pid -Y /run/kamailio-%i -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY +Restart=on-failure +# /run/kamailio in tmpfs +RuntimeDirectory=kamailio-%i +RuntimeDirectoryMode=0770 + +[Install] +WantedBy=multi-user.target diff --git a/pkg/kamailio/deb/jessie/rules b/pkg/kamailio/deb/jessie/rules index b1a114b29..e53df3a1a 100755 --- a/pkg/kamailio/deb/jessie/rules +++ b/pkg/kamailio/deb/jessie/rules @@ -141,24 +141,27 @@ test_install_all-stamp: build $(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)-$(subst install_,,$@)-modules \ - cfg_prefix=$(D)-$(subst install_,,$@)-modules \ - doc-dir=share/doc/$(DEB_SOURCE)-$(subst install_,,$@)-modules \ - group_include="k$(subst install_,,$@)" + 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" && \ + test "$$d" != "$(D)-$(module)-modules/usr/$(LIBDIR)/kamailio" && \ for r in `find $$d -name 'lib*' | xargs`; do \ - echo "removing $(subst install_,,$@) lib `basename $$r` present also in $$d"; \ - rm -f $(D)-$(subst install_,,$@)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"`; \ + 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)-$(subst install_,,$@)-modules -depth -empty -type d -exec rmdir {} \; + find $(D)-$(module)-modules -depth -empty -type d -exec rmdir {} \; $(INSTALL_EXTRA): test_install_all-stamp $(MAKE) install-modules-all \ diff --git a/pkg/kamailio/deb/noble/changelog b/pkg/kamailio/deb/noble/changelog new file mode 100644 index 000000000..51a405e5f --- /dev/null +++ b/pkg/kamailio/deb/noble/changelog @@ -0,0 +1,71 @@ +kamailio (5.8.6) unstable; urgency=medium + + * version set 5.8.6 + + -- Victor Seva Thu, 20 Mar 2025 08:19:52 +0100 + +kamailio (5.8.5) unstable; urgency=medium + + * version set 5.8.5 + + -- Victor Seva Thu, 23 Jan 2025 08:31:22 +0100 + +kamailio (5.8.4) unstable; urgency=medium + + * version set 5.8.4 + + -- Victor Seva Tue, 12 Nov 2024 10:53:35 +0100 + +kamailio (5.8.3) unstable; urgency=medium + + * version set 5.8.3 + + -- Victor Seva Wed, 04 Sep 2024 09:29:45 +0200 + +kamailio (5.8.2) unstable; urgency=medium + + * version set 5.8.2 + + -- Victor Seva Wed, 12 Jun 2024 09:00:17 +0200 + +kamailio (5.8.1) unstable; urgency=medium + + * version set 5.8.1 + + -- Victor Seva Wed, 03 Apr 2024 08:21:53 +0200 + +kamailio (5.8.0) unstable; urgency=medium + + * version set 5.8.0 + + -- Victor Seva Thu, 07 Mar 2024 11:40:20 +0100 + +kamailio (5.8.0~rc0) unstable; urgency=medium + + * version set 5.8.0~rc0 + + -- Victor Seva Fri, 23 Feb 2024 20:04:35 +0100 + +kamailio (5.8.0~pre0) unstable; urgency=medium + + * version set 5.8.0~pre0 + + -- Victor Seva Fri, 02 Feb 2024 15:20:05 +0100 + +kamailio (5.8.0~dev2) unstable; urgency=medium + + * version set 5.8.0~dev2 + + -- Victor Seva Tue, 05 Dec 2023 12:04:06 +0100 + +kamailio (5.8.0~dev1) unstable; urgency=medium + + * version set 5.8.0~dev1 + + -- Victor Seva Wed, 28 Jun 2023 15:03:56 +0200 + +kamailio (5.8.0~dev0) unstable; urgency=medium + + * version set 5.8.0~dev0 + + -- Victor Seva Thu, 04 May 2023 21:45:08 +0200 diff --git a/pkg/kamailio/deb/noble/compat b/pkg/kamailio/deb/noble/compat new file mode 100644 index 000000000..ec635144f --- /dev/null +++ b/pkg/kamailio/deb/noble/compat @@ -0,0 +1 @@ +9 diff --git a/pkg/kamailio/deb/noble/control b/pkg/kamailio/deb/noble/control new file mode 100644 index 000000000..e9eb8d58a --- /dev/null +++ b/pkg/kamailio/deb/noble/control @@ -0,0 +1,942 @@ +Source: kamailio +Section: net +Priority: optional +Maintainer: Kamailio Admin Group +Uploaders: + Victor Seva , +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. diff --git a/pkg/kamailio/deb/noble/copyright b/pkg/kamailio/deb/noble/copyright new file mode 100644 index 000000000..4eaf098ba --- /dev/null +++ b/pkg/kamailio/deb/noble/copyright @@ -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 + 2009, 2010, 2011, Daniel-Constantin Mierla + 2010, Jon Bonilla + 2009, Jonas Bergler + 2009, Henning Westerholt + 2007, Julien BLACHE +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. diff --git a/pkg/kamailio/deb/noble/kamailio-autheph-modules.lintian-overrides b/pkg/kamailio/deb/noble/kamailio-autheph-modules.lintian-overrides new file mode 100644 index 000000000..dcb3d18c6 --- /dev/null +++ b/pkg/kamailio/deb/noble/kamailio-autheph-modules.lintian-overrides @@ -0,0 +1 @@ +kamailio-autheph-modules binary: possible-gpl-code-linked-with-openssl diff --git a/pkg/kamailio/deb/noble/kamailio-berkeley-bin.dirs b/pkg/kamailio/deb/noble/kamailio-berkeley-bin.dirs new file mode 100644 index 000000000..236670a2d --- /dev/null +++ b/pkg/kamailio/deb/noble/kamailio-berkeley-bin.dirs @@ -0,0 +1 @@ +usr/sbin diff --git a/pkg/kamailio/deb/noble/kamailio-dnssec-modules.lintian-overrides b/pkg/kamailio/deb/noble/kamailio-dnssec-modules.lintian-overrides new file mode 100644 index 000000000..10165fec9 --- /dev/null +++ b/pkg/kamailio/deb/noble/kamailio-dnssec-modules.lintian-overrides @@ -0,0 +1 @@ +kamailio-dnssec-modules binary: possible-gpl-code-linked-with-openssl diff --git a/pkg/kamailio/deb/noble/kamailio-outbound-modules.lintian-overrides b/pkg/kamailio/deb/noble/kamailio-outbound-modules.lintian-overrides new file mode 100644 index 000000000..3050cfeb4 --- /dev/null +++ b/pkg/kamailio/deb/noble/kamailio-outbound-modules.lintian-overrides @@ -0,0 +1 @@ +kamailio-outbound-modules binary: possible-gpl-code-linked-with-openssl diff --git a/pkg/kamailio/deb/noble/kamailio-secsipid-modules.lintian-overrides b/pkg/kamailio/deb/noble/kamailio-secsipid-modules.lintian-overrides new file mode 100644 index 000000000..d89729e2e --- /dev/null +++ b/pkg/kamailio/deb/noble/kamailio-secsipid-modules.lintian-overrides @@ -0,0 +1 @@ +kamailio-secsipid-modules binary: library-not-linked-against-libc diff --git a/pkg/kamailio/deb/noble/kamailio-systemd-modules.lintian-overrides b/pkg/kamailio/deb/noble/kamailio-systemd-modules.lintian-overrides new file mode 100644 index 000000000..9f41b5486 --- /dev/null +++ b/pkg/kamailio/deb/noble/kamailio-systemd-modules.lintian-overrides @@ -0,0 +1 @@ +kamailio-systemd-modules binary: library-not-linked-against-libc diff --git a/pkg/kamailio/deb/noble/kamailio-tls-modules.lintian-overrides b/pkg/kamailio/deb/noble/kamailio-tls-modules.lintian-overrides new file mode 100644 index 000000000..ca0014748 --- /dev/null +++ b/pkg/kamailio/deb/noble/kamailio-tls-modules.lintian-overrides @@ -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 diff --git a/pkg/kamailio/deb/noble/kamailio-websocket-modules.lintian-overrides b/pkg/kamailio/deb/noble/kamailio-websocket-modules.lintian-overrides new file mode 100644 index 000000000..8f384fbc3 --- /dev/null +++ b/pkg/kamailio/deb/noble/kamailio-websocket-modules.lintian-overrides @@ -0,0 +1 @@ +kamailio-websocket-modules binary: possible-gpl-code-linked-with-openssl diff --git a/pkg/kamailio/deb/noble/kamailio.README.Debian b/pkg/kamailio/deb/noble/kamailio.README.Debian new file mode 100644 index 000000000..d25769a96 --- /dev/null +++ b/pkg/kamailio/deb/noble/kamailio.README.Debian @@ -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 Wed, 11 Dec 2013 16:07:11 +0100 diff --git a/pkg/kamailio/deb/noble/kamailio.default b/pkg/kamailio/deb/noble/kamailio.default new file mode 100644 index 000000000..81c89258d --- /dev/null +++ b/pkg/kamailio/deb/noble/kamailio.default @@ -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 diff --git a/pkg/kamailio/deb/noble/kamailio.examples b/pkg/kamailio/deb/noble/kamailio.examples new file mode 100644 index 000000000..e39721e20 --- /dev/null +++ b/pkg/kamailio/deb/noble/kamailio.examples @@ -0,0 +1 @@ +examples/* diff --git a/pkg/kamailio/deb/noble/kamailio.init b/pkg/kamailio/deb/noble/kamailio.init new file mode 100644 index 000000000..aa250df1d --- /dev/null +++ b/pkg/kamailio/deb/noble/kamailio.init @@ -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 diff --git a/pkg/kamailio/deb/noble/kamailio.lintian-overrides b/pkg/kamailio/deb/noble/kamailio.lintian-overrides new file mode 100644 index 000000000..c313bcf54 --- /dev/null +++ b/pkg/kamailio/deb/noble/kamailio.lintian-overrides @@ -0,0 +1 @@ +kamailio binary: example-interpreter-not-absolute * diff --git a/pkg/kamailio/deb/noble/kamailio.postinst b/pkg/kamailio/deb/noble/kamailio.postinst new file mode 100644 index 000000000..78fe0c65a --- /dev/null +++ b/pkg/kamailio/deb/noble/kamailio.postinst @@ -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# diff --git a/pkg/kamailio/deb/noble/kamailio.service b/pkg/kamailio/deb/noble/kamailio.service new file mode 100644 index 000000000..8f9c93dd9 --- /dev/null +++ b/pkg/kamailio/deb/noble/kamailio.service @@ -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 diff --git a/pkg/kamailio/deb/noble/kamailio@.service b/pkg/kamailio/deb/noble/kamailio@.service new file mode 100644 index 000000000..81c06394d --- /dev/null +++ b/pkg/kamailio/deb/noble/kamailio@.service @@ -0,0 +1,26 @@ +[Unit] +Description=Kamailio - the Open Source SIP Server (instance %i) +Documentation=man:kamailio(8) +Wants=network-online.target +After=network-online.target + +[Service] +Type=forking +User=kamailio +Group=kamailio +Environment='CFGFILE=/etc/kamailio/kamailio-%i.cfg' +Environment='SHM_MEMORY=64' +Environment='PKG_MEMORY=8' +EnvironmentFile=-/etc/default/kamailio-%i +EnvironmentFile=-/etc/default/kamailio-%i.d/* +# PIDFile requires a full absolute path +PIDFile=/run/kamailio-%i/kamailio.pid +# ExecStart requires a full absolute path +ExecStart=/usr/sbin/kamailio -P /run/kamailio-%i/kamailio.pid -Y /run/kamailio-%i -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY +Restart=on-failure +# /run/kamailio in tmpfs +RuntimeDirectory=kamailio-%i +RuntimeDirectoryMode=0770 + +[Install] +WantedBy=multi-user.target diff --git a/pkg/kamailio/deb/noble/rules b/pkg/kamailio/deb/noble/rules new file mode 100755 index 000000000..26df0ccaf --- /dev/null +++ b/pkg/kamailio/deb/noble/rules @@ -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 diff --git a/pkg/kamailio/deb/noble/source.lintian-overrides b/pkg/kamailio/deb/noble/source.lintian-overrides new file mode 100644 index 000000000..620d9ffdd --- /dev/null +++ b/pkg/kamailio/deb/noble/source.lintian-overrides @@ -0,0 +1 @@ +kamailio source: debian-watch-file-in-native-package diff --git a/pkg/kamailio/deb/noble/source/format b/pkg/kamailio/deb/noble/source/format new file mode 100644 index 000000000..89ae9db8f --- /dev/null +++ b/pkg/kamailio/deb/noble/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/pkg/kamailio/deb/noble/watch b/pkg/kamailio/deb/noble/watch new file mode 100644 index 000000000..202b656a4 --- /dev/null +++ b/pkg/kamailio/deb/noble/watch @@ -0,0 +1,3 @@ +version=3 +opts=dversionmangle=s/\~svn([\d]+)//; \ +https://www.kamailio.org/pub/kamailio/([\d.]+)/src/kamailio-([\d.]+)_src\.tar\.gz diff --git a/pkg/kamailio/deb/precise/changelog b/pkg/kamailio/deb/precise/changelog index c63d96509..51a405e5f 100644 --- a/pkg/kamailio/deb/precise/changelog +++ b/pkg/kamailio/deb/precise/changelog @@ -1,3 +1,27 @@ +kamailio (5.8.6) unstable; urgency=medium + + * version set 5.8.6 + + -- Victor Seva Thu, 20 Mar 2025 08:19:52 +0100 + +kamailio (5.8.5) unstable; urgency=medium + + * version set 5.8.5 + + -- Victor Seva Thu, 23 Jan 2025 08:31:22 +0100 + +kamailio (5.8.4) unstable; urgency=medium + + * version set 5.8.4 + + -- Victor Seva Tue, 12 Nov 2024 10:53:35 +0100 + +kamailio (5.8.3) unstable; urgency=medium + + * version set 5.8.3 + + -- Victor Seva Wed, 04 Sep 2024 09:29:45 +0200 + kamailio (5.8.2) unstable; urgency=medium * version set 5.8.2 diff --git a/pkg/kamailio/deb/precise/control b/pkg/kamailio/deb/precise/control index 16719f809..38fa55cfd 100644 --- a/pkg/kamailio/deb/precise/control +++ b/pkg/kamailio/deb/precise/control @@ -593,6 +593,23 @@ Description: TLS support for the Kamailio SIP server (authentication, transport) 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 diff --git a/pkg/kamailio/deb/precise/kamailio@.service b/pkg/kamailio/deb/precise/kamailio@.service new file mode 100644 index 000000000..81c06394d --- /dev/null +++ b/pkg/kamailio/deb/precise/kamailio@.service @@ -0,0 +1,26 @@ +[Unit] +Description=Kamailio - the Open Source SIP Server (instance %i) +Documentation=man:kamailio(8) +Wants=network-online.target +After=network-online.target + +[Service] +Type=forking +User=kamailio +Group=kamailio +Environment='CFGFILE=/etc/kamailio/kamailio-%i.cfg' +Environment='SHM_MEMORY=64' +Environment='PKG_MEMORY=8' +EnvironmentFile=-/etc/default/kamailio-%i +EnvironmentFile=-/etc/default/kamailio-%i.d/* +# PIDFile requires a full absolute path +PIDFile=/run/kamailio-%i/kamailio.pid +# ExecStart requires a full absolute path +ExecStart=/usr/sbin/kamailio -P /run/kamailio-%i/kamailio.pid -Y /run/kamailio-%i -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY +Restart=on-failure +# /run/kamailio in tmpfs +RuntimeDirectory=kamailio-%i +RuntimeDirectoryMode=0770 + +[Install] +WantedBy=multi-user.target diff --git a/pkg/kamailio/deb/precise/rules b/pkg/kamailio/deb/precise/rules index 6bd8a12ab..a26972895 100755 --- a/pkg/kamailio/deb/precise/rules +++ b/pkg/kamailio/deb/precise/rules @@ -140,24 +140,27 @@ test_install_all-stamp: build $(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)-$(subst install_,,$@)-modules \ - cfg_prefix=$(D)-$(subst install_,,$@)-modules \ - doc-dir=share/doc/$(DEB_SOURCE)-$(subst install_,,$@)-modules \ - group_include="k$(subst install_,,$@)" + 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" && \ + test "$$d" != "$(D)-$(module)-modules/usr/$(LIBDIR)/kamailio" && \ for r in `find $$d -name 'lib*' | xargs`; do \ - echo "removing $(subst install_,,$@) lib `basename $$r` present also in $$d"; \ - rm -f $(D)-$(subst install_,,$@)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"`; \ + 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)-$(subst install_,,$@)-modules -depth -empty -type d -exec rmdir {} \; + find $(D)-$(module)-modules -depth -empty -type d -exec rmdir {} \; $(INSTALL_EXTRA): test_install_all-stamp $(MAKE) install-modules-all \ diff --git a/pkg/kamailio/deb/sid/changelog b/pkg/kamailio/deb/sid/changelog index c63d96509..51a405e5f 100644 --- a/pkg/kamailio/deb/sid/changelog +++ b/pkg/kamailio/deb/sid/changelog @@ -1,3 +1,27 @@ +kamailio (5.8.6) unstable; urgency=medium + + * version set 5.8.6 + + -- Victor Seva Thu, 20 Mar 2025 08:19:52 +0100 + +kamailio (5.8.5) unstable; urgency=medium + + * version set 5.8.5 + + -- Victor Seva Thu, 23 Jan 2025 08:31:22 +0100 + +kamailio (5.8.4) unstable; urgency=medium + + * version set 5.8.4 + + -- Victor Seva Tue, 12 Nov 2024 10:53:35 +0100 + +kamailio (5.8.3) unstable; urgency=medium + + * version set 5.8.3 + + -- Victor Seva Wed, 04 Sep 2024 09:29:45 +0200 + kamailio (5.8.2) unstable; urgency=medium * version set 5.8.2 diff --git a/pkg/kamailio/deb/sid/control b/pkg/kamailio/deb/sid/control index 2ec6d74a4..e9eb8d58a 100644 --- a/pkg/kamailio/deb/sid/control +++ b/pkg/kamailio/deb/sid/control @@ -620,7 +620,7 @@ Description: TLS support for the Kamailio SIP server (authentication, transport) This package provides TLS support for encrypted and authenticated SIP connections as well as generic TLS support for many Kamailio modules. -Package: kamailio-wolftls-modules +Package: kamailio-tls-wolfssl-modules Architecture: any Multi-Arch: same Pre-Depends: diff --git a/pkg/kamailio/deb/sid/kamailio@.service b/pkg/kamailio/deb/sid/kamailio@.service new file mode 100644 index 000000000..81c06394d --- /dev/null +++ b/pkg/kamailio/deb/sid/kamailio@.service @@ -0,0 +1,26 @@ +[Unit] +Description=Kamailio - the Open Source SIP Server (instance %i) +Documentation=man:kamailio(8) +Wants=network-online.target +After=network-online.target + +[Service] +Type=forking +User=kamailio +Group=kamailio +Environment='CFGFILE=/etc/kamailio/kamailio-%i.cfg' +Environment='SHM_MEMORY=64' +Environment='PKG_MEMORY=8' +EnvironmentFile=-/etc/default/kamailio-%i +EnvironmentFile=-/etc/default/kamailio-%i.d/* +# PIDFile requires a full absolute path +PIDFile=/run/kamailio-%i/kamailio.pid +# ExecStart requires a full absolute path +ExecStart=/usr/sbin/kamailio -P /run/kamailio-%i/kamailio.pid -Y /run/kamailio-%i -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY +Restart=on-failure +# /run/kamailio in tmpfs +RuntimeDirectory=kamailio-%i +RuntimeDirectoryMode=0770 + +[Install] +WantedBy=multi-user.target diff --git a/pkg/kamailio/deb/sid/rules b/pkg/kamailio/deb/sid/rules index f7b603151..26df0ccaf 100755 --- a/pkg/kamailio/deb/sid/rules +++ b/pkg/kamailio/deb/sid/rules @@ -140,24 +140,27 @@ test_install_all-stamp: build $(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)-$(subst install_,,$@)-modules \ - cfg_prefix=$(D)-$(subst install_,,$@)-modules \ - doc-dir=share/doc/$(DEB_SOURCE)-$(subst install_,,$@)-modules \ - group_include="k$(subst install_,,$@)" + 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" && \ + test "$$d" != "$(D)-$(module)-modules/usr/$(LIBDIR)/kamailio" && \ for r in `find $$d -name 'lib*' | xargs`; do \ - echo "removing $(subst install_,,$@) lib `basename $$r` present also in $$d"; \ - rm -f $(D)-$(subst install_,,$@)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"`; \ + 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)-$(subst install_,,$@)-modules -depth -empty -type d -exec rmdir {} \; + find $(D)-$(module)-modules -depth -empty -type d -exec rmdir {} \; $(INSTALL_EXTRA): test_install_all-stamp $(MAKE) install-modules-all \ diff --git a/pkg/kamailio/deb/stretch/changelog b/pkg/kamailio/deb/stretch/changelog index c63d96509..51a405e5f 100644 --- a/pkg/kamailio/deb/stretch/changelog +++ b/pkg/kamailio/deb/stretch/changelog @@ -1,3 +1,27 @@ +kamailio (5.8.6) unstable; urgency=medium + + * version set 5.8.6 + + -- Victor Seva Thu, 20 Mar 2025 08:19:52 +0100 + +kamailio (5.8.5) unstable; urgency=medium + + * version set 5.8.5 + + -- Victor Seva Thu, 23 Jan 2025 08:31:22 +0100 + +kamailio (5.8.4) unstable; urgency=medium + + * version set 5.8.4 + + -- Victor Seva Tue, 12 Nov 2024 10:53:35 +0100 + +kamailio (5.8.3) unstable; urgency=medium + + * version set 5.8.3 + + -- Victor Seva Wed, 04 Sep 2024 09:29:45 +0200 + kamailio (5.8.2) unstable; urgency=medium * version set 5.8.2 diff --git a/pkg/kamailio/deb/stretch/control b/pkg/kamailio/deb/stretch/control index 2793e0875..0dc643cf3 100644 --- a/pkg/kamailio/deb/stretch/control +++ b/pkg/kamailio/deb/stretch/control @@ -639,6 +639,23 @@ Description: TLS support for the Kamailio SIP server (authentication, transport) 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 diff --git a/pkg/kamailio/deb/stretch/kamailio@.service b/pkg/kamailio/deb/stretch/kamailio@.service new file mode 100644 index 000000000..81c06394d --- /dev/null +++ b/pkg/kamailio/deb/stretch/kamailio@.service @@ -0,0 +1,26 @@ +[Unit] +Description=Kamailio - the Open Source SIP Server (instance %i) +Documentation=man:kamailio(8) +Wants=network-online.target +After=network-online.target + +[Service] +Type=forking +User=kamailio +Group=kamailio +Environment='CFGFILE=/etc/kamailio/kamailio-%i.cfg' +Environment='SHM_MEMORY=64' +Environment='PKG_MEMORY=8' +EnvironmentFile=-/etc/default/kamailio-%i +EnvironmentFile=-/etc/default/kamailio-%i.d/* +# PIDFile requires a full absolute path +PIDFile=/run/kamailio-%i/kamailio.pid +# ExecStart requires a full absolute path +ExecStart=/usr/sbin/kamailio -P /run/kamailio-%i/kamailio.pid -Y /run/kamailio-%i -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY +Restart=on-failure +# /run/kamailio in tmpfs +RuntimeDirectory=kamailio-%i +RuntimeDirectoryMode=0770 + +[Install] +WantedBy=multi-user.target diff --git a/pkg/kamailio/deb/stretch/rules b/pkg/kamailio/deb/stretch/rules index bcd0f0544..cdca5a3fe 100755 --- a/pkg/kamailio/deb/stretch/rules +++ b/pkg/kamailio/deb/stretch/rules @@ -141,24 +141,27 @@ test_install_all-stamp: build $(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)-$(subst install_,,$@)-modules \ - cfg_prefix=$(D)-$(subst install_,,$@)-modules \ - doc-dir=share/doc/$(DEB_SOURCE)-$(subst install_,,$@)-modules \ - group_include="k$(subst install_,,$@)" + 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" && \ + test "$$d" != "$(D)-$(module)-modules/usr/$(LIBDIR)/kamailio" && \ for r in `find $$d -name 'lib*' | xargs`; do \ - echo "removing $(subst install_,,$@) lib `basename $$r` present also in $$d"; \ - rm -f $(D)-$(subst install_,,$@)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"`; \ + 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)-$(subst install_,,$@)-modules -depth -empty -type d -exec rmdir {} \; + find $(D)-$(module)-modules -depth -empty -type d -exec rmdir {} \; $(INSTALL_EXTRA): test_install_all-stamp $(MAKE) install-modules-all \ diff --git a/pkg/kamailio/deb/trusty/changelog b/pkg/kamailio/deb/trusty/changelog index c63d96509..51a405e5f 100644 --- a/pkg/kamailio/deb/trusty/changelog +++ b/pkg/kamailio/deb/trusty/changelog @@ -1,3 +1,27 @@ +kamailio (5.8.6) unstable; urgency=medium + + * version set 5.8.6 + + -- Victor Seva Thu, 20 Mar 2025 08:19:52 +0100 + +kamailio (5.8.5) unstable; urgency=medium + + * version set 5.8.5 + + -- Victor Seva Thu, 23 Jan 2025 08:31:22 +0100 + +kamailio (5.8.4) unstable; urgency=medium + + * version set 5.8.4 + + -- Victor Seva Tue, 12 Nov 2024 10:53:35 +0100 + +kamailio (5.8.3) unstable; urgency=medium + + * version set 5.8.3 + + -- Victor Seva Wed, 04 Sep 2024 09:29:45 +0200 + kamailio (5.8.2) unstable; urgency=medium * version set 5.8.2 diff --git a/pkg/kamailio/deb/trusty/control b/pkg/kamailio/deb/trusty/control index ef0f37f78..e80e4e33b 100644 --- a/pkg/kamailio/deb/trusty/control +++ b/pkg/kamailio/deb/trusty/control @@ -614,6 +614,23 @@ Description: TLS support for the Kamailio SIP server (authentication, transport) 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 diff --git a/pkg/kamailio/deb/trusty/kamailio@.service b/pkg/kamailio/deb/trusty/kamailio@.service new file mode 100644 index 000000000..81c06394d --- /dev/null +++ b/pkg/kamailio/deb/trusty/kamailio@.service @@ -0,0 +1,26 @@ +[Unit] +Description=Kamailio - the Open Source SIP Server (instance %i) +Documentation=man:kamailio(8) +Wants=network-online.target +After=network-online.target + +[Service] +Type=forking +User=kamailio +Group=kamailio +Environment='CFGFILE=/etc/kamailio/kamailio-%i.cfg' +Environment='SHM_MEMORY=64' +Environment='PKG_MEMORY=8' +EnvironmentFile=-/etc/default/kamailio-%i +EnvironmentFile=-/etc/default/kamailio-%i.d/* +# PIDFile requires a full absolute path +PIDFile=/run/kamailio-%i/kamailio.pid +# ExecStart requires a full absolute path +ExecStart=/usr/sbin/kamailio -P /run/kamailio-%i/kamailio.pid -Y /run/kamailio-%i -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY +Restart=on-failure +# /run/kamailio in tmpfs +RuntimeDirectory=kamailio-%i +RuntimeDirectoryMode=0770 + +[Install] +WantedBy=multi-user.target diff --git a/pkg/kamailio/deb/trusty/rules b/pkg/kamailio/deb/trusty/rules index 997e2635c..619618af1 100755 --- a/pkg/kamailio/deb/trusty/rules +++ b/pkg/kamailio/deb/trusty/rules @@ -141,24 +141,27 @@ test_install_all-stamp: build $(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)-$(subst install_,,$@)-modules \ - cfg_prefix=$(D)-$(subst install_,,$@)-modules \ - doc-dir=share/doc/$(DEB_SOURCE)-$(subst install_,,$@)-modules \ - group_include="k$(subst install_,,$@)" + 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" && \ + test "$$d" != "$(D)-$(module)-modules/usr/$(LIBDIR)/kamailio" && \ for r in `find $$d -name 'lib*' | xargs`; do \ - echo "removing $(subst install_,,$@) lib `basename $$r` present also in $$d"; \ - rm -f $(D)-$(subst install_,,$@)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"`; \ + 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)-$(subst install_,,$@)-modules -depth -empty -type d -exec rmdir {} \; + find $(D)-$(module)-modules -depth -empty -type d -exec rmdir {} \; $(INSTALL_EXTRA): test_install_all-stamp $(MAKE) install-modules-all \ diff --git a/pkg/kamailio/deb/wheezy/changelog b/pkg/kamailio/deb/wheezy/changelog index c63d96509..51a405e5f 100644 --- a/pkg/kamailio/deb/wheezy/changelog +++ b/pkg/kamailio/deb/wheezy/changelog @@ -1,3 +1,27 @@ +kamailio (5.8.6) unstable; urgency=medium + + * version set 5.8.6 + + -- Victor Seva Thu, 20 Mar 2025 08:19:52 +0100 + +kamailio (5.8.5) unstable; urgency=medium + + * version set 5.8.5 + + -- Victor Seva Thu, 23 Jan 2025 08:31:22 +0100 + +kamailio (5.8.4) unstable; urgency=medium + + * version set 5.8.4 + + -- Victor Seva Tue, 12 Nov 2024 10:53:35 +0100 + +kamailio (5.8.3) unstable; urgency=medium + + * version set 5.8.3 + + -- Victor Seva Wed, 04 Sep 2024 09:29:45 +0200 + kamailio (5.8.2) unstable; urgency=medium * version set 5.8.2 diff --git a/pkg/kamailio/deb/wheezy/control b/pkg/kamailio/deb/wheezy/control index ed5f1aa50..f869c980c 100644 --- a/pkg/kamailio/deb/wheezy/control +++ b/pkg/kamailio/deb/wheezy/control @@ -575,6 +575,23 @@ Description: TLS support for the Kamailio SIP server (authentication, transport) 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 diff --git a/pkg/kamailio/deb/wheezy/kamailio@.service b/pkg/kamailio/deb/wheezy/kamailio@.service new file mode 100644 index 000000000..81c06394d --- /dev/null +++ b/pkg/kamailio/deb/wheezy/kamailio@.service @@ -0,0 +1,26 @@ +[Unit] +Description=Kamailio - the Open Source SIP Server (instance %i) +Documentation=man:kamailio(8) +Wants=network-online.target +After=network-online.target + +[Service] +Type=forking +User=kamailio +Group=kamailio +Environment='CFGFILE=/etc/kamailio/kamailio-%i.cfg' +Environment='SHM_MEMORY=64' +Environment='PKG_MEMORY=8' +EnvironmentFile=-/etc/default/kamailio-%i +EnvironmentFile=-/etc/default/kamailio-%i.d/* +# PIDFile requires a full absolute path +PIDFile=/run/kamailio-%i/kamailio.pid +# ExecStart requires a full absolute path +ExecStart=/usr/sbin/kamailio -P /run/kamailio-%i/kamailio.pid -Y /run/kamailio-%i -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY +Restart=on-failure +# /run/kamailio in tmpfs +RuntimeDirectory=kamailio-%i +RuntimeDirectoryMode=0770 + +[Install] +WantedBy=multi-user.target diff --git a/pkg/kamailio/deb/wheezy/rules b/pkg/kamailio/deb/wheezy/rules index e30d2b138..9a235740e 100755 --- a/pkg/kamailio/deb/wheezy/rules +++ b/pkg/kamailio/deb/wheezy/rules @@ -140,24 +140,27 @@ test_install_all-stamp: build $(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)-$(subst install_,,$@)-modules \ - cfg_prefix=$(D)-$(subst install_,,$@)-modules \ - doc-dir=share/doc/$(DEB_SOURCE)-$(subst install_,,$@)-modules \ - group_include="k$(subst install_,,$@)" + 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" && \ + test "$$d" != "$(D)-$(module)-modules/usr/$(LIBDIR)/kamailio" && \ for r in `find $$d -name 'lib*' | xargs`; do \ - echo "removing $(subst install_,,$@) lib `basename $$r` present also in $$d"; \ - rm -f $(D)-$(subst install_,,$@)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"`; \ + 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)-$(subst install_,,$@)-modules -depth -empty -type d -exec rmdir {} \; + find $(D)-$(module)-modules -depth -empty -type d -exec rmdir {} \; $(INSTALL_EXTRA): test_install_all-stamp $(MAKE) install-modules-all \ diff --git a/pkg/kamailio/deb/xenial/changelog b/pkg/kamailio/deb/xenial/changelog index c63d96509..51a405e5f 100644 --- a/pkg/kamailio/deb/xenial/changelog +++ b/pkg/kamailio/deb/xenial/changelog @@ -1,3 +1,27 @@ +kamailio (5.8.6) unstable; urgency=medium + + * version set 5.8.6 + + -- Victor Seva Thu, 20 Mar 2025 08:19:52 +0100 + +kamailio (5.8.5) unstable; urgency=medium + + * version set 5.8.5 + + -- Victor Seva Thu, 23 Jan 2025 08:31:22 +0100 + +kamailio (5.8.4) unstable; urgency=medium + + * version set 5.8.4 + + -- Victor Seva Tue, 12 Nov 2024 10:53:35 +0100 + +kamailio (5.8.3) unstable; urgency=medium + + * version set 5.8.3 + + -- Victor Seva Wed, 04 Sep 2024 09:29:45 +0200 + kamailio (5.8.2) unstable; urgency=medium * version set 5.8.2 diff --git a/pkg/kamailio/deb/xenial/control b/pkg/kamailio/deb/xenial/control index 4443167ad..0a1627069 100644 --- a/pkg/kamailio/deb/xenial/control +++ b/pkg/kamailio/deb/xenial/control @@ -641,6 +641,23 @@ Description: TLS support for the Kamailio SIP server (authentication, transport) 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 diff --git a/pkg/kamailio/deb/xenial/kamailio@.service b/pkg/kamailio/deb/xenial/kamailio@.service new file mode 100644 index 000000000..81c06394d --- /dev/null +++ b/pkg/kamailio/deb/xenial/kamailio@.service @@ -0,0 +1,26 @@ +[Unit] +Description=Kamailio - the Open Source SIP Server (instance %i) +Documentation=man:kamailio(8) +Wants=network-online.target +After=network-online.target + +[Service] +Type=forking +User=kamailio +Group=kamailio +Environment='CFGFILE=/etc/kamailio/kamailio-%i.cfg' +Environment='SHM_MEMORY=64' +Environment='PKG_MEMORY=8' +EnvironmentFile=-/etc/default/kamailio-%i +EnvironmentFile=-/etc/default/kamailio-%i.d/* +# PIDFile requires a full absolute path +PIDFile=/run/kamailio-%i/kamailio.pid +# ExecStart requires a full absolute path +ExecStart=/usr/sbin/kamailio -P /run/kamailio-%i/kamailio.pid -Y /run/kamailio-%i -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY +Restart=on-failure +# /run/kamailio in tmpfs +RuntimeDirectory=kamailio-%i +RuntimeDirectoryMode=0770 + +[Install] +WantedBy=multi-user.target diff --git a/pkg/kamailio/deb/xenial/rules b/pkg/kamailio/deb/xenial/rules index f441bd6dc..3e7182c68 100755 --- a/pkg/kamailio/deb/xenial/rules +++ b/pkg/kamailio/deb/xenial/rules @@ -141,24 +141,27 @@ test_install_all-stamp: build $(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)-$(subst install_,,$@)-modules \ - cfg_prefix=$(D)-$(subst install_,,$@)-modules \ - doc-dir=share/doc/$(DEB_SOURCE)-$(subst install_,,$@)-modules \ - group_include="k$(subst install_,,$@)" + 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" && \ + test "$$d" != "$(D)-$(module)-modules/usr/$(LIBDIR)/kamailio" && \ for r in `find $$d -name 'lib*' | xargs`; do \ - echo "removing $(subst install_,,$@) lib `basename $$r` present also in $$d"; \ - rm -f $(D)-$(subst install_,,$@)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"`; \ + 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)-$(subst install_,,$@)-modules -depth -empty -type d -exec rmdir {} \; + find $(D)-$(module)-modules -depth -empty -type d -exec rmdir {} \; $(INSTALL_EXTRA): test_install_all-stamp $(MAKE) install-modules-all \ diff --git a/pkg/kamailio/obs/kamailio.service b/pkg/kamailio/obs/kamailio.service index 14a2e5808..0c4fbc49c 100644 --- a/pkg/kamailio/obs/kamailio.service +++ b/pkg/kamailio/obs/kamailio.service @@ -1,5 +1,6 @@ [Unit] Description=Kamailio - the Open Source SIP Server +Documentation=man:kamailio(8) Wants=network-online.target After=network-online.target diff --git a/pkg/kamailio/obs/kamailio.spec b/pkg/kamailio/obs/kamailio.spec index 53831a5d2..956c5b111 100644 --- a/pkg/kamailio/obs/kamailio.spec +++ b/pkg/kamailio/obs/kamailio.spec @@ -1,5 +1,5 @@ %define name kamailio -%define ver 5.8.2 +%define ver 5.8.6 %define rel dev1.0%{dist} %if 0%{?fedora} @@ -116,21 +116,21 @@ %bcond_without wolfssl %endif -%if 0%{?rhel} == 9 +%if 0%{?rhel} == 9 || 0%{?rhel} == 10 %if 0%{?centos_ver} %define dist_name centos %define dist_version %{?centos} -%define dist .el9.centos +%define dist .el%{?centos_ver}.centos %endif %if 0%{?almalinux_ver} %define dist_name centos %define dist_version %{?almalinux} -%define dist .el9.almalinux +%define dist .el%{?almalinux_ver}.almalinux %endif %if 0%{?rocky_ver} %define dist_name centos %define dist_version %{?rocky} -%define dist .el9.rocky +%define dist .el%{?rocky_ver}.rocky %endif %if 0%{?centos_ver} == 0 && 0%{?almalinux_ver} == 0 && 0%{?rocky_ver} == 0 %define dist_name rhel @@ -237,6 +237,7 @@ Conflicts: kamailio-dialplan < %ver, kamailio-dnssec < %ver Conflicts: kamailio-geoip < %ver, kamailio-gzcompress < %ver Conflicts: kamailio-http_client < %ver Conflicts: kamailio-ims < %ver, kamailio-java < %ver, kamailio-json < %ver +Conflicts: kamailio-jwt < %ver Conflicts: kamailio-kazoo < %ver Conflicts: kamailio-lcr < %ver, kamailio-ldap < %ver, kamailio-lost < %ver, kamailio-lua < %ver Conflicts: kamailio-nats < %ver @@ -590,6 +591,17 @@ JSON string handling and RPC modules for Kamailio. %endif +%package jwt +Summary: JWT (JSON Web Token) functions module for Kamailio +Group: %{PKGGROUP} +Requires: libjwt, kamailio = %ver +BuildRequires: libjwt-devel + +%description jwt +This module provides JWT (JSON Web Token) functions to be used in Kamailio configuration file. +It relies on libjwt (at least v1.12.0) library (https://github.com/benmcollins/libjwt). + + %if %{with kazoo} %package kazoo Summary: Kazoo middle layer connector support for Kamailio @@ -812,9 +824,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 @@ -1188,11 +1200,11 @@ sed -i -e 's/python3/python2/' utils/kamctl/dbtextdb/dbtextdb.py # on latest dist need to add --atexit=no for Kamailio options. More details GH #2616 %if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} >= 8 sed -i -e 's|/usr/sbin/kamailio|/usr/sbin/kamailio --atexit=no|' pkg/kamailio/obs/kamailio.service +sed -i -e 's|/usr/sbin/kamailio|/usr/sbin/kamailio --atexit=no|' pkg/kamailio/obs/kamailio@.service %endif %build -ln -s ../obs pkg/kamailio/%{dist_name}/%{dist_version} %if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} >= 8 export FREERADIUS=1 %endif @@ -1212,7 +1224,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 \ @@ -1245,6 +1257,7 @@ make every-module skip_modules="app_mono db_cassandra db_oracle iptrtpproxy \ kjson \ %endif kjsonrpcs \ + kjwt \ %if %{with kazoo} kkazoo \ %endif @@ -1325,7 +1338,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 \ @@ -1358,6 +1371,7 @@ make install-modules-all skip_modules="app_mono db_cassandra db_oracle \ kjson \ %endif kjsonrpcs \ + kjwt \ %if %{with kazoo} kkazoo \ %endif @@ -1429,28 +1443,29 @@ install -d %{buildroot}%{_sharedstatedir}/kamailio # On RedHat 6 like install -d %{buildroot}%{_var}/run/kamailio install -d %{buildroot}%{_sysconfdir}/rc.d/init.d -install -m755 pkg/kamailio/%{dist_name}/%{dist_version}/kamailio.init \ +install -m755 pkg/kamailio/obs/kamailio.init \ %{buildroot}%{_sysconfdir}/rc.d/init.d/kamailio %else # systemd install -d %{buildroot}%{_unitdir} -install -Dpm 0644 pkg/kamailio/%{dist_name}/%{dist_version}/kamailio.service %{buildroot}%{_unitdir}/kamailio.service -install -Dpm 0644 pkg/kamailio/%{dist_name}/%{dist_version}/sipcapture.service %{buildroot}%{_unitdir}/sipcapture.service -install -Dpm 0644 pkg/kamailio/%{dist_name}/%{dist_version}/kamailio.tmpfiles %{buildroot}%{_tmpfilesdir}/kamailio.conf -install -Dpm 0644 pkg/kamailio/%{dist_name}/%{dist_version}/sipcapture.tmpfiles %{buildroot}%{_tmpfilesdir}/sipcapture.conf +install -Dpm 0644 pkg/kamailio/obs/kamailio.service %{buildroot}%{_unitdir}/kamailio.service +install -Dpm 0644 pkg/kamailio/obs/kamailio@.service %{buildroot}%{_unitdir}/kamailio@.service +install -Dpm 0644 pkg/kamailio/obs/sipcapture.service %{buildroot}%{_unitdir}/sipcapture.service +install -Dpm 0644 pkg/kamailio/obs/kamailio.tmpfiles %{buildroot}%{_tmpfilesdir}/kamailio.conf +install -Dpm 0644 pkg/kamailio/obs/sipcapture.tmpfiles %{buildroot}%{_tmpfilesdir}/sipcapture.conf %endif %if 0%{?suse_version} install -d %{buildroot}%{_fillupdir} -install -m644 pkg/kamailio/%{dist_name}/%{dist_version}/kamailio.sysconfig \ +install -m644 pkg/kamailio/obs/kamailio.sysconfig \ %{buildroot}%{_fillupdir}/sysconfig.kamailio -install -m644 pkg/kamailio/%{dist_name}/%{dist_version}/sipcapture.sysconfig \ +install -m644 pkg/kamailio/obs/sipcapture.sysconfig \ %{buildroot}%{_fillupdir}/sysconfig.sipcapture %else install -d %{buildroot}%{_sysconfdir}/sysconfig -install -m644 pkg/kamailio/%{dist_name}/%{dist_version}/kamailio.sysconfig \ +install -m644 pkg/kamailio/obs/kamailio.sysconfig \ %{buildroot}%{_sysconfdir}/sysconfig/kamailio -install -m644 pkg/kamailio/%{dist_name}/%{dist_version}/sipcapture.sysconfig \ +install -m644 pkg/kamailio/obs/sipcapture.sysconfig \ %{buildroot}%{_sysconfdir}/sysconfig/sipcapture %endif @@ -1666,6 +1681,7 @@ fi %dir %attr(-,kamailio,kamailio) %{_var}/run/kamailio %else %{_unitdir}/kamailio.service +%{_unitdir}/kamailio@.service %{_tmpfilesdir}/kamailio.conf %endif @@ -2020,6 +2036,12 @@ fi %endif +%files jwt +%defattr(-,root,root) +%doc %{_docdir}/kamailio/modules/README.jwt +%{_libdir}/kamailio/modules/jwt.so + + %if %{with kazoo} %files kazoo %defattr(-,root,root) diff --git a/pkg/kamailio/obs/kamailio@.service b/pkg/kamailio/obs/kamailio@.service new file mode 100644 index 000000000..44a4c02a5 --- /dev/null +++ b/pkg/kamailio/obs/kamailio@.service @@ -0,0 +1,28 @@ +[Unit] +Description=Kamailio - the Open Source SIP Server (instance %i) +Documentation=man:kamailio(8) +Wants=network-online.target +After=network-online.target + +[Service] +Type=simple +User=kamailio +Group=kamailio +Environment='CFGFILE=/etc/kamailio/kamailio-%i.cfg' +Environment='SHM_MEMORY=64' +Environment='PKG_MEMORY=8' +EnvironmentFile=-/etc/sysconfig/kamailio-%i +EnvironmentFile=-/etc/sysconfig/kamailio-%i.d/* +# PIDFile requires a full absolute path +PIDFile=/run/kamailio-%i/kamailio.pid +# ExecStart requires a full absolute path +ExecStart=/usr/sbin/kamailio -DD -P /run/kamailio-%i/kamailio.pid -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY -Y /run/kamailio-%i +Restart=on-failure +# necessary for chown of control files e.g. for jsonrpcs and ctl modules +AmbientCapabilities=CAP_CHOWN +# /run/kamailio in tmpfs +RuntimeDirectory=kamailio-%i +RuntimeDirectoryMode=0770 + +[Install] +WantedBy=multi-user.target diff --git a/src/Makefile.defs b/src/Makefile.defs index 07fa021aa..4c8dc3468 100644 --- a/src/Makefile.defs +++ b/src/Makefile.defs @@ -106,8 +106,8 @@ INSTALL_FLAVOUR=$(FLAVOUR) # version number VERSION = 5 PATCHLEVEL = 8 -SUBLEVEL = 2 -EXTRAVERSION = +SUBLEVEL = 6 +EXTRAVERSION = # memory manager switcher # 0 - f_malloc (fast malloc) @@ -492,7 +492,7 @@ endif ifeq ($(OS), freebsd) doc_dir = share/doc/$(MAIN_NAME)/ - man_dir = man/ + man_dir = share/man/ data_dir = share/$(MAIN_NAME)/ LOCALBASE ?= /usr/local endif diff --git a/src/core/autover.h b/src/core/autover.h index 94abd36d6..9752050ce 100644 --- a/src/core/autover.h +++ b/src/core/autover.h @@ -2,6 +2,6 @@ * DO NOT EDIT IT */ -#define REPO_VER "3fa5f4" -#define REPO_HASH "3fa5f4" +#define REPO_VER "fb71db" +#define REPO_HASH "fb71db" #define REPO_STATE "" diff --git a/src/core/cfg.y b/src/core/cfg.y index 799c95697..21a6bcf83 100644 --- a/src/core/cfg.y +++ b/src/core/cfg.y @@ -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 { diff --git a/src/core/cfg/cfg_select.c b/src/core/cfg/cfg_select.c index f948dd4ab..b4e9e6ebe 100644 --- a/src/core/cfg/cfg_select.c +++ b/src/core/cfg/cfg_select.c @@ -147,6 +147,11 @@ int select_cfg_var(str *res, select_t *s, struct sip_msg *msg) int i; static char buf[INT2STR_MAX_LEN]; + if(res != NULL) { + res->s = 0; + res->len = 0; + } + if(msg == NULL) { /* fixup call */ @@ -207,7 +212,7 @@ int select_cfg_var(str *res, select_t *s, struct sip_msg *msg) group = (cfg_group_t *)s->params[1].v.p; var = (cfg_mapping_t *)s->params[2].v.p; - if(!group || !var) + if(!group || !var || !res) return -1; /* use the module's handle to access the variable, so the variables @@ -228,12 +233,7 @@ int select_cfg_var(str *res, select_t *s, struct sip_msg *msg) break; case CFG_VAR_STR: - if(p) { - memcpy(res, p, sizeof(str)); - } else { - res->s = 0; - res->len = 0; - } + memcpy(res, p, sizeof(str)); break; default: diff --git a/src/core/char_msg_val.h b/src/core/char_msg_val.h index b3d7e4a1b..bcdea56b8 100644 --- a/src/core/char_msg_val.h +++ b/src/core/char_msg_val.h @@ -41,8 +41,11 @@ inline static int char_msg_val(struct sip_msg *msg, char *cv) str sempty = str_init(""); if(unlikely(!check_transaction_quadruple(msg))) { - LM_ERR("can't calculate char_value due to a parsing error\n"); - memset(cv, '0', MD5_LEN); + int i; + for(i = 0; i < MD5_LEN; i++) { + cv[i] = '0'; + } + LM_ERR("cannot calculate char_value due to a parsing error\n"); return 0; } /* to body is automatically parsed (via check_transactionquadruple / diff --git a/src/core/dns_cache.c b/src/core/dns_cache.c index 1fba5a036..05da8bacd 100644 --- a/src/core/dns_cache.c +++ b/src/core/dns_cache.c @@ -1697,7 +1697,7 @@ inline static struct dns_hash_entry *dns_get_related( LM_DBG("(%p (%.*s, %d), %d, *%p) (%d)\n", e, e->name_len, e->name, e->type, type, *records, cname_chain_len); if(l->prev != NULL || l->next != NULL) { - LM_WARN("record not alone: %p - type: %d\n", l, (int)l->type); + LM_DBG("record not alone: %p - type: %d\n", l, (int)l->type); } clist_init(l, next, prev); if(type == e->type) { @@ -2044,7 +2044,7 @@ inline static struct dns_hash_entry *dns_cache_do_request(str *name, int type) #endif end: if(e != NULL && e->prev == NULL && e->next == NULL) { - LM_WARN("record not linked: %p - type: %d\n", e, (int)e->type); + LM_DBG("record not linked: %p - type: %d\n", e, (int)e->type); } return e; } @@ -3919,7 +3919,7 @@ int dns_cache_print_entry(rpc_t *rpc, void *ctx, struct dns_hash_entry *e) } s.s = ((struct naptr_rdata *)(rr->rdata))->repl; s.len = ((struct naptr_rdata *)(rr->rdata))->repl_len; - if(rpc->struct_add(sh, "S", "rr_regexp", &s) < 0) { + if(rpc->struct_add(sh, "S", "rr_replacement", &s) < 0) { rpc->fault(ctx, 500, "Internal error adding naptre rr_replacement"); return -1; diff --git a/src/core/dset.c b/src/core/dset.c index dfab77cd2..0b3affd4f 100644 --- a/src/core/dset.c +++ b/src/core/dset.c @@ -687,8 +687,8 @@ char *print_dset(struct sip_msg *msg, int *len, int options) } if(cnt == 0) { - LM_WARN("no r-uri or branches\n"); - goto error; + LM_INFO("no new r-uri or branches\n"); + goto notfound; } if(p + CRLF_LEN + 1 > end) { @@ -701,7 +701,7 @@ char *print_dset(struct sip_msg *msg, int *len, int options) memfail: LM_ERR("redirection buffer length exceed\n"); -error: +notfound: *len = 0; set_branch_iterator(crt_branch); return 0; diff --git a/src/core/forward.h b/src/core/forward.h index 7b51e1a55..c4f37ab7c 100644 --- a/src/core/forward.h +++ b/src/core/forward.h @@ -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); } diff --git a/src/core/globals.h b/src/core/globals.h index 0ec87c89a..30ebb52c2 100644 --- a/src/core/globals.h +++ b/src/core/globals.h @@ -109,6 +109,9 @@ extern int ksr_tcp_script_mode; #ifdef USE_TLS extern int tls_disable; extern unsigned short tls_port_no; +#define KSR_TLS_THREADS_MNONE 0 /* no set of set thread-local variables */ +#define KSR_TLS_THREADS_MTEMP 1 /* set thread-local variables in temp thread */ +#define KSR_TLS_THREADS_MFORK 2 /* set thread-local variables in at-fork */ extern int ksr_tls_threads_mode; #endif #ifdef USE_SCTP diff --git a/src/core/ip_addr.c b/src/core/ip_addr.c index 02c26f969..8e2ae6cf4 100644 --- a/src/core/ip_addr.c +++ b/src/core/ip_addr.c @@ -298,6 +298,52 @@ char *ip_addr2strz(struct ip_addr *ip) return buff; } +#define IP_ADDR_BUF_NR 8 +static char _ksr_addr2x_buff[IP_ADDR_BUF_NR][IP_ADDR_MAX_STR_SIZE]; +static int _ksr_addr2x_idx = 0; + +/* fast ip_addr -> string converter; + * it uses an internal buffer + */ +char *ip_addr2xa(struct ip_addr *ip) +{ + int len; + char *buff; + + buff = _ksr_addr2x_buff[_ksr_addr2x_idx]; + _ksr_addr2x_idx = (_ksr_addr2x_idx + 1) % IP_ADDR_BUF_NR; + + len = ip_addr2sbuf(ip, buff, sizeof(buff) - 1); + buff[len] = 0; + + return buff; +} + + +/* full address in text representation, including [] for ipv6 */ +char *ip_addr2xstrz(struct ip_addr *ip) +{ + char *p; + int len; + char *buff; + + buff = _ksr_addr2x_buff[_ksr_addr2x_idx]; + _ksr_addr2x_idx = (_ksr_addr2x_idx + 1) % IP_ADDR_BUF_NR; + + p = buff; + if(ip->af == AF_INET6) { + *p++ = '['; + } + len = ip_addr2sbuf(ip, p, sizeof(buff) - 3); + p += len; + if(ip->af == AF_INET6) { + *p++ = ']'; + } + *p = 0; + + return buff; +} + /* returns an asciiz string containing the ip and the port * (:port or []:port) diff --git a/src/core/ip_addr.h b/src/core/ip_addr.h index a8f9660b9..043ad92ce 100644 --- a/src/core/ip_addr.h +++ b/src/core/ip_addr.h @@ -603,14 +603,18 @@ int ip_addr2sbufz(struct ip_addr *ip, char *buff, int len); #define IP_ADDR_MAX_STR_SIZE (IP6_MAX_STR_SIZE + 1) /* ip62ascii + \0*/ #define IP_ADDR_MAX_STRZ_SIZE (IP6_MAX_STR_SIZE + 3) /* ip62ascii + [ + ] + \0*/ -/* fast ip_addr -> string converter; - * it uses an internal buffer - */ +/* ip addr to string converter; it uses an internal static buffer */ char *ip_addr2a(struct ip_addr *ip); +/* ip addr to string converter; it uses a pool of internal static buffers */ +char *ip_addr2xa(struct ip_addr *ip); -/* full address in text representation, including [] for ipv6 */ +/* full address in text representation, including [] for ipv6 + * - it uses an internal static buffer */ char *ip_addr2strz(struct ip_addr *ip); +/* full address in text representation, including [] for ipv6 + * - it uses a pool of internal static buffers */ +char *ip_addr2xstrz(struct ip_addr *ip); #define SU2A_MAX_STR_SIZE \ diff --git a/src/core/mem/f_malloc.c b/src/core/mem/f_malloc.c index 9d71cc43f..e8ca39cab 100644 --- a/src/core/mem/f_malloc.c +++ b/src/core/mem/f_malloc.c @@ -496,13 +496,17 @@ void *fm_malloc(void *qmp, size_t size) * The free hash bitmap is used to jump directly to non-empty * hash buckets. */ - do { - for(f = qm->free_hash[hash].first; f; f = f->next_free) - if(f->size >= size) - goto found; - hash++; /* try in next hash cell */ - } while((hash < F_HASH_SIZE) - && ((hash = fm_bmp_first_set(qm, hash)) >= 0)); + if(likely(hash < F_HASH_SIZE)) { + do { + for(f = qm->free_hash[hash].first; f; f = f->next_free) { + if(f->size >= size) { + goto found; + } + } + hash++; /* try in next hash cell */ + } while((hash < F_HASH_SIZE) + && ((hash = fm_bmp_first_set(qm, hash)) >= 0)); + } } #else /* F_MALLOC_HASH_BITMAP */ for(hash = GET_HASH(size); hash < F_HASH_SIZE; hash++) { diff --git a/src/core/modparam.c b/src/core/modparam.c index b48d9e824..a166cc507 100644 --- a/src/core/modparam.c +++ b/src/core/modparam.c @@ -151,7 +151,7 @@ int set_mod_param_regex(char *regex, char *name, modparam_t type, void *val) pkg_free(reg); return -1; } - strncpy(*((char **)ptr), (char *)val2, len_param); + memcpy(*((char **)ptr), (char *)val2, len_param); (*((char **)ptr))[len_param] = '\0'; break; diff --git a/src/core/msg_translator.c b/src/core/msg_translator.c index acd591186..b2623b919 100644 --- a/src/core/msg_translator.c +++ b/src/core/msg_translator.c @@ -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; @@ -1023,16 +1029,17 @@ void process_lumps(struct sip_msg *msg, struct lump *lumps, char *new_buf, offset++; \ } \ } else { \ - LM_CRIT("null bind_address\n"); \ + LM_CRIT("null bind_address (SUBST_RCV_IP/%p/%p)\n", \ + msg->rcv.bind_address, recv_address_str); \ }; \ 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; \ } else { \ - LM_CRIT("null bind_address\n"); \ + LM_CRIT("null recv port str (SUBST_RCV_PORT)\n"); \ }; \ break; \ case SUBST_RCV_ALL: \ @@ -1124,7 +1131,8 @@ void process_lumps(struct sip_msg *msg, struct lump *lumps, char *new_buf, } \ RCVCOMP_PARAM_ADD \ } else { \ - LM_CRIT("null bind_address\n"); \ + LM_CRIT("null bind_address (SUBST_RCV_ALL/%p/%p)\n", \ + msg->rcv.bind_address, recv_address_str); \ }; \ break; \ case SUBST_SND_IP: \ @@ -1141,16 +1149,16 @@ void process_lumps(struct sip_msg *msg, struct lump *lumps, char *new_buf, offset++; \ } \ } else { \ - LM_CRIT("null send_sock\n"); \ + LM_CRIT("null send_sock (SUBST_SND_IP)\n"); \ }; \ 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 (SUBST_SND_PORT)\n"); \ }; \ break; \ case SUBST_SND_ALL: \ @@ -1175,8 +1183,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, \ @@ -1241,7 +1248,7 @@ void process_lumps(struct sip_msg *msg, struct lump *lumps, char *new_buf, } \ SENDCOMP_PARAM_ADD \ } else { \ - LM_CRIT("null bind_address\n"); \ + LM_CRIT("null send_sock (SUBST_SND_ALL)\n"); \ }; \ break; \ case SUBST_RCV_PROTO: \ @@ -1280,7 +1287,7 @@ void process_lumps(struct sip_msg *msg, struct lump *lumps, char *new_buf, msg->rcv.bind_address->proto); \ } \ } else { \ - LM_CRIT("null send_sock\n"); \ + LM_CRIT("null bind address (SUBST_RCV_PROTO)\n"); \ }; \ break; \ case SUBST_SND_PROTO: \ @@ -1318,7 +1325,7 @@ void process_lumps(struct sip_msg *msg, struct lump *lumps, char *new_buf, LM_CRIT("unknown proto %d\n", send_sock->proto); \ } \ } else { \ - LM_CRIT("null send_sock\n"); \ + LM_CRIT("null send_sock (SUBST_SND_PROTO)\n"); \ }; \ break; \ default: \ @@ -1343,12 +1350,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 +1376,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; @@ -2039,7 +2053,7 @@ char *build_req_buf_from_sip_req(struct sip_msg *msg, struct lump *path_anchor; struct lump *path_lump; str branch; - unsigned int flags; + msg_flags_t flags; unsigned int udp_mtu; struct dest_info di; int ret; @@ -2384,7 +2398,7 @@ char *generate_res_buf_from_sip_res( } /* test and add xavp via reply params */ - if(msg && msg->via2 && (msg->msg_flags & FL_ADD_XAVP_VIA_REPLY_PARAMS) + if(msg->via2 && (msg->msg_flags & FL_ADD_XAVP_VIA_REPLY_PARAMS) && _ksr_xavp_via_reply_params.len > 0) { xparams.s = pv_get_buffer(); xparams.len = xavp_serialize_fields_style(&_ksr_xavp_via_reply_params, @@ -2635,45 +2649,55 @@ char *build_res_buf_from_sip_req(unsigned int code, str *text, str *new_tag, if(unlikely(httpreq)) pvia = p; if(hdr == msg->h_via1) { - if(rport_buf) { - if(msg->via1->rport) { /* delete the old one */ - /* copy until rport */ - append_str_trans(p, hdr->name.s, - msg->via1->rport->start - hdr->name.s - 1, - msg); - /* copy new rport */ - append_str(p, rport_buf, rport_len); - /* copy the rest of the via */ - append_str_trans(p, - msg->via1->rport->start - + msg->via1->rport->size, - hdr->body.s + hdr->body.len - - msg->via1->rport->start - - msg->via1->rport->size, - msg); - } else { /* just append the new one */ - /* normal whole via copy */ - append_str_trans(p, hdr->name.s, - (hdr->body.s + hdr->body.len) - hdr->name.s, - msg); - append_str(p, rport_buf, rport_len); - } - } else { - /* normal whole via copy */ + if(rport_buf && msg->via1->rport) { /* replace old rport */ + /* copy until rport */ + append_str_trans(p, hdr->name.s, + msg->via1->rport->start - hdr->name.s - 1, msg); + } else if(msg->via1->branch) { /* add after branch */ + append_str_trans(p, hdr->name.s, + msg->via1->branch->start - hdr->name.s + + msg->via1->branch->size, + msg); + } else { /* append after header */ append_str_trans(p, hdr->name.s, (hdr->body.s + hdr->body.len) - hdr->name.s, msg); } - if(received_buf) + if(rport_buf) { + /* add rport */ + append_str(p, rport_buf, rport_len); + } + if(received_buf) { + /* add received */ append_str(p, received_buf, received_len); + } + if(xparams.len > 0) { + /* add extra parameters */ + append_str(p, xparams.s, xparams.len); + } + /* copy the rest of the via */ + if(rport_buf && msg->via1->rport) { + append_str_trans(p, + msg->via1->rport->start + + msg->via1->rport->size, + hdr->body.s + hdr->body.len + - msg->via1->rport->start + - msg->via1->rport->size, + msg); + } else if(msg->via1->branch) { + append_str_trans(p, + msg->via1->branch->start + + msg->via1->branch->size, + hdr->body.s + hdr->body.len + - msg->via1->branch->start + - msg->via1->branch->size, + msg); + } } else { /* normal whole via copy */ append_str_trans(p, hdr->name.s, (hdr->body.s + hdr->body.len) - hdr->name.s, msg); } - if(xparams.len > 0) { - append_str(p, xparams.s, xparams.len); - } append_str(p, CRLF, CRLF_LEN); /* if is HTTP, replace Via with Sia * - HTTP Via format is different than SIP Via @@ -2910,12 +2934,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 +2988,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 +3073,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); diff --git a/src/core/parser/msg_parser.c b/src/core/parser/msg_parser.c index a85048730..3e094c509 100644 --- a/src/core/parser/msg_parser.c +++ b/src/core/parser/msg_parser.c @@ -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: diff --git a/src/core/parser/parse_hname2.c b/src/core/parser/parse_hname2.c index e7d0792e9..49c62d3d1 100644 --- a/src/core/parser/parse_hname2.c +++ b/src/core/parser/parse_hname2.c @@ -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; diff --git a/src/core/parser/parse_uri.c b/src/core/parser/parse_uri.c index 9ccb62ee5..1063186f6 100644 --- a/src/core/parser/parse_uri.c +++ b/src/core/parser/parse_uri.c @@ -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: @@ -1273,7 +1275,7 @@ int parse_uri(char *buf, int len, struct sip_uri *uri) uri->sip_params = uri->params; if((phone2tel) && (uri->user_param_val.len == 5) && (strncmp(uri->user_param_val.s, "phone", 5) == 0)) { - uri->type = TEL_URI_T; + uri->type = uri->type == SIPS_URI_T ? TELS_URI_T : TEL_URI_T; uri->flags |= URI_SIP_USER_PHONE; /* move params from user into uri->params */ p = q_memchr(uri->user.s, ';', uri->user.len); diff --git a/src/core/parser/sdp/sdp.c b/src/core/parser/sdp/sdp.c index 52e967a3d..5eb04b0c0 100644 --- a/src/core/parser/sdp/sdp.c +++ b/src/core/parser/sdp/sdp.c @@ -233,7 +233,13 @@ void set_sdp_payload_attr(sdp_payload_attr_t *payload_attr, str *rtp_enc, void set_sdp_payload_fmtp(sdp_payload_attr_t *payload_attr, str *fmtp_string) { if(payload_attr == NULL) { - LM_ERR("Invalid payload location\n"); + if(fmtp_string != NULL && fmtp_string->s != NULL + && fmtp_string->len > 0) { + LM_ERR("Invalid payload location - fmtp: %.*s\n", fmtp_string->len, + fmtp_string->s); + } else { + LM_ERR("Invalid payload location\n"); + } return; } payload_attr->fmtp_string.s = fmtp_string->s; @@ -354,6 +360,8 @@ sdp_payload_attr_t *get_sdp_payload4payload( } } + LM_DBG("payload not found: %.*s\n", rtp_payload->len, rtp_payload->s); + return NULL; } @@ -810,9 +818,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); */ diff --git a/src/core/parser/sdp/sdp_helpr_funcs.c b/src/core/parser/sdp/sdp_helpr_funcs.c index d5cb359b4..26a975a96 100644 --- a/src/core/parser/sdp/sdp_helpr_funcs.c +++ b/src/core/parser/sdp/sdp_helpr_funcs.c @@ -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; } @@ -306,7 +314,7 @@ int extract_candidate(str *body, sdp_stream_cell_t *stream) int len, fl; sdp_ice_attr_t *ice_attr; - if((body->len < 12) || (strncasecmp(body->s, "a=candidate:", 12) != 0)) { + if((body->len <= 12) || (strncasecmp(body->s, "a=candidate:", 12) != 0)) { /*LM_DBG("We are not pointing to an a=candidate: attribute =>`%.*s'\n", body->len, body->s); */ return -1; } @@ -324,6 +332,10 @@ int extract_candidate(str *body, sdp_stream_cell_t *stream) start = space + 1; len = len - (space - start + 1); + if(start + len > body->s + body->len) { + LM_ERR("no component in `a=candidate'\n"); + return -1; + } space = memchr(start, 32, len); if(space == NULL) { LM_ERR("no component in `a=candidate'\n"); @@ -346,13 +358,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 +383,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++; @@ -400,7 +417,7 @@ int extract_ice_option(str *body, sdp_stream_cell_t *stream) trim_len(ice_opt->option.len, ice_opt->option.s, ice_opt->option); length = 0; - if(*ptr_src == 32) + if(ptr_src < end && *ptr_src == 32) ptr_src++; /* skip space */ } @@ -447,6 +464,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))) { @@ -541,7 +561,7 @@ int extract_mediaip(str *body, str *mediaip, int *pf, char *line) * - for length, at least 6: ' IP[4|6] x...' * - white space after */ - if(cp + 6 > mediaip->s + mediaip->len && cp[4] != ' ') { + if(cp + 6 > mediaip->s + mediaip->len || cp[4] != ' ') { LM_ERR("invalid content for `%s' line\n", line); return -1; } diff --git a/src/core/pass_fd.c b/src/core/pass_fd.c index 7c2810404..702497f81 100644 --- a/src/core/pass_fd.c +++ b/src/core/pass_fd.c @@ -33,6 +33,7 @@ #include #include #include /* for NULL definition on openbsd */ +#include #include #include #ifdef NO_MSG_WAITALL @@ -287,9 +288,14 @@ again: /* blocking recv_all */ n = recv_all( unix_socket, (char *)data + ret, data_len - ret, MSG_WAITALL); - if(n >= 0) + if(n >= 0) { + if(ret >= INT_MAX - n) { + LM_ERR("int size overflowing: %d + %d\n", ret, n); + ret = -1; + goto error; + } ret += n; - else { + } else { ret = n; goto error; } diff --git a/src/core/ppcfg.c b/src/core/ppcfg.c index d77a23788..d0513350d 100644 --- a/src/core/ppcfg.c +++ b/src/core/ppcfg.c @@ -289,7 +289,8 @@ void pp_ifdef_level_error(void) */ void pp_define_core(void) { - char defval[64]; +#define PP_DEFINE_COREVAL_SIZE 64 + char defval[PP_DEFINE_COREVAL_SIZE]; char *p; int n; str_list_t *sb; @@ -301,8 +302,9 @@ void pp_define_core(void) p++; } - n = snprintf(p, 64 - (int)(p - defval), "_%u", VERSIONVAL / 1000000); - if(n < 0 || n >= 64 - (int)(p - defval)) { + n = snprintf(p, PP_DEFINE_COREVAL_SIZE - (int)(p - defval), "_%u", + VERSIONVAL / 1000000); + if(n < 0 || n >= PP_DEFINE_COREVAL_SIZE - (int)(p - defval)) { LM_ERR("failed to build define token\n"); return; } @@ -312,9 +314,9 @@ void pp_define_core(void) return; } - n = snprintf(p, 64 - (int)(p - defval), "_%u_%u", VERSIONVAL / 1000000, - (VERSIONVAL % 1000000) / 1000); - if(n < 0 || n >= 64 - (int)(p - defval)) { + n = snprintf(p, PP_DEFINE_COREVAL_SIZE - (int)(p - defval), "_%u_%u", + VERSIONVAL / 1000000, (VERSIONVAL % 1000000) / 1000); + if(n < 0 || n >= PP_DEFINE_COREVAL_SIZE - (int)(p - defval)) { LM_ERR("failed to build define token\n"); return; } @@ -324,9 +326,10 @@ void pp_define_core(void) return; } - n = snprintf(p, 64 - (int)(p - defval), "_%u_%u_%u", VERSIONVAL / 1000000, - (VERSIONVAL % 1000000) / 1000, VERSIONVAL % 1000); - if(n < 0 || n >= 64 - (int)(p - defval)) { + n = snprintf(p, PP_DEFINE_COREVAL_SIZE - (int)(p - defval), "_%u_%u_%u", + VERSIONVAL / 1000000, (VERSIONVAL % 1000000) / 1000, + VERSIONVAL % 1000); + if(n < 0 || n >= PP_DEFINE_COREVAL_SIZE - (int)(p - defval)) { LM_ERR("failed to build define token\n"); return; } @@ -343,8 +346,8 @@ void pp_define_core(void) return; } - n = snprintf(defval, 64, "%u", VERSIONVAL); - if(n < 0 || n >= 64) { + n = snprintf(defval, PP_DEFINE_COREVAL_SIZE, "%u", VERSIONVAL); + if(n < 0 || n >= PP_DEFINE_COREVAL_SIZE) { LM_ERR("failed to build version define value\n"); return; } diff --git a/src/core/rand/isaac/rand.c b/src/core/rand/isaac/rand.c index eb917fdd3..52d44d5eb 100644 --- a/src/core/rand/isaac/rand.c +++ b/src/core/rand/isaac/rand.c @@ -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; diff --git a/src/core/resolve.c b/src/core/resolve.c index da247952f..19b05db90 100644 --- a/src/core/resolve.c +++ b/src/core/resolve.c @@ -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 */ diff --git a/src/core/rthreads.h b/src/core/rthreads.h index 56d68cef2..80911a826 100644 --- a/src/core/rthreads.h +++ b/src/core/rthreads.h @@ -40,8 +40,10 @@ static void *run_threadP(_thread_proto fn, void *arg) pthread_t tid; void *ret = NULL; - if(likely(ksr_tls_threads_mode == 0 || ksr_tls_threads_mode == 2 - || (ksr_tls_threads_mode == 1 && process_no > 0))) { + if(likely(ksr_tls_threads_mode == KSR_TLS_THREADS_MNONE + || ksr_tls_threads_mode == KSR_TLS_THREADS_MFORK + || (ksr_tls_threads_mode == KSR_TLS_THREADS_MTEMP + && process_no > 0))) { return fn(arg); } @@ -77,8 +79,10 @@ static void *run_threadPI(_thread_protoPI fn, void *arg1, int arg2) pthread_t tid; void *ret = NULL; - if(likely(ksr_tls_threads_mode == 0 || ksr_tls_threads_mode == 2 - || (ksr_tls_threads_mode == 1 && process_no > 0))) { + if(likely(ksr_tls_threads_mode == KSR_TLS_THREADS_MNONE + || ksr_tls_threads_mode == KSR_TLS_THREADS_MFORK + || (ksr_tls_threads_mode == KSR_TLS_THREADS_MTEMP + && process_no > 0))) { return fn(arg1, arg2); } @@ -113,8 +117,10 @@ static void run_threadV(_thread_protoV fn) #ifdef USE_TLS pthread_t tid; - if(likely(ksr_tls_threads_mode == 0 || ksr_tls_threads_mode == 2 - || (ksr_tls_threads_mode == 1 && process_no > 0))) { + if(likely(ksr_tls_threads_mode == KSR_TLS_THREADS_MNONE + || ksr_tls_threads_mode == KSR_TLS_THREADS_MFORK + || (ksr_tls_threads_mode == KSR_TLS_THREADS_MTEMP + && process_no > 0))) { fn(); return; } @@ -152,8 +158,10 @@ static int run_thread4PP(_thread_proto4PP fn, void *arg1, void *arg2) pthread_t tid; int ret = 0; - if(likely(ksr_tls_threads_mode == 0 || ksr_tls_threads_mode == 2 - || (ksr_tls_threads_mode == 1 && process_no > 0))) { + if(likely(ksr_tls_threads_mode == KSR_TLS_THREADS_MNONE + || ksr_tls_threads_mode == KSR_TLS_THREADS_MFORK + || (ksr_tls_threads_mode == KSR_TLS_THREADS_MTEMP + && process_no > 0))) { return fn(arg1, arg2); } pthread_create(&tid, NULL, (_thread_proto)run_thread_wrap4PP, @@ -188,8 +196,10 @@ static void run_thread0P(_thread_proto0P fn, void *arg1) #ifdef USE_TLS pthread_t tid; - if(likely(ksr_tls_threads_mode == 0 || ksr_tls_threads_mode == 2 - || (ksr_tls_threads_mode == 1 && process_no > 0))) { + if(likely(ksr_tls_threads_mode == KSR_TLS_THREADS_MNONE + || ksr_tls_threads_mode == KSR_TLS_THREADS_MFORK + || (ksr_tls_threads_mode == KSR_TLS_THREADS_MTEMP + && process_no > 0))) { fn(arg1); return; } @@ -240,8 +250,10 @@ static int run_thread4P5I2P2(_thread_proto4P5I2P2 fn, void *arg1, void *arg2, pthread_t tid; int ret = 0; - if(likely(ksr_tls_threads_mode == 0 || ksr_tls_threads_mode == 2 - || (ksr_tls_threads_mode == 1 && process_no > 0))) { + if(likely(ksr_tls_threads_mode == KSR_TLS_THREADS_MNONE + || ksr_tls_threads_mode == KSR_TLS_THREADS_MFORK + || (ksr_tls_threads_mode == KSR_TLS_THREADS_MTEMP + && process_no > 0))) { return fn(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); } pthread_create(&tid, NULL, (_thread_proto)run_thread_wrap4P5I2P2, @@ -278,8 +290,10 @@ static int run_thread4L(_thread_proto4L fn, long arg1) pthread_t tid; int ret = 0; - if(likely(ksr_tls_threads_mode == 0 || ksr_tls_threads_mode == 2 - || (ksr_tls_threads_mode == 1 && process_no > 0))) { + if(likely(ksr_tls_threads_mode == KSR_TLS_THREADS_MNONE + || ksr_tls_threads_mode == KSR_TLS_THREADS_MFORK + || (ksr_tls_threads_mode == KSR_TLS_THREADS_MTEMP + && process_no > 0))) { return fn(arg1); } pthread_create(&tid, NULL, (_thread_proto)run_thread_wrap4L, diff --git a/src/core/rvalue.c b/src/core/rvalue.c index 9cc1812c2..4c0137060 100644 --- a/src/core/rvalue.c +++ b/src/core/rvalue.c @@ -1085,8 +1085,6 @@ error_cache: LM_BUG("invalid cached value:cache type %d, value type %d\n", cache ? cache->cache_type : 0, cache ? cache->val_type : 0); error: - if(destroy_pval) - pv_value_destroy(&pval); *i = 0; return -1; } diff --git a/src/core/select.c b/src/core/select.c index 01312d5e4..10526ff5c 100644 --- a/src/core/select.c +++ b/src/core/select.c @@ -335,7 +335,6 @@ int resolve_select(select_t *s) default: BUG("Unable to resolve select at level %d\n", param_idx); break; - break; } goto not_found; diff --git a/src/core/socket_info.c b/src/core/socket_info.c index ab59df73d..a1695d185 100644 --- a/src/core/socket_info.c +++ b/src/core/socket_info.c @@ -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); @@ -1329,6 +1332,7 @@ static int nl_bound_sock(void) { int sock = -1; struct sockaddr_nl la; + struct timeval recvtimeout; sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); if(sock < 0) { @@ -1340,13 +1344,22 @@ static int nl_bound_sock(void) bzero(&la, sizeof(la)); la.nl_family = AF_NETLINK; la.nl_pad = 0; - la.nl_pid = getpid(); + la.nl_pid = 0; la.nl_groups = 0; if(bind(sock, (struct sockaddr *)&la, sizeof(la)) < 0) { LM_ERR("could not bind NETLINK sock to sockaddr_nl\n"); goto error; } + recvtimeout.tv_sec = 4; + recvtimeout.tv_usec = 0; + if(setsockopt( + sock, SOL_SOCKET, SO_RCVTIMEO, &recvtimeout, sizeof(recvtimeout)) + < 0) { + LM_ERR("failed to set receive timeout\n"); + goto error; + } + return sock; error: if(sock >= 0) @@ -1380,7 +1393,7 @@ static int get_flags(int family) struct ifinfomsg *ifi; char buf[NETLINK_BUFFER_SIZE]; char *p = buf; - int nll = 0; + unsigned int nll = 0; int nl_sock = -1; fill_nl_req(req, RTM_GETLINK, family); @@ -1394,18 +1407,22 @@ static int get_flags(int family) } while(1) { - if((sizeof(buf) - nll) == 0) { - LM_ERR("netlink buffer overflow in get_flags"); + rtn = recv(nl_sock, p, sizeof(buf) - nll, 0); + if(rtn <= 0) { + LM_ERR("failed to receive data (%d/%d)\n", rtn, errno); + goto error; + } + if(nll >= sizeof(buf) - rtn) { + LM_ERR("netlink buffer overflow [%u/%d]\n", nll, rtn); goto error; } - rtn = recv(nl_sock, p, sizeof(buf) - nll, 0); nlp = (struct nlmsghdr *)p; if(nlp->nlmsg_type == NLMSG_DONE) { LM_DBG("done\n"); break; } if(nlp->nlmsg_type == NLMSG_ERROR) { - LM_DBG("Error on message to netlink"); + LM_DBG("error on message to netlink"); break; } p += rtn; @@ -1420,7 +1437,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 +1484,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( @@ -1499,6 +1518,10 @@ static int build_iface_list(void) goto error; } rtn = recv(nl_sock, p, sizeof(buf) - nll, 0); + if(rtn <= 0) { + LM_ERR("failed to receive data (%d/%d)\n", rtn, errno); + goto error; + } LM_DBG("received %d byles \n", rtn); nlp = (struct nlmsghdr *)p; if(nlp->nlmsg_type == NLMSG_DONE) { @@ -1528,16 +1551,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 +1568,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 addr is %s\n", + LM_DBG("iface 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 addr is %s\n", entry->addr); + LM_DBG("iface address is '%s'\n", + entry->addr); break; case IFA_LABEL: LM_DBG("iface name is %s\n", (char *)RTA_DATA(rtap)); @@ -1581,30 +1601,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++; + } + + 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'; } - ifaces[index].index = index; + ifaces[ifidx].index = index; - if(ifaces[index].addresses == 0) - ifaces[index].addresses = entry; + 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 +1697,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 */ @@ -1707,6 +1760,16 @@ int add_interfaces(char *if_name, int family, unsigned short port, continue; sockaddr2ip_addr(&addr, (struct sockaddr *)ifa->ifa_addr); tmp = ip_addr2a(&addr); + 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; + } + } if(ifa->ifa_flags & IFF_LOOPBACK) flags = SI_IS_LO; else @@ -1741,7 +1804,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 */ diff --git a/src/core/socket_info.h b/src/core/socket_info.h index df6fbb836..8e934de3c 100644 --- a/src/core/socket_info.h +++ b/src/core/socket_info.h @@ -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); diff --git a/src/core/sr_module.c b/src/core/sr_module.c index d67e7e44a..f6832b8c7 100644 --- a/src/core/sr_module.c +++ b/src/core/sr_module.c @@ -408,12 +408,14 @@ int ksr_locate_module(char *mod_path, char **new_path) int mdir_len; int path_type; int len; + int mod_path_len; *new_path = NULL; + mod_path_len = strlen(mod_path); path = mod_path; path_type = 0; modfile.s = path; - modfile.len = strlen(mod_path); + modfile.len = mod_path_len; modname.s = modfile.s; if(modfile.len > 3 && strcmp(modfile.s + modfile.len - 3, ".so") == 0) { path_type = 1; @@ -500,7 +502,7 @@ int ksr_locate_module(char *mod_path, char **new_path) if(path == 0) { /* try path /mod_path - K compat */ path = (char *)pkg_malloc( - mdir_len + 1 /* "/" */ + strlen(mod_path) + 1); + mdir_len + 1 /* "/" */ + mod_path_len + 1); if(path == 0) { PKG_MEM_ERROR; goto error; @@ -511,8 +513,8 @@ int ksr_locate_module(char *mod_path, char **new_path) path[len] = '/'; len++; } - path[len] = 0; - strncat(path, mod_path, strlen(mod_path)); + memcpy(path + len, mod_path, mod_path_len); + path[len + mod_path_len] = 0; if(stat(path, &stat_buf) == -1) { LM_DBG("module file not found <%s>\n", path); @@ -535,9 +537,6 @@ int ksr_locate_module(char *mod_path, char **new_path) return 0; error: - if(path != NULL && path != mod_path) { - pkg_free(path); - } return -1; } diff --git a/src/core/tcp_main.c b/src/core/tcp_main.c index 2456459cf..f91962ab3 100644 --- a/src/core/tcp_main.c +++ b/src/core/tcp_main.c @@ -1288,7 +1288,7 @@ inline static int find_listening_sock_info( if(setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (void *)&optval, sizeof(optval)) == -1) { - LM_ERR("setsockopt SO_REUSEADDR %s\n", strerror(errno)); + LM_NOTICE("setsockopt SO_REUSEADDR [%s]\n", strerror(errno)); /* continue, not critical */ } #endif @@ -1297,19 +1297,19 @@ inline static int find_listening_sock_info( if(setsockopt(s, SOL_SOCKET, SO_REUSEPORT, (void *)&optval, sizeof(optval)) == -1) { - LM_ERR("setsockopt SO_REUSEPORT %s\n", strerror(errno)); + LM_NOTICE("setsockopt SO_REUSEPORT [%s]\n", strerror(errno)); /* continue, not critical */ } #endif if(unlikely(bind(s, &si->su.s, sockaddru_len(si->su)) != 0)) { - LM_WARN("binding to source address %s failed: %s [%d]\n", + LM_DBG("binding to source address %s failed: [%s] [%d]\n", su2a(&si->su, sizeof(si->su)), strerror(errno), errno); return -1; } } } else { if(unlikely(bind(s, &(*from)->s, sockaddru_len(**from)) != 0)) { - LM_WARN("binding to source address %s failed: %s [%d]\n", + LM_DBG("binding to source address %s failed: [%s] [%d]\n", su2a(&si->su, sizeof(si->su)), strerror(errno), errno); return -1; } @@ -1330,6 +1330,7 @@ inline static int tcp_do_connect(union sockaddr_union *server, union sockaddr_union my_name; socklen_t my_name_len; struct ip_addr ip; + unsigned short port; #ifdef TCP_ASYNC int n; #endif /* TCP_ASYNC */ @@ -1435,14 +1436,19 @@ inline static int tcp_do_connect(union sockaddr_union *server, from = &my_name; /* update from with the real "from" address */ su2ip_addr(&ip, &my_name); find_socket: +#ifdef SO_REUSEPORT + port = cfg_get(tcp, tcp_cfg, reuse_port) ? su_getport(from) : 0; +#else + port = 0; +#endif #ifdef USE_TLS if(unlikely(type == PROTO_TLS)) { - *res_si = find_si(&ip, 0, PROTO_TLS); + *res_si = find_si(&ip, port, PROTO_TLS); } else { - *res_si = find_si(&ip, 0, PROTO_TCP); + *res_si = find_si(&ip, port, PROTO_TCP); } #else - *res_si = find_si(&ip, 0, PROTO_TCP); + *res_si = find_si(&ip, port, PROTO_TCP); #endif if(unlikely(*res_si == 0)) { @@ -3145,6 +3151,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 +3225,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 +3290,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) { diff --git a/src/core/tcp_read.c b/src/core/tcp_read.c index 8fa6566c1..77ba6e97c 100644 --- a/src/core/tcp_read.c +++ b/src/core/tcp_read.c @@ -265,10 +265,10 @@ again: } } LOG(cfg_get(core, core_cfg, corelog), - "error reading: %s (%d) ([%s]:%u ->", strerror(errno), - errno, ip_addr2a(&c->rcv.src_ip), c->rcv.src_port); - LOG(cfg_get(core, core_cfg, corelog), "-> [%s]:%u)\n", - ip_addr2a(&c->rcv.dst_ip), c->rcv.dst_port); + "error reading: %s (%d) ([%s]:%u -> [%s]:%u)\n", + strerror(errno), errno, ip_addr2xa(&c->rcv.src_ip), + c->rcv.src_port, ip_addr2xa(&c->rcv.dst_ip), + c->rcv.dst_port); if(errno == ETIMEDOUT) { c->event = TCP_CLOSED_TIMEOUT; } else if(errno == ECONNRESET) { @@ -280,8 +280,8 @@ again: LM_DBG("EOF on connection %p (state: %u, flags: %x) - FD %d," " bytes %d, rd-flags %x ([%s]:%u -> [%s]:%u)", c, c->state, c->flags, fd, bytes_read, *flags, - ip_addr2a(&c->rcv.src_ip), c->rcv.src_port, - ip_addr2a(&c->rcv.dst_ip), c->rcv.dst_port); + ip_addr2xa(&c->rcv.src_ip), c->rcv.src_port, + ip_addr2xa(&c->rcv.dst_ip), c->rcv.dst_port); c->state = S_CONN_EOF; *flags |= RD_CONN_EOF; c->event = TCP_CLOSED_EOF; @@ -449,9 +449,9 @@ int tcp_read_headers(struct tcp_connection *c, rd_conn_flags_t *read_flags) if(bytes <= 0) return bytes; gettimeofday(&tvnow, NULL); - tvdiff = 1000000 * (tvnow.tv_sec - r->tvrstart.tv_sec) + tvdiff = 1000000LL * (tvnow.tv_sec - r->tvrstart.tv_sec) + (tvnow.tv_usec - r->tvrstart.tv_usec); - if(tvdiff >= ksr_tcp_msg_read_timeout * 1000000) { + if(tvdiff >= 1000000LL * ksr_tcp_msg_read_timeout) { LM_ERR("message reading timeout after %lld usec\n", tvdiff); r->parsed = r->buf; r->content_len = 0; @@ -1522,8 +1522,7 @@ again: if(unlikely(bytes < 0)) { LOG(cfg_get(core, core_cfg, corelog), - "ERROR: tcp_read_req: error reading - c: %p r: %p (%d)\n", - con, req, bytes); + "error reading - c: %p r: %p (%d)\n", con, req, bytes); resp = CONN_ERROR; goto end_req; } diff --git a/src/core/udp_server.c b/src/core/udp_server.c index 7e01dd8c2..26b051c36 100644 --- a/src/core/udp_server.c +++ b/src/core/udp_server.c @@ -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); } diff --git a/src/core/ut.h b/src/core/ut.h index 1efd7abd2..93aba97dc 100644 --- a/src/core/ut.h +++ b/src/core/ut.h @@ -546,7 +546,8 @@ inline static int pathmax(void) #endif if(pathmax == 0) { /* init */ pathmax = pathconf("/", _PC_PATH_MAX); - pathmax = (pathmax <= 0) ? PATH_MAX_GUESS : pathmax + 1; + pathmax = (pathmax <= 0 || pathmax >= INT_MAX - 1) ? PATH_MAX_GUESS + : pathmax + 1; } return pathmax; } diff --git a/src/lib/ims/Makefile b/src/lib/ims/Makefile index 482404ca3..5a3dab423 100644 --- a/src/lib/ims/Makefile +++ b/src/lib/ims/Makefile @@ -8,30 +8,8 @@ NAME:=kamailio_ims MAJOR_VER=0 MINOR_VER=1 BUGFIX_VER=0 -DEFS+=-DSER +LIBS= -ifeq ($(CROSS_COMPILE),) -XML2CFG=$(shell which xml2-config) -ifeq ($(XML2CFG),) -XML2CFG=$(shell \ - if pkg-config --exists libxml-2.0; then \ - echo 'pkg-config libxml-2.0'; \ - fi) -endif -endif - -ifneq ($(XML2CFG),) - libxml2_includes = $(shell $(XML2CFG) --cflags) - libxml2_libs = $(shell $(XML2CFG) --libs) -else - libxml2_includes = -I$(LOCALBASE)/include/libxml2 -I$(LOCALBASE)/include - libxml2_libs = -L$(LOCALBASE)/lib -lxml2 -endif - -INCLUDES= -I$(CURDIR)/.. -I$(CURDIR)/../.. $(libxml2_includes) -LIBS=$(libxml2_libs) -#SERLIBPATH=.. -#SER_LIBS=$(SERLIBPATH)/cds/ser_cds +INCLUDES= -I$(CURDIR)/.. -I$(CURDIR)/../.. include ../../Makefile.libs - diff --git a/src/lib/srdb1/db.c b/src/lib/srdb1/db.c index b13d87c69..77dea84df 100644 --- a/src/lib/srdb1/db.c +++ b/src/lib/srdb1/db.c @@ -270,7 +270,7 @@ error: * Initialize database module * \note No function should be called before this */ -db1_con_t *db_do_init(const str *url, void *(*new_connection)()) +db1_con_t *db_do_init(const str *url, void *(*new_connection)(struct db_id *)) { return db_do_init2(url, *new_connection, DB_POOLING_PERMITTED); } @@ -280,8 +280,8 @@ db1_con_t *db_do_init(const str *url, void *(*new_connection)()) * Initialize database module * \note No function should be called before this */ -db1_con_t *db_do_init2( - const str *url, void *(*new_connection)(), db_pooling_t pooling) +db1_con_t *db_do_init2(const str *url, void *(*new_connection)(struct db_id *), + db_pooling_t pooling) { struct db_id *id; void *con; @@ -347,7 +347,7 @@ err: * Shut down database module * \note No function should be called after this */ -void db_do_close(db1_con_t *_h, void (*free_connection)()) +void db_do_close(db1_con_t *_h, void (*free_connection)(struct pool_con *)) { struct pool_con *con; diff --git a/src/lib/srdb1/db.h b/src/lib/srdb1/db.h index 248647ecd..a9538f6b9 100644 --- a/src/lib/srdb1/db.h +++ b/src/lib/srdb1/db.h @@ -48,6 +48,8 @@ #include "db_cap.h" #include "db_con.h" #include "db_row.h" +#include "db_id.h" +#include "db_pool.h" #include "db_pooling.h" #include "db_locking.h" @@ -464,7 +466,7 @@ int db_bind_mod(const str *mod, db_func_t *dbf); * \return returns a pointer to the db1_con_t representing the connection if it was successful, otherwise 0 is returned. */ -db1_con_t *db_do_init(const str *url, void *(*new_connection)()); +db1_con_t *db_do_init(const str *url, void *(*new_connection)(struct db_id *)); /** @@ -478,8 +480,8 @@ db1_con_t *db_do_init(const str *url, void *(*new_connection)()); * \return returns a pointer to the db1_con_t representing the connection if it was successful, otherwise 0 is returned. */ -db1_con_t *db_do_init2( - const str *url, void *(*new_connection)(), db_pooling_t pooling); +db1_con_t *db_do_init2(const str *url, void *(*new_connection)(struct db_id *), + db_pooling_t pooling); /** @@ -490,7 +492,7 @@ db1_con_t *db_do_init2( * \param _h database connection handle * \param (*free_connection) Pointer to the db specific free_connection method */ -void db_do_close(db1_con_t *_h, void (*free_connection)()); +void db_do_close(db1_con_t *_h, void (*free_connection)(struct pool_con *)); /** diff --git a/src/lib/srdb1/db_id.c b/src/lib/srdb1/db_id.c index 93b36253b..2546a5f56 100644 --- a/src/lib/srdb1/db_id.c +++ b/src/lib/srdb1/db_id.c @@ -237,14 +237,33 @@ static int parse_db_url(struct db_id *id, const str *url) break; case '/': - id->host = prev_token; - prev_token = 0; - id->port = str2s(begin, url->s + i - begin, 0); - if(dupl_string_name( - &id->database, url->s + i + 1, url->s + len) - < 0) - goto err; - return 0; + /* go to last '@' when '/' is part of a password */ + a = 0; + for(j = i + 1; j < len; j++) { + if(url->s[j] == '@') { + a = j; + } + } + if(a != 0) { + st = ST_HOST; + id->username = prev_token; + prev_token = 0; + i = a; + if(dupl_string(&id->password, begin, url->s + i) + < 0) + goto err; + begin = url->s + i + 1; + break; + } else { + id->host = prev_token; + prev_token = 0; + id->port = str2s(begin, url->s + i - begin, 0); + if(dupl_string_name(&id->database, url->s + i + 1, + url->s + len) + < 0) + goto err; + return 0; + } } break; diff --git a/src/lib/srdb1/schema/kamailio-ims_icscf.xml b/src/lib/srdb1/schema/kamailio-ims_icscf.xml new file mode 100644 index 000000000..f2f61646a --- /dev/null +++ b/src/lib/srdb1/schema/kamailio-ims_icscf.xml @@ -0,0 +1,14 @@ + + + %entities; +]> + + + IMS ICSCF Module + + + + diff --git a/src/lib/srdb1/schema/nds_trusted_domains.xml b/src/lib/srdb1/schema/nds_trusted_domains.xml new file mode 100644 index 000000000..32b1938fe --- /dev/null +++ b/src/lib/srdb1/schema/nds_trusted_domains.xml @@ -0,0 +1,41 @@ + + + %entities; + +]> + + + nds_trusted_domains + 1 + &MYSQL_TABLE_TYPE; + + Table for trusted domains in IMS. More information at: + + + &KAMAILIO_MOD_DOC;ims_icscf.html. + + + + + + + id + int + &table_id_len; + + + int,auto + Unique ID for the trusted domain + + + + trusted_domain + string + 83 + + Trusted domain name + +
diff --git a/src/lib/srdb1/schema/s_cscf.xml b/src/lib/srdb1/schema/s_cscf.xml new file mode 100644 index 000000000..774f32f2b --- /dev/null +++ b/src/lib/srdb1/schema/s_cscf.xml @@ -0,0 +1,49 @@ + + + %entities; + +]> + + + s_cscf + 1 + &MYSQL_TABLE_TYPE; + + Table for Session Control Function (SCF) in IMS. More information at: + + + &KAMAILIO_MOD_DOC;ims_icscf.html. + + + + + + + id + int + &table_id_len; + + + int,auto + Unique ID for the SCF + + + + name + string + 83 + + Name of the SCF + + + + s_cscf_uri + string + 83 + + URI of the SCF + +
diff --git a/src/lib/srdb1/schema/s_cscf_capabilities.xml b/src/lib/srdb1/schema/s_cscf_capabilities.xml new file mode 100644 index 000000000..aed1f9b2e --- /dev/null +++ b/src/lib/srdb1/schema/s_cscf_capabilities.xml @@ -0,0 +1,58 @@ + + + %entities; + +]> + + + s_cscf_capabilities + 1 + &MYSQL_TABLE_TYPE; + + Table for SCF capabilities in IMS. More information at: + + + &KAMAILIO_MOD_DOC;ims_icscf.html. + + + + + + + id + int + &table_id_len; + + + int,auto + Unique ID for the capability + + + + id_s_cscf + int + 11 + 0 + ID of the associated SCF + + + + capability + int + 11 + 0 + Capability value + + + + idx_capability + + + + idx_id_s_cscf + + +
diff --git a/src/main.c b/src/main.c index c7e98e1b4..fb55c5c2a 100644 --- a/src/main.c +++ b/src/main.c @@ -338,9 +338,10 @@ int tcp_disable = 0; /* 1 if tcp is disabled */ int tls_disable = 0; /* tls enabled by default */ #else int tls_disable = 1; /* tls disabled by default */ -#endif /* CORE_TLS */ -int ksr_tls_threads_mode = 0; /* threads execution mode for tls with libssl */ -#endif /* USE_TLS */ +#endif /* CORE_TLS */ +/* threads execution mode for tls with libssl */ +int ksr_tls_threads_mode = KSR_TLS_THREADS_MNONE; +#endif /* USE_TLS */ #ifdef USE_SCTP int sctp_children_no = 0; int sctp_disable = 2; /* 1 if sctp is disabled, 2 if auto mode, 0 enabled */ diff --git a/src/modules/app_jsdt/duk_config.h b/src/modules/app_jsdt/duk_config.h index 690f70199..331d77868 100644 --- a/src/modules/app_jsdt/duk_config.h +++ b/src/modules/app_jsdt/duk_config.h @@ -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" diff --git a/src/modules/app_python3/apy_kemi.c b/src/modules/app_python3/apy_kemi.c index 718d8eced..190f453c2 100644 --- a/src/modules/app_python3/apy_kemi.c +++ b/src/modules/app_python3/apy_kemi.c @@ -281,7 +281,7 @@ PyObject *sr_apy_kemi_exec_func_ex( if(pobj == NULL) { LM_ERR("null parameter - func: %.*s idx: %d argc: %d\n", fname.len, fname.s, i, (int)alen); - return sr_kemi_apy_return_false(); + return NULL; } if(ket->ptypes[i] == SR_KEMIP_STR) { if(!PyUnicode_Check(pobj)) { @@ -293,7 +293,7 @@ PyObject *sr_apy_kemi_exec_func_ex( if(vps[i].v.s.s == NULL) { LM_ERR("null-string parameter - func: %.*s idx: %d argc: %d\n", fname.len, fname.s, i, (int)alen); - return sr_kemi_apy_return_false(); + return NULL; } vps[i].v.s.len = (int)slen; vps[i].vtype = SR_KEMIP_STR; @@ -379,8 +379,8 @@ PyObject *sr_apy_kemi_exec_func(PyObject *self, PyObject *args, int idx) " took too long [%u ms] (file:%s func:%s line:%d)\n", (ket->mname.len > 0) ? ket->mname.s : "", (ket->mname.len > 0) ? "." : "", ket->fname.s, tdiff, - (pcode) ? PyBytes_AsString(pcode->co_filename) : "", - (pcode) ? PyBytes_AsString(pcode->co_name) : "", + (pcode) ? PyUnicode_AsUTF8(pcode->co_filename) : "", + (pcode) ? PyUnicode_AsUTF8(pcode->co_name) : "", (pframe) ? PyFrame_GetLineNumber(pframe) : 0); #else LOG(cfg_get(core, core_cfg, latency_log), diff --git a/src/modules/app_python3s/apy3s_kemi.c b/src/modules/app_python3s/apy3s_kemi.c index 38c67b9e1..c2102c012 100644 --- a/src/modules/app_python3s/apy3s_kemi.c +++ b/src/modules/app_python3s/apy3s_kemi.c @@ -401,7 +401,7 @@ PyObject *sr_apy_kemi_exec_func_ex( if(pobj == NULL) { LM_ERR("null parameter - func: %.*s idx: %d argc: %d\n", fname.len, fname.s, i, (int)alen); - return sr_kemi_apy_return_false(); + return NULL; } if(ket->ptypes[i] == SR_KEMIP_STR) { if(!PyUnicode_Check(pobj)) { @@ -413,7 +413,7 @@ PyObject *sr_apy_kemi_exec_func_ex( if(vps[i].v.s.s == NULL) { LM_ERR("null-string parameter - func: %.*s idx: %d argc: %d\n", fname.len, fname.s, i, (int)alen); - return sr_kemi_apy_return_false(); + return NULL; } vps[i].v.s.len = (int)slen; vps[i].vtype = SR_KEMIP_STR; diff --git a/src/modules/async/README b/src/modules/async/README index 2fcf1f10c..a703c1224 100644 --- a/src/modules/async/README +++ b/src/modules/async/README @@ -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 diff --git a/src/modules/async/async_mod.c b/src/modules/async/async_mod.c index e7b2192d8..7980ccea8 100644 --- a/src/modules/async/async_mod.c +++ b/src/modules/async/async_mod.c @@ -123,7 +123,7 @@ static int mod_init(void) { /* init faked sip msg */ if(faked_msg_init() < 0) { - LM_ERR("failed to iit local sip msg\n"); + LM_ERR("failed to init local sip msg\n"); return -1; } diff --git a/src/modules/async/doc/async_admin.xml b/src/modules/async/doc/async_admin.xml index 027cea11e..152c6be5d 100644 --- a/src/modules/async/doc/async_admin.xml +++ b/src/modules/async/doc/async_admin.xml @@ -234,8 +234,11 @@ route[RESUME] { 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 @@ -243,6 +246,9 @@ route[RESUME] { 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. @@ -262,15 +268,13 @@ exit; 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 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. This function can be used from REQUEST_ROUTE. diff --git a/src/modules/auth/auth_mod.c b/src/modules/auth/auth_mod.c index 534ad9e20..8f1aa7bbe 100644 --- a/src/modules/auth/auth_mod.c +++ b/src/modules/auth/auth_mod.c @@ -622,6 +622,16 @@ end: return ret; } +/** + * + */ +static int ki_pv_proxy_authenticate( + sip_msg_t *msg, str *realm, str *passwd, int flags) +{ + return pv_authenticate(msg, realm, passwd, flags, HDR_PROXYAUTH_T, + &msg->first_line.u.request.method); +} + /** * */ @@ -663,6 +673,26 @@ error: return AUTH_ERROR; } +/** + * + */ +static int ki_pv_www_authenticate( + sip_msg_t *msg, str *realm, str *passwd, int flags) +{ + return pv_authenticate(msg, realm, passwd, flags, HDR_AUTHORIZATION_T, + &msg->first_line.u.request.method); +} + +/** + * + */ +static int ki_pv_www_authenticate_method( + sip_msg_t *msg, str *realm, str *passwd, int flags, str *method) +{ + return pv_authenticate( + msg, realm, passwd, flags, HDR_AUTHORIZATION_T, method); +} + /** * */ @@ -1339,6 +1369,21 @@ static sr_kemi_t sr_kemi_auth_exports[] = { { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_INT, SR_KEMIP_INT, SR_KEMIP_NONE, SR_KEMIP_NONE } }, + { str_init("auth"), str_init("pv_proxy_authenticate"), + SR_KEMIP_INT, ki_pv_proxy_authenticate, + { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_INT, + SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } + }, + { str_init("auth"), str_init("pv_www_authenticate"), + SR_KEMIP_INT, ki_pv_www_authenticate, + { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_INT, + SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } + }, + { str_init("auth"), str_init("pv_www_authenticate_method"), + SR_KEMIP_INT, ki_pv_www_authenticate_method, + { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_INT, + SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE } + }, { str_init("auth"), str_init("has_credentials"), SR_KEMIP_INT, ki_has_credentials, { SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE, diff --git a/src/modules/auth_xkeys/auth_xkeys.c b/src/modules/auth_xkeys/auth_xkeys.c index 9f63ed7b9..a89faa4ce 100644 --- a/src/modules/auth_xkeys/auth_xkeys.c +++ b/src/modules/auth_xkeys/auth_xkeys.c @@ -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'; diff --git a/src/modules/call_control/call_control.c b/src/modules/call_control/call_control.c index ca0be44fe..3fff459b6 100644 --- a/src/modules/call_control/call_control.c +++ b/src/modules/call_control/call_control.c @@ -289,6 +289,9 @@ int cc_parse_param(void *val, AVP_List **avps) if(!(mp->next)) { PKG_MEM_ERROR; pkg_free(p0); + if(mp->pv) { + pkg_free(mp->pv); + } pkg_free(mp); return -1; } diff --git a/src/modules/cdp/authstatemachine.c b/src/modules/cdp/authstatemachine.c index a5aadb1c2..3d3024eeb 100644 --- a/src/modules/cdp/authstatemachine.c +++ b/src/modules/cdp/authstatemachine.c @@ -114,7 +114,7 @@ void update_auth_session_timers(cdp_auth_session_t *x, AAAMessage *msg) } else { if(!avp) { LM_DBG("using timers from our request as there is nothing in the " - "response (lifetime) - last requested lifetime was [%d]\n", + "response (lifetime) - last requested lifetime was [%ld]\n", x->last_requested_lifetime); if(x->last_requested_lifetime > 0) { update_lifetime = 1; diff --git a/src/modules/cdp/common.c b/src/modules/cdp/common.c index 4c17cc511..205759b50 100644 --- a/src/modules/cdp/common.c +++ b/src/modules/cdp/common.c @@ -20,7 +20,7 @@ int get_accounting_record_type(AAAMessage *msg) int get_result_code(AAAMessage *msg) { - AAA_AVP *avp; + AAA_AVP *avp, *avp2; AAA_AVP_LIST list; list.head = 0; list.tail = 0; @@ -36,9 +36,9 @@ int get_result_code(AAAMessage *msg) goto finish; } else if(avp->code == AVP_Experimental_Result) { list = AAAUngroupAVPS(avp->data); - for(avp = list.head; avp; avp = avp->next) { - if(avp->code == AVP_IMS_Experimental_Result_Code) { - rc = get_4bytes(avp->data.s); + for(avp2 = list.head; avp2; avp2 = avp2->next) { + if(avp2->code == AVP_IMS_Experimental_Result_Code) { + rc = get_4bytes(avp2->data.s); AAAFreeAVPList(&list); goto finish; } diff --git a/src/modules/cdp/diameter_peer.c b/src/modules/cdp/diameter_peer.c index 294d8d640..0dd30dd36 100644 --- a/src/modules/cdp/diameter_peer.c +++ b/src/modules/cdp/diameter_peer.c @@ -233,10 +233,8 @@ int diameter_peer_start(int blocking) { int pid; int k = 0; - int seed; peer *p; - seed = random(); /* fork workers */ for(k = 0; k < config->workers; k++) { pid = fork_process(1001 + k, "cdp_worker", 1); @@ -245,7 +243,6 @@ int diameter_peer_start(int blocking) return 0; } if(pid == 0) { - srandom(seed * k); snprintf( pt[process_no].desc, MAX_PT_DESC, "cdp worker child=%d", k); if(cfg_child_init()) @@ -266,7 +263,6 @@ int diameter_peer_start(int blocking) /* fork receiver for unknown peers */ - seed = random(); pid = fork_process(1001 + k, "cdp_receiver_peer_unknown", 1); if(pid == -1) { @@ -275,7 +271,6 @@ int diameter_peer_start(int blocking) return 0; } if(pid == 0) { - srandom(seed * k); snprintf(pt[process_no].desc, MAX_PT_DESC, "cdp receiver peer unknown"); if(cfg_child_init()) return 0; @@ -288,7 +283,6 @@ int diameter_peer_start(int blocking) } /* fork receivers for each pre-configured peers */ - seed = random(); lock_get(peer_list_lock); for(p = peer_list->head, k = -1; p; p = p->next, k--) { pid = fork_process(1001 + k, "cdp_receiver_peer", 1); @@ -298,7 +292,6 @@ int diameter_peer_start(int blocking) return 0; } if(pid == 0) { - srandom(seed * k); snprintf(pt[process_no].desc, MAX_PT_DESC, "cdp_receiver_peer=%.*s", p->fqdn.len, p->fqdn.s); if(cfg_child_init()) diff --git a/src/modules/cdp/peerstatemachine.c b/src/modules/cdp/peerstatemachine.c index 0732822e0..5434af0ed 100644 --- a/src/modules/cdp/peerstatemachine.c +++ b/src/modules/cdp/peerstatemachine.c @@ -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); diff --git a/src/modules/cdp/receiver.c b/src/modules/cdp/receiver.c index 17200cf81..47e1a5729 100644 --- a/src/modules/cdp/receiver.c +++ b/src/modules/cdp/receiver.c @@ -605,7 +605,7 @@ static inline int do_receive(serviced_peer_t *sp) version = (unsigned char)(sp->buf[0]); if(version != 1) { LM_ERR("do_receive(): [%.*s] Received Unknown version [%d]\n", - sp->p->fqdn.len, sp->p->fqdn.s, + sp->p ? sp->p->fqdn.len : 0, sp->p ? sp->p->fqdn.s : 0, (unsigned char)sp->buf[0]); goto error_and_reset; } else { @@ -830,7 +830,7 @@ int receive_loop(peer *original_peer) #if OPENSSL_VERSION_NUMBER >= 0x10100000L if(enable_tls) { to_ssl(&sp2->tls_ctx, &sp2->tls_conn, - sp->tcp_socket, method); + sp2->tcp_socket, method); } #endif } else { @@ -843,7 +843,7 @@ int receive_loop(peer *original_peer) #if OPENSSL_VERSION_NUMBER >= 0x10100000L if(enable_tls) { to_ssl(&sp2->tls_ctx, &sp2->tls_conn, - sp->tcp_socket, method); + sp2->tcp_socket, method); } #endif } diff --git a/src/modules/cdp/session.c b/src/modules/cdp/session.c index cd169f103..376f9d7ed 100644 --- a/src/modules/cdp/session.c +++ b/src/modules/cdp/session.c @@ -428,7 +428,7 @@ void cdp_sessions_log() x->u.auth.generic_data, x->u.auth.class); break; case ACCT_CC_CLIENT: - LM_DBG("CCAcct State [%d] Charging Active [%c (%d)s] " + LM_DBG("CCAcct State [%d] Charging Active [%c (%ld)s] " "Reserved Units(valid=%ds) [%d] Generic [%p]\n", x->u.cc_acc.state, (x->u.cc_acc.charging_start_time @@ -436,11 +436,11 @@ void cdp_sessions_log() != ACC_CC_ST_DISCON) ? 'Y' : 'N', - x->u.cc_acc.charging_start_time - ? (int)((int)time(0) - - (int)x->u.cc_acc + x->u.cc_acc.charging_start_time ? ( + time_t)(time(0) + - (time_t)x->u.cc_acc .charging_start_time) - : -1, + : -1, x->u.cc_acc.reserved_units ? (int)((int)x->u.cc_acc .last_reservation_request_time @@ -482,7 +482,7 @@ int cdp_sessions_timer(time_t now, void *ptr) x, ACC_CC_EV_SESSION_STALE, 0); } //check reservation timers - again here we are assuming CC-Time applications - int last_res_timestamp = + time_t last_res_timestamp = x->u.cc_acc.last_reservation_request_time; int res_valid_for = x->u.cc_acc.reserved_units_validity_time; diff --git a/src/modules/cdp/session.h b/src/modules/cdp/session.h index 1d9a90050..644112302 100644 --- a/src/modules/cdp/session.h +++ b/src/modules/cdp/session.h @@ -130,12 +130,13 @@ typedef struct _cdp_auth_session_t time_t timeout; /**< absolute time for session timeout -1 means forever */ time_t lifetime; /**< absolute time for auth lifetime -1 means forever */ time_t grace_period; /**< grace_period in seconds */ - unsigned int - last_requested_lifetime; /**< the following 3 timers are used to store what we are */ - unsigned int - last_requested_timeout; /**confirmed) continue; + if(call->money_based.final_pulse == 0) { + LM_WARN("CID [%.*s] - final pulse is 0 - skipping\n", + call->sip_data.callid.len, + call->sip_data.callid.s); + continue; + } + consumed_time = get_current_timestamp() - call->start_timestamp; diff --git a/src/modules/cnxcc/cnxcc_mod.c b/src/modules/cnxcc/cnxcc_mod.c index 7aac5cfe5..be48fbaba 100644 --- a/src/modules/cnxcc/cnxcc_mod.c +++ b/src/modules/cnxcc/cnxcc_mod.c @@ -120,6 +120,7 @@ static call_t *__alloc_new_call_by_money(credit_data_t *credit_data, struct sip_msg *msg, double credit, double connect_cost, double cost_per_second, int initial_pulse, int final_pulse); static void __notify_call_termination(sip_msg_t *msg); +static void __free_call_t(call_t *call); static void __free_call(call_t *call); static void __delete_call(call_t *call, credit_data_t *credit_data); static int __has_to_tag(struct sip_msg *msg); @@ -903,7 +904,8 @@ static void __free_credit_data(credit_data_t *credit_data, hash_tables_t *hts, // Free client_id in list's root shm_free(credit_data->call_list->client_id.s); - shm_free(credit_data->call_list); + __free_call_t(credit_data->call_list); + credit_data->call_list = NULL; // Release the lock since we are going to free the entry down below cnxcc_unlock(credit_data->lock); @@ -981,6 +983,17 @@ void terminate_all_calls(credit_data_t *credit_data) } } +static void __free_call_t(call_t *call) +{ + str_shm_free_if_not_null(call->sip_data.callid); + str_shm_free_if_not_null(call->sip_data.to_uri); + str_shm_free_if_not_null(call->sip_data.to_tag); + str_shm_free_if_not_null(call->sip_data.from_uri); + str_shm_free_if_not_null(call->sip_data.from_tag); + + shm_free(call); +} + /* * WARNING: When calling this function, the proper lock should have been acquired */ @@ -1018,13 +1031,7 @@ static void __free_call(call_t *call) shm_free(e->key.s); shm_free(e); - str_shm_free_if_not_null(call->sip_data.callid); - str_shm_free_if_not_null(call->sip_data.to_uri); - str_shm_free_if_not_null(call->sip_data.to_tag); - str_shm_free_if_not_null(call->sip_data.from_uri); - str_shm_free_if_not_null(call->sip_data.from_tag); - - shm_free(call); + __free_call_t(call); } /* @@ -1132,14 +1139,18 @@ static credit_data_t *__get_or_create_credit_data_entry( if(e == NULL) goto no_memory; - if(shm_str_dup(&e->key, client_id) != 0) + if(shm_str_dup(&e->key, client_id) != 0) { + shm_free(e); goto no_memory; + } e->u.p = credit_data = __alloc_new_credit_data(client_id, type); e->flags = 0; - if(credit_data == NULL) + if(credit_data == NULL) { + shm_free(e); goto no_memory; + } cnxcc_lock(ht->lock); str_hash_add(sht, e); @@ -1168,7 +1179,7 @@ static credit_data_t *__alloc_new_credit_data( credit_data->call_list = shm_malloc(sizeof(call_t)); if(credit_data->call_list == NULL) goto no_memory; - + memset(credit_data->call_list, 0, sizeof(data_t)); clist_init(credit_data->call_list, next, prev); /* @@ -1201,6 +1212,13 @@ static credit_data_t *__alloc_new_credit_data( no_memory: SHM_MEM_ERROR; error: + if(credit_data) { + if(credit_data->call_list) { + str_shm_free_if_not_null(credit_data->call_list->client_id); + __free_call_t(credit_data->call_list); + } + shm_free(credit_data); + } return NULL; } @@ -1269,6 +1287,8 @@ static call_t *__alloc_new_call_by_money(credit_data_t *credit_data, error: cnxcc_unlock(credit_data->lock); + if(call) + __free_call_t(call); return NULL; } @@ -1330,6 +1350,8 @@ static call_t *__alloc_new_call_by_time( error: cnxcc_unlock(credit_data->lock); + if(call) + __free_call_t(call); return NULL; } @@ -1392,6 +1414,8 @@ static call_t *alloc_new_call_by_channel( error: cnxcc_unlock(credit_data->lock); + if(call) + __free_call_t(call); return NULL; } @@ -1449,9 +1473,10 @@ static int __add_call_by_cid(str *cid, call_t *call, credit_type_t type) SHM_MEM_ERROR; return -1; } - + memset(e, 0, sizeof(struct str_hash_entry)); if(shm_str_dup(&e->key, cid) != 0) { SHM_MEM_ERROR; + shm_free(e); return -1; } diff --git a/src/modules/corex/corex_mod.c b/src/modules/corex/corex_mod.c index 4152fbf5d..5849a34f4 100644 --- a/src/modules/corex/corex_mod.c +++ b/src/modules/corex/corex_mod.c @@ -501,16 +501,20 @@ typedef struct _msg_iflag_name int value; } msg_iflag_name_t; +/* clang-format off */ static msg_iflag_name_t _msg_iflag_list[] = { - {str_init("USE_UAC_FROM"), FL_USE_UAC_FROM}, - {str_init("USE_UAC_TO"), FL_USE_UAC_TO}, - {str_init("UAC_AUTH"), FL_UAC_AUTH}, {{0, 0}, 0}}; + {str_init("USE_UAC_FROM"), FL_USE_UAC_FROM}, + {str_init("USE_UAC_TO"), FL_USE_UAC_TO}, + {str_init("UAC_AUTH"), FL_UAC_AUTH}, + {{0, 0}, 0} +}; +/* clang-format on */ /** * */ -static int msg_lookup_flag(str *fname) +static unsigned long long msg_lookup_flag(str *fname) { int i; for(i = 0; _msg_iflag_list[i].name.len > 0; i++) { @@ -520,21 +524,22 @@ static int msg_lookup_flag(str *fname) return _msg_iflag_list[i].value; } } - return -1; + return 0; } + /** * */ static int w_msg_iflag_set(sip_msg_t *msg, char *pflag, char *p2) { - int fv; + unsigned long long fv; str fname; if(fixup_get_svalue(msg, (gparam_t *)pflag, &fname)) { LM_ERR("cannot get the msg flag name parameter\n"); return -1; } fv = msg_lookup_flag(&fname); - if(fv == 1) { + if(fv == 0) { LM_ERR("unsupported flag name [%.*s]\n", fname.len, fname.s); return -1; } @@ -547,14 +552,14 @@ static int w_msg_iflag_set(sip_msg_t *msg, char *pflag, char *p2) */ static int w_msg_iflag_reset(sip_msg_t *msg, char *pflag, char *p2) { - int fv; + unsigned long long fv; str fname; if(fixup_get_svalue(msg, (gparam_t *)pflag, &fname)) { LM_ERR("cannot get the msg flag name parameter\n"); return -1; } fv = msg_lookup_flag(&fname); - if(fv < 0) { + if(fv == 0) { LM_ERR("unsupported flag name [%.*s]\n", fname.len, fname.s); return -1; } @@ -567,14 +572,14 @@ static int w_msg_iflag_reset(sip_msg_t *msg, char *pflag, char *p2) */ static int w_msg_iflag_is_set(sip_msg_t *msg, char *pflag, char *p2) { - int fv; + unsigned long long fv; str fname; if(fixup_get_svalue(msg, (gparam_t *)pflag, &fname)) { LM_ERR("cannot get the msg flag name parameter\n"); return -1; } fv = msg_lookup_flag(&fname); - if(fv < 0) { + if(fv == 0) { LM_ERR("unsupported flag name [%.*s]\n", fname.len, fname.s); return -1; } @@ -1269,6 +1274,16 @@ static int corex_sip_reply_out(sr_event_param_t *evp) str evname = str_init("corex:reply-out"); memset(&sndinfo, 0, sizeof(onsend_info_t)); + sndinfo.dst = evp->dst; + if(evp->rpl != NULL) { + sndinfo.msg = evp->rpl; + sndinfo.buf = evp->rpl->buf; + sndinfo.len = evp->rpl->len; + } else { + sndinfo.msg = evp->req; + sndinfo.buf = evp->req->buf; + sndinfo.len = evp->req->len; + } if(corex_evrt_reply_out_no >= 0 || corex_evcb_reply_out.len > 0) { run_onsend_evroute(&sndinfo, corex_evrt_reply_out_no, diff --git a/src/modules/cplc/cpl_time.c b/src/modules/cplc/cpl_time.c index b22fe5e8c..aea3265d8 100644 --- a/src/modules/cplc/cpl_time.c +++ b/src/modules/cplc/cpl_time.c @@ -264,8 +264,9 @@ int cpl_ac_print(cpl_ac_tm_p _atp) return -1; } - printf("\nSys time: %llu\nTime: %02d:%02d:%02d\n", (unsigned long long)_atp->time, - _atp->t.tm_hour, _atp->t.tm_min, _atp->t.tm_sec); + printf("\nSys time: %llu\nTime: %02d:%02d:%02d\n", + (unsigned long long)_atp->time, _atp->t.tm_hour, _atp->t.tm_min, + _atp->t.tm_sec); printf("Date: %s, %04d-%02d-%02d\n", _wdays[_atp->t.tm_wday], _atp->t.tm_year + 1900, _atp->t.tm_mon + 1, _atp->t.tm_mday); printf("Year day: %d\nYear week-day: %d\nYear week: %d\n", _atp->t.tm_yday, @@ -994,8 +995,8 @@ int cpl_check_freq_interval(cpl_tmrec_p _trp, cpl_ac_tm_p _atp) ? REC_MATCH : REC_NOMATCH; #ifdef USE_YWEEK_U - _t0 -= _trp->ts.tm_wday * 24 * 3600; - _t1 -= _atp->t.tm_wday * 24 * 3600; + _t0 -= 24ULL * _trp->ts.tm_wday * 3600; + _t1 -= 24ULL * _atp->t.tm_wday * 3600; #else _t0 -= ((_trp->ts.tm_wday + 6) % 7) * 24 * 3600; _t1 -= ((_atp->t.tm_wday + 6) % 7) * 24 * 3600; @@ -1004,7 +1005,7 @@ int cpl_check_freq_interval(cpl_tmrec_p _trp, cpl_ac_tm_p _atp) ? REC_MATCH : REC_NOMATCH; case FREQ_MONTHLY: - _t0 = (_atp->t.tm_year - _trp->ts.tm_year) * 12 + _atp->t.tm_mon + _t0 = 12ULL * (_atp->t.tm_year - _trp->ts.tm_year) + _atp->t.tm_mon - _trp->ts.tm_mon; return (_t0 % _trp->interval == 0) ? REC_MATCH : REC_NOMATCH; case FREQ_YEARLY: diff --git a/src/modules/ctl/binrpc_run.c b/src/modules/ctl/binrpc_run.c index 2e87ae791..2a0eae1c7 100644 --- a/src/modules/ctl/binrpc_run.c +++ b/src/modules/ctl/binrpc_run.c @@ -1025,7 +1025,7 @@ static int rpc_add(struct binrpc_ctx *ctx, char *fmt, ...) int err; str st; str *sp; - struct rpc_struct_l *rs; + struct rpc_struct_l *rs = NULL; str null_value = str_init(""); double d; @@ -1069,12 +1069,14 @@ static int rpc_add(struct binrpc_ctx *ctx, char *fmt, ...) if(err < 0) goto error_add; rs = new_rpc_struct(); - if(rs == 0) + if(rs == NULL) goto error_mem; rs->offset = binrpc_pkt_len(&ctx->out.pkt); err = binrpc_end_struct(&ctx->out.pkt); - if(err < 0) + if(err < 0) { + ctl_free(rs); goto error_add; + } clist_append(&ctx->out.structs, rs, next, prev); *(va_arg(ap, void **)) = rs; break; @@ -1180,7 +1182,7 @@ static int rpc_struct_add(struct rpc_struct_l *s, char *fmt, ...) va_list ap; int err; struct binrpc_val avp; - struct rpc_struct_l *rs; + struct rpc_struct_l *rs = NULL; str *sp; str null_value = str_init(""); @@ -1226,7 +1228,7 @@ static int rpc_struct_add(struct rpc_struct_l *s, char *fmt, ...) goto error_add; } rs = new_rpc_struct(); - if(rs == 0) { + if(rs == NULL) { LM_ERR("not enough memory (%c)\n", *fmt); goto error_mem; } @@ -1234,6 +1236,7 @@ static int rpc_struct_add(struct rpc_struct_l *s, char *fmt, ...) err = binrpc_end_struct(&s->pkt); if(err < 0) { LM_ERR("failed to end struct (%c)\n", *fmt); + ctl_free(rs); goto error_add; } clist_append(&s->substructs, rs, next, prev); @@ -1289,8 +1292,8 @@ static int rpc_array_add(struct rpc_struct_l *s, char *fmt, ...) va_list ap; int err; str st; - str *sp; - struct rpc_struct_l *rs; + str *sp = NULL; + struct rpc_struct_l *rs = NULL; str null_value = str_init(""); double d; @@ -1334,12 +1337,14 @@ static int rpc_array_add(struct rpc_struct_l *s, char *fmt, ...) if(err < 0) goto error_add; rs = new_rpc_struct(); - if(rs == 0) + if(rs == NULL) goto error_mem; rs->offset = binrpc_pkt_len(&s->pkt); err = binrpc_end_struct(&s->pkt); - if(err < 0) + if(err < 0) { + ctl_free(rs); goto error_add; + } clist_append(&s->substructs, rs, next, prev); *(va_arg(ap, void **)) = rs; break; diff --git a/src/modules/ctl/fifo_server.c b/src/modules/ctl/fifo_server.c index 94a700cf5..d8bfafc59 100644 --- a/src/modules/ctl/fifo_server.c +++ b/src/modules/ctl/fifo_server.c @@ -1259,7 +1259,7 @@ err: static int rpc_struct_printf(struct text_chunk *c, char *name, char *fmt, ...) { int n, buf_size; - char *buf; + char *buf = NULL; char *buf0; va_list ap; str s, nm; @@ -1288,7 +1288,7 @@ static int rpc_struct_printf(struct text_chunk *c, char *name, char *fmt, ...) &nm, 1); /* Escape all characters, including : and , */ if(!m) { rpc_fault(ctx, 500, "Internal Server Error"); - goto err; + goto error; } s.s = buf; @@ -1298,7 +1298,7 @@ static int rpc_struct_printf(struct text_chunk *c, char *name, char *fmt, ...) rpc_fault(ctx, 500, "Internal Server Error"); free_chunk(m); ERR("Error while creating text_chunk structure"); - goto err; + goto error; } l->flags |= CHUNK_MEMBER_VALUE; @@ -1312,6 +1312,7 @@ static int rpc_struct_printf(struct text_chunk *c, char *name, char *fmt, ...) c->next = m; if(c == ctx->last) ctx->last = m; + ctl_free(buf); return 0; } /* Else try again with more space. */ @@ -1323,12 +1324,12 @@ static int rpc_struct_printf(struct text_chunk *c, char *name, char *fmt, ...) if((buf0 = ctl_realloc(buf, buf_size)) == 0) { rpc_fault(ctx, 500, "Internal Server Error (No memory left)"); ERR("No memory left\n"); - goto err; + goto error; } buf = buf0; } - return 0; -err: + +error: if(buf) ctl_free(buf); return -1; diff --git a/src/modules/db_berkeley/km_bdb_lib.c b/src/modules/db_berkeley/km_bdb_lib.c index 06feb6e4b..4761084c9 100644 --- a/src/modules/db_berkeley/km_bdb_lib.c +++ b/src/modules/db_berkeley/km_bdb_lib.c @@ -676,7 +676,7 @@ int km_bdblib_create_journal(table_p _tp) { char *s; char fn[1024]; - char d[64]; + char d[128]; FILE *fp = NULL; struct tm *t; int bl; diff --git a/src/modules/db_mongodb/mongodb_dbase.c b/src/modules/db_mongodb/mongodb_dbase.c index 6b51962c8..df49af6f9 100644 --- a/src/modules/db_mongodb/mongodb_dbase.c +++ b/src/modules/db_mongodb/mongodb_dbase.c @@ -29,6 +29,12 @@ #define DB_MONGODB_ROWS_STEP 1000 +#if MONGOC_CHECK_VERSION(1, 29, 0) +#define _ksr_bson_as_json bson_as_legacy_extended_json +#else +#define _ksr_bson_as_json bson_as_json +#endif + typedef struct db_mongodb_result { mongoc_collection_t *collection; /*!< Collection link */ @@ -773,7 +779,7 @@ static int db_mongodb_convert_result(const db1_con_t *_h, db1_res_t *_r) mgres->maxrows = RES_ROW_N(_r); } if(is_printable(L_DBG)) { - jstr = bson_as_json(itdoc, NULL); + jstr = _ksr_bson_as_json(itdoc, NULL); LM_DBG("selected document: %s\n", jstr); bson_free(jstr); } @@ -838,6 +844,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"); } @@ -999,7 +1006,7 @@ int db_mongodb_query(const db1_con_t *_h, const db_key_t *_k, } if(is_printable(L_DBG)) { - jstr = bson_as_json(seldoc, NULL); + jstr = _ksr_bson_as_json(seldoc, NULL); LM_DBG("query filter: %s\n", jstr); bson_free(jstr); } @@ -1035,7 +1042,7 @@ int db_mongodb_query(const db1_con_t *_h, const db_key_t *_k, } #endif if(is_printable(L_DBG)) { - jstr = bson_as_json(mgcon->colsdoc, NULL); + jstr = _ksr_bson_as_json(mgcon->colsdoc, NULL); LM_DBG("columns filter: %s\n", jstr); bson_free(jstr); } @@ -1173,7 +1180,7 @@ int db_mongodb_insert(const db1_con_t *_h, const db_key_t *_k, goto error; } if(is_printable(L_DBG)) { - jstr = bson_as_json(doc, NULL); + jstr = _ksr_bson_as_json(doc, NULL); LM_DBG("insert document: %s\n", jstr); bson_free(jstr); } @@ -1267,7 +1274,7 @@ int db_mongodb_delete(const db1_con_t *_h, const db_key_t *_k, } if(is_printable(L_DBG)) { - jstr = bson_as_json(doc, NULL); + jstr = _ksr_bson_as_json(doc, NULL); LM_DBG("delete filter document: %s\n", jstr); bson_free(jstr); } diff --git a/src/modules/db_mysql/km_my_con.c b/src/modules/db_mysql/km_my_con.c index 561a00372..37508ce24 100644 --- a/src/modules/db_mysql/km_my_con.c +++ b/src/modules/db_mysql/km_my_con.c @@ -143,7 +143,7 @@ struct my_con *db_mysql_new_connection(const struct db_id *id) #if MYSQL_VERSION_ID >= 100339 mysql_options(ptr->con, MYSQL_OPT_SSL_ENFORCE, (void *)&(int){1}); #else - LM_WARN("ssl mode not supported by %s\n", MARIADB_BASE_VERSION); + LM_DBG("ssl mode not supported by %s\n", MARIADB_BASE_VERSION); #endif break; case 5: /* SSL_MODE_VERIFY_IDENTITY */ @@ -151,7 +151,7 @@ struct my_con *db_mysql_new_connection(const struct db_id *id) (void *)&(int){1}); break; default: - LM_WARN("opt_ssl_mode = %d not supported by MariaDB Connector/C\n", + LM_DBG("opt_ssl_mode = %d not supported by MariaDB Connector/C\n", db_mysql_opt_ssl_mode); break; } @@ -179,14 +179,14 @@ struct my_con *db_mysql_new_connection(const struct db_id *id) #endif /* MYSQL_VERSION_ID */ #endif /* MARIADB_BASE_VERSION */ -#ifdef MYSQL_OPT_SSL_CA +#if(MYSQL_VERSION_ID >= 50600) if(db_mysql_opt_ssl_ca) mysql_options( ptr->con, MYSQL_OPT_SSL_CA, (const void *)db_mysql_opt_ssl_ca); #else - LM_WARN("opt_ssl_ca option not supported by mysql version (value %s) - " - "ignoring\n", - db_mysql_opt_ssl_ca); + LM_DBG("opt_ssl_ca option not supported by mysql version (value %d) - " + "ignoring\n", + MYSQL_VERSION_ID); #endif /* MYSQL_OPT_SSL_CA */ #ifdef KSR_MYSQL_OPT_RECONNECT diff --git a/src/modules/db_oracle/dbase.c b/src/modules/db_oracle/dbase.c index f1e433024..1393db9f7 100644 --- a/src/modules/db_oracle/dbase.c +++ b/src/modules/db_oracle/dbase.c @@ -174,7 +174,7 @@ db1_con_t *db_oracle_init(const str *_url) */ void db_oracle_close(db1_con_t *_h) { - db_do_close(_h, db_oracle_free_connection); + db_do_close(_h, (void *)db_oracle_free_connection); } diff --git a/src/modules/db_redis/Makefile b/src/modules/db_redis/Makefile index 85d9b9a95..d5e304cc2 100644 --- a/src/modules/db_redis/Makefile +++ b/src/modules/db_redis/Makefile @@ -64,9 +64,9 @@ ifneq ($(HIREDIS_CLUSTER_BUILDER),) HIREDISCLUSTERDEFS = $(shell $(HIREDIS_CLUSTER_BUILDER) --cflags) HIREDISCLUSTERLIBS = $(shell $(HIREDIS_CLUSTER_BUILDER) --libs) HIREDISCLUSTERLIBSPATH = $(shell $(HIREDIS_CLUSTER_BUILDER) --libs-only-L | cut -c 3-) - ifneq ($(shell ls $(HIREDISCLUSTERLIBSPATH) | grep libhiredis_ssl.so),) + ifneq ($(shell ls $(HIREDISCLUSTERLIBSPATH) | grep libhiredis_cluster_ssl.so),) HIREDISCLUSTERDEFS += -DWITH_SSL - HIREDISCLUSTERLIBS += -lhiredis_ssl + HIREDISCLUSTERLIBS += -lhiredis_cluster_ssl endif DEFS+=-DWITH_HIREDIS_CLUSTER DEFS+=$(HIREDISCLUSTERDEFS) diff --git a/src/modules/db_redis/redis_connection.h b/src/modules/db_redis/redis_connection.h index 62bb81f40..5b6f819c0 100644 --- a/src/modules/db_redis/redis_connection.h +++ b/src/modules/db_redis/redis_connection.h @@ -25,6 +25,9 @@ #ifdef WITH_HIREDIS_CLUSTER #include +#ifdef WITH_SSL +#include +#endif #else #ifdef WITH_HIREDIS_PATH #include diff --git a/src/modules/db_redis/redis_dbase.c b/src/modules/db_redis/redis_dbase.c index 84c0c3a94..d6a4cb858 100644 --- a/src/modules/db_redis/redis_dbase.c +++ b/src/modules/db_redis/redis_dbase.c @@ -614,7 +614,10 @@ static int db_redis_build_type_keys(km_redis_con_t *con, const str *table_name, if(set_keys) { // add key for parent set // :::index:: - pkg_free(keyname.s); + if(keyname.s) { + pkg_free(keyname.s); + keyname.s = NULL; + } keyname.len = table->version_code.len + table_name->len + 9 + type->type.len; keyname.s = pkg_malloc(keyname.len + 1); @@ -628,12 +631,16 @@ static int db_redis_build_type_keys(km_redis_con_t *con, const str *table_name, type->type.s); if(db_redis_key_add_str(set_keys, &keyname) != 0) { LM_ERR("Failed to add query key to set key list\n"); + pkg_free(keyname.s); + keyname.s = NULL; goto err; } } } - if(keyname.s) + if(keyname.s) { pkg_free(keyname.s); + keyname.s = NULL; + } } return 0; @@ -794,6 +801,7 @@ static int db_redis_build_query_keys(km_redis_con_t *con, const str *table_name, type->type.s); } keyname.s = NULL; + break; } else if(keyname.s) { pkg_free(keyname.s); keyname.s = NULL; @@ -1020,43 +1028,51 @@ static int db_redis_scan_query_keys_pattern(km_redis_con_t *con, #endif #ifdef WITH_HIREDIS_CLUSTER + return 0; +err: + if(reply) + db_redis_free_reply(&reply); + return -1; } -#endif +#else -// for full table scans, we have to manually match all given keys -// but only do this once for repeated invocations -if(!*manual_keys) { - *manual_keys_count = _n; - *manual_keys = (int *)pkg_malloc(*manual_keys_count * sizeof(int)); - if(!*manual_keys) { - LM_ERR("Failed to allocate memory for manual keys\n"); - goto err; - } - memset(*manual_keys, 0, *manual_keys_count * sizeof(int)); - for(l = 0; l < _n; ++l) { - (*manual_keys)[l] = l; - } -} + // for full table scans, we have to manually match all given keys + // but only do this once for repeated invocations + if(!*manual_keys) { + *manual_keys_count = _n; + *manual_keys = (int *)pkg_malloc(*manual_keys_count * sizeof(int)); + if(!*manual_keys) { + LM_ERR("Failed to allocate memory for manual keys\n"); + goto err; + } + memset(*manual_keys, 0, *manual_keys_count * sizeof(int)); + for(l = 0; l < _n; ++l) { + (*manual_keys)[l] = l; + } + } -if(reply) { - db_redis_free_reply(&reply); -} + if(reply) { + db_redis_free_reply(&reply); + } -db_redis_key_free(&query_v); + db_redis_key_free(&query_v); -LM_DBG("got %lu entries by scan\n", (unsigned long)i); -return 0; + LM_DBG("got %lu entries by scan\n", (unsigned long)i); + return 0; -err : if(reply) db_redis_free_reply(&reply); -db_redis_key_free(&query_v); -db_redis_key_free(query_keys); -*query_keys_count = 0; -if(*manual_keys) { - pkg_free(*manual_keys); - *manual_keys = NULL; -} -return -1; -} + err: + if(reply) + db_redis_free_reply(&reply); + db_redis_key_free(&query_v); + db_redis_key_free(query_keys); + *query_keys_count = 0; + if(*manual_keys) { + pkg_free(*manual_keys); + *manual_keys = NULL; + } + return -1; + } +#endif static int db_redis_scan_query_keys(km_redis_con_t *con, const str *table_name, const int _n, redis_key_t **query_keys, int *query_keys_count, diff --git a/src/modules/db_sqlite/dbase.c b/src/modules/db_sqlite/dbase.c index 97af64d39..a3e9b82f7 100644 --- a/src/modules/db_sqlite/dbase.c +++ b/src/modules/db_sqlite/dbase.c @@ -126,14 +126,17 @@ db1_con_t *db_sqlite_init(const str *_url) * No function should be called after this */ -static void db_sqlite_free_connection(struct sqlite_connection *con) +static void db_sqlite_free_connection(struct pool_con *con) { + struct sqlite_connection *_c; + if(!con) return; + _c = (struct sqlite_connection *)con; - sqlite3_close(con->conn); - free_db_id(con->hdr.id); - pkg_free(con); + sqlite3_close(_c->conn); + free_db_id(_c->hdr.id); + pkg_free(_c); } void db_sqlite_close(db1_con_t *_h) diff --git a/src/modules/db_unixodbc/connection.c b/src/modules/db_unixodbc/connection.c index 92b1cdb9e..d56f2ac37 100644 --- a/src/modules/db_unixodbc/connection.c +++ b/src/modules/db_unixodbc/connection.c @@ -179,14 +179,17 @@ err2: /* * Close the connection and release memory */ -void db_unixodbc_free_connection(struct my_con *con) +void db_unixodbc_free_connection(struct pool_con *con) { + struct my_con *_c; + if(!con) return; - SQLFreeHandle(SQL_HANDLE_ENV, con->env); - SQLDisconnect(con->dbc); - SQLFreeHandle(SQL_HANDLE_DBC, con->dbc); - pkg_free(con); + _c = (struct my_con *)con; + SQLFreeHandle(SQL_HANDLE_ENV, _c->env); + SQLDisconnect(_c->dbc); + SQLFreeHandle(SQL_HANDLE_DBC, _c->dbc); + pkg_free(_c); } diff --git a/src/modules/db_unixodbc/connection.h b/src/modules/db_unixodbc/connection.h index d94f0b48e..a37bb1e39 100644 --- a/src/modules/db_unixodbc/connection.h +++ b/src/modules/db_unixodbc/connection.h @@ -83,7 +83,7 @@ struct my_con *db_unixodbc_new_connection(struct db_id *id); /* * Close the connection and release memory */ -void db_unixodbc_free_connection(struct my_con *con); +void db_unixodbc_free_connection(struct pool_con *con); char *db_unixodbc_build_conn_str(const struct db_id *id, char *buf); diff --git a/src/modules/dialog/dialog.c b/src/modules/dialog/dialog.c index 79221a148..75d783330 100644 --- a/src/modules/dialog/dialog.c +++ b/src/modules/dialog/dialog.c @@ -1768,32 +1768,36 @@ static int fixup_dlg_bridge(void **param, int param_no) return 0; } -static str *ki_dlg_get_var_helper( - sip_msg_t *msg, str *sc, str *sf, str *st, str *key) +static int ki_dlg_get_var_helper( + sip_msg_t *msg, str *sc, str *sf, str *st, str *key, str *val) { dlg_cell_t *dlg = NULL; unsigned int dir = 0; - str *val = NULL; if(sc == NULL || sc->s == NULL || sc->len == 0) { LM_ERR("invalid Call-ID parameter\n"); - return val; + return -1; } if(sf == NULL || sf->s == NULL || sf->len == 0) { LM_ERR("invalid From tag parameter\n"); - return val; + return -1; } if(st == NULL) { LM_ERR("invalid To tag parameter\n"); - return val; + return -1; } dlg = get_dlg(sc, sf, st, &dir); - if(dlg == NULL) - return val; - val = get_dlg_varref(dlg, key); + if(dlg == NULL) { + LM_DBG("dialog not found for call-id: %.*s\n", sc->len, sc->s); + return -1; + } + if(get_dlg_varval(dlg, key, val) != 0) { + dlg_release(dlg); + return -1; + } dlg_release(dlg); - return val; + return 0; } /** @@ -1804,18 +1808,15 @@ static sr_kemi_xval_t _sr_kemi_dialog_xval = {0}; static sr_kemi_xval_t *ki_dlg_get_var( sip_msg_t *msg, str *sc, str *sf, str *st, str *key) { - str *val = NULL; - memset(&_sr_kemi_dialog_xval, 0, sizeof(sr_kemi_xval_t)); - val = ki_dlg_get_var_helper(msg, sc, sf, st, key); - if(!val) { + if(ki_dlg_get_var_helper(msg, sc, sf, st, key, &_sr_kemi_dialog_xval.v.s) + < 0) { sr_kemi_xval_null(&_sr_kemi_dialog_xval, SR_KEMI_XVAL_NULL_NONE); return &_sr_kemi_dialog_xval; } _sr_kemi_dialog_xval.vtype = SR_KEMIP_STR; - _sr_kemi_dialog_xval.v.s = *val; return &_sr_kemi_dialog_xval; } @@ -2420,8 +2421,12 @@ static int ki_dlg_var_sets(sip_msg_t *msg, str *name, str *val) int ret; dlg = dlg_get_msg_dialog(msg); + if(dlg) { + dlg_cell_lock(dlg); + } ret = set_dlg_variable_unsafe(dlg, name, val); if(dlg) { + dlg_cell_unlock(dlg); dlg_release(dlg); } @@ -2434,7 +2439,6 @@ static int ki_dlg_var_sets(sip_msg_t *msg, str *name, str *val) static sr_kemi_xval_t *ki_dlg_var_get_mode(sip_msg_t *msg, str *name, int rmode) { dlg_cell_t *dlg; - str *pval; memset(&_sr_kemi_dialog_xval, 0, sizeof(sr_kemi_xval_t)); @@ -2443,14 +2447,12 @@ static sr_kemi_xval_t *ki_dlg_var_get_mode(sip_msg_t *msg, str *name, int rmode) sr_kemi_xval_null(&_sr_kemi_dialog_xval, rmode); return &_sr_kemi_dialog_xval; } - pval = get_dlg_varref(dlg, name); - if(pval == NULL || pval->s == NULL) { + if(get_dlg_varval(dlg, name, &_sr_kemi_dialog_xval.v.s) < 0) { sr_kemi_xval_null(&_sr_kemi_dialog_xval, rmode); goto done; } _sr_kemi_dialog_xval.vtype = SR_KEMIP_STR; - _sr_kemi_dialog_xval.v.s = *pval; done: dlg_release(dlg); @@ -2488,7 +2490,12 @@ static int ki_dlg_var_rm(sip_msg_t *msg, str *name) dlg_cell_t *dlg; dlg = dlg_get_msg_dialog(msg); - set_dlg_variable_unsafe(dlg, name, NULL); + if(dlg) { + dlg_cell_lock(dlg); + set_dlg_variable_unsafe(dlg, name, NULL); + dlg_cell_unlock(dlg); + dlg_release(dlg); + } return 1; } diff --git a/src/modules/dialog/dlg_hash.h b/src/modules/dialog/dlg_hash.h index e4b583f00..513ca586e 100644 --- a/src/modules/dialog/dlg_hash.h +++ b/src/modules/dialog/dlg_hash.h @@ -68,7 +68,7 @@ #define DLG_FLAG_TM (1 << 9) /*!< dialog is set in transaction */ #define DLG_FLAG_EXPIRED (1 << 10) /*!< dialog is expired */ -#define DLG_FLAG_CHANGED_PROF (1 << 10) /*!< dialog-profiles changed DMQ*/ +#define DLG_FLAG_CHANGED_PROF (1 << 11) /*!< dialog-profiles changed - DMQ */ #define DLG_FLAG_DB_LOAD_EXTRA (1 << 12) /*!< dialog loaded extra from db */ /* internal flags stored in db */ diff --git a/src/modules/dialog/dlg_req_within.c b/src/modules/dialog/dlg_req_within.c index fb5f2e51e..0b7b140fd 100644 --- a/src/modules/dialog/dlg_req_within.c +++ b/src/modules/dialog/dlg_req_within.c @@ -374,7 +374,8 @@ error: * DLG_CALLER_LEG (0): caller * DLG_CALLEE_LEG (1): callee */ -static inline int send_bye(struct dlg_cell *cell, int dir, str *hdrs) +static inline int send_bye( + struct dlg_cell *cell, int dir, str *hdrs, int enforce) { uac_req_t uac_r; dlg_t *dialog_info; @@ -384,16 +385,15 @@ static inline int send_bye(struct dlg_cell *cell, int dir, str *hdrs) str lhdrs; /* dialog is already in deleted state, nothing to do */ - if(cell->state == DLG_STATE_DELETED) { + if(cell->state == DLG_STATE_DELETED && enforce == 0) { LM_WARN("dlg [%u:%u] with callid %.*s already in deleted state, BYE " "not sent.\n", cell->h_entry, cell->h_id, cell->callid.len, cell->callid.s); - return 0; + return 1; } /* Send Cancel or final response for non-confirmed dialogs */ - if(cell->state != DLG_STATE_CONFIRMED_NA - && cell->state != DLG_STATE_CONFIRMED) { + if(cell->state < DLG_STATE_CONFIRMED_NA) { if(cell->t) { if(dir == DLG_CALLER_LEG) { if(d_tmb.t_reply(cell->t->uas.request, bye_early_code, @@ -785,7 +785,7 @@ int dlg_send_ka(dlg_cell_t *dlg, int dir) if(di->loc_seq.value > 1) di->loc_seq.value -= 2; else - di->loc_seq.value -= 1; + di->loc_seq.value = 0; LM_DBG("sending OPTIONS to %s\n", (dir == DLG_CALLER_LEG) ? "caller" : "callee"); @@ -841,7 +841,7 @@ int dlg_bye(struct dlg_cell *dlg, str *hdrs, int side) LM_ERR("failed to build dlg headers\n"); return -1; } - ret = send_bye(dlg, side, &all_hdrs); + ret = send_bye(dlg, side, &all_hdrs, 0); pkg_free(all_hdrs.s); dlg_run_event_route(dlg, NULL, dlg->state, DLG_STATE_DELETED); @@ -862,8 +862,10 @@ int dlg_bye_all(struct dlg_cell *dlg, str *hdrs) return -1; } - ret = send_bye(dlg, DLG_CALLER_LEG, &all_hdrs); - ret |= send_bye(dlg, DLG_CALLEE_LEG, &all_hdrs); + ret = send_bye(dlg, DLG_CALLER_LEG, &all_hdrs, 0); + if(ret == 0) { + ret |= send_bye(dlg, DLG_CALLEE_LEG, &all_hdrs, 1); + } pkg_free(all_hdrs.s); diff --git a/src/modules/dialog/dlg_var.c b/src/modules/dialog/dlg_var.c index db5f61c4e..336872829 100644 --- a/src/modules/dialog/dlg_var.c +++ b/src/modules/dialog/dlg_var.c @@ -197,8 +197,8 @@ int set_dlg_variable_unsafe(struct dlg_cell *dlg, str *key, str *val) it_prev->next = it->next; else *var_list = it->next; - /* Set the delete-flag for the current var: */ - it->vflags &= DLG_FLAG_DEL; + /* set the delete-flag for the current var */ + it->vflags |= DLG_FLAG_DEL; } else { /* replace the current it with var and free the it */ var->next = it->next; diff --git a/src/modules/dialplan/dp_db.c b/src/modules/dialplan/dp_db.c index 857a2e43e..64d2a4f3b 100644 --- a/src/modules/dialplan/dp_db.c +++ b/src/modules/dialplan/dp_db.c @@ -203,8 +203,10 @@ static void *pcre2_malloc(size_t size, void *ext) static void pcre2_free(void *ptr, void *ext) { - shm_free(ptr); - ptr = NULL; + if(ptr) { + shm_free(ptr); + ptr = NULL; + } } int init_data(void) diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c index 9e27f998c..98b4096a6 100644 --- a/src/modules/dispatcher/dispatch.c +++ b/src/modules/dispatcher/dispatch.c @@ -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; } } @@ -3841,14 +3845,14 @@ static void ds_options_callback( } } - /* Check if in the meantime someone disabled probing of the target through RPC, MI or reload */ + /* Check if in the meantime someone disabled probing of the target + * through RPC or reload */ if(ds_probing_mode == DS_PROBE_ONLYFLAGGED && !(ds_get_state(group, &uri) & DS_PROBING_DST)) { return; } /* ps->code contains the result-code of the request. - * * We accept both a "200 OK" or the configured reply as a valid response */ if((ps->code >= 200 && ps->code <= 299) || ds_ping_check_rplcode(ps->code)) { @@ -3859,7 +3863,7 @@ static void ds_options_callback( && (ds_get_state(group, &uri) & DS_PROBING_DST))) state |= DS_PROBING_DST; - /* Check if in the meantime someone disabled the target through RPC or MI */ + /* Check if in the meantime someone disabled the target through RPC */ if(!(ds_get_state(group, &uri) & DS_DISABLED_DST) && ds_update_state(fmsg, group, &uri, state, &rctx) != 0) { LM_ERR("Setting the state failed (%.*s, group %d)\n", uri.len, @@ -3869,7 +3873,7 @@ static void ds_options_callback( state = DS_TRYING_DST; if(ds_probing_mode != DS_PROBE_NONE) state |= DS_PROBING_DST; - /* Check if in the meantime someone disabled the target through RPC or MI */ + /* Check if in the meantime someone disabled the target through RPC */ if(!(ds_get_state(group, &uri) & DS_DISABLED_DST) && ds_update_state(fmsg, group, &uri, state, &rctx) != 0) { LM_ERR("Setting the probing state failed (%.*s, group %d)\n", diff --git a/src/modules/dlgs/dlgs_mod.c b/src/modules/dlgs/dlgs_mod.c index e9821d05d..dbb91e1f9 100644 --- a/src/modules/dlgs/dlgs_mod.c +++ b/src/modules/dlgs/dlgs_mod.c @@ -341,7 +341,7 @@ static int ki_dlgs_tags_count(sip_msg_t *msg, str *vtags) int ret; ret = dlgs_tags_count(msg, vtags); - return (ret <= 0) ? (ret - 1) : ret; + return (ret == 0 || ret == -1) ? (ret - 1) : ret; } /** diff --git a/src/modules/erlang/pv_tuple.c b/src/modules/erlang/pv_tuple.c index d25b98cae..22fc7863d 100644 --- a/src/modules/erlang/pv_tuple.c +++ b/src/modules/erlang/pv_tuple.c @@ -56,8 +56,8 @@ int pv_tuple_set( sr_xavp_t *tuples_root; sr_xavp_t *tuple; sr_xavp_t *th, *new, *old, *prv = NULL; - sr_xavp_t *tuple_xavp; - sr_xavp_t *elem_xavp; + sr_xavp_t *tuple_xavp = NULL; + sr_xavp_t *elem_xavp = NULL; sr_xval_t tuple_val; pv_param_t p; pv_value_t empty; diff --git a/src/modules/evrexec/evrexec_mod.c b/src/modules/evrexec/evrexec_mod.c index 3fb99535a..7df75654a 100644 --- a/src/modules/evrexec/evrexec_mod.c +++ b/src/modules/evrexec/evrexec_mod.c @@ -325,10 +325,6 @@ void evrexec_process_socket(evrexec_task_t *it, int idx) } memset(&_evrexec_info, 0, sizeof(evrexec_info_t)); } - /* avoid exiting the process */ - while(1) { - sleep(3600); - } } /** diff --git a/src/modules/htable/ht_api.c b/src/modules/htable/ht_api.c index 2391cb5c5..b20f34bc8 100644 --- a/src/modules/htable/ht_api.c +++ b/src/modules/htable/ht_api.c @@ -491,9 +491,7 @@ int ht_set_cell_ex( it->value.s.s[it->value.s.len] = '\0'; if(exv <= 0) { - if(ht->updateexpire) { - it->expire = now + ht->htexpire; - } + HT_UPDATE_EXPIRE(ht, it, now); } else { it->expire = now + exv; } @@ -509,11 +507,7 @@ int ht_set_cell_ex( cell->next = it->next; cell->prev = it->prev; if(exv <= 0) { - if(ht->updateexpire) { - cell->expire = now + ht->htexpire; - } else { - cell->expire = it->expire; - } + HT_COPY_EXPIRE(ht, cell, now, it); } else { it->expire = now + exv; } @@ -530,9 +524,7 @@ int ht_set_cell_ex( it->value.n = val->n; if(exv <= 0) { - if(ht->updateexpire) { - it->expire = now + ht->htexpire; - } + HT_UPDATE_EXPIRE(ht, it, now); } else { it->expire = now + exv; } @@ -551,11 +543,7 @@ int ht_set_cell_ex( return -1; } if(exv <= 0) { - if(ht->updateexpire) { - cell->expire = now + ht->htexpire; - } else { - cell->expire = it->expire; - } + HT_COPY_EXPIRE(ht, cell, now, it); } else { it->expire = now + exv; } @@ -573,9 +561,7 @@ int ht_set_cell_ex( it->value.n = val->n; if(exv <= 0) { - if(ht->updateexpire) { - it->expire = now + ht->htexpire; - } + HT_UPDATE_EXPIRE(ht, it, now); } else { it->expire = now + exv; } @@ -738,6 +724,10 @@ ht_cell_t *ht_cell_value_add(ht_t *ht, str *name, int val, ht_cell_t *old) if(now > 0 && it->expire != 0 && it->expire < now) { /* entry has expired */ + it->expire = ht->htexpire; + if(it->expire) { + it->expire += now; + } if(ht->flags == PV_VAL_INT) { /* initval is integer, use it to create a fresh entry */ it->flags &= ~AVP_VAL_STR; @@ -1537,6 +1527,7 @@ int ht_count_cells_re(str *sre, ht_t *ht, int mode) str sval; str tval; int ival = 0; + time_t tnow = 0; if(sre == NULL || sre->len <= 0 || ht == NULL) return 0; @@ -1616,11 +1607,17 @@ int ht_count_cells_re(str *sre, ht_t *ht, int mode) } } + tnow = time(NULL); for(i = 0; i < ht->htsize; i++) { /* free entries */ ht_slot_lock(ht, i); it = ht->entries[i].first; while(it) { + if(ht->htexpire > 0 && it->expire != 0 && it->expire < tnow) { + /* entry has expired, continue */ + it = it->next; + continue; + } it0 = it->next; if(op == 5) { if(!(it->flags & AVP_VAL_STR)) diff --git a/src/modules/htable/ht_api.h b/src/modules/htable/ht_api.h index e24a93b1f..cda0aea26 100644 --- a/src/modules/htable/ht_api.h +++ b/src/modules/htable/ht_api.h @@ -140,4 +140,20 @@ ht_cell_t *ht_iterator_get_current(str *iname); void ht_slot_lock(ht_t *ht, int idx); void ht_slot_unlock(ht_t *ht, int idx); + +#define HT_UPDATE_EXPIRE(ht, it, now) \ + do { \ + if(ht->updateexpire || (now && it->expire && it->expire < now)) { \ + it->expire = now + ht->htexpire; \ + } \ + } while(0) +#define HT_COPY_EXPIRE(ht, it, now, src) \ + do { \ + if(ht->updateexpire || (now && it->expire && it->expire < now)) { \ + it->expire = now + ht->htexpire; \ + } else { \ + it->expire = src->expire; \ + } \ + } while(0) + #endif diff --git a/src/modules/htable/ht_var.c b/src/modules/htable/ht_var.c index e79c7869e..4d7707f95 100644 --- a/src/modules/htable/ht_var.c +++ b/src/modules/htable/ht_var.c @@ -38,8 +38,8 @@ int pv_get_ht_cell(struct sip_msg *msg, pv_param_t *param, pv_value_t *res) if(hpv->ht == NULL) { hpv->ht = ht_get_table(&hpv->htname); if(hpv->ht == NULL) { - LM_ERR("htable not found for getting $sht(%.*s=>%.*s)\n", - hpv->htname.len, hpv->htname.s, htname.len, htname.s); + LM_ERR("htable not found for getting $sht(%.*s=>...)\n", + hpv->htname.len, hpv->htname.s); return pv_get_null(msg, param, res); } } @@ -77,8 +77,8 @@ int pv_set_ht_cell( if(hpv->ht == NULL) hpv->ht = ht_get_table(&hpv->htname); if(hpv->ht == NULL) { - LM_ERR("htable not found for setting $sht(%.*s=>%.*s)\n", - hpv->htname.len, hpv->htname.s, htname.len, htname.s); + LM_ERR("htable not found for setting $sht(%.*s=>...)\n", + hpv->htname.len, hpv->htname.s); return -1; } diff --git a/src/modules/http_async_client/async_http.c b/src/modules/http_async_client/async_http.c index 1dbe8adc5..2ece3a9dd 100644 --- a/src/modules/http_async_client/async_http.c +++ b/src/modules/http_async_client/async_http.c @@ -522,7 +522,7 @@ int async_send_query(sip_msg_t *msg, str *query, str *cbname) q_idx++; snprintf(q_id, MAX_ID_LEN + 1, "%u-%u", (unsigned int)getpid(), q_idx); - strncpy(aq->id, q_id, strlen(q_id)); + strcpy(aq->id, q_id); aq->query_params.tls_client_cert = NULL; if(ah_params.tls_client_cert) { diff --git a/src/modules/http_async_client/http_multi.c b/src/modules/http_async_client/http_multi.c index a57aba9c9..7edc0ddc1 100644 --- a/src/modules/http_async_client/http_multi.c +++ b/src/modules/http_async_client/http_multi.c @@ -100,7 +100,7 @@ void event_cb(int fd, short kind, void *userp) update_stat(timeouts, 1); const char *error = "TIMEOUT"; - strncpy(cell->error, error, strlen(error) + 1); + strcpy(cell->error, error); reply_error(cell); @@ -157,10 +157,12 @@ void event_cb(int fd, short kind, void *userp) /* CURLMOPT_SOCKETFUNCTION */ int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp) { + struct http_m_cell *cell; struct http_m_global *g = (struct http_m_global *)cbp; - struct http_m_cell *cell = (struct http_m_cell *)sockp; const char *whatstr[] = {"none", "IN", "OUT", "INOUT", "REMOVE"}; + cell = http_m_cell_lookup(e); + LM_DBG("socket callback: s=%d e=%p what=%s\n", s, e, whatstr[what]); if(what == CURL_POLL_REMOVE) { /* if cell is NULL the handle has been removed by the event callback for timeout */ @@ -218,7 +220,7 @@ int check_mcode(CURLMcode code, char *error) break; } LM_ERR("ERROR: %s\n", s); - strncpy(error, s, strlen(s) + 1); + strcpy(error, s); return -1; } return 0; @@ -602,7 +604,7 @@ void check_multi_info(struct http_m_global *g) CURL *easy; CURLcode res; - struct http_m_cell *cell; + struct http_m_cell *cell = NULL; double tmp_time; LM_DBG("REMAINING: %d\n", g->still_running); @@ -614,9 +616,15 @@ void check_multi_info(struct http_m_global *g) curl_easy_getinfo(easy, CURLINFO_EFFECTIVE_URL, &eff_url); - LM_DBG("DONE: %s => (%d) %s\n", eff_url, res, cell->error); + LM_DBG("DONE: %s => (%d)\n", eff_url, res); cell = http_m_cell_lookup(easy); + if(cell == NULL) { + LM_ERR("failed to get the cell\n"); + curl_multi_remove_handle(g->multi, easy); + curl_easy_cleanup(easy); + continue; + } if(msg->data.result != 0) { LM_ERR("handle %p returned error %d: %s\n", easy, res, cell->error); diff --git a/src/modules/http_async_client/http_multi.h b/src/modules/http_async_client/http_multi.h index 0f35a7223..8e3676b3e 100644 --- a/src/modules/http_async_client/http_multi.h +++ b/src/modules/http_async_client/http_multi.h @@ -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); diff --git a/src/modules/http_client/curlcon.c b/src/modules/http_client/curlcon.c index 2b5a69fcd..3582ecde1 100644 --- a/src/modules/http_client/curlcon.c +++ b/src/modules/http_client/curlcon.c @@ -582,21 +582,29 @@ int curl_parse_conn(void *param, cfg_parser_t *parser, unsigned int flags) t.start.line, t.start.col); return -1; } - pkg_str_dup(&name, &t.val); + if(pkg_str_dup(&name, &t.val) < 0) { + return -1; + } ret = cfg_get_token(&t, parser, 0); - if(ret < 0) + if(ret < 0) { + pkg_free(name.s); return -1; + } if((ret > 0) || (t.type != ']')) { LM_ERR("%s:%d:%d: Syntax error, ']' expected\n", parser->file, t.start.line, t.start.col); + pkg_free(name.s); return -1; } - if(cfg_eat_eol(parser, flags)) + if(cfg_eat_eol(parser, flags)) { + pkg_free(name.s); return -1; + } raw_cc = pkg_malloc(sizeof(raw_http_client_conn_t)); if(raw_cc == NULL) { + pkg_free(name.s); return -1; } memset(raw_cc, 0, sizeof(raw_http_client_conn_t)); @@ -861,17 +869,16 @@ void curl_conn_list_fixup(void) { curl_con_t *cc; cc = _curl_con_root; - while (cc) { - if (!(timeout_mode == 1 || timeout_mode == 2)) { + while(cc) { + if(!(timeout_mode == 1 || timeout_mode == 2)) { /* Timeout is disabled globally. Set timeout to 0 for all connections to reflect this. */ - if (cc->timeout > 0) { + if(cc->timeout > 0) { LM_WARN("curl connection [%.*s]: configured timeout is ignored " - "because timeouts are disabled (timeout_mode)\n", - cc->name.len, cc->name.s); + "because timeouts are disabled (timeout_mode)\n", + cc->name.len, cc->name.s); cc->timeout = 0; } - } - else if (cc->timeout == 0) { + } else if(cc->timeout == 0) { /* Timeout is not configured for that connection. * Use as default global connection_timeout (which can be seconds or milliseconds). */ diff --git a/src/modules/ims_diameter_server/avp_helper.c b/src/modules/ims_diameter_server/avp_helper.c index cddd8f896..3b1ef67af 100644 --- a/src/modules/ims_diameter_server/avp_helper.c +++ b/src/modules/ims_diameter_server/avp_helper.c @@ -46,7 +46,6 @@ // ID of current message static unsigned int current_msg_id = 0; -static unsigned int current_msg_id_repl = 0; cJSON *avp2json(AAA_AVP *avp_t) { @@ -486,7 +485,7 @@ int pv_get_application(struct sip_msg *msg, pv_param_t *param, pv_value_t *res) int pv_get_response(struct sip_msg *msg, pv_param_t *param, pv_value_t *res) { - if((msg->id != current_msg_id_repl) || (responsejson.len < 0)) { + if(responsejson.len < 0) { return pv_get_null(msg, param, res); } return pv_get_strval(msg, param, res, &responsejson); @@ -502,7 +501,6 @@ int pv_set_response( val->rs.s); responsejson.s = val->rs.s; responsejson.len = val->rs.len; - current_msg_id_repl = msg->id; return 0; } return 0; diff --git a/src/modules/ims_icscf/README b/src/modules/ims_icscf/README index 730100e00..a05d42f8a 100644 --- a/src/modules/ims_icscf/README +++ b/src/modules/ims_icscf/README @@ -35,10 +35,14 @@ Richard Good 3.1. route_lir_user_unknown (string) 3.2. route_uar_user_unknown (string) 3.3. scscf_entry_expiry (integer) - 3.4. cxdx_forced_peer (string) - 3.5. cxdx_dest_realm (string) - 3.6. use_preferred_scscf_uri (int) - 3.7. preferred_scscf_uri (string) + 3.4. db_url (string) + 3.5. db_nds_table (string) + 3.6. db_scscf_table (string) + 3.7. db_capabilities_table (string) + 3.8. cxdx_forced_peer (string) + 3.9. cxdx_dest_realm (string) + 3.10. use_preferred_scscf_uri (int) + 3.11. preferred_scscf_uri (string) 4. Functions @@ -61,14 +65,18 @@ Richard Good 1.1. route_lir_user_unknown parameter usage 1.2. route_uar_user_unknown parameter usage 1.3. scscf_entry_expiry parameter usage - 1.4. cxdx_forced_peer parameter usage - 1.5. cxdx_dest_realm parameter usage - 1.6. use_preferred_scscf_uri parameter usage - 1.7. preferred_scscf_uri parameter usage - 1.8. I_scscf_select usage - 1.9. I_scscf_drop usage - 1.10. I_perform_user_authorization_request usage - 1.11. I_perform_location_information_request + 1.4. Set db_url parameter + 1.5. Set db_nds_table parameter + 1.6. Set db_scscf_table parameter + 1.7. Set db_capabilities_table parameter + 1.8. cxdx_forced_peer parameter usage + 1.9. cxdx_dest_realm parameter usage + 1.10. use_preferred_scscf_uri parameter usage + 1.11. preferred_scscf_uri parameter usage + 1.12. I_scscf_select usage + 1.13. I_scscf_drop usage + 1.14. I_perform_user_authorization_request usage + 1.15. I_perform_location_information_request Chapter 1. Admin Guide @@ -85,10 +93,14 @@ Chapter 1. Admin Guide 3.1. route_lir_user_unknown (string) 3.2. route_uar_user_unknown (string) 3.3. scscf_entry_expiry (integer) - 3.4. cxdx_forced_peer (string) - 3.5. cxdx_dest_realm (string) - 3.6. use_preferred_scscf_uri (int) - 3.7. preferred_scscf_uri (string) + 3.4. db_url (string) + 3.5. db_nds_table (string) + 3.6. db_scscf_table (string) + 3.7. db_capabilities_table (string) + 3.8. cxdx_forced_peer (string) + 3.9. cxdx_dest_realm (string) + 3.10. use_preferred_scscf_uri (int) + 3.11. preferred_scscf_uri (string) 4. Functions @@ -132,10 +144,14 @@ Chapter 1. Admin Guide 3.1. route_lir_user_unknown (string) 3.2. route_uar_user_unknown (string) 3.3. scscf_entry_expiry (integer) - 3.4. cxdx_forced_peer (string) - 3.5. cxdx_dest_realm (string) - 3.6. use_preferred_scscf_uri (int) - 3.7. preferred_scscf_uri (string) + 3.4. db_url (string) + 3.5. db_nds_table (string) + 3.6. db_scscf_table (string) + 3.7. db_capabilities_table (string) + 3.8. cxdx_forced_peer (string) + 3.9. cxdx_dest_realm (string) + 3.10. use_preferred_scscf_uri (int) + 3.11. preferred_scscf_uri (string) 3.1. route_lir_user_unknown (string) @@ -173,7 +189,53 @@ modparam("ims_icscf","route_uar_user_unknown", "uar_term_user_unknown") modparam("ims_icscf","scscf_entry_expiry", 300) ... -3.4. cxdx_forced_peer (string) +3.4. db_url (string) + + URL of the database to be used. + + If the db_url string is empty, the default database URL will be used. + + Default value is “mysql://kamailioro:kamailioro@localhost/kamailio”. + + Example 1.4. Set db_url parameter +... +modparam("ims_icscf", "db_url", "dbdriver://username:password@dbhost/dbname") +... + +3.5. db_nds_table (string) + + NDS (Network Domain Security) table name in database to be used. + + Default value is “nds_trusted_domains”. + + Example 1.5. Set db_nds_table parameter +... +modparam("ims_icscf", "db_nds_table", "nds_trusted_domains") +... + +3.6. db_scscf_table (string) + + S-CSCF table name in database to be used. + + Default value is “s_cscf”. + + Example 1.6. Set db_scscf_table parameter +... +modparam("ims_icscf", "db_scscf_table", "s_cscf") +... + +3.7. db_capabilities_table (string) + + S-CSCF capabilities table name in database to be used. + + Default value is “s_cscf_capabilities”. + + Example 1.7. Set db_capabilities_table parameter +... +modparam("ims_icscf", "db_capabilities_table", "s_cscf_capabilities") +... + +3.8. cxdx_forced_peer (string) FQDN of Diameter Peer (HSS) to use for communication (UAR, LIR). If you use this, the routing defined in your diameter xml configuration file @@ -182,23 +244,23 @@ modparam("ims_icscf","scscf_entry_expiry", 300) Default value is "". - Example 1.4. cxdx_forced_peer parameter usage + Example 1.8. cxdx_forced_peer parameter usage ... modparam("ims_icscf", "cxdx_forced_peer", "hss.ims.smilecoms.com") ... -3.5. cxdx_dest_realm (string) +3.9. cxdx_dest_realm (string) Destination realm to be used in Diameter messages to HSS Default value is "ims.smilecoms.com". - Example 1.5. cxdx_dest_realm parameter usage + Example 1.9. cxdx_dest_realm parameter usage ... modparam("ims_icscf", "cxdx_dest_realm", "ims.smilecoms.com") ... -3.6. use_preferred_scscf_uri (int) +3.10. use_preferred_scscf_uri (int) Whether or not this ICSCF has a preferred S-CSCF to use when the HSS returns a list of SCSCFs. 0 means this I-CSCF has no preferred SCSCF. 1 @@ -206,19 +268,19 @@ modparam("ims_icscf", "cxdx_dest_realm", "ims.smilecoms.com") Default value is 0. - Example 1.6. use_preferred_scscf_uri parameter usage + Example 1.10. use_preferred_scscf_uri parameter usage ... modparam("ims_icscf", "use_preferred_scscf_uri", 1) ... -3.7. preferred_scscf_uri (string) +3.11. preferred_scscf_uri (string) If use_preferred_scscf_uri is set then this is the URI of the preferred SCSCF. Default value is "". - Example 1.7. preferred_scscf_uri parameter usage + Example 1.11. preferred_scscf_uri parameter usage ... modparam("ims_icscf", "preferred_scscf_uri", "sip:scscf.ims.smilecoms.com:6060") ... @@ -243,7 +305,7 @@ modparam("ims_icscf", "preferred_scscf_uri", "sip:scscf.ims.smilecoms.com:6060") This function can be used from REQUEST_ROUTE | FAILURE_ROUTE. - Example 1.8. I_scscf_select usage + Example 1.12. I_scscf_select usage ... if (I_scscf_select("0")) { #there is an S-CSCF list - no need to do a UAR @@ -260,7 +322,7 @@ if (I_scscf_select("0")) { This function can be used from REQUEST_ROUTE | FAILURE_ROUTE | REPLY_ROUTE - Example 1.9. I_scscf_drop usage + Example 1.13. I_scscf_drop usage ... I_scscf_drop(); ... @@ -282,7 +344,7 @@ I_scscf_drop(); p.s. this is executed asynchronously. See example on how to retrieve return value - Example 1.10. I_perform_user_authorization_request usage + Example 1.14. I_perform_user_authorization_request usage ... I_perform_user_authorization_request("REG_UAR_REPLY","0"); #0=REG/DEREG; 1=REG+C apabilities @@ -333,7 +395,7 @@ s:uaa_return_code)]\n"); p.s. this is executed asynchronously. See example on how to retrieve return value - Example 1.11. I_perform_location_information_request + Example 1.15. I_perform_location_information_request ... I_perform_location_information_request("SESSION_LIR_REPLY","0"); exit; diff --git a/src/modules/ims_icscf/doc/ims_icscf_admin.xml b/src/modules/ims_icscf/doc/ims_icscf_admin.xml index 9ae046e67..e3c552a1c 100644 --- a/src/modules/ims_icscf/doc/ims_icscf_admin.xml +++ b/src/modules/ims_icscf/doc/ims_icscf_admin.xml @@ -111,6 +111,106 @@ modparam("ims_icscf","scscf_entry_expiry", 300) +
+ <varname>db_url</varname> (string) + + + &url; of the database to be used. + + + + If the db_url string is empty, the default database URL + will be used. + + + + + Default value is &defaultrodb;. + + + + + Set <varname>db_url</varname> parameter + +... +modparam("ims_icscf", "db_url", "&exampledb;") +... + + +
+ +
+ + <varname>db_nds_table</varname> (string) + + + NDS (Network Domain Security) table name in database to be used. + + + + + Default value is nds_trusted_domains. + + + + + Set <varname>db_nds_table</varname> parameter + +... +modparam("ims_icscf", "db_nds_table", "nds_trusted_domains") +... + + +
+ +
+ + <varname>db_scscf_table</varname> (string) + + + S-CSCF table name in database to be used. + + + + + Default value is s_cscf. + + + + + Set <varname>db_scscf_table</varname> parameter + +... +modparam("ims_icscf", "db_scscf_table", "s_cscf") +... + + +
+ +
+ + <varname>db_capabilities_table</varname> (string) + + + S-CSCF capabilities table name in database to be used. + + + + + Default value is s_cscf_capabilities. + + + + + Set <varname>db_capabilities_table</varname> parameter + +... +modparam("ims_icscf", "db_capabilities_table", "s_cscf_capabilities") +... + + +
+
<varname>cxdx_forced_peer</varname> (string) diff --git a/src/modules/ims_icscf/ims_icscf_mod.c b/src/modules/ims_icscf/ims_icscf_mod.c index 502fcf681..a690891ee 100644 --- a/src/modules/ims_icscf/ims_icscf_mod.c +++ b/src/modules/ims_icscf/ims_icscf_mod.c @@ -71,7 +71,7 @@ stat_var *uar_replies_response_time = NULL; stat_var *lir_replies_response_time = NULL; //module parameters -char *ims_icscf_db_url = "mysql://icscf:heslo@localhost/hssdata"; /**< DB URL */ +char *ims_icscf_db_url = DEFAULT_RODB_URL; /**< DB URL */ char *ims_icscf_db_nds_table = "nds_trusted_domains"; /**< NDS table in DB */ char *ims_icscf_db_scscf_table = "s_cscf"; /**< S-CSCF table in db */ char *ims_icscf_db_capabilities_table = diff --git a/src/modules/ims_ipsec_pcscf/cmd.c b/src/modules/ims_ipsec_pcscf/cmd.c index 050798342..c7481cf5c 100644 --- a/src/modules/ims_ipsec_pcscf/cmd.c +++ b/src/modules/ims_ipsec_pcscf/cmd.c @@ -809,6 +809,7 @@ int ipsec_create(struct sip_msg *m, udomain_t *d, int _cflags) pcontact_t *pcontact = NULL; struct pcontact_info ci; int ret = IPSEC_CMD_FAIL; // FAIL by default + int fun_ret_c; // Used to store return codes of some functions tm_cell_t *t = NULL; sip_msg_t *req = NULL; security_t *req_sec_params = NULL; @@ -893,19 +894,20 @@ int ipsec_create(struct sip_msg *m, udomain_t *d, int _cflags) } if(update_contact_ipsec_params(s, m, old_s) != 0) { + LM_ERR("Could not update ipsec params in contact.\n"); goto cleanup; } - if(create_ipsec_tunnel(&req->rcv.src_ip, s) != 0) { - goto cleanup; - } - - if(ul.update_pcontact(d, &ci, pcontact) != 0) { - LM_ERR("Error updating contact\n"); + fun_ret_c = create_ipsec_tunnel(&req->rcv.src_ip, s); + if(fun_ret_c != 0) { + LM_ERR("IPSEC tunnel creation failed.\n"); goto cleanup; } if(ci.via_port == SIP_PORT) { + if(req_sec_params != NULL) { + pcontact->security_temp->data.ipsec = s; + } // Update temp security parameters if(ul.update_temp_security(d, pcontact->security_temp->type, pcontact->security_temp, pcontact) @@ -914,12 +916,21 @@ int ipsec_create(struct sip_msg *m, udomain_t *d, int _cflags) } } + if(ul.update_pcontact(d, &ci, pcontact) != 0) { + LM_ERR("Error updating contact\n"); + goto cleanup; + } - if(add_supported_secagree_header(m) != 0) { + fun_ret_c = add_supported_secagree_header(m); + if(fun_ret_c != 0) { + LM_ERR("Could not add secagree header. Failed with code: %d\n", + fun_ret_c); goto cleanup; } - if(add_security_server_header(m, s) != 0) { + fun_ret_c = add_security_server_header(m, s); + if(fun_ret_c != 0) { + LM_ERR("Could not add security server header. Code: %d\n", fun_ret_c); goto cleanup; } diff --git a/src/modules/ims_ipsec_pcscf/ims_ipsec_pcscf_mod.c b/src/modules/ims_ipsec_pcscf/ims_ipsec_pcscf_mod.c index 223f8d1aa..7c6c529c9 100644 --- a/src/modules/ims_ipsec_pcscf/ims_ipsec_pcscf_mod.c +++ b/src/modules/ims_ipsec_pcscf/ims_ipsec_pcscf_mod.c @@ -336,6 +336,7 @@ static int ipsec_add_listen_ifaces() static int mod_init(void) { bind_usrloc_t bind_usrloc; + int ret; bind_usrloc = (bind_usrloc_t)find_export("ul_bind_ims_usrloc_pcscf", 1, 0); if(!bind_usrloc) { @@ -343,7 +344,9 @@ static int mod_init(void) return -1; } - if(bind_usrloc(&ul) < 0) { + ret = bind_usrloc(&ul); + if(ret < 0) { + LM_ERR("bind_userloc() has failed with code %d", ret); return -1; } LM_INFO("Successfully bound to PCSCF Usrloc module\n"); @@ -355,7 +358,9 @@ static int mod_init(void) } LM_INFO("Successfully bound to TM module\n"); - if(ipsec_add_listen_ifaces() != 0) { + ret = ipsec_add_listen_ifaces(); + if(ret != 0) { + LM_ERR("Failed to add ipsec listen interface. Code: %d", ret); return -1; } diff --git a/src/modules/ims_isc/ims_isc_mod.c b/src/modules/ims_isc/ims_isc_mod.c index e3a6e2f02..b222ada61 100644 --- a/src/modules/ims_isc/ims_isc_mod.c +++ b/src/modules/ims_isc/ims_isc_mod.c @@ -242,12 +242,10 @@ int isc_match_filter(struct sip_msg *msg, char *str1, udomain_t *d) //sometimes s is populated by an ims_getter method cscf_get_terminating_user that alloc memory that must be free-ed at the end int free_s = 0; - - //the callback from the Cx interface in case of unreg terminating initial message is a FAILURE_ROUTE. Hence we need an addl. flag - int firstflag = 0; + enum isc_mark_status status = 0; int ret = ISC_RETURN_FALSE; - isc_mark new_mark, old_mark; + isc_mark new_mark, old_mark, dummy_mark; enum dialog_direction dir = get_dialog_direction(str1); @@ -262,16 +260,27 @@ int isc_match_filter(struct sip_msg *msg, char *str1, udomain_t *d) /* starting or resuming? */ memset(&old_mark, 0, sizeof(isc_mark)); memset(&new_mark, 0, sizeof(isc_mark)); + memset(&dummy_mark, 0, sizeof(isc_mark)); + + if(is_route_type(FAILURE_ROUTE)) { + status |= ISCMARK_FAILURE; + } + if(isc_mark_get_from_msg(msg, &old_mark)) { LM_DBG("Message returned s=%d;h=%d;d=%d;a=%.*s\n", old_mark.skip, old_mark.handling, old_mark.direction, old_mark.aor.len, old_mark.aor.s); + } else if(is_route_type(FAILURE_ROUTE) + && isc_mark_get_from_lumps(msg, &dummy_mark)) { + LM_DBG("Message lumps returned s=%d;h=%d;d=%d;a=%.*s\n", + dummy_mark.skip, dummy_mark.handling, dummy_mark.direction, + dummy_mark.aor.len, dummy_mark.aor.s); } else { LM_DBG("Starting triggering\n"); - firstflag = 1; + status |= ISCMARK_MISSING; } - if(is_route_type(FAILURE_ROUTE) && !firstflag) { + if(status == ISCMARK_FOUND_LUMPS) { /* need to find the handling for the failed trigger */ if(dir == DLG_MOBILE_ORIGINATING) { k = cscf_get_originating_user(msg, &s); @@ -305,7 +314,7 @@ int isc_match_filter(struct sip_msg *msg, char *str1, udomain_t *d) } } struct cell *t = isc_tmb.t_gett(); - LM_CRIT("SKIP: %d\n", old_mark.skip); + LM_CRIT("SKIP after AS failure: %d\n", old_mark.skip); int index = old_mark.skip; for(k = 0; k < t->nr_of_outgoings; k++) { m = isc_checker_find(s, new_mark.direction, index, msg, @@ -374,7 +383,7 @@ int isc_match_filter(struct sip_msg *msg, char *str1, udomain_t *d) new_mark.skip = m->index + 1; new_mark.handling = m->default_handling; new_mark.aor = s; - ret = isc_forward(msg, m, &new_mark, firstflag); + ret = isc_forward(msg, m, &new_mark, status); isc_free_match(m); goto done; } @@ -415,7 +424,7 @@ int isc_match_filter(struct sip_msg *msg, char *str1, udomain_t *d) new_mark.skip = m->index + 1; new_mark.handling = m->default_handling; new_mark.aor = s; - ret = isc_forward(msg, m, &new_mark, firstflag); + ret = isc_forward(msg, m, &new_mark, status); isc_free_match(m); goto done; } @@ -430,6 +439,10 @@ done: if(old_mark.aor.s) pkg_free(old_mark.aor.s); + + if(dummy_mark.aor.s) + pkg_free(dummy_mark.aor.s); + return ret; } @@ -541,7 +554,8 @@ int isc_from_as(struct sip_msg *msg, char *str1, char *str2) cscf_get_terminating_user(msg, &s); //sometimes s is populated by an ims_getter method cscf_get_terminating_user that alloc memory that must be free-ed at the end free_s = 1; - if(memcmp(old_mark.aor.s, s.s, s.len) != 0) { + if(!old_mark.aor.s || !s.len + || memcmp(old_mark.aor.s, s.s, s.len) != 0) { LM_DBG("This is a new call....... RURI has been retargeted\n"); return ISC_RETURN_RETARGET; } diff --git a/src/modules/ims_isc/ims_isc_mod.h b/src/modules/ims_isc/ims_isc_mod.h index 7520a3989..ca393b313 100644 --- a/src/modules/ims_isc/ims_isc_mod.h +++ b/src/modules/ims_isc/ims_isc_mod.h @@ -77,6 +77,29 @@ enum dialog_direction /** Unknown */ }; +/* Method of obtaining isc_mark +First bit -> 0=REQUEST_ROUTE/1=FAILURE_ROUTE +Second bit -> 0=Found/1=Missing +*/ +enum isc_mark_status +{ + ISCMARK_FOUND_ROUTE_HEADER = + 0, /*Request has been received from AS, old ISCMARK found in Route header field*/ + ISCMARK_FOUND_LUMPS = + 1, /*Request to AS has been rejected or timed out, old ISCMARK found in lumps*/ + ISCMARK_MISSING_START_TRIGGERING = + 2, /*Request has been received without old ISCMARK in Route header field*/ + ISCMARK_MISSING_START_TRIGGERING_SAR = + 3 /*SAR/SAA has happened with HSS, due to terminating request (no old ISCMARK)*/ +}; + +/* ISCMARK Status bits*/ + +/* ISCMARK is obtained in failure route*/ +#define ISCMARK_FAILURE (1 << 0) +/* ISCMARK could not be found */ +#define ISCMARK_MISSING (1 << 1) + /* Various constants */ /** User Not Registered */ #define IMS_USER_NOT_REGISTERED 0 diff --git a/src/modules/ims_isc/isc.c b/src/modules/ims_isc/isc.c index 08d5654c2..bb358a37b 100644 --- a/src/modules/ims_isc/isc.c +++ b/src/modules/ims_isc/isc.c @@ -54,10 +54,11 @@ * @param msg - the SIP message * @param m - the isc_match that matched with info about where to forward it * @param mark - the isc_mark that should be used to mark the message + * @param status - the state of the isc_mark * @returns #ISC_RETURN_TRUE if OK, #ISC_RETURN_ERROR if not */ -int isc_forward( - struct sip_msg *msg, isc_match *m, isc_mark *mark, int firstflag) +int isc_forward(struct sip_msg *msg, isc_match *m, isc_mark *mark, + enum isc_mark_status status) { struct cell *t; unsigned int hash, label; @@ -78,7 +79,7 @@ int isc_forward( msg->dst_uri.s[msg->dst_uri.len] = '\0'; /* append branch if last trigger failed */ - if(is_route_type(FAILURE_ROUTE) && !firstflag) + if(status == ISCMARK_FOUND_LUMPS) append_branch(msg, &(msg->first_line.u.request.uri), &(msg->dst_uri), 0, Q_UNSPECIFIED, 0, 0, 0, 0, 0, 0); diff --git a/src/modules/ims_isc/isc.h b/src/modules/ims_isc/isc.h index f7c15288a..237ff53de 100644 --- a/src/modules/ims_isc/isc.h +++ b/src/modules/ims_isc/isc.h @@ -68,8 +68,8 @@ extern int isc_fr_inv_timeout; /**< default ISC INVITE response timeout in ms */ /** SIP Status Code to send to client on Session Termination because AS did not respond */ -int isc_forward( - struct sip_msg *msg, isc_match *m, isc_mark *mark, int firstflag); +int isc_forward(struct sip_msg *msg, isc_match *m, isc_mark *mark, + enum isc_mark_status status); #endif diff --git a/src/modules/ims_isc/mark.c b/src/modules/ims_isc/mark.c index 46e4fd056..bc7bac401 100644 --- a/src/modules/ims_isc/mark.c +++ b/src/modules/ims_isc/mark.c @@ -128,6 +128,45 @@ int isc_mark_get_from_msg(struct sip_msg *msg, isc_mark *mark) return 0; } +/** + * Retrieves the mark from the lumps of a message (failure route). + * - the marking should be in a header like described before + * @param msg - SIP mesage to mark + * @param mark - mark to load into + * @returns 1 if found, 0 if not + */ +int isc_mark_get_from_lumps(struct sip_msg *msg, isc_mark *mark) +{ + struct lump *lmp, *tmp; + str found = {0, 0}; + + LM_DBG("isc_mark_get_from_lumps: Trying to get the mark from the add_rm " + "lumps \n"); + + memset(mark, 0, sizeof(isc_mark)); + + parse_headers(msg, HDR_EOH_F, 0); + + anchor_lump(msg, msg->headers->name.s - msg->buf, 0, 0); + + lmp = msg->add_rm; + while(lmp) { + tmp = lmp->before; + if(tmp && tmp->op == LUMP_ADD && tmp->u.value + && (found.s = strstr(tmp->u.value, ISC_MARK_USERNAME))) { + LM_DBG("ifc_get_from_lumps: Found lump %s\n", tmp->u.value); + found.len = tmp->len - (found.s - tmp->u.value); + LM_DBG("ifc_get_from_lumps: take fraction of lump ...%.*s\n", + found.len, found.s); + isc_mark_get(found, mark); + return 1; + } + lmp = lmp->next; + } + + return 0; +} + /** * Load the mark from a string. * @param x - string with the mark, as found in the Route header @@ -140,12 +179,12 @@ void isc_mark_get(str x, isc_mark *mark) if(mark->aor.s) pkg_free(mark->aor.s); mark->aor = aor_hex; - for(i = 0; i < x.len && x.s[i] != ';'; i++) + for(i = 0; i < x.len && x.s[i] != ';' && x.s[i] != '>'; i++) ; - while(i < x.len) { + while(i < x.len && x.s[i] != '>') { if(x.s[i + 1] == '=') { k = 0; - for(j = i + 2; j < x.len && x.s[j] != ';'; j++) + for(j = i + 2; j < x.len && x.s[j] != ';' && x.s[j] != '>'; j++) k = k * 10 + (x.s[j] - '0'); switch(x.s[i]) { case 's': @@ -160,7 +199,8 @@ void isc_mark_get(str x, isc_mark *mark) case 'a': aor_hex.s = x.s + i + 2; aor_hex.len = 0; - for(j = i + 2; j < x.len && x.s[j] != ';'; j++) + for(j = i + 2; j < x.len && x.s[j] != ';' && x.s[j] != '>'; + j++) aor_hex.len++; mark->aor.len = aor_hex.len / 2; mark->aor.s = pkg_malloc(mark->aor.len); @@ -177,6 +217,9 @@ void isc_mark_get(str x, isc_mark *mark) LM_ERR("isc_mark_get: unknown parameter found: %c !\n", x.s[i]); } + + if(x.s[j] == '>') + break; i = j + 1; } else i++; diff --git a/src/modules/ims_isc/mark.h b/src/modules/ims_isc/mark.h index 59578f3b4..b00032dfe 100644 --- a/src/modules/ims_isc/mark.h +++ b/src/modules/ims_isc/mark.h @@ -72,6 +72,7 @@ typedef struct _isc_mark int isc_mark_get_from_msg(struct sip_msg *msg, isc_mark *mark); +int isc_mark_get_from_lumps(struct sip_msg *msg, isc_mark *mark); void isc_mark_get(str x, isc_mark *mark); int base16_to_bin(char *from, int len, char *to); int isc_mark_drop_route(struct sip_msg *msg); diff --git a/src/modules/ims_registrar_pcscf/save.c b/src/modules/ims_registrar_pcscf/save.c index 679abc99c..025cb78a5 100644 --- a/src/modules/ims_registrar_pcscf/save.c +++ b/src/modules/ims_registrar_pcscf/save.c @@ -289,7 +289,7 @@ static inline int update_contacts(struct sip_msg *req, struct sip_msg *rpl, LM_DBG("Error subscribing for contact\n"); } - // After successful registration try to unregister all callbacks for pending contacts ralated to this contact. + // After successful registration try to unregister all callbacks for pending contacts related to this contact. ul.unreg_pending_contacts_cb( _d, pcontact, PCSCF_CONTACT_EXPIRE); } diff --git a/src/modules/ims_registrar_scscf/config.c b/src/modules/ims_registrar_scscf/config.c index a01b4185f..e4a2b5b5a 100644 --- a/src/modules/ims_registrar_scscf/config.c +++ b/src/modules/ims_registrar_scscf/config.c @@ -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; diff --git a/src/modules/ims_registrar_scscf/ims_registrar_scscf_mod.c b/src/modules/ims_registrar_scscf/ims_registrar_scscf_mod.c index 714ae5715..3a671cdfe 100644 --- a/src/modules/ims_registrar_scscf/ims_registrar_scscf_mod.c +++ b/src/modules/ims_registrar_scscf/ims_registrar_scscf_mod.c @@ -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}, diff --git a/src/modules/ims_registrar_scscf/save.c b/src/modules/ims_registrar_scscf/save.c index 3520f9d9a..d79532870 100644 --- a/src/modules/ims_registrar_scscf/save.c +++ b/src/modules/ims_registrar_scscf/save.c @@ -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: diff --git a/src/modules/ims_usrloc_pcscf/README b/src/modules/ims_usrloc_pcscf/README index 636994061..b20e7c82a 100644 --- a/src/modules/ims_usrloc_pcscf/README +++ b/src/modules/ims_usrloc_pcscf/README @@ -31,7 +31,7 @@ Carsten Bock 3.1. hash_size (int) 3.2. timer_interval (int) - 3.3. db_url (int) + 3.3. db_url (string) 3.4. db_mode (int) 3.5. match_contact_host_port (int) 3.6. expires_grace (int) @@ -75,7 +75,7 @@ Chapter 1. Admin Guide 3.1. hash_size (int) 3.2. timer_interval (int) - 3.3. db_url (int) + 3.3. db_url (string) 3.4. db_mode (int) 3.5. match_contact_host_port (int) 3.6. expires_grace (int) @@ -100,6 +100,7 @@ Chapter 1. Admin Guide very different to that of std. SIP and as a result we have built this new module. A lot of the design has been borrowed from the std. usrloc module. For example. An IMS contact, in PCSCF, needs things like: + * Diameter Rx session for signalling bearer status. i.e. this is effectively QoS from the network to make sure the signalling link can be 'trusted' @@ -128,7 +129,7 @@ Chapter 1. Admin Guide 3.1. hash_size (int) 3.2. timer_interval (int) - 3.3. db_url (int) + 3.3. db_url (string) 3.4. db_mode (int) 3.5. match_contact_host_port (int) 3.6. expires_grace (int) @@ -160,16 +161,16 @@ modparam("ims_usrloc_pcscf", "hash_size", 10) modparam("ims_usrloc_pcscf", "timer_interval", 30) ... -3.3. db_url (int) +3.3. db_url (string) - Database URL + Database URL. Default value is "mysql://kamailio:kamailiorw@localhost/kamailio". Example 1.3. Set db_url parameter ... -modparam("ims_usrloc_pcscf", "db_url", - "dbdriver://username:password@dbhost/dbname") +modparam("ims_usrloc_pcscf", "db_url", "dbdriver://username:password@dbhost/dbna +me") ... 3.4. db_mode (int) diff --git a/src/modules/ims_usrloc_pcscf/doc/ims_usrloc_pcscf_admin.xml b/src/modules/ims_usrloc_pcscf/doc/ims_usrloc_pcscf_admin.xml index 72c67afbc..8240670ae 100644 --- a/src/modules/ims_usrloc_pcscf/doc/ims_usrloc_pcscf_admin.xml +++ b/src/modules/ims_usrloc_pcscf/doc/ims_usrloc_pcscf_admin.xml @@ -19,7 +19,8 @@ module. A lot of the design has been borrowed from the std. usrloc module. For example. An IMS contact, in PCSCF, needs things like: - + + Diameter Rx session for signalling bearer status. i.e. this is effectively QoS from the network to make sure the signalling link @@ -35,7 +36,8 @@ IMPU, each contact can have a number of associated public identities (IMPU). - + +
@@ -45,11 +47,14 @@ &kamailio; Modules The following modules must be loaded before this module: - + - None. + + None. + - + +
@@ -57,94 +62,104 @@ The following libraries or applications must be installed before running &kamailio; with this module loaded: - - None. - - -
+ + + None. + + + + + -
- Parameters +
+ Parameters -
- hash_size (int) +
+ hash_size (int) - The number of entries of the hash table used by to store the + The number of entries of the hash table used by to store the contact records is 2^hash_size. For hash_size=4, the number of entries of the hash table is 16. - Default value is 9. + + Default value is 9. + - - Set <varname>hash_size</varname> parameter + + Set <varname>hash_size</varname> parameter - ... + +... modparam("ims_usrloc_pcscf", "hash_size", 10) ... - - -
+ + +
-
- timer_interval (int) +
+ timer_interval (int) - Number of seconds between two timer runs. The module uses timer to + Number of seconds between two timer runs. The module uses timer to delete expired contacts. - Default value is 60. + + Default value is 60. + - - Set timer_interval parameter + + Set timer_interval parameter - ... + +... modparam("ims_usrloc_pcscf", "timer_interval", 30) ... - - -
+ + +
-
- db_url (int) +
+ <varname>db_url</varname> (string) - Database URL + Database URL. - Default value is - "&defaultdb;". + + Default value is "&defaultdb;". + - - Set db_url parameter + + Set db_url parameter - ... -modparam("ims_usrloc_pcscf", "db_url", - "&exampledb;") + ... - - -
+modparam("ims_usrloc_pcscf", "db_url", "&exampledb;") +... + + +
-
- db_mode (int) +
+ db_mode (int) - This is the database mode to be used for the PCSCF usrloc data + This is the database mode to be used for the PCSCF usrloc data persistent storage. Currently this module supports the Write-Through scheme only. - - - 0 - This disables DB mode. Only memory will be used for usrloc + + + 0 - This disables DB mode. Only memory will be used for usrloc and data will not survive a restart. - + - - 1 - Write-Through Scheme. All changes to usrloc are + + 1 - Write-Through Scheme. All changes to usrloc are immediately reflected in the database. This is slow but very reliable. This mode will ensure that no registration data is lost as a result of a restart or crash. - + - - 3 - DB_ONLY Scheme. All changes to usrloc are immediately + + 3 - DB_ONLY Scheme. All changes to usrloc are immediately reflected in the database and additionally PCSCF usrloc data are downloaded from db and inserted into PCSCF usrloc cache if required - i.e. If contact data cannot be found in cache a db @@ -154,72 +169,81 @@ modparam("ims_usrloc_pcscf", "db_url", in table location. This mode will ensure that no registration data is lost as a result of a restart or crash. - + - + - Default value is 0. + + Default value is 0. + - - Set db_mode parameter + + Set db_mode parameter - ... + +... modparam("ims_usrloc_pcscf", "db_mode", 1) ... - - -
+ + +
-
- match_contact_host_port (int) +
+ match_contact_host_port (int) - If set to 1 (default), the contact is matched using only host + If set to 1 (default), the contact is matched using only host and port in the contact URI. - - - 0 - When matching contact do full contact match procedure. - + + + 0 - When matching contact do full contact match procedure. + - - 1 - When matching contact compare only host and port of the contact URI. - - + + 1 - When matching contact compare only host and port of the contact URI. + + - Default value is 1. + + Default value is 1. + - - Set match_contact_host_port parameter + + Set match_contact_host_port parameter - ... + +... modparam("ims_usrloc_pcscf", "match_contact_host_port", 0) ... - - -
+ + +
-
- expires_grace (int) +
+ expires_grace (int) - Specify a grace time for keeping the contacts until they are finally deleted. + Specify a grace time for keeping the contacts until they are finally deleted. The value of the parameter is defined in seconds. - Default value is 3600. + + Default value is 3600. + - - Set expires_grace parameter + + Set expires_grace parameter - ... + +... modparam("ims_usrloc_pcscf", "expires_grace", 1800) ... - - -
+ + +
-
- audit_expired_pcontacts_interval (int) +
+ audit_expired_pcontacts_interval (int) - Number of seconds between two audit runs. + Number of seconds between two audit runs. Note: audit is used for db_mode DB_ONLY (3) only. The module uses this audit to delete expired contacts found in db table location which are expired @@ -227,81 +251,86 @@ modparam("ims_usrloc_pcscf", "expires_grace", 1800) Such expired contacts in location may appear when these contacts are not present in usrloc cache because PCSCF crashed before contact expiry. - + - Default value is 60. + + Default value is 60. + - - Set audit_expired_pcontacts_interval parameter + + Set audit_expired_pcontacts_interval parameter - ... + +... modparam("ims_usrloc_pcscf", "audit_expired_pcontacts_interval", 120) ... - - -
+ + +
-
- audit_expired_pcontacts_timeout (int) +
+ audit_expired_pcontacts_timeout (int) - Number of seconds the contacts must be already expired before the audit + Number of seconds the contacts must be already expired before the audit starts working on them. It is recommended to set only values greater than the Default value 40. The module uses this audit to delete expired contacts found in db table location which are expired at least as many seconds as the sum of this timeout parameter value plus the value of the expires_grace parameter. - + - Default value is 40. + + Default value is 40. + - - Set audit_expired_pcontacts_timeout parameter + + Set audit_expired_pcontacts_timeout parameter - ... + +... modparam("ims_usrloc_pcscf", "audit_expired_pcontacts_timeout", 120) ... - - -
- + +
-
- RPC Commands +
- exported RPC commands. +
+ RPC Commands -
- ulpcscf.status + exported RPC commands. - Status of pcscf_usrloc, AORs, max slots, etc. -
+
+ ulpcscf.status + + Status of pcscf_usrloc, AORs, max slots, etc.
+
-
- Statistics +
+ Statistics - Exported statistics are listed in the next sections. + Exported statistics are listed in the next sections. -
- registered contacts +
+ registered contacts - Number of AOR contacts in registered state - cannot be + Number of AOR contacts in registered state - cannot be reset. -
+
-
- impus +
+ impus - Number of IMPUs - cannot be reset. -
+ Number of IMPUs - cannot be reset. +
-
- expired contacts +
+ expired contacts - Number of expired contacts - can be reset. -
+ Number of expired contacts - can be reset.
+
- diff --git a/src/modules/ims_usrloc_pcscf/pcontact.c b/src/modules/ims_usrloc_pcscf/pcontact.c index e06bde36a..b58b942af 100644 --- a/src/modules/ims_usrloc_pcscf/pcontact.c +++ b/src/modules/ims_usrloc_pcscf/pcontact.c @@ -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", diff --git a/src/modules/ims_usrloc_pcscf/pcontact.h b/src/modules/ims_usrloc_pcscf/pcontact.h index 68423128d..598ce8984 100644 --- a/src/modules/ims_usrloc_pcscf/pcontact.h +++ b/src/modules/ims_usrloc_pcscf/pcontact.h @@ -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( diff --git a/src/modules/ims_usrloc_pcscf/udomain.c b/src/modules/ims_usrloc_pcscf/udomain.c index 3c754a6f1..e1756f4df 100644 --- a/src/modules/ims_usrloc_pcscf/udomain.c +++ b/src/modules/ims_usrloc_pcscf/udomain.c @@ -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; } diff --git a/src/modules/ims_usrloc_pcscf/usrloc_db.h b/src/modules/ims_usrloc_pcscf/usrloc_db.h index 3c50c153b..688387b1b 100644 --- a/src/modules/ims_usrloc_pcscf/usrloc_db.h +++ b/src/modules/ims_usrloc_pcscf/usrloc_db.h @@ -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); diff --git a/src/modules/influxdbc/ic.c b/src/modules/influxdbc/ic.c index dc493619f..9868442dd 100644 --- a/src/modules/influxdbc/ic.c +++ b/src/modules/influxdbc/ic.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include diff --git a/src/modules/janssonrpcc/janssonrpc_server.c b/src/modules/janssonrpcc/janssonrpc_server.c index 3fb4d7c62..5a98a6fc1 100644 --- a/src/modules/janssonrpcc/janssonrpc_server.c +++ b/src/modules/janssonrpcc/janssonrpc_server.c @@ -130,6 +130,7 @@ int jsonrpc_parse_server(char *server_s, jsonrpc_server_group_t **group_ptr) param_t *pit = NULL; param_t *freeme = NULL; str conn; + conn.s = NULL; str addr; addr.s = NULL; str srv; diff --git a/src/modules/janssonrpcc/janssonrpc_srv.c b/src/modules/janssonrpcc/janssonrpc_srv.c index 73eb25ce6..9b7ac31c0 100644 --- a/src/modules/janssonrpcc/janssonrpc_srv.c +++ b/src/modules/janssonrpcc/janssonrpc_srv.c @@ -90,6 +90,7 @@ int refresh_srv(jsonrpc_srv_t *srv_obj) srv_record = (struct srv_rdata *)l->rdata; if(srv_record == NULL) { free_rdata_list(head); + free_server_list(new_servers); ERR("BUG: null rdata\n"); return -1; } diff --git a/src/modules/jsonrpcc/netstring.c b/src/modules/jsonrpcc/netstring.c index bf7294ceb..9328a4621 100644 --- a/src/modules/jsonrpcc/netstring.c +++ b/src/modules/jsonrpcc/netstring.c @@ -35,11 +35,13 @@ int netstring_read_fd(int fd, char **netstring) { int i, bytes; size_t len = 0; + size_t read_len = 0; + char buffer[10] = {0}; + char *buffer2 = NULL; + int x; *netstring = NULL; - char buffer[10] = {0}; - /* Peek at first 10 bytes, to get length and colon */ bytes = recv(fd, buffer, 10, MSG_PEEK); @@ -68,8 +70,8 @@ int netstring_read_fd(int fd, char **netstring) return NETSTRING_ERROR_NO_COLON; /* Read the whole string from the buffer */ - size_t read_len = i + len + 1; - char *buffer2 = pkg_malloc(read_len); + read_len = i + len + 1; + buffer2 = pkg_malloc(read_len); if(!buffer2) { LM_ERR("Out of memory!"); return -1; @@ -77,17 +79,19 @@ int netstring_read_fd(int fd, char **netstring) bytes = recv(fd, buffer2, read_len, 0); /* Make sure we got the whole netstring */ - if(read_len > bytes) + if(read_len > bytes) { + pkg_free(buffer2); return NETSTRING_ERROR_TOO_SHORT; + } /* Test for the trailing comma */ - if(buffer2[read_len - 1] != ',') + if(buffer2[read_len - 1] != ',') { + pkg_free(buffer2); return NETSTRING_ERROR_NO_COMMA; + } buffer2[read_len - 1] = '\0'; - int x; - for(x = 0; x <= read_len - i - 1; x++) { buffer2[x] = buffer2[x + i]; } diff --git a/src/modules/jsonrpcs/README b/src/modules/jsonrpcs/README index d4aa520a5..1e14cf89a 100644 --- a/src/modules/jsonrpcs/README +++ b/src/modules/jsonrpcs/README @@ -421,6 +421,8 @@ event_route[xhttp:request] { ... jsonrpc_exec('{"jsonrpc": "2.0", "method": "dispatcher.reload", "id": 1}'); xlog("jsonrpc response code: $jsonrpl(code) - the body is: $jsonrpl(body)\n"); +jsonrpc_exec('{"jsonrpc": "2.0", "method": "corex.debug", "params": [ 2 ], "id": + 1}'); ... 6. JSONRPC Commands diff --git a/src/modules/jsonrpcs/doc/jsonrpcs_admin.xml b/src/modules/jsonrpcs/doc/jsonrpcs_admin.xml index ab8aee4fc..f16cac7a7 100644 --- a/src/modules/jsonrpcs/doc/jsonrpcs_admin.xml +++ b/src/modules/jsonrpcs/doc/jsonrpcs_admin.xml @@ -495,6 +495,7 @@ event_route[xhttp:request] { ... jsonrpc_exec('{"jsonrpc": "2.0", "method": "dispatcher.reload", "id": 1}'); xlog("jsonrpc response code: $jsonrpl(code) - the body is: $jsonrpl(body)\n"); +jsonrpc_exec('{"jsonrpc": "2.0", "method": "corex.debug", "params": [ 2 ], "id": 1}'); ... diff --git a/src/modules/jwt/jwt_mod.c b/src/modules/jwt/jwt_mod.c index 0efb793c4..90d8fa5bd 100644 --- a/src/modules/jwt/jwt_mod.c +++ b/src/modules/jwt/jwt_mod.c @@ -437,6 +437,7 @@ static int ki_jwt_verify_key( jwt_valid_t *jwt_valid = NULL; str sparams = STR_NULL; long lval = 0; + unsigned int jwtret = 0; if(key == NULL || key->s == NULL || alg == NULL || alg->s == NULL || claims == NULL || claims->s == NULL || claims->len <= 0 @@ -498,12 +499,13 @@ 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) { + if((jwtret = jwt_validate(jwt, jwt_valid)) != JWT_VALIDATION_SUCCESS) { _jwt_verify_status = jwt_valid_get_status(jwt_valid); - LM_ERR("failed to validate jwt: %08x\n", _jwt_verify_status); + LM_ERR("failed to validate jwt: %08x (ret: %08x)\n", _jwt_verify_status, + jwtret); goto error; } diff --git a/src/modules/kazoo/kazoo.c b/src/modules/kazoo/kazoo.c index 757fa2cdc..937d00014 100644 --- a/src/modules/kazoo/kazoo.c +++ b/src/modules/kazoo/kazoo.c @@ -150,12 +150,14 @@ static cmd_export_t cmds[] = { fixup_kz_amqp_free, ANY_ROUTE}, {"kazoo_publish", (cmd_function)kz_amqp_publish_ex, 4, fixup_kz_amqp, fixup_kz_amqp_free, ANY_ROUTE}, - {"kazoo_query", (cmd_function)kz_amqp_query, 4, fixup_kz_amqp, + + {"kazoo_query", (cmd_function)kz_amqp_query_3, 3, fixup_kz_amqp, fixup_kz_amqp_free, ANY_ROUTE}, - {"kazoo_query", (cmd_function)kz_amqp_query, 5, fixup_kz_amqp, + {"kazoo_query", (cmd_function)kz_amqp_query_4, 4, fixup_kz_amqp, fixup_kz_amqp_free, ANY_ROUTE}, - {"kazoo_query", (cmd_function)kz_amqp_query_ex, 3, fixup_kz_amqp, + {"kazoo_query", (cmd_function)kz_amqp_query_5, 5, fixup_kz_amqp, fixup_kz_amqp_free, ANY_ROUTE}, + {"kazoo_pua_publish", (cmd_function)kz_pua_publish, 1, 0, 0, ANY_ROUTE}, {"kazoo_pua_publish_mwi", (cmd_function)kz_pua_publish_mwi, 1, 0, 0, ANY_ROUTE}, @@ -168,8 +170,6 @@ static cmd_export_t cmds[] = { fixup_kz_amqp4_free, ANY_ROUTE}, {"kazoo_subscribe", (cmd_function)kz_amqp_subscribe_simple, 4, fixup_kz_amqp4, fixup_kz_amqp4_free, ANY_ROUTE}, - - {"kazoo_json", (cmd_function)kz_json_get_field, 3, fixup_kz_json, fixup_kz_json_free, ANY_ROUTE}, {"kazoo_json_keys", (cmd_function)kz_json_get_keys, 3, fixup_kz_json, @@ -368,7 +368,7 @@ static int mod_init(void) } kz_worker_pipes_fds = - (int *)shm_malloc(sizeof(int) * (dbk_consumer_workers)*2); + (int *)shm_malloc(sizeof(int) * (dbk_consumer_workers) * 2); kz_worker_pipes = (int *)shm_malloc(sizeof(int) * dbk_consumer_workers); for(i = 0; i < dbk_consumer_workers; i++) { kz_worker_pipes_fds[i * 2] = kz_worker_pipes_fds[i * 2 + 1] = -1; diff --git a/src/modules/kazoo/kz_amqp.c b/src/modules/kazoo/kz_amqp.c index ed6961165..82e136791 100644 --- a/src/modules/kazoo/kz_amqp.c +++ b/src/modules/kazoo/kz_amqp.c @@ -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; @@ -1246,6 +1246,7 @@ int kz_amqp_pipe_send_receive(str *str_exchange, str *str_routing_key, cmd->headers = kz_amqp_str_dup(str_headers); } + cmd->timeout = *kz_timeout; if(cmd->payload == NULL || cmd->routing_key == NULL @@ -1637,18 +1638,60 @@ int kz_amqp_query_ex(struct sip_msg *msg, char *exchange, char *routing_key, return 1; }; -int kz_amqp_query(struct sip_msg *msg, char *exchange, char *routing_key, - char *payload, char *dst, char *headers) +int kz_amqp_query_3( + struct sip_msg *msg, char *exchange, char *routing_key, char *payload) { + /* This is a wrapper around the executer function, just for the sake of clarity*/ + int result = kz_amqp_query_ex(msg, exchange, routing_key, payload, NULL); + return result; +}; - pv_spec_t *dst_pv; - pv_value_t dst_val; +int kz_amqp_query_4(struct sip_msg *msg, char *exchange, char *routing_key, + char *payload, str *dst) +{ + int result = kz_amqp_query_ex(msg, exchange, routing_key, payload, NULL); + if(result == -1) + return result; + kz_set_pseudo_var(msg, dst); + return 1; +}; +int kz_amqp_query_5(struct sip_msg *msg, char *exchange, char *routing_key, + char *payload, str *dst, char *headers) +{ int result = kz_amqp_query_ex(msg, exchange, routing_key, payload, headers); if(result == -1) return result; - dst_pv = (pv_spec_t *)dst; + kz_set_pseudo_var(msg, dst); + return 1; +}; + +void kz_set_pseudo_var(struct sip_msg *msg, str *dst) +{ + pv_spec_t *pvresult = NULL; + pv_value_t dst_val; + + if(dst == NULL || dst->s == NULL || dst->len <= 0) { + LM_ERR("Destination pseudo-variable is empty \n"); + return; + } + + pvresult = pv_cache_get(dst); + + if(pvresult == NULL) { + LM_ERR("Failed to malloc destination pseudo-variable \n"); + return; + } + + if(pvresult->setf == NULL) { + LM_ERR("destination pseudo-variable is not writable: %.*s \n", dst->len, + dst->s); + return; + } + + memset(&dst_val, 0, sizeof(pv_value_t)); + if(last_payload_result != NULL) { dst_val.rs.s = last_payload_result; dst_val.rs.len = strlen(last_payload_result); @@ -1659,10 +1702,8 @@ int kz_amqp_query(struct sip_msg *msg, char *exchange, char *routing_key, dst_val.ri = 0; dst_val.flags = PV_VAL_NULL; } - dst_pv->setf(msg, &dst_pv->pvp, (int)EQ_T, &dst_val); - - return 1; -}; + pvresult->setf(msg, &pvresult->pvp, (int)EQ_T, &dst_val); +} void kz_amqp_queue_free(kz_amqp_queue_ptr queue) { diff --git a/src/modules/kazoo/kz_amqp.h b/src/modules/kazoo/kz_amqp.h index faca990f1..73ecf2d9f 100644 --- a/src/modules/kazoo/kz_amqp.h +++ b/src/modules/kazoo/kz_amqp.h @@ -310,10 +310,12 @@ int ki_kz_amqp_publish( sip_msg_t *msg, str *exchange, str *routing_key, str *payload); int ki_kz_amqp_publish_hdrs(sip_msg_t *msg, str *exchange, str *routing_key, str *payload, str *headers); -int kz_amqp_query(struct sip_msg *msg, char *exchange, char *routing_key, - char *payload, char *dst, char *headers); -int kz_amqp_query_ex(struct sip_msg *msg, char *exchange, char *routing_key, - char *payload, char *headers); +int kz_amqp_query_3( + struct sip_msg *msg, char *exchange, char *routing_key, char *payload); +int kz_amqp_query_4(struct sip_msg *msg, char *exchange, char *routing_key, + char *payload, str *dst); +int kz_amqp_query_5(struct sip_msg *msg, char *exchange, char *routing_key, + char *payload, str *dst, char *headers); int kz_amqp_subscribe(struct sip_msg *msg, char *payload); int ki_kz_amqp_subscribe(sip_msg_t *msg, str *payload); int kz_amqp_subscribe_simple(struct sip_msg *msg, char *exchange, @@ -327,6 +329,8 @@ int kz_amqp_async_query_ex(struct sip_msg *msg, char *_exchange, char *_routing_key, char *_payload, char *_cb_route, char *_err_route, char *_pub_flags); +void kz_set_pseudo_var(struct sip_msg *msg, str *dst); + //void kz_amqp_generic_consumer_loop(int child_no); void kz_amqp_manager_loop(int child_no); diff --git a/src/modules/keepalive/keepalive_core.c b/src/modules/keepalive/keepalive_core.c index b1b3581cb..4c8a186b6 100644 --- a/src/modules/keepalive/keepalive_core.c +++ b/src/modules/keepalive/keepalive_core.c @@ -210,9 +210,10 @@ int ka_str_copy(str *src, str *dest, char *prefix) return -1; } - if(prefix) - strncpy(dest->s, prefix, lp); - strncpy(dest->s + lp, src->s, src->len); + if(prefix) { + memcpy(dest->s, prefix, lp); + } + memcpy(dest->s + lp, src->s, src->len); dest->s[src->len + lp] = '\0'; dest->len = src->len + lp; diff --git a/src/modules/lcr/lcr_mod.c b/src/modules/lcr/lcr_mod.c index dac215a9e..bbd397d51 100644 --- a/src/modules/lcr/lcr_mod.c +++ b/src/modules/lcr/lcr_mod.c @@ -433,8 +433,10 @@ static void *pcre2_malloc(size_t size, void *ext) static void pcre2_free(void *ptr, void *ext) { - shm_free(ptr); - ptr = NULL; + if(ptr) { + shm_free(ptr); + ptr = NULL; + } } /* diff --git a/src/modules/ldap/ldap_mod.c b/src/modules/ldap/ldap_mod.c index de0e25b15..27d44b9d8 100644 --- a/src/modules/ldap/ldap_mod.c +++ b/src/modules/ldap/ldap_mod.c @@ -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) diff --git a/src/modules/lost/functions.c b/src/modules/lost/functions.c index 9495a6943..d2c0f0c84 100644 --- a/src/modules/lost/functions.c +++ b/src/modules/lost/functions.c @@ -382,8 +382,8 @@ int lost_held_function(struct sip_msg *_m, char *_con, char *_pidf, char *_url, if(doc == NULL) { LM_WARN("invalid xml document: [%.*s]\n", res.len, res.s); doc = xmlReadMemory(res.s, res.len, 0, NULL, - XML_PARSE_NOBLANKS | XML_PARSE_NONET | - XML_PARSE_NOCDATA | XML_PARSE_RECOVER); + XML_PARSE_NOBLANKS | XML_PARSE_NONET | XML_PARSE_NOCDATA + | XML_PARSE_RECOVER); if(doc == NULL) { LM_ERR("xml document recovery failed on: [%.*s]\n", res.len, res.s); goto err; @@ -705,8 +705,8 @@ int lost_held_dereference(struct sip_msg *_m, char *_url, char *_pidf, if(doc == NULL) { LM_WARN("invalid xml document: [%.*s]\n", res.len, res.s); doc = xmlReadMemory(res.s, res.len, 0, NULL, - XML_PARSE_NOBLANKS | XML_PARSE_NONET | - XML_PARSE_NOCDATA | XML_PARSE_RECOVER); + XML_PARSE_NOBLANKS | XML_PARSE_NONET | XML_PARSE_NOCDATA + | XML_PARSE_RECOVER); if(doc == NULL) { LM_ERR("xml document recovery failed on: [%.*s]\n", res.len, res.s); goto err; diff --git a/src/modules/lost/response.c b/src/modules/lost/response.c index bce9539e3..122ed467e 100644 --- a/src/modules/lost/response.c +++ b/src/modules/lost/response.c @@ -54,7 +54,7 @@ #include "utilities.h" #include "response.h" -/* +/* * is_http_laquot(search) * return 1 if true else 0 */ @@ -77,7 +77,7 @@ int is_http_laquot(char *search) return 0; } -/* +/* * is_https_laquot(search) * return 1 if true else 0 */ @@ -101,7 +101,7 @@ int is_https_laquot(char *search) return 0; } -/* +/* * is_http(search) * return 1 if true else 0 */ @@ -123,7 +123,7 @@ int is_http(char *search) return 0; } -/* +/* * is_https(search) * return 1 if true else 0 */ @@ -146,7 +146,7 @@ int is_https(char *search) return 0; } -/* +/* * is_cid_laquot(search) * return 1 if true else 0 */ @@ -168,7 +168,7 @@ int is_cid_laquot(char *search) return 0; } -/* +/* * is_cid(search) * return 1 if true else 0 */ @@ -189,7 +189,7 @@ int is_cid(char *search) return 0; } -/* +/* * is_urn(search) * return 1 if true else 0 */ @@ -612,7 +612,7 @@ void lost_free_findServiceResponse(p_lost_fsr_t *res) /* * lost_get_response_issue(node) - * parses response issue (errors, warnings) and writes + * parses response issue (errors, warnings) and writes * results to issue object */ p_lost_issue_t lost_get_response_issues(xmlNodePtr node) @@ -964,8 +964,8 @@ p_lost_fsr_t lost_parse_findServiceResponse(str ret) if(doc == NULL) { LM_ERR("invalid xml document: [%.*s]\n", ret.len, ret.s); doc = xmlReadMemory(ret.s, ret.len, 0, NULL, - XML_PARSE_NOBLANKS | XML_PARSE_NONET | - XML_PARSE_NOCDATA | XML_PARSE_RECOVER); + XML_PARSE_NOBLANKS | XML_PARSE_NONET | XML_PARSE_NOCDATA + | XML_PARSE_RECOVER); if(doc == NULL) { LM_ERR("xml document recovery failed on: [%.*s]\n", ret.len, ret.s); return NULL; @@ -1095,4 +1095,4 @@ int lost_check_HeldResponse(xmlNodePtr node) xmlFree(tmp); /* clean up */ return ret; -} \ No newline at end of file +} diff --git a/src/modules/lost/utilities.c b/src/modules/lost/utilities.c index 6e3d9c43f..5035185ef 100644 --- a/src/modules/lost/utilities.c +++ b/src/modules/lost/utilities.c @@ -906,9 +906,9 @@ p_lost_loc_t lost_parse_pidf(str pidf, str urn) if(doc == NULL) { LM_WARN("invalid xml (pidf-lo): [%.*s]\n", pidf.len, pidf.s); - doc = xmlReadMemory(pidf.s, pidf.len, 0, NULL, - XML_PARSE_NOBLANKS | XML_PARSE_NONET | - XML_PARSE_NOCDATA | XML_PARSE_RECOVER); + doc = xmlReadMemory(pidf.s, pidf.len, 0, NULL, + XML_PARSE_NOBLANKS | XML_PARSE_NONET | XML_PARSE_NOCDATA + | XML_PARSE_RECOVER); if(doc == NULL) { LM_ERR("xml (pidf-lo) recovery failed on: [%.*s]\n", pidf.len, pidf.s); @@ -1007,7 +1007,7 @@ int lost_check_3d(xmlNodePtr node) /* * lost_parse_geo(node, loc) - * parses locationResponse (pos|circle) and writes + * parses locationResponse (pos|circle) and writes * results to location object */ int lost_parse_geo(xmlNodePtr node, p_lost_loc_t loc) @@ -1047,7 +1047,7 @@ int lost_parse_geo(xmlNodePtr node, p_lost_loc_t loc) if(loc->latitude == NULL) goto err; - snprintf(loc->latitude, len, "%s", (char *)bufLat); + snprintf(loc->latitude, len + 1, "%s", (char *)bufLat); /* logitude */ len = strlen((char *)bufLon); @@ -1057,7 +1057,7 @@ int lost_parse_geo(xmlNodePtr node, p_lost_loc_t loc) goto err; } - snprintf(loc->longitude, len, "%s", (char *)bufLon); + snprintf(loc->longitude, len + 1, "%s", (char *)bufLon); /* altitude */ if(scan == 3) { @@ -1070,14 +1070,14 @@ int lost_parse_geo(xmlNodePtr node, p_lost_loc_t loc) pkg_free(loc->longitude); goto err; } - - snprintf(loc->altitude, len, "%s", (char *)bufAlt); + + snprintf(loc->altitude, len + 1, "%s", (char *)bufAlt); } /* geolocation */ len = strlen((char *)bufLat) + strlen((char *)bufLon) + 1; if((scan == 3) && (lost_geoloc_3d == 1)) { - len += strlen((char *)bufAlt); + len += strlen((char *)bufAlt) + 1; } loc->geodetic = (char *)pkg_malloc(len + 1); if(loc->geodetic == NULL) { @@ -1089,9 +1089,11 @@ int lost_parse_geo(xmlNodePtr node, p_lost_loc_t loc) } if((scan == 3) && (lost_geoloc_3d == 1)) { s_profile = LOST_PRO_GEO3D; - snprintf(loc->geodetic, len, "%s %s %s", (char *)bufLat, (char *)bufLon, (char *)bufAlt); + snprintf(loc->geodetic, len + 1, "%s %s %s", (char *)bufLat, + (char *)bufLon, (char *)bufAlt); } else { - snprintf(loc->geodetic, len, "%s %s", (char *)bufLat, (char *)bufLon); + snprintf(loc->geodetic, len + 1, "%s %s", (char *)bufLat, + (char *)bufLon); } /* find element */ @@ -1115,7 +1117,7 @@ err: /* * lost_xpath_location(doc, path, loc) - * performs xpath expression on locationResponse and writes + * performs xpath expression on locationResponse and writes * results (location-info child element) to location object */ int lost_xpath_location(xmlDocPtr doc, char *path, p_lost_loc_t loc) @@ -1185,7 +1187,7 @@ int lost_xpath_location(xmlDocPtr doc, char *path, p_lost_loc_t loc) cname = BAD_CAST cur->name; if(xmlStrcasecmp(cname, s_point) == 0) { if((lost_check_3d(cur) == 1) - && (lost_geoloc_3d == 1)) { + && (lost_geoloc_3d == 1)) { s_profile = LOST_PRO_GEO3D; selgeo = i; break; @@ -1202,15 +1204,15 @@ int lost_xpath_location(xmlDocPtr doc, char *path, p_lost_loc_t loc) break; } if((xmlStrcasecmp(cname, s_polygon) == 0) - || (xmlStrcasecmp(cname, s_ellipse) == 0) - || (xmlStrcasecmp(cname, s_arcband) == 0)) { + || (xmlStrcasecmp(cname, s_ellipse) == 0) + || (xmlStrcasecmp(cname, s_arcband) == 0)) { s_profile = LOST_PRO_GEO2D; selgeo = i; break; } if((xmlStrcasecmp(cname, s_sphere) == 0) - || (xmlStrcasecmp(cname, s_ellipsoid) == 0) - || (xmlStrcasecmp(cname, s_prism) == 0)) { + || (xmlStrcasecmp(cname, s_ellipsoid) == 0) + || (xmlStrcasecmp(cname, s_prism) == 0)) { if(lost_geoloc_3d == 1) { s_profile = LOST_PRO_GEO3D; selgeo = i; @@ -1417,7 +1419,6 @@ char *lost_held_post_request(int *lgth, long rtime, char *type) xmlNodePtr ptrLocationRequest = NULL; xmlNodePtr ptrLocationType = NULL; - xmlKeepBlanksDefault(1); *lgth = 0; /* @@ -1515,7 +1516,6 @@ char *lost_held_location_request(p_lost_held_t held, int *lgth) xmlNodePtr ptrLocationType = NULL; xmlNodePtr ptrDevice = NULL; - xmlKeepBlanksDefault(1); *lgth = 0; /* @@ -1668,8 +1668,6 @@ char *lost_find_service_request(p_lost_loc_t loc, p_lost_list_t path, int *lgth) xmlNodePtr ptrNode = NULL; xmlNodePtr ptrPath = NULL; - xmlKeepBlanksDefault(1); - *lgth = 0; /* diff --git a/src/modules/lost/utilities.h b/src/modules/lost/utilities.h index c7f43cdf6..746b74736 100644 --- a/src/modules/lost/utilities.h +++ b/src/modules/lost/utilities.h @@ -97,7 +97,7 @@ typedef struct lost_loc char *geodetic; /* geodetic location (findServiceRequest) */ char *longitude; /* geo longitude */ char *latitude; /* geo latitude */ - char *altitude; /* geo altitude */ + char *altitude; /* geo altitude */ char *profile; /* location profile (findServiceRequest) */ int radius; /* geo radius (findServiceRequest) */ int recursive; /* recursion true|false (findServiceRequest)*/ diff --git a/src/modules/lrkproxy/lrkproxy_hash.c b/src/modules/lrkproxy/lrkproxy_hash.c index dc0b365ee..7daeb6596 100644 --- a/src/modules/lrkproxy/lrkproxy_hash.c +++ b/src/modules/lrkproxy/lrkproxy_hash.c @@ -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 diff --git a/src/modules/microhttpd/microhttpd_mod.c b/src/modules/microhttpd/microhttpd_mod.c index f1ee8334b..3bfef79b0 100644 --- a/src/modules/microhttpd/microhttpd_mod.c +++ b/src/modules/microhttpd/microhttpd_mod.c @@ -176,6 +176,13 @@ static void mod_destroy(void) { } +typedef struct ksr_mhd_cstream +{ + int ctype; + int rcvmode; + str data; +} ksr_mhd_cstream_t; + typedef struct ksr_mhttpd_ctx { struct MHD_Connection *connection; @@ -359,7 +366,7 @@ static int ksr_mhttpd_send_reply( } response = MHD_create_response_from_buffer( - sbody->len, sbody->s, MHD_RESPMEM_PERSISTENT); + sbody->len, sbody->s, MHD_RESPMEM_MUST_COPY); if(response == NULL) { LM_ERR("failed to create the response\n"); return -1; @@ -371,6 +378,9 @@ static int ksr_mhttpd_send_reply( _ksr_mhttpd_ctx.connection, (unsigned int)rcode, response); MHD_destroy_response(response); + LM_DBG("queue response return: %d (%s)\n", ret, + (ret == MHD_YES) ? "YES" : "XYZ"); + return (ret == MHD_YES) ? 1 : -1; } @@ -433,23 +443,68 @@ static int fixup_mhttpd_send_reply(void **param, int param_no) } + static enum MHD_Result ksr_microhttpd_request(void *cls, struct MHD_Connection *connection, const char *url, const char *method, const char *version, const char *upload_data, size_t *upload_data_size, void **ptr) { - static int _first_callback; sr_kemi_eng_t *keng = NULL; str evname = str_init("microhttpd:request"); sip_msg_t *fmsg = NULL; run_act_ctx_t ctx; int rtb; + ksr_mhd_cstream_t *cstream = NULL; + + cstream = (ksr_mhd_cstream_t *)*ptr; + if(cstream == NULL) { + cstream = (ksr_mhd_cstream_t *)malloc(sizeof(ksr_mhd_cstream_t)); + if(cstream == NULL) { + LM_ERR("no more system memroy\n"); + return MHD_NO; + } + memset(cstream, 0, sizeof(ksr_mhd_cstream_t)); + *ptr = cstream; + } - if(&_first_callback != *ptr) { + if(cstream->rcvmode == 0) { + cstream->rcvmode = 1; /* the first time only the headers are valid, - do not respond in the first round... */ - *ptr = &_first_callback; + * do not respond in the first round */ return MHD_YES; + } else { + if(*upload_data_size != 0) { + char *buf = NULL; + int bsize = 0; + if(cstream->data.s != NULL) { + bsize = *upload_data_size + cstream->data.len + 1; + } else { + bsize = *upload_data_size + 1; + } + buf = (char *)malloc(sizeof(char) * bsize); + if(buf == NULL) { + if(cstream->data.s != NULL) { + free(cstream->data.s); + free(cstream); + *ptr = NULL; + return MHD_NO; + } + } + if(cstream->data.s != NULL) { + snprintf(buf, bsize, "%s%s", cstream->data.s, upload_data); + free(cstream->data.s); + } else { + snprintf(buf, bsize, "%s", upload_data); + } + cstream->data.s = buf; + cstream->data.len = bsize - 1; + *upload_data_size = 0; + return MHD_YES; + } else { + LM_DBG("incoming data: [%.*s]\n", + cstream->data.len <= 64 ? cstream->data.len : 64, + cstream->data.s); + } } *ptr = NULL; /* clear context pointer */ @@ -460,13 +515,19 @@ static enum MHD_Result ksr_microhttpd_request(void *cls, _ksr_mhttpd_ctx.url.len = strlen(_ksr_mhttpd_ctx.url.s); _ksr_mhttpd_ctx.httpversion.s = (char *)version; _ksr_mhttpd_ctx.httpversion.len = strlen(_ksr_mhttpd_ctx.httpversion.s); - if(*upload_data_size > 0) { - _ksr_mhttpd_ctx.data.s = (char *)upload_data; - _ksr_mhttpd_ctx.data.len = (int)(*upload_data_size); + if(_ksr_mhttpd_ctx.data.s != NULL) { + free(_ksr_mhttpd_ctx.data.s); + } + if(cstream->data.len > 0) { + if(_ksr_mhttpd_ctx.data.s != NULL) { + free(_ksr_mhttpd_ctx.data.s); + } + _ksr_mhttpd_ctx.data = cstream->data; } else { _ksr_mhttpd_ctx.data.s = NULL; _ksr_mhttpd_ctx.data.len = 0; } + free(cstream); _ksr_mhttpd_ctx.cinfo = MHD_get_connection_info( connection, MHD_CONNECTION_INFO_CLIENT_ADDRESS); _ksr_mhttpd_ctx.srcip.s = NULL; diff --git a/src/modules/msilo/msilo.c b/src/modules/msilo/msilo.c index 6cfa48b67..3ac06bdc6 100644 --- a/src/modules/msilo/msilo.c +++ b/src/modules/msilo/msilo.c @@ -181,13 +181,12 @@ static cmd_export_t cmds[] = { {"m_store", (cmd_function)m_store1, 0, 0, 0, REQUEST_ROUTE | FAILURE_ROUTE}, {"m_store", (cmd_function)m_store1, 1, fixup_spve_null, - 0, REQUEST_ROUTE | FAILURE_ROUTE}, + fixup_free_spve_null, REQUEST_ROUTE | FAILURE_ROUTE}, {"m_store_addrs", (cmd_function)m_store3, 3, fixup_spve_all, fixup_free_spve_all, REQUEST_ROUTE | FAILURE_ROUTE}, {"m_dump", (cmd_function)m_dump_2, 0, 0, 0, REQUEST_ROUTE}, - {"m_dump", (cmd_function)m_dump_2, 0, 0, 0, REQUEST_ROUTE}, {"m_dump", (cmd_function)m_dump_2, 1, fixup_spve_null, - 0, REQUEST_ROUTE}, + fixup_free_spve_null, REQUEST_ROUTE}, {"bind_msilo", (cmd_function)bind_msilo, 1, 0, 0, ANY_ROUTE}, {0, 0, 0, 0, 0, 0} }; diff --git a/src/modules/msrp/msrp_cmap.c b/src/modules/msrp/msrp_cmap.c index a1e79e844..072fe5f75 100644 --- a/src/modules/msrp/msrp_cmap.c +++ b/src/modules/msrp/msrp_cmap.c @@ -156,6 +156,7 @@ int msrp_cmap_save(msrp_frame_t *mf) char sbuf[MSRP_SBUF_SIZE]; str srcaddr; str srcsock; + str xhdrs; int msize; int expires; msrp_citem_t *it; @@ -172,16 +173,18 @@ int msrp_cmap_save(msrp_frame_t *mf) expires = msrp_auth_max_expires; if(expires < msrp_auth_min_expires) { LM_DBG("expires is lower than min value\n"); - srcaddr.len = snprintf(sbuf, MSRP_SBUF_SIZE, "Min-Expires: %d\r\n", + xhdrs.len = snprintf(sbuf, MSRP_SBUF_SIZE, "Min-Expires: %d\r\n", msrp_auth_min_expires); - msrp_reply(mf, &msrp_reply_423_code, &msrp_reply_423_text, &srcaddr); + xhdrs.s = sbuf; + msrp_reply(mf, &msrp_reply_423_code, &msrp_reply_423_text, &xhdrs); return -3; } if(expires > msrp_auth_max_expires) { LM_DBG("expires is greater than max value\n"); - srcaddr.len = snprintf(sbuf, MSRP_SBUF_SIZE, "Max-Expires: %d\r\n", + xhdrs.len = snprintf(sbuf, MSRP_SBUF_SIZE, "Max-Expires: %d\r\n", msrp_auth_max_expires); - msrp_reply(mf, &msrp_reply_423_code, &msrp_reply_423_text, &srcaddr); + xhdrs.s = sbuf; + msrp_reply(mf, &msrp_reply_423_code, &msrp_reply_423_text, &xhdrs); return -4; } if(msrp_frame_get_first_from_path(mf, &fpeer) < 0) { diff --git a/src/modules/nathelper/nathelper.c b/src/modules/nathelper/nathelper.c index 6e6d44ad7..999045578 100644 --- a/src/modules/nathelper/nathelper.c +++ b/src/modules/nathelper/nathelper.c @@ -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); @@ -1139,7 +1153,8 @@ static int ki_handle_ruri_alias_mode(struct sip_msg *msg, int mode) char buf[MAX_URI_SIZE], *val, *sep, *at, *next, *cur_uri, *rest, *port, *trans, *start; unsigned int len, rest_len, val_len, alias_len, proto_type, cur_uri_len, - ip_port_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"); @@ -1185,18 +1200,45 @@ static int ki_handle_ruri_alias_mode(struct sip_msg *msg, int mode) LM_ERR("no '~' in alias param value\n"); return -1; } + // IPv6 needs some [] added when composing a SIP URI, which further + // complicates this code. + ip_len = port - val; + for(i = 0; i < ip_len; i++) { + if(val[i] == ':') { + is_ipv6 = 1; + break; + } + } *(port++) = ':'; trans = memchr(port, 126 /* ~ */, val_len - (port - val)); if(trans == NULL) { LM_ERR("no second '~' in alias param value\n"); return -1; } + // Compose the URI in a buffer at = &(buf[0]); append_str(at, "sip:", 4); ip_port_len = trans - val; alias_len = _ksr_contact_salias.len + ip_port_len + 2 /* ~n */; - memcpy(at, val, ip_port_len); - at = at + ip_port_len; + if(is_ipv6 && val[0] != '[') { + // IPv6 - add '[' ']' around IP + // then append ':' and copy the port + append_chr(at, '['); + memcpy(at, val, ip_len); + at = at + ip_len; + append_chr(at, ']'); + port_len = trans - port; + if(port_len > 0) { + append_chr(at, ':'); + memcpy(at, port, port_len); + at = at + port_len; + } + } else { + // IPv4 - copy directly as is + // separator '~' between IP and port was changed to ':' + memcpy(at, val, ip_port_len); + at = at + ip_port_len; + } trans = trans + 1; if((ip_port_len + 2 > val_len) || (*trans == ';') || (*trans == '?')) { LM_ERR("no proto in alias param\n"); diff --git a/src/modules/ndb_mongodb/mongodb_client.c b/src/modules/ndb_mongodb/mongodb_client.c index 946eb6de1..6f4818a71 100644 --- a/src/modules/ndb_mongodb/mongodb_client.c +++ b/src/modules/ndb_mongodb/mongodb_client.c @@ -34,6 +34,12 @@ #include "mongodb_client.h" #include "api.h" +#if MONGOC_CHECK_VERSION(1, 29, 0) +#define _ksr_bson_as_json bson_as_legacy_extended_json +#else +#define _ksr_bson_as_json bson_as_json +#endif + static mongodbc_server_t *_mongodbc_srv_list = NULL; static mongodbc_reply_t *_mongodbc_rpl_list = NULL; @@ -246,14 +252,13 @@ int mongodbc_exec_cmd( mongoc_client_get_collection(rsrv->client, dname->s, cname->s); LM_DBG("trying to execute: [[%.*s]]\n", cmd->len, cmd->s); - c = cmd->s[cmd->len]; - cmd->s[cmd->len] = '\0'; + STR_VTOZ(cmd->s[cmd->len], c); if(!bson_init_from_json(&command, cmd->s, cmd->len, &error)) { cmd->s[cmd->len] = c; LM_ERR("Failed to run command: %s\n", error.message); goto error_exec; } - cmd->s[cmd->len] = c; + STR_ZTOV(cmd->s[cmd->len], c); if(emode == 0) { ret = mongoc_collection_command_simple( rpl->collection, &command, NULL, &reply, &error); @@ -263,13 +268,29 @@ int mongodbc_exec_cmd( goto error_exec; } bson_destroy(&command); - rpl->jsonrpl.s = bson_as_json(&reply, NULL); + rpl->jsonrpl.s = _ksr_bson_as_json(&reply, NULL); rpl->jsonrpl.len = (rpl->jsonrpl.s) ? strlen(rpl->jsonrpl.s) : 0; bson_destroy(&reply); } else { if(emode == 1) { +#if MONGOC_CHECK_VERSION(1, 29, 0) + opts = bson_new(); + ret = mongoc_collection_command_with_opts( + rpl->collection, &command, NULL, opts, &reply, &error); + bson_free(opts); + if(!ret) { + LM_ERR("Failed to run command: %s\n", error.message); + bson_destroy(&command); + goto error_exec; + } + rpl->jsonrpl.s = _ksr_bson_as_json(&reply, NULL); + rpl->jsonrpl.len = (rpl->jsonrpl.s) ? strlen(rpl->jsonrpl.s) : 0; + bson_destroy(&reply); + goto done; +#else rpl->cursor = mongoc_collection_command(rpl->collection, MONGOC_QUERY_NONE, 0, 0, 0, &command, NULL, 0); +#endif } else { #if MONGOC_CHECK_VERSION(1, 5, 0) if(emode == 3) @@ -303,10 +324,14 @@ int mongodbc_exec_cmd( } goto error_exec; } - rpl->jsonrpl.s = bson_as_json(cdoc, NULL); + rpl->jsonrpl.s = _ksr_bson_as_json(cdoc, NULL); rpl->jsonrpl.len = (rpl->jsonrpl.s) ? strlen(rpl->jsonrpl.s) : 0; } +#if MONGOC_CHECK_VERSION(1, 29, 0) +done: +#endif + LM_DBG("command result: [[%s]]\n", (rpl->jsonrpl.s) ? rpl->jsonrpl.s : ""); @@ -479,7 +504,7 @@ int mongodbc_next_reply(str *name) rpl->jsonrpl.s = NULL; rpl->jsonrpl.len = 0; } - rpl->jsonrpl.s = bson_as_json(cdoc, NULL); + rpl->jsonrpl.s = _ksr_bson_as_json(cdoc, NULL); rpl->jsonrpl.len = (rpl->jsonrpl.s) ? strlen(rpl->jsonrpl.s) : 0; LM_DBG("next cursor result: [[%s]]\n", (rpl->jsonrpl.s) ? rpl->jsonrpl.s : ""); diff --git a/src/modules/outbound/outbound_mod.c b/src/modules/outbound/outbound_mod.c index e5ed17126..2e1251e3a 100644 --- a/src/modules/outbound/outbound_mod.c +++ b/src/modules/outbound/outbound_mod.c @@ -59,29 +59,36 @@ static unsigned int ob_force_no_flag = (unsigned int)-1; static str ob_key = {0, 0}; static str flow_token_secret = {0, 0}; +/* clang-format off */ static cmd_export_t cmds[] = { - {"bind_ob", (cmd_function)bind_ob, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 0}}; + {"bind_ob", (cmd_function)bind_ob, 1, 0, 0, 0}, + {0, 0, 0, 0, 0, 0} +}; static param_export_t params[] = { - {"force_outbound_flag", PARAM_INT, &ob_force_flag}, - {"force_no_outbound_flag", PARAM_INT, &ob_force_no_flag}, - {"flow_token_secret", PARAM_STRING, &flow_token_secret}, {0, 0, 0}}; + {"force_outbound_flag", PARAM_INT, &ob_force_flag}, + {"force_no_outbound_flag", PARAM_INT, &ob_force_no_flag}, + {"flow_token_secret", PARAM_STR, &flow_token_secret}, + {0, 0, 0} +}; struct module_exports exports = { - "outbound", DEFAULT_DLFLAGS, /* dlopen flags */ - cmds, /* exported functions */ - params, /* exported parameters */ - 0, /* exported·RPC·methods */ - 0, /* exported pseudo-variables */ - 0, /* response·function */ - mod_init, /* module initialization function */ - 0, /* per-child initialization function */ - destroy /* destroy function */ + "outbound", + DEFAULT_DLFLAGS, /* dlopen flags */ + cmds, /* exported functions */ + params, /* exported parameters */ + 0, /* RPC method exports */ + 0, /* exported pseudo-variables */ + 0, /* response handling function */ + mod_init, /* module initialization function */ + 0, /* per-child init function */ + destroy /* module destroy function */ }; +/* clang-format on */ static void mod_init_openssl(void) { - if(flow_token_secret.s) { + if(flow_token_secret.s && flow_token_secret.len > 0) { assert(ob_key.len == SHA_DIGEST_LENGTH); LM_DBG("flow_token_secret mod param set. use persistent ob_key"); #if OPENSSL_VERSION_NUMBER < 0x030000000L diff --git a/src/modules/phonenum/phonenum_mod.c b/src/modules/phonenum/phonenum_mod.c index 5f0763509..c5eda4bdc 100644 --- a/src/modules/phonenum/phonenum_mod.c +++ b/src/modules/phonenum/phonenum_mod.c @@ -58,9 +58,9 @@ static pv_export_t mod_pvs[] = { static cmd_export_t cmds[]={ {"phonenum_match", (cmd_function)w_phonenum_match, 2, fixup_spve_spve, - 0, ANY_ROUTE}, + fixup_free_spve_spve, ANY_ROUTE}, {"phonenum_match_cn", (cmd_function)w_phonenum_match_cn, 3, fixup_spve_all, - 0, ANY_ROUTE}, + fixup_free_spve_all, ANY_ROUTE}, {0, 0, 0, 0, 0, 0} }; @@ -196,6 +196,11 @@ static sr_kemi_t sr_kemi_phonenum_exports[] = { { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } }, + { str_init("phonenum"), str_init("match_cn"), + SR_KEMIP_INT, phonenum_match_cn, + { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_STR, + SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } + }, { {0, 0}, {0, 0}, 0, NULL, { 0, 0, 0, 0, 0, 0 } } }; diff --git a/src/modules/pipelimit/pl_ht.h b/src/modules/pipelimit/pl_ht.h index 8ee6568ea..86eab1092 100644 --- a/src/modules/pipelimit/pl_ht.h +++ b/src/modules/pipelimit/pl_ht.h @@ -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; } diff --git a/src/modules/presence/notify.c b/src/modules/presence/notify.c index 9a8af778c..62554d179 100644 --- a/src/modules/presence/notify.c +++ b/src/modules/presence/notify.c @@ -1555,6 +1555,8 @@ int query_db_notify(str *pres_uri, pres_ev_t *event, subs_t *watcher_subs) subs_t *subs_array = NULL, *s = NULL; str *notify_body = NULL, *aux_body = NULL; int ret_code = -1; + int retOK = 0; + int retErr = 0; subs_array = get_subs_dialog(pres_uri, event, NULL); if(subs_array == NULL) { @@ -1584,7 +1586,9 @@ int query_db_notify(str *pres_uri, pres_ev_t *event, subs_t *watcher_subs) < 0) { LM_ERR("Could not send notify for [event]=%.*s\n", event->name.len, event->name.s); - goto done; + retErr++; + } else { + retOK++; } if(aux_body != NULL) { @@ -1597,7 +1601,10 @@ int query_db_notify(str *pres_uri, pres_ev_t *event, subs_t *watcher_subs) } } - ret_code = 1; + LM_DBG("sent ok: %d - err: %d\n", retOK, retErr); + if(retOK > 0) { + ret_code = 1; + } done: free_subs_list(subs_array, PKG_MEM_TYPE, 0); diff --git a/src/modules/presence/presence_dmq.c b/src/modules/presence/presence_dmq.c index 97c6f5831..2e2618738 100644 --- a/src/modules/presence/presence_dmq.c +++ b/src/modules/presence/presence_dmq.c @@ -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(); /** diff --git a/src/modules/pua/pua.c b/src/modules/pua/pua.c index e57183427..a53bfd839 100644 --- a/src/modules/pua/pua.c +++ b/src/modules/pua/pua.c @@ -1121,9 +1121,10 @@ static ua_pres_t *build_uppubl_cbparam(ua_pres_t *p) publ.pres_uri = p->pres_uri; publ.content_type = p->content_type; publ.id = p->id; - publ.expires = (p->desired_expires == 0) - ? -1 - : p->desired_expires - (int)time(NULL); + publ.expires = + (int)((p->desired_expires == 0) + ? -1 + : ((long)p->desired_expires - (long)time(NULL))); publ.flag = UPDATE_TYPE; publ.source_flag = p->flag; publ.event = p->event; diff --git a/src/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml b/src/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml index 8b49edb1a..cad923058 100644 --- a/src/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml +++ b/src/modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml @@ -233,7 +233,7 @@
Parameters -
+
<varname>include_callid</varname> (int) If this parameter is set, the optional call-id will be put into the @@ -252,7 +252,7 @@ modparam("pua_dialoginfo", "include_callid", 0)
-
+
<varname>include_tags</varname> (int) If this parameter is set, the local and remote tag will be put @@ -271,7 +271,7 @@ modparam("pua_dialoginfo", "include_tags", 0)
-
+
<varname>include_localremote</varname> (int) If this parameter is set, the optional local and remote elements @@ -291,7 +291,7 @@ modparam("pua_dialoginfo", "include_localremote", 0)
-
+
<varname>override_lifetime</varname> (int) The PUBLISH requests used to send the dialog-info contain an Expires header. @@ -314,7 +314,7 @@ modparam("pua_dialoginfo", "override_lifetime", 300)
-
+
<varname>include_req_uri</varname> (int) controls if R-URI is going to be used instead of To header value in @@ -333,7 +333,7 @@ modparam("pua_dialoginfo", "include_req_uri", 1)
-
+
<varname>caller_confirmed</varname> (int) Usually the dialog-info of the caller will be @@ -359,7 +359,7 @@ modparam("pua_dialoginfo", "caller_confirmed", 1)
-
+
<varname>send_publish_flag</varname> (int) This message flag indicates whether to send PUBLISH requests or not. @@ -378,7 +378,7 @@ modparam("pua_dialoginfo", "send_publish_flag", 8)
-
+
<varname>disable_caller_publish_flag</varname> (int) This message flag indicates whether to send caller (initiator) PUBLISH requests or not. @@ -397,7 +397,7 @@ modparam("pua_dialoginfo", "disable_caller_publish_flag", 9)
-
+
<varname>disable_callee_publish_flag</varname> (int) This message flag indicates whether to send callee (recipient) PUBLISH requests or not. @@ -416,7 +416,7 @@ modparam("pua_dialoginfo", "disable_callee_publish_flag", 10)
-
+
<varname>use_pubruri_avps</varname> (int) Get Publish R-Uri from avps (see corresponding avp params), not from request to/from uri. @@ -452,7 +452,7 @@ modparam("pua_dialoginfo", "refresh_pubruri_avps_flag", 11)
-
+
<varname>pubruri_caller_avp</varname> (str) If use_pubruri_avps is enabled, PUBLISH-requests reporting dialog-information about the caller (entity=caller) are sent using the value of the specified avp as R-Uri. @@ -472,7 +472,7 @@ modparam("pua_dialoginfo", "pubruri_caller_avp", "$avp(s:puburis_caller)")
-
+
<varname>pubruri_callee_avp</varname> (str) If use_pubruri_avps is enabled, PUBLISH-requests reporting dialog-information about the callee (entity=callee) are sent using the value of the specified avp as R-Uri. @@ -536,7 +536,7 @@ modparam("pua_dialoginfo", "pubruri_callee_dlg_var", "pubruri_callee")
-
+
<varname>callee_trying</varname> (int) If this parameter is set, a "Trying" state will be sent for both the @@ -555,70 +555,70 @@ modparam("pua_dialoginfo", "callee_trying", 1)
-
- <varname>caller_entity_when_publish_disabled</varname> (int) - - Must be a valid sip uri. - If this parameter is set, this uri is used as caller entity in - publish xml body if associated dialog has the flag - disable_caller_publish_flag set. - Note only the flag received on dialog creation is used to activate - this feature. - - - Default value is NULL. - - - Set <varname>caller_entity_when_publish_disabled</varname> parameter - +
+ <varname>caller_entity_when_publish_disabled</varname> (int) + + Must be a valid sip uri. + If this parameter is set, this uri is used as caller entity in + publish xml body if associated dialog has the flag + disable_caller_publish_flag set. + Note only the flag received on dialog creation is used to activate + this feature. + + + Default value is NULL. + + + Set <varname>caller_entity_when_publish_disabled</varname> parameter + ... modparam("pua_dialoginfo", "caller_entity_when_publish_disabled", "sip:caller@publish.disabled.com") ... - - -
- -
- <varname>callee_entity_when_publish_disabled</varname> (int) - - Must be a valid sip uri. - If this parameter is set, this uri is used as callee entity in - publish xml body if associated dialog has the flag - disable_callee_publish_flag set. - Note only the flag received on dialog creation is used to activate - this feature. - - - Default value is NULL. - - - Set <varname>callee_entity_when_publish_disabled</varname> parameter - + + +
+ +
+ <varname>callee_entity_when_publish_disabled</varname> (int) + + Must be a valid sip uri. + If this parameter is set, this uri is used as callee entity in + publish xml body if associated dialog has the flag + disable_callee_publish_flag set. + Note only the flag received on dialog creation is used to activate + this feature. + + + Default value is NULL. + + + Set <varname>callee_entity_when_publish_disabled</varname> parameter + ... modparam("pua_dialoginfo", "callee_entity_when_publish_disabled", "sip:callee@publish.disabled.com") ... - - -
- -
- <varname>publish_dialog_req_within</varname> (int) - - If this parameter is set to 1, subsequents requests received in dialog generate - corresponding publish request. - - - Default value is 1. - - - Set <varname>publish_dialog_req_within</varname> parameter - + + +
+ +
+ <varname>publish_dialog_req_within</varname> (int) + + If this parameter is set to 1, subsequents requests received in dialog generate + corresponding publish request. + + + Default value is 1. + + + Set <varname>publish_dialog_req_within</varname> parameter + ... modparam("pua_dialoginfo", "publish_dialog_req_within", 0) ... - - -
+
+
+
<varname>local_identity_dlg_var</varname> (str) @@ -639,24 +639,24 @@ modparam("pua_dialoginfo", "local_identity_dlg_var", "local_identity")
-
- <varname>attribute_display</varname> (int) - - If set to 1, the display name attribute is added with user part of the - URI for local and remote targets. - - - Default value is 0. - - - Set <varname>attribute_display</varname> parameter - +
+ <varname>attribute_display</varname> (int) + + If set to 1, the display name attribute is added with user part of the + URI for local and remote targets. + + + Default value is 0. + + + Set <varname>attribute_display</varname> parameter + ... modparam("pua_dialoginfo", "attribute_display", 1) ... - -
+
+
@@ -665,4 +665,3 @@ modparam("pua_dialoginfo", "attribute_display", 1)
- diff --git a/src/modules/pua_dialoginfo/pua_dialoginfo.c b/src/modules/pua_dialoginfo/pua_dialoginfo.c index c8a8a6f31..d1e704fbf 100644 --- a/src/modules/pua_dialoginfo/pua_dialoginfo.c +++ b/src/modules/pua_dialoginfo/pua_dialoginfo.c @@ -73,7 +73,7 @@ MODULE_VERSION */ /* #define PUA_DIALOGINFO_DEBUG 1 */ -pua_api_t pua; +pua_api_t _pua_api; struct dlg_binds dlg_api; @@ -117,48 +117,49 @@ send_publish_t pua_send_publish; static int mod_init(void); static int child_init(int rank); -static cmd_export_t cmds[] = {{0, 0, 0, 0, 0, 0}}; +/* clang-format off */ +static cmd_export_t cmds[] = { + {0, 0, 0, 0, 0, 0} +}; static param_export_t params[] = { - {"include_callid", INT_PARAM, &include_callid}, - {"include_localremote", INT_PARAM, &include_localremote}, - {"include_tags", INT_PARAM, &include_tags}, - {"override_lifetime", INT_PARAM, &override_lifetime}, - {"caller_confirmed", INT_PARAM, &caller_confirmed}, - {"include_req_uri", INT_PARAM, &include_req_uri}, - {"send_publish_flag", INT_PARAM, &send_publish_flag}, - {"use_pubruri_avps", INT_PARAM, &use_pubruri_avps}, - {"refresh_pubruri_avps_flag", INT_PARAM, &refresh_pubruri_avps_flag}, - {"pubruri_caller_avp", PARAM_STRING, &pubruri_caller_avp}, - {"pubruri_callee_avp", PARAM_STRING, &pubruri_callee_avp}, - {"pubruri_caller_dlg_var", PARAM_STR, &caller_dlg_var}, - {"pubruri_callee_dlg_var", PARAM_STR, &callee_dlg_var}, - {"local_identity_dlg_var", PARAM_STR, &local_identity_dlg_var}, - {"callee_trying", INT_PARAM, &callee_trying}, - {"disable_caller_publish_flag", INT_PARAM, - &disable_caller_publish_flag}, - {"disable_callee_publish_flag", INT_PARAM, - &disable_callee_publish_flag}, - {"caller_entity_when_publish_disabled", PARAM_STR, - &caller_entity_when_publish_disabled}, - {"callee_entity_when_publish_disabled", PARAM_STR, - &callee_entity_when_publish_disabled}, - {"publish_dialog_req_within", INT_PARAM, &publish_dialog_req_within}, - {"attribute_display", PARAM_INT, &puadinfo_attribute_display}, - {0, 0, 0}}; + {"include_callid", INT_PARAM, &include_callid}, + {"include_localremote", INT_PARAM, &include_localremote}, + {"include_tags", INT_PARAM, &include_tags}, + {"override_lifetime", INT_PARAM, &override_lifetime}, + {"caller_confirmed", INT_PARAM, &caller_confirmed}, + {"include_req_uri", INT_PARAM, &include_req_uri}, + {"send_publish_flag", INT_PARAM, &send_publish_flag}, + {"use_pubruri_avps", INT_PARAM, &use_pubruri_avps}, + {"refresh_pubruri_avps_flag", INT_PARAM, &refresh_pubruri_avps_flag}, + {"pubruri_caller_avp", PARAM_STRING, &pubruri_caller_avp}, + {"pubruri_callee_avp", PARAM_STRING, &pubruri_callee_avp}, + {"pubruri_caller_dlg_var", PARAM_STR, &caller_dlg_var}, + {"pubruri_callee_dlg_var", PARAM_STR, &callee_dlg_var}, + {"local_identity_dlg_var", PARAM_STR, &local_identity_dlg_var}, + {"callee_trying", INT_PARAM, &callee_trying}, + {"disable_caller_publish_flag", INT_PARAM, &disable_caller_publish_flag}, + {"disable_callee_publish_flag", INT_PARAM, &disable_callee_publish_flag}, + {"caller_entity_when_publish_disabled", PARAM_STR, &caller_entity_when_publish_disabled}, + {"callee_entity_when_publish_disabled", PARAM_STR, &callee_entity_when_publish_disabled}, + {"publish_dialog_req_within", INT_PARAM, &publish_dialog_req_within}, + {"attribute_display", PARAM_INT, &puadinfo_attribute_display}, + {0, 0, 0} +}; struct module_exports exports = { - "pua_dialoginfo", /* module name */ - DEFAULT_DLFLAGS, /* dlopen flags */ - cmds, /* exported functions */ - params, /* exported parameters */ - 0, /* RPC method exports */ - 0, /* exported pseudo-variables */ - 0, /* response handling function */ - mod_init, /* module initialization function */ - child_init, /* per-child init function */ - 0 /* module destroy function */ + "pua_dialoginfo", /* module name */ + DEFAULT_DLFLAGS, /* dlopen flags */ + cmds, /* exported functions */ + params, /* exported parameters */ + 0, /* RPC method exports */ + 0, /* exported pseudo-variables */ + 0, /* response handling function */ + mod_init, /* module initialization function */ + child_init, /* per-child init function */ + 0 /* module destroy function */ }; +/* clang-format on */ #ifdef PUA_DIALOGINFO_DEBUG @@ -1049,15 +1050,15 @@ static int mod_init(void) return -1; } - if(bind_pua(&pua) < 0) { + if(bind_pua(&_pua_api) < 0) { LM_ERR("Can't bind pua\n"); return -1; } - if(pua.send_publish == NULL) { + if(_pua_api.send_publish == NULL) { LM_ERR("Could not import send_publish\n"); return -1; } - pua_send_publish = pua.send_publish; + pua_send_publish = _pua_api.send_publish; /* bind to the dialog API */ if(load_dlg_api(&dlg_api) != 0) { diff --git a/src/modules/pua_reginfo/notify.c b/src/modules/pua_reginfo/notify.c index b7b6fb3fd..8bcf391c8 100644 --- a/src/modules/pua_reginfo/notify.c +++ b/src/modules/pua_reginfo/notify.c @@ -246,8 +246,10 @@ int process_body(str notify_body, udomain_t *domain) str received = {0, 0}; str path = {0, 0}; str user_agent = {0, 0}; - int state, event, expires, result, final_result = RESULT_ERROR; - char *expires_char, *cseq_char; + int event, expires, result; + int state = STATE_UNKNOWN, final_result = RESULT_ERROR; + char *expires_char = NULL, *cseq_char = NULL, *state_attr = NULL, + *event_attr = NULL, *param_name = NULL; int cseq = 0; int len; urecord_t *ul_record = NULL; @@ -274,8 +276,12 @@ int process_body(str notify_body, udomain_t *domain) /* Only process registration sub-items */ if(xmlStrcasecmp(registrations->name, BAD_CAST "registration") != 0) goto next_registration; - state = reginfo_parse_state( - xmlGetAttrContentByName(registrations, "state")); + state_attr = xmlGetAttrContentByName(registrations, "state"); + if(state_attr) { + state = reginfo_parse_state(state_attr); + xmlFree(state_attr); + state_attr = NULL; + } if(state == STATE_UNKNOWN) { LM_ERR("No state for this contact!\n"); goto next_registration; @@ -297,10 +303,10 @@ int process_body(str notify_body, udomain_t *domain) if(reginfo_use_domain) { aor_key.s = uri; + aor_key.len = strlen(uri); } else { - aor_key.s = parsed_aor.user.s; + aor_key = parsed_aor.user; } - aor_key.len = strlen(aor_key.s); /* Now let's lock that domain for this AOR: */ ul.lock_udomain(domain, &aor_key); /* and retrieve the user-record for this user: */ @@ -362,7 +368,14 @@ int process_body(str notify_body, udomain_t *domain) } else { received.len = strlen(received.s); } + /* safe to free as parameter is not further in use */ + if(received.s) { + xmlFree(received.s); + received.s = NULL; + received.len = 0; + } + /* future use */ path.s = xmlGetAttrContentByName(contacts, "path"); if(path.s == NULL) { LM_DBG("No path for this contact!\n"); @@ -370,6 +383,12 @@ int process_body(str notify_body, udomain_t *domain) } else { path.len = strlen(path.s); } + /* safe to free as parameter is not further in use */ + if(path.s) { + xmlFree(path.s); + path.s = NULL; + path.len = 0; + } user_agent.s = xmlGetAttrContentByName(contacts, "user_agent"); if(user_agent.s == NULL) { @@ -378,18 +397,30 @@ int process_body(str notify_body, udomain_t *domain) } else { user_agent.len = strlen(user_agent.s); } - event = reginfo_parse_event( - xmlGetAttrContentByName(contacts, "event")); - if(event == EVENT_UNKNOWN) { + /* safe to free as parameter is not further in use */ + if(user_agent.s) { + xmlFree(user_agent.s); + user_agent.s = NULL; + user_agent.len = 0; + } + + event_attr = xmlGetAttrContentByName(contacts, "event"); + if(event_attr == NULL) { LM_ERR("No event for this contact!\n"); goto next_contact; } + event = reginfo_parse_event(event_attr); + xmlFree(event_attr); + event_attr = NULL; + expires_char = xmlGetAttrContentByName(contacts, "expires"); if(expires_char == NULL) { LM_ERR("No expires for this contact!\n"); goto next_contact; } expires = atoi(expires_char); + xmlFree(expires_char); + expires_char = NULL; if(expires < 0) { LM_ERR("No valid expires for this contact!\n"); goto next_contact; @@ -402,6 +433,8 @@ int process_body(str notify_body, udomain_t *domain) LM_DBG("No cseq for this contact!\n"); } else { cseq = atoi(cseq_char); + xmlFree(cseq_char); + cseq_char = NULL; if(cseq < 0) { LM_WARN("No valid cseq for this contact!\n"); } @@ -417,12 +450,17 @@ int process_body(str notify_body, udomain_t *domain) if(xmlStrcasecmp(params->name, BAD_CAST "unknown-param") != 0) goto next_param; - len += 1 /* ; */ - + strlen(xmlGetAttrContentByName(params, "name")); + param_name = xmlGetAttrContentByName(params, "name"); + len += 1 /* ; */ + strlen(param_name); param.s = (char *)xmlNodeGetContent(params); param.len = strlen(param.s); if(param.len > 0) len += 1 /* = */ + param.len; + xmlFree(param_name); + param_name = NULL; + xmlFree(param.s); + param.s = NULL; + param.len = 0; next_param: params = params->next; } @@ -439,10 +477,10 @@ int process_body(str notify_body, udomain_t *domain) if(xmlStrcasecmp(params->name, BAD_CAST "unknown-param") != 0) goto next_param2; + param_name = xmlGetAttrContentByName(params, "name"); contact_params.len += snprintf( contact_params.s + contact_params.len, - len - contact_params.len, ";%s", - xmlGetAttrContentByName(params, "name")); + len - contact_params.len, ";%s", param_name); param.s = (char *)xmlNodeGetContent(params); param.len = strlen(param.s); if(param.len > 0) @@ -451,6 +489,11 @@ int process_body(str notify_body, udomain_t *domain) len - contact_params.len, "=%.*s", param.len, param.s); + xmlFree(param_name); + param_name = NULL; + xmlFree(param.s); + param.s = NULL; + param.len = 0; LM_DBG("Contact params are: %.*s\n", contact_params.len, contact_params.s); @@ -498,10 +541,18 @@ int process_body(str notify_body, udomain_t *domain) /* Process the result */ if(final_result != RESULT_CONTACTS_FOUND) final_result = result; + xmlFree(contact_uri.s); + contact_uri.s = NULL; + contact_uri.len = 0; next_uri: uris = uris->next; } next_contact: + if(callid.s) { + xmlFree(callid.s); + callid.s = NULL; + callid.len = 0; + } contacts = contacts->next; } } @@ -512,6 +563,16 @@ int process_body(str notify_body, udomain_t *domain) if(aor_key.len > 0) ul.unlock_udomain(domain, &aor_key); + if(callid.s) { + xmlFree(callid.s); + callid.s = NULL; + callid.len = 0; + } + if(aor.s) { + xmlFree(aor.s); + aor.s = NULL; + aor.len = 0; + } registrations = registrations->next; } error: diff --git a/src/modules/pv/pv_core.c b/src/modules/pv/pv_core.c index 2ea809339..86cce42dd 100644 --- a/src/modules/pv/pv_core.c +++ b/src/modules/pv/pv_core.c @@ -3515,13 +3515,37 @@ int pv_set_bflag( return 0; } +static inline int is_uri_enclosed(struct sip_msg *msg, struct to_body *tb) +{ + /* Check for the presence of display name */ + if(tb->display.len == 0) { + /* Display name not found */ + char *uri_body = tb->body.s; + + /* Assuming a valid sip message (true otherwise parser fails way before) + if it starts with '<' there is a respective '>'. + Also, parser trims any leading white space if no DisplayName is found + */ + if(uri_body[0] == '<') { + return 1; + } + return 0; + } + /* Display name found, URI should/must be enclosed */ + return 1; +} + int pv_set_xto_attr(struct sip_msg *msg, pv_param_t *param, int op, pv_value_t *val, struct to_body *tb, int type) { str buf = {0, 0}; + str buf_uri = {0, 0}; struct lump *l = NULL; int loffset = 0; + int loffset_uri = 0; int llen = 0; + int llen_uri = 0; + int is_enclosed = 0; if(msg == NULL || param == NULL) { LM_ERR("bad parameters\n"); @@ -3595,7 +3619,7 @@ int pv_set_xto_attr(struct sip_msg *msg, pv_param_t *param, int op, } buf.s = pkg_malloc(val->rs.len); if(buf.s == 0) { - LM_ERR("no more pkg mem\n"); + PKG_MEM_ERROR; goto error; } buf.len = val->rs.len; @@ -3627,6 +3651,29 @@ int pv_set_xto_attr(struct sip_msg *msg, pv_param_t *param, int op, } buf.len = val->rs.len; memcpy(buf.s, val->rs.s, val->rs.len); + + /* Check if the URI is enclosed in angle brackets */ + is_enclosed = is_uri_enclosed(msg, tb); + /* If uri is not enclosed, we need to enclose it in < > + before adding display name */ + if(!is_enclosed) { + LM_DBG("URI is not enclosed in angle brackets\n"); + /* Enclose URI in angle brackets */ + loffset_uri = tb->uri.s - msg->buf; + llen_uri = tb->uri.len; + /* Add angle brackets */ + buf_uri.s = pkg_malloc(tb->uri.len + 2); + if(buf_uri.s == 0) { + LM_ERR("no more pkg mem\n"); + goto error; + } + buf_uri.len = tb->uri.len + 2; + buf_uri.s[0] = '<'; + memcpy(buf_uri.s + 1, tb->uri.s, tb->uri.len); + buf_uri.s[buf_uri.len - 1] = '>'; + LM_DBG("URI after enclosing: %.*s\n", buf_uri.len, buf_uri.s); + } + if(tb->display.len == 0) { l = anchor_lump(msg, tb->body.s - msg->buf, 0, 0); buf.s[buf.len] = ' '; @@ -3656,6 +3703,24 @@ int pv_set_xto_attr(struct sip_msg *msg, pv_param_t *param, int op, if(buf.s != 0) pkg_free(buf.s); } + + if(llen_uri > 0) { + if((l = del_lump(msg, loffset_uri, llen_uri, 0)) == 0) { + LM_ERR("failed to delete xto attribute %d\n", type); + goto error; + } + } + /* set new value when given */ + if(l != NULL && buf_uri.len > 0) { + if(insert_new_lump_after(l, buf_uri.s, buf_uri.len, 0) == 0) { + LM_ERR("failed to set xto attribute %d\n", type); + goto error; + } + } else { + if(buf_uri.s != 0) + pkg_free(buf_uri.s); + } + return 0; error: diff --git a/src/modules/pv/pv_xavp.c b/src/modules/pv/pv_xavp.c index a64c5847d..5fa953da1 100644 --- a/src/modules/pv/pv_xavp.c +++ b/src/modules/pv/pv_xavp.c @@ -516,6 +516,10 @@ done: error: if(xname != NULL) { + if(xname->next != NULL) { + pkg_free(xname->next); + xname->next = NULL; + } pv_xavp_name_destroy(xname); pkg_free(xname); } @@ -953,6 +957,10 @@ done: error: if(xname != NULL) { + if(xname->next != NULL) { + pkg_free(xname->next); + xname->next = NULL; + } pv_xavu_name_destroy(xname); pkg_free(xname); } @@ -1100,6 +1108,10 @@ done: error: if(xname != NULL) { + if(xname->next != NULL) { + pkg_free(xname->next); + xname->next = NULL; + } pv_xavi_name_destroy(xname); pkg_free(xname); } diff --git a/src/modules/rabbitmq/rabbitmq.c b/src/modules/rabbitmq/rabbitmq.c index 8547bacac..9463d919d 100644 --- a/src/modules/rabbitmq/rabbitmq.c +++ b/src/modules/rabbitmq/rabbitmq.c @@ -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(); @@ -597,19 +601,22 @@ static int rabbitmq_connect(amqp_connection_state_t *conn) return RABBITMQ_ERR_SOCK; } - if(rmq_amqps_ca_file) { - if(amqp_ssl_socket_set_cacert(amqp_sock, rmq_amqps_ca_file)) { - LM_ERR("Failed to set CA certificate for amqps connection\n"); - return RABBITMQ_ERR_SSL_CACERT; + if(amqp_info.ssl) { // only valid for amqp_ssl_socket_t + if(rmq_amqps_ca_file) { + if(amqp_ssl_socket_set_cacert(amqp_sock, rmq_amqps_ca_file)) { + LM_ERR("Failed to set CA certificate for amqps connection\n"); + return RABBITMQ_ERR_SSL_CACERT; + } } - } #if AMQP_VERSION_MAJOR == 0 && AMQP_VERSION_MINOR < 8 - amqp_ssl_socket_set_verify(amqp_sock, (rmq_amqps_ca_file) ? 1 : 0); + amqp_ssl_socket_set_verify(amqp_sock, (rmq_amqps_ca_file) ? 1 : 0); #else - amqp_ssl_socket_set_verify_peer(amqp_sock, (rmq_amqps_ca_file) ? 1 : 0); - amqp_ssl_socket_set_verify_hostname(amqp_sock, (rmq_amqps_ca_file) ? 1 : 0); + amqp_ssl_socket_set_verify_peer(amqp_sock, (rmq_amqps_ca_file) ? 1 : 0); + amqp_ssl_socket_set_verify_hostname( + amqp_sock, (rmq_amqps_ca_file) ? 1 : 0); #endif + } ret = amqp_socket_open(amqp_sock, amqp_info.host, amqp_info.port); if(ret != AMQP_STATUS_OK) { diff --git a/src/modules/ratelimit/ratelimit.c b/src/modules/ratelimit/ratelimit.c index 5cac92464..295102bd0 100644 --- a/src/modules/ratelimit/ratelimit.c +++ b/src/modules/ratelimit/ratelimit.c @@ -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; } diff --git a/src/modules/regex/regex_mod.c b/src/modules/regex/regex_mod.c index 52ed60b29..f4e93e48a 100644 --- a/src/modules/regex/regex_mod.c +++ b/src/modules/regex/regex_mod.c @@ -170,8 +170,10 @@ static void *pcre2_malloc(size_t size, void *ext) static void pcre2_free(void *ptr, void *ext) { - shm_free(ptr); - ptr = NULL; + if(ptr) { + shm_free(ptr); + ptr = NULL; + } } /*! \brief diff --git a/src/modules/registrar/save.c b/src/modules/registrar/save.c index c94f56563..cc07ac711 100644 --- a/src/modules/registrar/save.c +++ b/src/modules/registrar/save.c @@ -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,9 +936,23 @@ int save(struct sip_msg *_m, udomain_t *_d, int _cflags, str *_uri) int novariation = 0; - u = parse_to_uri(_m); - if(u == NULL) - goto error; + 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; + } + } rerrno = R_FINE; ret = 1; @@ -1026,11 +1041,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 +1104,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 +1135,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 +1153,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: diff --git a/src/modules/rls/resource_notify.c b/src/modules/rls/resource_notify.c index c0b308a76..8fd388e46 100644 --- a/src/modules/rls/resource_notify.c +++ b/src/modules/rls/resource_notify.c @@ -179,8 +179,8 @@ static void send_notifies(db1_res_t *result, int did_col, int resource_uri_col, str bstr = {0, 0}; subs_t *dialog = NULL; int len_est = 0; - int resource_added = - 0; /* Flag to indicate that we have added at least one resource */ + /* Flag to indicate that we have added at least one resource */ + int resource_added = 0; /* generate the boundary string */ boundary_string = generate_string(BOUNDARY_STRING_LEN); @@ -245,7 +245,6 @@ static void send_notifies(db1_res_t *result, int did_col, int resource_uri_col, len_est += 2 * strlen(boundary_string) + 4 + 102 + 2 + 50 + strlen(resource_uri) + 20; buf_len = 0; - resource_added = 0; /* !!!! for now I will include the auth state without checking if * it has changed - > in future check if it works */ diff --git a/src/modules/rtpengine/README b/src/modules/rtpengine/README index da6751c42..63e2c0c9f 100644 --- a/src/modules/rtpengine/README +++ b/src/modules/rtpengine/README @@ -1036,7 +1036,7 @@ modparam("rtpengine", "media_duration", "$avp(MEDIA_DURATION)") There is no default value. - This value is filled in after invoking“rtpengine_delete”, + This value is filled in after invoking “rtpengine_delete”, “rtpengine_query”, or “rtpengine_manage” if the command resulted in a deletion of the call (or call branch). @@ -1117,7 +1117,7 @@ modparam("rtpengine", "mos_min_roundtrip_pv", "$avp(mos_min_roundtrip)") There is no default value. - This value is filled in after invoking“rtpengine_delete”, + This value is filled in after invoking “rtpengine_delete”, “rtpengine_query”, or “rtpengine_manage” if the command resulted in a deletion of the call (or call branch). @@ -1198,7 +1198,7 @@ modparam("rtpengine", "mos_max_roundtrip_pv", "$avp(mos_max_roundtrip)") There is no default value. - This value is filled in after invoking“rtpengine_delete”, + This value is filled in after invoking “rtpengine_delete”, “rtpengine_query”, or “rtpengine_manage” if the command resulted in a deletion of the call (or call branch). @@ -1277,7 +1277,10 @@ modparam("rtpengine", "mos_average_samples_pv", "$avp(mos_average_samples)") The name of a pseudovariable to hold a custom label used in rtpengine signalling. If set, all the statistics pseudovariables with the “_A” suffix will be filled in with statistics only from the call legs that - match the label given in this variable. + match the label given in this variable. You need to fill this variable + before invoking “rtpengine_delete”, “rtpengine_query”, or + “rtpengine_manage”. Variable value should match the label= flag on + “rtpengine_offer”, “rtpengine_answer”, or “rtpengine_manage”. There is no default value. @@ -1293,7 +1296,7 @@ modparam("rtpengine", "mos_A_label_pv", "$avp(mos_A_label)") There is no default value. - This value is filled in after invoking“rtpengine_delete”, + This value is filled in after invoking “rtpengine_delete”, “rtpengine_query”, or “rtpengine_manage” if the command resulted in a deletion of the call (or call branch). @@ -1410,7 +1413,7 @@ A)") There is no default value. - This value is filled in after invoking“rtpengine_delete”, + This value is filled in after invoking “rtpengine_delete”, “rtpengine_query”, or “rtpengine_manage” if the command resulted in a deletion of the call (or call branch). @@ -1527,7 +1530,7 @@ A)") There is no default value. - This value is filled in after invoking“rtpengine_delete”, + This value is filled in after invoking “rtpengine_delete”, “rtpengine_query”, or “rtpengine_manage” if the command resulted in a deletion of the call (or call branch). @@ -1643,7 +1646,10 @@ modparam("rtpengine", "mos_average_samples_A_pv", "$avp(mos_average_samples_A)") The name of a pseudovariable to hold a custom label used in rtpengine signalling. If set, all the statistics pseudovariables with the “_B” suffix will be filled in with statistics only from the call legs that - match the label given in this variable. + match the label given in this variable. You need to fill this variable + before invoking “rtpengine_delete”, “rtpengine_query”, or + “rtpengine_manage”. Variable value should match the label= flag on + “rtpengine_offer”, “rtpengine_answer”, or “rtpengine_manage”. There is no default value. @@ -1659,7 +1665,7 @@ modparam("rtpengine", "mos_B_label_pv", "$avp(mos_B_label)") There is no default value. - This value is filled in after invoking“rtpengine_delete”, + This value is filled in after invoking “rtpengine_delete”, “rtpengine_query”, or “rtpengine_manage” if the command resulted in a deletion of the call (or call branch). @@ -1776,7 +1782,7 @@ B)") There is no default value. - This value is filled in after invoking“rtpengine_delete”, + This value is filled in after invoking “rtpengine_delete”, “rtpengine_query”, or “rtpengine_manage” if the command resulted in a deletion of the call (or call branch). @@ -1893,7 +1899,7 @@ B)") There is no default value. - This value is filled in after invoking“rtpengine_delete”, + This value is filled in after invoking “rtpengine_delete”, “rtpengine_query”, or “rtpengine_manage” if the command resulted in a deletion of the call (or call branch). @@ -2424,33 +2430,36 @@ rtpengine_offer(); about this are found in the rtpengine README. + codec-except=... - same as codec-offer but preserves original order - + codec-mask=... - Similar to strip except that codecs listed + + codec-mask=... - similar to strip except that codecs listed here will still be accepted and used for transcoding on the offering side. Useful only in combination with codec-transcode. all keyword can be used to mask all offered codecs - + codec-accept=... - Similar to `mask` and `consume` but doesn't + + codec-accept=... - similar to `mask` and `consume` but doesn't remove the codec from the list of offered codecs. This means that a codec listed under `accept` will still be offered to the remote peer, but if the remote peer rejects it, it will still be accepted towards the original offerer and then used for transcoding. It is a more selective version of what the `always transcode` flag does. - + codec-consume=... - Identical to mask but enables the + + codec-consume=... - identical to mask but enables the transcoding engine even if no other transcoding related options are given. - + T.38=decode - If the offered SDP contains a media section + + T.38=decode - if the offered SDP contains a media section advertising T.38 over UDPTL, translate it to a regular audio media section over RTP. By default, PCMU and PCMA will be used as audio codecs, but that can be overridden using the codec options described above. Other transport protocols (e.g. SRTP) can also be selected in the same way. If the offered SDP does not contain a T.38 section, then this flag has no effect. - + T.38=force - Any audio media section (over RTP) in the offered + + T.38=force - any audio media section (over RTP) in the offered SDP will be translated into a T.38 section over UDPTL. - + T.38=stop - Stops a previously established T.38 to audio + + T.38=stop - stops a previously established T.38 to audio gateway and reverts the session back to media passthrough. This is useful when handling a rejected T.38 offer. + + label=... - adds a label to a current stream, that later can + be used to get call quality stats, see “mos_A_label_pv” and + “mos_B_label_pv” parameters. Check also the documentation of RTPEngine, these flags are documented there as well: https://github.com/sipwise/rtpengine. diff --git a/src/modules/rtpengine/doc/rtpengine_admin.xml b/src/modules/rtpengine/doc/rtpengine_admin.xml index adb3af92b..51a498233 100644 --- a/src/modules/rtpengine/doc/rtpengine_admin.xml +++ b/src/modules/rtpengine/doc/rtpengine_admin.xml @@ -767,7 +767,7 @@ modparam("rtpengine", "media_duration", "$avp(MEDIA_DURATION)") There is no default value. - This value is filled in after invokingrtpengine_delete, + This value is filled in after invoking rtpengine_delete, rtpengine_query, or rtpengine_manage if the command resulted in a deletion of the call (or call branch). @@ -889,7 +889,7 @@ modparam("rtpengine", "mos_min_roundtrip_pv", "$avp(mos_min_roundtrip)") There is no default value. - This value is filled in after invokingrtpengine_delete, + This value is filled in after invoking rtpengine_delete, rtpengine_query, or rtpengine_manage if the command resulted in a deletion of the call (or call branch). @@ -1010,7 +1010,7 @@ modparam("rtpengine", "mos_max_roundtrip_pv", "$avp(mos_max_roundtrip)") There is no default value. - This value is filled in after invokingrtpengine_delete, + This value is filled in after invoking rtpengine_delete, rtpengine_query, or rtpengine_manage if the command resulted in a deletion of the call (or call branch). @@ -1131,7 +1131,10 @@ modparam("rtpengine", "mos_average_samples_pv", "$avp(mos_average_samples)") If set, all the statistics pseudovariables with the _A suffix will be filled in with statistics only from the call legs that match the label given in this - variable. + variable. You need to fill this variable before invoking rtpengine_delete, + rtpengine_query, or rtpengine_manage. Variable value should match the + label= flag on rtpengine_offer, + rtpengine_answer, or rtpengine_manage. There is no default value. @@ -1157,7 +1160,7 @@ modparam("rtpengine", "mos_A_label_pv", "$avp(mos_A_label)") There is no default value. - This value is filled in after invokingrtpengine_delete, + This value is filled in after invoking rtpengine_delete, rtpengine_query, or rtpengine_manage if the command resulted in a deletion of the call (or call branch). @@ -1326,7 +1329,7 @@ modparam("rtpengine", "mos_min_roundtrip_leg_A_pv", "$avp(mos_min_roundtrip_leg_ There is no default value. - This value is filled in after invokingrtpengine_delete, + This value is filled in after invoking rtpengine_delete, rtpengine_query, or rtpengine_manage if the command resulted in a deletion of the call (or call branch). @@ -1495,7 +1498,7 @@ modparam("rtpengine", "mos_max_roundtrip_leg_A_pv", "$avp(mos_max_roundtrip_leg_ There is no default value. - This value is filled in after invokingrtpengine_delete, + This value is filled in after invoking rtpengine_delete, rtpengine_query, or rtpengine_manage if the command resulted in a deletion of the call (or call branch). @@ -1663,7 +1666,10 @@ modparam("rtpengine", "mos_average_samples_A_pv", "$avp(mos_average_samples_A)") If set, all the statistics pseudovariables with the _B suffix will be filled in with statistics only from the call legs that match the label given in this - variable. + variable. You need to fill this variable before invoking rtpengine_delete, + rtpengine_query, or rtpengine_manage. Variable value should match the + label= flag on rtpengine_offer, + rtpengine_answer, or rtpengine_manage. There is no default value. @@ -1689,7 +1695,7 @@ modparam("rtpengine", "mos_B_label_pv", "$avp(mos_B_label)") There is no default value. - This value is filled in after invokingrtpengine_delete, + This value is filled in after invoking rtpengine_delete, rtpengine_query, or rtpengine_manage if the command resulted in a deletion of the call (or call branch). @@ -1859,7 +1865,7 @@ modparam("rtpengine", "mos_min_roundtrip_leg_B_pv", "$avp(mos_min_roundtrip_leg_ There is no default value. - This value is filled in after invokingrtpengine_delete, + This value is filled in after invoking rtpengine_delete, rtpengine_query, or rtpengine_manage if the command resulted in a deletion of the call (or call branch). @@ -2028,7 +2034,7 @@ modparam("rtpengine", "mos_max_roundtrip_leg_B_pv", "$avp(mos_max_roundtrip_leg_ There is no default value. - This value is filled in after invokingrtpengine_delete, + This value is filled in after invoking rtpengine_delete, rtpengine_query, or rtpengine_manage if the command resulted in a deletion of the call (or call branch). @@ -2755,13 +2761,13 @@ rtpengine_offer(); - codec-mask=... - Similar to strip except that codecs listed here will still be accepted + codec-mask=... - similar to strip except that codecs listed here will still be accepted and used for transcoding on the offering side. Useful only in combination with codec-transcode. all keyword can be used to mask all offered codecs - codec-accept=... - Similar to `mask` and `consume` but doesn't remove the codec from the list of + codec-accept=... - similar to `mask` and `consume` but doesn't remove the codec from the list of offered codecs. This means that a codec listed under `accept` will still be offered to the remote peer, but if the remote peer rejects it, it will still be accepted towards the original offerer and then used for transcoding. It is a more selective @@ -2769,27 +2775,35 @@ rtpengine_offer(); - codec-consume=... - Identical to mask but enables the transcoding engine even if no other transcoding + codec-consume=... - identical to mask but enables the transcoding engine even if no other transcoding related options are given. - T.38=decode - If the offered &sdp; contains a media section + T.38=decode - if the offered &sdp; contains a media section advertising T.38 over UDPTL, translate it to a regular audio media section over RTP. By default, PCMU and PCMA will be used as audio codecs, but that can be overridden using the codec options described above. Other transport protocols (e.g. SRTP) can also be selected in the same way. If the offered &sdp; does not contain a T.38 section, then this flag has no effect. + - T.38=force - Any audio media section (over RTP) in the + T.38=force - any audio media section (over RTP) in the offered &sdp; will be translated into a T.38 section over UDPTL. + - T.38=stop - Stops a previously established T.38 to audio + T.38=stop - stops a previously established T.38 to audio gateway and reverts the session back to media passthrough. This is useful when handling a rejected T.38 offer. + + + label=... - adds a label to a current stream, that later + can be used to get call quality stats, see mos_A_label_pv + and mos_B_label_pv parameters. + Check also the documentation of RTPEngine, these flags are documented there as well: diff --git a/src/modules/sanity/sanity.c b/src/modules/sanity/sanity.c index fa3d04938..44765f7a1 100644 --- a/src/modules/sanity/sanity.c +++ b/src/modules/sanity/sanity.c @@ -625,7 +625,11 @@ int check_cl(sip_msg_t *msg) } LM_DBG("check_cl passed\n"); } else { - LM_WARN("content length header missing in request\n"); + if(msg->rcv.proto != PROTO_UDP && msg->rcv.proto != PROTO_SCTP) { + LM_WARN("content length header missing in request\n"); + } else { + LM_DBG("content length header missing in request\n"); + } } return SANITY_CHECK_PASSED; diff --git a/src/modules/sca/sca_call_info.c b/src/modules/sca/sca_call_info.c index 2694239cb..ed1a47de7 100644 --- a/src/modules/sca/sca_call_info.c +++ b/src/modules/sca/sca_call_info.c @@ -614,6 +614,7 @@ int sca_call_info_seize_held_call(sip_msg_t *msg, sca_call_info *call_info, anchor = anchor_lump(msg, msg->eoh - msg->buf, 0, HDR_OTHER_T); if(anchor == NULL) { LM_ERR("Failed to anchor lump\n"); + pkg_free(replaces_hdr.s); goto done; } @@ -637,7 +638,6 @@ int sca_call_info_seize_held_call(sip_msg_t *msg, sca_call_info *call_info, // we restore the original owner and dialog. if(sca_appearance_update_owner_unsafe(app, contact_uri) < 0) { LM_ERR("sca_call_info_seize_held_call: failed to update owner\n"); - pkg_free(replaces_hdr.s); goto done; } diff --git a/src/modules/sca/sca_subscribe.c b/src/modules/sca/sca_subscribe.c index 895141e1e..9e212f01e 100644 --- a/src/modules/sca/sca_subscribe.c +++ b/src/modules/sca/sca_subscribe.c @@ -1306,8 +1306,7 @@ int ki_sca_handle_subscribe(sip_msg_t *msg) released = sca_appearance_owner_release_all( &req_sub.target_aor, &req_sub.subscriber); if(released) { - LM_INFO("sca_handle_subscribe: released %d appearances " - "for subscriber %.*s\n", + LM_INFO("released %d appearances for subscriber %.*s\n", released, STR_FMT(&req_sub.subscriber)); } } diff --git a/src/modules/seas/ha.c b/src/modules/seas/ha.c index 6134f3d37..53759afd9 100644 --- a/src/modules/seas/ha.c +++ b/src/modules/seas/ha.c @@ -154,7 +154,7 @@ static inline int parse_ping( } string++; } - if(!(ping_period_s && pings_lost_s && ping_timeout_s)) { + if(!(pings_lost_s && ping_timeout_s)) { LM_ERR("malformed ping config string. Unparseable :[%s]\n", string); return -1; } diff --git a/src/modules/secsipid/README b/src/modules/secsipid/README index 5883eaa10..53e8e86c3 100644 --- a/src/modules/secsipid/README +++ b/src/modules/secsipid/README @@ -472,12 +472,9 @@ request_route { The module needs "secsipdi_proc.so" module that depends on "libsecsipid", which is a component of "sipsecidx" project from https://github.com/asipto/secsipidx/. The library is implemented in Go - language, with generated C API and library. Until the libsecsipid is - going to be packaged in OS distributions, the secsipid_proc module can - be compiled by copying secsipid.h libsecsipid.h and libsecsipid.a files - in the folder of the module. + language, with generated C API and library. - To generate the libsecsipid.a file, it requires to have Go language + To generate the libsecsipid files, it requires to have Go language installed and its environment configured, then run the following commands: @@ -486,9 +483,8 @@ request_route { export GO111MODULE=off go get https://github.com/asipto/secsipidx cd $GOPATH/src/github.com/asipto/secsipidx/csecsipid/ -make liba -cp secsipid.h libsecsipid.h libsecsipid.a \ - /path/to/kamailio/src/modules/secsipid_proc/ +make all +make install cd /path/to/kamailio/ make include_modules="secsipid secsipid_proc ..." cfg diff --git a/src/modules/secsipid/doc/secsipid_admin.xml b/src/modules/secsipid/doc/secsipid_admin.xml index 7ea74f525..647afb0da 100644 --- a/src/modules/secsipid/doc/secsipid_admin.xml +++ b/src/modules/secsipid/doc/secsipid_admin.xml @@ -503,13 +503,10 @@ request_route { The module needs "secsipdi_proc.so" module that depends on "libsecsipid", which is a component of "sipsecidx" project from https://github.com/asipto/secsipidx/. The library is - implemented in Go language, with generated C API and library. Until the - libsecsipid is going to be packaged in OS distributions, the secsipid_proc - module can be compiled by copying secsipid.h libsecsipid.h and libsecsipid.a - files in the folder of the module. + implemented in Go language, with generated C API and library. - To generate the libsecsipid.a file, it requires to have Go language + To generate the libsecsipid files, it requires to have Go language installed and its environment configured, then run the following commands: @@ -519,9 +516,8 @@ request_route { export GO111MODULE=off go get https://github.com/asipto/secsipidx cd $GOPATH/src/github.com/asipto/secsipidx/csecsipid/ -make liba -cp secsipid.h libsecsipid.h libsecsipid.a \ - /path/to/kamailio/src/modules/secsipid_proc/ +make all +make install cd /path/to/kamailio/ make include_modules="secsipid secsipid_proc ..." cfg diff --git a/src/modules/sipcapture/hep.c b/src/modules/sipcapture/hep.c index db7ea912e..3485f330a 100644 --- a/src/modules/sipcapture/hep.c +++ b/src/modules/sipcapture/hep.c @@ -21,6 +21,8 @@ * */ +#include + #include "../../core/sr_module.h" #include "../../core/dprint.h" #include "../../core/events.h" diff --git a/src/modules/siprepo/README b/src/modules/siprepo/README index b355395f3..a0143a266 100644 --- a/src/modules/siprepo/README +++ b/src/modules/siprepo/README @@ -48,7 +48,7 @@ Daniel-Constantin Mierla 1.6. sr_msg_pull() usage 1.7. sr_msg_async_pull() usage 1.8. sr_msg_rm() usage - 1.9. sr_msg_checkj() usage + 1.9. sr_msg_check() usage Chapter 1. Admin Guide @@ -228,7 +228,7 @@ request_route { This function can be used from ANY_ROUTE. - Example 1.9. sr_msg_checkj() usage + Example 1.9. sr_msg_check() usage ... request_route { ... diff --git a/src/modules/siprepo/doc/siprepo_admin.xml b/src/modules/siprepo/doc/siprepo_admin.xml index 306eaf701..80ed13920 100644 --- a/src/modules/siprepo/doc/siprepo_admin.xml +++ b/src/modules/siprepo/doc/siprepo_admin.xml @@ -245,7 +245,7 @@ request_route { This function can be used from ANY_ROUTE. - <function>sr_msg_checkj()</function> usage + <function>sr_msg_check()</function> usage ... request_route { diff --git a/src/modules/siprepo/siprepo_data.c b/src/modules/siprepo/siprepo_data.c index 397def720..2720c50c2 100644 --- a/src/modules/siprepo/siprepo_data.c +++ b/src/modules/siprepo/siprepo_data.c @@ -496,15 +496,15 @@ int siprepo_msg_async_pull(str *callid, str *msgid, str *gname, str *rname, return -1; } stp->callid.s = (char*)stp + ROUND_POINTER(sizeof(siprepo_task_param_t)); - memcpy(callid->s, stp->callid.s, callid->len); + memcpy(stp->callid.s, callid->s, callid->len); stp->callid.len = callid->len; stp->msgid.s = stp->callid.s + ROUND_POINTER(callid->len + 1); - memcpy(msgid->s, stp->msgid.s, msgid->len); + memcpy(stp->msgid.s, msgid->s, msgid->len); stp->msgid.len = msgid->len; stp->rname.s = stp->msgid.s + ROUND_POINTER(msgid->len + 1); - memcpy(rname->s, stp->rname.s, rname->len); + memcpy(stp->rname.s, rname->s, rname->len); stp->rname.len = rname->len; stp->rmode = rmode; diff --git a/src/modules/siprepo/siprepo_mod.c b/src/modules/siprepo/siprepo_mod.c index d8f8b02c5..e6acc2336 100644 --- a/src/modules/siprepo/siprepo_mod.c +++ b/src/modules/siprepo/siprepo_mod.c @@ -58,6 +58,8 @@ static int w_sr_msg_check(sip_msg_t *msg, char *p1, char *p2); static void siprepo_timer_exec(unsigned int ticks, int worker, void *param); +static int fixup_sr_msg_async_pull(void **param, int param_no); + /* clang-format off */ typedef struct sworker_task_param { char *buf; @@ -69,10 +71,10 @@ typedef struct sworker_task_param { static cmd_export_t cmds[]={ {"sr_msg_push", (cmd_function)w_sr_msg_push, 2, fixup_spve_igp, fixup_free_spve_null, REQUEST_ROUTE|CORE_ONREPLY_ROUTE}, - {"sr_msg_pull", (cmd_function)w_sr_msg_pull, 3, fixup_spve_all, - fixup_free_spve_all, REQUEST_ROUTE|CORE_ONREPLY_ROUTE}, - {"sr_msg_async_pull", (cmd_function)w_sr_msg_async_pull, 5, fixup_spve_all, - fixup_free_spve_all, ANY_ROUTE}, + {"sr_msg_pull", (cmd_function)w_sr_msg_pull, 4, fixup_sssi, + fixup_free_sssi, REQUEST_ROUTE|CORE_ONREPLY_ROUTE}, + {"sr_msg_async_pull", (cmd_function)w_sr_msg_async_pull, 5, fixup_sr_msg_async_pull, + 0, ANY_ROUTE}, {"sr_msg_rm", (cmd_function)w_sr_msg_rm, 2, fixup_spve_spve, fixup_free_spve_spve, REQUEST_ROUTE|CORE_ONREPLY_ROUTE}, {"sr_msg_check", (cmd_function)w_sr_msg_check, 0, 0, @@ -282,6 +284,15 @@ static int w_sr_msg_async_pull(sip_msg_t *msg, char *pcallid, char *pmsgid, } +static int fixup_sr_msg_async_pull(void **param, int param_no) +{ + if(param_no >= 1 && param_no <= 4) + return fixup_spve_null(param, 1); + if(param_no == 5) + return fixup_igp_null(param, 1); + return 0; +} + /** * */ diff --git a/src/modules/siptrace/README b/src/modules/siptrace/README index 5d10f2a80..43393d9b4 100644 --- a/src/modules/siptrace/README +++ b/src/modules/siptrace/README @@ -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")) { diff --git a/src/modules/siptrace/doc/siptrace_admin.xml b/src/modules/siptrace/doc/siptrace_admin.xml index 2bf7c1e91..b7fd0bf3c 100644 --- a/src/modules/siptrace/doc/siptrace_admin.xml +++ b/src/modules/siptrace/doc/siptrace_admin.xml @@ -610,6 +610,26 @@ modparam("siptrace", "trace_mode", 1) ... modparam("siptrace", "trace_mode", 3) ... + + +
+
+ <varname>data_mode</varname> (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. + + + Set <varname>data_mode</varname> + parameter + +... +modparam("siptrace", "data_mode", 1) +...
@@ -949,4 +969,3 @@ onsend_route {
- diff --git a/src/modules/siptrace/siptrace.c b/src/modules/siptrace/siptrace.c index 561e6ac4b..28c96bfac 100644 --- a/src/modules/siptrace/siptrace.c +++ b/src/modules/siptrace/siptrace.c @@ -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; diff --git a/src/modules/siptrace/siptrace_send.c b/src/modules/siptrace/siptrace_send.c index d8a5f974b..4f9726de2 100644 --- a/src/modules/siptrace/siptrace_send.c +++ b/src/modules/siptrace/siptrace_send.c @@ -357,6 +357,8 @@ int trace_send_duplicate(char *buf, int len, dest_info_t *dst2) pdst->to.s.sa_family, pdst->proto); goto error; } + } else { + pdst->send_flags.f |= SND_F_FORCE_SOCKET; } if(msg_send_buffer(pdst, buf, len, 1) < 0) { diff --git a/src/modules/siputils/README b/src/modules/siputils/README index 5ca3d55ce..d99f002af 100644 --- a/src/modules/siputils/README +++ b/src/modules/siputils/README @@ -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. diff --git a/src/modules/siputils/chargingvector.c b/src/modules/siputils/chargingvector.c index 5df2d34c2..8bc723c64 100644 --- a/src/modules/siputils/chargingvector.c +++ b/src/modules/siputils/chargingvector.c @@ -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,18 @@ 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; + int i; + char *ptr = NULL; + char *endptr = NULL; + + /* 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 +146,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}; + ptr = pcv; + endptr = ptr + maxsize - 1; - snprintf(hex, 4, "%02X", newConferenceIdentifier[i]); - strcat(pcv, hex); + for(i = 0; i < len && ptr < endptr; i++) { + ptr += snprintf(ptr, 3, "%02X", newConferenceIdentifier[i]); } } -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 +168,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 +250,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 +260,55 @@ static int sip_get_charging_vector( return -1; } + sip_initialize_pcv_buffers(); + _siputils_pcv_status = PCV_NONE; + 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"); + *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 +318,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 +378,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 +412,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 +455,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; + 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 +558,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; diff --git a/src/modules/siputils/doc/siputils.xml b/src/modules/siputils/doc/siputils.xml index d537da1fb..08d3d8fb4 100644 --- a/src/modules/siputils/doc/siputils.xml +++ b/src/modules/siputils/doc/siputils.xml @@ -95,6 +95,14 @@ + + Eik + Rentzow +
+ rentzow@gmx.de +
+
+ 2008 diff --git a/src/modules/siputils/doc/siputils_admin.xml b/src/modules/siputils/doc/siputils_admin.xml index ad30a1a9f..b8977d8bb 100644 --- a/src/modules/siputils/doc/siputils_admin.xml +++ b/src/modules/siputils/doc/siputils_admin.xml @@ -1237,7 +1237,33 @@ if(is_first_hop("1")) { ... } 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. + + 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. @@ -1469,6 +1495,32 @@ if (!hdr_date_check("10")) { term-ioi field (see RFC7315 section 5.6)
+
+ <varname>$pcv(status)</varname> + + 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. + +
diff --git a/src/modules/sl/sl_stats.c b/src/modules/sl/sl_stats.c index e97604558..91f1ae892 100644 --- a/src/modules/sl/sl_stats.c +++ b/src/modules/sl/sl_stats.c @@ -146,7 +146,7 @@ void update_sl_stats(int code) my_stats = &(*sl_stats)[process_no]; - if(code >= 700 || code < 200) { + if(code >= 700 || code < 100) { my_stats->err[RT_xxx]++; } else if(code >= 600) { my_stats->err[RT_6xx]++; @@ -201,7 +201,7 @@ void update_sl_stats(int code) my_stats->err[RT_3xx]++; break; } - } else { /* 2xx */ + } else if(code >= 200) { switch(code) { case 200: my_stats->err[RT_200]++; @@ -213,6 +213,8 @@ void update_sl_stats(int code) my_stats->err[RT_2xx]++; break; } + } else { /* 1xx */ + my_stats->err[RT_1xx]++; } } diff --git a/src/modules/sms/libsms_getsms.c b/src/modules/sms/libsms_getsms.c index 418156049..1909c78bc 100644 --- a/src/modules/sms/libsms_getsms.c +++ b/src/modules/sms/libsms_getsms.c @@ -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; diff --git a/src/modules/snmpstats/README b/src/modules/snmpstats/README index 407b6def6..83ee6cd97 100644 --- a/src/modules/snmpstats/README +++ b/src/modules/snmpstats/README @@ -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. diff --git a/src/modules/snmpstats/doc/snmpstats_admin.xml b/src/modules/snmpstats/doc/snmpstats_admin.xml index 12a6ee152..538908e25 100644 --- a/src/modules/snmpstats/doc/snmpstats_admin.xml +++ b/src/modules/snmpstats/doc/snmpstats_admin.xml @@ -215,7 +215,7 @@ - dialog or dialog-ng - all scalars relating to the number of dialogs are + 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. diff --git a/src/modules/snmpstats/snmpstats.c b/src/modules/snmpstats/snmpstats.c index 34b699bde..ac0614f77 100644 --- a/src/modules/snmpstats/snmpstats.c +++ b/src/modules/snmpstats/snmpstats.c @@ -92,6 +92,7 @@ #include "../../core/script_cb.h" #include "../../core/mem/mem.h" #include "../../core/mem/shm_mem.h" +#include "../../core/daemonize.h" #include "snmpSIPRegUserTable.h" #include "snmpSIPContactTable.h" @@ -561,14 +562,14 @@ static int spawn_sysUpTime_child(void) "kamailioSIPServiceStartTime is defaulting to zero\n"); close(snmpget_fd); free(full_path_to_snmpget); - exit(-1); + ksr_exit(-1); } /* We should never be able to get here, because execve() is never * supposed to return. */ close(snmpget_fd); free(full_path_to_snmpget); - exit(-1); + ksr_exit(-1); } diff --git a/src/modules/snmpstats/sub_agent.c b/src/modules/snmpstats/sub_agent.c index 92ca838c9..cc3ff06aa 100644 --- a/src/modules/snmpstats/sub_agent.c +++ b/src/modules/snmpstats/sub_agent.c @@ -65,6 +65,7 @@ #include "../../core/dprint.h" #include "../../core/cfg/cfg_struct.h" +#include "../../core/daemonize.h" static int keep_running; @@ -72,7 +73,7 @@ static int keep_running; static void sigterm_handler(int signal) { /* Just exit. The master agent will clean everything up for us */ - exit(0); + ksr_exit(0); } /*! This function: @@ -125,7 +126,7 @@ static int initialize_agentx(void) LM_DBG("Shutting down Kamailio SNMPD MasterX sub agent.\n"); snmp_shutdown(AGENT_PROCESS_NAME); SOCK_CLEANUP; - exit(0); + ksr_exit(0); return 0; } diff --git a/src/modules/sst/README b/src/modules/sst/README index 288361a96..b7bb36e44 100644 --- a/src/modules/sst/README +++ b/src/modules/sst/README @@ -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 diff --git a/src/modules/sst/doc/sst_admin.xml b/src/modules/sst/doc/sst_admin.xml index 9c905f9e3..56600021b 100644 --- a/src/modules/sst/doc/sst_admin.xml +++ b/src/modules/sst/doc/sst_admin.xml @@ -123,7 +123,7 @@ - dialog or dialog-ng + dialog or ims_dialog - dialog module and its dependencies. (tm) diff --git a/src/modules/stun/kam_stun.c b/src/modules/stun/kam_stun.c index b3c1e7877..3ad42ff16 100644 --- a/src/modules/stun/kam_stun.c +++ b/src/modules/stun/kam_stun.c @@ -512,6 +512,10 @@ static int stun_create_response(struct stun_msg *req, struct stun_msg *res, } } + if(res->msg.buf.len < sizeof(struct stun_hdr)) { + LM_ERR("invalid message\n"); + return FATAL_ERROR; + } res->hdr.len = htons(res->msg.buf.len - sizeof(struct stun_hdr)); memcpy(&res->msg.buf.s[sizeof(USHORT_T)], (void *)&res->hdr.len, sizeof(USHORT_T)); diff --git a/src/modules/tcpops/tcpops_mod.c b/src/modules/tcpops/tcpops_mod.c index 6b6482308..a89a18992 100644 --- a/src/modules/tcpops/tcpops_mod.c +++ b/src/modules/tcpops/tcpops_mod.c @@ -811,6 +811,9 @@ static int pv_get_tcp(sip_msg_t *msg, pv_param_t *param, pv_value_t *res) tcpconn_put(con); return pv_get_sintval(msg, param, res, ival); default: /* conid */ + if(con) { + tcpconn_put(con); + } return pv_get_sintval(msg, param, res, msg->rcv.proto_reserved1); } } diff --git a/src/modules/textops/textops.c b/src/modules/textops/textops.c index 6baf40de6..2a09c2dc6 100644 --- a/src/modules/textops/textops.c +++ b/src/modules/textops/textops.c @@ -4947,11 +4947,7 @@ static int ki_via_param_rm(sip_msg_t *msg, str *name, int idx) LM_ERR("no memory for delete operation\n"); return -1; } - if(ret < 0) { - ret = 1; - } else { - ret++; - } + ret++; } } if(ret > 0) { @@ -4962,7 +4958,7 @@ static int ki_via_param_rm(sip_msg_t *msg, str *name, int idx) } } } - return ret; + return (ret == 0) ? -1 : ret; } /** diff --git a/src/modules/textopsx/README b/src/modules/textopsx/README index 1759870cb..3e2f9e2eb 100644 --- a/src/modules/textopsx/README +++ b/src/modules/textopsx/README @@ -731,27 +731,38 @@ bl_iterator_end("b1"); 3.1. @hf_value - Get value of required header-value or param. Note that functions called - 'value2' works with Authorization-like headers where comma is not - treated as value delimiter. Formats: @hf_value.HFNAME[IDX] # idx value, - negative value counts from bottom @hf_value.HFNAME.PARAM_NAME - @hf_value.HFNAME[IDX].PARAM_NAME @hf_value.HFNAME.p.PARAM_NAME # or - .param., useful if required called "uri", "p", "param" - @hf_value.HFNAME[IDX].p.PARAM_NAME # dtto @hf_value.HFNAME[IDX].uri # - (< & > excluded) @hf_value.HFNAME[*] # return comma delimited list of - all values (combines headers) @hf_value.HFNAME # the same as above [*] - but may be parsed by cfg.y @hf_value.HFNAME[*].uri # return comma - delimited list of uris (< & > excluded) @hf_value.HFNAME.uri # the same - as above [*] but may be parsed by cfg.y @hf_value.HFNAME[IDX].name # - returns name part, quotes excluded @hf_value.HFNAME.name # returns name - part of the first value @hf_value2.HFNAME # returns value of first - header @hf_value2.HFNAME[IDX] # returns value of idx's header - @hf_value2.HFNAME.PARAM_NAME @hf_value2.HFNAME[IDX].PARAM_NAME - @hf_value.HFNAME[IDX].uri # return URI, quotes excluded - @hf_value.HFNAME.p.uri # returns param named uri, not URI itself - @hf_value.HFNAME.p.name # returns param named name, not name itself - @hf_value.HFNAME[IDX].uri.name # any sel_any_uri nested features may be - used @hf_value.HFNAME[IDX].nameaddr.name # select_any_nameaddr + Get value of required header-value or param. Note that selects called + 'hf_value2' work with Authorization-like headers where comma is not + treated as value delimiter. + + Formats: + * @hf_value.HFNAME[IDX] # idx value, negative value counts from + bottom + * @hf_value.HFNAME.PARAM_NAME + * @hf_value.HFNAME[IDX].PARAM_NAME + * @hf_value.HFNAME.p.PARAM_NAME # or .param., useful if required + called "uri", "p", "param" + * @hf_value.HFNAME[IDX].p.PARAM_NAME # dtto + * @hf_value.HFNAME[IDX].uri # (< & > excluded) + * @hf_value.HFNAME[*] # return comma delimited list of all values + (combines headers) + * @hf_value.HFNAME # the same as above [*] but may be parsed by cfg.y + * @hf_value.HFNAME[*].uri # return comma delimited list of uris (< & + > excluded) + * @hf_value.HFNAME.uri # the same as above [*] but may be parsed by + cfg.y + * @hf_value.HFNAME[IDX].name # returns name part, quotes excluded + * @hf_value.HFNAME.name # returns name part of the first value + * @hf_value2.HFNAME # returns value of first header + * @hf_value2.HFNAME[IDX] # returns value of idx's header + * @hf_value2.HFNAME.PARAM_NAME + * @hf_value2.HFNAME[IDX].PARAM_NAME + * @hf_value.HFNAME[IDX].uri # return URI, quotes excluded + * @hf_value.HFNAME.p.uri # returns param named uri, not URI itself + * @hf_value.HFNAME.p.name # returns param named name, not name itself + * @hf_value.HFNAME[IDX].uri.name # any sel_any_uri nested features + may be used + * @hf_value.HFNAME[IDX].nameaddr.name # select_any_nameaddr Meaning of the parameters is as follows: * HFNAME - Header field name. Underscores are treated as dashes. @@ -772,7 +783,9 @@ $prt = @hf_value2.authorization.integrity_protected; 3.2. @hf_value2 - TBA. + Similar to selects called 'hf_value', but work with Authorization-like + headers where comma is treated as attribute delimiter instead of header + value delimiter. 3.3. @hf_value_exists diff --git a/src/modules/textopsx/doc/selects.xml b/src/modules/textopsx/doc/selects.xml index 6d4dd4e3a..dd3ea3f7a 100644 --- a/src/modules/textopsx/doc/selects.xml +++ b/src/modules/textopsx/doc/selects.xml @@ -8,31 +8,36 @@
@hf_value - Get value of required header-value or param. Note that functions called 'value2' - works with Authorization-like headers where comma is not treated as value delimiter. Formats: - @hf_value.HFNAME[IDX] # idx value, negative value counts from bottom - @hf_value.HFNAME.PARAM_NAME - @hf_value.HFNAME[IDX].PARAM_NAME - @hf_value.HFNAME.p.PARAM_NAME # or .param., useful if required called "uri", "p", "param" - @hf_value.HFNAME[IDX].p.PARAM_NAME # dtto - @hf_value.HFNAME[IDX].uri # (< & > excluded) - @hf_value.HFNAME[*] # return comma delimited list of all values (combines headers) - @hf_value.HFNAME # the same as above [*] but may be parsed by cfg.y - @hf_value.HFNAME[*].uri # return comma delimited list of uris (< & > excluded) - @hf_value.HFNAME.uri # the same as above [*] but may be parsed by cfg.y - @hf_value.HFNAME[IDX].name # returns name part, quotes excluded - @hf_value.HFNAME.name # returns name part of the first value + Get value of required header-value or param. Note that selects called 'hf_value2' + work with Authorization-like headers where comma is not treated as value delimiter. + + + Formats: + + @hf_value.HFNAME[IDX] # idx value, negative value counts from bottom + @hf_value.HFNAME.PARAM_NAME + @hf_value.HFNAME[IDX].PARAM_NAME + @hf_value.HFNAME.p.PARAM_NAME # or .param., useful if required called "uri", "p", "param" + @hf_value.HFNAME[IDX].p.PARAM_NAME # dtto + @hf_value.HFNAME[IDX].uri # (< & > excluded) + @hf_value.HFNAME[*] # return comma delimited list of all values (combines headers) + @hf_value.HFNAME # the same as above [*] but may be parsed by cfg.y + @hf_value.HFNAME[*].uri # return comma delimited list of uris (< & > excluded) + @hf_value.HFNAME.uri # the same as above [*] but may be parsed by cfg.y + @hf_value.HFNAME[IDX].name # returns name part, quotes excluded + @hf_value.HFNAME.name # returns name part of the first value - @hf_value2.HFNAME # returns value of first header - @hf_value2.HFNAME[IDX] # returns value of idx's header - @hf_value2.HFNAME.PARAM_NAME - @hf_value2.HFNAME[IDX].PARAM_NAME + @hf_value2.HFNAME # returns value of first header + @hf_value2.HFNAME[IDX] # returns value of idx's header + @hf_value2.HFNAME.PARAM_NAME + @hf_value2.HFNAME[IDX].PARAM_NAME - @hf_value.HFNAME[IDX].uri # return URI, quotes excluded - @hf_value.HFNAME.p.uri # returns param named uri, not URI itself - @hf_value.HFNAME.p.name # returns param named name, not name itself - @hf_value.HFNAME[IDX].uri.name # any sel_any_uri nested features may be used - @hf_value.HFNAME[IDX].nameaddr.name # select_any_nameaddr + @hf_value.HFNAME[IDX].uri # return URI, quotes excluded + @hf_value.HFNAME.p.uri # returns param named uri, not URI itself + @hf_value.HFNAME.p.name # returns param named name, not name itself + @hf_value.HFNAME[IDX].uri.name # any sel_any_uri nested features may be used + @hf_value.HFNAME[IDX].nameaddr.name # select_any_nameaddr + Meaning of the parameters is as follows: @@ -68,7 +73,9 @@ $prt = @hf_value2.authorization.integrity_protected;
@hf_value2 - TBA. + Similar to selects called 'hf_value', but work with Authorization-like + headers where comma is treated as attribute delimiter instead of header + value delimiter.
diff --git a/src/modules/timer/README b/src/modules/timer/README index 853fe7304..a9705658e 100644 --- a/src/modules/timer/README +++ b/src/modules/timer/README @@ -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"); +} ... diff --git a/src/modules/timer/doc/timer.xml b/src/modules/timer/doc/timer.xml index e22d65341..cbfb23941 100644 --- a/src/modules/timer/doc/timer.xml +++ b/src/modules/timer/doc/timer.xml @@ -224,14 +224,14 @@ if (@timer.executed != "") { 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"] { @@ -276,22 +276,22 @@ end ... 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"); +} ... @@ -299,4 +299,3 @@ route[TEST] {
- diff --git a/src/modules/timer/timer.c b/src/modules/timer/timer.c index 2f3f1b1bf..e31ede949 100644 --- a/src/modules/timer/timer.c +++ b/src/modules/timer/timer.c @@ -144,15 +144,18 @@ static int sel_executed(str *res, select_t *s, sip_msg_t *msg) return 0; } +/* clang-format off */ select_row_t sel_declaration[] = { - {NULL, SEL_PARAM_STR, STR_STATIC_INIT(MODULE_NAME), sel_root, + {NULL, SEL_PARAM_STR, STR_STATIC_INIT(MODULE_NAME), sel_root, SEL_PARAM_EXPECTED}, - {sel_root, SEL_PARAM_STR, STR_STATIC_INIT("timer"), sel_timer, + {sel_root, SEL_PARAM_STR, STR_STATIC_INIT("timer"), sel_timer, SEL_PARAM_EXPECTED | CONSUME_NEXT_STR | FIXUP_CALL}, - {sel_timer, SEL_PARAM_STR, STR_STATIC_INIT("enabled"), sel_enabled, 0}, - {sel_root, SEL_PARAM_STR, STR_STATIC_INIT("executed"), sel_executed, 0}, + {sel_timer, SEL_PARAM_STR, STR_STATIC_INIT("enabled"), sel_enabled, 0}, + {sel_root, SEL_PARAM_STR, STR_STATIC_INIT("executed"), sel_executed, 0}, - {NULL, SEL_PARAM_STR, STR_NULL, NULL, 0}}; + {NULL, SEL_PARAM_STR, STR_NULL, NULL, 0} +}; +/* clang-format on */ static unsigned int timer_msg_no = 0; @@ -303,6 +306,19 @@ static int timer_enable_func(sip_msg_t *m, char *timer_act, char *enable) return timer_enable_helper(m, a, en); } +static int ki_timer_enable(sip_msg_t *m, str *timerid, int enable) +{ + timer_action_t *a; + + a = find_action_by_name(timer_actions, timerid->s, -1); + if(!a) { + LM_ERR("timer '%s' not declared\n", timerid->s); + return -1; + } + + return timer_enable_helper(m, a, enable); +} + static int get_next_part(char **s, str *part, char delim) { char *c, *c2; @@ -485,30 +501,61 @@ static void destroy_mod(void) } } +/* clang-format off */ /* * Exported functions */ -static cmd_export_t cmds[] = {{MODULE_NAME "_enable", timer_enable_func, 2, - timer_enable_fixup, 0, ANY_ROUTE}, - {0, 0, 0, 0, 0, 0}}; +static cmd_export_t cmds[] = { + {MODULE_NAME "_enable", timer_enable_func, 2, timer_enable_fixup, + 0, ANY_ROUTE}, + + {0, 0, 0, 0, 0, 0} +}; /* * Exported parameters */ static param_export_t params[] = { - {"declare_timer", PARAM_STRING | PARAM_USE_FUNC, (void *)declare_timer}, - {0, 0, 0}}; + {"declare_timer", PARAM_STRING | PARAM_USE_FUNC, (void *)declare_timer}, + + {0, 0, 0 } +}; struct module_exports exports = { - MODULE_NAME, /* module name */ - DEFAULT_DLFLAGS, /* dlopen flags */ - cmds, /* Exported commands */ - params, /* Exported parameters */ - 0, /* Exported RPC functions */ - 0, /* pseudo-variables exports */ - 0, /* response function */ - mod_init, /* module initialization function */ - child_init, /* per-child init function */ - destroy_mod /* destroy function */ + MODULE_NAME, /* module name */ + DEFAULT_DLFLAGS, /* dlopen flags */ + cmds, /* Exported commands */ + params, /* Exported parameters */ + 0, /* Exported RPC functions */ + 0, /* pseudo-variables exports */ + 0, /* response function */ + mod_init, /* module initialization function */ + child_init, /* per-child init function */ + destroy_mod /* destroy function */ }; +/* clang-format on */ + + +/** + * + */ +/* clang-format off */ +static sr_kemi_t sr_kemi_timer_exports[] = { + { str_init("timer"), str_init("timer_enable"), + SR_KEMIP_INT, ki_timer_enable, + { SR_KEMIP_STR, SR_KEMIP_INT, SR_KEMIP_NONE, + SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } + }, + { {0, 0}, {0, 0}, 0, NULL, { 0, 0, 0, 0, 0, 0 } } +}; +/* clang-format on */ + +/** + * + */ +int mod_register(char *path, int *dlflags, void *p1, void *p2) +{ + sr_kemi_modules_add(sr_kemi_timer_exports); + return 0; +} diff --git a/src/modules/tls/tls_domain.c b/src/modules/tls/tls_domain.c index e056a70b5..810a7e958 100644 --- a/src/modules/tls/tls_domain.c +++ b/src/modules/tls/tls_domain.c @@ -1155,14 +1155,14 @@ static int ksr_tls_fix_domain(tls_domain_t *d, tls_domain_t *def) d->ctx[i], tls_server_name_cb)) { LM_ERR("register server_name callback handler for socket " "[%s:%d], server_name='%s' failed for proc %d\n", - ip_addr2a(&d->ip), d->port, + (d->ip.af > 0) ? ip_addr2a(&d->ip) : "0.0.0.0", d->port, (d->server_name.s) ? d->server_name.s : "", i); return -1; } if(!SSL_CTX_set_tlsext_servername_arg(d->ctx[i], d)) { LM_ERR("register server_name callback handler data for socket " "[%s:%d], server_name='%s' failed for proc %d\n", - ip_addr2a(&d->ip), d->port, + (d->ip.af > 0) ? ip_addr2a(&d->ip) : "0.0.0.0", d->port, (d->server_name.s) ? d->server_name.s : "", i); return -1; } @@ -1175,7 +1175,7 @@ static int ksr_tls_fix_domain(tls_domain_t *d, tls_domain_t *def) && (d->server_name.len > 0 || (d->type & TLS_DOMAIN_DEF))) { LM_NOTICE("registered server_name callback handler for socket " "[%s:%d], server_name='%s' ...\n", - ip_addr2a(&d->ip), d->port, + (d->ip.af > 0) ? ip_addr2a(&d->ip) : "0.0.0.0", d->port, (d->server_name.s) ? d->server_name.s : ""); } #endif diff --git a/src/modules/tls/tls_mod.c b/src/modules/tls/tls_mod.c index baa1a7c76..dd32bd0e7 100644 --- a/src/modules/tls/tls_mod.c +++ b/src/modules/tls/tls_mod.c @@ -337,7 +337,7 @@ static tls_domains_cfg_t* tls_use_modparams(void) } #endif -/* global config tls_threads_mode = 2 +/* global config tls_threads_mode = 2 (KSR_TLS_THREADS_MFORK) * - force all thread-locals to be 0x0 after fork() * - with OpenSSL loaded the largest value observed * is < 10 @@ -464,7 +464,7 @@ static int mod_init(void) ksr_module_set_flag(KSRMOD_FLAG_POSTCHILDINIT); } #endif - if(ksr_tls_threads_mode == 2) { + if(ksr_tls_threads_mode == KSR_TLS_THREADS_MFORK) { pthread_atfork(NULL, NULL, &fork_child); } @@ -474,7 +474,7 @@ static int mod_init(void) * that use pthread_key_create(), e.g. python, * will have larger key values */ - if(ksr_tls_threads_mode > 0) { + if(ksr_tls_threads_mode > KSR_TLS_THREADS_MNONE) { ERR_clear_error(); RAND_bytes(rand_buf, sizeof(rand_buf)); for(k = 0; k < 32; k++) { @@ -537,14 +537,15 @@ static int mod_child(int rank) /* * OpenSSL 3.x/1.1.1: create shared SSL_CTX* in thread executor - * to avoid init of libssl in thread#1: ksr_tls_threads_mode = 1 + * to avoid init of libssl in thread#1: + * - ksr_tls_threads_mode = 1 (KSR_TLS_THREADS_MTEMP) */ if(rank == PROC_INIT) { return run_thread4PP((_thread_proto4PP)mod_child_hook, &rank, NULL); } - if(ksr_tls_threads_mode == 1 && rank && rank != PROC_INIT - && rank != PROC_POSTCHILDINIT) { + if(ksr_tls_threads_mode == KSR_TLS_THREADS_MTEMP && rank + && rank != PROC_INIT && rank != PROC_POSTCHILDINIT) { for(k = 0; k < tls_pthreads_key_mark; k++) pthread_setspecific(k, 0x0); LM_WARN("clean-up of thread-locals key < %d\n", tls_pthreads_key_mark); @@ -773,7 +774,7 @@ int mod_register(char *path, int *dlflags, void *p1, void *p2) */ #if OPENSSL_VERSION_NUMBER >= 0x10100000L \ && OPENSSL_VERSION_NUMBER < 0x030000000L - if(ksr_tls_threads_mode == 0) { + if(ksr_tls_threads_mode == KSR_TLS_THREADS_MNONE) { LM_WARN("OpenSSL 1.1.1 setting cryptorand random engine\n"); RAND_set_rand_method(RAND_ksr_cryptorand_method()); } diff --git a/src/modules/tls/tls_select.c b/src/modules/tls/tls_select.c index c7eb96bd9..ad8654b10 100644 --- a/src/modules/tls/tls_select.c +++ b/src/modules/tls/tls_select.c @@ -127,14 +127,14 @@ struct tcp_connection *get_cur_connection(struct sip_msg *msg) if(_tls_pv_con != 0) return _tls_pv_con; - if(msg->rcv.proto != PROTO_TLS) { + if(msg->rcv.proto != PROTO_TLS && msg->rcv.proto != PROTO_WSS) { ERR("Transport protocol is not TLS (bug in config)\n"); return 0; } c = tcpconn_get(msg->rcv.proto_reserved1, 0, 0, 0, cfg_get(tls, tls_cfg, con_lifetime)); - if(c && c->type != PROTO_TLS) { + if(c && c->type != PROTO_TLS && msg->rcv.proto != PROTO_WSS) { ERR("Connection found but is not TLS\n"); tcpconn_put(c); return 0; @@ -1187,21 +1187,16 @@ static int pv_comp(sip_msg_t *msg, pv_param_t *param, pv_value_t *res) int pv_parse_alt_name(pv_spec_p sp, str *in) { - pv_elem_t *fmt = NULL; - if(in->s == NULL || in->len <= 0) return -1; - if(pv_parse_format(in, &fmt) < 0 || fmt == NULL) { - LM_ERR("wrong format[%.*s]\n", in->len, in->s); - return -1; - } - if(strncmp(in->s, "DNS", 3) == 0) { + + if(in->len == 3 && strncmp(in->s, "DNS", 3) == 0) { sp->pvp.pvn.u.isname.name.n = PV_COMP_HOST; - } else if(strncmp(in->s, "URI", 3) == 0) { + } else if(in->len == 3 && strncmp(in->s, "URI", 3) == 0) { sp->pvp.pvn.u.isname.name.n = PV_COMP_URI; - } else if(strncmp(in->s, "EMAIL", 5) == 0) { + } else if(in->len == 5 && strncmp(in->s, "EMAIL", 5) == 0) { sp->pvp.pvn.u.isname.name.n = PV_COMP_E; - } else if(strncmp(in->s, "IP", 2) == 0) { + } else if(in->len == 2 && strncmp(in->s, "IP", 2) == 0) { sp->pvp.pvn.u.isname.name.n = PV_COMP_IP; } else { LM_ERR("Unsupported alt name %s\n", in->s); diff --git a/src/modules/tm/README b/src/modules/tm/README index 18a3efe55..b51719b34 100644 --- a/src/modules/tm/README +++ b/src/modules/tm/README @@ -1275,16 +1275,17 @@ Note See also: t_set_fr(), fr_timer. - In Kamailio compatibility mode (defined by #!KAMAILIO), the value of - the parameter must be the name of an AVP in pseudo-variable format: - $avp(name). In SER compatibility mode it must be just AVP name. + In Kamailio compatibility mode (defined by #!KAMAILIO, which is + default), the value of the parameter must be the name of an AVP in + pseudo-variable format: $avp(name). In SER compatibility mode (defined + by #!SER) it must be just AVP name. Example 1.28. Set fr_timer_avp parameter ... -# Kamailio mode -modparam("tm", "fr_timer_avp", "$avp(i:708)") -# Old SER mode -modparam("tm", "fr_timer_avp", "i:708") +# default Kamailio compatibility mode +modparam("tm", "fr_timer_avp", "$avp(frtimer)") +# old SER compatibility mode +modparam("tm", "fr_timer_avp", "frtimer") ... 3.28. fr_inv_timer_avp (string) @@ -1309,15 +1310,16 @@ Note See also: t_set_fr(), fr_inv_timer. - In Kamailio compatibility mode (defined by #!KAMAILIO), the value of - the parameter must be the name of an AVP in pseudo-variable format: - $avp(name). In SER compatibility mode it must by just AVP name. + In Kamailio compatibility mode (defined by #!KAMAILIO, which is + default), the value of the parameter must be the name of an AVP in + pseudo-variable format: $avp(name). In SER compatibility mode (defined + by #!SER) it must by just AVP name. Example 1.29. Set fr_inv_timer_avp parameter ... -# Kamailio mode +# Kamailio compatibility mode modparam("tm", "fr_inv_timer_avp", "$avp(my_fr_inv_timer)") -# Old SER mode +# old SER compatibility mode modparam("tm", "fr_inv_timer_avp", "my_fr_inv_timer") ... diff --git a/src/modules/tm/doc/params.xml b/src/modules/tm/doc/params.xml index b8d7a8a3d..0652ec0b4 100644 --- a/src/modules/tm/doc/params.xml +++ b/src/modules/tm/doc/params.xml @@ -825,19 +825,19 @@ modparam("tm", "contact_flows_avp", "tm_contact_flows") fr_timer. - In Kamailio compatibility mode (defined by #!KAMAILIO), the value - of the parameter must be the name of an AVP in pseudo-variable - format: $avp(name). In SER compatibility mode it must be just - AVP name. + In Kamailio compatibility mode (defined by #!KAMAILIO, which is + default), the value of the parameter must be the name of an AVP + in pseudo-variable format: $avp(name). In SER compatibility mode + (defined by #!SER) it must be just AVP name. Set <varname>fr_timer_avp</varname> parameter ... -# Kamailio mode -modparam("tm", "fr_timer_avp", "$avp(i:708)") -# Old SER mode -modparam("tm", "fr_timer_avp", "i:708") +# default Kamailio compatibility mode +modparam("tm", "fr_timer_avp", "$avp(frtimer)") +# old SER compatibility mode +modparam("tm", "fr_timer_avp", "frtimer") ... @@ -871,18 +871,18 @@ modparam("tm", "fr_timer_avp", "i:708") fr_inv_timer. - In Kamailio compatibility mode (defined by #!KAMAILIO), the value - of the parameter must be the name of an AVP in pseudo-variable - format: $avp(name). In SER compatibility mode it must by just - AVP name. + In Kamailio compatibility mode (defined by #!KAMAILIO, which is + default), the value of the parameter must be the name of an AVP + in pseudo-variable format: $avp(name). In SER compatibility mode + (defined by #!SER) it must by just AVP name. Set <varname>fr_inv_timer_avp</varname> parameter ... -# Kamailio mode +# Kamailio compatibility mode modparam("tm", "fr_inv_timer_avp", "$avp(my_fr_inv_timer)") -# Old SER mode +# old SER compatibility mode modparam("tm", "fr_inv_timer_avp", "my_fr_inv_timer") ... diff --git a/src/modules/tm/rpc_uac.c b/src/modules/tm/rpc_uac.c index e63da4fb8..2d7bd6113 100644 --- a/src/modules/tm/rpc_uac.c +++ b/src/modules/tm/rpc_uac.c @@ -778,7 +778,7 @@ static void rpc_t_uac(rpc_t *rpc, void *c, int reply_wait) dctx = rpc->delayed_ctx_new(c); if(dctx == 0) { rpc->fault(c, 500, "internal error: failed to create context"); - return; + goto error01; } uac_req.cb = rpc_uac_callback; uac_req.cbp = dctx; diff --git a/src/modules/tm/t_cancel.c b/src/modules/tm/t_cancel.c index 18452a469..8a29b3d39 100644 --- a/src/modules/tm/t_cancel.c +++ b/src/modules/tm/t_cancel.c @@ -29,6 +29,7 @@ #include "t_funcs.h" #include "../../core/dprint.h" #include "../../core/ut.h" +#include "../../core/kemi.h" #include "t_reply.h" #include "t_cancel.h" #include "t_msgbuilder.h" @@ -36,6 +37,8 @@ #include "t_hooks.h" +extern str tm_event_callback; + typedef struct cancel_reason_map { int code; @@ -210,6 +213,11 @@ int cancel_branch( struct cancel_info tmp_cd; void *pcbuf; int reply_status; + int rt, backup_rt; + struct run_act_ctx ctx; + sip_msg_t msg; + sr_kemi_eng_t *keng = NULL; + str evname = str_init("tm:local-request"); crb = &t->uac[branch].local_cancel; irb = &t->uac[branch].request; @@ -326,6 +334,46 @@ int cancel_branch( crb->buffer_len = len; LM_DBG("sending cancel...\n"); + + rt = -1; + if(tm_event_callback.s == NULL || tm_event_callback.len <= 0) { + rt = route_lookup(&event_rt, evname.s); + if(rt < 0 || event_rt.rlist[rt] == NULL) { + LM_DBG("tm:local-request not found\n"); + } + } else { + keng = sr_kemi_eng_get(); + if(keng == NULL) { + LM_DBG("event callback (%s) set, but no cfg engine\n", + tm_event_callback.s); + } + } + + // /* Check if msg is null */ + if(build_sip_msg_from_buf(&msg, crb->buffer, crb->buffer_len, 0) < 0) { + LM_ERR("fail to parse msg\n"); + } + + /* Call event */ + backup_rt = get_route_type(); + set_route_type(REQUEST_ROUTE); + init_run_actions_ctx(&ctx); + if(rt >= 0) { + LM_DBG("tm:local-request found [%d]\n", rt); + run_top_route(event_rt.rlist[rt], &msg, 0); + } else { + if(keng != NULL) { + + if(sr_kemi_route( + keng, &msg, EVENT_ROUTE, &tm_event_callback, &evname) + < 0) { + LM_ERR("error running event route kemi callback\n"); + } + } + } + set_route_type(backup_rt); + free_sip_msg(&msg); + if(SEND_BUFFER(crb) >= 0) { if(unlikely(has_tran_tmcbs(t, TMCB_REQUEST_OUT))) run_trans_callbacks_with_buf( @@ -354,9 +402,10 @@ void rpc_cancel(rpc_t *rpc, void *c) static char cseq[128], callid[128]; struct cancel_info cancel_data; int i, j; - str cseq_s; /* cseq */ str callid_s; /* callid */ + tm_cell_t *orig_t = NULL; + int orig_branch; cseq_s.s = cseq; callid_s.s = callid; @@ -367,6 +416,7 @@ void rpc_cancel(rpc_t *rpc, void *c) return; } + tm_get_tb(&orig_t, &orig_branch); if(t_lookup_callid(&trans, callid_s, cseq_s) < 0) { LM_DBG("Lookup failed\n"); rpc->fault(c, 400, "Transaction not found"); @@ -381,6 +431,7 @@ void rpc_cancel(rpc_t *rpc, void *c) /* t_lookup_callid REF`d the transaction for us, we must UNREF here! */ UNREF(trans); + tm_set_tb(orig_t, orig_branch); j = 0; while(i) { j++; diff --git a/src/modules/tm/t_fwd.c b/src/modules/tm/t_fwd.c index 816568b18..055176ba7 100644 --- a/src/modules/tm/t_fwd.c +++ b/src/modules/tm/t_fwd.c @@ -1835,7 +1835,7 @@ int t_forward_cancel(struct sip_msg *p_msg, struct proxy_l *proxy, int proto, int new_tran; struct dest_info dst; str host; - unsigned short port; + unsigned short port = 0; short comp; t = 0; diff --git a/src/modules/tm/t_lookup.c b/src/modules/tm/t_lookup.c index 712f28fb7..ef30878bf 100644 --- a/src/modules/tm/t_lookup.c +++ b/src/modules/tm/t_lookup.c @@ -150,6 +150,18 @@ int get_t_branch() return T_branch; } +void tm_get_tb(struct cell **t, int *branch) +{ + *t = T; + *branch = T_branch; +} + +void tm_set_tb(struct cell *t, int branch) +{ + T = t; + T_branch = branch; +} + /** * return the transaction by combining get() and t_check_msg() * - if T is not set, checks the transactions table for msg, and if found, diff --git a/src/modules/tm/t_lookup.h b/src/modules/tm/t_lookup.h index f3f69af4a..25f6d9eaa 100644 --- a/src/modules/tm/t_lookup.h +++ b/src/modules/tm/t_lookup.h @@ -79,6 +79,10 @@ int get_t_branch(void); typedef void (*tsett_f)(struct cell *t, int branch); void set_t(struct cell *t, int branch); +typedef void (*tm_get_tb_f)(struct cell **t, int *branch); +void tm_get_tb(struct cell **t, int *branch); +typedef void (*tm_set_tb_f)(struct cell *t, int branch); +void tm_set_tb(struct cell *t, int branch); #define T_GET_TI "t_get_trans_ident" #define T_LOOKUP_IDENT "t_lookup_ident" diff --git a/src/modules/tm/t_msgbuilder.c b/src/modules/tm/t_msgbuilder.c index 1aa680aa9..1fec2aa37 100644 --- a/src/modules/tm/t_msgbuilder.c +++ b/src/modules/tm/t_msgbuilder.c @@ -674,6 +674,26 @@ static inline int get_contact_uri(struct sip_msg *msg, str *uri) return 0; } +/** + * reverse rte list + */ +static inline rte_t *tm_reverse_rte_list(rte_t *head) +{ + rte_t *prev = NULL; + rte_t *current = NULL; + rte_t *next = NULL; + + current = head; + while(current != NULL) { + next = current->next; + current->next = prev; + prev = current; + current = next; + } + + return prev; +} + /** * Extract route set from the message (out of Record-Route, if reply, OR * Route, if request). @@ -684,7 +704,7 @@ static inline int get_uac_rs(sip_msg_t *msg, int is_req, struct rte **rtset) { struct hdr_field *ptr; rr_t *p, *new_p; - struct rte *t, *head, *old_head; + struct rte *t, *head; head = 0; for(ptr = is_req ? msg->route : msg->record_route; ptr; ptr = ptr->next) { @@ -734,14 +754,7 @@ static inline int get_uac_rs(sip_msg_t *msg, int is_req, struct rte **rtset) if(is_req) { /* harvesting the R/RR HF above inserts at head, which suites RRs (as * they must be reversed, anyway), but not Rs => reverse once more */ - old_head = head; - head = 0; - while(old_head) { - t = old_head; - old_head = old_head->next; - t->next = head; - head = t; - } + head = tm_reverse_rte_list(head); } *rtset = head; @@ -751,7 +764,6 @@ err: return -1; } - static inline unsigned short uri2port(const struct sip_uri *puri) { if(puri->port.s) { @@ -1246,7 +1258,7 @@ char *build_dlg_ack(struct sip_msg *rpl, struct cell *Trans, /* headers */ *len += Trans->from_hdr.len + Trans->callid_hdr.len + to->len - + Trans->cseq_hdr_n.len + 1 + ACK_LEN + +MAXFWD_HEADER_LEN + + Trans->cseq_hdr_n.len + 1 + ACK_LEN + MAXFWD_HEADER_LEN + CRLF_LEN; /* copy'n'paste Route headers */ @@ -1739,7 +1751,8 @@ char *build_uac_cancel(str *headers, str *body, struct cell *cancelledT, char branch_buf[MAX_BRANCH_PARAM_LEN]; str branch_str; struct hostport hp; - str content_length, via; + str content_length; + str via = STR_NULL; LM_DBG("sing FROM=<%.*s>, TO=<%.*s>, CSEQ_N=<%.*s>\n", cancelledT->from_hdr.len, cancelledT->from_hdr.s, @@ -1778,7 +1791,7 @@ char *build_uac_cancel(str *headers, str *body, struct cell *cancelledT, /* Content Length */ if(print_content_length(&content_length, body) < 0) { LM_ERR("failed to print content-length\n"); - return 0; + goto error01; } /* Content-Length */ *len += (body ? (CONTENT_LENGTH_LEN + content_length.len + CRLF_LEN) : 0); diff --git a/src/modules/tm/t_reply.c b/src/modules/tm/t_reply.c index e012dc29c..a6c7579cd 100644 --- a/src/modules/tm/t_reply.c +++ b/src/modules/tm/t_reply.c @@ -2986,6 +2986,8 @@ void rpc_reply(rpc_t *rpc, void *c) { int ret; struct cell *trans; + tm_cell_t *orig_t = NULL; + int orig_branch; unsigned int hash_index, label, code; str ti, body, headers, tag, reason; @@ -3021,6 +3023,7 @@ void rpc_reply(rpc_t *rpc, void *c) } LM_DBG("hash_index=%u label=%u\n", hash_index, label); + tm_get_tb(&orig_t, &orig_branch); if(t_lookup_ident(&trans, hash_index, label) < 0) { ERR("Lookup failed\n"); rpc->fault(c, 481, "No such transaction"); @@ -3030,6 +3033,7 @@ void rpc_reply(rpc_t *rpc, void *c) /* it's refcounted now, t_reply_with body unrefs for me -- I can * continue but may not use T anymore */ ret = t_reply_with_body(trans, code, &reason, &body, &headers, &tag); + tm_set_tb(orig_t, orig_branch); if(ret < 0) { LM_ERR("Reply failed\n"); @@ -3052,6 +3056,8 @@ void rpc_reply_callid(rpc_t *rpc, void *c) { int code; tm_cell_t *trans; + tm_cell_t *orig_t = NULL; + int orig_branch; str reason = {0, 0}; str totag = {0, 0}; str hdrs = {0, 0}; @@ -3094,6 +3100,7 @@ void rpc_reply_callid(rpc_t *rpc, void *c) return; } + tm_get_tb(&orig_t, &orig_branch); if(t_lookup_callid(&trans, callid, cseq) < 0) { rpc->fault(c, 404, "Transaction not found"); return; @@ -3102,6 +3109,7 @@ void rpc_reply_callid(rpc_t *rpc, void *c) /* it's refcounted now, t_reply_with body unrefs for me -- I can * continue but may not use T anymore */ n = t_reply_with_body(trans, code, &reason, &body, &hdrs, &totag); + tm_set_tb(orig_t, orig_branch); if(n < 0) { rpc->fault(c, 500, "Reply failed"); diff --git a/src/modules/tm/t_serial.c b/src/modules/tm/t_serial.c index 469745541..7566f2b4a 100644 --- a/src/modules/tm/t_serial.c +++ b/src/modules/tm/t_serial.c @@ -643,6 +643,11 @@ int ki_t_next_contacts(struct sip_msg *msg) LM_DBG("no contacts in contacts_avp - we are done!\n"); return -2; } + if(xavp_list->val.type != SR_XTYPE_XAVP) { + LM_ERR("invalid value type (%d) for contacts xavp\n", + xavp_list->val.type); + return -3; + } xavp = xavp_list; diff --git a/src/modules/tm/tm_load.c b/src/modules/tm/tm_load.c index 714987351..0b4ff49e4 100644 --- a/src/modules/tm/tm_load.c +++ b/src/modules/tm/tm_load.c @@ -144,6 +144,8 @@ int load_tm(struct tm_binds *tmb) tmb->t_release_transaction = t_release_transaction; tmb->t_uas_request_clean_parsed = t_uas_request_clean_parsed; tmb->t_reply_error = ki_t_reply_error; + tmb->get_tb = tm_get_tb; + tmb->set_tb = tm_set_tb; return 1; } diff --git a/src/modules/tm/tm_load.h b/src/modules/tm/tm_load.h index bf41eb789..4d160b585 100644 --- a/src/modules/tm/tm_load.h +++ b/src/modules/tm/tm_load.h @@ -131,6 +131,8 @@ struct tm_binds trelease_t t_release_transaction; t_uas_request_clean_parsed_f t_uas_request_clean_parsed; t_no_param_f t_reply_error; + tm_get_tb_f get_tb; + tm_set_tb_f set_tb; }; typedef struct tm_binds tm_api_t; diff --git a/src/modules/topoh/th_msg.c b/src/modules/topoh/th_msg.c index 1984875e0..54d3caffe 100644 --- a/src/modules/topoh/th_msg.c +++ b/src/modules/topoh/th_msg.c @@ -177,10 +177,8 @@ int th_mask_via(sip_msg_t *msg, str *via_prefix) vlen = th_skip_rw(via->name.s, via->bsize); LM_DBG("body: %d: [%.*s]\n", vlen, vlen, via->name.s); if(i != 1) { - out.s = th_mask_encode( - via->name.s, vlen, via_prefix, &out.len); - if(out.s == NULL) - { + out.s = th_mask_encode(via->name.s, vlen, via_prefix, &out.len); + if(out.s == NULL) { LM_ERR("cannot encode via %d\n", i); return -1; } @@ -372,11 +370,11 @@ int th_unmask_via(sip_msg_t *msg, str *ip, str *cookie) LM_DBG("body: %d: [%.*s]\n", vlen, vlen, via->name.s); if(i != 1) { /* Skip if via is not encoded */ - if (th_uri_prefix_checks - && (via->host.len != ip->len - || strncasecmp(via->host.s, ip->s, ip->len) - != 0)) { - LM_DBG("via %d is not encoded - skip\n",i); + if(th_uri_prefix_checks + && (via->host.len != ip->len + || strncasecmp(via->host.s, ip->s, ip->len) + != 0)) { + LM_DBG("via %d is not encoded - skip\n", i); continue; } @@ -404,7 +402,7 @@ int th_unmask_via(sip_msg_t *msg, str *ip, str *cookie) out.s = th_mask_decode(vp->value.s, vp->value.len, &th_vparam_prefix, 0, &out.len); } - if(out.s == NULL || out.len <= 0) { + if(out.s == NULL) { LM_ERR("cannot decode via %d\n", i); return -1; } @@ -599,7 +597,7 @@ int th_flip_record_route(sip_msg_t *msg, str *uri_prefix, str *ip, int mode) case 1: /* encode */ if(act != 0 && mode == 1) { out.s = th_mask_encode(rr->nameaddr.uri.s, - rr->nameaddr.uri.len, uri_prefix, &out.len); + rr->nameaddr.uri.len, uri_prefix, &out.len); if(out.s == NULL) { LM_ERR("cannot encode r-r %d\n", i); return -1; @@ -665,10 +663,10 @@ int th_unmask_route(sip_msg_t *msg, str *uri_prefix) i++; if(i != 1) { /* Skip if route is not encoded */ - if (th_uri_prefix_checks - && ((rr->nameaddr.uri.lenlen) - || (strncasecmp(rr->nameaddr.uri.s, - uri_prefix->s, uri_prefix->len) + if(th_uri_prefix_checks + && ((rr->nameaddr.uri.len < uri_prefix->len) + || (strncasecmp(rr->nameaddr.uri.s, + uri_prefix->s, uri_prefix->len) != 0))) { LM_DBG("rr %d is not encoded: [%.*s] - missing prefix\n", i, rr->nameaddr.uri.len, rr->nameaddr.uri.s); @@ -721,12 +719,12 @@ int th_unmask_ruri(sip_msg_t *msg, str *uri_prefix) str out; /* Do nothing if ruri is not encoded */ - if (th_uri_prefix_checks - && ((REQ_LINE(msg).uri.lenlen) + if(th_uri_prefix_checks + && ((REQ_LINE(msg).uri.len < uri_prefix->len) || (strncasecmp(REQ_LINE(msg).uri.s, uri_prefix->s, uri_prefix->len) != 0))) { - LM_DBG("ruri [%.*s] is not encoded",REQ_LINE(msg).uri.len, + LM_DBG("ruri [%.*s] is not encoded", REQ_LINE(msg).uri.len, REQ_LINE(msg).uri.s); return 0; } @@ -784,11 +782,11 @@ int th_unmask_refer_to(sip_msg_t *msg, str *uri_prefix) uri = &(get_refer_to(msg)->uri); /* Do nothing if refer_to is not encoded */ - if (th_uri_prefix_checks - && ((uri->lenlen) + if(th_uri_prefix_checks + && ((uri->len < uri_prefix->len) || (strncasecmp(uri->s, uri_prefix->s, uri_prefix->len) != 0))) { - LM_DBG("refer-to [%.*s] is not encoded",uri->len,uri->s); + LM_DBG("refer-to [%.*s] is not encoded", uri->len, uri->s); return 0; } diff --git a/src/modules/topoh/topoh_mod.c b/src/modules/topoh/topoh_mod.c index fe63bf88c..b2f10d120 100644 --- a/src/modules/topoh/topoh_mod.c +++ b/src/modules/topoh/topoh_mod.c @@ -316,17 +316,26 @@ int th_build_socket_strings(socket_info_t *socket) struct str_hash_entry *table_entry = NULL; str *socket_ip = NULL; + if(socket->sockname.s == NULL || socket->sockname.len <= 0) { + LM_ERR("the socket %s has no name - it must be set\n", + socket->sock_str.s); + return -1; + } + if(str_hash_get( th_socket_hash_table, socket->sockname.s, socket->sockname.len) - != 0) + != 0) { + LM_DBG("entry found for socket name [%.*s]\n", socket->sockname.len, + socket->sockname.s); return 0; + } - socket_strings = pkg_malloc(sizeof(struct th_socket_strings)); + socket_strings = pkg_mallocxz(sizeof(struct th_socket_strings)); if(socket_strings == NULL) { PKG_MEM_ERROR_FMT("socket_strings\n"); goto error; } - table_entry = pkg_malloc(sizeof(struct str_hash_entry)); + table_entry = pkg_mallocxz(sizeof(struct str_hash_entry)); if(table_entry == NULL) { PKG_MEM_ERROR_FMT("table_entry\n"); goto error; diff --git a/src/modules/topos/tps_storage.c b/src/modules/topos/tps_storage.c index 946092c04..b0658da36 100644 --- a/src/modules/topos/tps_storage.c +++ b/src/modules/topos/tps_storage.c @@ -297,33 +297,40 @@ int tps_storage_fill_contact( /* extract the contact address */ if(parse_headers(msg, HDR_CONTACT_F, 0) < 0 || msg->contact == NULL) { - LM_WARN("bad sip message or missing Contact hdr\n"); - return -1; - } - if(parse_contact(msg->contact) < 0 - || ((contact_body_t *)msg->contact->parsed)->contacts - == NULL - || ((contact_body_t *)msg->contact->parsed) - ->contacts->next - != NULL) { - LM_ERR("bad Contact header\n"); - return -1; + if(get_cseq(msg)->method_id != METHOD_BYE) { + LM_WARN("bad sip message or missing Contact header\n"); + return -1; + } else { + LM_DBG("BYE with no contact - skipping it\n"); + } } - if(parse_uri(((contact_body_t *)msg->contact->parsed) - ->contacts->uri.s, - ((contact_body_t *)msg->contact->parsed) - ->contacts->uri.len, - &curi) - < 0) { - LM_ERR("failed to parse the contact uri\n"); - return -1; - } - if(curi.user.len > 0) { - memcpy(td->cp, curi.user.s, curi.user.len); - td->cp += curi.user.len; - cuser_len = curi.user.len; - } else { - LM_DBG("no contact user - skipping it\n"); + if(msg->contact != NULL) { + if(parse_contact(msg->contact) < 0 + || ((contact_body_t *)msg->contact->parsed) + ->contacts + == NULL + || ((contact_body_t *)msg->contact->parsed) + ->contacts->next + != NULL) { + LM_ERR("bad Contact header\n"); + return -1; + } + if(parse_uri(((contact_body_t *)msg->contact->parsed) + ->contacts->uri.s, + ((contact_body_t *)msg->contact->parsed) + ->contacts->uri.len, + &curi) + < 0) { + LM_ERR("failed to parse the contact uri\n"); + return -1; + } + if(curi.user.len > 0) { + memcpy(td->cp, curi.user.s, curi.user.len); + td->cp += curi.user.len; + cuser_len = curi.user.len; + } else { + LM_DBG("no contact user - skipping it\n"); + } } } else { /* extract the ruri */ @@ -594,6 +601,16 @@ int tps_storage_record(sip_msg_t *msg, tps_data_t *td, int dialog, int dir) str suid; str *sx = NULL; + if(parse_headers(msg, HDR_EOH_F, 0) == -1) { + return -1; + } + + if(get_cseq(msg)->method_id == METHOD_ACK) { + if(parse_headers(msg, HDR_CONTACT_F, 0) < 0 || msg->contact == NULL) { + /* ACK with no Contact - nothing to store */ + return 0; + } + } if(_tps_context_value.len > 0) { sx = &_tps_context_value; } else if(_tps_context_param.len > 0) { @@ -643,7 +660,8 @@ int tps_storage_record(sip_msg_t *msg, tps_data_t *td, int dialog, int dir) return 0; error: - LM_ERR("failed to store\n"); + LM_ERR("failed to store (dlg: %d dir: %d metid: %d)\n", dialog, dir, + get_cseq(msg)->method_id); return ret; } diff --git a/src/modules/topos_redis/topos_redis_storage.c b/src/modules/topos_redis/topos_redis_storage.c index 8009d8a00..dd4ce1b76 100644 --- a/src/modules/topos_redis/topos_redis_storage.c +++ b/src/modules/topos_redis/topos_redis_storage.c @@ -677,6 +677,9 @@ int tps_redis_load_initial_method_branch( if(rrpl->type != REDIS_REPLY_ARRAY) { LM_WARN("invalid redis result type: %d\n", rrpl->type); + if(rrpl->type == REDIS_REPLY_ERROR) { + LM_ERR("Redis error:%s\n", rrpl->str); + } freeReplyObject(rrpl); return -1; } @@ -832,6 +835,9 @@ int tps_redis_load_branch( if(rrpl->type != REDIS_REPLY_ARRAY) { LM_WARN("invalid redis result type: %d\n", rrpl->type); + if(rrpl->type == REDIS_REPLY_ERROR) { + LM_ERR("Redis error:%s\n", rrpl->str); + } freeReplyObject(rrpl); return -1; } @@ -1037,6 +1043,9 @@ int tps_redis_load_dialog(sip_msg_t *msg, tps_data_t *md, tps_data_t *sd) if(rrpl->type != REDIS_REPLY_ARRAY) { LM_WARN("invalid redis result type: %d\n", rrpl->type); + if(rrpl->type == REDIS_REPLY_ERROR) { + LM_ERR("Redis error:%s\n", rrpl->str); + } freeReplyObject(rrpl); return -1; } diff --git a/src/modules/tsilo/tsilo.c b/src/modules/tsilo/tsilo.c index 5fe6535ba..383b09328 100644 --- a/src/modules/tsilo/tsilo.c +++ b/src/modules/tsilo/tsilo.c @@ -442,19 +442,19 @@ static int w_ts_append_by_contact2( if(ts_check_uri(&ruri) < 0) { LM_ERR("failed to parse R-URI.\n"); - return -1; + goto error; } /* parse Contact header */ if((!_msg->contact && parse_headers(_msg, HDR_CONTACT_F, 0) != 0) || !_msg->contact) { LM_WARN("missing contact header or the value is empty/malformed.\n"); - return -1; + goto error; } if(_msg->contact) { if(parse_contact(_msg->contact) < 0) { LM_WARN("failed to parse Contact header.\n"); - return -1; + goto error; } if(parse_uri(((struct contact_body *)_msg->contact->parsed) ->contacts->uri.s, @@ -464,7 +464,7 @@ static int w_ts_append_by_contact2( != 0) { if(ts_check_uri(&_msg->contact->body) < 0) { /* one more attempt */ LM_WARN("failed to parse Contact header.\n"); - return -1; + goto error; } } @@ -473,7 +473,7 @@ static int w_ts_append_by_contact2( tmp_contact.s = (char *)pkg_malloc(tmp_contact.len + 1); if(tmp_contact.s == NULL) { PKG_MEM_ERROR; - return -1; + goto error; } memcpy(tmp_contact.s, ((struct contact_body *)_msg->contact->parsed)->contacts->uri.s, @@ -485,7 +485,7 @@ static int w_ts_append_by_contact2( < 0) { /* one more attempt */ LM_ERR("problems when calling ts_append_contact(), cannot copy " "Contact parameter.\n"); - return -1; + goto error; } } } @@ -499,6 +499,18 @@ static int w_ts_append_by_contact2( pkg_free(tmp_contact.s); return rc; + +error: + if(ruri.s != NULL) { + pkg_free(ruri.s); + } + if(contact.s != NULL) { + pkg_free(contact.s); + } + if(tmp_contact.s != NULL) { + pkg_free(tmp_contact.s); + } + return -1; } /** @@ -521,11 +533,11 @@ static int ki_ts_append_by_contact(sip_msg_t *_msg, str *_table, str *_ruri) /* parse Contact header */ if((!_msg->contact && parse_headers(_msg, HDR_CONTACT_F, 0) != 0) || !_msg->contact) - return -1; + goto error; if(_msg->contact) { if(parse_contact(_msg->contact) < 0) - return -1; + goto error; if(parse_uri(((struct contact_body *)_msg->contact->parsed) ->contacts->uri.s, ((struct contact_body *)_msg->contact->parsed) @@ -533,7 +545,7 @@ static int ki_ts_append_by_contact(sip_msg_t *_msg, str *_table, str *_ruri) &curi) != 0) { if(ts_check_uri(&_msg->contact->body) < 0) /* one more attempt */ - return -1; + goto error; } tmp_contact.len = ((struct contact_body *)_msg->contact->parsed) @@ -541,7 +553,7 @@ static int ki_ts_append_by_contact(sip_msg_t *_msg, str *_table, str *_ruri) tmp_contact.s = (char *)pkg_malloc(tmp_contact.len + 1); if(tmp_contact.s == NULL) { PKG_MEM_ERROR; - return -1; + goto error; } memcpy(tmp_contact.s, ((struct contact_body *)_msg->contact->parsed)->contacts->uri.s, @@ -551,7 +563,7 @@ static int ki_ts_append_by_contact(sip_msg_t *_msg, str *_table, str *_ruri) if(pkg_str_dup(&contact, &tmp_contact) < 0) { if(pkg_str_dup(&contact, &_msg->contact->body) < 0) /* one more attempt */ - return -1; + goto error; } } @@ -563,6 +575,18 @@ static int ki_ts_append_by_contact(sip_msg_t *_msg, str *_table, str *_ruri) pkg_free(tmp_contact.s); return rc; + +error: + if(ruri.s != NULL) { + pkg_free(ruri.s); + } + if(contact.s != NULL) { + pkg_free(contact.s); + } + if(tmp_contact.s != NULL) { + pkg_free(tmp_contact.s); + } + return -1; } /** @@ -601,27 +625,33 @@ static int w_ts_append_by_contact3( if(ts_check_uri(&ruri) < 0) { LM_ERR("failed to parse R-URI.\n"); + pkg_free(ruri.s); return -1; } /* parse Contact header */ if(fixup_get_svalue(_msg, (gparam_t *)_contact, &contact_fixed) != 0) { LM_ERR("failed to convert contact parameter\n"); + pkg_free(ruri.s); return -1; } if(contact_fixed.s == NULL || contact_fixed.len <= 0) { LM_ERR("invalid contact parameter value\n"); + pkg_free(ruri.s); return -1; } if(pkg_str_dup(&contact, &contact_fixed) < 0) { LM_ERR("failed to copy r-uri parameter\n"); + pkg_free(ruri.s); return -1; } if(ts_check_uri(&contact) < 0) { LM_ERR("failed to parse Contact parameter.\n"); + pkg_free(ruri.s); + pkg_free(contact.s); return -1; } @@ -646,16 +676,22 @@ static int ki_ts_append_by_contact_uri( int rc; /* parse R-URI */ - if(ts_check_uri(_ruri) < 0) + if(ts_check_uri(_ruri) < 0) { return -1; - if(pkg_str_dup(&ruri, _ruri) < 0) + } + if(pkg_str_dup(&ruri, _ruri) < 0) { return -1; + } /* parse Contact header */ - if(ts_check_uri(_contact) < 0) + if(ts_check_uri(_contact) < 0) { + pkg_free(ruri.s); return -1; - if(pkg_str_dup(&contact, _contact) < 0) + } + if(pkg_str_dup(&contact, _contact) < 0) { + pkg_free(ruri.s); return -1; + } /* contact must be of syntax: sip:@: with no parameters list */ rc = ts_append(_msg, &ruri, &contact, _table->s); diff --git a/src/modules/usrloc/ul_keepalive.c b/src/modules/usrloc/ul_keepalive.c index e5a013b45..16fb66021 100644 --- a/src/modules/usrloc/ul_keepalive.c +++ b/src/modules/usrloc/ul_keepalive.c @@ -148,7 +148,8 @@ int ul_ka_urecord(urecord_t *ur) } } - if(ul_keepalive_timeout > 0 && uc->last_keepalive > 0) { + if(ul_keepalive_timeout > 0 && uc->last_keepalive > 0 + && (uc->flags & FL_KASENT)) { if(uc->last_keepalive + ul_keepalive_timeout < tnow) { /* set contact as expired in 10s */ LM_DBG("set expired contact on keepalive (%u + %u < %u)" @@ -257,7 +258,9 @@ int ul_ka_urecord(urecord_t *ur) kabuf_len, kabuf); kamsg.s = kabuf; kamsg.len = kabuf_len; - ul_ka_send(&kamsg, &idst); + if(ul_ka_send(&kamsg, &idst) >= 0) { + uc->flags |= FL_KASENT; + } } } return 0; diff --git a/src/modules/usrloc/usrloc.h b/src/modules/usrloc/usrloc.h index 54f798608..370baf0da 100644 --- a/src/modules/usrloc/usrloc.h +++ b/src/modules/usrloc/usrloc.h @@ -63,6 +63,7 @@ typedef enum flags FL_MEM = 1 << 0, /*!< Update memory only */ FL_DMQRPL = 1 << 1, /*!< DMQ replication */ FL_EXPCLB = 1 << 2, /*!< Expired callback executed */ + FL_KASENT = 1 << 3, /*!< Keepalive sent to contact */ FL_ALL = (int)0xFFFFFFFF /*!< All flags set */ } flags_t; diff --git a/src/modules/utils/xcap_auth.c b/src/modules/utils/xcap_auth.c index 3824b2d48..5c986a18c 100644 --- a/src/modules/utils/xcap_auth.c +++ b/src/modules/utils/xcap_auth.c @@ -418,11 +418,13 @@ int get_rules_doc(str *user, str *domain, int type, str **rules_doc) doc = (str *)pkg_malloc(sizeof(str)); if(doc == NULL) { PKG_MEM_ERROR; + goto error; } doc->s = (char *)pkg_malloc(body.len * sizeof(char)); if(doc->s == NULL) { pkg_free(doc); PKG_MEM_ERROR; + goto error; } memcpy(doc->s, body.s, body.len); doc->len = body.len; @@ -514,4 +516,4 @@ int w_xcap_auth_status(struct sip_msg *_msg, char *_sp1, char *_sp2) } return ki_xcap_auth_status(_msg, &watcher_uri, &presentity_uri); -} \ No newline at end of file +} diff --git a/src/modules/xlog/xlog.c b/src/modules/xlog/xlog.c index c7d239ea2..24bc30031 100644 --- a/src/modules/xlog/xlog.c +++ b/src/modules/xlog/xlog.c @@ -883,6 +883,7 @@ int ki_xlog_ex(sip_msg_t *msg, str *lfacility, int llevel, str *lmsg) int lf = xlog_facility; pv_elem_t *xmodel = NULL; str txt = {0, 0}; + char *_xlog_prefix_val = _xlog_prefix; if(!is_printable(llevel)) return 1; @@ -898,6 +899,18 @@ int ki_xlog_ex(sip_msg_t *msg, str *lfacility, int llevel, str *lmsg) return -1; } + if(_xlog_prefix_mode) { + str _xlog_prefix_str; + _xlog_prefix_str.s = _xlog_prefix_buf; + _xlog_prefix_str.len = buf_size; + if(pv_printf(msg, _xlog_prefix_pvs, _xlog_prefix_str.s, + &_xlog_prefix_str.len) + == 0 + && _xlog_prefix_str.len > 0) { + _xlog_prefix_val = _xlog_prefix_buf; + } + } + if(lfacility != NULL) { lfacility->s[lfacility->len] = '\0'; lf = str2facility(lfacility->s); @@ -907,8 +920,7 @@ int ki_xlog_ex(sip_msg_t *msg, str *lfacility, int llevel, str *lmsg) lf = xlog_facility; } } - LOG_FN(lf, llevel, _xlog_prefix, "%.*s", txt.len, txt.s); - ; + LOG_FN(lf, llevel, _xlog_prefix_val, "%.*s", txt.len, txt.s); pv_elem_free_all(xmodel); return 1; } @@ -921,10 +933,12 @@ int ki_xlog_get_level(str *slevel) llevel = L_ALERT; } else if(slevel->len == 5 && strncasecmp(slevel->s, "l_bug", 5) == 0) { llevel = L_BUG; + } else if(slevel->len == 7 && strncasecmp(slevel->s, "l_crit0", 7) == 0) { + llevel = L_CRIT; } else if(slevel->len == 7 && strncasecmp(slevel->s, "l_crit2", 7) == 0) { llevel = L_CRIT2; } else if(slevel->len == 6 && strncasecmp(slevel->s, "l_crit", 6) == 0) { - llevel = L_CRIT; + llevel = L_CRIT2; } else if(slevel->len == 5 && strncasecmp(slevel->s, "l_err", 5) == 0) { llevel = L_ERR; } else if(slevel->len == 6 && strncasecmp(slevel->s, "l_warn", 6) == 0) { @@ -986,7 +1000,7 @@ int ki_xalert(sip_msg_t *msg, str *lmsg) int ki_xcrit(sip_msg_t *msg, str *lmsg) { - return ki_xlog_ex(msg, NULL, L_CRIT, lmsg); + return ki_xlog_ex(msg, NULL, L_CRIT2, lmsg); } /** diff --git a/src/modules/xmlrpc/xmlrpc.c b/src/modules/xmlrpc/xmlrpc.c index 347af5658..ac6f9a2a1 100644 --- a/src/modules/xmlrpc/xmlrpc.c +++ b/src/modules/xmlrpc/xmlrpc.c @@ -2019,7 +2019,7 @@ static int rpc_struct_printf( struct rpc_struct *s, char *member_name, char *fmt, ...) { int n, buf_size; - char *buf; + char *buf = NULL; va_list ap; str st, name; struct xmlrpc_reply *reply; @@ -2071,6 +2071,7 @@ static int rpc_struct_printf( if(add_xmlrpc_reply(out, &member_suffix) < 0) goto err; + mxr_free(buf); return 0; } /* Else try again with more space. */ @@ -2085,7 +2086,7 @@ static int rpc_struct_printf( goto err; } } - return 0; + err: if(buf) mxr_free(buf); @@ -2740,7 +2741,7 @@ static int ki_xmlrpc_reply(sip_msg_t *msg, int rcode, str *reason) if(add_xmlrpc_reply(&reply, &int_suffix) < 0) goto error; if(add_xmlrpc_reply(&reply, &success_suffix) < 0) - return -1; + goto error; } if(send_reply(msg, &reply.body) < 0) goto error; diff --git a/src/modules/xprint/xp_lib.c b/src/modules/xprint/xp_lib.c index 969812b70..59c2d8730 100644 --- a/src/modules/xprint/xp_lib.c +++ b/src/modules/xprint/xp_lib.c @@ -56,7 +56,10 @@ static str str_null = STR_STATIC_INIT(""); static str str_empty = STR_STATIC_INIT(""); static str str_per = STR_STATIC_INIT("%"); -static str str_hostname, str_domainname, str_fullname, str_ipaddr; +static str str_hostname = STR_NULL; +static str str_domainname = STR_NULL; +static str str_fullname = STR_NULL; +static str str_ipaddr = STR_NULL; enum xl_host_t { @@ -1834,14 +1837,7 @@ int xl_mod_init() PKG_MEM_ERROR; return -1; } - if(gethostname(s, HOSTNAME_MAX) < 0) { - str_fullname.len = 0; - str_fullname.s = NULL; - str_hostname.len = 0; - str_hostname.s = NULL; - str_domainname.len = 0; - str_domainname.s = NULL; - } else { + if(gethostname(s, HOSTNAME_MAX) >= 0) { str_fullname.len = strlen(s); s = pkg_reallocxf( s, str_fullname.len + 1); /* this will leave the ending \0 */ @@ -1869,8 +1865,6 @@ int xl_mod_init() } } - str_ipaddr.len = 0; - str_ipaddr.s = NULL; if(str_fullname.len) { he = resolvehost(str_fullname.s); if(he) { @@ -1893,10 +1887,13 @@ int xl_mod_init() if(str_ipaddr.s) { memcpy(str_ipaddr.s, s, str_ipaddr.len); str_ipaddr.s[str_ipaddr.len] = '\0'; + break; } else { pkg_free(s); + s = NULL; str_ipaddr.len = 0; PKG_MEM_ERROR_FMT("for str_ipaddr\n"); + return -1; } } else if(strncmp(str_ipaddr.s, s, str_ipaddr.len) != 0) { @@ -1913,7 +1910,8 @@ int xl_mod_init() } } } - pkg_free(s); + if(s != NULL) + pkg_free(s); DBG("Hostname: %.*s\n", str_hostname.len, ZSW(str_hostname.s)); DBG("Domainname: %.*s\n", str_domainname.len, ZSW(str_domainname.s)); diff --git a/utils/kamctl/db_berkeley/kamailio/nds_trusted_domains b/utils/kamctl/db_berkeley/kamailio/nds_trusted_domains new file mode 100644 index 000000000..945173fcf --- /dev/null +++ b/utils/kamctl/db_berkeley/kamailio/nds_trusted_domains @@ -0,0 +1,12 @@ +METADATA_COLUMNS +id(int) trusted_domain(str) +METADATA_KEY + +METADATA_READONLY +0 +METADATA_LOGFLAGS +0 +METADATA_DEFAULTS +NIL|'' +nds_trusted_domains| +nds_trusted_domains|1 diff --git a/utils/kamctl/db_berkeley/kamailio/s_cscf b/utils/kamctl/db_berkeley/kamailio/s_cscf new file mode 100644 index 000000000..f2b9d3f92 --- /dev/null +++ b/utils/kamctl/db_berkeley/kamailio/s_cscf @@ -0,0 +1,12 @@ +METADATA_COLUMNS +id(int) name(str) s_cscf_uri(str) +METADATA_KEY + +METADATA_READONLY +0 +METADATA_LOGFLAGS +0 +METADATA_DEFAULTS +NIL|''|'' +s_cscf| +s_cscf|1 diff --git a/utils/kamctl/db_berkeley/kamailio/s_cscf_capabilities b/utils/kamctl/db_berkeley/kamailio/s_cscf_capabilities new file mode 100644 index 000000000..38da4a353 --- /dev/null +++ b/utils/kamctl/db_berkeley/kamailio/s_cscf_capabilities @@ -0,0 +1,12 @@ +METADATA_COLUMNS +id(int) id_s_cscf(int) capability(int) +METADATA_KEY + +METADATA_READONLY +0 +METADATA_LOGFLAGS +0 +METADATA_DEFAULTS +NIL|0|0 +s_cscf_capabilities| +s_cscf_capabilities|1 diff --git a/utils/kamctl/db_redis/kamailio/nds_trusted_domains b/utils/kamctl/db_redis/kamailio/nds_trusted_domains new file mode 100644 index 000000000..006103922 --- /dev/null +++ b/utils/kamctl/db_redis/kamailio/nds_trusted_domains @@ -0,0 +1,2 @@ +id/int,trusted_domain/string, +1 diff --git a/utils/kamctl/db_redis/kamailio/s_cscf b/utils/kamctl/db_redis/kamailio/s_cscf new file mode 100644 index 000000000..e35a8e1c2 --- /dev/null +++ b/utils/kamctl/db_redis/kamailio/s_cscf @@ -0,0 +1,2 @@ +id/int,name/string,s_cscf_uri/string, +1 diff --git a/utils/kamctl/db_redis/kamailio/s_cscf_capabilities b/utils/kamctl/db_redis/kamailio/s_cscf_capabilities new file mode 100644 index 000000000..6c070b010 --- /dev/null +++ b/utils/kamctl/db_redis/kamailio/s_cscf_capabilities @@ -0,0 +1,2 @@ +id/int,id_s_cscf/int,capability/int, +1 diff --git a/utils/kamctl/db_sqlite/ims_icscf-create.sql b/utils/kamctl/db_sqlite/ims_icscf-create.sql new file mode 100644 index 000000000..18b433fe3 --- /dev/null +++ b/utils/kamctl/db_sqlite/ims_icscf-create.sql @@ -0,0 +1,25 @@ +CREATE TABLE nds_trusted_domains ( + id INTEGER PRIMARY KEY NOT NULL, + trusted_domain VARCHAR(83) DEFAULT '' NOT NULL +); + +INSERT INTO version (table_name, table_version) values ('nds_trusted_domains','1'); + +CREATE TABLE s_cscf ( + id INTEGER PRIMARY KEY NOT NULL, + name VARCHAR(83) DEFAULT '' NOT NULL, + s_cscf_uri VARCHAR(83) DEFAULT '' NOT NULL +); + +INSERT INTO version (table_name, table_version) values ('s_cscf','1'); + +CREATE TABLE s_cscf_capabilities ( + id INTEGER PRIMARY KEY NOT NULL, + id_s_cscf INTEGER DEFAULT 0 NOT NULL, + capability INTEGER DEFAULT 0 NOT NULL +); + +CREATE INDEX s_cscf_capabilities_idx_capability ON s_cscf_capabilities (capability); +CREATE INDEX s_cscf_capabilities_idx_id_s_cscf ON s_cscf_capabilities (id_s_cscf); + +INSERT INTO version (table_name, table_version) values ('s_cscf_capabilities','1'); diff --git a/utils/kamctl/dbtext/kamailio/nds_trusted_domains b/utils/kamctl/dbtext/kamailio/nds_trusted_domains new file mode 100644 index 000000000..5efb379ff --- /dev/null +++ b/utils/kamctl/dbtext/kamailio/nds_trusted_domains @@ -0,0 +1,2 @@ +id(int,auto) trusted_domain(string) +0:nds_trusted_domains:1 diff --git a/utils/kamctl/dbtext/kamailio/s_cscf b/utils/kamctl/dbtext/kamailio/s_cscf new file mode 100644 index 000000000..6d32c1f1b --- /dev/null +++ b/utils/kamctl/dbtext/kamailio/s_cscf @@ -0,0 +1,2 @@ +id(int,auto) name(string) s_cscf_uri(string) +0:s_cscf:1 diff --git a/utils/kamctl/dbtext/kamailio/s_cscf_capabilities b/utils/kamctl/dbtext/kamailio/s_cscf_capabilities new file mode 100644 index 000000000..a7dfd529b --- /dev/null +++ b/utils/kamctl/dbtext/kamailio/s_cscf_capabilities @@ -0,0 +1,2 @@ +id(int,auto) id_s_cscf(int) capability(int) +0:s_cscf_capabilities:1 diff --git a/utils/kamctl/kamdbctl.base b/utils/kamctl/kamdbctl.base index 4a3beccae..8126f303d 100644 --- a/utils/kamctl/kamdbctl.base +++ b/utils/kamctl/kamdbctl.base @@ -42,7 +42,7 @@ EXTRA_TABLES=${EXTRA_TABLES:-'imc_members imc_rooms cpl sip_trace domainpolicy carrierroute carrier_name domain_name carrierfailureroute userblocklist globalblocklist htable purplemap uacreg pl_pipes mtree mtrees sca_subscriptions mohqcalls mohqueues rtpproxy rtpengine - dr_gateways dr_rules dr_gw_lists dr_groups secfilter'} + dr_gateways dr_rules dr_gw_lists dr_groups secfilter nds_trusted_domains s_cscf s_cscf_capabilities'} PRESENCE_TABLES=${PRESENCE_TABLES:-'presentity active_watchers watchers xcap pua rls_presentity rls_watchers'} DBUID_TABLES=${UID_TABLES:-'uid_credentials uid_domain uid_domain_attrs @@ -77,7 +77,7 @@ PRESENCE_MODULES=${PRESENCE_MODULES:-'presence rls'} EXTRA_MODULES=${EXTRA_MODULES:-'imc cpl siptrace domainpolicy carrierroute drouting userblocklist htable purple uac pipelimit mtree sca mohqueue - rtpproxy rtpengine secfilter'} + rtpproxy rtpengine secfilter ims_icscf'} DBUID_MODULES=${UID_MODULES:-'uid_auth_db uid_avp_db uid_domain uid_gflags uid_uri_db'} diff --git a/utils/kamctl/mongodb/kamailio/nds_trusted_domains.json b/utils/kamctl/mongodb/kamailio/nds_trusted_domains.json new file mode 100644 index 000000000..5cd75fcaf --- /dev/null +++ b/utils/kamctl/mongodb/kamailio/nds_trusted_domains.json @@ -0,0 +1,16 @@ +{ + "name": "nds_trusted_domains", + "version": 1, + "columns": [ + "id": { + "type": "int", + "default": null, + "null": false + }, + "trusted_domain": { + "type": "string", + "default": "", + "null": false + } + ] +} diff --git a/utils/kamctl/mongodb/kamailio/s_cscf.json b/utils/kamctl/mongodb/kamailio/s_cscf.json new file mode 100644 index 000000000..2558ea718 --- /dev/null +++ b/utils/kamctl/mongodb/kamailio/s_cscf.json @@ -0,0 +1,21 @@ +{ + "name": "s_cscf", + "version": 1, + "columns": [ + "id": { + "type": "int", + "default": null, + "null": false + }, + "name": { + "type": "string", + "default": "", + "null": false + }, + "s_cscf_uri": { + "type": "string", + "default": "", + "null": false + } + ] +} diff --git a/utils/kamctl/mongodb/kamailio/s_cscf_capabilities.json b/utils/kamctl/mongodb/kamailio/s_cscf_capabilities.json new file mode 100644 index 000000000..c94ae631b --- /dev/null +++ b/utils/kamctl/mongodb/kamailio/s_cscf_capabilities.json @@ -0,0 +1,21 @@ +{ + "name": "s_cscf_capabilities", + "version": 1, + "columns": [ + "id": { + "type": "int", + "default": null, + "null": false + }, + "id_s_cscf": { + "type": "int", + "default": 0, + "null": false + }, + "capability": { + "type": "int", + "default": 0, + "null": false + } + ] +} diff --git a/utils/kamctl/mysql/ims_icscf-create.sql b/utils/kamctl/mysql/ims_icscf-create.sql new file mode 100644 index 000000000..f8c76f243 --- /dev/null +++ b/utils/kamctl/mysql/ims_icscf-create.sql @@ -0,0 +1,25 @@ +CREATE TABLE `nds_trusted_domains` ( + `id` INT(10) AUTO_INCREMENT PRIMARY KEY NOT NULL, + `trusted_domain` VARCHAR(83) DEFAULT '' NOT NULL +); + +INSERT INTO version (table_name, table_version) values ('nds_trusted_domains','1'); + +CREATE TABLE `s_cscf` ( + `id` INT(10) AUTO_INCREMENT PRIMARY KEY NOT NULL, + `name` VARCHAR(83) DEFAULT '' NOT NULL, + `s_cscf_uri` VARCHAR(83) DEFAULT '' NOT NULL +); + +INSERT INTO version (table_name, table_version) values ('s_cscf','1'); + +CREATE TABLE `s_cscf_capabilities` ( + `id` INT(10) AUTO_INCREMENT PRIMARY KEY NOT NULL, + `id_s_cscf` INT(11) DEFAULT 0 NOT NULL, + `capability` INT(11) DEFAULT 0 NOT NULL +); + +CREATE INDEX idx_capability ON s_cscf_capabilities (`capability`); +CREATE INDEX idx_id_s_cscf ON s_cscf_capabilities (`id_s_cscf`); + +INSERT INTO version (table_name, table_version) values ('s_cscf_capabilities','1'); diff --git a/utils/kamctl/oracle/ims_icscf-create.sql b/utils/kamctl/oracle/ims_icscf-create.sql new file mode 100644 index 000000000..e988b5b2a --- /dev/null +++ b/utils/kamctl/oracle/ims_icscf-create.sql @@ -0,0 +1,49 @@ +CREATE TABLE nds_trusted_domains ( + id NUMBER(10) PRIMARY KEY, + trusted_domain VARCHAR2(83) DEFAULT '' +); + +CREATE OR REPLACE TRIGGER nds_trusted_domains_tr +before insert on nds_trusted_domains FOR EACH ROW +BEGIN + auto_id(:NEW.id); +END nds_trusted_domains_tr; +/ +BEGIN map2users('nds_trusted_domains'); END; +/ +INSERT INTO version (table_name, table_version) values ('nds_trusted_domains','1'); + +CREATE TABLE s_cscf ( + id NUMBER(10) PRIMARY KEY, + name VARCHAR2(83) DEFAULT '', + s_cscf_uri VARCHAR2(83) DEFAULT '' +); + +CREATE OR REPLACE TRIGGER s_cscf_tr +before insert on s_cscf FOR EACH ROW +BEGIN + auto_id(:NEW.id); +END s_cscf_tr; +/ +BEGIN map2users('s_cscf'); END; +/ +INSERT INTO version (table_name, table_version) values ('s_cscf','1'); + +CREATE TABLE s_cscf_capabilities ( + id NUMBER(10) PRIMARY KEY, + id_s_cscf NUMBER(10) DEFAULT 0 NOT NULL, + capability NUMBER(10) DEFAULT 0 NOT NULL +); + +CREATE OR REPLACE TRIGGER s_cscf_capabilities_tr +before insert on s_cscf_capabilities FOR EACH ROW +BEGIN + auto_id(:NEW.id); +END s_cscf_capabilities_tr; +/ +BEGIN map2users('s_cscf_capabilities'); END; +/ +CREATE INDEX ORA_idx_capability ON s_cscf_capabilities (capability); +CREATE INDEX ORA_idx_id_s_cscf ON s_cscf_capabilities (id_s_cscf); + +INSERT INTO version (table_name, table_version) values ('s_cscf_capabilities','1'); diff --git a/utils/kamctl/postgres/ims_icscf-create.sql b/utils/kamctl/postgres/ims_icscf-create.sql new file mode 100644 index 000000000..f8bb8030d --- /dev/null +++ b/utils/kamctl/postgres/ims_icscf-create.sql @@ -0,0 +1,25 @@ +CREATE TABLE nds_trusted_domains ( + id SERIAL PRIMARY KEY NOT NULL, + trusted_domain VARCHAR(83) DEFAULT '' NOT NULL +); + +INSERT INTO version (table_name, table_version) values ('nds_trusted_domains','1'); + +CREATE TABLE s_cscf ( + id SERIAL PRIMARY KEY NOT NULL, + name VARCHAR(83) DEFAULT '' NOT NULL, + s_cscf_uri VARCHAR(83) DEFAULT '' NOT NULL +); + +INSERT INTO version (table_name, table_version) values ('s_cscf','1'); + +CREATE TABLE s_cscf_capabilities ( + id SERIAL PRIMARY KEY NOT NULL, + id_s_cscf INTEGER DEFAULT 0 NOT NULL, + capability INTEGER DEFAULT 0 NOT NULL +); + +CREATE INDEX s_cscf_capabilities_idx_capability ON s_cscf_capabilities (capability); +CREATE INDEX s_cscf_capabilities_idx_id_s_cscf ON s_cscf_capabilities (id_s_cscf); + +INSERT INTO version (table_name, table_version) values ('s_cscf_capabilities','1'); diff --git a/utils/kamctl/xhttp_pi/acc-mod b/utils/kamctl/xhttp_pi/acc-mod index a7d058c08..5485b15de 100644 --- a/utils/kamctl/xhttp_pi/acc-mod +++ b/utils/kamctl/xhttp_pi/acc-mod @@ -1,4 +1,4 @@ - + acc show acc @@ -51,7 +51,7 @@ - + acc_cdrs show acc_cdrs @@ -92,7 +92,7 @@ - + missed_calls show missed_calls diff --git a/utils/kamctl/xhttp_pi/alias_db-mod b/utils/kamctl/xhttp_pi/alias_db-mod index c59a1befb..62c97d72b 100644 --- a/utils/kamctl/xhttp_pi/alias_db-mod +++ b/utils/kamctl/xhttp_pi/alias_db-mod @@ -1,4 +1,4 @@ - + dbaliases show dbaliases diff --git a/utils/kamctl/xhttp_pi/auth_db-mod b/utils/kamctl/xhttp_pi/auth_db-mod index e1b966631..019d367cb 100644 --- a/utils/kamctl/xhttp_pi/auth_db-mod +++ b/utils/kamctl/xhttp_pi/auth_db-mod @@ -1,4 +1,4 @@ - + subscriber show subscriber diff --git a/utils/kamctl/xhttp_pi/avpops-mod b/utils/kamctl/xhttp_pi/avpops-mod index 9b8b6da74..845714526 100644 --- a/utils/kamctl/xhttp_pi/avpops-mod +++ b/utils/kamctl/xhttp_pi/avpops-mod @@ -1,4 +1,4 @@ - + usr_preferences show usr_preferences diff --git a/utils/kamctl/xhttp_pi/carrierroute-mod b/utils/kamctl/xhttp_pi/carrierroute-mod index e170941af..0623cf1c3 100644 --- a/utils/kamctl/xhttp_pi/carrierroute-mod +++ b/utils/kamctl/xhttp_pi/carrierroute-mod @@ -1,4 +1,4 @@ - + carrierroute show carrierroute @@ -63,7 +63,7 @@ - + carrierfailureroute show carrierfailureroute @@ -122,7 +122,7 @@ - + carrier_name show carrier_name @@ -157,7 +157,7 @@ - + domain_name show domain_name diff --git a/utils/kamctl/xhttp_pi/cpl-mod b/utils/kamctl/xhttp_pi/cpl-mod index 33e1cb303..a35dc31d3 100644 --- a/utils/kamctl/xhttp_pi/cpl-mod +++ b/utils/kamctl/xhttp_pi/cpl-mod @@ -1,4 +1,4 @@ - + cpl show cpl diff --git a/utils/kamctl/xhttp_pi/dialog-mod b/utils/kamctl/xhttp_pi/dialog-mod index fec8aef9e..db4295cb8 100644 --- a/utils/kamctl/xhttp_pi/dialog-mod +++ b/utils/kamctl/xhttp_pi/dialog-mod @@ -1,4 +1,4 @@ - + dialog show dialog @@ -99,7 +99,7 @@ - + dialog_vars show dialog_vars diff --git a/utils/kamctl/xhttp_pi/dialplan-mod b/utils/kamctl/xhttp_pi/dialplan-mod index 87d853f9c..c84f022e7 100644 --- a/utils/kamctl/xhttp_pi/dialplan-mod +++ b/utils/kamctl/xhttp_pi/dialplan-mod @@ -1,4 +1,4 @@ - + dialplan show dialplan diff --git a/utils/kamctl/xhttp_pi/dispatcher-mod b/utils/kamctl/xhttp_pi/dispatcher-mod index 9a63dbc67..b24acda44 100644 --- a/utils/kamctl/xhttp_pi/dispatcher-mod +++ b/utils/kamctl/xhttp_pi/dispatcher-mod @@ -1,4 +1,4 @@ - + dispatcher show dispatcher diff --git a/utils/kamctl/xhttp_pi/domain-mod b/utils/kamctl/xhttp_pi/domain-mod index 040a96aed..10049b306 100644 --- a/utils/kamctl/xhttp_pi/domain-mod +++ b/utils/kamctl/xhttp_pi/domain-mod @@ -1,4 +1,4 @@ - + domain show domain @@ -39,7 +39,7 @@ - + domain_attrs show domain_attrs diff --git a/utils/kamctl/xhttp_pi/domainpolicy-mod b/utils/kamctl/xhttp_pi/domainpolicy-mod index 1e2b1e92b..93bf0fd8e 100644 --- a/utils/kamctl/xhttp_pi/domainpolicy-mod +++ b/utils/kamctl/xhttp_pi/domainpolicy-mod @@ -1,4 +1,4 @@ - + domainpolicy show domainpolicy diff --git a/utils/kamctl/xhttp_pi/drouting-mod b/utils/kamctl/xhttp_pi/drouting-mod index 11739f463..0d95ab170 100644 --- a/utils/kamctl/xhttp_pi/drouting-mod +++ b/utils/kamctl/xhttp_pi/drouting-mod @@ -1,4 +1,4 @@ - + dr_gateways show dr_gateways @@ -48,7 +48,7 @@ - + dr_rules show dr_rules @@ -101,7 +101,7 @@ - + dr_gw_lists show dr_gw_lists @@ -139,7 +139,7 @@ - + dr_groups show dr_groups diff --git a/utils/kamctl/xhttp_pi/group-mod b/utils/kamctl/xhttp_pi/group-mod index b99bc21c7..3f71a7552 100644 --- a/utils/kamctl/xhttp_pi/group-mod +++ b/utils/kamctl/xhttp_pi/group-mod @@ -1,4 +1,4 @@ - + grp show grp @@ -42,7 +42,7 @@ - + re_grp show re_grp diff --git a/utils/kamctl/xhttp_pi/htable-mod b/utils/kamctl/xhttp_pi/htable-mod index fa330bb85..c01eee869 100644 --- a/utils/kamctl/xhttp_pi/htable-mod +++ b/utils/kamctl/xhttp_pi/htable-mod @@ -1,4 +1,4 @@ - + htable show htable diff --git a/utils/kamctl/xhttp_pi/imc-mod b/utils/kamctl/xhttp_pi/imc-mod index 4109b6abd..f4fc9e251 100644 --- a/utils/kamctl/xhttp_pi/imc-mod +++ b/utils/kamctl/xhttp_pi/imc-mod @@ -1,4 +1,4 @@ - + imc_rooms show imc_rooms @@ -39,7 +39,7 @@ - + imc_members show imc_members diff --git a/utils/kamctl/xhttp_pi/ims_icscf-mod b/utils/kamctl/xhttp_pi/ims_icscf-mod new file mode 100644 index 000000000..9bb4f8f10 --- /dev/null +++ b/utils/kamctl/xhttp_pi/ims_icscf-mod @@ -0,0 +1,111 @@ + + nds_trusted_domains + show + nds_trusted_domains + DB1_QUERY + +
idupdate + trusted_domain + + + add + nds_trusted_domains + DB1_INSERT + + trusted_domain + + + update + nds_trusted_domains + DB1_UPDATE + + id= + + + trusted_domain + + + delete + nds_trusted_domains + DB1_DELETE + + id= + + + + + s_cscf + show + s_cscf + DB1_QUERY + + idupdate + name + s_cscf_uri + + + add + s_cscf + DB1_INSERT + + name + s_cscf_uri + + + update + s_cscf + DB1_UPDATE + + id= + + + name + s_cscf_uri + + + delete + s_cscf + DB1_DELETE + + id= + + + + + s_cscf_capabilities + show + s_cscf_capabilities + DB1_QUERY + + idupdate + id_s_cscf + capability + + + add + s_cscf_capabilities + DB1_INSERT + + id_s_cscf + capability + + + update + s_cscf_capabilities + DB1_UPDATE + + id= + + + id_s_cscf + capability + + + delete + s_cscf_capabilities + DB1_DELETE + + id= + + + diff --git a/utils/kamctl/xhttp_pi/ims_icscf-table b/utils/kamctl/xhttp_pi/ims_icscf-table new file mode 100644 index 000000000..1c78977bb --- /dev/null +++ b/utils/kamctl/xhttp_pi/ims_icscf-table @@ -0,0 +1,23 @@ + + + nds_trusted_domains + mysql + idDB1_INT + trusted_domainDB1_STR + + + + s_cscf + mysql + idDB1_INT + nameDB1_STR + s_cscf_uriDB1_STR + + + + s_cscf_capabilities + mysql + idDB1_INT + id_s_cscfDB1_INT + capabilityDB1_INT + diff --git a/utils/kamctl/xhttp_pi/lcr-mod b/utils/kamctl/xhttp_pi/lcr-mod index f9876b612..b329d1f9d 100644 --- a/utils/kamctl/xhttp_pi/lcr-mod +++ b/utils/kamctl/xhttp_pi/lcr-mod @@ -1,4 +1,4 @@ - + lcr_gw show lcr_gw @@ -69,7 +69,7 @@ - + lcr_rule_target show lcr_rule_target @@ -116,7 +116,7 @@ - + lcr_rule show lcr_rule diff --git a/utils/kamctl/xhttp_pi/matrix-mod b/utils/kamctl/xhttp_pi/matrix-mod index 808f3d861..a5607b3f6 100644 --- a/utils/kamctl/xhttp_pi/matrix-mod +++ b/utils/kamctl/xhttp_pi/matrix-mod @@ -1,4 +1,4 @@ - + matrix show matrix diff --git a/utils/kamctl/xhttp_pi/mohqueue-mod b/utils/kamctl/xhttp_pi/mohqueue-mod index f26475cf0..bb8981e2b 100644 --- a/utils/kamctl/xhttp_pi/mohqueue-mod +++ b/utils/kamctl/xhttp_pi/mohqueue-mod @@ -1,4 +1,4 @@ - + mohqcalls show mohqcalls @@ -48,7 +48,7 @@ - + mohqueues show mohqueues diff --git a/utils/kamctl/xhttp_pi/msilo-mod b/utils/kamctl/xhttp_pi/msilo-mod index acfe004b1..e79dcc0b8 100644 --- a/utils/kamctl/xhttp_pi/msilo-mod +++ b/utils/kamctl/xhttp_pi/msilo-mod @@ -1,4 +1,4 @@ - + silo show silo diff --git a/utils/kamctl/xhttp_pi/mtree-mod b/utils/kamctl/xhttp_pi/mtree-mod index 8faf525b3..8118b52f7 100644 --- a/utils/kamctl/xhttp_pi/mtree-mod +++ b/utils/kamctl/xhttp_pi/mtree-mod @@ -1,4 +1,4 @@ - + mtree show mtree @@ -36,7 +36,7 @@ - + mtrees show mtrees diff --git a/utils/kamctl/xhttp_pi/pdt-mod b/utils/kamctl/xhttp_pi/pdt-mod index 2eaf839d8..991fa088d 100644 --- a/utils/kamctl/xhttp_pi/pdt-mod +++ b/utils/kamctl/xhttp_pi/pdt-mod @@ -1,4 +1,4 @@ - + pdt show pdt diff --git a/utils/kamctl/xhttp_pi/permissions-mod b/utils/kamctl/xhttp_pi/permissions-mod index 5bbd4bfd5..4e62446bd 100644 --- a/utils/kamctl/xhttp_pi/permissions-mod +++ b/utils/kamctl/xhttp_pi/permissions-mod @@ -1,4 +1,4 @@ - + trusted show trusted @@ -48,7 +48,7 @@ - + address show address diff --git a/utils/kamctl/xhttp_pi/pi_framework.xml b/utils/kamctl/xhttp_pi/pi_framework.xml index 95180efed..eea514219 100644 --- a/utils/kamctl/xhttp_pi/pi_framework.xml +++ b/utils/kamctl/xhttp_pi/pi_framework.xml @@ -341,6 +341,29 @@ roomDB1_STR flagDB1_INT + + + nds_trusted_domains + mysql + idDB1_INT + trusted_domainDB1_STR + + + + s_cscf + mysql + idDB1_INT + nameDB1_STR + s_cscf_uriDB1_STR + + + + s_cscf_capabilities + mysql + idDB1_INT + id_s_cscfDB1_INT + capabilityDB1_INT + lcr_gw @@ -1033,7 +1056,7 @@ - '!=' '!=' --> - + acc show acc @@ -1086,7 +1109,7 @@ - + acc_cdrs show acc_cdrs @@ -1127,7 +1150,7 @@ - + missed_calls show missed_calls @@ -1180,7 +1203,7 @@ - + dbaliases show dbaliases @@ -1224,7 +1247,7 @@ - + subscriber show subscriber @@ -1271,7 +1294,7 @@ - + usr_preferences show usr_preferences @@ -1324,7 +1347,7 @@ - + carrierroute show carrierroute @@ -1389,7 +1412,7 @@ - + carrierfailureroute show carrierfailureroute @@ -1448,7 +1471,7 @@ - + carrier_name show carrier_name @@ -1483,7 +1506,7 @@ - + domain_name show domain_name @@ -1518,7 +1541,7 @@ - + cpl show cpl @@ -1562,7 +1585,7 @@ - + dialog show dialog @@ -1663,7 +1686,7 @@ - + dialog_vars show dialog_vars @@ -1707,7 +1730,7 @@ - + dialplan show dialplan @@ -1763,7 +1786,7 @@ - + dispatcher show dispatcher @@ -1813,7 +1836,7 @@ - + domain show domain @@ -1854,7 +1877,7 @@ - + domain_attrs show domain_attrs @@ -1901,7 +1924,7 @@ - + domainpolicy show domainpolicy @@ -1948,7 +1971,7 @@ - + dr_gateways show dr_gateways @@ -1998,7 +2021,7 @@ - + dr_rules show dr_rules @@ -2051,7 +2074,7 @@ - + dr_gw_lists show dr_gw_lists @@ -2089,7 +2112,7 @@ - + dr_groups show dr_groups @@ -2133,7 +2156,7 @@ - + grp show grp @@ -2177,7 +2200,7 @@ - + re_grp show re_grp @@ -2215,7 +2238,7 @@ - + htable show htable @@ -2262,7 +2285,7 @@ - + imc_rooms show imc_rooms @@ -2303,7 +2326,7 @@ - + imc_members show imc_members @@ -2347,7 +2370,118 @@ - + + nds_trusted_domains + show + nds_trusted_domains + DB1_QUERY + + idupdate + trusted_domain + + + add + nds_trusted_domains + DB1_INSERT + + trusted_domain + + + update + nds_trusted_domains + DB1_UPDATE + + id= + + + trusted_domain + + + delete + nds_trusted_domains + DB1_DELETE + + id= + + + + + s_cscf + show + s_cscf + DB1_QUERY + + idupdate + name + s_cscf_uri + + + add + s_cscf + DB1_INSERT + + name + s_cscf_uri + + + update + s_cscf + DB1_UPDATE + + id= + + + name + s_cscf_uri + + + delete + s_cscf + DB1_DELETE + + id= + + + + + s_cscf_capabilities + show + s_cscf_capabilities + DB1_QUERY + + idupdate + id_s_cscf + capability + + + add + s_cscf_capabilities + DB1_INSERT + + id_s_cscf + capability + + + update + s_cscf_capabilities + DB1_UPDATE + + id= + + + id_s_cscf + capability + + + delete + s_cscf_capabilities + DB1_DELETE + + id= + + + + lcr_gw show lcr_gw @@ -2418,7 +2552,7 @@ - + lcr_rule_target show lcr_rule_target @@ -2465,7 +2599,7 @@ - + lcr_rule show lcr_rule @@ -2518,7 +2652,7 @@ - + matrix show matrix @@ -2559,7 +2693,7 @@ - + mohqcalls show mohqcalls @@ -2609,7 +2743,7 @@ - + mohqueues show mohqueues @@ -2656,7 +2790,7 @@ - + silo show silo @@ -2724,7 +2858,7 @@ - + mtree show mtree @@ -2762,7 +2896,7 @@ - + mtrees show mtrees @@ -2803,7 +2937,7 @@ - + pdt show pdt @@ -2844,7 +2978,7 @@ - + trusted show trusted @@ -2894,7 +3028,7 @@ - + address show address @@ -2941,7 +3075,7 @@ - + pl_pipes show pl_pipes @@ -2982,7 +3116,7 @@ - + presentity show presentity @@ -3044,7 +3178,7 @@ - + active_watchers show active_watchers @@ -3154,7 +3288,7 @@ - + watchers show watchers @@ -3207,7 +3341,7 @@ - + xcap show xcap @@ -3263,7 +3397,7 @@ - + pua show pua @@ -3349,7 +3483,7 @@ - + purplemap show purplemap @@ -3393,7 +3527,7 @@ - + aliases show aliases @@ -3491,7 +3625,7 @@ - + rls_presentity show rls_presentity @@ -3547,7 +3681,7 @@ - + rls_watchers show rls_watchers @@ -3648,7 +3782,7 @@ - + rtpengine show rtpengine @@ -3695,7 +3829,7 @@ - + rtpproxy show rtpproxy @@ -3742,7 +3876,7 @@ - + sca_subscriptions show sca_subscriptions @@ -3813,7 +3947,7 @@ - + secfilter show secfilter @@ -3854,7 +3988,7 @@ - + sip_trace show sip_trace @@ -3922,7 +4056,7 @@ - + speed_dial show speed_dial @@ -3978,7 +4112,7 @@ - + version show version @@ -4016,7 +4150,7 @@ - + topos_d show topos_d @@ -4120,7 +4254,7 @@ - + topos_t show topos_t @@ -4227,7 +4361,7 @@ - + uacreg show uacreg @@ -4304,7 +4438,7 @@ - + uid_credentials show uid_credentials @@ -4360,7 +4494,7 @@ - + uid_user_attrs show uid_user_attrs @@ -4407,7 +4541,7 @@ - + uid_domain show uid_domain @@ -4448,7 +4582,7 @@ - + uid_domain_attrs show uid_domain_attrs @@ -4495,7 +4629,7 @@ - + uid_global_attrs show uid_global_attrs @@ -4539,7 +4673,7 @@ - + uid_uri show uid_uri @@ -4586,7 +4720,7 @@ - + uid_uri_attrs show uid_uri_attrs @@ -4639,7 +4773,7 @@ - + uri show uri @@ -4683,7 +4817,7 @@ - + userblocklist show userblocklist @@ -4727,7 +4861,7 @@ - + globalblocklist show globalblocklist @@ -4768,7 +4902,7 @@ - + location show location @@ -4866,7 +5000,7 @@ - + location_attrs show location_attrs diff --git a/utils/kamctl/xhttp_pi/pipelimit-mod b/utils/kamctl/xhttp_pi/pipelimit-mod index 48fdea63a..a2f3686fa 100644 --- a/utils/kamctl/xhttp_pi/pipelimit-mod +++ b/utils/kamctl/xhttp_pi/pipelimit-mod @@ -1,4 +1,4 @@ - + pl_pipes show pl_pipes diff --git a/utils/kamctl/xhttp_pi/presence-mod b/utils/kamctl/xhttp_pi/presence-mod index 59a58fa07..652c2a421 100644 --- a/utils/kamctl/xhttp_pi/presence-mod +++ b/utils/kamctl/xhttp_pi/presence-mod @@ -1,4 +1,4 @@ - + presentity show presentity @@ -60,7 +60,7 @@ - + active_watchers show active_watchers @@ -170,7 +170,7 @@ - + watchers show watchers @@ -223,7 +223,7 @@ - + xcap show xcap @@ -279,7 +279,7 @@ - + pua show pua diff --git a/utils/kamctl/xhttp_pi/purple-mod b/utils/kamctl/xhttp_pi/purple-mod index c2e9edde4..b54a802a8 100644 --- a/utils/kamctl/xhttp_pi/purple-mod +++ b/utils/kamctl/xhttp_pi/purple-mod @@ -1,4 +1,4 @@ - + purplemap show purplemap diff --git a/utils/kamctl/xhttp_pi/registrar-mod b/utils/kamctl/xhttp_pi/registrar-mod index 747675fc6..c5aad1091 100644 --- a/utils/kamctl/xhttp_pi/registrar-mod +++ b/utils/kamctl/xhttp_pi/registrar-mod @@ -1,4 +1,4 @@ - + aliases show aliases diff --git a/utils/kamctl/xhttp_pi/rls-mod b/utils/kamctl/xhttp_pi/rls-mod index 92d72b96e..dada3b76e 100644 --- a/utils/kamctl/xhttp_pi/rls-mod +++ b/utils/kamctl/xhttp_pi/rls-mod @@ -1,4 +1,4 @@ - + rls_presentity show rls_presentity @@ -54,7 +54,7 @@ - + rls_watchers show rls_watchers diff --git a/utils/kamctl/xhttp_pi/rtpengine-mod b/utils/kamctl/xhttp_pi/rtpengine-mod index c9680f7d7..df9eafce9 100644 --- a/utils/kamctl/xhttp_pi/rtpengine-mod +++ b/utils/kamctl/xhttp_pi/rtpengine-mod @@ -1,4 +1,4 @@ - + rtpengine show rtpengine diff --git a/utils/kamctl/xhttp_pi/rtpproxy-mod b/utils/kamctl/xhttp_pi/rtpproxy-mod index 18860d4d2..c13a40ee8 100644 --- a/utils/kamctl/xhttp_pi/rtpproxy-mod +++ b/utils/kamctl/xhttp_pi/rtpproxy-mod @@ -1,4 +1,4 @@ - + rtpproxy show rtpproxy diff --git a/utils/kamctl/xhttp_pi/sca-mod b/utils/kamctl/xhttp_pi/sca-mod index d774b40fd..0aed314d1 100644 --- a/utils/kamctl/xhttp_pi/sca-mod +++ b/utils/kamctl/xhttp_pi/sca-mod @@ -1,4 +1,4 @@ - + sca_subscriptions show sca_subscriptions diff --git a/utils/kamctl/xhttp_pi/secfilter-mod b/utils/kamctl/xhttp_pi/secfilter-mod index abad1bc50..3a45d6d42 100644 --- a/utils/kamctl/xhttp_pi/secfilter-mod +++ b/utils/kamctl/xhttp_pi/secfilter-mod @@ -1,4 +1,4 @@ - + secfilter show secfilter diff --git a/utils/kamctl/xhttp_pi/siptrace-mod b/utils/kamctl/xhttp_pi/siptrace-mod index 09d62d305..ce7e1cc64 100644 --- a/utils/kamctl/xhttp_pi/siptrace-mod +++ b/utils/kamctl/xhttp_pi/siptrace-mod @@ -1,4 +1,4 @@ - + sip_trace show sip_trace diff --git a/utils/kamctl/xhttp_pi/speeddial-mod b/utils/kamctl/xhttp_pi/speeddial-mod index d452b0fb7..883c7dfd8 100644 --- a/utils/kamctl/xhttp_pi/speeddial-mod +++ b/utils/kamctl/xhttp_pi/speeddial-mod @@ -1,4 +1,4 @@ - + speed_dial show speed_dial diff --git a/utils/kamctl/xhttp_pi/standard-mod b/utils/kamctl/xhttp_pi/standard-mod index 11d90d2a3..95b1068e9 100644 --- a/utils/kamctl/xhttp_pi/standard-mod +++ b/utils/kamctl/xhttp_pi/standard-mod @@ -1,4 +1,4 @@ - + version show version diff --git a/utils/kamctl/xhttp_pi/topos-mod b/utils/kamctl/xhttp_pi/topos-mod index 55004e12c..cfae6af96 100644 --- a/utils/kamctl/xhttp_pi/topos-mod +++ b/utils/kamctl/xhttp_pi/topos-mod @@ -1,4 +1,4 @@ - + topos_d show topos_d @@ -102,7 +102,7 @@ - + topos_t show topos_t diff --git a/utils/kamctl/xhttp_pi/uac-mod b/utils/kamctl/xhttp_pi/uac-mod index c1017f540..284be1b47 100644 --- a/utils/kamctl/xhttp_pi/uac-mod +++ b/utils/kamctl/xhttp_pi/uac-mod @@ -1,4 +1,4 @@ - + uacreg show uacreg diff --git a/utils/kamctl/xhttp_pi/uid_auth_db-mod b/utils/kamctl/xhttp_pi/uid_auth_db-mod index 2f538898b..93cbea723 100644 --- a/utils/kamctl/xhttp_pi/uid_auth_db-mod +++ b/utils/kamctl/xhttp_pi/uid_auth_db-mod @@ -1,4 +1,4 @@ - + uid_credentials show uid_credentials diff --git a/utils/kamctl/xhttp_pi/uid_avp_db-mod b/utils/kamctl/xhttp_pi/uid_avp_db-mod index d419d74d6..61dfb043b 100644 --- a/utils/kamctl/xhttp_pi/uid_avp_db-mod +++ b/utils/kamctl/xhttp_pi/uid_avp_db-mod @@ -1,4 +1,4 @@ - + uid_user_attrs show uid_user_attrs diff --git a/utils/kamctl/xhttp_pi/uid_domain-mod b/utils/kamctl/xhttp_pi/uid_domain-mod index e4a058b1b..639b68b64 100644 --- a/utils/kamctl/xhttp_pi/uid_domain-mod +++ b/utils/kamctl/xhttp_pi/uid_domain-mod @@ -1,4 +1,4 @@ - + uid_domain show uid_domain @@ -39,7 +39,7 @@ - + uid_domain_attrs show uid_domain_attrs diff --git a/utils/kamctl/xhttp_pi/uid_gflags-mod b/utils/kamctl/xhttp_pi/uid_gflags-mod index d11f09ba7..a856f4cc1 100644 --- a/utils/kamctl/xhttp_pi/uid_gflags-mod +++ b/utils/kamctl/xhttp_pi/uid_gflags-mod @@ -1,4 +1,4 @@ - + uid_global_attrs show uid_global_attrs diff --git a/utils/kamctl/xhttp_pi/uid_uri_db-mod b/utils/kamctl/xhttp_pi/uid_uri_db-mod index dab23a8e1..b9de6f2a6 100644 --- a/utils/kamctl/xhttp_pi/uid_uri_db-mod +++ b/utils/kamctl/xhttp_pi/uid_uri_db-mod @@ -1,4 +1,4 @@ - + uid_uri show uid_uri @@ -45,7 +45,7 @@ - + uid_uri_attrs show uid_uri_attrs diff --git a/utils/kamctl/xhttp_pi/uri_db-mod b/utils/kamctl/xhttp_pi/uri_db-mod index 36ac282ce..d396f34da 100644 --- a/utils/kamctl/xhttp_pi/uri_db-mod +++ b/utils/kamctl/xhttp_pi/uri_db-mod @@ -1,4 +1,4 @@ - + uri show uri diff --git a/utils/kamctl/xhttp_pi/userblocklist-mod b/utils/kamctl/xhttp_pi/userblocklist-mod index 1affb5d8e..bd9347734 100644 --- a/utils/kamctl/xhttp_pi/userblocklist-mod +++ b/utils/kamctl/xhttp_pi/userblocklist-mod @@ -1,4 +1,4 @@ - + userblocklist show userblocklist @@ -42,7 +42,7 @@ - + globalblocklist show globalblocklist diff --git a/utils/kamctl/xhttp_pi/usrloc-mod b/utils/kamctl/xhttp_pi/usrloc-mod index bfc2c9359..9f456baeb 100644 --- a/utils/kamctl/xhttp_pi/usrloc-mod +++ b/utils/kamctl/xhttp_pi/usrloc-mod @@ -1,4 +1,4 @@ - + location show location @@ -96,7 +96,7 @@ - + location_attrs show location_attrs