=========================== Release 3.2.2 ============================== 2021-08-19 Liviu Chircu * [4963c4ee0] : Bump version to 3.2.2 2021-08-19 Razvan Crainea * [2232f6a33] : proto_bin: fix crash when parsed data is printed on error The module was trying to print the parsed data in case of an error, however it was using the `start` field of the tcp_conn. The problem is that the module does not use the `start` field, therefore when a request is not entirely read from the begining, it is not updated to point to the new structure. Therefore, when we're trying to print the buffer, it is pointing to an address on stack. The fix for this bug was to suppress the parsed printing, as it is binary anyway and it is the same value as the `buf`. Many thanks to Bernard Buitenhuis for reporting the issue. (cherry picked from commit 4c52754b8cb2ade4f877d6a03c4b84d84608d49a) 2021-08-19 Razvan Crainea * [a802c934a] : cfg: enhance description when an unknown route is called (cherry picked from commit ca9f428a4d59a9b40ebd7235edf545e9609ddfeb) 2021-08-19 Razvan Crainea * [3378261ef] : httpd: fix feature detection for older libraries Feature detection has been added in version 0.9.35, thus we can't compile older version. However, when running cross compiling, we might compile aginst an older version, but run with a newer one - that's why we'd rather do the version detection at runtime - that's what this commit does. (cherry picked from commit e4065aaf3734409e05b59954057be4fed5d2479d) 2021-08-19 Liviu Chircu * [e0823818b] : drouting: Fix startup crash with no clustering The crash was a regression, introduced in 40355a3c1. Many thanks to @masudmuborakshohi and Sasmita Panda for the reports! (cherry picked from commit 4206f768923dd95deb1b51ebcfda4905c334f2ce) =========================== Release 3.2.1 ============================== 2021-08-17 Liviu Chircu * [8dd29f668] : Bump version to 3.2.1 2021-08-17 Vlad Patrascu * [73c39ec8f] : tls_wolfssl: fix behavior of is_peer_verified() with session tickets If TLS session tickets were used for session resuming, the is_peer_verified() script function would not be able to verify the peer even if it did present a valid certificate in the initial TLS handshake. Even so, this fix can only guarantee that the peer can be verified when resuming a session, if the TLS domain is configured to require a peer certificate initially. Otherwise, wolfssl does not provide a way of retrieving the peer certificate from the received session ticket. Fixes #2541 (cherry picked from commit b1c67295c1ae5937df316df3152b8ecf4da6e067) 2021-08-17 Liviu Chircu * [70e8b24b6] : usrloc DB schema: Extend location.contact from CHAR(255) to TEXT This extension is especially useful with RFC 8599 (SIP Push Notifications), which may lead to sizeable Contact header URIs, often reaching 300+ bytes in size. Credits to John Quick for the suggestion! (cherry picked from commit ec09a18f6c240dd3159e284370bd6f4dc6747f03) 2021-08-17 Razvan Crainea * [f312eaa1d] : ratelimit: proper expire for replicated pipes Instead of updating the last_used on every received pipe, we shall only consider the last locally used value when we want to expire. This way, we only replicate pipes that have been locally used recently, if the ones that are not, will not be replicated, thus will eventually be deleted by the backup nodes. Thanks go to Ken Rice (SIPNav) for reporting this and troubleshooting the problem. (cherry picked from commit d430c1ae8e77bc0ae2d2eb0ac4eb31d779a8101f) 2021-08-17 Liviu Chircu * [bf73b9f6e] : mid_registrar: Properly trigger PN during lookup() in modes 0/1 This fixes a bug where one or more Push Notifications are not triggered because the "regtime" was not initialized near the start of the mid_reg_lookup() routine... Many thanks to John Quick for the report and accurate logs describing the issue! (cherry picked from commit 9ea64cc6cfa290e8c97c921330d6379ed6cd25b3) 2021-08-16 Liviu Chircu * [22bec4036] : auth docs: Mention RFC 8760 support in Overview (cherry picked from commit 6ebf56a670ac4dcd9bcf3968c2822039d8e4316c) 2021-08-16 Liviu Chircu * [79d20aeea] : auth_db docs: Eliminate references to "HA1b"; Document new columns Credits to Adrian Georgescu for the report! (cherry picked from commit b4b24ca7a14aaaa02fe2b15f7c69cf970b0aa81f) 2021-08-16 Liviu Chircu * [c871d9edf] : db_mysql: Fix regression in PS handling Commit 87f241651 introduced a regression in db_mysql where modules using prepared statements on top of it would run into errors. Example behavior of auth_db on a basic user auth query: ERROR:db_mysql:db_mysql_store_result: driver error: Commands out of sync; you can't run this command now ERROR:auth_db:get_ha1: failed to query database Credits to @masudmuborakshohi for the accurate report and logs! Fixes #2593 (cherry picked from commit 4ef6bab4d95d9c23127cad776c126afb0ed77106) 2021-08-16 Liviu Chircu * [8f4c24adc] : Update CREDITS file for 3.2 release 2021-08-16 Bogdan-Andrei Iancu * [31d3cd382] : Add code to troubleshoot some BUG report on weight sorting alg. Dump all the gws, their weights and the running sums, so we can undestand why the alg fails here - this dump will happen only when the bug is detected. Also, in case of this BUG, avoid dropping the call (by return -1), but rather return something usefull, so the call can be routed further. (cherry picked from commit 35cf96e2cc3d9a0f1e280d47a5ff1ee526940bef) 2021-08-16 Bogdan-Andrei Iancu * [7a67af9b6] : Be sure we have support for MHD_USE_EPOLL. Check if MHD_USE_EPOLL is supported at startup, to be sure we have a proper version of the library. Closes #2580 (cherry picked from commit bb4de46e49904d351c05e5f16ed887edb828a580) 2021-08-16 Bogdan-Andrei Iancu * [3b8f19ad0] : Fix self-IPC for cfg reloading on the MI process. As starting 3.2 the MI procs also have IPC and cfg files, they are also eligible for receiving the cfg reload IPC command - so we need to run this IPC cmd inline for the MI proc triggering the reload. Also adding some extra logging to help in understanding why a reload cmd may fail. Fixes #2584. (cherry picked from commit 4c3150e461c31c29908a7ddd20e550bbfcbb69e3) 2021-08-16 Vlad Patrascu * [cb7d907e6] : stir_shaken: add ability to skip Date header checks when verifying Add a new "require_date_hdr" modparam that controls whether the Date header is mandatory when verifying. (cherry picked from commit 736ad5cc3b4ba4a25ac81d3b98af6e83b4129404) 2021-08-15 Nick Altmann * [ad015c0de] : packaging/debian: fix Debian Bullseye build 2021-08-13 Liviu Chircu * [e8494eb97] : mid-registrar: Avoid generating De-REGISTER from Passive node * enhance the usrloc API with a contact ownership checking function * mid-registrar now only generates De-REGISTER for owned contacts Credits to Giovanni Maruzzelli for detailed reporting and instructions on how to reproduce this issue! Fixes #2559 (cherry picked from commit 4128f67d271b4851a194ebf69da0349c4403e2a9) 2021-08-13 Liviu Chircu * [04259f637] : mid-registrar: Improve replication behavior on INSERT Ensure all mid-registrar data tied to a contact gets included in the very first "INSERT" packet. This prevents some unnecessary error logs on the backup box when doing a quick REGISTER/De-REGISTER in Active/Passive scenarios: ERROR:mid_registrar:unregister_record: 'from' key not found, skipping De-REGISTER ERROR:mid_registrar:mid_reg_aor_event: failed to unregister contact Credits to Giovanni Maruzzelli for an accurate report and detailed logs on this issue! Fixes #2525 (cherry picked from commit c11f92698c6f345d8921d645177f71aa36c9791d) 2021-08-13 Liviu Chircu * [9ff14e3b4] : usrloc: Learn the active node AoR rlabel (as backup node) When using timer-based contact cleanup in Active/Passive user location scenarios, the two timers may run in such a way that the backup node still has a given AoR, while the AoR does _not_ exist on the active node... Now, if a phone registers, the backup node complains that the replicated AoR's auto-generated rlabel differs from its own one, since the old AoR has yet to be cleaned up. And as long as the AoR has no contacts, we can safely re-learn (overwrite) the AoR's rlabel on the backup node and fix this race condition. Credits to Giovanni Maruzzelli for reporting this issue and providing accurate debug logs! Fixes #2524 (cherry picked from commit 24ec0d23d6f9193548bf0f4296acdba039a4483b) 2021-08-12 Vlad Patrascu * [1cf4abb68] : tls_mgm: document possible ca_dir warning when using wolfSSL Closes #2545 (cherry picked from commit a29cbcf38fddc9e75f406ddcf63a9cc1c1a3672c) 2021-08-11 Bogdan-Andrei Iancu * [8b2daa805] : Fix race between data sync and data load Be sure we trigger the startup cluster sync AFTER loading the data from DB. Also, when receiving replicated data, be sure the data is actually loaded. Closes #2581 (cherry picked from commit 3b8bdb794da3828a4fe7639f460c36fffe03031a) 2021-08-10 Norm Brandinger * [6d781a1ef] : fix: From Nick Altmann: Fix wrong variable usege when escape STR type in db_postgres (cherry picked from commit 0d2dac363256e8bcacfc1391f63715fe10a905c6) 2021-08-10 Norm Brandinger * [c7ca79313] : Fix spelling (cherry picked from commit 41b4a018af55f08815dec7e19001d68442e19370) 2021-08-03 Liviu Chircu * [2c5c19627] : permissions: Fix loader conflict on multi-defined hash_destroy() With hash_destroy() defined both in lib/hash.c and modules/permissions/hash.c, this would enable the following shutdown crash: 0 map_destroy ... at map.c:484 1 0x0000557055f1d75d in hash_destroy ... at lib/hash.c:83 2 0x0000557055f1df9a in hash_destroy ... at lib/hash.c:76 3 0x00007f20948edf75 in clean_address ... at address.c:493 4 0x00007f20948e7208 in mod_exit () at permissions.c:702 5 0x0000557055eb03a1 in destroy_modules () at sr_module.c:562 (cherry picked from commit 996a677e356f98ab5058a6cbbec164e732d609a7) 2021-07-30 Liviu Chircu * [601be97f1] : drouting: Allow TEXT type for `dr_rules.gwlist`, `dr_rules.attrs` Similar to b7b45ff3032, but for the `dr_rules` table. (cherry picked from commit 5ab329cdf365460fc80c4622d55c54846e70f5ac) 2021-07-29 Liviu Chircu * [4fc7d7c01] : tls_wolfssl: Add library build files to .gitignore (cherry picked from commit 59b939f7740b2901e6668b30b6bf43869c01e091) 2021-07-28 Razvan Crainea * [2cab8820a] : siprec: handle denied re-invites by SRC Credits go to MikhailKalashnikov on GitHub for reporting it. Close #2398 (cherry picked from commit 1804bad76ed30688e609dd03654e242fd9e68d00) 2021-07-26 Razvan Crainea * [43b1c3c48] : dialog: bump dlg replication version to 3 Commit 58343d45 introduced some new fields in the binary packet, changing its structure. Thus, when using different versions, they may crash due to the packet's mismatch. (cherry picked from commit 7af3886511a8cd37bd6121025ab88b41864775dc) 2021-07-23 Vlad Patrascu * [a9bd831a6] : b2b_logic: properly end dialog with notified entity Send BYE instead of just deleting the entity after completing the bridging action, when using the "n" flag for b2b_bridge(). (cherry picked from commit 250a33c61c677642f74a242d4b600165f8803643) 2021-07-23 Vlad Patrascu * [ad0de36e1] : b2b_logic: fix bad NOTIFY body for 100 Trying The static variable representing the new message body would point to the buffer of the SIP message from the previous call to process_bridge_notify(), resulting in garbage data. Credits to @nikbyte for catching the issue. Alternative fix to #2503. (cherry picked from commit 947c7e3c295cffde48ddb4c35d928ae7339722dd) 2021-07-23 Vlad Patrascu * [21669417f] : b2b_logic: fix a crash when using the "n" flag for b2b_bridge() The crash would occur when using the "n" flag even though the current entity has already been deleted with b2b_delete_entity(). (cherry picked from commit 6e6d876ba9173531c78787f71b7da30e71c520ec) =========================== Release 3.2.0 ============================== 2021-07-21 Liviu Chircu * [d5a0f2a3d] : Bump version to 3.2.0 2021-07-21 Razvan Crainea * [80ff0f404] : rtp_relay: fix uninitialized warning 2021-07-21 Liviu Chircu * [20fc08a49] : uac_registrant: Fix buggy gcc 7.x "uninitialized" error reg_records.c:302:7: error: ‘new_elem’ may be used uninitialized in this function 2021-07-21 Razvan Crainea * [7a92b0240] : freeswitch: fix string maipulation warnings in esl (cherry picked from commit 7bc88e2d029e664149609b093bba3d9bc76fce79) 2021-07-21 Razvan Crainea * [d4b7a6150] : sip_i: fix (buggy) uninitialized warning 2021-07-21 Liviu Chircu * [2b3d73d8b] : cachedb_mongodb: Fix possible uninitialized variable 2021-07-21 Liviu Chircu * [6d26478e7] : statistics: Fix possible uninitialized output variable 2021-07-21 Razvan Crainea * [28f7a0d5e] : tracer: replace un-necessary strncpy with memcpy 2021-07-21 Liviu Chircu * [a098fe047] : tracer: Mask buggy gcc 9.x warnings on Ubuntu 20.04 In function ‘strncpy’, inlined from ‘trace_slreply_out’ at tracer.c:2290:2: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin___strncpy_chk’ output may be truncatedl copying between 1 and 21 bytes from a string of length 153 [-Wstringop-truncation] This is a false positive, since the "153" bytes are actually 7 * 22 bytes, packed as a (char **) array of 7 buffers. So just mask the warning for now, just at "tracer" module level. 2021-07-21 Liviu Chircu * [2d98eefa0] : jabber: Fix off-by-one strncpy() error warning: ‘__builtin_strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bo... | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... xjab_wlist.c: In function ‘xj_wlist_set_aliases’: xjab_wlist.c:455:34: note: length computed here 455 | i = jwl->aliases->proxy->len = strlen(pa); | ^~~~~~~~~~ 2021-07-21 Liviu Chircu * [5b5f2f68b] : httpd: Fix gcc warning for unchecked fread() retcode 2021-07-21 Liviu Chircu * [4675b1fff] : ldap: Fix possible buffer overflow If gcc says "2050 chars can overflow a 2049 buffer", gcc is definitely not wrong... 2021-07-21 Vlad Patrascu * [f921eba0f] : b2b_logic: overwrite existing context keys when using b2b_bridge_request() Closes #2424 (cherry picked from commit ba3bd6f4d18b2edca3ba942545aa3524d44f08e4) 2021-07-21 Vlad Patrascu * [b470b29b1] : b2b_logic_xml: fix compilation (cherry picked from commit 5e105b3dae2dba8259d74ac472a8f7e7b1082680) 2021-07-21 Vlad Patrascu * [125b2af25] : b2b_logic: fix crash when receiving an INFO or unsupported method Thanks to David Escartin from Sonoc for reporting. (cherry picked from commit b59a436cb12854105f379512f32758987b911f47) 2021-07-21 Vlad Patrascu * [802ce9d2a] : b2b_entities/logic: fix a race condition with simultaneous reINVITEs Fix behavior when receiving reINVITES from the connected entities at the same time, one replied with 491 and the other with 200OK. The 200 OK would not be passed to the other entity and the tuple would never be deleted in this case. Thanks to David Escartin from Sonoc for reporting and testing the fix. (cherry picked from commit 9c9ab8f948be65dc6a99024f901e748d629f8e56) 2021-07-21 Vlad Patrascu * [944002af5] : b2b_entities/logic: properly reply to canceled/expired entities Generate a 487 reply from opensips to the server entity if: * no final reply from the client entity received and the tuple expires after a CANCEL request has been received; * a 200 OK has be received after a previous CANCEL request. Also, reply with 408 to the server entity if the tuple expires and no final reply from the client entity has been received. Credits to David Escartin from Sonoc for reporting and testing the fixes. (cherry picked from commit 3261d2cb59f4477495cb770af6e3489ce186bc6b) 2021-07-21 Razvan Crainea * [9112ad6bd] : siprec: add mandatory +sip.src Contact header param Credits go to @jofiy on GitHub for reporting this. Close #2383 (cherry picked from commit be6ce6a5982559e9fa37a2823b219b04e3bd5b55) 2021-07-21 Razvan Crainea * [61e4863bd] : tm: add Route headers to CANCEL of locally generated INVITE Thanks go to David Escartin from Sonoc for reporting and testing the fixes for this bug (cherry picked from commit 4e6ea0a356267272b8b2b9b48382bcef08756bf4) 2021-07-21 Razvan Crainea * [5c3554413] : b2b_entities: do not terminate dialog for CANCEL on reINVITE Thanks go to David Escartin from Sonoc for reporting and testing the fixes for this bug (cherry picked from commit 66f9cfcd56a04235eea43f11cdc93db839136436) 2021-07-21 Vlad Patrascu * [6eba44156] : b2b_entities: fix callid collisions for client entities Prevent the possiblity of using the same seed for generating the random part of the callid for a new client entity. (cherry picked from commit 62728f1775c4ce61645faed3d0130e6c09540b6c) 2021-07-21 Razvan Crainea * [3c84aae84] : rtpengine: remove special handling for ICE This allows the module to blindfully pass the ICE variables to RTPEngine Reported by @wenyuanZZ on GitHub in sipwise/rtpengine#1319 (cherry picked from commit 0936ec3f9ca565f434a133adc42b51b811411af8) 2021-07-20 Razvan Crainea * [6bd1d9284] : cgrates: prevent crash when a reply without request comes Reported by Vasilios Tzanoudakis (@vtzan on GitHub) in #2571 (cherry picked from commit 882450d9e0b9d4f5f314786f90d64bd707f81e78) 2021-07-16 Razvan Crainea * [3c6712d16] : mi_fifo: proper parse multiple commands received at once (cherry picked from commit e107b029be250b61ff2027fdbe03258d096e9344) 2021-07-15 Vlad Patrascu * [08c258418] : b2b_logic: properly release lock in case of error for create event Credits to @nikbyte for the fix Related to #2425 Closes #2426 (cherry picked from commit aba8ae577ba3e6f1c00b239140bc948714774d1b) 2021-07-13 Artiom Druz * [f6c711b18] : Fix crash when vendor hasn't price for prefix (cherry picked from commit be9caba4ad469224c9213edcb1e8bdb11192c823) =========================== Release 3.2.0-rc1 ============================== 2021-07-12 Liviu Chircu * [02bef88d2] : Bump version to 3.2.0-rc1 2021-07-09 Bogdan Andrei IANCU * [f664db885] : Merge pull request #2469 from wdoekes/fix-uac_registrant Make FORCE_SINGLE_REGISTRATION work again (cherry picked from commit c9839c8dfa30f0fb5178075cd943e2480e711400) 2021-07-09 Liviu Chircu * [d757073d5] : rtpproxy: Allow the RTP streaming functions in local_route This enables new media playback scenarios, especially when coupled with dlg_send_sequential() and/or dlg_on_timeout(). Credits to Pete Kelly for the suggestion (cherry picked from commit dcc9f0abfed6206cf658185b055c7e8c72171025) 2021-07-07 Bogdan-Andrei Iancu * [5ced69683] : Fix deadlock upon BUG/ERROR report Credits for finding this issue go to Damien Sandras @ Seconix (cherry picked from commit 2e042353ecdaa14cc3e901478c07965830ee5a3b) 2021-07-07 Razvan Crainea * [ddc8dc39a] : cgrates: don't bind socket before creating it Credits go to @volga629-1 on GitHub for reporting it in #2568 (cherry picked from commit 34acfcc2ff3c62f3075f264709d56f6526aa71af) 2021-07-06 Vlad Patrascu * [95f4812ae] : b2b_logic: fix crash when handling reply to forked INVITEs Fixes #2473 (cherry picked from commit d25ccb705c0427195d968a59ea1fba6d57945df6) 2021-07-06 Vlad Patrascu * [9b09cc3c9] : tls_mgm: fix domain matching after MI reload After doing an MI reload, old domains might still be matched for new connections while there are ongoing connections that use those domains. Credits to Alexey Vasilyev (@vasilievalex) for troubleshooting and suggesting the fix. Fixes #2433 (cherry picked from commit 9412ed271172810e55cc771fa9fd2c82007eafbd) 2021-07-06 Bogdan-Andrei Iancu * [499a507a1] : Be sure there is no "exit" between setting the PS and running the query 2021-07-06 Bogdan Andrei IANCU * [c0c49788a] : Merge pull request #2470 from wdoekes/con-ps-reference-cleanup-2 Change CON_SET_CURR_PS pattern to always call it _directly_ before db call (cherry picked from commit f54e5f95ac7869d983e41ee2a880a8e450a8eb4b) 2021-07-05 Razvan Crainea * [17bde34d7] : stir_shaken: fix pkg_memleak of params parsing do not change the `params` while iterating through the list, as it will prevent `free_params` from releasing the list Thakns go to Nick Altmann for reporting and testing the fix (cherry picked from commit 2b0dde30258da947b023737338f165dfa44a135d) 2021-07-05 Liviu Chircu * [b8d12d1e0] : cachedb_mongodb: Fix possible raw query crashes This patch fixes a series of bugs: * raw queries with no result AVP holder, causing a crash, e.g.: cache_raw_query("mongodb", ' "delete": "test", "deletes": [ {"q": {}, "limit": 0} ]}'); * raw queries with bad syntax, causing a crash * pkg memory leak during the "out of pkg memory" condition Credits to Bogdan-Andrei Iancu for the finds! (cherry picked from commit 0f748f46cf4b164890d024e8f9938b076137ce84) 2021-07-05 Razvan Crainea * [bdaea991f] : b2b_logic: mark the lock to be released as soon as it is acquired This prevents deadlocks when lock is taken, but the `do_unlock` marker is not yet set, this never released in case of errors. (cherry picked from commit bc8af8024609326b00cc0b15004ebb5a2727d6df) 2021-07-05 Liviu Chircu * [2100e649b] : sipmsgops: Fix sipmsg_validate() regression Commit b03cb41a31 introduced a regression while attempting to simplify some character-checking macros. Reported by Alexey Vasilyev Fixes #2563 (cherry picked from commit 21547d571d0ceaf19e5892b684a27c80e95987c9) 2021-07-02 Liviu Chircu * [967073f55] : Memory allocators: Revert Q_MALLOC to 8-byte alignment Commit 1f55d05c2b actually upped Q_MALLOC's address alignment from 8-bytes to 16-bytes. While this isn't necessarily a bug (in fact, it makes OpenSIPS more crash-safe), it enables new scenarios where buffer overrun crashes would happen with F_MALLOC but not with Q_MALLOC. And since Q_MALLOC is the intended crash debugger, these scenarios must not be allowed, so we stick to 8-byte alignment. If anyone needs 16-byte aligned memory, they can just re-define ROUNDTO and re-compile. (cherry picked from commit c29652fa10dbd34ce499f817891abe25964ee63b) 2021-07-01 Liviu Chircu * [6fc17804e] : Fix ARM32 warnings (cherry picked from commit e89b09e9eac4dfd4ac6673b9b7aaed9610466384) 2021-07-01 Liviu Chircu * [b491d44f8] : Memory allocators: Improve the memory alignment support This patch fixes the support for configurable memory alignment, such that the ROUNDTO macro is now truly customizable, for any allocator. As long as the ROUNDTO is a multiple of 2, the allocators will return memory aligned to any required multiple. The defaults are still the same, as follows: * F_MALLOC: 8-byte aligned memory addresses * HP_MALLOC: 8-byte aligned memory addresses * Q_MALLOC: 16-byte aligned memory addresses (the default in libc!) Also extend the allocator testing suite with memory alignment tests. Related to #2546 (cherry picked from commit 1f55d05c2b786ee8cca227ff367d49145bed51a4) 2021-07-01 Liviu Chircu * [7fd9cc6e9] : aaa_diameter: Fix mem leak on startup (cherry picked from commit d7bbb2951e6c923c4c6eaab95553cfe181589d20) 2021-07-01 Walter Doekes * [8da4b56eb] : Reduce db_is_neq_type complexity The code was correct, but overly verbose. Boil it down to the intention and rely on the compiler to work its magic. Reviewed-by: Liviu Chircu (cherry picked from commit c381060f9b5f67d0a6792fc82d86450ad93501c6) 2021-06-30 Razvan Crainea * [06f212467] : b2b_entities: fix tags parsing from request Fix bug introduced in 5e5fc98a (cherry picked from commit 9e29b549190e133b1fdbbb136acebd9b4229ba85) 2021-06-28 Bogdan-Andrei Iancu * [5e7ddc82f] : Fix pkg memory leak when building pres ID. This leak was introduced durin the 29e86ddf2b rework Reported by Bernard Buitenhuis (cherry picked from commit c893c237872c6823259a1fb087b62cfbc5d4fc70) 2021-06-28 Liviu Chircu * [329527bc4] : aaa_diameter: Fix acc_extra / acc_leg accounting This commit adds support for dynamically configured AVPs in both OpenSIPS (client-side) and freeDiameter (server-side), such that they can be added to the sent message and parsed from the received message. The syntax is identical to the RADIUS configuration file, e.g.: ATTRIBUTE out_gw 231 string ATTRIBUTE trunk_id 232 string ... (cherry picked from commit ba7077ade98570c1ad61618ae9130b77893d64bd) 2021-06-22 Liviu Chircu * [df5bee897] : dialog: Avoid storing id/entry values as signed integers This patch does not necessarily fix an immediate issue, however it's never advisable to compare / assign integers of different signedness. (cherry picked from commit 41a3230df25a53634e310e0ed874adcb829e885d) 2021-06-22 Liviu Chircu * [87e901827] : dialog: Fix a subtle bug in parsing dialog IDs from DB This fixes a rare issue where the dlg_parse_db_id() macro would right-shift a signed "long long" value, potentially leading to implementation or compiler defined behavior. The fact that there is a binary diff after applying this patch proves that there was an underlying, hard-to-detect issue in there: - 4b192: 48 c1 f8 20 sar $0x20,%rax + 4b192: 48 c1 e8 20 shr $0x20,%rax Credits to Nick Altmann for providing some hints on this issue! Related to #2504 (cherry picked from commit 103bdb48ae3f29e0121a180c8b3c53c0d6704df8) 2021-06-22 Nick Altmann * [95e1a3a90] : Dialog module: skip bogus dialogs when loading from DB (cherry picked from commit dd6cab3dac6d0c87f04aab4ff3d0027282098a06) 2021-06-22 Liviu Chircu * [ec854715e] : dialog pinging: Avoid nested pinging transactions This fixes a rare condition that could occur whenever the OPTIONS/Re-INVITE pinging interval was lower than the SIP transaction timeout (typically 15 seconds, so a pinging interval of < 15 seconds). In this case, a new pinging transaction would be continuously started, before the previous one would get the chance to complete, e.g. with 408 Timeout for a dead SIP endpoint. Fixes #2535 (cherry picked from commit ae1ffaf892f6a018bb1639d39665fffbe6bb3a1e) 2021-06-22 Liviu Chircu * [84f0c1e6b] : dialog: Minor rewrite of get_timeout_dlgs() * re-define the ping state values, as they are NOT meant to be combined or checked as a bitmask (they are mutually exclusive) * eliminate copy-pasted list detachment blocks (merge into one "if") (cherry picked from commit d1e2fdc5f44b1950d65ddcb4c97fc0d2d93d49e6) (cherry picked from commit 4b6097de408ab93682ee719764f12aba3d5b552c) 2021-06-18 Liviu Chircu * [6c78fdd7e] : mid-registrar: Make the "%40" Contact user substring configurable This patch adds the "at_escape_str" modparam, which is only relevant for mid-registrar running in "mode == 2" (AoR throttling). This setting gives developers more control over the mid-registrar's Contact headers in case the default sequence is problematic. This may fix issues where, for example, the "%40" string is un-escaped by the backend registrar, causing errors during DNS lookup of something resembling, e.g., "alice@1.1.1.1@2.2.2.2". ^-------------^ (the hostname that gets looked up) The default value remains unchanged: "%40" Related to #2367 (cherry picked from commit a5501ab3d2476382a3e6cb0382689c17a30c1a9f) 2021-06-18 Liviu Chircu * [7ea363272] : usrloc: Include the matching algorithm in replication packets Although this commit also bumps the usrloc BIN packet version from 2 -> 3, there is added logic for backwards-compatibility with version 2 packets, so the migration in a clustered environment should be silky smooth! Many thanks to Giovanni Maruzzelli (@gmaruzz) for catching this issue and providing a detailed bug report! Fixes #2351 (cherry picked from commit 60f1a532531cefe5696edc0844b7ccb0b36be4c6) 2021-06-18 Liviu Chircu * [cad9b171c] : registrar: Update the Contact URI on param-based matching (cherry picked from commit 8cc4b3249625802f2b3a11fb5f8b264cae6c6a11) 2021-06-17 Liviu Chircu * [54cf93cc6] : Fix compiler warnings with -DUSE_FUTEX Specifically: futex_lock.h:78: warning: implicit declaration of function ‘syscall’ This warning appears since glibc version 2.19, along with the introduction of the _DEFAULT_SOURCE FTM, which is a macro that seems to be additionally required when defining any of the previous FTMs... man feature_test_macros (cherry picked from commit 24c8ee9ed38ccc41ef45dce3065b9d88cb959782) 2021-06-15 Vlad Patrascu * [9bb66411a] : cachedb_redis: fix usage of ssl context from tls_mgm Closes #2538 (cherry picked from commit 0ddcb2bdbf845e92ef659042adb6524488268d8f) 2021-06-15 Liviu Chircu * [e6daa9e4a] : aaa_diameter: Add the "app_opensips" freeDiameter application This is the server-side component of the Diameter integration, permanently maintaining an open-connection to the "aaa_diameter" module's Diameter peer in OpenSIPS (or at least, ideally). The main goals of the app: * to offer support for all Diameter applications and interactions, e.g. accounting, digest authentication, etc. * to be fully pluggable into commonly-found package-based freeDiameter installs on newer distros (e.g. Debian 10+, Ubuntu 20+, possibly others). (cherry picked from commit ed397f948b5ff65479e41646e491bdc6bc83031e) 2021-06-15 Liviu Chircu * [2498904f8] : auth_aaa: Downgrade auth failure log to DEBUG This will prevent unnecessary log spam (cherry picked from commit 8661d315d07009d75075665c34279a139d0f9700) 2021-06-15 Liviu Chircu * [9bc98e10f] : aaa_diameter: Improve handling for digest auth Result-Code Add synchronization between SIP workers and freeDiameter peer threads, in order to pass the value of the Result-Code to the blocked SIP worker. As a next iteration, there is also the option of making this entire process asynchronous, possibly with something like: ... async (aaa_proxy_authorize("sipdomain.invalid"), resume_route); } route [resume_route] { if ($rc < 0) proxy_challenge("sipdomain.invalid"); ... } (cherry picked from commit 5139dfa01cb7bb0c7fed273f1ac2a8e1316a5d41) 2021-06-15 Liviu Chircu * [4f352c822] : aaa_diameter: Re-structure code; Share common AVPs with fD app (cherry picked from commit e00a71cb65814fff1929df02450dc2bfb3904ba9) 2021-06-15 Razvan Crainea * [999096021] : Module deps: do not run child init twice make sure mod init is not run multiple times when it is declared as a dependency, but is defined after it's dependent module (i.e. dialog is defined in script after topology_hiding) (cherry picked from commit 57df749c7d2b3cc47d82b05a4bd4492e76e758fd) 2021-06-15 Razvan Crainea * [61890536f] : call_center: check table version Credits go to Level 7 Systems Ltd. for reporting this. Close #1020 (cherry picked from commit ac9ff1e3827f6a801c3b0a9173d194c18e7bfb1c) 2021-06-15 Razvan Crainea * [a00426bb8] : presence: fix memory leak when receiving an unmatched replicated publish (cherry picked from commit d1d898878555abe48cd3584ab1f3a8fe6f84ced7) 2021-06-11 Vlad Patrascu * [28e15224c] : tls_wolfssl: do not compile module by default (cherry picked from commit d6361e95725f9fef6dddc3b0d2ebf1899ac13439) 2021-06-11 Razvan Crainea * [7fc0d491b] : acc: remove acc_created_avp_name param as unused The acc_created_avp_name parameter is no longer being used, so it has been dropped (cherry picked from commit 2bcb9fc719fd6fd11a958d74020faad70d5accc4) 2021-06-11 Razvan Crainea * [fbdaacb91] : b2b_entities: cover all cases where param is not printable Completes commit 0bd7fbe7 (cherry picked from commit 8ea5ce536664083b526e7fcf567e624bf9b7fe78) 2021-06-11 Vlad Patrascu * [f605759a7] : tls_wolfssl: remove all generated files with make clean (cherry picked from commit 0279e3d66c30fbff0dbecce34af19082b600157b) 2021-06-11 Vlad Patrascu * [5d1b3b531] : tls_wolfssl: improve documentation regarding compilation (cherry picked from commit ce38c621f8b0ddaf47da1b290e7fd5436c0e2dbe) 2021-06-10 Vlad Patrascu * [89f45a34e] : b2b_entities: run the create callbacks for the proper entities (cherry picked from commit 39f7aefb031ddafa5bd9dcebf0f8875f9d4c03fb) 2021-06-10 Vlad Patrascu * [3aaf3990e] : b2b_entities: fix entity type in create callbacks (cherry picked from commit 291417cc1f6564c6fe72dba50dd6adc5d5c86793) 2021-06-09 Bogdan-Andrei Iancu * [1772ac909] : [pua] fix starting pua without clustering Close #2550 Reported by @ovidiusas 2021-06-09 Walter Doekes * [da98caf62] : Fix memory corruption in usrloc/ul_evi Problem spotted by Liviu Chircu and bisected to fe28d3ea9. Fixes #2529. (cherry picked from commit 1c5e895db551c3272568d2c21f55ed14fbbb719e) 2021-06-08 Bogdan-Andrei Iancu * [503814cdd] : [presence] Fix inconsistent handling of optional "event_id" column If no value, the event_id could end up with a NULL or "" value. This was failing the later update query (no match on the event_id value), resulting in broken subscription status after a re-subscribe. (cherry picked from commit eaa2fd6510f533c357e8536fcdf22cad6f455322) 2021-06-08 Razvan Crainea * [8e457e68f] : rtp_relay: reverse flags for answer (cherry picked from commit 5f03b3ab298926ddb6c9a2ed8a9fa03f041e2a41) 2021-06-08 Razvan Crainea * [ce47e815f] : rtp_relay: fix rtp_relay_engage() example syntax (cherry picked from commit f6687cb5d857d477ef001b42652e6015b357106f) 2021-06-08 Razvan Crainea * [19d2a6340] : rtp_relay: fix new_node debugging message (cherry picked from commit af5a19632addcdb73e5e166481b0795861571fe3) 2021-06-08 Razvan Crainea * [a70cc72e2] : rtp_relay: allow any of new_node and new_set in the update command (cherry picked from commit 74afa1c93fdc5ff0724ca236b525b02a397a505c) 2021-06-08 Razvan Crainea * [8df886692] : rtp_relay: initialize session list after deleting it (cherry picked from commit 90cea7afa51a442d4973fe91e756ffab6f75b9de) 2021-06-08 Razvan Crainea * [6b22406c5] : rtp_relay: provide received information taken from contact for update (cherry picked from commit 802ecddf68b117018f79025a85ab1a1f2201c5e8) 2021-06-08 Razvan Crainea * [fc9ef0df6] : rtp_relay: remove commented code (cherry picked from commit 5adaeb295c00c193233750496933034b60932252) 2021-06-08 Razvan Crainea * [a1cb2bfda] : rtpproxy: fix parsing and changing SDP session c= line (cherry picked from commit 33a68841891b5e101118d0759dcdb291d75fbc5c) 2021-06-08 Razvan Crainea * [9d9ed9f9e] : rtpproxy: do not start notification process unless explicitely used (cherry picked from commit c16ef2e0c5e8abac345c4246d29aa4ab954ae4a9) 2021-06-07 Vlad Patrascu * [bc777333c] : tls_wolfssl: fix bad status returned by is_peer_verified() Closes #2541 (cherry picked from commit f9d8f66e1e1ef1453246b1e159b110cfcf4fb937) 2021-06-07 Vlad Patrascu * [9b343e0a6] : tls_wolfssl: fix possible crashes and bogus values for TLS variables (cherry picked from commit 79422f56d94a22bfa4156937c1a690c74a25a7c6) 2021-06-07 Vlad Patrascu * [0534d659c] : tls_wolfssl: fix double free when destroying tls domain Fixes #2540 (cherry picked from commit 4c0ff874d4cfa4125d7d9202a7614a4f9870e49e) 2021-06-07 Liviu Chircu * [72bbc4cf4] : F_MALLOC: Always perform an O(1) defragmentation on free() Changes: * remove the "memory space" runtime computation, as well as the 95% defragmentation "start threshold" (better performance!) * change the defragmentation heuristic from O(N) to O(1). This way, we avoid any performance issues caused by _too much_ defragmentation The main idea is to get rid of the dreaded "not enough shared memory, attempting defragmentation..." state, where SHM performance goes down dramatically, to the point where SIP traffic processing may stall. (cherry picked from commit fb9a377768f250a8f99a0e29f1fc9689d564dd5c) 2021-06-04 Liviu Chircu * [e7eea18df] : registrar & mid-registrar: Do not always force the matching mode When the "M" save() flag is not used, the registrars should not default to forcing the Contact-only matching mode (0), rather they should use the None mode (-1), and let usrloc use its own default setting. Part of a set of fixes for #2351 (cherry picked from commit 700b718db6520094c8ab458698088fd1d60c6eb3) 2021-06-04 Bogdan-Andrei Iancu * [93490e3c6] : Fix docs, removed old rule_attrs_avp modparam This was replaced for a long time by the `rule_attrs_pvar` param of `do_routing()` Reported by @MosinAnton Closes #2537 (cherry picked from commit 8ffc647af7d28d9be08c4805ad1fd0b7aa852966) 2021-05-31 Liviu Chircu * [7168e1d8c] : registrant: Rebuild DB schema (cherry picked from commit 7649696656ae9069c8d8d7d28c76809d68101ad0) 2021-05-31 Ovidiu Sas * [b15526a65] : db/schema: fix table version for registrant (cherry picked from commit d1d70ba89276c8b5f22258717a79b989d8739ede) 2021-05-29 Vlad Patrascu * [4c0f15ad9] : tls_mgm: fix module dependencies docs (cherry picked from commit 9d0ed55f83d31ae858eb1347f2132d85d32c707b) 2021-05-29 Vlad Patrascu * [e6caed988] : tls_mgm: fix tls_openssl dependency (cherry picked from commit 2cde93ccb0815b109bec528c69b9af430e6a5a7d) 2021-05-28 Liviu Chircu * [810934034] : Update MySQL DB migration scripts for "3.1 to 3.2" New tables in 3.1, now added to the migration procedure: * jwt_profiles * jwt_secrets * qr_profiles * rc_clients * rc_vendors * rc_ratesheets * rc_demo_ratesheet Changed tables in 3.2 (their columns no longer match 1:1, however the migration procedure still migrates their data): * b2b_logic * pua * registrant * subscriber 2021-05-27 Bogdan-Andrei Iancu * [cdf25709a] : [db] fix docs to point to 3.2 modules 2021-05-27 Razvan Crainea * [d5319228c] : Bump version to beta 2021-05-27 Nick Altmann * [cd250d850] : packaging/rpm: don't build tls_wolfssl for el7 2021-05-27 Vlad Patrascu * [eb332793c] : tls_openssl: fix kerberos check for openssl < 1.1.0 2021-05-27 Nick Altmann * [6f40c3565] : packaging/rpm: build aaa_diameter only on supported os 2021-05-27 Nick Altmann * [07c0b8934] : packaging/deb: build aaa_diameter only on latest distributives 2021-05-27 OpenSIPS * [795964d41] : Rebuild documentation 2021-05-27 Razvan Crainea * [a5914d832] : tracer: fix documentation related to file creating permissions 2021-05-27 Razvan Crainea * [ccf1669ff] : proto_wss: fix documentation xml typo 2021-05-27 Liviu Chircu * [51dc3c300] : aaa_diameter: Add initial README 2021-05-27 Razvan Crainea * [7296f24b5] : packaging/debian: add libfreediameter-dev dependency 2021-05-27 Liviu Chircu * [02b8c838e] : aaa_diameter: Add module documentation 2021-05-27 OpenSIPS * [c07944daf] : Rebuild documentation 2021-05-27 Nick Altmann * [b6770ad78] : package/rpm: add missed descriptions 2021-05-27 Nick Altmann * [418a7ad4f] : package/rpm: add aaa_diameter module, package/deb: fix aaa_diameter description 2021-05-27 Nick Altmann * [96f2a6bd9] : package/rpm tls_openssl and tls_wolfssl support 2021-05-27 Razvan Crainea * [518db2e22] : packaging/debian: add Diameter support 2021-05-27 Razvan Crainea * [cffb40572] : packaging/debian: add tls-openssl and tls-wolfssl packages 2021-05-27 Vlad Patrascu * [f99419e10] : proto_tls/wss: don't include openssl specific Makefile 2021-05-27 Liviu Chircu * [d980fe630] : build-contrib.sh: Add the b2b_logic rename sequence 2021-05-27 Nick Altmann * [150276430] : Packaging: fix description and name of package for b2b_logic_xml module 2021-05-27 Razvan Crainea * [5ca2955ef] : packaging/debian: revert renaming of the opensips-b2bua-module 2021-05-27 Nick Altmann * [8513e1992] : RPM package: remove b2bua-module, add b2b-logic-xml-module, move b2b modules to main package 2021-05-27 Liviu Chircu * [9f15980f5] : GitHub Worlflows: Exclude aaa_diameter from build 2021-05-27 Razvan Crainea * [0038520bf] : b2b_logic_xml: do not compile it by default 2021-05-27 Razvan Crainea * [0afd79e83] : packaging/debian: rename opensips-b2bua-module module renamed to and only putting b2b_logic_xml there opensips-b2bua-xml-module 2021-05-27 Razvan Crainea * [49bed2966] : add contributors for mi_script and rtp_relay 2021-05-27 Razvan Crainea * [803cea047] : mi_script: add new module 2021-05-27 Liviu Chircu * [60bef90ee] : aaa_diameter: Exclude from default build 2021-05-27 Bogdan-Andrei Iancu * [a51410d00] : [b2b_logic] mute error when the module cannot be loaded Let the upper function to generate an err log; by doing this we avoid annoying err logs when other module are simply probing to use the b2b_logic module (like tracer does). Similar fix as for load_dlg_api() from dialog module 2021-05-27 Vlad Patrascu * [483a52c51] : proto_bins: add missing xml files and update contrib and README 2021-05-27 Liviu Chircu * [d05e86273] : Merge branch 'feature/aaa-diameter' 2021-05-27 Liviu Chircu * [999caa0d3] : aaa_diameter: Add support for RFC 4740 (SIP Application) digest auth 2021-05-27 Vlad Patrascu * [721ad77c3] : tls_openssl: remove unused function 2021-05-27 Vlad Patrascu * [3cebcc660] : Makefile: add tls_openssl to excluded modules 2021-05-27 Vlad Patrascu * [62590a42d] : tls_wolfssl: update wolfssl library to 4.7.1r version 2021-05-27 Vlad Patrascu * [351a4eda2] : tls_wolfssl docs: update README file 2021-05-27 Vlad Patrascu * [049fdef0e] : tls_openssl docs: add contrib and README files 2021-05-27 Vlad Patrascu * [b27c3ec53] : wolfssl: rename module to tls_wolfssl 2021-05-27 Vlad Patrascu * [c73c1a8ad] : wolfssl: change wolfssl submodule path for an upcoming module rename 2021-05-27 Vlad Patrascu * [dd0701874] : wolfssl: port module to updated tls_mgm API 2021-05-27 Vlad Patrascu * [92ad53278] : tls_mgm: refactor module to be able to switch between TLS libraries 2021-05-27 Vlad Patrascu * [69ed4f782] : tls_mgm: split openssl code into a separate module 2021-05-27 Liviu Chircu * [81c3f2fd3] : aaa_diameter: Parameterize the realm and server peer 2021-05-27 Bogdan-Andrei Iancu * [dfcc74721] : [drouting] fix doc identation 2021-05-27 Bogdan-Andrei Iancu * [ee051d376] : [ratelimit] add docs for rl_dump_pipe MI cmd 2021-05-27 Bogdan-Andrei Iancu * [3df7195b6] : [tm] adding t_wait_no_more_branches() function This function helps in controling how long to wait for dyanmic branches (during a Push Notification scenario) 2021-05-27 Bogdan-Andrei Iancu * [5fc9a6172] : [pua] update docs with clustering support 2021-05-27 Nick Altmann * [acea7d81e] : RPM spec: fix date 2021-05-27 Liviu Chircu * [7cd25c214] : aaa_diameter: Add support for auth_aaa custom AVPs 2021-05-27 Liviu Chircu * [7ce4b13cf] : aaa_diameter: Add built-in definitions for all RADIUS digest AVPs 2021-05-27 Liviu Chircu * [68abe045c] : AAA auth: Fix names of well-known RADIUS digest auth AVPs 2021-05-26 Bogdan-Andrei Iancu * [ebb584e1e] : [pua] adding file related to clustering support Part of ea18d8 2021-05-26 Bogdan-Andrei Iancu * [672485ddf] : Regenerated dbschema for pua 2021-05-26 Bogdan-Andrei Iancu * [2aaa949b0] : [pua] add a new column for sharing tags 2021-05-26 Bogdan-Andrei Iancu * [ea18d8290] : [pua] Added clustering support The PUA data can be shared between multiple OpenSIPS instances using a mixage of DB sharing and clsutering/BIN support. This allows full support for HA or anycast scenarios. 2021-05-26 Bogdan-Andrei Iancu * [dbcc13cb5] : Fix callback triggering for calls with inactive clustering tags 2021-05-26 Bogdan-Andrei Iancu * [0ccb7c89d] : Fix debug message to properly show the tag's status 2021-05-26 Bogdan Andrei IANCU * [84b0bc7b5] : Merge pull request #2505 from nikbyte/drouting_default_db_url Drouoting: Use db_partitions_url if db_url field is empty in dr_parti… 2021-05-26 Razvan Crainea * [ea3e435b6] : rtpengine: break and continue after param is found This will avoid checking if a different parameter match and Thanks go to Walter Doekes (@wdoekes on GitHub) for spotting this. 2021-05-26 Nick Altmann * [d0310fac9] : rtpengine: support for manually setting received-from flag, fix copy-paste typo 2021-05-26 Răzvan Crainea * [4a8de6004] : Merge pull request #2509 from nikbyte/rtpengine_received_from rtpengine: possibility to set received-from flag from script 2021-05-26 Nick Altmann * [bbed603a5] : rtpengine: support for manually setting received-from flag 2021-05-26 Nick Altmann * [ecb7b0890] : rtpengine: support for zero-address flag, fix copy-paste typo 2021-05-26 Răzvan Crainea * [49dca8f75] : Merge pull request #2508 from nikbyte/rtpengine_zero_address rtpengine: support for zero-address flag 2021-05-26 Nick Altmann * [95c761174] : rtpengine: support for zero-address flag 2021-05-26 Nick Altmann * [913aa73d0] : Packaging RPM: rtp_relay module support 2021-05-25 Razvan Crainea * [c2814f3be] : event_rabbitmq: fix crash when dynamic sockets When freeing dynamic sockets, the pointer to the default user/password was lost, resulting in a bad check. 2021-05-25 Razvan Crainea * [da2f6dfa0] : event_rabbitmq: add support for persistent queues Specify a queue is persistent by adding the `;persistent` token to the rabbitmq url. Credits go to @gtanetwork on GitHub for requesting this feature Close #2252 2021-05-25 Razvan Crainea * [b2dd8fb67] : Merge branch 'feature/rtp_relay' 2021-05-25 Razvan Crainea * [9de1c975c] : cgrates: add possibility to store a JSON in request Using the `:=` operator when setting a variable, one can set an arbitrary json into the request sent to CGRateS. Thanks go to Vasilios Tzanoudakis (@vtzan on GitHub) for the feature requst in #2034 2021-05-25 Razvan Crainea * [9ea46a1f7] : cgrates: reset NULl flag if the variable is set 2021-05-25 Bogdan Andrei IANCU * [fdd0ddb4e] : Merge pull request #2421 from swk/rl_dump_pipe add rl_dump_pipe MI command. 2021-05-24 Razvan Crainea * [449130332] : proto_ws: add suport for requiring Origin header Thanks go to @robdyck on GitHub for reporting this in #2342 2021-05-24 Razvan Crainea * [adf18b033] : mi_fifo: fix syslog protected_fifos setting Credits go to Liviu Chircu (@liviuchircu) for spotting the error. 2021-05-24 Razvan Crainea * [dd65cbb95] : tracer: provide a way of modifying the tracing file mode Change default permissions mode to 0600 2021-05-24 Razvan Crainea * [0882e7d6f] : mi_fifo: document fifo /tmp directory error Starting with linux kernel 4.19, by default, the kernel no longer allows users to write in fifo files that are stored in a sticky-bit directory but they are not owned by the user trying to access it. The limitation was introduced in torvalds/linux@30aba6656f This problem was reported in OpenSIPS/opensips-cli#83 2021-05-24 Razvan Crainea * [ba730cd8b] : mi_fifo: proper print of fifo mode error 2021-05-24 Razvan Crainea * [00789877b] : tracer: fix uninitialized variable 2021-05-24 Razvan Crainea * [4d712a252] : tracer: add support for file and syslog tracing 2021-05-24 Razvan Crainea * [3215ee021] : tracer: fix typo and error handing when db insert fails 2021-05-24 Nick Altmann * [dc51592ab] : RPM spec: some cleanup 2021-05-23 OpenSIPS * [d1e0e8105] : Rebuild documentation 2021-05-21 Bogdan Andrei IANCU * [8fb3842fc] : Merge pull request #2415 from john08burke/dispatcher_setID_support Add support for set id substitution for dispatcher algorithm 9 2021-05-21 Bogdan Andrei IANCU * [53aeb090e] : Merge pull request #2511 from nikbyte/dr_is_gw New flag for dr_is_gw() which allows to check protocol of gateway 2021-05-21 Liviu Chircu * [621e0c431] : net/net_tcp: Fix compile error with -DEXTRA_DEBUG 2021-05-21 Vlad Patrascu * [726fca152] : b2b_logic: add support for dynamic advertised contact 2021-05-20 Razvan Crainea * [5414d5b34] : event_route: fix documentation typo 2021-05-20 Razvan Crainea * [850691634] : Merge branch 'nikbyte-multihome_socket_fix' 2021-05-20 Razvan Crainea * [35b26f2dd] : net/net_tcp: fix typo 2021-05-20 Razvan Crainea * [9ebf16679] : Merge branch 'multihome_socket_fix' of https://github.com/nikbyte/opensips into nikbyte-multihome_socket_fix 2021-05-20 Razvan Crainea * [0e81390c4] : stats: add support for grouping statistics in core Use the statistics groups to dump prometheus stats in a more prometheus-friendly interface. Suggested by Ovidiu Sas(@ovidiusas on GitHub) in #2482 2021-05-20 Razvan Crainea * [886466543] : statistics: turn on total pkg statistic 2021-05-19 Razvan Crainea * [67fc69ecf] : rtp_relay: properly pass body in rtp_offer/answer seq 2021-05-19 Razvan Crainea * [294ce0ed4] : prometheus: add support for exposing all statistics Close #2428 2021-05-19 Razvan Crainea * [1f414fd20] : statistics: add support for iterating modules list 2021-05-19 Razvan Crainea * [8e016f8e1] : prometheus: do not expose hidden stats 2021-05-18 Liviu Chircu * [87af91764] : aaa_diameter: Encode the Event-Timestamp as NTP octets; Fix ACR bugs 2021-05-18 Liviu Chircu * [2d44cb7c1] : str2const lib: Document some cryptic macros 2021-05-18 Liviu Chircu * [ce78e559d] : acc: Set the Sip-Call-MSDuration AVP during AAA CDR accounting 2021-05-18 Liviu Chircu * [8bf18679f] : acc: Fix bad data offsets for old AAA accounting Bug introduced along with the most recent "Sip-Call-MSDuration" AVP. 2021-05-18 Razvan Crainea * [f8b50fafd] : prometheus: make sure the stat's name is not changed if the stat starts with a number and there's nothing else to be prefixed, append a `_` before the stat's name 2021-05-18 Razvan Crainea * [4da337338] : prometheus: replace unpermitted chars with '_' Credits go to Rob Moore (@RobWMoore on GitHub) for reporting it and Ovidiu Sas (@ovidiusas on GitHub) for the solution. Close #2478 2021-05-18 Liviu Chircu * [9294f336c] : aaa_diameter: Add IPC between peer and workers (may send ACR) 2021-05-18 Liviu Chircu * [f895e1b04] : aaa_diameter: Pre-provision all known OpenSIPS RADIUS AVPs 2021-05-18 Liviu Chircu * [a2c6c62ba] : Complete the RADIUS dictionary with all known, custom AVPs Note that the below AVP codes have been changed, since the originally proposed codes have been re-used in some actually standardized AVPs: Sip-Method 101 (used by Error-Cause). New value: 204 Sip-Response-Code 102 (used by EAP-Key-Name). New value: 205 Sip-From-Tag 105 (used by Digest-Nonce). New value: 206 Sip-To-Tag 104 (used by Digest-Realm). New value: 207 2021-05-17 Razvan Crainea * [23a8bbf0b] : rtp_relay: add rtp_relay_update mi commands These commands can be used to re-anchor RTP during an ongoing call 2021-05-17 Razvan Crainea * [8e219b4f2] : rtp_relay: duplicate the node when restoring from dlg 2021-05-17 Razvan Crainea * [7671eb9c4] : dialog: for indialog requests, first ACK, then run handlers This change allows user to send the same peer another request, since it has already sent ACK for the current one 2021-05-17 Razvan Crainea * [48d04e204] : mi: fix init_mi_result_number Actually use a number instead of string 2021-05-16 OpenSIPS * [b77f50a8d] : Rebuild documentation 2021-05-14 Razvan Crainea * [cf6824b45] : rtp_relay: lock when printing RTP context 2021-05-13 Vlad Pătrașcu * [92835d614] : Merge pull request #2498 from nikbyte/b2b_fix_to_header Allow to pass To: header in b2b_init_request() as we do in create_top… 2021-05-13 Vlad Pătrașcu * [7cff0c985] : Merge pull request #2497 from nikbyte/b2b_fix_hardcoded_timeout B2B: fix hardcoded 60 seconds tuple timeout, allow 0 as tuple timeout… 2021-05-13 Vlad Pătrașcu * [ebfe08bca] : Merge pull request #2495 from nikbyte/b2b_contact_user B2B: Contact user feature 2021-05-13 Nick Altmann * [402ba465f] : B2B: Contact user feature 2021-05-13 Nick Altmann * [d7a5c372a] : Allow to pass To: header in b2b_init_request() as we do in create_top_hiding_entities(). RURI is not always a good candidate for To: header. 2021-05-13 Liviu Chircu * [edbd44ffb] : aaa_diameter: Initial version (functional peer) 2021-05-13 Nick Altmann * [699a9a3f7] : Fix documentation 2021-05-13 Vlad Patrascu * [e60a55664] : mi: fix possible crash when optional params are missing 2021-05-13 Razvan Crainea * [a0cb21642] : Revert "mi: make sure params list exists when fetching items" This reverts commit 3cb5de0d51dc5fe6777aee22acc307e64ae5e7e1. 2021-05-13 Razvan Crainea * [c6645f664] : mi: increase the max number of recipies 2021-05-13 Razvan Crainea * [9d8fb461b] : rtpproxy: only fallback to a new node during offer 2021-05-13 Vlad Patrascu * [debf908cf] : b2b_entities: fix crash when B2B tracing is disabled 2021-05-13 Razvan Crainea * [4c22af33f] : rtpproxy: remove unused snode var 2021-05-13 Razvan Crainea * [013b61850] : rtp_relay: add rtp_relay_list MI command 2021-05-13 Razvan Crainea * [3cb5de0d5] : mi: make sure params list exists when fetching items 2021-05-13 Razvan Crainea * [a7491867b] : rtp_relay: node should always be a string no need to add useless function for converting a node to string back and forth - it's always string, so the modules should use them accordingly 2021-05-12 Liviu Chircu * [df42ab92a] : Add the 'log_stdout' global parameter May be useful when working with 3rd party libraries which log important information to stdout. By default, all of these logs are discarded, since stdout is redirected to /dev/null. 2021-05-12 Vlad Pătrașcu * [9f4e13c48] : Merge pull request #2501 from nikbyte/b2b_increase_static_buffer B2B: Fix static buffer size because 1024 bytes is not enough often fo… 2021-05-12 Vlad Pătrașcu * [d26aa91d4] : Merge pull request #2496 from nikbyte/b2b_fix_contact_for_replaces_invite B2B fix contact header when do bridge on multi-home b2b 2021-05-10 Razvan Crainea * [45d3e65cf] : rtpengine: initialize ret variable for all code paths 2021-05-10 Razvan Crainea * [1d6bd56bf] : github: remove Xenial builds Xenial had become unmaintained on 30th of April 2021, and on 4th of May 2021 GitHub Actions deprecated it: actions/virtual-environments#3302 2021-05-10 Razvan Crainea * [7306e64cd] : rtp_relay: add documentation for new module 2021-05-10 Liviu Chircu * [7f7118bbf] : drouting docs: Fix modparam types 2021-05-10 Razvan Crainea * [a90eccf9c] : github: remove Xenial builds Xenial had become unmaintained on 30th of April 2021, and on 4th of May 2021 GitHub Actions deprecated it: actions/virtual-environments#3302 2021-05-09 OpenSIPS * [0ce16c283] : Rebuild documentation 2021-05-07 Razvan Crainea * [e13d06204] : ratelimit: repurpose the repl_buffer_threshold Instead of defaulting it to MTU (due to an old datagram limitation), we should use a higher value, that would only control the fragmentation of the send buffer. Moreover, do not send the buffer to the clusters nodes under lock, since it might block, thus block the entire ratelimit function. 2021-05-07 Razvan Crainea * [40e660d74] : cgrates: initialize sessions lock Without the init, the lock might start as locked, thus OpenSIPS would have locked at first context. This was initially reported in ticket #2271. Credits go to Barny Ritchley (@barnabyritchley on GitHub) from SIPSynergy for reporting and providing testing environments. 2021-05-06 Liviu Chircu * [5f850e191] : Packaging: Fix tarball URL for BSD systems 2021-05-05 Liviu Chircu * [51a7c2834] : Function fixups: Be less verbose Closes #2492 2021-05-05 Nick Altmann * [9880d8539] : Fix tcp/tls socket reusage for multihome opensips 2021-05-03 Nick Altmann * [78cac0cbb] : New flag for dr_is_gw() which allows to check protocol of gateway 2021-05-03 Nick Altmann * [eef4af9c3] : Drouoting: Use db_partitions_url if db_url field is empty in dr_partitions table. Useful when you need different partitions in the same DB 2021-05-03 Nick Altmann * [452f22796] : B2B: fix hardcoded 60 seconds tuple timeout, allow 0 as tuple timeout which means maximum duration 2021-05-03 Nick Altmann * [d4315d5e6] : B2B: Fix static buffer size because 1024 bytes is not enough often for messages with large number of headers 2021-05-03 Nick Altmann * [e28d70fd8] : B2B fix contact header when do bridge on multi-home b2b 2021-05-02 OpenSIPS * [e7e6ba61c] : Rebuild documentation 2021-04-29 Liviu Chircu * [6703ab5ac] : WolfSSL: Use HTTPS instead of SSH for the git URL Fixes #2491 2021-04-29 Liviu Chircu * [78dd040af] : Function fixups: Include a backtrace on runtime errors Old behavior: ERROR:core:get_cmd_fixups: Variable in param [1] is not an integer ERROR:core:do_action: Failed to get fixups for command New behavior: ERROR:core:get_cmd_fixups: Variable in param [1] is not an integer ERROR:core:do_action: Failed to get fixups for command in cfg-tests/aaa-diameter.cfg, line 66: $var(mf) = "10"; if (!mf_process_maxfwd_header($var(mf))) { ^ sl_send_reply(483, "Too Many Hops"); exit; Credits to Kingsley Tart for the report! Related to #2492 2021-04-28 Razvan Crainea * [48193208e] : rtpproxy: rework locking while used over rtp_relay 2021-04-28 Razvan Crainea * [5d10a34c3] : rtpengine: add rtp_relay implementation 2021-04-27 Liviu Chircu * [8caa3d0c6] : qrouting: Use a reverse-dependency to drouting instead Taking advantage of the recently added support to specify this dependency in a cleaner way (in the qrouting code, not drouting). 2021-04-27 Liviu Chircu * [707ff810a] : qrouting: Use an IPC to load data during child_init() This fixes a design issue where qrouting _always_ loads its data before drouting, simply because it's doing it via an inline child_init() load, while drouting is lazy-loading via an IPC job. 2021-04-27 Liviu Chircu * [0fa6b96bc] : Module deps: Re-order the child_init() callbacks The child_init() callbacks are now processed in the same order as the mod_init() callbacks (obeying any existing "init" module dependencies). 2021-04-27 Razvan Crainea * [563ed865f] : rtpproxy: remove redundant check 2021-04-27 Liviu Chircu * [63cbf4c32] : dialog: Force "tm" to always destroy first This should fix all types of shutdown issues where tm cleans up after dialog, with dialog having leaked some of its own cleanup callbacks in tm, but which are now segfaulting because all dialog internal structures have been already freed. Credits to Peter Lemenkov for reporting this issue! Closes #2487 2021-04-27 Liviu Chircu * [c46979bc0] : Module deps: Re-order mod_destroy(); Add reverse dep support Expanding on 5deded37fb9, this commit adds two new features: * the mod_destroy() callbacks are now also ordered using the module dependencies. By default, modules are destroyed in the reverse-order of their dependencies (e.g. approximately opposite to mod_init() callback sequencing) * using the new DEP_REVERSE_INIT and DEP_REVERSE_DESTROY flags, any module dependency may be manipulated to behave in the opposite way, during either startup or shutdown Related to #2487 2021-04-27 Razvan Crainea * [6db7ea74e] : WIP: rtp_relay: cleanup dialog ctx var, as it is useless 2021-04-27 Razvan Crainea * [205d02a0d] : WIP: rtp_relay: register dialog pointer in pre-init Make sure that all dialogs that are loaded do have the dialog pointer registered, otherwise the dialogs get to be corrupted. 2021-04-27 Razvan Crainea * [cf9afd02a] : rtpproxy: load rtp_relay in reversed order 2021-04-27 Razvan Crainea * [3666289a9] : deps: rework deps to allow specifying a reversed order 2021-04-27 Razvan Crainea * [5deded37f] : deps: rework deps to allow specifying a reversed order 2021-04-27 Bogdan Andrei IANCU * [407f5f66c] : Merge pull request #2481 from wdoekes/release-insertq-lock-when-downscaling Don't forget to release the insertq lock when downscaling workers 2021-04-26 Liviu Chircu * [f7b8e1bf0] : Merge branch 'fix-usrloc-crash-in-db_timer_udomain' of https://github.com/wdoekes/opensips into wdoekes-fix-usrloc-crash-in-db_timer_udomain 2021-04-26 Liviu Chircu * [551c1ed41] : Update contributors 2021-04-26 Liviu Chircu * [4e43db731] : io_watch_del(): Suppress DEL errors for closed fds Similar fix to 21344d1f7 (from 6 years ago), but for newer Linux kernels (e.g. 5.8.0), which return ENOENT instead of EBADF. Fixes: DBG:rest_client:_resume_async_http_req: HTTP response code: 200 DBG:tm:io_watch_del: [UDP_worker] io_watch_del op on index -1 246 (0x561edd52c560, 246, -1, 0x10,0x1) fd_no=5 called ERROR:tm:io_watch_del: [UDP_worker] removing fd from epoll (246 from 171) list failed: No such file or directory [2] 2021-04-26 Liviu Chircu * [fc88b2c99] : rest_client: Fix async rest_get() stalling with local web server Similar issue to #2483, where the async GET operation would stall indefinitely, due to curl_multi_perform() not being called multiple times during the single invocation of the "resume" callback. In this case, the issue was caused by a misplaced "enable_expect_100" check. Not using the "Expect: 100" feature doesn't mean that curl_multi_perform() should be called at most once. Using libcurl 7.68 2021-04-26 Liviu Chircu * [f3b1c3d9b] : Merge pull request #2484 from john08burke/async_rest_issue [rest_client] Fix async connection logic 2021-04-26 Bogdan-Andrei Iancu * [a1eb48011] : Fix missing tracing for UAS in-dialog requests Expand the tracing function to take the UAC incoming request as param also, so we can trace it too. 2021-04-25 OpenSIPS * [ce9d94a65] : Rebuild documentation 2021-04-23 Bogdan-Andrei Iancu * [eccdb130a] : [b2b_entites] fix typos in the b2b tracing code 2021-04-23 John Burke * [98c6652a0] : [rest_client] Fix async connection logic Fixes #2483 2021-04-23 Bogdan-Andrei Iancu * [c38eff729] : [tracer] added b2b session tracing Based on the PR from @nikbyte Credits to @nikbyte for the idea and for the initial patch Closes #2409 2021-04-23 Bogdan-Andrei Iancu * [149b4ab05] : Add "free param" function for the tracer 2021-04-23 Razvan Crainea * [aee0cb0e7] : rtpproxy: if a session has a node, try to use it 2021-04-23 Razvan Crainea * [d8fcd2649] : rtpproxy: port notify process to new proc IPC interface 2021-04-23 Bogdan-Andrei Iancu * [c6c8ee0fb] : Align to the changes in b2be.client/server_new Set the tracing funtion to NULL. 2021-04-23 Bogdan-Andrei Iancu * [3458d8a0e] : Add b2b_logic level tracing Expose tracing callback, to enable tracing for the whole b2b session. Push the tracing functions to all b2b entities involved in the session. 2021-04-23 Bogdan-Andrei Iancu * [452d72ac3] : Align to the changes in b2be.client/server_new Set the tracing funtion to NULL. 2021-04-23 Bogdan-Andrei Iancu * [2e10c2f24] : Added tracing capabilities for b2b entities The B2B server and client may take as parameter a tracing function (callback + param) for performing transactional tracing. The B2B entities will trigger this tracing function for each transction created (UAC or UAS) 2021-04-22 Bogdan-Andrei Iancu * [aff3084ad] : Add "tranction created" callback for UAC transactions The idea is to get access to the created transaction before actually doing the SIP signaling, for example to be able to set some callbacks before the request is sent out. 2021-04-22 Razvan Crainea * [e97941406] : WIP: rtp_relay: proper handing of sequentials replies 2021-04-22 Razvan Crainea * [b57a77bc8] : WIP: rtp_relay: rename rtp_relay_node to rtp_relay_server 2021-04-22 Razvan Crainea * [aa100d2ac] : WIP rtp_relay: add support for dialog persistency 2021-04-22 Razvan Crainea * [d45c06d32] : WIP: rtp_relay: add support for getting rtpproxy node 2021-04-22 Walter Doekes * [ad7a1c1d4] : Don't forget to release the insertq lock when downscaling workers Not sure if this is a problem or of the locks gets freed correctly after exit(). But it looks nicer this way. 2021-04-22 Bogdan-Andrei Iancu * [b707c3864] : Added PROC_FLAG_NEEDS_SCRIPT for module procs By this flag, the module process indicates that it needs access to the script routes. The core will expose the loaded routes to this process and also do the routes reload for it (via IPC). Note: having the routes requires also the reloading (IPC), so PROC_FLAG_NEEDS_SCRIPT will automaticall imply PROC_FLAG_HAS_IPC also, just to be sure we have a consistent setting for the process. 2021-04-22 Bogdan-Andrei Iancu * [a2187f039] : Cleanup - drop IPC from t_uac_dlg() Now the MI related processes do have script routes (thanks to the IPC support provided by the reactor proc), so we do not have to do the IPC hack here anymore - run the local route inline, in the same process. 2021-04-22 Razvan Crainea * [f5f85b677] : dialog: only raise event if someone is listening 2021-04-21 Răzvan Crainea * [386802a1f] : Merge pull request #2468 from wdoekes/con-ps-reference-cleanup Prefer CON_SET_CURR_PS over CON_PS_REFERENCE 2021-04-21 John Burke * [2515c7499] : Instead of summation, use combination schema for cookie: `PID_RAND_SEQN` (cherry picked from commit cc851498a3d1345cd680e69d18da7303d26bcb06) 2021-04-21 John Burke * [f9958d777] : Fix cookie collision when using rtpengine/rtpproxy modules When using Docker, PIDs often are the same between OpenSIPS instances and cannot be used as a good source for cookie prefix. Use prefix with random influence instead. Fixes #2459 (cherry picked from commit e6cfd6f3c7e358ee9581aa9adca6398f4eead033) 2021-04-21 Razvan Crainea * [355e15b1a] : WIP: rtp_relay: do not reverse type during replies 2021-04-21 Liviu Chircu * [55e2a3b65] : Rebuild DB Schema (new `subscriber` table columns) 2021-04-21 Liviu Chircu * [3d743ac24] : db_mysql: Add a new 'ps_max_col_size' modparam Useful in case your column data size exceeds the default 1024 bytes setting. 2021-04-20 Razvan Crainea * [afc97fac6] : WIP: rtp_relay: handle sequentials 2021-04-20 Vlad Pătrașcu * [e773301da] : Merge pull request #2475 from vasilevalex/tls_ipv6 [tls_mgm] Store IPv6 address in full form for TLS domain matching 2021-04-20 Bogdan-Andrei Iancu * [ef3518bf2] : Fix race condition between accept and write on TCP conn Upon accepting a new TCP conn, the TCP Main is adding the conn into the hash, but the conn is initialized by the protocol just after being passed to the TCP Worker. So, for a short time (while the conn is passed from TCP Main to TCP Worker), the conn is not properly initialized, so not safe to use. And here we have the race condition, as the conn, being already in the tcp hash, it is foundable by any other process trying to do a write op. So, a process may end up trying to do a write on an not fully init tcp conn -> crash :( The fix is to avoid "finding" in hash the uninit conns. Closes #2258 2021-04-20 Bogdan-Andrei Iancu * [ead4e2c3c] : Fix missing MHD_USE_EPOLL on older than 0.9.50 versions 2021-04-20 Bogdan-Andrei Iancu * [ba253c2e3] : [httpd] Migrated to the reactor framework (for the I/O process) 2021-04-19 Bogdan-Andrei Iancu * [1f5ad8f60] : [mi_datagram] Migrated to the reactor framework (for the I/O process) 2021-04-19 Bogdan-Andrei Iancu * [59e589f8e] : Test if adding the fg into reactor was a success or not 2021-04-19 Razvan Crainea * [065784586] : sipcapture: establish the procs number at parsing Updating the number of extra procs needed by the module in mod_init() is a bad idea, since the attendant does not see any changes made by the process that runs mod_init, thus it waits for more children tha it should have, resulting in some bad pipe errors. Credits go to @ghmj2417 for reporting this in #2259 and to Bogdan Andrei IANCU (@bogdan-iancu) for brainstorming the final solution. 2021-04-19 Razvan Crainea * [6a920dd3f] : rtpproxy: fix initializing child If a process is not started with flag PROC_FLAG_INITCHILD, OpenSIPS will not be interested in its init status, thus the extra process will not be able to report its initializing state. If however it was doing that, it would hit the bug reported in ticket #2259, where the attendant was badly couting the number of processes that need to be initialized, due to the fact that it would not see any updates (in this case of the exports.procs structure) the process would be doing in its mod_init(). Credits go to @ghmj2417 for reporting this in #2259 and to Bogdan Andrei IANCU (@bogdan-iancu) for brainstorming the final solution. 2021-04-19 Bogdan-Andrei Iancu * [420f34876] : Fix foobar typo 2021-04-19 Bogdan-Andrei Iancu * [16e45b7a7] : For itself, avoid IPC and do inline pkg stats If it will send an IPC to itslef, this will get exectuted AFTER the WHOLE pkg-stts job is done, so useless. 2021-04-19 Bogdan-Andrei Iancu * [7b2e8c371] : Introduce F_GEN_PROC for I/O reactor Part of 0f67fc1 2021-04-19 Bogdan-Andrei Iancu * [037d4f638] : Migrated to the reactor framework (for the I/O process) 2021-04-19 Bogdan-Andrei Iancu * [0f67fc136] : Added reactor framework for custom/module procs. See the reactor_proc.h for details. 2021-04-19 Aleksei Vasilev * [eca45b731] : [tls_mgm] Store IPv6 address in full form for TLS domain matching Fixes #2474 2021-04-18 OpenSIPS * [9155c0fe9] : Rebuild documentation 2021-04-16 Razvan Crainea * [e7b7f954e] : WIP: rtp_relay: add dialog support 2021-04-16 Bogdan-Andrei Iancu * [d38c5765f] : Fix internal detection of DUMMY messages. Closes #2464 (cherry picked from commit faafd673dddf2c0784e570565c2c18dcb5520f36) 2021-04-16 Razvan Crainea * [1cade2b35] : rtp_relay: add support for printing the relay node 2021-04-16 Razvan Crainea * [cd1df2aac] : rtp_relay: store established session in ctx->main 2021-04-16 Bogdan-Andrei Iancu * [6a89cb8eb] : Migrate tcp conn ID from int to unsigned int As used to generate array indexes (for tcp partitions), the ID of the TCP conn must be a positive number. Still it was initialized with rand() (so possible high valules) and continously incremented -> this may lead to an overflow, resulting into a negative value (for an int data type). The solution was to move to unsigned int, so we are safe when overflowing (still resutling into a positive number) Fixes #2344 2021-04-16 Razvan Crainea * [86147b941] : rtp_relay: fix engaging rtp_relaying in main branch 2021-04-16 Razvan Crainea * [db5f7ed87] : stats: remove unsupported_methods statistic Removing the statistic as it is not reliable, due to the fact that the term "unsupported_methods" is quite generic and does not reflect the actual methods supported by OpenSIPS' script. Reported by Ben Newlin (@bcnewlin) in Ticket #2460 2021-04-16 Razvan Crainea * [8ec9b41fa] : mmgeoip: proper description of database open error 2021-04-16 Razvan Crainea * [e3fdc964f] : dialog: allow dialog timeout set by different modules Addresses ticket #2380 opened by Adolphe Cher-Aime (@acheraime) 2021-04-15 Liviu Chircu * [7b87cbc03] : Update contributors 2021-04-15 Liviu Chircu * [129834d12] : stir_shaken: Fix two OpenSSL BIO memory leaks Patch provided by John Burke Fixes #2472 2021-04-15 Liviu Chircu * [42d1fabcf] : auth: Complete e31b525e08f (CentOS 7 build issues) Credits to Nick Altmann for the report, once again! 2021-04-14 Liviu Chircu * [db899f6df] : stir_shaken: Fix heap corruption due to X509_STORE_CTX misusage As advised by the OpenSSL docs: "The certificates and CRLs in a store are used internally and should not be freed up until after the associated X509_STORE_CTX is freed." ... whereas the code would attempt to create a global X509_STORE_CTX object a single time, at OpenSIPS startup, then re-use it on each stir_shaken_verify() call. However, the certs would unfortunately get freed after each verification, thus breaking the library requirements. The solution is to simply create and free a X509_STORE_CTX object on each verification. Many thanks to Sandro Gauci (Enable Security) for the find! Issue discovered during OpenSIPIt'01 (https://opensipit.org/) 2021-04-14 Liviu Chircu * [ecf5d64d5] : stir_shaken: Fix missing "return -1;" statements Issue discovered during OpenSIPIt'01 (https://opensipit.org/) 2021-04-14 Liviu Chircu * [d6aa971e3] : stir_shaken: Further improve commit 9c9cce6f36 It's not enough to check for missing PASSporT payload fields, as the code can also crash on a cJSON type mismatch (malicious input?), e.g.: {... "orig": {"tn": ["1234"]} ...} Here, the "orig-tn" is incorrectly given as a list, where it should be a string. Without an extra check for a NULL cJSON string subfield, the code would still crash. Many thanks to Sandro Gauci (Enable Security) for the find! Issue discovered during OpenSIPIt'01 (https://opensipit.org/) 2021-04-14 Liviu Chircu * [9c9cce6f3] : stir_shaken: Fix $identity variable crash on missing fields Although stir_shaken_verify() correctly handles an incomplete PASSporT such as this one: {"orig":{"tn":"7778888"},"attest":"A","origid":"X","iat":1618403426} (notice the "dest" claim is missing) ... if the script writer were to xlog() the $identity(dest) value before the verification step, they would crash OpenSIPS. Many thanks to George Joseph for helping with testing! Issue discovered during OpenSIPIt'01 (https://opensipit.org/) 2021-04-14 Razvan Crainea * [af6399101] : signals: remove log in SIGCHLD handling Avoid deadlock generated when a SIGCHLD (caused by the completion of a process started through for example `exec`) handler tries to log something to syslog while the actual process was writing at syslog. Kudos to Javier Gallart from Sonoc for reporting the issue and testing the fix. 2021-04-14 Razvan Crainea * [f97797058] : WIP: rtp_relay: remove unused function 2021-04-14 Razvan Crainea * [e751c9a82] : WIP: rtpproxy: fix uninitialized variable 2021-04-14 Razvan Crainea * [c9e6902dc] : WIP: rtpproxy: imlement rtp_relay offer, answer and delete 2021-04-14 Razvan Crainea * [b6056ca95] : WIP: rtp_relay: add new RTP relay module Currently only initial request is handled 2021-04-14 Liviu Chircu * [e31b525e0] : Digest auth: Fix compilation issues on CentOS 7 * rename "static_assert" to "_Static_assert" (better compatibility) * avoid variable declarations inside for loops * avoid _BSD_SOURCE re-definition 2021-04-14 Liviu Chircu * [46e4d1433] : stir_shaken: Improve reply code/reason on missing Date If the mandatory Date header field is missing, change the reply from "403 Stale Date" (??) to "400 Bad Request (Missing Date)". Also, normalize macro naming and error message format across all 400 response reasons. Issue discovered during OpenSIPIt'01 (https://opensipit.org/) 2021-04-13 Walter Doekes * [d5885552f] : Prefer CON_SET_CURR_PS over CON_PS_REFERENCE They were used in the same fashion. And as the Zen of Python teaches us: There should be one-- and preferably only one --obvious way to do it. (See also discussion at 57caa6c03.) 2021-04-13 Walter Doekes * [50fe41d2d] : Fix crash in db_timer_udomain() when the database has little work The previous code, added in 1f0be8f02 but mostly fixed by 0d0909fc1, added this interesting erroneous pattern: static db_ps_t my_ps = NULL; db_key_t keys[2]; db_op_t ops[2]; if (my_ps == NULL) { keys[0] = &expires_col; ops[0] = "<"; ... That is: the initialisation of the stack depended on a global (local static). Once it was set, the initialisation would be skipped, causing keys and ops to contain undefined values. Due to the way the CON_PS_REFERENCE() prepared statement handle code has become, my_ps would always be reset to NULL after use, hiding this bug. However, if you have a flaky database connection (for instance an auto-closing socket on a machine with little traffic) then the following happens: CRITICAL:db_mysql:wrapper_single_mysql_stmt_execute: driver error (2003): Lost connection to backend server. ERROR:usrloc:db_timer_udomain: failed to delete from table location ERROR:usrloc:synchronize_all_udomains: synchronizing cache failed When this happens, my_ps is _not_ reset to NULL, and the next time this function is invoked, keys and ops are undefined, causing a segfault down the road. This changeset adds an if around use_table() because all the other code in this module does so. The actual fix is the removal of if(my_ps==NULL). (An alternative fix could have been to explicitly reset the prepared statement handle to NULL like 57caa6c03 does. Or to make keys and ops static too and set them only once.) 2021-04-12 Liviu Chircu * [2aff7cf51] : Digest auth: Fix MD5 regression on missing client "qop=" This fixes a bug with clients which may not include a "qop=" parameter in their Authorization header. Since the ".response" API function is invoked with some struct member address, the pointer check was always TRUE, even for NULL or empty "qop" strings received from the client. Issue discovered during OpenSIPIt'01 (https://opensipit.org/) 2021-04-12 Bogdan-Andrei Iancu * [ad0fccf81] : Fix internal detection of DUMMY messages. Closes #2464 (cherry picked from commit faafd673dddf2c0784e570565c2c18dcb5520f36) 2021-04-12 Liviu Chircu * [afae3363e] : stir_shaken: Fix several unset code/reason output vars on error cases Also add new 400 and 500 SIP retcodes to signify client / server errors. (cherry picked from commit 7cff7b60ce74e2a652d984b87a3ea5ec3847a3eb) 2021-04-12 Liviu Chircu * [91eca076c] : stir_shaken: Several logging improvements * add better separation between server-side / client-side errors, throughout both of the orig / dest telephony number extraction and validation phases. * bump client-side errors from INFO to NOTICE, for better visibility. * add extra logging details (phone numbers, timeouts, etc.) (cherry picked from commit b3f511f7bc2fa2fdb78f0c005abcd295af2e4176) 2021-04-12 Liviu Chircu * [1db73b680] : stir_shaken(): Fix too relaxed E.164 conditions; Add number checks Commit 8c842cc33d made it such that any string is accepted as valid STIR/SHAKEN identity, in "loose mode". For example, "From: sip:foobar@test.com" would pass as valid CLI and "foobar" would get written in the PASSporT, which cannot be OK. This commit also makes it so the new "e164_strict_mode" modparam makes the leading "+" mandatory in the From/To URIs. Otherwise, the "+" is optional and will get discarded if necessary. Moreover, by moving the number checks around a bit, this commit also fixes a bug where the opensips.cfg inputted orig/dest numbers are never checked. For example, if the developer were to have a bug where some $var(cli) contains a SIP URI and gets passed to stir_shaken as originator, the module would happily write the URI into the PASSporT as "orig" and return success. (cherry picked from commit 140e4c0ef810bd75fbbc4cbbfb1a80c72da67271) 2021-04-12 Liviu Chircu * [ab447c15a] : dprint.h: Add LM_GEN() macro (generic logging with prefix) 2021-04-12 Liviu Chircu * [775c35972] : is_e164(): Extend with optional '+' support This patch makes it so the _is_e164() check can be invoked in a way that does not mandate the leading '+' sign. (cherry picked from commit 35009a868cd85a63b46c1a30d25de0b0e9d48ca8) 2021-04-11 OpenSIPS * [2938786f5] : Rebuild documentation 2021-04-10 Vlad Patrascu * [8c842cc33] : stir_shaken: relax E.164 number restrictions by default Add a "e164_strict_mode" module parameter that enables a strict check on the originating/destination identity derived from the SIP message. 2021-04-10 Vlad Patrascu * [b3fb33643] : b2b_logic: fix handling of integer values in the extra header AVPs Reported in #2431 2021-04-09 Vlad Patrascu * [fd10448de] : mi: fix possible crash when optional params are missing 2021-04-09 Vlad Patrascu * [fab0e2173] : clusterer: add MI function that disables/enables a capability 2021-04-09 Vlad Patrascu * [a7425d4ad] : dialog: add ability to auto sync from cluster on node UP event Issue a sync request automatically when a node becomes reachable, for all sharing tags in backup state. 2021-04-09 Vlad Patrascu * [74cb23a89] : dialog: mirror dialogs from donor node when syncing from cluster Drop existing dialogs from memory if they are not received in the sync data. Also, improve the dlg_cluster_sync MI command by adding the ability to sync only the dialogs that are marked with a specific sharing tag. 2021-04-09 Razvan Crainea * [e3221aa16] : dialog: replace hash_id and hash_entry with id and db_id in event Thanks go to Kingsley Tart(@kingsleytart) for reporting it in #2463 2021-04-09 Razvan Crainea * [a64635706] : dialog: fix docs about the default value of `dlg_id_column` param 2021-04-09 Razvan Crainea * [d2cc4f91d] : parser/body: provide has_body_part() and get_body_part() in core 2021-04-07 Razvan Crainea * [ce45460ec] : Makefile/mem_stats: only modules Makfiles are used Without specifying a depth, when building per-groups statistics, only modules' Makefiles should be used, not other whatever libs are in each module. This commit is needed because the wolfssl libs has its own Makefile, with its own NAME= variables declared, resulting in redundant (and unused) declarations. 2021-04-06 Bogdan-Andrei Iancu * [197dd6aba] : Added Caller/callee only SIP tracing. Using the new "C" and "c" control flags, the tracing may capture only the caller or calle related traffic. 2021-04-05 Razvan Crainea * [50858e8aa] : dialog: update contact on TMCB_RESPONSE_FWDED Before this change, the contact was updated on the RESPONSE_OUT callback - the problem is that in that callback, when using topology hiding, you wouldn't know the actual Contact advertised (or fixed) by the client, because you would only see the topology hiding's advertised Contact. Thus, on replies, we couldn't update the remote's target properly. Moving the update logic on TMCB_RESPONSE_FWDED exposes the right Contact. Credits go to John Burke (@john08burke) for documenting this in ticket #2444. 2021-04-05 Liviu Chircu * [977d74ce0] : make menuconfig: Add new event_kafka module to selection list 2021-04-05 Liviu Chircu * [752b457d5] : Dauth parser tests: Fix compile warning Compiling parser/test/test_parser.c parser/test/test_parse_authenticate_body.c:90:2: warning: missing initializer for field ‘tres’ of ‘const struct tts’ [-Wmissing-field-initializers] 90 | } | ^ parser/test/test_parse_authenticate_body.c:35:6: note: ‘tres’ declared here 35 | int tres; | ^~~~ ...using gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 2021-04-05 Razvan Crainea * [720a8dded] : mem: fix previous commit by specifying mem name 2021-04-05 Razvan Crainea * [fa027d00b] : mem: improve f_malloc logging during defragmentation Instead of triggering an ERROR before defragmenting, let the defragmentation try to find a free frag, and only if it doesn't, trigger the ERROR. Thanks Liviu Chircu (@liviuc) for brainstorming 2021-04-05 Liviu Chircu * [875add647] : Merge pull request #2442 from sippy/pr-RFC8760 Implement RFC8760 digest authentication. 2021-04-05 Bogdan-Andrei Iancu * [c15dc8db3] : [siptrace] added custom correlation ID in sip_trace() A new optional 5th param to sip_trace() allows the overriding of the default SIP correlation ID (the Call-ID) with a custome value. This new correlation ID covers the entire tracing scope. 2021-04-05 Razvan Crainea * [a8f8aabc2] : transfromation/regex: remove unnecessary regex limitation Thanks go to Calvin Ellison for reporting this in the mailing list Completes 6e1afe64 2021-04-05 Bogdan-Andrei Iancu * [8684370eb] : Fix tracing the outbound ACK in transactional tracing 2021-04-04 OpenSIPS * [a35206860] : Rebuild documentation 2021-03-31 Razvan Crainea * [a8e98f9db] : tm: do not forward replies addressed to a different anycast node When a node receives a reply that is not addressed to himself (the cid parameter points to a different node), it should not forward the reply downstream, as it was already forwareded to the node where the transaction was initially created. Credits go to Jonathan Hulme for spotting this and reporing it in #2445 2021-03-31 Razvan Crainea * [40b968fb8] : Makefile.defs: add clang compiler handling for mode=debug Credits go to Andriy Pylypenko (@bambyster) for spotting the issue 2021-03-31 Răzvan Crainea * [23d8f38fb] : Merge pull request #2447 from bambyster/fix_for_makefile_defs Fix for Makefile.defs 2021-03-30 Nick Altmann * [2060eec70] : Packaging: support for wolfssl in rpm 2021-03-30 Nick Altmann * [786b2532c] : Packaging: fix typo in rpm spec 2021-03-28 OpenSIPS * [a56793a77] : Rebuild documentation 2021-03-26 Andriy Pylypenko * [2d4448c66] : Allow to override the INSTALL_* variables. 2021-03-26 Andriy Pylypenko * [a48b5e1ca] : Fix the order of ifeq statements. 2021-03-25 Razvan Crainea * [3f964878b] : cgrates: fix timeout precision loss when MaxUsage is in ns Converting the MaxUsage from nanoseconds to int was causing an overflow, setting the dialog timeout to 0, thus terminating the call immedately after the 200 OK was received. Reported by Adolphe Cher-Aime (@acheraime) 2021-03-24 Liviu Chircu * [8e0b00940] : Merge pull request #2439 from wdoekes/restore-registrar-save-f-flag-for-sqlonly-2372 Restore registrar 'f' flag behaviour for "sql-only" db_mode 2021-03-24 Maksym Sobolyev * [e53751e26] : Implement RFC8760 digest authentication. Merged up to the top of the branch RFC8760, 18550dca1596. 2021-03-23 Vlad Patrascu * [1f8f6b1f8] : clusterer: don't drop rerouted messages 2021-03-23 Vlad Patrascu * [f76baad60] : net: mark closed FD for expired tcp connections If the socket fd is closed and not marked appropriately in the tcp connection structure, the proto modules might try to do a connection cleanup with an invalid FD. 2021-03-23 Vlad Patrascu * [07774e9da] : Add support for BIN over TLS using the wolfssl library The actual TLS operations required by the proto_bins module are provided by a wolfssl module which includes the wolfssl library code. 2021-03-23 Liviu Chircu * [de8a5ddca] : Proper fix for 6c7cb2806b 2021-03-23 Liviu Chircu * [6c7cb2806] : time_rec.c: Fix gcc warning on i386 2021-03-23 Liviu Chircu * [031f1d641] : cfgutils: Fix check_time_rec() with BYXXX rules Most unit tests added in 4942bfca4d were incorrect as they were using an invalid "19700000T000000" Date-Time (both month and day should be 01). This patch fixes both the tests and the code to work as expected, while also extending BYYEARDAY to support ascending daily intervals. Additionally, the following logic is added: * protection against invalid Year, Month, Day or Frequency specified in the time recurrence string. Previously, this kind of bad input would have passed undetected! * auto-recovery for some invalid recurrences, e.g.: - missing DTSTART (assume UNIX timestamp 0) - missing DURATION, without a recursion rule (assume infinity) - missing DURATION with a recursion rule. Here, the assumed duration varies according to the recurring interval size 2021-03-22 Razvan Crainea * [b38e8ff5e] : b2b_entities: retransmission ACK with SDP for late negociation 2021-03-22 Razvan Crainea * [756916e1a] : prometheus: add more custom tuning for group 2021-03-22 rance * [f598271ea] : Fix memory cleak from freeswitch events. (cherry picked from commit 3d9d0f4f6dab86e132ed5f26de0f7e30b8a6cf03) 2021-03-21 OpenSIPS * [2c7843eba] : Rebuild documentation 2021-03-19 Razvan Crainea * [0f98f489c] : prometheus: add a prefix to the statistics' names Also allow customization of the statistics group prefix Credits go to Ovidiu Sas (@ovidiusas) for brainstorming and opening the feature request. Close #2427 2021-03-19 Liviu Chircu * [d8f647f89] : drouting: Fix some log messages 2021-03-19 Liviu Chircu * [a500c6bd3] : drouting: Add the "rule_tables_query" feature This patch adds optional support for an SQL-based way of building a set of dr_rules-compatible table names, to be each loaded and joined into a single "dr_rules" table, for any chosen partition. Usage example, where we build a single "dr_rules" table out of two other ones, named "dr_rules_a" and "dr_rules_b": modparam("drouting", "rule_table_query", "MY_RULES_QUERY: SELECT 'dr_rules_a' UNION SELECT 'dr_rules_b'") For the "MY_RULES_QUERY" token to be recognized, it must be provided as the name of the "dr_rules" table inside the partition DB entry, i.e. the `dr_partitions.drr_table` column. This module parameter may be set multiple times, where each definition will update the query for the respective "dr_rules" table name (token). Credits to Vlad Paiu for the initial prototype of this concept! 2021-03-19 Liviu Chircu * [92541f2d2] : Improve SHM / PKG / RPM memory block logging on startup * bump up the log level to NOTICE (matching the default `log_level`) * display the used allocator for each memory block * correct the unit from Mb (megabits??) to MB (megabytes!) 2021-03-19 Liviu Chircu * [32e41a8c1] : -d binary option: Evaluate before PKG malloc initializations There is no need to delay the evaluation of '-d'. By moving it earlier, we gain the ability to control the logging of PKG memory initialization. This patch doesn't change the fact that '-d' is somewhat broken, because it will immediately get overridden by the 'log_level' configuration file option. But this is subject to a future patch. 2021-03-19 Liviu Chircu * [c64d8cb3d] : drouting: Fix incorrect is_from_gw() examples Reported by Alexey Kazantsev 2021-03-18 Razvan Crainea * [68806c4b0] : b2b_entities: do not search dlg by NULL from_tag b2b_search_htable_dlg() always requires a non-NULL from_tag, therefore when searching the dialog with an empty one (for example in case of a b2b client timeout), we shall check agains a 0-length totag, rather than NULL, otherwise it would result in a crash 2021-03-18 Razvan Crainea * [855467245] : uri: fix memory leak generated by uri_param() The `params` list was changing while iterating through params, thus at the end of the function, the first parameters within the list whould have leaked. This commit fixes the leak 2021-03-18 Walter Doekes * [18932e3db] : Restore registrar 'f' flag behaviour for "sql-only" db_mode On 2020-05-25 fix 3a1f9c1e2 for #2118 was introduced into opensips 3.1. This change also modified things so cid_keys and cid_vals would *not* be allocated when the database was in "sql-only" mode. When "sql-only" mode is used, all usrloc records are saved to the DB immediately, and are loaded from DB immediately. The relevant settings: modparam("usrloc", "working_mode_preset", "sql-only") Which equals the deprecated db_mode setting 3: modparam("usrloc", "db_mode", 3) # 3 = "sql-only", DEPRECATED Or, as three separate settings: modparam("usrloc", "cluster_mode", "sql-only") # CM_SQL_ONLY modparam("usrloc", "restart_persistency", "none") # RRP_NONE modparam("usrloc", "sql_write_mode", "none") # SQL_NO_WRITE # This last option is slightly awkwardly named, but it refers # to *additional* SQL writing which is not performed. Because, # the is only *direct* SQL reading/writing. In any case: the changeset removed the access to temporary storage of cid_keys/cid_vals for the CM_SQL_ONLY case, under the assumption that it was not needed: ``` if (rr_persist == RRP_LOAD_FROM_SQL) { if (!(sync_lock = lock_init_rw())) { LM_ERR("cannot init rw lock\n"); return -1; } - } - } - if (cluster_mode != CM_NONE || rr_persist == RRP_LOAD_FROM_SQL) { - cid_keys = pkg_malloc(max_contact_delete * - (sizeof(db_key_t) + sizeof(db_val_t))); - if (!cid_keys) { - LM_ERR("oom\n"); - return -1; - } + /* initialize the "merged contact deletes" array */ + cid_keys = pkg_malloc(max_contact_delete * + (sizeof(db_key_t) + sizeof(db_val_t))); + if (!cid_keys) { + LM_ERR("oom\n"); + return -1; + } ``` However, those "merged contact deletes" were still needed when the registrar save() function tries to limit the number of Contacts (using the 'f' force overwrite flag). registrar:add_contacts() calls usrloc:release_urecord() with the contacts that should be removed (from the database). This calls usrloc:db_only_timer() (and wb_timer) and finally usrloc:db_multiple_ucontact_delete(). The wb_timer was supposed to populate the cid_keys/cid_vals with the database IDs passed along from the registrar module. But because that temporary cid_vals storage was not available, that bit would be skipped: ``` /* Should we remove the contact from the database ? */ if (cid_vals && st_expired_ucontact(t) == 1 ``` The result: usrloc:db_multiple_ucontact_delete() had nothing to delete; the max contacts save settings would be ignored. This changeset restores the `cluster_mode != CM_NONE` alternative that initialises cid_keys/cid_vals, restoring the force/max_contacts behaviour. 2021-03-18 Liviu Chircu * [c4eb952cc] : drouting/qrouting: Avoid trailing "\n" in MI responses 2021-03-18 Bogdan-Andrei Iancu * [a1faad648] : Clean/Reset the timestamp too Completion to 6aab0da937fbf3bc07a1587b1b1cc29fb78ebbc6 2021-03-18 Bogdan-Andrei Iancu * [6aab0da93] : Fix cleanup of the re-used dummy sip msg. Be sure to clean ALL the fields in the msg, not only the ones related to the msg parsing. The prevent inheriting of data between sequential usage of the message, we need to clean the flags, sockets, etc. (cherry picked from commit 4a2183a620c2ede9481b4369a459e2cf65dcaa48) 2021-03-18 Razvan Crainea * [d3d955fed] : acc: improve the accuracy of CDRs duration in secs Up until this commit, if a call's duration would have been T.56 ms, the duration of the CDR might have been computed as Ts. This commit makes sure that the number of seconds is always higher than the duration in ms by ceil-ing the number of ms. 2021-03-18 Razvan Crainea * [f1a412698] : acc: use the time in the message instead of getting it This improves the accuracy of the CDRs, as the time of the message is only fetched once and used by all the logic to compute different durations 2021-03-18 Razvan Crainea * [a74ed1401] : add time in msg struct 2021-03-16 Liviu Chircu * [0395eaf80] : dialog: Relax the allowed output variable types This patch also allows module variables to be passed as output variables to various dialog functions, e.g.: get_profile_size("tot-calls/b", $avp(dst), $acc_leg(ongoing_channels)) Fun fact: commit 4ba14e51cbb did exactly the same thing ~2 years ago, but the logic was lost during the function interface migration :-) 2021-03-16 Bogdan-Andrei Iancu * [68cca59e4] : Fix transactional tracing via LOCAL route * in local route do not trace as IN msg (on the spot) as logically speaking, there is no IN request here (it is generated by opensips itself) * trace the OUT request via the TMCB_MSG_SENT_OUT callback, which is now available for the UAC transactions. The tracing must be done AFTER the local route completion, so we can trace the resulting msg (with its changes) and the correct destination (as per local route changes) 2021-03-16 Bogdan-Andrei Iancu * [23d9bf68b] : Revert "Fix transactional tracing via LOCAL route" This reverts commit 61e89088fe52ce99bb9d37565477548b61d37444. Some work-in-progress leaked in this commit 2021-03-16 Bogdan-Andrei Iancu * [61e89088f] : Fix transactional tracing via LOCAL route * in local route do not trace as IN msg (on the spot) as logically speaking, there is no IN request here (it is generated by opensips itself) * trace the OUT request via the TMCB_MSG_SENT_OUT callback, which is now available for the UAC transactions. The tracing must be done AFTER the local route completion, so we can trace the resulting msg (with its changes) and the correct destination (as per local route changes) 2021-03-16 Vlad Patrascu * [9352c513b] : Add event_kafka to excluded modules 2021-03-15 Vlad Patrascu * [dac973404] : proto_tls/wss: complete fix in commit b6b7520 2021-03-15 Liviu Chircu * [0f4e738b9] : freeswitch: Fix memory leak with Sockets not being cleaned up (cherry picked from commit d2a561f40f7832fa5d59d62fe6b76f9d7bcf63fe) 2021-03-15 Liviu Chircu * [16b45293f] : Merge pull request #2396 from lemenkov/tm_async_verbose tm: Be more verbose when async detected in non-request route 2021-03-15 Liviu Chircu * [9611e8680] : dispatcher: Fix algorithm 9 regression Completes commit d9d1b9660b. Credits to John Burke for the report! Fixes #2413 2021-03-14 OpenSIPS * [17d149b32] : Rebuild documentation 2021-03-12 Razvan Crainea * [18a106147] : b2b_entities: don't require to_tag if empty (cherry picked from commit 963d87a932ec2e3eb7d0f3a9567ebd6ad3c93fa2) 2021-03-12 Liviu Chircu * [b8166f567] : db_sqlite docs: Remove extraneous wall of text Reported by Nick Altmann 2021-03-11 Liviu Chircu * [0236912c7] : Module docs: Fix obsolete SIP authorize / challenge examples 2021-03-11 Liviu Chircu * [593ff1e9c] : clusterer: Simplify/Improve cluster_check_addr() docs 2021-03-11 Liviu Chircu * [635ef0480] : drouting docs: Avoid str vs. int confusion 2021-03-09 Razvan Crainea * [efb9e16de] : rtpproxy: alocate anonymous structures in local scope RTPP_CMD_IOVEC and RTPP_VCMD_INIT_STATIC are initializing a variable with the content of another (anonymous one). If we however create the anonymous variable in a block's scope, it will be unavailable at the end of the block, resulting in invalid memory access - allocating the structures in the function's context (rather than a block's context) fixes this issue. Bug introduced in 0d7a71b2. 2021-03-07 OpenSIPS * [2886f8bb7] : Rebuild documentation 2021-03-03 Liviu Chircu * [39e5dfd6d] : qrouting: Fix bad column names during reload Many thanks to Abdoul Osséni for the report! 2021-03-02 Vlad Patrascu * [0a336899d] : event_kafka: migrate to the global DUMMY SIP msg support 2021-03-02 Bogdan-Andrei Iancu * [2d5420ab2] : Migrated to the global DUMMY SIP msg support This is a completion to the 84d1bad2c41b4b58170c0943edd837b08d15012f 2021-03-02 Razvan Crainea * [666959e19] : [evi] Migrated to the global DUMMY SIP msg support 2021-03-02 Liviu Chircu * [24432524e] : db_mysql: add debug for failed to create ctx err 2021-03-02 Liviu Chircu * [8da72779a] : db: add extra logging for bogus integers 2021-03-01 Bogdan-Andrei Iancu * [db41b3dd9] : Fix building the presentity ID when publishing dialoginfo Following the re-work for being able to publish per-branch dialog info (when the the ID of the dialoginfo document was extanted to callid.branch format), we also need to do the same with the internal ID of the presentities being published (between the pua_dialoginfo and pua modules), so the PUBLISHing should be done as from different sources (call1 versus call2). Otherwise, the PUBLISHes for the branches of the same call will mix at the pua level, looking as coming from the same source. (cherry picked from commit 29e86ddf2bec43227323c432ec4ca8431f4212ff) 2021-03-01 Liviu Chircu * [b7b45ff30] : drouting: Allow DB_BLOB for `dr_carriers.gwlist`, `dr_carriers.attrs` Similar reasons as in a34456845 -- these colums may get quite large! 2021-03-01 Liviu Chircu * [a34456845] : drouting: Allow DB_BLOB for the `dr_rules.timerec` field The recent extension to the time recurrence strings has caused the max possible column size for `timerec` to easily exceeed 1KB, so BLOB becomes the most appropriate column type in that case. 2021-03-01 Razvan Crainea * [a9ba24ba8] : prometheus: resolve stat modules later, when all are registered Thanks go to Ovidiu Sas (@ovidiusas) for reporting it. 2021-02-28 OpenSIPS * [b98a10b59] : Rebuild documentation 2021-02-27 Nick Altmann * [b16619b87] : Packaging: fix typo 2021-02-27 Nick Altmann * [5d2a53b91] : Packaging: small fixes for rpm spec 2021-02-27 Nick Altmann * [f37bea25a] : Packaging for even_kafka 2021-02-26 Robert Moss * [5389a4472] : add rl_dump_pipe MI command. Dump underlying buckets for SBT rate limits. 2021-02-26 Vlad Patrascu * [9dbb0b8ac] : event_kafka: fix compilation for librdkafka versions 0.9.2 to 1.0 2021-02-26 OpenSIPS * [3fe92afe0] : Rebuild documentation 2021-02-26 Razvan Crainea * [d57593fa5] : add packaging for Prometheus module 2021-02-26 Vlad Patrascu * [6ecb3fe48] : CI build: exclude event_kafka 2021-02-26 Vlad Patrascu * [74fb67a22] : event_kafka: fix missing initializer in module exports 2021-02-25 Vlad Patrascu * [f179f5cfe] : Add new event_kafka module 2021-02-25 Vlad Patrascu * [495380cf6] : Add support for async status reporting for the event interface In order to properly report the status of a raise operation, transport modules no longer have to implement a synchronous mode, where the triggering process has to block and wait for the dedicated module process to return back the status. As such, the "sync_mode" module parameter has been dropped from event_rabbitmq, event_xmlrpc and event_stream modules. At the moment, only the event_virtual module actually registers an async status callback. The evi raise function used by all other modules always returns success if the raise "job" has been "pushed" succesfully. 2021-02-25 Razvan Crainea * [fac2247c2] : prometheus: fix typo in documentation 2021-02-24 Liviu Chircu * [ed74875df] : Cache DB: Escape all logged URL passwords Additionally: * fix similar security issues in the Mongo and Redis clients * rewrite some cachedb unit tests Suggested by @ChrisZhangJin Related to #2416 2021-02-24 Razvan Crainea * [7c41fe5ff] : prometheus: add module to export statistics to Prometheus 2021-02-24 Liviu Chircu * [4ca36b1f7] : cacheDB URLs: Do not mandate the "/" URL portion Whether the "/" is given or not, semantically, the conclusion is the same: "the name of the database is NULL". Reported by Chris Zhang (@ChrisZhangJin) Fixes #2416 (cherry picked from commit c6baca41a23852a5337167a4e6fdd464b5513bd5) (cherry picked from commit 50b2dfe463815c48f18929e10ea7e0e505ac6ba2) 2021-02-24 Liviu Chircu * [5572fbe3c] : Merge pull request #2407 from danlshields/dshields/makeDebugMessages Use DBG level for per-connection nominal log messages 2021-02-24 Liviu Chircu * [5290203d5] : Merge pull request #2417 from fgast/wrong_route_description Fix wrong route type in error message 2021-02-24 Fabian Gast * [786fd9b96] : Fix wrong route type in error message 2021-02-23 John Burke * [343e4846b] : dispatcher: update docs 2021-02-23 John Burke * [6e9c1af5d] : dispatcher: substitute set ID (%i) when using algorithm 9 2021-02-22 Razvan Crainea * [bfb158dcf] : acc: populate setup and created even for missed 2021-02-21 OpenSIPS * [824587552] : Rebuild documentation 2021-02-18 Dan Shields * [a595cf174] : Use DBG level for per-connection nominal log messages 2021-02-18 Vlad Patrascu * [f925153d1] : db_http: fix crash when loading module along with tls_mgm 2021-02-18 Vlad Patrascu * [e968cb5a3] : uuid: complete fix in previous commit (91ce542) 2021-02-18 Vlad Patrascu * [91ce54298] : uuid: fix compilation if UUID version 3 or 5 not available 2021-02-18 Razvan Crainea * [50e1db5ed] : statistics: expose function that returns a statistic group name 2021-02-17 Liviu Chircu * [5f2f276d4] : dispatcher 'ds_list': Include the DNS SRV lookup results 2021-02-16 Vlad Pătrașcu * [cc4bc2f9f] : Merge pull request #2403 from john08burke/uuid_version_support Add support for UUID versions 3 and 5 2021-02-16 kworm83 <21957311+kworm83 at users.noreply.github dot com> * [a84d72f44] : Fix raise_node_state_ev parameter order Calls to raise_node_state_ev had the node status and cluster_id parameters reversed. (cherry picked from commit 6b9d6e8c572d75d8daab5155f75b5654d44adb39) 2021-02-15 John Burke * [562f11eed] : uuid: update docs 2021-02-15 John Burke * [24ee33378] : uuid: add support for UUID version 3 and 5 2021-02-15 John Burke * [c6e874f76] : uuid: remove unnecessary RET_UNSAFE check from $uuid pv creation, as version 0 never calls uuid_generate_time_safe 2021-02-14 OpenSIPS * [2fdfca88a] : Rebuild documentation 2021-02-12 Razvan Crainea * [09c3fb94d] : call_center: fix MI cc_list_calls state print 2021-02-12 Vlad Patrascu * [b6b752002] : proto_tls/wss: fix crashes when dumping the openssl error stack This commit serializes the execution of openssl's connect/accept/read/write operations in order to prevent adding/removing entries concurrently to/from the openssl error stack. If the performance penalty is deemed too high, the NO_SSL_GLOBAL_LOCK compilation flag can be used to disable this behavior and retain the risk of crashes. Reported in #2362 Credits to Alexey Vasilyev for helping troubleshoot this. 2021-02-10 Liviu Chircu * [872c4e89d] : usrloc ct IDs: Never pack more than 14 bits from a contact label 2021-02-10 Liviu Chircu * [93163b9eb] : usrloc: Several fixes regarding contact IDs * always increment record.next_clabel modulo CLABEL_MASK (this is critical, because clabels are 14-bit wide, while an unsigned short is 16-bit, so we'd overflow into the rlabel) * regen_broken_contactid: do not re-insert all contacts to DB if a single one is broken * do not update urecord contact labels on contact updates (the label may have rotated! by setting it to a high value, we're almost encouraging a conflict once it rotates again) 2021-02-09 Razvan Crainea * [e0152488f] : ratelimit: add support for debugging PIPEs 2021-02-09 Razvan Crainea * [451591f8e] : Variables comparing: first try to interpret operands as int Before this commit, all variables were interpreted as strings, thus comparing was always done against strigs. This broke simple comparisons such as $var(x) < $var(y), where $var(x) = 7 and $var(y) = 100; introduced in c13786c4 2021-02-08 Maksym Sobolyev * [024b93bda] : Merge pull request #2393 from sippy/tmerge_20210203 Refactor structure(s) packing code to do not put C structures at random unaligned offsets 2021-02-07 OpenSIPS * [6aba946eb] : Rebuild documentation 2021-02-05 Vlad Patrascu * [a1ad260de] : b2b_logic: properly check entities required for notity/rollback 2021-02-05 Vlad Pătrașcu * [f641a99c7] : Merge pull request #2392 from nikbyte/b2b b2b_logic: support for rfc3515 NOTIFY and rollback after failed transfer 2021-02-05 Vlad Patrascu * [ac2f9c813] : b2b_entities: don't pass empty storage packet to entity callbacks Reported in #2387 2021-02-05 Vlad Patrascu * [2617ca44a] : b2b_entities: fix crash if DB loaded entity hash_index is too large 2021-02-05 Nick Altmann * [38b0974d5] : b2b_logic: Apply new changes only in REFER state 2021-02-04 Liviu Chircu * [34af3c454] : pvv_is_int(): Be even more flexible This patch further improves commit 6191f278a, where the macro will now also work with code such as: (excerpt from pv_set_count()): ... pv_val.flags = PV_TYPE_INT; pv_val.ri = pv_name->pvp.pvi.u.ival-1; ... Notice how the flags are poorly set, since the PV_VAL_INT bit should have been used instead. 2021-02-04 Liviu Chircu * [96f12ac27] : usrloc + mid-registrar: Fix possible SHM leak of "" strings Credits to Pete Kelly for the report! 2021-02-04 Peter Lemenkov * [d7145869e] : tm: Be more verbose when async detected in non-request route If async operation is detected in non-request route then tm tries to switch to sync mode emmitting just a debug message. Debug messages are relatively rarely being turned on, so this switch to sync can be left unnoticed. Let's raise the severity to WARN so this situation can be spotted much easier. 2021-02-03 Maksym Sobolyev * [fe28d3ea9] : Alocate complex structure using anonymous struct, not pointer arith. This is to get rid of warnings on ARM32. 2021-02-03 Maksym Sobolyev * [9d1504016] : Do not break platform alignment rules by placing struct right after variable-length string. Instead, pack all fixed-length structs first and append variable portion at the end of the allocated buffer. This is particularly important on ARM32, but even on i386/amd64 would produce slowish code and might have some extra synchronization quirks when shared across multuple cores. 2021-02-03 Liviu Chircu * [f4b73ccce] : $socket(port): Indicate an integer type, not a string Also applies to $socket(advertised_port) and $socket(anycast). Many thanks to Alex Kinch for the report! 2021-02-03 Maksym Sobolyev * [b88c129cd] : Cast char * to void * to avoid "cast increases required alignment" warning on ARM32. 2021-02-03 Maksym Sobolyev * [5de77f56d] : Don't break alignment rules accessing h_addr_list members of the hostent structure. 2021-02-03 Maksym Sobolyev * [d83a128a8] : o Fix printf format warnings on ARM32. o Use PRIx64 not %lx to convert 64-bit value into hex. o Use strtoull() to prevent 64-bit wraparound on 32-bit arches. 2021-02-02 Nick Altmann * [9faaa3170] : b2b_logic: Support for rfc3515 NOTIFY and rollback on failed transfers 2021-02-02 Liviu Chircu * [f3c3ed53e] : $socket(af) variable: Fix returned value type Credits to Alex Kinch for the report! 2021-02-02 Razvan Crainea * [5267295ec] : statistics: fix statistics series typo 2021-02-02 Razvan Crainea * [7aa054dee] : statistics: fix iteration of unsinged int instead of int 2021-02-02 Razvan Crainea * [4fea2cfb8] : statistics: add statistics series implementation 2021-02-02 Razvan Crainea * [8107e3065] : dispatcher: set proper group when raising event Thanks go to Slava Bedersky (@volga629-1 on GitHub) for reporting it Close #2391 2021-02-02 Nick Altmann * [1c3e6e375] : b2b_logic: Fix B2BL_FLAG_USE_INIT_SDP flag value because it's used for bitwise operations 2021-02-02 Nick Altmann * [2b2a1743f] : b2b_logic: Fix newline character in debug message 2021-02-01 Razvan Crainea * [d698da1af] : dialog: swap the leg when starting 2nd re-INVITE in challenge mode 2021-01-31 Razvan Crainea * [be76c413d] : Makefile.defs: avoid creating stdin.o Use the generic `-` stdin read for platforms that do not expose `/dev/stdin`. Completes commit 5af4f120 2021-01-31 OpenSIPS * [aa1763c0b] : Rebuild documentation 2021-01-29 Maksym Sobolyev * [c6842064b] : Make 3rd arguments of the reg_lookup() API const str *, not just str *. Another small fallout of the 0147baa210. Reported by: @liviuchircu 2021-01-29 Maksym Sobolyev * [a7b591a60] : Fix small fallout (in tests) from the 0147baa210 - make str *hdr const. 2021-01-29 Maksym Sobolyev * [e26ac7d92] : Switch get_stat() and __get_stat() to take const str *, not str *. 2021-01-29 Maksym Sobolyev * [fc22e1784] : Use const_str() not _str() when generating point of use literals to be used in str_match() / str_casematch(). As discussed with @liviuchircu here https://github.com/OpenSIPS/opensips/commit/0147baa21072c5b9#commitcomment-46519279 it saves us some code size and also should have at least some positive performance effect by not saving 2 values into memory that nobody reads. 2021-01-29 Maksym Sobolyev * [ce8b994d1] : Extend str_match() and str_casematch() APIs to work on any combination of str and str_const's. 2021-01-29 Liviu Chircu * [2d9b5130c] : drouting: Change `dr_rules.gwlist` to NULL by default 2021-01-29 Liviu Chircu * [a764ea3e6] : drouting: Tolerate a NULL dr_rules.gwlist In build_rt_info(), there is a NULL check anyway: if ( dstlst && dstlst[0]!=0 ) { ... so this patch can only do good, by making the code compatible with even more flavours of the `dr_rules` table. 2021-01-28 Maksym Sobolyev * [2b455a392] : Set .iov_base = NULL for cookie and terminator when initializing on stack. This is to silence compiler warnings on Centos 7. 2021-01-28 Maksym Sobolyev * [0147baa21] : Convert _str() from inline to a macro and make it return (const str *), not (str *). This is to limit potential damage from its (mis)use in non-testing modules code by first making its value stored locally at point of use (which should allow compiler to throw it away when used properly) and also provide at least some protection from any function from messing with its fields. Fix any fallout where str * has been passed around. 2021-01-28 Razvan Crainea * [d85d0b50e] : dialog: do not update advertised contacts on dlg update When replicating a dialog update, we shall not update the advertised contacts, as we don't have all the needed information. If we do, we break the re-homing scenario that uses different advertises for different instances. Bug introduced in 52e6c42 2021-01-28 Maksym Sobolyev * [4ac1ad5a1] : Fix generics test: void main() -> int main(). 2021-01-28 Maksym Sobolyev * [609f22f6a] : Having space in file name is bit rude. 2021-01-28 Maksym Sobolyev * [cb1520090] : Remove unnecessary and harmful CROSS_COMPILE conditinal here. 2021-01-28 Maksym Sobolyev * [18b46da60] : Use const_str(), not _str() to generate point-of-use string literal for calling the str_strcmp(). 2021-01-28 Maksym Sobolyev * [5c7282447] : Add const_str() macro, a better way to generate point-of-use string literal of type const str_const * to be used in cases like: str_strcmp(in, _str("header")) The problem with the _str() usage in this scenario among many is that it updates the static pointer burried somewhere in application guts with length and location of the buffer containing its argument (e.g. "header" in this case) each time the operation is performed and that extra work cannot be optimized away. I have confirmed it with the Compiler Explorer, it costs us two memory writes each time str_strcmp() is invoked. Which not only isn't secure but also should have at least some negative performance effect. Use of: str_strcmp(in, const_str("header")) in this scenario will not only be free of that effect, but also pointer provided by the const_str can generally be passed along and saved as needed, it will always be valid as long as the application runs. 2021-01-27 Maksym Sobolyev * [a14c74f60] : Move all _Generic() statements into lib/str2const.h, so that we can have a less-typesafe callback for older compilers. Provide a fallback if HAVE_GENERICS is not definedi (e.g. CentOS 7). 2021-01-27 Maksym Sobolyev * [5af4f1202] : Test if _Generic() is supported and set HAVE_GENERICS if so. 2021-01-27 Maksym Sobolyev * [66feeea59] : Revert "Add strSC_strcmp() to compare const str * to const str_const *" This reverts commit cab6edbf80044272ce0325a41a1341e28603f104. Revert "Unbreak build on legacy arches (i.e. CentOS), turns out we are not ready to use _Generic()," This reverts commit 2f554c80a659b34c3e3105f654792fee50115156. 2021-01-27 Maksym Sobolyev * [cab6edbf8] : Add strSC_strcmp() to compare const str * to const str_const * and use it to undo damage the reversal of the 5e04676e3a5 did. 2021-01-27 Maksym Sobolyev * [2f554c80a] : Unbreak build on legacy arches (i.e. CentOS), turns out we are not ready to use _Generic(), which is C11 feature. :( Reported by: @liviuchircu Revert "o Fix escape_common(), unescape_common(), unescape_xml() and compute_md5()" Revert "Extend str_strcmp(a, b) to take any combination of const str * and" This reverts commits f5ce9537cc and 5e04676e3a5. 2021-01-26 Maksym Sobolyev * [7c6d61828] : Convert flag_list_to_bitmask() to use const str_const *. 2021-01-26 Maksym Sobolyev * [5e04676e3] : Extend str_strcmp(a, b) to take any combination of const str * and const str_const *. 2021-01-26 Maksym Sobolyev * [f5ce9537c] : o Fix escape_common(), unescape_common(), unescape_xml() and compute_md5() to take "const char *src", not "char *src"; o Extend escape_user(), unescape_user(), escape_param() and unescape_param() to take either "const str *src" or "const str_const *src". This is to allow other code to use either. 2021-01-26 Bogdan-Andrei Iancu * [87f235a1e] : [proto_hep] Fix payload extraction for HEP2 If time is present, offset the "payload" buffer accordingly, as "start" and "length". Reported by JP Hindin 2021-01-26 Liviu Chircu * [2cb4e8fa7] : Fix build on CentOS 7 Completes commit 1d261f0a2. 2021-01-26 Maksym Sobolyev * [b1343990f] : Simplify str2const() some more and make sure that type of the str2const((const str *)x) is "const str_const *", not just "str_const *". This prevents "promoting" const str * into [non-const]str_const * when passing it via that macro. 2021-01-26 Maksym Sobolyev * [1d261f0a2] : o Reorder includes, put system ones first, opensips core next and local the last, not the other way around, this fixes some weird compilation errors after adding assert.h into str.h. o Add missing include time.h and define _XOPEN_SOURCE to get strptime(3) going on linux. Fixes: https://github.com/sippy/opensips/runs/1753076545?check_suite_focus=true#step:4:212 2021-01-25 Vlad Patrascu * [090088155] : clusterer: properly persist MI changed node state in DB 2021-01-25 Vlad Patrascu * [73e63eed9] : clusterer: allow disabling a specific node with clusterer_set_status 2021-01-25 Vlad Patrascu * [a8da45c87] : b2b_logic: add an optional outbound proxy parameter to client_new() Add a new optional parameter to the client_new() script function to allow choosing an outbound proxy to send the INVITE to. Closes #2374 2021-01-25 Vlad Patrascu * [9ff81fe32] : b2b_logic: check if script functions are used from the proper routes 2021-01-25 Maksym Sobolyev * [87b9286fb] : Use core_hash(x, NULL, y), not core_hash(x, 0, y). 2021-01-25 Maksym Sobolyev * [81523d0c6] : o Simplify str2const() using the fact that struct __str and struct __str_const have the same structure. Make sure that (void *)str2const(p) == (void *)p. o Check that argument of str2const() is either str * or const str *. 2021-01-25 Liviu Chircu * [8fcb97e4f] : cachedb_local: Improve "cache_collections" docs The "default" collection always gets created, even when not included in the list of collections. 2021-01-24 OpenSIPS * [57d313d05] : Rebuild documentation 2021-01-22 Maksym Sobolyev * [985f1e6b5] : Cleanup pvar.c code a bit: o mark bunch of functions not used anywhere else static; o make lots of str * arguments "const" (overflows to some modules). Two modules in particular abused API by writing into str *in directly: modules/sipcapture/sipcapture.c modules/acc/acc_vars.c o make some of pv_spec_p arguments "const"; o make _pv_names_table[] const. 2021-01-22 Maksym Sobolyev * [9cf484340] : Add immutable version of the struct str - str_const and associated helper macros (STR_NULL_const, str_const_init() and str2const()). 2021-01-20 Bogdan-Andrei Iancu * [0625fa0df] : [dbschema] remove bogus second primary key Issue introduced with 7d38cb85bc18e9831d7ef507383a9388d73578a6 Reported by @kuuse Closes #2379 2021-01-20 Liviu Chircu * [2a3a1050e] : fraud_detection: Optimize time-recurrences which always match Rather than always (re)evaluating a time rec which matches 100% of the time, just set it to NULL, so drouting quickly skips the check. 2021-01-19 Vlad Patrascu * [eb3341ae6] : b2b_logic: fix deadlock in b2b_bridge_request() Do not re-aquire the same lock when the entity storage callback is called for a delete event. Fixes #2373 2021-01-19 Maksym Sobolyev * [0bb57b49a] : Use str_init("abc") instead of {"abc", (sizeof("abc")-1)}. No functional changes (confirmed by md5sum pvar.o). 2021-01-19 Liviu Chircu * [6191f278a] : $json set: Correctly interpret the content of pv_value_t 2021-01-19 Razvan Crainea * [0043bb0e6] : dialog: store dialog in transaction in dlg_onroute When the transaction is created before matching the dialog, there is was no callback to store the dialog in the transaction - as a consequence, the acc cdr callbacks were not able to find the dialog, thus no longer generate dialogs. This commit fixes this bevavior. 2021-01-18 Vlad Patrascu * [5b551ba35] : uac_registrant: improve managing of registrants through MI Add MI functions to enable or disable a particular registrant. Also improve the reg_list and reg_reload MI functions in order to list/reload a specific registrant. 2021-01-18 Vlad Patrascu * [01fc1bd55] : uac_registrant DB schema: extend unique index with contact, registrar 2021-01-18 Vlad Pătrașcu * [47576e0de] : Merge pull request #2375 from sagarmalam/patch-1 Fix for : uac_registrant using same call id for two different registrants 2021-01-18 Vlad Patrascu * [2fe15bb20] : proto_tcp: fix possible crash when looking up connection Reported by Adrien Martin in #2369 2021-01-18 sagarmalam <47811226+sagarmalam at users.noreply.github dot com> * [41b9bc575] : Fix for : uac_registrant using same call id for two different registrants sharing same sip credentials uac registrant was using AOR to generate call ID each time due to which two registrants have same AOR will always have same Call ID. To fix this issue i have appended timestamp at the end of the AOR before passing it to MD5string array. 2021-01-17 OpenSIPS * [0f367e593] : Rebuild documentation 2021-01-16 Bogdan-Andrei Iancu * [606d278dd] : [b2b_logic_xml] Fix extracting URI from hdr When extracting a new URI from a SIP hdr, expect a NAME ADDR format, not a just a URI. The From/To/PAI/PPI/Refer hdrs do follow the NAME ADDR format Thanks to @nikbyte Alternative to #2371 2021-01-15 Bogdan-Andrei Iancu * [ca2b087a0] : [drouting] proper ending of fallbacks at last cycle (cherry picked from commit cdcfe4435c5d30446593bec5ce679c72333c6ecb) 2021-01-15 Maksym Sobolyev * [b9e71e89c] : Merge branch 'master' of github.com:OpenSIPS/opensips into fix_workflow_on 2021-01-15 Maksym Sobolyev * [84d6ccb27] : Only notify Slack about failures when github.repository == 'OpenSIPS/opensips'. 2021-01-15 Liviu Chircu * [bcdb417d5] : mid_registrar: Complete the 386f1cd fix (more edge-cases) The runtime-defined "outgoing_expires" would still not be honored when either: * the UAC uses a larger expiration than "outgoing_expires" itself * the UAC uses Contact ";expires=" instead of "Expires" hf Fixes #2350 (for good) 2021-01-15 Maksym Sobolyev * [7eb191d2d] : There is no god reasons to limit GitHub Actions to master branch only. Most of the work is done (hopefully) in custom branches, so we need to make sure contributors can see any breakage before PR is submitted. 2021-01-15 Liviu Chircu * [6c5953033] : mid_registrar: Fix "Expires" edge-case in AoR throttling mode This fixes a bug where the mid-registrar, in mode == 2, would not correctly process REGISTER requests containing both: * an ";expires=" Contact param * an "Expires" header field Specifically, the "Expires" header would incorrectly transit "as is", without being changed. Related to #2350 2021-01-15 Bogdan-Andrei Iancu * [34b16db25] : Revert "[auth] Proper auth username check" This reverts commit 2d02dc85a3fbf168bb8457d5e5b6827092fb8cc8. 2021-01-15 Razvan Crainea * [a3892587a] : github/workflows: use #devel channel on slack 2021-01-15 Razvan Crainea * [9a77ccc0a] : proto_tls: fix unsigned return handling in proto_tls_send 2021-01-15 Razvan Crainea * [296f3cb4a] : tls: update fd for async writing 2021-01-15 Razvan Crainea * [77f6ec8ba] : tls_mgm: add more information about the error 2021-01-15 Razvan Crainea * [507851760] : proto_tls: if chunk cannot be written, postpone it 2021-01-15 Razvan Crainea * [806221f8e] : tls: add async support for proto_tls 2021-01-15 Razvan Crainea * [7d12ba18b] : net: allow tcp connection creation without sending to main This is needed by proto WS and WSS 2021-01-15 Razvan Crainea * [46a3b428a] : net: merge async chunks in core Next steps towards #1511 2021-01-15 Razvan Crainea * [06d2bc6bf] : tcp: merge similar code in a common tcp file First steps towards #1511 2021-01-15 Razvan Crainea * [ba3e349db] : Completely migrate repo to travis-ci.com 2021-01-15 Vlad Patrascu * [aad28f39c] : mi: improve error message for generic server errors 2021-01-15 Vlad Patrascu * [e9627e9dc] : mi: further improve invalid params errors * handle an unexpected param as error when receiving named params and get rid of the "ambigous call" error for named params * return appropriate error for bad number of params even when receiving named params / no params at all * include a hint when returning "ambigous call" error for positional params 2021-01-14 Vlad Patrascu * [dc4199b15] : mi: include more details in invalid params errors 2021-01-14 Bogdan-Andrei Iancu * [7dc20e471] : Fix wrong memcpy() To get the memcpy working correctly, we should have: memcpy(&xlp, &lev, sizeof(xl_level_p)); NOTE: xl_level_p == xl_level_t * The above change was introduced in fff57ac955 But I prefer to try to use an extra cast (via 'void*') here (following the initial model), let's see if this holds on ARM 2021-01-14 Liviu Chircu * [b03cb41a3] : Export is_username_char() to core and reuse it Also remove the duplicate IS_ALPHANUM() module macro while at it. Work in progress for #2367 2021-01-14 Bogdan-Andrei Iancu * [2d02dc85a] : [auth] Proper auth username check As when populating the credentials from script the username var contains only a username part, check only against "user" part of the auth username extracted from the SIP request (as the auth username may contain a domain part also). Fixes #2356 2021-01-14 Liviu Chircu * [6cd76760e] : registrars: Do not save() AoR URIs with no 'username' Also add some protection on the receiving end of the cluster communication for such strings which could crash the server. Fixes #2232 2021-01-14 Liviu Chircu * [e4708c2aa] : Sample opensips.cfg: Avoid double-replying after save() 2021-01-14 Liviu Chircu * [46553a9aa] : registrars: Correctly reply on all save() edge-cases This patch fixes several corner-cases when calling [mid_registrar]_save(), where: * the registrar would not send a reply * the registrar would send a bad reply (e.g. 200 OK on an error!) 2021-01-13 Liviu Chircu * [386f1cd7c] : mid_registrar: Fix the runtime override of "outgoing_expires" Fixes #2350 2021-01-13 Liviu Chircu * [c8b28d417] : mid_registrar: Add extra startup/runtime checks; Re-org code 2021-01-13 Razvan Crainea * [588b1f55e] : uac_auth: fix gcc uninitialized warning 2021-01-13 Razvan Crainea * [a00353429] : python: remove deprecated PyEval_InitThreads call since python v3.7 2021-01-13 Razvan Crainea * [62a8b3c57] : httpd: adapt implementation to microhttpd v0.9.71 2021-01-13 Razvan Crainea * [46e4d8326] : nathelper: prevent memory overwritten during pinging 2021-01-13 Razvan Crainea * [7514a57a3] : lua: init uninitalized value 2021-01-13 Razvan Crainea * [a5da4b138] : ldap: fix copying value in smaller buffers 2021-01-13 Razvan Crainea * [dcb4571eb] : remove obsolete modules 2021-01-13 Razvan Crainea * [6106aac02] : cachedb_cassandra: prevent logging NULL at threashold expire 2021-01-12 Vlad Patrascu * [71bbd4caf] : clusterer: complete commit 0b7a94a 2021-01-12 Liviu Chircu * [46952b01f] : drouting: Document outdated "W" flag of do_routing() 2021-01-12 Liviu Chircu * [f03a95848] : cachedb_mongodb: Return DB_STRING strings, not DB_STR Several modules relying on SQL data do not fully handle the DB_STR data type, e.g. drouting. So when db_cachedb is used on top of cachedb_mongodb, these modules may report errors such as: ERROR:drouting:dr_load_routing_info: column gwid has a bad type [4], accepting only [3] Many thanks to Sasmita Panda for the report and helping with testing! 2021-01-12 Vlad Patrascu * [db652d89d] : clusterer: acquire RW lock for switchable reading only if needed 2021-01-12 Vlad Patrascu * [f4262155f] : clusterer: also check source IP for internal BIN packets 2021-01-12 Vlad Patrascu * [b78ed716b] : clusterer: add MI function to remove a node from the cluster 2021-01-12 Vlad Patrascu * [eeaf59e4b] : clusterer: restrict dynamic node joining in db mode 2021-01-12 Vlad Patrascu * [0b7a94a60] : clusterer: refactor topology related code into a new file 2021-01-12 Vlad Patrascu * [9ae8ca78a] : clusterer: refactor evi related code into a new file 2021-01-12 Bogdan-Andrei Iancu * [eee990d84] : [core] run post processing callbacks only on SIP traffic Credits go to @lemenkov Alternative to #2316 2021-01-12 Liviu Chircu * [107b6fa58] : usrloc: Fully document the module API 2021-01-12 Liviu Chircu * [8880b5f33] : Fix missing "\n" log line endings Credits to Nick Altmann for the hint! 2021-01-12 Liviu Chircu * [1104a21d5] : async(): Report an error when using timeouts incorrectly 2021-01-12 Razvan Crainea * [dcd46ffb7] : Add notification for GitHub Workflows 2021-01-11 Liviu Chircu * [8959b9f71] : rest_client: Add optional timeouts to all async functions Fixes #1838 2021-01-11 Bogdan-Andrei Iancu * [c8743de27] : [drouting] set sort_profile column to default NULL If Quality Routing module is not used (on top of Dynamic Routing), this column is not used, so we do not have to explicitly provision it. 2021-01-11 Liviu Chircu * [97c6bc78a] : tm: Fix t_on_branch() PKG memory leak Commit dddf9c253d introduced a regression because add_uac() is sensible to the addresses of the (str *) address provided. "Premature optimization is the root of all evil"... 2021-01-11 Liviu Chircu * [85379e5eb] : db_mysql: Properly disable auto-reconnect According to https://dev.mysql.com/doc/c-api/8.0/en/mysql-options.html, mysql_options() MUST NOT be called after mysql_real_connect(). 2021-01-11 Razvan Crainea * [9b0863e9c] : dialog: release cloned leg if failure 2021-01-10 OpenSIPS * [88a0f7d66] : Rebuild documentation 2021-01-08 Bogdan-Andrei Iancu * [7d38cb85b] : [cachedb_sql] fixed definition of the "cachedb" table In postgres, the tables must have an auto-increment Fix for #2310 (cherry picked from commit 3f3dc8a45d44eed76204c1ebc82e8ae6be03b335) 2021-01-08 Bogdan-Andrei Iancu * [0e9249da6] : [topology_hiding] fix printing formater 2021-01-08 Bogdan-Andrei Iancu * [78909c344] : [topology_hiding] fix vulnerability in TH decoding Extra checks were added to prevent buffer overflow/underflow when decoding the TH information (in non-dialog module) extracted from the Contact hdr. This information may be subject to malicious changes from an external attacker. Credits for reporting and for the fix go to @wdoekes. The suggested fix was re-worked a bit, but the idea is the same. Fixes #2338 2021-01-08 Razvan Crainea * [647bb69d2] : db_sqlite: fix memory overwrite error when reallocing rows 2021-01-07 Vlad Patrascu * [342e6c5da] : bin_interface: fix crashes due to bad capability length 2021-01-07 Bogdan-Andrei Iancu * [45b29f93b] : [topology_hiding] consider NOTIFY as an in-dialog method When handing in-dialog requests, consider the NOTIFY requests as candidates for TH. Credits go to @nikbyte Fixes #1991 2021-01-07 Liviu Chircu * [2e17eb063] : Improve doc & code quality; Fix typos & inaccuracies 2021-01-07 Razvan Crainea * [d329e00f6] : freeswitch: esl: use OpenSIPS's cJSON implementation if available 2021-01-07 Razvan Crainea * [396a0fa92] : Fix lgtm errors and warnings 2021-01-06 Razvan Crainea * [b1ce111bc] : dialog: load from DB call looping dialogs When loading a dialog from DB that has the same coordinates (same callid+to-tag+from-tag pair) with a different dialog in memory, we should not ignore it if it comes with a different `hash_id`, as it might be a completely different dialog, resulted from a call looping scenario (call that passes through the same OpenSIPS instance twice), which legitimately creates a new dialog with a new `hash_id`. Thanks go to @perwx3 (GitHub) for reporting it in ticket #2311. Complements commit b26d59e3. Fix #2311. 2021-01-06 Razvan Crainea * [3081483af] : sql_cacher: prevent memory leak for keys not present 2021-01-05 Liviu Chircu * [cbc0922bd] : sipmsg_validate(): Allow escape sequences in SIP URI usernames This regression was introduced in 269ad7a3f0, where the R-URI, From and To header usernames were no longer accepting escape sequences, e.g. "%23". Many thanks to Nexphone for sponsoring this fix 2021-01-05 Liviu Chircu * [c82d074d3] : sipmsg_validate(): Allow "(" and ")" in SIP URI usernames According to RFC 3261: mark = "-" / "_" / "." / "!" / "~" / "*" / "'" / "(" / ")" ... so both parantheses are legal within URI usernames. 2021-01-05 Liviu Chircu * [59918856b] : ut.h: Add some helpful comments 2021-01-05 Liviu Chircu * [3ea93397c] : Fix compilation warnings 2021-01-05 Liviu Chircu * [6ebbd9a2d] : dialog: Fix crash due to a "tmp SDP" race condition This fixes a race condition on the following code which runs, e.g., on a 200 OK to a Re-INVITE (added in d447626c2531): if (dlg->legs[leg].tmp_out_sdp.s) { shm_free(dlg->legs[leg].tmp_out_sdp.s); dlg->legs[leg].tmp_out_sdp.s = 0; <--- we are here dlg->legs[leg].tmp_out_sdp.len = 0; } At this point, if the Re-INVITE is retransmitted and, e.g., dlg_callee_reinv_onreq_out() is run, the code may read a corrupt str value from "tmp_out_sdp" (e.g. {NULL, 172}), which will crash in shm_str_sync(). Many thanks to Ken Rice for the report! 2021-01-05 Bogdan Andrei IANCU * [0ad1df3cc] : Merge pull request #2358 from ccppprogrammer/patch-1 dialog: move "No matched dialogs" msg from LM_ERR to LM_DBG 2021-01-04 Bogdan Andrei IANCU * [5b3052f5f] : Merge pull request #2319 from lemenkov/tm_respect_async_close_fd tm/async: Handle ASYNC_DONE_CLOSE_FD when switching to sync 2021-01-04 Razvan Crainea * [a8cd0ed61] : export _ISOC11_SOURCE to see static_assert macro 2020-12-31 sergei lavrov <7936874+ccppprogrammer at users.noreply.github dot com> * [7c38d6281] : dialog: move "No matched dialogs" msg from LM_ERR to LM_DBG Get rid of spam messages "No matched dialogs" in LM_ERR. We only need these messages in LM_DBG. 2020-12-28 Nick Altmann * [f16897c90] : RPM spec: fix source path 2020-12-27 Maksym Sobolyev * [b1e6f2a4a] : Merge pull request #2324 from sippy/pr_github_actions Move main CI action to GitHub Actions, put TraviCI to a backburner. 2020-12-27 Maksym Sobolyev * [2b25cddbd] : Merge branch 'master' into pr_github_actions 2020-12-27 OpenSIPS * [b7368f4c0] : Rebuild documentation 2020-12-22 Razvan Crainea * [9621cac20] : ratelimit: keep only local values in pipe->counter for SBT Up until this commit, the SBT algorithm would keep in pipe->counter the sum between its local value, as well as the values gathered from the other servers in the cluster. This means that it would replicate the other's counters as well, leading to a broken behavior. This fix makes sure that the SBT algorithm only stores the local counter in the pipe->counter field, therefore it will not replicate other's counters. 2020-12-20 OpenSIPS * [a611127f1] : Rebuild documentation 2020-12-18 Razvan Crainea * [0b94a2c7e] : rtpengine: provide code to rtpengine_play_dtmf command Thanks go to Slava Bendersky for reporting it. Close #2349 2020-12-18 Razvan Crainea * [5835780b3] : Migrate repo to travis-ci.com 2020-12-18 Razvan Crainea * [ef9ab051c] : cachedb: document return values of get_counter() 2020-12-18 Razvan Crainea * [dd1446bb0] : cachedb_mongodb: treat case when counter is missing 2020-12-17 Vlad Patrascu * [12ae86900] : dialog: fix a memory leak when using topology hiding Credits to Anton Mosin for troubleshooting this. Fixes #2346. (cherry picked from commit fd0e4b7e4ae4853a27b6dcbf4a8b825aeae16b79) 2020-12-17 Vlad Patrascu * [82c4f9466] : sip_i: fix setting of Subsequent number parameter 2020-12-17 Vlad Patrascu * [454f7db04] : sip_i: fix setting of Generic number parameter 2020-12-17 Vlad Pătrașcu * [2835fe065] : Merge pull request #2133 from SIfoxDevTeam/sip_i_generic_number Add support for Generic Number parameter into sip_i 2020-12-17 Vlad Pătrașcu * [6766a47e3] : Merge pull request #2345 from l2dy/b2b_logic b2b_logic: fix use of uninitialized pointer 2020-12-17 Maksym Sobolyev * [58b0190a1] : Merge remote-tracking branch 'upstream/master' into pr_github_actions 2020-12-16 Razvan Crainea * [b8dee70e1] : tm: initiate cancel_bm in t_inject_branch Make sure we're not canceling unwanted branches if there is some garbage in the cancel_bm mask Thanks go to Bogdan Iancu for debugging and fixing 2020-12-16 Bogdan-Andrei Iancu * [539958944] : [proto_tcp] Fix cleaning an un-init'ed conn When handling a TCP accept event, if there is an error on dispatching the conn to the TCP workers, the conn is cleaned and destroied, without ever actually being initialised So, we need to be sure we can clean conns which were not init'ed. (cherry picked from commit 46d0b75243372375162ab64ca66aff42cdd7b547) 2020-12-16 Razvan Crainea * [07eedd064] : signaling: fix sig_local_totag pvar name length 2020-12-16 Maksym Sobolyev * [b528652e6] : Merge pull request #2341 from l2dy/residential opensips_residential.m4: Limit rtpproxy function calls to messages with an SDP body 2020-12-16 Maksym Sobolyev * [6f62e23fa] : Merge pull request #2300 from sippy/pr_split_main Split out gigantic main.c into 3 more TUs: globals.c, shutdown.c and signals.c. This is to allow unit tests to be build and executed outside of the main OpenSIPS executable. 2020-12-16 Zero King * [4ff9437b4] : b2b_logic: fix use of uninitialized pointer 2020-12-15 Vlad Patrascu * [600cd1c3d] : sql_cacher: properly support integer caching keys Add a new parameter "key_type" to the caching entries configuration that specifies an integer or string data type for the caching key. Fixes #2335 2020-12-14 Vlad Patrascu * [176e28ebc] : rabbitmq: complete fix in commit f7877f9 2020-12-14 Vlad Patrascu * [f7877f9cc] : rabbitmq: fix build for librabbitmq versions < 0.9 Address the openssl multiprocess issues with librabbitmq versions that don't provide access to the lib's SSL_CTX, by serializing the CA, certificate and key loading. 2020-12-13 Zero King * [0a7d74123] : opensips_residential.m4: Limit rtpproxy function calls to messages with an SDP body Fix for "ERROR:rtpproxy:force_rtp_proxy: Unable to parse body". 2020-12-13 OpenSIPS * [e56751a67] : Rebuild documentation 2020-12-12 Maksym Sobolyev * [370d74b10] : When ECONNRESET has been received calling connect() try one more time. This has observed to be happening on some of our voiptests runs and we've got this patch since 2017: https://github.com/sippy/voiptests/commits/master/install_depends/opensips/mod.rtpproxy_retry.diff 2020-12-12 Maksym Sobolyev * [6073cdd05] : Fix "off-by-one" error sizing vstat. 2020-12-11 Vlad Patrascu * [472ae546c] : rabbitmq modules: add TLS support Closes #2306 2020-12-11 Vlad Patrascu * [113ecf499] : tls_mgm: add API functions for operations with a SSL_CTX Add API functions to set the CAs, certificate and private key for a given SSL_CTX (with a different SSL_CTX, or a file in case of private keys, as a source). These functions can be used from modules which require some TLS operations but without having to link with openssl directly. 2020-12-11 Vlad Patrascu * [c9a4681a0] : tls_mgm: improve error reporting when loading info Print openssl's error stack when failing to load ceritificates, private keys, CAs and CRLs. 2020-12-10 Liviu Chircu * [b7bcfd310] : HEP logging: Fix a bug causing all xlog()'s to be L_ERROR Many thanks to Artiom Druz (@Shkiperon) for reporting this issue and helping with testing. Fixes #2329 Closes #2331 2020-12-10 Liviu Chircu * [2442f67f2] : Merge pull request #2339 from sippy/pr_stdatomic_strikes_back Re-introduce using stdatomics for the purposes of core stats. 2020-12-10 Maksym Sobolyev * [c9d924274] : Put back stdatomic to be used by default if compiler supports it. Keep old, non-portable atomic.h and use that as poor-man's stdatomic when it's not available. Add some wrappers to make API more like stdatomics. Auto-detect if stdatomic.h is available. 2020-12-09 Maksym Sobolyev * [a91ab9c70] : Revert "Revert "Use stdatomic.h, which is part of C standard since C11."" This reverts commit dd417cb7e84ccb704d73eaa4450f7e8795dea8bb. 2020-12-09 Maksym Sobolyev * [745fe0c0d] : Revert "Revert "Fix last reference to atomic_set() (replace with atomic_init)."" This reverts commit 670b203f2d7b4ebd6533062537167129609d08e3. 2020-12-09 Vlad Patrascu * [80eecb92f] : dialog docs: fix examples for dlg_list MI function 2020-12-09 Liviu Chircu * [cff06b07f] : atomic.h: Add a deprecation notice 2020-12-09 Liviu Chircu * [dd417cb7e] : Revert "Use stdatomic.h, which is part of C standard since C11." This reverts commit 18f4c3d9b34583c7464eba2e5ca8fe24f72e9fc9. 2020-12-09 Liviu Chircu * [670b203f2] : Revert "Fix last reference to atomic_set() (replace with atomic_init)." This reverts commit 4ed5ba188a969ab02829bbbb33bd5c87ac457b19. 2020-12-09 Liviu Chircu * [e229e18e6] : Revert "packaging: We no longer have atomic.h" This reverts commit 9dacffd696efcefe93e020adec0f25bb91aaeab7. 2020-12-09 Liviu Chircu * [b95c2ed5a] : xlog(): Remove unused function parameter 2020-12-09 Liviu Chircu * [2eda596a2] : Merge pull request #2327 from ar45/patch-2 Fixed double release of read_lock in dr_match 2020-12-09 Liviu Chircu * [50a794c18] : usrloc: Fix `matching_mode` regression in 3aae7e652d2d Commit 3aae7e652d did too many things at once, including the refactoring of CT_MATCH_NONE from -1 to 0 (along with all other enum members!), causing a mismatch of this module parameter with its documentation, and leading to failed startup checks under ul_init_globals(). Credits to @98oi98 for the report! Fixes #2337 (cherry picked from commit dc8cfe85abd7f38e476a02a47862a034c2a272ce) 2020-12-06 OpenSIPS * [f623b9e51] : Rebuild documentation 2020-12-04 Bogdan-Andrei Iancu * [28c95c134] : [presence_dfks] Migrated to the global DUMMY SIP msg support 2020-12-04 Bogdan-Andrei Iancu * [7d4db24c4] : [dialog] Migrated to the global DUMMY SIP msg support 2020-12-04 Bogdan-Andrei Iancu * [81618cf75] : [sipcapture] Migrated to the global DUMMY SIP msg support 2020-12-04 Bogdan-Andrei Iancu * [be1527355] : [event_routing] Migrated to the global DUMMY SIP msg support 2020-12-04 Bogdan-Andrei Iancu * [63107bddb] : [event_route] Migrated to the global DUMMY SIP msg support 2020-12-04 Bogdan-Andrei Iancu * [84d1bad2c] : Add proper support for dummy sip msg's The dummy sip messages are used when there is the need of running a script route, but without actually having a real SIP msg, like for event_routes, startup routes, timer routes, etc. This new support is solving two problems: * the dummy message is actually a proper/complete SIP message, with all the mandatory sip headers. This prevents crashing when "reading" something (that is expected to be there, like the callid) from this SIP message. * this is a global support, meant to be used from all the places, replacing the local implementation (from like 4 different modules/places) 2020-12-03 Vlad Patrascu * [5f965a68b] : sql_cacher: remove unused variable 2020-12-03 Nick Altmann * [fb5178da4] : Packaging: b2b_logic_xml module 2020-12-03 Bogdan-Andrei Iancu * [6f6906636] : Fixed copy paste error in module name (cherry picked from commit 0888db78a543292e9281eca437a43233497e147e) 2020-12-02 Razvan Crainea * [5e5fc98ad] : b2b_entities: parse from & to structs if they aren't This fix aims to solve a crash in case the from/to headers are not parsed (yet). We are parsing them in a different structure, to make sure it doesn't overlap with any ongoing processing of the request 2020-11-29 Aron Podrigal * [878621769] : Fixed double release of read_lock in dr_match 2020-11-29 Maksym Sobolyev * [fff57ac95] : Fix a lot of "cast increases required alignment of target data type" which is particularly bad in ARM32 (aka armhf). Straighten the code where possible, drop in (void *) to break alignment "chain" in other cases. This hopefully will make ARM32 build for core warning-free. 2020-11-29 Maksym Sobolyev * [22f8efa94] : Refactor evi_dup_shm_params() to not break platform alignment requirements by interleaving fixed-length structures with variable-lenth string buffers that those structures are referring to. This sort of works on X86, however the performance is likely to be so-so, but it would blow up on ARM and other arches with strong alignment requirements. 2020-11-29 Maksym Sobolyev * [6a072927a] : Refactor lock_set_alloc() to not trigger unaligned access warning on arm32: net/../lock_alloc.h: In function lock_set_alloc net/../lock_alloc.h:70:13: warning: cast increases required alignment of target type [-Wcast-align] This also produces cleaner code and it might be also bit faster too. 2020-11-29 Maksym Sobolyev * [3fad84723] : Recognize ARM64 (aka aarch64) in the cross-compile mode. 2020-11-29 Maksym Sobolyev * [a4b23f350] : o Add GitHub Actions CI workflow to supplement / replace TravisCI which is now in "money scavenging mode". Turns out, Actions are actually much better, flexible and faster platform. Unify core of CI jobs configuration, so we are not repeating the same code. o Add ARM32 build and bunch of Ubuntu-20 builds on Actions now that we can. o Add missing libmaxminddb-dev package to be installed. 2020-11-29 OpenSIPS * [99a5e77d2] : Rebuild documentation 2020-11-27 Vlad Patrascu * [2ad1e1590] : sql_cacher: abort startup if DB connections/queries tests fail 2020-11-27 Vlad Patrascu * [2f3ee99c6] : Fix crash when calling script functions with omitted optional params The crash would happen if the script function is exported with the CMD_PARAM_FIX_NULL flag and does not actually change the parameter value. Currently, only forward() uses the flag in this manner and is the only function affected by this crash. (cherry picked from commit 278c1646451ab75196e0440c15047d25a7b4b2f4) 2020-11-26 Vlad Patrascu * [b82b85b6a] : cachedb_redis: add TLS support Closes #2264 2020-11-26 Vlad Patrascu * [4d672aeb8] : cachedb: allow empty database name in URLs 2020-11-26 Vlad Patrascu * [4db941316] : Fix detection of forward() usage when called without parameter This would cause stateless replies to no be forwared even though the forward function was used. (cherry picked from commit 8aab9f2218a083dc43bc7a7e282e26e63d3beee3) 2020-11-25 Răzvan Crainea * [75cfd7e0a] : Merge pull request #2309 from sippy/pr_rtpproxy_tcp46 Add TCP and TCPv6 communication modes for RTPProxy control sockets. 2020-11-25 Bogdan-Andrei Iancu * [cff27be9c] : [tm] Added ways to control the branches to be waited In order to cotrol for how many branches you want to wait to be injected, we have now: * you can pass to t_wait_for_new_branches(), as optional param, the max no of branches to wait * in t_inject_branch() you can pass the "l" flag to instruct that this is the last injected branch, not more further waiting Closes #1811 2020-11-25 Liviu Chircu * [971431a41] : cfgutils: Add support for dynamic shared vars ($shv) OpenSIPS script developers now have the ability to use dynamic names for the $shv variables (e.g. "$shv($avp(customer_id))"), rather than be constrained to work with the statically-named $shv variables defined throughout the script. Moreover, shared variables may now be dynamically created and read via the well-known MI commands: "shv_set" and "shv_get". Closes #2140 2020-11-25 Liviu Chircu * [0ed7a0ace] : Add the `$route` variable (current route call stack) The new $route variable offers access to the current route call stack. Assuming a call stack of "route > route[FOO] > route[BAR]", we have: Positive indexing: * $route == $(route[0]) == "route[BAR]" * $(route[1]) == "route[FOO]" * $(route[2]) == "route" * $(route[3]) == "" Negative indexing: * $(route[-1]) == "route" * $(route[-2]) == "route[FOO]" * $(route[-3]) == "route[BAR]" * $(route[-4]) == "" Full printing: * $(route[*]) == "route > route[FOO] > route[BAR]" Closes #1963 2020-11-25 Liviu Chircu * [7790bf929] : Merge pull request #2301 from sippy/pr_fastlock_merge Fix MIPS64, add MIPS64 cross-build for travis, merge updates into fastlocks.h 2020-11-24 Vlad Patrascu * [85a484eab] : tm: simplify the fix in commit 82b8d20 Just unref the transactions and avoid the extra checks done by do_t_cleanup(). (cherry picked from commit e8a7cadd7e265f71d13c11682043814dbdd8caf6) 2020-11-24 Liviu Chircu * [5f8361179] : Missing route on startup: Lower severity from ALERT to ERROR 2020-11-23 Razvan Crainea * [e02a5563f] : add support for generic hash table 2020-11-23 Peter Lemenkov * [65bdd61ca] : tm/async: Handle ASYNC_DONE_CLOSE_FD when switching to sync One more place where we have to close file descriptor according to the specification while doing async packet processing. 2020-11-22 OpenSIPS * [711bbd72d] : Rebuild documentation 2020-11-20 Vlad Patrascu * [d48008a5b] : tm: fix transaction leakage when receiving replicated CANCELs (cherry picked from commit 82b8d20f20914654938630e59edd0ca29e4e9e36) 2020-11-20 Vlad Patrascu * [7112cf4eb] : tm: fix crash when receiving replicated CANCELs This commit fixes a crash on replicated CANCELs when doing pre-RFC3261 transaction matching. (cherry picked from commit 15d1d612077b0311aed179972afa199f38e74e00) 2020-11-20 Vlad Patrascu * [1ca7ca8c0] : db_mysql: fix doc example for use_tls modparam 2020-11-20 Vlad Patrascu * [29db5674f] : cachedb_local: fix outdated docs for cache_remove_chunk MI cmd 2020-11-19 Maksym Sobolyev * [323896a65] : Add MIPS64 cross-build. 2020-11-19 Maksym Sobolyev * [6924b5b5d] : Reduce diff to a83e261254. Merge few more ARM/Sparc fixes from the d3da8467113. 2020-11-19 Andrei Pelinescu-Onciul * [30329f67b] : - moved sched_yield() wrapper into sched_yield.h at Miklos's request. 2020-11-19 Maksym Sobolyev * [d986daa83] : Small arm optimization from the d3da8467113. 2020-11-19 Andrei Pelinescu-Onciul * [6871464c4] : - ppc fixes (s/stw/stwx/, s/lwz/lwzx) - missing early clobbers added for x86, sparc*, armv6, ppc*, alpha 2020-11-19 Andrei Pelinescu-Onciul * [7ad38e5cb] : - x86/x86_64 lock optimizations: spinning on a lock should be friendlier now for the other cpus caches (at the extra cost of a cmp mem + jump) ; tried to arrange a little better the instructions to allow for some parallel execution. - x86 unlocks with xchg by default (since some x86s reorder stores, so a simple mov is unsafe) 2020-11-19 Andrei Pelinescu-Onciul * [722fd2bd6] : - fastlock: minor fixes 2020-11-19 Andrei Pelinescu-Onciul * [c84bee61a] : - support for mips cpu which don't implement full mips isa2, but do support ll and sc 2020-11-19 Andrei Pelinescu-Onciul * [498dd2af8] : - mips inline asm gcc 3.x warnings fixed - mips2 NOSMP mode (skip sync) - minor x86 & mips optimizations 2020-11-19 Vlad Patrascu * [8b8ac4f89] : tm: support interface tags for local socket when replicating (cherry picked from commit 1dbea20409ac1063f62db04873ac5dad193e0638) 2020-11-19 Vlad Patrascu * [b9f013ff2] : tm: fix crash when having an anycast listener and no replication (cherry picked from commit c57d62be4101dfc41d1031ff4e583c8efa50155e) 2020-11-18 Maksym Sobolyev * [0d7a71b2f] : Add TCP and TCPv6 communication modes for control sockets. Those modes are supported on RTPProxy end since 2.0 and are getting popular recently due to Kubrenetes and Docker's networking shenanigans and peculiarities. As discussed with @razvancrainea in the scope of the PR#2309, shuffling elements of the iovec command structure might have some unintended consequences with regards to the multiple nodes / failover. As such, it ended up in rabbit hole of refactoring messaging mechanism to automatically extend user-supplied buffer with some pre/post elements. Provide sub-set of allocated vectors and expose it as "vu" member. Only send_rtpp_command() is allowed to access "vs" part. Code conversion is helped by some script and basic functionality tested here: https://travis-ci.com/github/sippy/voiptests/builds/202257620 2020-11-18 Maksym Sobolyev * [0f8bfb953] : Add file to define optional assertions. 2020-11-18 Vlad Patrascu * [d446796d2] : b2b_logic: rework the method of controlling the B2B logic This commit removes the XML scenario files in favor of native OpenSIPS scripting in order to control the B2B logic. The B2B scenarios will now be implemented mostly in dedicated b2b_logic routes, using specific script functions for actions in a B2B context. 2020-11-17 Vlad Patrascu * [7648b78d1] : Duplicate b2b_logic code to a deprecated b2b_logic_xml module 2020-11-17 Vlad Patrascu * [99479fa95] : dialog: fix dlg_list[_ctx] MI output when passing identifier params Reported by Mark on the mailing list. 2020-11-16 Ovidiu Sas * [c2cb01734] : dialog: fix -Wmaybe-uninitialized compiler warning 2020-11-15 OpenSIPS * [3b6862068] : Rebuild documentation 2020-11-13 Vlad Patrascu * [0d20cd55d] : pua_mi: fix parameter name in pua_subscribe MI command Also improve the docs for pua_subscribe by adding an usage example and proper indexing. 2020-11-13 Vlad Patrascu * [582170270] : tls: fix certificate matching when reusing connections The SSL_CTX pointers may not be equal for the same SSL pointer (connection) after the rework that changed the storage of the context to be per-process. The tls_domain saved in the SSL extra storage will now be used for matching the certificates instead. 2020-11-13 Liviu Chircu * [11750c2b9] : Merge pull request #2308 from sippy/pr_fix_atomic_set Fix last reference to atomic_set() (replace with atomic_init). 2020-11-13 Liviu Chircu * [f82d09ad5] : Merge pull request #2307 from lemenkov/no_longer_have_atomic_h packaging: We no longer have atomic.h 2020-11-13 Maksym Sobolyev * [4ed5ba188] : Fix last reference to atomic_set() (replace with atomic_init). This one got missed from the PR#2289. 2020-11-12 Peter Lemenkov * [9dacffd69] : packaging: We no longer have atomic.h This file was replaced by stdatomic.h in commit 18f4c3d9b34583c7464eba2e5ca8fe24f72e9fc9. 2020-11-12 Bogdan-Andrei Iancu * [cfcac3db3] : [tm] fix mem leak when passing a proxy to t_relay() The actual proxy structure needs to be also freed. Reported by @Sigmast-Michael Closes #2304 (cherry picked from commit 1cd5d2be2696d72192d07efa388ad1f255c92762) 2020-11-12 Bogdan-Andrei Iancu * [55c8669c0] : [event_route] fix reseting the dummy sip msg after each usage (cherry picked from commit ef5073d9da5da6880bbb5ed033642eed6a36bf7d) 2020-11-11 Liviu Chircu * [3a25c0b28] : tm: Fix transaction leakage with global onreply_route Given that the opensips.cfg execution order for replies is: 1) onreply_route (global) 2) reply_received(), i.e. "tm" module scope 2.1) onreply_route (branch) 2.2) onreply_route (transaction) ... this patch fixes some transaction leaks where if the script developer matches the current transaction within global onreply_route, e.g. with a random statement such as xlog("$T_reply_code\n"), it would cause an extra ref after a transaction matching operation would be performed yet again (??) within reply_received(), as the "tm" scope begins executing. The fix is to simply avoid transaction lookups when evaluating tm variables within the non-transactional, global SIP reply route. Credits to Bogdan-Andrei Iancu for suggesting this solution 2020-11-10 Liviu Chircu * [fccb5bfdf] : mid_registrar_save(): Fix shm memleak with no t_relay() Since mid_registrar_save() is stateful by definition, it needs the SIP transaction to properly function, so always forcing its creation if the REGISTER is about to be forwarded is not that significant of a change, if any at all. Thus, this patch fixes a SHM memleak on the following type of logic: mid_registrar_save(); # script terminates without having created the transaction, # so mid_registrar's "prepped" data does not get freed on T deletion exit; (cherry picked from commit b14a7eaff60b719c8b80af4f8bfdffe2bc7e995b) 2020-11-09 Vlad Patrascu * [dd237c001] : b2b_entities: fix restoring of DB persisted server entities Server entities restored from DB would not use the original To tag due to regenerating the timestamp part of the entity key. 2020-11-09 Vlad Patrascu * [af19d5073] : b2b_entities: fix DB serialization of the entity storage The entity storage written to DB was always either a NULL value or bogus data. 2020-11-09 Liviu Chircu * [1a231008a] : dialplan: Fix MI 'dp_translate' with 3 parameters 'partition' should be last, not first. (cherry picked from commit ac01ed5e02c5a1d96e2021df9cc5feb223041dc7) 2020-11-08 OpenSIPS * [05fc15e6e] : Rebuild documentation 2020-11-06 Liviu Chircu * [d9fba7776] : dialog docs: Fix missing quote (") in example 2020-11-06 Liviu Chircu * [0b7d4d1fa] : usrloc: Add the "req_callid" field to contact refresh events Providing the Call-ID of the pending SIP request during the Push Notification event_route execution gives the ability to load the dialog context of the pending INVITE. From here onwards, data can be freely passed between the two execution contexts and included in the Push Notification body (e.g.: caller ID, callee number, dialog Call-ID, etc.) Credits to Răzvan Crainea for suggesting this concept 2020-11-06 Liviu Chircu * [0d88fa909] : usrloc: Re-structure contact events; Remove useless globals 2020-11-06 Liviu Chircu * [e78f0d05e] : SIP PN Support: Change harmless log to DEBUG Empty (non-set) EVI parameters are possible and should be ignored. 2020-11-06 Liviu Chircu * [9943f5965] : EVI: Small optimization 2020-11-06 Maksym Sobolyev * [ad9db9067] : Split out signal handling routines and shutdown-related routines out of giantic main.c TU to make it more manageable. 2020-11-06 Maksym Sobolyev * [fac187f72] : Convert global str parameters into str * const. This allows globals.h to be used without str.h. 2020-11-06 Maksym Sobolyev * [d68757ed5] : Split out globals from main into a separate file. No functional changes at this point. 2020-11-05 Liviu Chircu * [1f3e56fbf] : default opensips.cfg: Explicitly set the "xlog_level" It is easy to forget about or be completely unaware of this recently introduced setting (spring 2019), then start troubleshooting why some of your xlog() statements are not working. 2020-11-05 Razvan Crainea * [699832c98] : dialog: enhance errors when dlg cannot be inserted in db 2020-11-05 Razvan Crainea * [6330ba656] : dialog: lower info when dialog not found in profile When calling unset_dlg_profile() for a dialog that is not in that profile, or there's no matching value, warn (instead of error) and add the name of the affected profile. 2020-11-05 Razvan Crainea * [52e6c425b] : dialog: update contact & SDPs for replicated updates 2020-11-05 Liviu Chircu * [e21e31ce7] : dialplan: Fix broken MI 'dp_show_partition' cmd and output 2020-11-05 Liviu Chircu * [a67b74d4e] : dialplan: Fix startup with a single, non-default partition 2020-11-04 Liviu Chircu * [5b868337e] : acc: Fix prepared statements for the missed/acc tables Commit 4bc134fe3b introduced a regression where the reused PS for the "missed_calls" table (9 fields) would no longer match the PS for the "acc" table (11 fields). By reusing the former PS array, which is shorter than required, the code would segfault. Example scenario: * simple call from A -> B with: * do_accounting("db", "missed|failed") * call failure (e.g. 408 Request Timeout) * code crashes as soon as the "failed" acc entry is written Many thanks to Nexphone for sponsoring this fix 2020-11-03 Liviu Chircu * [79a55786e] : registrars: Re-link the .so file after a lib/reg change Before this commit, the registrars were not getting rebuilt after making changes in the lib/reg source code. 2020-11-03 Liviu Chircu * [55eae8f4d] : SIP PN support: Add detection for pn-* params with no value This is a client-side error condition and the server must reply with "400 Bad Request". 2020-11-02 Liviu Chircu * [7ad6af074] : usrloc: Improve E_UL_CONTACT_REFRESH docs This event will not be raised for non-RFC 8599 contacts. 2020-11-02 Liviu Chircu * [4207074de] : RFC 5445 (time rec): Fix BYDAY + YEARLY frequency 2020-11-01 OpenSIPS * [e1381357c] : Rebuild documentation 2020-10-31 Liviu Chircu * [4942bfca4] : RFC 5445 time rec: Fix several "byxxx" bugs * fix incorrect quick-exit returning always "true" even though there are "byxxx" rules within the recurrence which restrict the matching * BYMONTH, BYWEEKNO, BYYEARDAY: - accept 1-indexed input instead of 0-indexed (per RFC 5445) * BYDAY: - fix off-by-one bugs and inaccurate logic 2020-10-30 Liviu Chircu * [e64006eec] : time_rec.c: Remove superflous checks 2020-10-30 Liviu Chircu * [6f4165f18] : 'max_while_loops': Bump to 10000; Improve error log 2020-10-29 Razvan Crainea * [2ea8f8681] : topo_hiding: always allocate space for DID in user When contact could not be parsed, the new Contact's prefix was not allocating bytes in buffer for storing for the dialog ID in the user part. However, the DID was appended to the prefix without any error checks, resulting in a memory corruption. This commit always allocates spaces for storing the Dialog ID, even if the contact could not be parsed. This fixes all uses of the topology_hiding() function with the `D` flag. Thanks a lot Sergei Lavrov (@ccppprogrammer) for reporting this in ticket #2285 and for offering information for figure it out. Close #2285 2020-10-28 Razvan Crainea * [f4ef3cc45] : proto_smpp: escape from and to users Reported by Johan De Clercq (@johandeclercqdemocon) in #2085 2020-10-28 Razvan Crainea * [87e17276a] : event_rabbitmq: cleanup connection after creating the socket Reported by @ycxwoo in ticket #2230 2020-10-28 Razvan Crainea * [32f739b0d] : tls_mgm: log error when SSL_new() fails 2020-10-26 Liviu Chircu * [b0b825b09] : registrar: Fix possible crash with save("o") flag Similar problem as in b3bdf7ce29d 2020-10-25 Liviu Chircu * [dacfef760] : dispatcher: Fix doc build 2020-10-23 Razvan Crainea * [aba6edf24] : tracer: ignore trace_on flag for dynamic entries Thanks go to Alexey Vasilyev (@vasilevalex) for reporting this. Fixes #2240 2020-10-22 Liviu Chircu * [33d4743e5] : check_time_rec(): Also set the tz during matching, not just parsing 2020-10-21 Liviu Chircu * [0e430d803] : Merge pull request #2289 from sippy/pr_travis_bionic Expand Travis setup, add 10 more build variants. Fix many issues. 2020-10-21 Liviu Chircu * [cdcac5bb3] : Merge pull request #2286 from sippy/pr_misclibs Add ability to build various static supporting libraries to contain code that is shared between several modules. 2020-10-21 rance * [dff186948] : Fix Memory leak in Freeswitch ESL module. (cherry picked from commit 294e8c489c22fce345450e0441dfbc5a79205d94) 2020-10-17 Maksym Sobolyev * [74bf0bcdf] : If CC_NAME is set to gcc, CC could be anything, like gcc-X. 2020-10-17 Maksym Sobolyev * [ba4282354] : Make definitions of the ST_CHECK_PATTERN, END_CHECK_PATTERN1 and END_CHECK_PATTERN2 independent of sizeof(long). 2020-10-17 Maksym Sobolyev * [bd7aca676] : Treat both clang and gcc the same for the purpose of figuring out CC_ARCH. Also use -m32 when linking on i386 with clang. 2020-10-17 Maksym Sobolyev * [27634ffef] : Use int, not char, which could be either signed or unsigned. 2020-10-17 Maksym Sobolyev * [08617f262] : Avoid warning on ARM64 when compiled with Clang 7: rest_methods.c:575:21: error: result of comparison of constant -3 with expression of type 'char' is always true [-Werror,-Wtautological-constant-out-of-range-compare] 2020-10-17 Maksym Sobolyev * [7330ce09f] : Fix warning compiling with Clang 7 on ARM64: prefix_tree.c:158:8: error: result of comparison of constant -1 with expression of type 'char' is always true [-Werror,-Wtautological-constant-out-of-range-compare] 2020-10-17 Maksym Sobolyev * [2f18d8a76] : Fix logic error picked up by Cang 10: b2b_logic.c:1789:14: error: overlapping comparisons always evaluate to false [-Werror,-Wtautological-overlap-compare] 2020-10-17 Maksym Sobolyev * [42f6c3601] : Fix another instance of the implicit conversion from 'int' to 'float' Clang 10 warning. 2020-10-17 Maksym Sobolyev * [541d832c6] : Fix Clang 9 warning: http_fnc.c:679:22: error: adding 'int' to a string does not append to the string 2020-10-17 Maksym Sobolyev * [cb2ba2ad8] : Make identation consistent to not upset Clang 10: parser/parse_privacy.c:161:2: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation] 2020-10-17 Maksym Sobolyev * [c20bb225a] : Fix printf-style formats to match argument when building on 32-bit arches. 2020-10-17 Maksym Sobolyev * [18f4c3d9b] : Use stdatomic.h, which is part of C standard since C11. 2020-10-17 Maksym Sobolyev * [736163f0e] : Fix warning converting from int to float with Clang 10: resolve.c:1454:34: error: implicit conversion from 'int' to 'float' changes value from 2147483647 to 2147483648 [-Werror,-Wimplicit-int-float-conversion] 2020-10-17 Maksym Sobolyev * [b7dcc4aa9] : Switch to bionic (aka Ubuntu 18) as main test vehicle and add bunch of extra jobs: o Build with GCC 7 @ Ubuntu 18; o Build with GCC 9 @ Ubuntu 18; o Build with GCC 10 @ Ubuntu 18; o Build with Clang 7 @ Ubuntu 18; o Build with Clang 9 @ Ubuntu 18; o Build with Clang 10 @ Ubuntu 18; o Build with GCC 7 @ Ubuntu 18 (ARM); o Build with Clang 7 @ Ubuntu 18 (ARM); o Build Core with GCC 7 @ Ubuntu 18 (i386); o Build Core with Clang 7 @ Ubuntu 18 (i386). Fix Travis warnings: o GC sudo, fixes "root: deprecated key sudo (The key `sudo` has no effect anymore.)"; o add dist into global; o add os. 2020-10-15 Razvan Crainea * [0e5377c64] : drouting: fix printing gw list for dr_number_routing Thanks go to Kirill Galinurov for reporting it on Slack 2020-10-14 Maksym Sobolyev * [6101cf9b2] : Build / use libreg.a. 2020-10-14 Maksym Sobolyev * [956916043] : Add ability to build various static supporting libraries to contain code that is shared between several modules. Discussed with @liviuchircu & @bogdan-iancu. 2020-10-13 Razvan Crainea * [25e55f10c] : packaging: fix typo in emergency module description Thank you @SB-JohnK for reporting it! Close #2263 2020-10-13 Razvan Crainea * [56e941130] : dialog: restore SDP and advertised contacts Reported by @jpyle490 on GitHub. Close #2275 2020-10-13 Liviu Chircu * [312fd3f52] : cfgutils: Fix a timezone parsing bug in expressions The timezone's "/" middle-part and the "/" (OR operator) were conflicting from the parser's PoV, and there were no tests to emphasize this issue. Credits to Bogdan-Andrei Iancu for the catch! 2020-10-13 Razvan Crainea * [c45c71411] : rtpengine: fix start and stop forwarding Credits go to Roman Kokorev for reporing and fixing in ticket #2281. Close #2281 2020-10-12 Razvan Crainea * [a66164811] : ratelimit: fix displaying pipes in rl_list This fix solves the problem where only one pipe per hash were listed by the rl_list command, resulting in missing pipes. Reported by Alain Bieuzent on users list and Robert Moss 2020-10-09 Liviu Chircu * [8ce9eb22e] : auth: Fix doc regression in d9574358d :) Although $var() variables are awesome, some module params (e.g. the "rpid_avp") really mandate an AVP and won't settle on anything else. 2020-10-09 Liviu Chircu * [e8dd676f9] : Merge pull request #2277 from sippy/pr_str_improve2 Clean up UAS auth code a bit before I dive into RFC8760 rework. 2020-10-09 Liviu Chircu * [899a89f52] : Merge pull request #2279 from sippy/pr_auth_doc_fix Improve auth module examples 2020-10-09 Maksym Sobolyev * [d9574358d] : Improve auth module examples: o Use $var(xyz) consistently. $avp's take shared resources and aren't really justified in this use case; o fix www_challenge / proxy_challenge second argument to match reality. 2020-10-09 Maksym Sobolyev * [c9e0f70e8] : Mark "text", i.e. status message argument of the build_res_buf_from_sip_req() as "const *" and propagate it into relevant functions of tm, sl and signalling modules. 2020-10-08 Liviu Chircu * [f91c13af1] : emergency: Remove bogus curl_global_cleanup() at runtime Suggested by Walter Doekes (@wdoekes) 2020-10-08 Liviu Chircu * [cfe658653] : Merge pull request #2228 from l2dy/emergency emergency: fix memory leak on error 2020-10-07 Liviu Chircu * [f235ad2e3] : usrloc is_contact_registered(): Add useful debug logs (cherry picked from commit 64c3724faa3b90918bda4c95ee716d487a3f0f1f) 2020-10-06 Maksym Sobolyev * [36e0281b7] : Extend STR_NULL and str_init() to set a type explicitly. This allows those macros to be used elsewhere in the function body, not only in variable declaration(s), i.e.: void foobar(int baz) { str localstr; if (random() == 42) { localstr = str_init(I_STR LUCKY_STR FIN_STR); } else { localstr = str_init(I_STR UNLUCKY_STR FIN_STR); } some_api(&localstr); } 2020-10-06 Maksym Sobolyev * [9dcff69df] : Clean up UAS auth code a bit before I dive into RFC8760 rework. o Get rid of the XYZ_LEN constants; o normalize parameters to not pass char * + len, pass str * instead; o add const where appropriate; o GC stale _PRINT_MD5 section, it's going to be replaced with the new code really soon; o avoid calling strlen() when the string lenth is well known. No functional changes (I hope). 2020-10-06 Liviu Chircu * [6e1c01c96] : Add a time rec expression parsing & checking API ... as a continuation of 8338276fc39. Also integrate all of this with: * drouting (added time rec expr support) * dialplan (added time rec expr support) * fraud_detection (just so it compiles) * cpl_c (just so it compiles) 2020-10-06 Liviu Chircu * [c299d1403] : check_time_rec(): Move the tz into the recurrence string This allows full control over each time recurrence's timezone, when combining multiple such recurrences into logical expressions (see the recently added multi-rec support). 2020-10-06 Bogdan Andrei IANCU * [903c24c0d] : Merge pull request #2272 from flaviogoncalves/flavio Fix in the residential script. Does not make sense to send a plus cha… 2020-10-04 Flavio E. Goncalves * [f82d3b107] : Fix in the parameters trust-address and SIP-source-address of the rtpengine 2020-10-04 Flavio E Goncalves * [fc3978d48] : Fix in the residential script. Does not make sense to send a plus character to drouting who does not support the plus in a prefix 2020-10-01 Vlad Patrascu * [466f96eeb] : cachedb_local: fix processing of replication and sync packets Fixes #2092 2020-10-01 Vlad Patrascu * [3a05dc1de] : cachedb_local: fix an ERR log when syncing from cluster 2020-10-01 Bogdan Andrei IANCU * [bd33a4e4d] : Merge pull request #2269 from sippy/unify_openssl_makefoo Unify openssl make-foo 2020-10-01 Liviu Chircu * [f97470deb] : Merge pull request #2270 from sippy/pr_fix_digest_parser Cleanup digest_parser code a bit. 2020-10-01 Liviu Chircu * [c036539f3] : Merge branch 'sippy-use_alg_t_luke' 2020-10-01 Maksym Sobolyev * [7dc3a4fb5] : Re-use alg_t from "digest/digest_parser.h" and get rid of the duplicate AUTHENTICATE_MD5 and AUTHENTICATE_MD5SESS definitions. 2020-09-30 Maksym Sobolyev * [936bb99bf] : Cleanup digest_parser code a bit: o replace another implementation of is_ws() with a is_ws call; o use str.len as the primary and the only way to see if string has zero lengh. Depending on how algorithm works, str.s might be non-NULL even if str.len == 0. 2020-09-30 Maksym Sobolyev * [dcd15129a] : Move the same openssl make-foo code that has been copied and pasted around into a central location and include it from there. 2020-09-29 Razvan Crainea * [7ba72d434] : sipcapture: fix overlapping function name the build_dummy_msg() function being used without the static identifier causes confusion for some compilers. An example is the AL2 compiler, which instead of using the module's implementation, it uses the core's one, hence resulting in broken behavior. Credit goes to @ghmj2417 (GitHub) for reporting this in ticket #2255 Close #2255 2020-09-28 Liviu Chircu * [1faf76642] : Merge pull request #2260 from sippy/fix_parse_authenticate_body Clean up parse_authenticate_body(), fix small bug. Add Unit Test. Improve OOB test. 2020-09-28 Maksym Sobolyev * [025463a90] : Move test data struct out of test function and format it a bit better. Suggested by: @liviuchircu 2020-09-28 Maksym Sobolyev * [a76e4421a] : Rename enum members: o OOB_PRE -> OOB_UNDERFLOW; o OOB_POST -> OOB_OVERFLOW. Convert repeating debug expression into a resuable macro. Suggested by: @liviuchircu 2020-09-28 Maksym Sobolyev * [7bb120612] : Merge branch 'master' of github.com:OpenSIPS/opensips into fix_parse_authenticate_body 2020-09-28 Liviu Chircu * [b8d86380b] : Merge pull request #2262 from sippy/test_freebsd_fix Few FreeBSD fixes into test system. 2020-09-28 Maksym Sobolyev * [b0612c10f] : o Don't assume bash lives in /bin; o fix arguments ordering while calling head to work correctly on non-GNU systems. 2020-09-28 Liviu Chircu * [20090c44e] : Merge pull request #2261 from sippy/fab_oob Fix empty body check in the parse_authenticate_body(). 2020-09-28 Maksym Sobolyev * [b0997b1fb] : Use body->len as the only authoritative way to check if the provided body is empty or not. 2020-09-28 Maksym Sobolyev * [92cf30bb1] : Merge remote-tracking branch 'upstream/master' into fix_parse_authenticate_body 2020-09-28 Ovidiu Sas * [a298b6779] : presence: update docs for cluster_federation_mode param - completes commit d4e82ea2beb24666201fe731b46f350708192c81 2020-09-26 Maksym Sobolyev * [080f34d3c] : Improve OOB test to provide a direction hint, so we can have a more useful debug output. 2020-09-26 Maksym Sobolyev * [382757cd2] : Add unit test for the parse_authenticate_body(). 2020-09-26 Maksym Sobolyev * [30ef0c688] : Rework parse_authenticate_body to be more clear. Fix issue always accessing body.s[0] even if the length is 0. 2020-09-25 Liviu Chircu * [6a63f35ca] : Merge pull request #2217 from egreenmachine/dev-sqlite Fix db_insert_update (upsert) in sqlite 2020-09-25 Liviu Chircu * [ad55f654e] : parse_qop_value(): Simplify trimming code 2020-09-25 Liviu Chircu * [b532509db] : Merge branch 'master_fix_parse_qop_value' of https://github.com/sippy/opensips into sippy-master_fix_parse_qop_value 2020-09-25 Liviu Chircu * [da7307796] : Merge branch 'feature/multi-time-rec' 2020-09-25 Liviu Chircu * [d4383f4c5] : cfgutils: Update check_time_rec() docs 2020-09-25 Liviu Chircu * [8338276fc] : cfgutils: Enhance check_time_rec() with multi-rec support This gives developers the ability to combine multiple time recurrences into a compact, easy-to-evaluate string expressing a complex schedule. The linking is done using the logical operators: AND ("&"), OR ("/") and NEG ("!"). Assuming A, B and C are vanilla check_time_rec() time recurrence strings, here are some example expressions that now become available: A & B A / B (A & B) / C A & !B !((A / B) & C) / D 2020-09-24 Liviu Chircu * [285550d0b] : cfgutils: Prepare for multi time-rec support * differentiate error codes (no match, bad input, internal error) * refactor into a validation function for a simple time rec 2020-09-24 Liviu Chircu * [dc9b295d0] : time rec support: Remove dead code * simplify "always false" if conditions * get rid of redundant (duplicate) memset() operations 2020-09-24 Liviu Chircu * [a100b7ad8] : cfgutils: Add initial test suite for multi time rec 2020-09-23 Maksym Sobolyev * [7741da5af] : o Make test_parse_qop working with the new parse_qop_value() API; o Add few more checks for error handling; o Organize the code better; o Add out-of-buffer testing API, which verifies that FUT is not accessing memory before supplied buffer or after. The API is fairly generic, so it might be used in other unit tests too. 2020-09-23 Liviu Chircu * [eb5a90062] : gflags: Allow functions to be called from any route Reported by Jeff Pyle 2020-09-22 Maksym Sobolyev * [b26026589] : Merge remote-tracking branch 'upstream/master' into master_fix_parse_qop_value 2020-09-22 Liviu Chircu * [4755826f7] : Fix gcc warning 2020-09-22 Liviu Chircu * [6757f56cd] : SIP PN Support: Add the "reason" param in E_UL_CONTACT_REFRESH This gives developers the ability to distinguish between the different types of Push Notifications (e.g. binding refresh, incoming call, etc.). 2020-09-22 Liviu Chircu * [b30ac6be3] : EVI: Improve debug logs 2020-09-21 Maksym Sobolyev * [bf3799554] : Fix parse_qop_value() to not access memory outside of the qop value region. Noticed by: liviuchircu Use is_ws(), not isspace() while I am here. 2020-09-18 Vlad Patrascu * [6ad5d4e9e] : stir_shaken: improve debug and error logs 2020-09-18 Vlad Patrascu * [14cce667e] : presence_dfks: fix dfks_set_feature doc example 2020-09-18 Liviu Chircu * [baddd32e2] : Merge pull request #2253 from sippy/master_2020 Fix a rather obscure copy-n-paste bug in the digest parser 2020-09-18 Maksym Sobolyev * [d3b071a2d] : Steal highly optimizable and smart algorithm to do LWS detection invented by the clang project. It does LWS detection in just a handful instructions and no branches, as compared to the dozen instructions and 4 branches currently. Some info on how it works here: https://pdimov.github.io/blog/2020/07/19/llvm-and-memchr/ ==== C code === int is_ws_original(char cp) { return ((cp == ' ') || (cp == '\r') || (cp == 'n') || (cp == '\t') || (cp == ',')); } int is_ws_new(unsigned char ch) { const unsigned int mask = (1 << (' ' - 1)) | (1 << ('\r' - 1)) | (1 << ('\n' - 1)) | (1 << ('\t' - 1)); ch--; return ch < ' ' && ((1 << ch) & mask); } ==== Compiled, latest clang/trunk, -O2, x86_64 ==== is_ws_original: # @is_ws_original mov eax, 1 cmp dil, 32 ja .LBB6_1 movzx ecx, dil movabs rdx, 4294976000 bt rdx, rcx jb .LBB6_4 .LBB6_1: cmp dil, 110 jne .LBB6_2 .LBB6_4: ret .LBB6_2: xor eax, eax cmp dil, 44 sete al ret is_ws_new: # @is_ws_new add dil, -1 cmp dil, 32 setb al movzx ecx, dil mov edx, -2147478784 bt edx, ecx setb cl and cl, al movzx eax, cl ret ==== 2020-09-18 Maksym Sobolyev * [659b32939] : Use is_ws() in two more places where appropriate. 2020-09-18 Maksym Sobolyev * [156460ee9] : Fix a rather obscure copy-n-paste bug in the digest parser causing "Digestn" to be accepted just as well as "Digest" would, however if the header happens to overflow to the next line right after that, i.e.: Authorization: Digest[CRLF] username="opensipit2020"... The header would fail to be parsed at LF. Use is_ws() macro here, don't reinvent a wheel. 2020-09-16 Razvan Crainea * [f17737985] : dialog: fix bug when "state" was not shown by dlg_list Commit d883a0d72a introduced a bug in the dialog module that was no longer printing the "state" node in the MI output; this commit fixes the bug. 2020-09-15 Bogdan-Andrei Iancu * [807c13b59] : [load_balancer] Fix wrong param name on MI lb_resize Correct the name of the MI lb_resize command parameter used for the new capacity of the destination Credits go to @zhanghaiming Closes #2246 (cherry picked from commit 411f456606d55c40ce98511222c8231fbb57a18d) 2020-09-15 Bogdan-Andrei Iancu * [97d074207] : [core] missing file from e1347ebe4 (cherry picked from commit 72e4b9d4f85ed5f8a745811fd47f6a2d02a6a993) 2020-09-15 Bogdan-Andrei Iancu * [3f053873f] : [core] fix limited support for transport vals in PATH The transport of the received parameter was limited to TPC/TLS/SCTP (no WS or WSS) (cherry picked from commit e1347ebe47984492f5a7d383ef00559ce41da8be) 2020-09-15 Bogdan-Andrei Iancu * [e2aa23ba8] : [core] fix building path hdr for IPv6 IPv6 addresses in path received parameter are not enclosed in brackes Credits go to @hafkensite / Jasper Hafkenscheid Closes #2247 (cherry picked from commit 58bead88852993877237984e32d4da47f01a7ba9) 2020-09-10 Vlad Patrascu * [e0704c7bf] : cJSON lib: fix double free in case of string parsing error Fixes #1977 (cherry picked from commit a53f3bd689a01c495809214823d07bfc3cab512a) 2020-09-08 Bogdan Andrei IANCU * [926d7c715] : Merge pull request #2244 from vasilevalex/cfg_parse Reset config errors counter on every config parsing 2020-09-08 Alexey Vasilyev * [6ddfe6221] : Reset config errors counter on every config parsing 2020-09-08 Ovidiu Sas * [2efaeee24] : dialog: fix/reformat some logs 2020-09-07 Liviu Chircu * [e74829d44] : nathelper: Do not crash on bad ping reply Credits to Alexey Vasilyev for the report! Fixes #2242 (cherry picked from commit fb34cbc51405d7928dac0768be4ad912f1bb0bed) 2020-09-04 Liviu Chircu * [d29d45f78] : Merge pull request #2239 from l2dy/rtpengine-signed rtpengine: fix single-bit field type 2020-09-04 Liviu Chircu * [ef7a6801c] : List new / missing contributors 2020-09-03 Liviu Chircu * [5c8f8c027] : load_balancer: Fix AB/BA deadlock in lb_start() Assuming we have resources A, B, before this patch we would have the following lock grab order on the corresponding resource locks: (see lb_data.c +743): lb_start(): A, B lb_next(): B, A This patch fixes this type of deadlock by inverting the resource AVP elements, such that both functions grab the array locks identically: lb_start(): A, B lb_next(): A, B (cherry picked from commit f4d5d31e9217b6c270f693d847fd714f019f2bb1) 2020-09-03 Zero King * [9c4f6c1c7] : rtpengine: fix single-bit field type 2020-09-02 Liviu Chircu * [3af502dc4] : Merge pull request #2229 from l2dy/parser-r Accept single \r as EOH in multipart 2020-09-02 Liviu Chircu * [7c19af348] : Merge pull request #2237 from wdoekes/wjd-fix-comment usrloc: Update doxygen comment about packing get_all_ucontacts 2020-09-02 Walter Doekes * [fc1c3ec32] : usrloc: Update doxygen comment about packing get_all_ucontacts 2020-09-02 Liviu Chircu * [4d81a7f55] : Merge pull request #2233 from wdoekes/wjd-fix-next_hop-reading-freed-mem Fix next_hop crash (seen in nathelper nh_timer) due to reading reused mem 2020-09-02 Bogdan-Andrei Iancu * [5ec53788c] : [permissions] Fixed mem leak on pattern field Closes #2197 (cherry picked from commit d6f3424d1fe71de94a545a36d0e14fbd9ecd3b3f) 2020-09-02 Vlad Pătrașcu * [234e508fd] : Merge pull request #2209 from bambyster/master A crash in stir_shaken module. 2020-09-02 Vlad Pătrașcu * [bbcace782] : Merge pull request #2212 from lemenkov/verbose_events Fix NULL values for str params in EVI API 2020-09-01 Peter Lemenkov * [b801f04c4] : evi: Str params can contain NULL values. NULL value as a str param is totally fine according to JSON specification. So let's not crash when adding str parameter with NULL value. 2020-09-01 Peter Lemenkov * [9ee8c0648] : evi: More verbose about which param caused crash When using evi interface sometimes we need to know exactly which parameter led to failure. At least we need its name and event's name. 2020-08-31 Walter Doekes * [5a6b3abe4] : Fix next_hop crash (seen in nathelper nh_timer) due to reading reused mem Problem: - get_domain_db_ucontacts (through get_domain_ucontacts) was handing out (next_hop) pointers to memory that was unused. This resulted in a crash when this memory was reused before the invalid pointer was reused. Relevant issues and commits: - #1652 [OpenSIPS crashes since of child that serves rtpproxy] - e162f5f10 [fix 1652: usrloc: make next_hop point within the shared buffer] - #1710 [nathelper next_hop off by one for usrloc path] - 0300eb1d5 [fix 1710 / revert 1652: usrloc: fix next hop compute for ...] That is: e162f5f10 fixes this exact problem in get_domain_db_ucontacts, in get_domain_mem_ucontacts and in get_domain_cdb_ucontacts (cdb_pack_ping_data). But in 0300eb1d5 it is reverted for only get_domain_db_ucontacts. This fix: - Rewrites the fix for get_domain_db_ucontacts and get_domain_cdb_ucontacts, making it less fragile/bug-prone. - Adds comments about fragility to get_domain_mem_ucontacts - Fixed unaligned memcpy that might affect non-intel CPUs: `((struct proxy_l *)cp)->name.s = next_hop_host` Bug reported and fix tested by Jasper Hafkenscheid @hafkensite (VoIPGRID). 2020-08-28 Vlad Patrascu * [488c56b4c] : tls_mgm: fix setting TLS method from DB Fixes #2226 (cherry picked from commit 1f896fa044aa8aa2f54c442bb40bb51c13f06022) 2020-08-28 Vlad Patrascu * [f597319fa] : tls_mgm: fix crash when setting an unsupported TLS method Closes #2204 Closes #2213 (cherry picked from commit 6ee7b856b7e3257d8b7451cbffe32fe7c1cada31) 2020-08-27 Liviu Chircu * [aa53fe6c7] : Merge pull request #2188 from fgast/fix-doc-clustere_list_cap Fix command in documentation for clusterer_list_cap 2020-08-27 Liviu Chircu * [968063d9f] : rtpengine: Fix docs for `extra_id_pv` Suggested by Nick Altmann 2020-08-27 Liviu Chircu * [c4c7a3e97] : .lgtm.yml: Fix libjson package name (Ubuntu, not Red Hat) 2020-08-27 Zero King * [f5d1b55aa] : Accept single \r as EOH in multipart This completes commit 3ec9d1b25430715f2b800c455c8518104a243f49. 2020-08-27 Zero King * [18f9f7873] : emergency: fix memory leak on error 2020-08-26 Razvan Crainea * [68f8f9d5c] : rtpengine: fix order of specified interface flags When both 'external' and 'internal' flags were specified, 'internal' was always assigned as iniface, and 'external' as outiface. This commit makes sure that the order they are specified in is respected. 2020-08-26 Razvan Crainea * [948c43915] : dialog: parse contact in separate structure This avoids concurrent access to the contact header's parsed structure in request messages saved in shm - addresses ticket #2095 (cherry picked from commit df68e3b191a4bc3565d9bc7bc3f6275d41921e88) 2020-08-26 Liviu Chircu * [e21beb40c] : Merge pull request #2222 from l2dy/cfg Fix tls_method typo in cfg templates 2020-08-22 Zero King * [ff17c8f0b] : Fix tls_method typo in cfg templates 2020-08-20 Liviu Chircu * [2c008cd92] : tls_mgm: Avoid creating a shared DB conn at mod_init() Many thanks to Adrien Martin (@adrien-martin) for the immense help in reporting, troubleshooting and helping close this one out. Fixes #2161 2020-08-19 Eric Green * [6f71f3f06] : sqlite - fix upsert in db_insert_update 2020-08-18 Razvan Crainea * [d447626c2] : dialog: do not update SDP on rejected INVITE/UPDATEs Reported by @nikbyte in #2177 2020-08-18 Liviu Chircu * [775b9d97d] : Rework previous commit Although the protocols listed in the @proto array "seem" to be initialized, they are still missing some essential data, which is only later provided by trans_load(), during the startup phase. (cherry picked from commit 7f5480ceb7d2b13b4aa2ed1e90f741e11b8c4876) (cherry picked from commit 7ee0bf40db428d8b8b0daf39b949b29f8c6f4cf0) 2020-08-18 Liviu Chircu * [7b3a482aa] : hep_udp listener: Fix "use_children" regression Commit 899f65c8f4 introduced a regression where "use_children" would be ignored for the HEP UDP protocol, possibly leading to extra forked workers after an OpenSIPS upgrade, failed restarts due to exceeded MySQL max connections, etc. (cherry picked from commit 2801fae6f88bd6b4c958b76ecb96c7cd7ba80d72) 2020-08-18 Razvan Crainea * [1f9b433fd] : rtpengine: handle PRACK for answer Thanks go to @nikbyte for the report. Close #2208 2020-08-18 Razvan Crainea * [4ffb3d2fe] : lgtm: fix before_index node No way to test this, we need to get this confirmed later on. Thanks go to @fgast for reporing it in #2194 2020-08-18 Liviu Chircu * [4f414366e] : fraud_detection: Fix a bug causing negative CC/CPM Following a reset of the statistics for a (user, dialed_number) pair, skip any pending subtraction operations scheduled during a previous interval (e.g. a dialog which started during fraud detection interval A and ended in interval B should not decrement CC anymore if it has already been reset to 0 in the meantime during a more recent check_fraud() call). Many thanks to Inderjeet Sharma (@inderjeetsharma) for reporting and helping track down this bug. Fixes #2079 2020-08-14 Bogdan-Andrei Iancu * [ad178c575] : [tm] run the per-branch on reply route also as ONREPLY type Closes #2201 2020-08-14 Bogdan-Andrei Iancu * [1f1414a38] : Fix optional param for forward() If missing, there is nothing to be done for the parameter. Closes #2210 (cherry picked from commit 5206467cfff481c62ad23147cca86db64d770c20) 2020-08-12 Andriy Pylypenko * [a75dd2106] : Wipe out the pointer to already destroyed data so a later error does not cause a crash. 2020-08-07 Vlad Patrascu * [1feaed465] : core: fix parameter type for cache_raw_query() Reported in #2198 (cherry picked from commit 81d079958e813f47551da39b21e9f57fc7a53c8a) 2020-08-07 Vlad Paiu * [8f702a688] : Added s.eval transformation eg. $var(format) = "limit-$si-$tU"; xlog("Expanded format is $(var(format){s.eval}) \n"); prints Expanded format is limit-127.0.0.1-vlad 2020-08-07 Vlad Patrascu * [ebd6f8b65] : tls_mgm: fix crashes with db_text and null string values Closes #2192 (cherry picked from commit 3d26747cc309d7f5c461e3be49fb30db78bc3591) 2020-08-06 Bogdan-Andrei Iancu * [b5bcf0463] : Supply a processing context to error route. When the error is triggered outside the context of another route, be sure it also have a processing context Closes #2187 (cherry picked from commit d17d0ed6cd36dd358c9260eb091ef2002198737d) (cherry picked from commit a69377484018f194836b2aa2633238f52cbaa4d1) 2020-08-05 Răzvan Crainea * [94cec7540] : Merge pull request #2193 from fgast/httpd_https Add TLS support to module/httpd 2020-08-04 Liviu Chircu * [689531e6f] : drouting: Do not start with NULL DB connections Force all DB connection objects to be created right from the start, otherwise strange, hard to diagnose errors may _occasionally_ pop up during runtime: ERROR:core:db_use_table: invalid parameter value (nil), 0x7ff31329a108 ERROR:drouting:dr_state_flusher: cannot select table "dr_gateways" ... or: INFO:drouting:dr_reload_cmd: dr_reload MI command received! CRITICAL:core:db_table_version: invalid parameter value ERROR:core:db_check_table_version: querying version for table dr_gateways CRITICAL:drouting:dr_reload_data_head: failed to load routing info CRITICAL:drouting:dr_reload_cmd: Failed to load data head (cherry picked from commit 8a9a396d4d1a7025a1fe93d564f1ebe5150961b4) (cherry picked from commit e2e989ddb851b98ef1419c146d857ab7da1b4800) (cherry picked from commit c10248b88b3f227e0f6dd40fd7ec4f643824ab33) 2020-08-03 Liviu Chircu * [4dba11213] : fraud_detection: Fix misleading 'show_fraud_stats' docs * the 'fraud_profile' MI command parameter is both invalid and not at all required by the current code * document the "stale statistics" limitation of this function 2020-08-03 Liviu Chircu * [2404b96c8] : fraud_detection: Improve accuracy for 'concurrent calls' Avoid using the DLGCB_FAILED callback, since it has no protection against the "408 Request Timeout / 200 OK" race condition, and simply use DLGCB_DESTROY in order to decrement the concurrent calls counter. This fixes a bug where a "408 Timeout / 200 OK" call would cause a concurrent calls value of 4294967295, due to an extra decrement. Fixes #2079 2020-08-03 Fabian Gast * [adfa0d63a] : Add TLS support to module/httpd 2020-08-03 Razvan Crainea * [724a3cbf1] : presence: reset delete prepare statement when delete not performed 2020-07-31 Liviu Chircu * [5ba1e90cf] : SIP PN Support: Start OpenSIPS with PURR + topology hiding pn_process_purr() has yet to be extensively tested with topology_hiding(), but it should work in theory, at least! (cherry picked from commit 6f26ea1e70299b7939de0807252f15d026a95127) 2020-07-30 Liviu Chircu * [c1464a1c7] : fraud_detection: Add the possibility to disable stats A (0) value for any of the fraud detection thresholds now means: "ignore this threshold", instead of: "raise an event on each call for this threshold?!". Although (0) values could, in theory, have been useful for event generation testing purposes before this patch, this is a small price to pay in order to gain the ability to disable a stat. Developers can now add 1 more CPS and still keep testing with a new (1) value :) Although the DB schema changes slightly, due to the added "DEFAULT 0", it is fully backwards-compatible with the previous one, except fraud_detection row INSERTs will now be more quiet, generating no more warnings from the backend (e.g. "Column does not have a default value..." -> but still defaults to 0, thanks to non-strict mode, leading to strange warnings from the module). Fixes #890 (cherry picked from commit 214f105ae52593bd53aef83f4426e1bbb0a09666) 2020-07-30 Vlad Patrascu * [a9e78b446] : stir_shaken: complete fix in commit 3bf2b98 2020-07-30 Liviu Chircu * [f9fd982be] : userblacklist: Be compatible with db_cachedb over MongoDB Issue reported by Ryan Embgrets 2020-07-29 Vlad Patrascu * [3bf2b9890] : stir_shaken: fix compilation with openssl < 1.1.1 2020-07-29 Fabian Gast * [7a0f5991d] : Fix command in documentation for clusterer_list_cap 2020-07-29 Vlad Patrascu * [294926bc6] : Cleanup null "id" from doc examples for evi transport modules 2020-07-29 Vlad Patrascu * [8e4a47790] : event_rabbitmq: remove unused modparam (cherry picked from commit 0734be9dc7eb11d420b00a52591d3736b7009aae) 2020-07-28 Vlad Patrascu * [c7dcc779e] : event_interface: don't include a null 'id' field in notifications The use of a NULL value for the 'id' member in a JSON-RPC notification is unncessary and also discouraged by the specification. (cherry picked from commit 31dae10a8b08f1fb8148e6063f76c39a068cd416) 2020-07-28 Vlad Patrascu * [0294b2680] : event interface: fix crash when raising event with no params Reported by Mark Allen on the mailing list. (cherry picked from commit 123d9ccb1d956837cc06f8bd871cc6c40dbdad94) 2020-07-28 Bogdan-Andrei Iancu * [1da7da1c5] : [core] fix missing data type flags for $socket_in(af) Reported by @hamid-elaosta Closes #2185 2020-07-22 Razvan Crainea * [f868191cf] : dispatcher: prevent possibl uninitialized access 2020-07-22 Razvan Crainea * [d7ad0b7bd] : fix some unused values Fixes Coverity CID #40940, #40943, #40944, #40947, #40948, #211385, #211395, #211382 2020-07-22 Razvan Crainea * [859f0e025] : cpl_c: prevent possible buffer overflow Fixes Coverity CID #40882 2020-07-22 Razvan Crainea * [7e8120da1] : permissions: fix possible buffer overflow Fixes Coverity CID #40880 2020-07-22 Razvan Crainea * [108a5d4b7] : ldap: prevent possible buffer overflow Fixes Coverity CID #40879 2020-07-22 Razvan Crainea * [f38dec26f] : presence_xml: fix possible buffer overflow Fixes Coverity CID #40877 2020-07-22 Razvan Crainea * [5a094bfeb] : carrieroute: fix possible buffer overflow Fixes Coverity CID #40876 2020-07-21 Liviu Chircu * [c13786c43] : Expression evaluator: Improve code performance * evaluate comparisons against network addresses (NET_ST) last, since they are rarer than string / int comparisons * use switch instead of if/else if/else if * speed up comp_s2s() code 2020-07-21 Liviu Chircu * [7d0df27a4] : ut.h: Fix str_casematch() implementation Since str's have a known length, we should not stop the iteration at '\0'. 2020-07-21 Razvan Crainea * [aaf99dc6b] : add lgtm file 2020-07-21 Razvan Crainea * [44a4b5a24] : statistics: rework internal functions to use str instead of char * 2020-07-21 Razvan Crainea * [33dc0320a] : time_rec: use safe localtime_r function instead of localtime 2020-07-21 Razvan Crainea * [804c9a049] : tm: use msg_flags to indicate message is replicated 2020-07-21 Razvan Crainea * [06f729706] : rtpengine: fix late negociation detection of rtpengine_manage() When a reply is received, do not look into the request if it has body, since that could lead to headers parsing in pkg - that might leak. Thanks go to @bogdan-iancu for spotting the issue 2020-07-21 Razvan Crainea * [d0641318f] : rtpengine: fix offer vs answer detection for replies When late negociation is not used, rtpengine_manage() should send an answer command, not an offer one. 2020-07-20 Razvan Crainea * [8d3bab520] : cgrates: fix useless null check Fixes Coverity CID #200007 and #200082 2020-07-20 Razvan Crainea * [888a135c3] : tracer: fix possible null dereference Fixes Coverity CID #199929 and #200006 2020-07-20 Razvan Crainea * [44d14d6e1] : tracer: proper distinction between types and flags/scope Fixes coverity CID #199984 2020-07-20 Razvan Crainea * [083383c4b] : db_berkeley: prevent possible overflow Fixes Coverity CID #40868 2020-07-20 Razvan Crainea * [6a73b79fe] : drouting: remove useles code Fixes Coverity CID #199955 2020-07-20 Razvan Crainea * [507cffda1] : mi_fifo: fix concatenated commands Fixes Coverity CID #199915 2020-07-20 Razvan Crainea * [8e0d3981e] : presence: fix passing large structure Fixes Coverity CID #40791 2020-07-20 Bogdan-Andrei Iancu * [3b6d0de16] : [load_balancer] Spelling over log messages 2020-07-18 Vlad Patrascu * [182ceb0ca] : dialog: don't allow RE-INVITE and OPTIONS pinging at the same time Enabling both RE-INVITE and OPTIONS pinging for the same endpoint causes issues with the CSEQ value in: * ACK (incremented value compared to the corresponding INVITE) * INVITE and OPTIONS (decreasing values between the requests), in case races occur between computing the new CSEQ values and sending the messages. 2020-07-17 Liviu Chircu * [1b4fcc06a] : tracer: Fix possible crash on NULL context CID #200069 2020-07-17 Liviu Chircu * [374fde456] : rest_client: Mask Coverity false positive It is fine to push a stack pointer into libcurl during a sync transfer, since the control flow never leaves the original function before it is completely done with the library. CID #200078 2020-07-17 Liviu Chircu * [82dfe4c40] : tracer: Fix unchecked return codes CID #200092, #200088 2020-07-17 Liviu Chircu * [58fa56c6e] : registrar: Fix possible crash with no Contact CID #211379 2020-07-16 Vlad Patrascu * [e7ba58543] : rabbitmq: fix crash in case of bad parameter for rmq_publish Fixes Coverity CID #199894 2020-07-16 Vlad Patrascu * [1319c4722] : lua: remove an useless null check Fixes Coverity CID # 199899 2020-07-16 Vlad Patrascu * [dca4868a0] : rabbitmq_consumer: suppress coverity warning Fixes Coverity CID #199947 2020-07-16 Vlad Paiu * [67ce5cab1] : Fix excluding vendors with no price Closes #2169 2020-07-15 Vlad Patrascu * [9bac91d55] : tm: fix bad string in the MI output of t_uac_dlg Fixes Coverity CID #199965, #199943 2020-07-15 Vlad Patrascu * [4a18ce89c] : tls_mgm: set the TLS session id context with the proper length Fixes Coverity CID #207904 2020-07-15 Bogdan-Andrei Iancu * [d4abd53b2] : [presence] fix ugly copy-paste error in MI output Reported by coverity CID 200057 2020-07-15 Bogdan-Andrei Iancu * [b1d796344] : [nathelper] Proper testing upon extracting hash value Be sure it is valid hexa and it it within the correct range. The lack of these tests may open the gate for some nasty exploits. Reported by coverity CID 199958 2020-07-15 Bogdan-Andrei Iancu * [249b80741] : [nathelper] Fix bad test on resolving flag name get_flag_id_by_name() may also return other negative codes than -1 Reported by coverity CID 200026, 200005, 199906 2020-07-15 Bogdan-Andrei Iancu * [e001abe34] : [pua_dialoginfo] Fix condition on empty "callee" string 2020-07-15 Bogdan-Andrei Iancu * [ab7d44309] : [drouting] removed useless code Makes no sense to select the table at db_con init time, as various queries (from various modules) may set and use different tables. Related to coverity report CID 58405 2020-07-15 Bogdan-Andrei Iancu * [11e63b359] : [presence] Proper testing for the return code of get_body() Reported by coverity CID 207911 2020-07-15 Bogdan-Andrei Iancu * [f3530c10a] : [pua_dialoginfo] Fix bad test on resolving flag name get_flag_id_by_name() may also return other negative codes than -1 Reported by coverity CID 207914 2020-07-15 Vlad Patrascu * [596c572da] : event_flatstore: prevent NULL deref in case of bogus param Fixes Coverity CID #207918 2020-07-15 Bogdan-Andrei Iancu * [c489f462d] : [core] proper checking on return code for getsockname() Reported by coverity CID 200064 2020-07-15 Vlad Patrascu * [44abb30bb] : tls_mgm: fix uninitialized variable Fixes Coverity CID #199976 2020-07-15 Razvan Crainea * [a682789d5] : rtpproxy: ignore unknown payload type media streams Thanks go to @wangduanduan for reporting and providing troubleshoot info 2020-07-15 Bogdan-Andrei Iancu * [b0135bb01] : [drouting] Avoid handling a NULL 'gw' upon bogus function call Reported by coverity CID 211365 2020-07-15 Vlad Patrascu * [3112b5942] : xml: properly handle oom when extending $xml result buffer Fixes Coverity CID #200068 2020-07-15 Bogdan-Andrei Iancu * [3b20c9db0] : [registrar] Proper init of delete_nh_he variable The logic may end up to free_hostent(delete_nh_he) without actually using the delete_nh_he, leading to freeing so random pointers. Reported by coverity CID 199942 2020-07-15 Razvan Crainea * [a094bbc34] : pua_dialoginfo: always parse callid Fixes coverity CID #199930 2020-07-15 Razvan Crainea * [24aea8e63] : pua_xmpp: release memory in case of error Fixes Coverity CID #199967 2020-07-15 Razvan Crainea * [b805adcc8] : rls: release memory in case of error Fixes Coverity CID #199983 2020-07-15 Bogdan-Andrei Iancu * [259e6f3a3] : [core] Fix printing the async cmd name in error log Reported by coverity CID 199935 2020-07-15 Bogdan-Andrei Iancu * [e43b6e52e] : [core] do not use LM_xxx if log_level is NULL This may never happen, but as LM_xxx is testing the log_level value, it is not wise to use it to report that log_level is NULL Reported by coverity CID 207925 2020-07-15 Bogdan-Andrei Iancu * [f564faa0d] : [core] log error if add_alias() fails Reported by coverity CID 211363 2020-07-15 Bogdan-Andrei Iancu * [86158c895] : [call_center] Fix ETA when no agents are logged Reported by coverity CID 211393 2020-07-15 Bogdan-Andrei Iancu * [0d6f7beb9] : [presence] use the right event type. Use the event type corresponding to the handled presentity. Reported by covrity in CID 199919. 2020-07-11 Liviu Chircu * [673cf7f9e] : db_text: Complete 65b18091 2020-07-10 Razvan Crainea * [65b180914] : db: merge db_is_neq_type() in db_ut Fix coverity CID #40717, #40718, #40719, #40720, #40721, #40722 2020-07-10 Razvan Crainea * [87a1f31d2] : fix more switch fall through Coverity CID #199932, #199927, #164020, #164013, #150486, #58380, #58379, #58375, #58374, #40705, #40700, #40701 2020-07-10 Razvan Crainea * [c447ea337] : db_text: complete coverity CID #200093 2020-07-10 Razvan Crainea * [4d5465e57] : b2b_logic: fix coverity errors Fixes CID #200000, #211411, #211412, #211413, #211414, #211362, #40885, #40835, #40827, #40826, #40825, #40703, #40704 2020-07-10 Razvan Crainea * [6169e1b7f] : proto_tls: make sure we have destination to connect to Fixes Coverity CID #58361 2020-07-10 Razvan Crainea * [58df2d1f4] : proto_wss: add fall through indication Fixes Coverity CID #58373 2020-07-10 Razvan Crainea * [20736cc65] : proto_hep: remove useless NULL check Fixes Coverity CID #163991 2020-07-10 Razvan Crainea * [31899c1c7] : proto_smpp: prevent NULL deref in case of bogus input Fixes coverity CID #199973 and #199931 2020-07-10 Razvan Crainea * [e22045c93] : proto_smpp: skip entries with bad IP Fixes Coverity CID #200075 2020-07-10 Razvan Crainea * [c7f72410f] : proto_ws: make sure we have destination to connect to Fixes Coverity CID #58340 2020-07-10 Razvan Crainea * [ac2329474] : fix coverity detected false positives CID #40557, #211391 2020-07-10 Razvan Crainea * [1b1dcaf3b] : proto_smpp: smpp_bind_transceiver_resp_t system id Reported by Coverity CID #199918 2020-07-10 Razvan Crainea * [6c4da323a] : db_text: fix no-op code fixes Coverity CID #200004 2020-07-10 Razvan Crainea * [4a3dbd9df] : tm: cleanup replicated cancel msg Fixes Coverity CID #200031 2020-07-10 Razvan Crainea * [ce03fc2b7] : parse_to: add fallthrough comments/indications for coverity CID #200094 2020-07-10 Razvan Crainea * [574276035] : qos: fix getting SDP 2020-07-10 Razvan Crainea * [4ad1ce959] : remove dead code Fixes Coverity CID #163971, #40603, #163958, #163961, #200036, #211354, #211370, #211394 2020-07-10 Razvan Crainea * [5fea3d3c8] : mi_html: fix improper free on error Fixes Coverity CID #200040 2020-07-10 Razvan Crainea * [395bfdc0c] : db_text: prevent buffer overflow Fixes Coverity CID #200093 2020-07-10 Razvan Crainea * [99f06ba10] : tracer: make sure vars are initialized Fixes Coverity CID #200098 2020-07-10 Razvan Crainea * [6326acd76] : dialog: correctly handle str2int return code (CID #150473) 2020-07-10 Razvan Crainea * [e68afc628] : dialog: initialize dummy value to sink CID #199944 2020-07-10 Razvan Crainea * [633822eaf] : rework some annotations to make coverity happy 2020-07-10 Razvan Crainea * [22df0da6f] : dialog: use correct dialog for sync (fix CID #40673) 2020-07-10 Razvan Crainea * [ec67fe3bf] : dialog: fix coverity CID #40494 2020-07-10 Razvan Crainea * [e3ca30ec9] : dialog: rework coverity fix CID #40640 2020-07-10 Razvan Crainea * [f02101aee] : callops: rework coverity CID #211369 2020-07-10 Razvan Crainea * [fe07e5de7] : callops: fix coverity CID #211388, #211360, #211369 2020-07-10 Razvan Crainea * [2bc8ff22b] : evi: annotate evi_param_set_int to fix Coverity Fixes several Coverity alarms 2020-07-10 Razvan Crainea * [03ad3337e] : dialog: fix coverity issues CID #40640, #40494, #199944, #211361, #211358, #150473, #40673 2020-07-10 Razvan Crainea * [c63f26200] : rtpproxy: fix coverity issues CID #207908, #207917, #150494, #40688 2020-07-10 Razvan Crainea * [306f9e20a] : rtpengine: fix some coverity warnings CID #211356 and #199981 2020-07-10 Razvan Crainea * [c8afa69cc] : callops: fix several coverity issues CID #211388, #211360, #211378, #211373, #211369 2020-07-10 Razvan Crainea * [0983847c9] : comment fall through switches Fixes Coverity #40710, #211397, #40716, #40726, #40727, #40728, #40730, #40732, #58373, #58381, #199975, #200059, #200094, #211380, #211372, #211359 2020-07-10 Razvan Crainea * [439e4d41a] : fix tcp_persistent_flag when list is not defined properly Fixes Coverity #211381 2020-07-10 Razvan Crainea * [f213a24a1] : prevent leak in case of oom Fixes Coverity #211383 2020-07-10 Liviu Chircu * [33a0d617d] : proto_udp: Supress Coverity false positive CID #200029 2020-07-10 Liviu Chircu * [0eee21199] : mi_datagram: Minor improvements * always NULL-terminate the read buffer (CID #200029). Doesn't fix any known bug, just a good practice * avoid redundant memset(65535) on each read * improve startup error log 2020-07-10 Razvan Crainea * [1f699bce5] : travis: s/4spaces/2spaces 2020-07-10 Liviu Chircu * [0230f9c90] : exec: Always NULL-terminate the read buffer CID #200052 2020-07-10 Liviu Chircu * [df2ce6d82] : drouting: Always NULL-terminate the GW buffer While this doesn't immediately fix any bug, it should make Coverity happy. CID #200062 2020-07-09 Liviu Chircu * [7f244f17a] : mpath: Fix possible buffer underrun Also attempt to mask the false positive in CID #200070. CID #211377 2020-07-09 Vlad Patrascu * [9459f5d3a] : db_mysql: fix crashes when loading module along with tls_mgm 2020-07-09 Liviu Chircu * [2e60b5022] : mid_registrar: Add paranoid safety check This extra check doesn't fix anything right now, but at least it makes Coverity happy. CID #200020 2020-07-09 Liviu Chircu * [f305fa88f] : usrloc: Remove unnecessary NULL check CID #200086 2020-07-09 Liviu Chircu * [7a638403e] : mid_registrar: Remove unnecessary check CID #199954 2020-07-09 Liviu Chircu * [39fc05ec0] : statistics macros: Avoid unsigned integer comparisons against 0 CID #199900, #199913, #199923, #199934, #199941, #199964, #199998, #200032, #200049, #200074, #200096. 2020-07-09 Liviu Chircu * [fcdd224a5] : HP_MALLOC status logging: Fix incorrect bitwise shift CID #200101 2020-07-09 Liviu Chircu * [3263b2701] : Module deps: Fix missing va_end() during error handling CID #211355 2020-07-09 Liviu Chircu * [c9753a050] : SIP PN Support: Fix a rare NULL pointer dereference This fixes a possible crash when using a non-standard list of PN-matching parameters (e.g. something different than [provider, prid, param]). CID #211368 2020-07-09 Liviu Chircu * [8cec5cbc5] : SIP PN support: Fix NULL pointer dereference Severity: high CID #211371 2020-07-09 Liviu Chircu * [a5fbad573] : SIP PN support: Fix possible NULL dereference CID #211389 2020-07-09 Liviu Chircu * [cfb4967ec] : qrouting: Avoid unnecessary NULL check CID #211396 2020-07-09 Liviu Chircu * [2a9824cdc] : freeswitch: Fix a rare memleak CID #164007 2020-07-09 Liviu Chircu * [5f03b8556] : usrloc: Fix unitialized variable CID #199971 2020-07-09 Liviu Chircu * [36a361d63] : preprocessor: Fix memleak on preprocessing failure Fixes CID #200047 2020-07-09 Liviu Chircu * [a4684d54f] : mid_registrar: Fix uninitialized variable Although the severity is low, this code path could be triggered by a bogus downstream registrar which returns a 200 OK without the Contact advertised by the mid-registrar in its REGISTER request. Fixes CID #200051 2020-07-09 Liviu Chircu * [c6682f208] : stop_expire_timer(): Fix uninitialized memory access The severity is low, however, since uninitialized integer math is still safe (from a stability PoV), with the resulting value being ignored anyway. Fixes CID #199911, #199922, #199926, #199966, #199987, #199990, #200085, #200054. 2020-07-09 Liviu Chircu * [eb018ad58] : mid_registrar: Simplify lookup() code 2020-07-09 Liviu Chircu * [96432213b] : mid_registrar: Fix uninitialized variable Fixes CID #211376 2020-07-09 Liviu Chircu * [70d2e8f10] : qrouting: Fix Coverity paranoid warning Even if the buffer can never be overflown here thanks to the CHAR(64) DB schema restriction, if the user were to change the DB schema by hand and extend the column to 65+ chars, it would crash OpenSIPS, so the warning makes some sense. Fixes CID #211387 2020-07-08 Liviu Chircu * [5df8b636a] : pua: Fix some list management bugs; Improve code * do not use strncmp() to compare "str" structs, since it may lead to false positives (e.g. strncmp("foobar", "foo", 3) == 0). Use str_match() or str_strcmp() instead. * do not read memory after pkg_free() (severity: low, since it's PKG memory, so reading "invalid" heap memory works anyway...) * simplify list_pop() and list_free() code 2020-07-08 Liviu Chircu * [6b56ca5fa] : db_text: Fix Coverity warning (bad 'switch' fallthrough) Thanks to Răzvan Crainea for the help! 2020-07-08 Liviu Chircu * [11560e35e] : Merge branch 'bugfix/db-default-url-inheritance' 2020-07-08 Liviu Chircu * [ff7b58497] : b2b entities/logic: Inherit `db_default_url` if possible If there is still no DB URL, simply start without DB support (just as before) 2020-07-08 Liviu Chircu * [990d18f79] : proto_smpp: Fix crash on startup 2020-07-08 Liviu Chircu * [24f9e7b29] : proto_smpp: Inherit DB URL from 'db_default_url' 2020-07-08 Liviu Chircu * [c8d442df6] : drouting: Improve confusing error logs 2020-07-08 Liviu Chircu * [efee34387] : dialplan: Allow re-pointing the default partition This is useful in situations where script writers do not intend to cache the default 'dialplan' table, rather only the named partitions. Example syntax: db_default_url = "mysql://opensips:opensipsrw@127.0.0.1/opensips" ... modparam("dialplan", "partition", " pstn: table_name = dialplan_pstn") modparam("dialplan", "partition", "default: pstn") 2020-07-08 Liviu Chircu * [89a618be1] : dispatcher docs: Update partition, db_url and table_name 2020-07-08 Liviu Chircu * [c7d668bad] : dispatcher: Integrate with 'db_default_url' * both 'db_url' and a partition DB URL will inherit their starting value from the 'db_default_url' global * add the option to point the default partition to a known one, in order to avoid unwanted loading of the default table. Example: modparam("dispatcher", "partition", "default: trunks") modparam("dispatcher", "partition", "trunks: db_url = ...") 2020-07-07 Liviu Chircu * [198687e17] : dispatcher: Add useful debug log 2020-07-07 Liviu Chircu * [cc2f4a8c4] : dispatcher: Fix a bug with the 'default' partition This commit allows the "default" partition to be populated just like the other ones: modparam("dispatcher", "partition", "default: db_url = mysql://opensips:opensipsrw@127.0.0.1/opensips_3_2; table_name = v1_dispatcher") 2020-07-07 Razvan Crainea * [ad472dc29] : dispatcher: add support for matching attributes in ds_is_in_list 2020-07-07 Bogdan-Andrei Iancu * [59ad9e7fd] : [dispatcher] expose attributes in local route when pinging 2020-07-07 Liviu Chircu * [180674b83] : permissions docs: Update partition, db_url and address_table 2020-07-07 Liviu Chircu * [6443ad582] : dialplan docs: Update partition, db_url and table_name 2020-07-07 Liviu Chircu * [2e8164368] : dialplan: Integrate with 'db_default_url' * DB partitions now inherit their DB URL (if not given explicitly) from 'db_url' -> 'db_default_url' * the above is similar for the 'table_name' property (inherit from the 'address_table' modparam) * rewrite the 'partitions' parser: no more coding style limitations * backwards-compatible: at least one partition must be specified (even through simply defining a global 'db_default_url') before the module can start Part of a series of patches for #2117 2020-07-07 Liviu Chircu * [657a8b53f] : dialplan MI 'dp_show_partition': Indicate client-side errors 2020-07-07 Liviu Chircu * [bb57cc1c3] : permissions: Integrate with 'db_default_url' * DB partitions now inherit their DB URL (if not given explicitly) from 'db_url' -> 'db_default_url' * the above is similar for the 'table_name' property (inherit from the 'address_table' modparam) * rewrite the 'partitions' parser: no more coding style limitations * backwards-compatible: the 'db_url' is still mandatory if you are not specifying a partition definition! This is due to the fact that the module has a non-DB based usage mode Part of a series of patches for #2117 2020-07-06 Liviu Chircu * [b4293384f] : MI JSON-RPC commands: Fix incorrect examples Many thanks to Adrian Fretwell for the report! 2020-07-06 Bogdan Andrei IANCU * [34433c1e5] : Merge pull request #2162 from lemenkov/rtpproxy_rtpengine_remove_unused rtpengine/rtpproxy: Remove unused defines (leftovers) 2020-07-05 OpenSIPS * [1c419431c] : Rebuild documentation 2020-07-02 Peter Lemenkov * [463e815cf] : rtpengine: Remove unused defines 2020-07-02 Peter Lemenkov * [681d9c41a] : rtpproxy: Remove unused defines 2020-07-02 Liviu Chircu * [8c017c2ba] : clusterer: Fix some startup corner-cases (crashes) The first extra check fixes a crash in 'db_mode = 0', if only 'neighbor_node_info' is given, so cl->current_node will be NULL. The second extra check prevents: (gdb) bt full 0 check_seed_flag (cl_list=) at node_info.c:307 1 load_db_info (dr_dbf=dr_dbf@entry=0x7f2e65996300 , db_hdl=, db_table=db_table@entry=0x7f2e65993370 , cl_list=) at node_info.c:485 2 mod_init () at clusterer_mod.c:408 Fixes #2086 (cherry picked from commit 0b609f03165ee80f525795f278128162f6418817) 2020-07-01 Liviu Chircu * [fd61a6224] : cluster sync logging: Fix incomplete "if" condition Reported by William Jin (cherry picked from commit 892c2ee4776b18e3345d0d7bfd8353dd33442487) 2020-06-30 Liviu Chircu * [dd45419d0] : check_time_rec(): Fix the timezone handling Do not adjust the UNIX timestamp to the timezone, rather keep it intact so the input times can be specified in local time, rather than UTC time. Also rewrite all bad tests (and add new ones) so the above requirements are met. 2020-06-30 Bogdan-Andrei Iancu * [61e07ad30] : Fixed potentially un-init dlg variable Thanks to Trevis for its report :) (cherry picked from commit 9de8dd193c1b948aff7d4cb6cff67a3816473ee6) 2020-06-30 Bogdan-Andrei Iancu * [7daa10d25] : Fixed uac_auth() on sequential requests in dialogs were uac_auth() was already used The fix solves the conflict between the changes over the cseq value coming from (1) dialog module, trying to increment the cseq to compensate the cseq change during INVITE auth and (2) the uac module incrementing the cseq again because of auth'ing a sequential request. The solution was to first indetify such case in uac_auth() and to use a larger delete lump (when replacing the cseq) in uac_auth(). Such a larger/wider delete lump will invalidate the lump added by the dialog module. This is a follow up on #1969 Credits to Ben Newlin for reporting and assisting with the testing (cherry picked from commit 994ab68ffccc28a8cb0cd03bc586570ad8bc5dba) 2020-06-29 Vlad Patrascu * [d60830f49] : cachedb_cassandra: fix unsupported protocol version errors This commit prevents the Cassandra driver with version >= 2.15 from throwing errors while trying to negociate the appropriate protocol version. Closes #2145 2020-06-29 Ovidiu Sas * [f4ba69bc6] : rtpproxy: improve error logs: print # iovec buffers along errno/strerror on writev failure 2020-06-29 Ovidiu Sas * [565e25ba9] : rtpproxy: fix writev error 22:Invalid argument - align code with rtpengine implementation for systems with no IOV_MAX defined 2020-06-29 Liviu Chircu * [84bea49d7] : mid_registrar: Be compatible with gcc 4.x ... it seems named initializers were not supported back then. This commit also makes the initialization more human-friendly by using the "10" value (UL_EXPIRED_TIME) instead of the opaque "0" value -- the end result is the same. Thanks to Nick Altmann and Răzvan Crainea for their help! 2020-06-27 OpenSIPS * [81fad7ccc] : Rebuild documentation 2020-06-27 Ovidiu Sas * [eda6ec3b6] : rtpengine: fix writev error 22:Invalid argument - this fix is based on a similar fix implemented in the rtpproxy module - if the # of iovec buffes is to high, concatenate last buffers and reduce the # of buffers 2020-06-27 Ovidiu Sas * [bd099afa3] : rtpengine: improve error logs: print # iovec buffers along errno/strerror on writev failure 2020-06-27 Ovidiu Sas * [b1bf482df] : rtpengine: use proper buffer iovec count when calling writev to send commands to rtpengine daemon - this went undetected for a long time probably because the last buffer had a zero iov_len ... 2020-06-27 Liviu Chircu * [05c1579cb] : Fixes #2138 - mid_reg_save() mid_registrar_save() not forwarding REGISTER in aor throttling mode after unregister when in write-back mode. (cherry picked from commit 6ee1664559e65fefb2f9cc5f59772b4997711ce0) 2020-06-26 Liviu Chircu * [765a84b29] : Code quality: Use str_match() instead of !str_strcmp() Reasons behind this change: - better performance: str_strcmp() includes lots of redundant checks and performs worse than the simplistic str_match() - safer code: although by making this change we increase the chance of a segfault (if either "a" or "b" strings are NULL), the crash will immediately indicate the coding bug and will be easy to troubleshoot. By the same argument, nobody complains that memset() or strcmp() include zero NULL checks: they don't have to! - more meaningful code: logically speaking, in most cases, the programmer simply intends to _match_ two strings, rather than to order them lexicographically... 2020-06-25 Liviu Chircu * [e05c80fef] : rr: Fix ordering issues with add_rr_param() and create_dialog() Commits bd1719dcf and c263182ee4d introduced regressions for record_route() and record_route_preset(), respectively, which caused add_rr_param() to not work anymore in the following sequence of function calls: create_dialog() with a "dlg_match_mode" != DID_NONE record_route() or record_route_preset() add_rr_param() # would not do anything, simply acting as a NOP The reason is that the "fake" lump chain which was meant to hold all add_rr_param() operations prior to an eventual record_route() call would no longer be masked after the record_route() and would continue to accumulate data from subsequent add_rr_param() calls. Since it was meant to be a "fake" chain from the beginning (maybe the user doesn't call record_route() at all!), the data would simply be lost. Many thanks to John Quick for the accurate report and instructions on how to reproduce the issue! (cherry picked from commit e3ca95ecd0b3f33b7f42f3a7eda4a6e686cb241d) 2020-06-25 Liviu Chircu * [63b2e06f6] : TLS: Refresh expired default certificates ... and also extend their lifetime from 1 year -> 10 years (cherry picked from commit 96517d4860e0a7d744f38ce496b92a5565c96574) 2020-06-24 Bogdan-Andrei Iancu * [749685c7a] : Fix test of recognizing SCTP as UDP-based protocol ...and allow per-socket/listener definition of number of workers/processes Closes #2125 2020-06-24 Liviu Chircu * [1f2c8c485] : dialog API: Clarify documentation for DLGCB_FAILED The DLGCB_FAILED callback is subject to the "200 OK" vs. "408 timeout" SIP race condition during dialog establishment and developers should use it with extra caution :) 2020-06-24 Bogdan-Andrei Iancu * [11d5f7b83] : Fix wrong type of lumps. As the eoh (Enf Of Header) is determined during the on-demand parsing, the add_lump() may wrongly lable a lump as "header" or "body" (as the add_lump() may be used before the parsing reached the EOH). So, better identify all headers asap, so the add_lump() will properly work all the time. This will not add any overhead, as in 99.9999% of the case, due the functions used in cfg, anyhow you end up parsing the whole message. Fixes #2144 This is a 100% safe fix, there are 0 chances for side effects. (cherry picked from commit 23e098f0ec465b376eccfee587ce2f648331ccbc) 2020-06-24 Bogdan-Andrei Iancu * [038717c35] : [core] Fix the access to the Q param append_branch() The qvalue holds the integer value directly into the int*. Also fixed the usage of append_branch(,"1.0") -> the Q param should be used. Closes #2151 2020-06-24 Liviu Chircu * [fcbe480f2] : acc: Remove redundant code 2020-06-23 Razvan Crainea * [a69e6ada6] : acc: fix no name tags in extra lists Before this commit, extra_fields that were having spaces after the last tag (such as: `last; ` would generate an extra field with no tag. This commit fixes this case. 2020-06-23 Bogdan-Andrei Iancu * [b2c37f74f] : Fix the building of RR param holding the dialog ID Closes #2148 2020-06-23 Razvan Crainea * [b4cd13273] : siprec: send BYE for sessions not established When a SIPREC session was started on a 183 reply, but the session was not stopped, a BYE to the SIPREC server should be sent to close the session. Thanks go to Krunal Patel for reporting this and offering the fix. Close #2136 2020-06-22 Liviu Chircu * [132600160] : dispatcher: Do not run timer routines after shutdown ... as the "partitions" list may be freed and zeroed, causing a crash. Related to #2114, see both backtraces there, in each of the timers. 2020-06-22 Liviu Chircu * [ae5d06ee0] : check_time_rec(): Fix more DAILY evaluation corner-cases Commit 96acc92f2bec wasn't entirely correct on the DAILY rule evaluation logic. This commit adds more tests and refines the implementation. 2020-06-22 Vlad Patrascu * [311042194] : rest_client: complete fix in commit f4227fa Related to #2115 2020-06-20 OpenSIPS * [22df4256f] : Rebuild documentation 2020-06-17 Vlad Patrascu * [f4227fa77] : rest_client: fix crash when loading module along with tls_mgm Closes #2115 2020-06-17 Razvan Crainea * [d105f2007] : cgrates: properly parse multiple jsons in buffer When CGRateS has issues multiple SessionSv1.GetActiveSessionIDs requests to OpenSIPS in parallel, some of them get merged in a single buffer - thus we need to treat this case by advancing the json buffer properly. Credits go to @vtzan for reporting this and for offering detailed explanations in ticket #2103. 2020-06-16 Razvan Crainea * [896be267d] : dialog: clarify usage scope of $DLG_dir Reported by @imdrpn in #2132 2020-06-16 Razvan Crainea * [84211d826] : drouting: fix mi commands examples when names are required Credits go to @kertor for reporting this Close #2141 2020-06-16 Razvan Crainea * [a41a859f4] : dialog: check advertised contract against peer's leg Full credits go to @dioris-moreno for reporting this and providing a fix in ticket #2108 2020-06-16 Razvan Crainea * [700bd7bd3] : rpm: fix crash at startup for RPM statistics Credits go to @samk-acw for reporting it Close #2122 2020-06-15 Razvan Crainea * [b150486a6] : proto_wss: proper cleanup wss connection in case of tls error When TLS domain is not found, or the SSL context cannot be created, make sure the connection does not keep an hanging `proto_data` that will be later double-freed by the cleanup routine. Credits go to Jonathan Hulme (@digipigeon) for reporting this. Close #2123 2020-06-15 Razvan Crainea * [3e862f0e3] : net/tcp: mark connections as being added in reactor This way we can "remember" to remove them from the reactor when the connection times out. Full credits go to @vitalikvoip for reporting, troubleshooting and fixing this problem. Close #2134 2020-06-15 Razvan Crainea * [bfd2bbe30] : callops: proper naming of the module 2020-06-15 Razvan Crainea * [78c3ef044] : modparam: allow both int and strings as parameters when function is used 2020-06-13 OpenSIPS * [817df752d] : Rebuild documentation 2020-06-13 Vlad Patrascu * [9f454463e] : cachedb_mongodb: complete fix in commit 298bf6b for openssl < 1.1.0 2020-06-12 Vlad Patrascu * [298bf6b31] : cachedb_mongodb: fix crashes when loading module along with tls_mgm Loading the cachedb_mongodb module causes the openssl library to be initialized in the pre-daemon process, by the mongoc library's constuctor, before tls_mgm gets the chance to do its own initialization in the attendant process. This commit overwrites the openssl functions used by the mongoc library in order to actually skip the initialization and leave it to tls_mgm. Related to #2091 (cherry picked from commit a3e87277f275d2b26a3f1472e78a07baea9de85c) 2020-06-12 Vlad Patrascu * [3cebeed77] : tls_mgm: fix a cleanup crash when failing to create a SSL_CTX (cherry picked from commit c6ac01258b61608b06ca400815e3b89302724107) 2020-06-11 Bogdan-Andrei Iancu * [1856155a6] : Fixed 3 x htons(), reducing to one :) 2020-06-11 Bogdan-Andrei Iancu * [98c397769] : Fix the src/dest info for the HEP "log" packages This fixes the way the logs are displayed in the call flow of Homer 2020-06-11 Razvan Crainea * [69223a7ec] : media_exhange: handle case where body does not exist 2020-06-11 Bogdan-Andrei Iancu * [7b36e441a] : Fixed the HEP type for the logs Credits go to @bibace Closes #2137 2020-06-11 Razvan Crainea * [e18613462] : callops: do not delete parameter if not inside R-URI 2020-06-10 Razvan Crainea * [a592d100e] : callops: always check for orig RURI when searching for param 2020-06-10 Razvan Crainea * [8cb9d0a55] : media_exchange: rework the way of generating on hold SDP 2020-06-10 Liviu Chircu * [a031a778c] : check_time_rec(): Implement MONTHLY and YEARLY rules 2020-06-10 Liviu Chircu * [96acc92f2] : check_time_rec(): Fix DAILY rules; Implement WEEKLY rules Both DAILY and WEEKLY rules now also correctly implement overlapping intervals, e.g.: 20200610T230000|20200611T070000||DAILY 2020-06-09 Liviu Chircu * [63eda69b7] : check_time_rec(): Add timezone support 2020-06-09 Bogdan-Andrei Iancu * [b0a63d96c] : Fix crash in tracing xlogs from routes without SIP msg 2020-06-05 Liviu Chircu * [128c54567] : Module dependencies: Improve debug log text Suggested by Mark Farmer 2020-06-05 Rustam Safargalin * [1cc5d62bc] : Add support for Generic Number parameter 2020-06-02 Bogdan-Andrei Iancu * [bf2023eb6] : Fixed missing column in cc_agents table defintion Credits go to @Shkiperon Closes #2130 Closes #2127 2020-05-30 OpenSIPS * [7a5080774] : Rebuild documentation 2020-05-30 Liviu Chircu * [3e83412d5] : db_perlvdb: Fix incorrect integer downcast Credits to Aaron Meriwether for spotting the bug and suggesting the fix Fixes #1952 2020-05-29 Liviu Chircu * [cd8d77143] : [mid-]registrar: Add high-level docs for the SIP PN Support 2020-05-29 Vlad Patrascu * [b3c141834] : Makefile.defs: increase version to 3.2 2020-05-27 Liviu Chircu * [20b880b56] : DB schema: Update copyright years 2020-05-27 Razvan Crainea * [ef951af14] : Add ChangeLog for 3.1 2020-05-27 Razvan Crainea * [b9e959bc6] : Modify beta tag