=========================== Release 3.1.17 ============================== 2023-08-31 Liviu Chircu * [77dc39b93] : siprec: Fix invalid READ operation on freed memory Also tidy up the cleanup phase Thanks to Rob Moore, Daniel Bryars and Steven Ayre from Dubber for reporting it and providing valuable information for troubleshooting! (cherry picked from commit 9996f9fd13adfae5e4cbbad9de5265e43b5a75b3) 2023-08-19 OpenSIPS * [ff0d20026] : Rebuild documentation 2023-08-16 Razvan Crainea * [d82e12d2a] : db_sqlite: fix possible crash when the values is relocated When the query does not manage to count the rows in a first shot, the values buffer might be reallocated, which can result in a relocation of the buffer - if that's the case, we should repoint all the old values to the new location, otherwise they will point to an invalid value. Many thanks to Rob Moore and Steven Ayre from Dubber for reporting and helping us testing and troubleshooting this corner case. (cherry picked from commit 45aa9a947c6306f5723132f9c38903988be6cf8b) 2023-08-16 Razvan Crainea * [5be3de51e] : db_perlvdb: fix valdata inline Thanks go to @varghesepaul for reporting it Close #3152 (cherry picked from commit 8b2ac92794d1fe2d2e5a2cc6f1b08396a0322407) 2023-08-16 Razvan Crainea * [d83c2f971] : rtpproxy/rtpengine: document socket type if protocol is missing Close #3154 (cherry picked from commit 90018c21a1a4a80afb46f83c4f31ba236b85527a) 2023-08-09 Razvan Crainea * [024d2ea95] : ipc: initialize job structure before dispatching it (cherry picked from commit 243e0e3abe5bbea5ee1384a0964e7c2af7cbe587) 2023-08-05 OpenSIPS * [217d98bb1] : Rebuild documentation 2023-08-05 Razvan Crainea * [18642e26b] : dialog: fix warning without proper variables provided (cherry picked from commit 11f613622b74b148f59b2073ff06e234372007b5) 2023-08-05 Razvan Crainea * [5010dd66c] : dialog: complete cseq maps implementation Do not limit the number of maps, update existing in case the same cseq is incremented multiple times (due to authentication), optimize the number of maps and remove them when the transction is deleted. Complete and close #1071 (cherry picked from commit a76af3f49ccc8bf62fbdbf29d240e652e86050c8) 2023-08-05 Ovidiu Sas * [e21591331] : dialog/uac: fix in-dialog authentication - closes #3041 (cherry picked from commit 155995b2bae4e4947c07c4df1cb0901da4a72a82) 2023-08-05 Razvan Crainea * [1b95a1454] : dialog: keep a mapping between INVITE&ACK This prevents concurrency bugs that would generate an ACK with a higher CSeq than the INVITE. Addresses #1071 (cherry picked from commit 80ff319d5f9f688369df689418a1d06a4945fbb4) 2023-07-29 OpenSIPS * [3a8a028d8] : Rebuild documentation 2023-07-26 Razvan Crainea * [69f0358c1] : b2b_entities: make sure we don't "leak" transaction when canceling it (cherry picked from commit 0a0a0d65a8732231c41f0519dbd737072433e42b) 2023-07-26 Razvan Crainea * [ff17335f2] : tm: add set_t in API (cherry picked from commit 5339179b011f20b002429649fc30fe95ff26e7d7) 2023-07-24 Bogdan-Andrei Iancu * [0023efad5] : [tm] avoid incoming request matching against UAC transactions (cherry picked from commit e6c733595eeeaa74fec18a5911fc45592f45e737) 2023-07-08 OpenSIPS * [5c57d33b7] : Rebuild documentation 2023-07-08 OpenSIPS * [fb622a74b] : Rebuild documentation 2023-07-06 Razvan Crainea * [c5d07147a] : tm: proper cleanup for anycast CANCEL transactions Thanks go to Rizwan Syed and Jonathan Hulme from ConnexCS for reporting, providing testing environment and support the troubleshooting and fix! Close #3111 (cherry picked from commit 24ec4ebd901c18feba418b7c995faa9778357fc7) 2023-07-04 Vlad Patrascu * [f237db317] : clusterer: fix deadlock when receiving clusterer_reload via cluster Running cluster_send_mi or cluster_broadcast_mi with clusterer_reload as the command to dispatch would cause a deadlock on the receiving nodes. (cherry picked from commit aa8e5ff0a020c1569880fe51a4af54cb9866cded) 2023-07-04 Bogdan-Andrei Iancu * [e2a637273] : Small code beautification Related to 1d83a0c (cherry picked from commit e455d009436b8ac5f3c879c410d0901a77769820) 2023-07-04 Bogdan-Andrei Iancu * [83bda7b03] : Merge branch 'warning_delay_timer' (cherry picked from commit daaef52c1375d05e66318d2ae375a304d15f15f4) 2023-07-04 Bogdan-Andrei Iancu * [60cc5528d] : [tracer] properly do per-request traceing in local route As in local route we have only outbound (callee) leg, we cannot the typical incoming request tracing here. We need to "fake" it a bit to look as an outbound tracing. Funny enough, this problem poped only when doing per-request/message tracing in local route; otherwise the per-transaction tracing was doing the correct job. Credits for reporting go to @ovidiusas Closes #3066 (cherry picked from commit 9eb13bf2ca6d8dae84fc84c4c2c113217d36aea5) 2023-07-04 Bogdan-Andrei Iancu * [1de7784f3] : [ratelimit] Fix accuracy on the ratelimit timer The computation perform by the ratelimit module is very time sensitive - any deviation of the interval between the runs of the timer handler may lead to false positive detection of CPS thresholds. So, let's move the timer handler from regular timer (1s sensitivity) to utimer (100ms sensitivity) -> 10 times more accurate. Still, the number of triggerings is the same, only the precision is 10 times better. Credits go to @ovidiusas Closes #2797 (cherry picked from commit 03788691a145bd1597ab6c5ec43544718143aad3) 2023-07-04 Bogdan-Andrei Iancu * [944daa9a0] : Fix advertising IPv6 IP addresses Enclose the IPv6 advertised address when using it as string Fixes #2774 (cherry picked from commit 4c16207a5be0bdb12a303e4c932b8bc3345a24f2) 2023-07-01 Maksym Sobolyev * [94f350e69] : Remove packages that are auto-installed by GitHub and create a version conflict later when we install our version. This is the reason the build were failing in the past few days. 2023-07-01 Maksym Sobolyev * [0e0589160] : Move list of required packages into plain text file and GC .travis.yml which "serves no purpose anymore". 2023-06-30 Vlad Patrascu * [889d98963] : b2b_entities: fix crashes due to races when deleting entity An entity might have been deleted and freed while the lock has been released when running the entity storage callbacks. Related to #3110 (cherry picked from commit 22bd8184e6c1cbd52ce3be79fbe0c52306226f37) 2023-06-27 Bogdan-Andrei Iancu * [fe598e901] : Fix computing the size to clone for a body part Take the optional header len into account also when cloning a body part struct. This particular bug occured when using add_body_part() with extra hdr parameter in conjunction with an async() operation (or failure route) Credits for reporting and helping with repoducing this go to @thuroc Fixes #3067 (cherry picked from commit a042588e322c5acf997313773cbc5ff6e007c956) 2023-06-27 Bogdan-Andrei Iancu * [b8e0d4672] : [dialog] fix dropping empty string dlg vals Upon DB recovery (after an OpenSIPS restart) do not drop emtpy string dlg vals - as we do allow creation of such vals via cfg and api and have them saved to DB, it makes all the sense to also restore them This triggers some startup warnings when using in-dialog re-INVITE probing. Closes #3108 (cherry picked from commit e24668131bcd828214c4fb9bccb208e9483a2a4e) (cherry picked from commit dfb9b4f8a5846d55302563bacfbd988d000d8a3d) 2023-06-24 OpenSIPS * [0238146f6] : Rebuild documentation 2023-06-23 Vlad Patrascu * [15732b3c8] : Also register a custom event from subscribe_event() fixup This will permit raising an event from MI with an event subscribtion done in startup_route without the need to define an event_route for this event or using a raise() in the script. (cherry picked from commit f69b150c8090adb86f2fcaadd56873f61cdb7097) 2023-06-22 Vlad Patrascu * [a4ae802d0] : lua: fix duplicate logs to syslog (cherry picked from commit 949422a938ed12c5b5a820dc4af6de1c437b3798) 2023-06-22 Vlad Patrascu * [f11b07656] : lua: don't register functions under a name This fixes issues with running the "opensips" table functions on Lua library version 5.1. This essentially reverts commit ab964d9. (cherry picked from commit 5e4d10cff40fed34cc419d81d5791b207cfb6a96) 2023-06-22 Bogdan-Andrei Iancu * [61efcca16] : Fix reload of timer routes Use a separate, dynamic list of timer tasks that can be update by other proc than the timer itself (which has no info on the script). The proc doing the reload, upon success, re-generates the list of timer tasks corresponding to the new set of timer routes. NOTE: a more complex logic is needed when purging the old set of timer tasks, as they may still be under execution - we use here a pending list where we wait their completion. (cherry picked from commit fce0eaeb241866d0c42db41160ed454be59fd7ed) (cherry picked from commit 0950670879d586439448c4e62be7c065c724cde0) =========================== Release 3.1.16 ============================== 2023-06-21 Liviu Chircu * [e8c0da5d1] : F_MALLOC: Optimize the free() operation Commit bdaaf60b2c introduced a side-effect of gradually moving the fragment "action" towards the exponential, non-optimized hash table buckets (i.e. buckets 2049 ... 2100). Here, the fragments were inserted in a sorted fashion, with the sorted-insert algorithm costing a O(N) iteration on each free operation instead of a simple O(1). Consequently, the user experience of this effect is that "dr_reload" operations were stalling for 12 minutes (coming up from 24 seconds!), when working with large rule sets (millions of rules). Interestingly enough, the stalling was not due to the caching phase -- malloc() -- rather due to the cleanup phase, when clearing the old rules -- free()! To address this issue: * we drop the sorted insertion completely for buckets 2049 ... 2100, and simply do a list prepend operation: O(1), as with the others * we make all allocation requests from these buckets return the next bucket (!!), thus guarantee'ing our requested fragment. Examples: malloc(18K) -> now you always get a 32K+ frag, but instantly! malloc(37K) -> now you always get a 64K+ frag, but instantly! * this does not make F_MALLOC more wasteful, since the extra frag space gets split anyway into a new fragment, with the two eventually coalescing together again thanks to commit bdaaf60b2c (cherry picked from commit e6b4de51298eb78aef097cbfd1c34ada17b9b78f) 2023-06-21 Vlad Patrascu * [7c7c4fb0b] : lua: fix opensips lua API docs (cherry picked from commit a53ba3d0d696ef56684a03b7bbf4a4e8474c3e33) 2023-06-19 Bogdan-Andrei Iancu * [c64766a85] : [uac_registrant] fix passing wrong context to authenticated REGISTER When sending the authenticating REGISTER, be sure a new context is provided. This will avoid the usage of the context belonging to the first (challenged) REGISTER. This mixup of the context was breaking the tracing of these REGISTER requests via local route. 2023-06-10 OpenSIPS * [324fbde1c] : Rebuild documentation 2023-06-09 Răzvan Crainea * [d4763f9a3] : Merge pull request #3104 from purecloudlabs/hotfix/sipmsgops-allowed-routes sipmsgops: fix allowed routes for exported functions (cherry picked from commit 14e1eab55b67992e4493602248628777d7d6d9a9) 2023-06-03 OpenSIPS * [3077cb965] : Rebuild documentation 2023-06-02 Razvan Crainea * [c5a7ab77d] : topology_hiding: properly quote contact hdr params Thanks go to @manojmth for reporting this on GitHub Close #3090 (cherry picked from commit e767b87123191b9f44db004e3a33b25982724672) (cherry picked from commit 881fdeff1a03a477a93f1b75769e295bdd109a16) 2023-05-31 Razvan Crainea * [2f9b6282f] : tls: remove from map when destroying This prevents a crash that was generated at runtime due to the fact that although the domain was destroyed, it was still referenced in the map 2023-05-20 OpenSIPS * [c71411572] : Rebuild documentation 2023-05-17 Bogdan-Andrei Iancu * [18504bc5a] : Merge remote-tracking branch 'origin/regex_max_groups_segfault' (cherry picked from commit e09eb58ac63c63da7e00c918de0e132649f01b6a) 2023-05-07 OpenSIPS * [e012e8288] : Rebuild documentation 2023-05-05 Bogdan-Andrei Iancu * [04ea077f4] : [call_center] fix skill overflow on refreshing agents via MI Completes 6617ecc805520961642c16ac1e6c5a49787af2ab (cherry picked from commit d4db20087ce162e9ea5cb6c4662c2f4c1ac4d31f) 2023-05-04 Bogdan-Andrei Iancu * [279b2114a] : [call_center] fix overflowing the per-agent array of skills As the array of skills is pre-allocated inside the agent struct, be sure you do not overflow it when populating the agent's skills (from DB). Also, the logstate/logged_in value for an agent is read from DB or MI and it must be forced to 0/1 values, as it is later used as index. Yet another overflow fixed here. (cherry picked from commit 6617ecc805520961642c16ac1e6c5a49787af2ab) (cherry picked from commit d38c9dfe3dfc4354a9049edf6e6e96b2ed07b2b6) 2023-05-03 Bogdan-Andrei Iancu * [10d53b312] : [acc] removed old workaround multiple int2str() in acc_extra Since 2.3 we actually do not need this, as each acc_extra is individually set into its own buffer. Related to 6c0b37f907d30749266e2deca3c9ccc475dd32e4 (cherry picked from commit 54b03a17276439a24a81d7f55e6d43c92f22637e) 2023-05-03 Bogdan-Andrei Iancu * [a2686d1e6] : [acc] workaround for compiling issue Related to 0ff82562bd74a177184b1e179c3a607446c47b78 We need to review this logic (of static_detector) as it looks to be broken as it is now. (cherry picked from commit 6c0b37f907d30749266e2deca3c9ccc475dd32e4) 2023-05-03 Bogdan-Andrei Iancu * [2efff58d3] : Fix logging multiple IPs in the same time Use a multiple static rotating buffers for convering the IPs to str, so that we can print multiple IPs in the same time. Closes #3062 Reported by @jes (cherry picked from commit 0ff82562bd74a177184b1e179c3a607446c47b78) 2023-04-26 Vlad Pătrașcu * [c88b87589] : Merge pull request #3065 from Ellipsis753/patch-1 Fix buffer overflow in b2b_logic (cherry picked from commit cdb5d49865d6e1c70f330b6519ff8c500bfcef8e) 2023-04-26 Razvan Crainea * [aaaa19c24] : uac: specify in-dialog auth without dialog limitations in docs (cherry picked from commit c44566adb7b3d63bc3340fed66cac7d3a821d26d) =========================== Release 3.1.15 ============================== 2023-04-19 Liviu Chircu * [74237cb88] : F_MALLOC: Add LHS coalescing on free() operations This is a continuation/rework of commit fb9a3777, which intended to address the de-fragmentation issues where performance would drop. Unfortunately, there were still memory allocation / releasing patterns which still lead to heavy fragmentation. For example, an MI "dlg_list" command, which allocates fragments from Left -> Right as the dialog list is walked: Chunk-1 Chunk-2 Chunk-3 ... Chunk-N After building the MI output, the chunks were also freed Left -> Right. Due to the former allocator logic of RHS-only coalescing, the coalescing would never happen! In some cases, this could lead to fragmentation of an indefinite amount of memory, given enough time (e.g., even 8 GB PKG). This patch adds LHS coalescing to F_MALLOC, such that when "Chunk-2" is freed, in the above example, the allocator tries to merge it with both "Chunk-1" and "Chunk-3" before exiting the free() function (depending on the state of chunks 1 and 3, this could mean 0, 1 or 2 coalescings). This F_MALLOC patch was stress-tested using the mem/test/ testing suite. Many thanks to @fedkis and @ankogan for helping troubleshoot the issue and also test the current version of this patch! Fixes #2726 (cherry picked from commit bdaaf60b2c42681da70f095468c2df1b8dfa8c3e) 2023-04-19 Bogdan-Andrei Iancu * [1bef00985] : [acc] fix leaking of AAA request for CDRs Closes #3019 Credits go to @medeanwz (cherry picked from commit 8be536447664c34548df7b5ab154d45c19a1c126) 2023-04-18 Razvan Crainea * [f134f18ba] : tm: proper matching of transaction for auto-CANCEL handling (cherry picked from commit c8458a3c166679ef56c6af2017256216d3d4ad8b) 2023-04-18 Bogdan-Andrei Iancu * [f366511c4] : [callops] Fix bad MI array termination Closes #3057 (cherry picked from commit 2d6dbf7ecbb9f1ad14ff68b15aa650a497b04c9b) 2023-03-31 Razvan Crainea * [f0aeb3a75] : b2b_entities: fix cherry-pick merge in previous commit (part 2) 2023-03-31 Razvan Crainea * [3e76bd436] : b2b_entities: fix cherry-pick merge in previous commit (cherry picked from commit 789893166e2bf1020f23eaf29d01fde2ab4224d6) 2023-03-31 Razvan Crainea * [537243aa2] : b2b_entities: match e2e ACK according to dlg, not transaction This change presumes that uas_tran is no longer reset on 200 OK, but kept in memory until the ACK comes in. (cherry picked from commit 11f685ffae7f651004d349ada32579f260fa63ca) 2023-03-31 Razvan Crainea * [20bc99022] : tm: expose t_release_transaction in API (cherry picked from commit 66bc6fd8f3e82f02919e27a8d728c09b0aa3615e) 2023-03-23 Maksym Sobolyev * [08a489ee6] : Enable GH Actions. 2023-03-23 Maksym Sobolyev * [33377365d] : clang-15 fix: make child_init() prototype match actual function. 2023-03-23 Maksym Sobolyev * [7f59fbed8] : clang15 fix: define function prototype properly. 2023-03-23 Maksym Sobolyev * [88031b0d2] : clang 15 fix: get rid of variable that is set but not used. 2023-03-23 Maksym Sobolyev * [567ebaf1d] : Fix prototype for lcache_htable_destroy() to match implementation. 2023-03-23 Maksym Sobolyev * [ad4767c34] : Fix build with clang 15: get rid of the 30-year old PROTO_LIST hack to deal with some prehistoric compilers. Switch public API to use char *, not unsigned char *, which is kinda pointless. Also make arguments const where appropriate. 2023-03-23 Maksym Sobolyev * [9edb5e8ba] : GC unused variable. 2023-03-23 Razvan Crainea * [33f4ae5f2] : uac_auth: fix gcc uninitialized warning 2023-03-23 Maksym Sobolyev * [06ab1d88f] : Add missing {} as reported by the gcc-11. 2023-03-23 Maksym Sobolyev * [11164c3af] : Make geoip2_get_field() function declaration match prototype. 2023-03-23 Maksym Sobolyev * [de4432ab7] : Move the same openssl make-foo code that has been copied and pasted around into a central location and include it from there. 2023-03-23 Maksym Sobolyev * [242239659] : Don't pass unsigned short * into a function that expects unsigned int *. This fixes the following error building with gcc on ubuntu-22: sipmemcache.c: In function `l_sipmemcache_server_add`: ../../ut.h:685:13: error: array subscript `unsigned int[0]` is partly outside array bounds of `in_port_t[1]` {aka `short unsigned int[1]`} [-Werror=array-bounds] 685 | *_r = 0; | ~~~~^~~ sipmemcache.c:72:13: note: while referencing `iport` 72 | in_port_t iport = 0; | ^~~~~ 2023-03-23 Maksym Sobolyev * [6389c3602] : Remove comparison that is always "true". Reported by: gcc-12 2023-03-23 Razvan Crainea * [4537c208c] : freeswitch: fix string maipulation warnings in esl (cherry picked from commit 7bc88e2d029e664149609b093bba3d9bc76fce79) 2023-03-23 Maksym Sobolyev * [1ead9e9a5] : Filter out -ffat-lto-objects option not supported on clang. 2023-03-23 Razvan Crainea * [1338cd2d4] : python: remove deprecated PyEval_InitThreads call since python v3.7 2023-03-23 Maksym Sobolyev * [51d176aca] : GC unused variable. 2023-03-23 Maksym Sobolyev * [c15fe1e45] : Remove bogus __attribute__((unused)), make sure grp_idx is always initialized. 2023-03-23 Razvan Crainea * [42160008c] : tracer: replace un-necessary strncpy with memcpy 2023-03-23 Maksym Sobolyev * [1f70da1b2] : Make identation match compiler behaviour. This fixes build with gcc-11. 2023-03-23 Liviu Chircu * [9998a33f0] : 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); | ^~~~~~~~~~ 2023-03-23 Maksym Sobolyev * [4d81a402a] : Fix warning converting from int to float with Clang 10, i.e: resolve.c:1454:34: error: implicit conversion from 'int' to 'float' changes value from 2147483647 to 2147483648 [-Werror,-Wimplicit-int-float-conversion] 2023-03-23 Maksym Sobolyev * [e4238cf08] : Fix Clang 9 warning: http_fnc.c:679:22: error: adding 'int' to a string does not append to the string 2023-03-23 Ovidiu Sas * [815e5d512] : cachedb_sql: fix warning: this `if` clause does not guard... [-Wmisleading-indentation] msilo: fix warning: this `else` clause does not guard... [-Wmisleading-indentation] 2023-03-23 Maksym Sobolyev * [37164f502] : Fix logical condition that would otherwise always be "false". Reported by: gcc-12 2023-03-23 Maksym Sobolyev * [b1dc064a0] : Make b2bl_bridge_extern() and internal_init_scenario() implementationis match prototype. 2023-03-23 Maksym Sobolyev * [0cd6fa09e] : o Set -Wno-compound-token-split-by-macro needed to get things building up with clang > 11. o Unify common code in the perl modules to fix db_perlvdb as well with clang > 11. 2023-03-23 Maksym Sobolyev * [cf5bf6f7c] : Cast void * to int first before we can it to enum. This is to fix the build on clang-11. 2023-03-23 Maksym Sobolyev * [05a52ed35] : GC variables that is set but never used. This breaks builds with latest clang. 2023-03-23 Maksym Sobolyev * [66ff76c3e] : Fix logic error picked up by Cang 10: b2b_logic.c:1789:14: error: overlapping comparisons always evaluate to false [-Werror,-Wtautological-overlap-compare] 2023-03-23 Razvan Crainea * [9c6ddf097] : nathelper: prevent memory overwritten during pinging 2023-03-23 Razvan Crainea * [efd0d365c] : ldap: prevent possible buffer overflow Fixes Coverity CID #40879 2023-03-23 Razvan Crainea * [1bf7abf61] : ldap: fix copying value in smaller buffers 2023-03-23 Maksym Sobolyev * [9921c38d8] : Fix unitialized use in some case: dlg_replication.c:157:2: error: variable 'd_entry' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] DLG_BIN_POP(int, packet, state, pre_linking_error); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ dlg_replication.c:74:7: note: expanded from macro 'DLG_BIN_POP' if (bin_pop_ ## _type(_p, (str *)&_field) != 0) { \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :69:1: note: expanded from here bin_pop_int ^ dlg_replication.c:351:22: note: uninitialized use occurs here dlg_unlock(d_table, d_entry); 2023-03-23 Liviu Chircu * [74142030b] : ldap: Fix possible buffer overflow If gcc says "2050 chars can overflow a 2049 buffer", gcc is definitely not wrong... 2023-03-23 Maksym Sobolyev * [df0ca08f8] : 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] 2023-03-23 Maksym Sobolyev * [4097ca527] : Set POLLRDHUP on Linux when polling rtpproxy's socket to drain any unclaimed data. This seems to be necessary on TCP sockets otherwise poll() appears to hang indefinitely if rtpproxy has been terminated despite timeout being set to 0 (i.e. don't block). With this flag set the disconnect is properly detected and socket is re-connected after configured timeout. 2023-03-23 Maksym Sobolyev * [9f6b7fcd1] : Fix skip_name() to not generate strings with bogus length. Discovered by OSS-Fuzz. 2023-03-23 Maksym Sobolyev * [9e99320b0] : Fix a pkg memory leak: when parsing of the Contact fails, free all associated parameters that have been parsed so far, not just the contact structure itself. Reported by OSS-Fuzz. 2023-03-23 Maksym Sobolyev * [042ca31fd] : Expect that protos[proto].name can be NULL. 2023-03-23 Maksym Sobolyev * [c69513f78] : Fix off-by-one error allocating space for protos[]. Reported by OSS-Fuzz. 2023-03-23 Bogdan Andrei IANCU * [371dd7d6a] : Merge pull request #3038 from okhowang/tracer-leak tracer: Don't modify shm msg in trace_onreply_out (cherry picked from commit 9c2d99de6c40c53dc1419fe237b23d8b956bd647) 2023-03-23 Bogdan Andrei IANCU * [2d674b026] : Merge pull request #3012 from purecloudlabs/bug/rport_param_corrupts_via_header add_local_rport script function corrupts VIA header params (cherry picked from commit 8f41fccfa19a0a8070b48b4cd8caeb0a4a78e3fd) 2023-03-22 Bogdan-Andrei Iancu * [faa484618] : [dialog] fix bad examples with invalid profile name The name of a dialog profile is an alphanumerical string. Make this clear in the doc and also fix the broken examples. (cherry picked from commit a6ef1968887696da8932a8350e532af8f7f9be44) 2023-03-18 OpenSIPS * [e7f0bca42] : Rebuild documentation 2023-03-17 Bogdan-Andrei Iancu * [0accad485] : [async] fix setting restoring type route after running report route for launch() Fixes #3034 (cherry picked from commit c0af4fe6a4cd3c1119d765320f8a1b2e5d4dc9b5) (cherry picked from commit 444f0264f5608c0a496fcc01a52ff4592328cda9) 2023-03-16 Bogdan Andrei IANCU * [48530dbd4] : Merge pull request #3020 from nexbridge/temp Fix bug in weight-based sort (cherry picked from commit 48c051fc16f4d83bf176d1eefe1df642882b6b88) 2023-03-14 Razvan Crainea * [c7bfcc201] : event_route: fix crash when raising with no params When raising an event using `raise_event` with AVP values that are not correctly populated, it triggers a corner case in the event_route module: the module "serializes" the parameters just after the event, hence, if there is no expanded parameter, the first parameter ends up pointing to a bogus value, resulting in a crash. This commit fixes this corner case by treating it (0 expanded parameters) just as if there no parameters passed at all. Many thanks to David Escartin from Sonoc for the help in troubleshooting this issue! (cherry picked from commit 7f845994b1ba43f8ffc0c0bdc6c9b8065a935955) 2023-03-11 OpenSIPS * [43e5dfb2c] : Rebuild documentation 2023-03-10 Bogdan-Andrei Iancu * [aaba23571] : Fix race in TCP Main <> TCP Worker communication As a TCP worker has 2 comm channels (one TCP worker specific and one worker generic) to TCP Main, be sure we have a consistent communication (over the 2 channels) between the TCP worker and TCP main. The actual fixed race: the TCP workers creates a new TCP conn (and sends this event as TCP worker to Main) and when trying to write to the conn it fails (and sends back a bad-conn event to Main, but as generic worker) - the 2 events are delivered via different comm channels, so their order may be lost, reasulting to bogus behavior (cherry picked from commit bfb62212ea4b4895b3174653b11d33e7ecb92751) (cherry picked from commit b1f580e4184562ce943ce428660becd1e48238b8) 2023-03-08 Vlad Patrascu * [fd8bc5b00] : clusterer docs: fix module parameter name (cherry picked from commit 3b577388089f405dc633bfc3184ce0fcab3f21a5) 2023-03-07 Maksym Sobolyev * [a289e491a] : Fix what seems to be a typo, calling sockaddru_len() on unitialized local structure is likely to produce bogus result causing getsockname() to fail silently and produce no useable address. This error has been masked on Linux, since Linux has no sa_len structure and the sockaddru_len() in that case defaults to sizeof(struct sockaddr_in) unless local_su happens to have s.sa_family==AF_INET6. This however means that IPv6 has been somewhat broken for TCP & TLS. 2023-03-07 Razvan Crainea * [91592bba7] : avpops: document the returned value in case of NULL Due to the fact that an AVP cannot contain `NULL` values, we cannot store `NULL` database values in AVPs. Hence, we store the `` value This commit simply documents the behavior, as reported in #3027 (cherry picked from commit fc35f7308efd6d2623e36adf048911be86b7b749) 2023-03-06 Liviu Chircu * [8342f35b8] : rest_client: Improve async() handling in "delayed 200 OK" scenarios In case the 200 OK reply or its body take several seconds to arrive, do not break the loop prematurely due to a 500ms hardcoded loop timeout and re-use the configurable "curl_timeout" modparam as loop timeout instead. (cherry picked from commit 532d8e83726f96f8e8d2c493a1e7cb0f54615869) 2023-03-04 OpenSIPS * [163a6a8f4] : Rebuild documentation 2023-02-28 Razvan Crainea * [935725b0f] : media_exchange: properly handle internally generated timeouts (cherry picked from commit de5347c29071bbb91e3c1509333c6e8cc9e981e4) 2023-02-25 OpenSIPS * [7d11f8b21] : Rebuild documentation =========================== Release 3.1.14 ============================== 2023-02-21 Vlad Patrascu * [6316c518e] : b2b_entities: remove no-op and improve code clarity Related to #3011 (cherry picked from commit 4b3ff72b7fd76afb884fdd6488802d1ffe2bc4fa) 2023-02-21 Ovidiu Sas * [91d17a151] : b2b_entities: don't try to get the lock if the l;ock was alredy taken - closes #3011 - this part of the code should be reviewed and cleaned up or clarity (cherry picked from commit a7eb936241b6187a94416aae4f05314cecd915cd) 2023-02-21 Razvan Crainea * [acb687706] : b2b_entities: avoid deadlock for certain scenarios When a call was terminted with a BYE from the handler of the 200 OK reply, the entities lock would remain locked, generating a deadlock. This commit fixes this (and possible other) situations by generically keeping a track when the lock is taken and unlock it before exiting. Thanks to Vlad Patrascu for helping with debugging and solution for this (cherry picked from commit 87661e1f14f9be6d957cd25c9f7dbe58d6ce0c82) 2023-02-20 Liviu Chircu * [e0b458507] : xlog_level: Do not abort startup on a negative value (cherry picked from commit 16472ab84d4f35f408bde121e033e9664d992124) 2023-02-20 Liviu Chircu * [ff8c429ba] : usrloc: Remove bogus "unsused" parameter to MI 'ul_add'; Improve docs (cherry picked from commit 227f2c82d9f2d43f632e9a865f54fd8b0605659c) (cherry picked from commit af4d6a0365e7ce14ea5100bb880b1dff01257765) 2023-02-11 OpenSIPS * [267d31729] : Rebuild documentation 2023-02-08 Liviu Chircu * [a0824c278] : parse_content_length(): Fix out-of-bounds read edge-case (OSS-Fuzz) This patch fixes several off-by-one read overflows while parsing a bad Content-Length header. Similar to a008e7c23, the error was mostly harmless, as the supplied buffer is typically much larger in the runtime usage of parse_msg(). Severity: Low Fixes OSS-Fuzz#53397 (cherry picked from commit e060fe93429b6da665a4d4210a49876b43223a17) 2023-02-08 Liviu Chircu * [96884f333] : struct hist: Also record the history for "NULL" objects While the history of a "NULL" object isn't much of a rich/useful piece of information, allowing it may help prevent errors in some cases, due to "sh_push()" returning an unexpected NULL value => crash. (cherry picked from commit cad9bd0b6c210f303f42d6687643b3c0e48aa87c) 2023-02-07 Liviu Chircu * [99655104d] : Fix ARM-32 compile warning (cherry picked from commit ecd5676867443f63c6d568281807cf71dae40c61) 2023-02-07 Liviu Chircu * [0b4f4a5ba] : parse_content_length(): Fix out-of-bounds read edge-case (OSS-Fuzz) This patch fixes a possible off-by-one read overflow while parsing a bad Content-Length header. The error was mostly harmless, as the supplied buffer is typically much larger and is stored in PKG memory. Severity: Low Fixes OSS-Fuzz#53199 (cherry picked from commit a008e7c2385bcd83de2f9ab155ed8a9452bf3c5c) 2023-02-07 Bogdan-Andrei Iancu * [7c2eadb46] : Avoid publishing pkg and load stats for procs with no IPC If IPC is not supported by a process, the pkg stats cannot be collected from it. Also such process is not able to compute internal load. (cherry picked from commit cd191d4b2ce9ab65764c14031b1faa5ae7272df3) 2023-02-06 Ryan Bullock * [00ca2882f] : Use msg_flags instead of script level flags. Prevents unintentional collision with script flags which could cause calls to mc_compact and mc_compress to fail. (cherry picked from commit 0cfb7c3b4dcb71fe26ed788bc7c94c56476b720d) 2023-02-04 OpenSIPS * [37a0fda57] : Rebuild documentation 2023-02-02 Bogdan-Andrei Iancu * [658a2dd8c] : [tcp layer] avoid locking and events while shutdown Upon shutdown, when all the TCP conns are destroyed, do not use any locking (we are in single process mode any how) and do not raise any disconnect events (false events here) (cherry picked from commit f953b30c42f84f5709bbc125ddf016d499f55485) (cherry picked from commit e13fa97b456b37ad818c1e5c8af1194c2ec36b64) 2023-02-02 Razvan Crainea * [f61b76b1d] : lua: proper include for timegm Thanks go to Jonathan Wakely (@jwakely on GitHub) for reporting it. Close #3005 (cherry picked from commit acf0c149503b034955557020ea1ad89713cded12) 2023-01-31 Bogdan-Andrei Iancu * [ab951740d] : [pua] Fix silly mixing of bits versus bytes in sizeof() Related to ed8bf4d47a5302b74006ce0312797928fc843e98 (cherry picked from commit 5610c03fb14ada7e28f4a05b3928020883bf0773) 2023-01-31 Bogdan-Andrei Iancu * [2095069bb] : [pua] force pres_id a unsigned_int during calculation To avoid any issues due to "singed" overflowing (cherry picked from commit ac99224ef22ece40e3dcd11417712db84d910bb7) 2023-01-31 Bogdan-Andrei Iancu * [50e7f5866] : [pua] fix the computing of presentity ID (pres_id) - be sure the hash size does not overflow (on user setting), as it has to fit on half long size - when computing pres_id, be sure to cast to long to avoid premature overflow - when incrementing local_index, be sure it does no overflow half long size (cherry picked from commit ed8bf4d47a5302b74006ce0312797928fc843e98) 2023-01-31 Bogdan-Andrei Iancu * [b66b74b43] : [dispatcher] Fix hackish extraction of TO URI upon pinging Better use the URI stored in callback params, rather then using the hackish way of extracting the URI from the T-stored To hdr. This is a side effect of 9af1926 Reported by @denyspozniak Closes #3000 (cherry picked from commit e7aeb9723c70e57b472293027135fd2e80d461d9) (cherry picked from commit 596755f0ec3ae1de27f74c9cb644b491ed86467b) (cherry picked from commit fff1381a10658519623512bbdcf6beced770f3a8) 2023-01-31 Bogdan-Andrei Iancu * [26661fda3] : [dispatcher] fix chaining and freeing of probing packs Some probing packs may be freed before ending circulating the list (if the prob sending fails), so we need to take care of the linking. (cherry picked from commit c6bcd8435c5b3a648efc28a7173a43653257eb40) (cherry picked from commit 9705834ab26619a1712cbe6f1fed6988c150804a) (cherry picked from commit da15ab3ae4fed8c5c3bd1db0e1675f2e44f1969c) 2023-01-31 Bogdan-Andrei Iancu * [1461263f0] : [dispatcher] Improve probing by sending the probs outside locking Collect the data under locking, move the OPTIONs probing outside the locking, to be sure that any potential blocking on SIP level sending is not leading to lock starvation. Simialar to 4c7a7a83f93b18eefe4de1fe13c67f9d7561e6a3 (drouting) Related to #2438 (cherry picked from commit 8139e2799ee8d39e9cc99a189f2b2baa2eb0c39d) (cherry picked from commit d65f37ed01a8cc0ef4aa42ea64e3263755ea8925) (cherry picked from commit 322e9b962cc17198933def85cdb23672e35f505a) 2023-01-28 OpenSIPS * [263afc9a0] : Rebuild documentation 2023-01-23 Razvan Crainea * [7e357c0ff] : tm: remove cluster received '\0' from buffer len When sending a message through cluster, the tm module adds a '\0' terminator to the message - that is because receive_msg expects it. However, this character should not be part of the message lenght. Reported by Denys Pozniak on mailing lists. (cherry picked from commit 81e9b14a16acd284469d8958c57dcece69699a85) 2023-01-23 Razvan Crainea * [de15084c2] : dialog: do not remove SDP if no SDP is provided (cherry picked from commit d92f870ca34c551aa01a7a5531d0cca4e304ce27) 2023-01-21 OpenSIPS * [5137709db] : Rebuild documentation 2023-01-19 Bogdan-Andrei Iancu * [b3211e3f0] : Fix building TO / FROM hdr via t_uac() t_uac() gets URIs as values for TO / FROM, so these URIs may contain URI params. If those URIs are placed into headers without <> enclosing, their params will become header params :( So, to be sure, let's enclose the URIs all the time. Closes 2843 (cherry picked from commit 9af192693f419751ff3fc704d5286274752171b1) 2023-01-16 Bogdan-Andrei Iancu * [a12f352a3] : [tm] fixed double freeing on t_uac() callback param If the t_uac() fails after the transaction was created (like it fails while trying to send the buffer out on the network), a double free will be done on the eventual callback func params: (1) via the released function attached to the completion callback (this will be automatically done upon free_cell() and (2) when t_uac() returns failure to the upper layer. The fix is NOT to free the param if the t_uac() returns error. So even if the transaction was created, remove the release function on the callback func params, to prevent the free (1), and to allow the upper layer to do its own cleanup. (cherry picked from commit 8448551cc4c1b6d4069790e54a149f4ffd0b4c47) 2023-01-14 OpenSIPS * [805d5d2b9] : Rebuild documentation 2023-01-13 Vlad Patrascu * [a9a01dc5d] : tests: properly support malloc tests for any available allocator (cherry picked from commit 23eb399abc901e45180ef712d86eb10b8d9291e8) 2023-01-12 Vlad Patrascu * [5126c1974] : mem: align all prototypes for realloc functions (cherry picked from commit 379dadab58f5c3c77707259710625cd3558168f9) 2023-01-10 Liviu Chircu * [319b6d1d8] : Makefile.test: Fix linking with multiple -DUNIT_TESTS Credits to Vlad Pătrașcu for the report! (cherry picked from commit 1f13945b746bb448c9a5eb8a9a086944d3b12538) 2023-01-10 Liviu Chircu * [1b76ac907] : freeswitch_scripting docs: Fix rc checks in examples (cherry picked from commit 76c18ce1ad9edf70ea12dd1b3fb26b43a6b12ffc) 2023-01-09 Razvan Crainea * [5b5057fb3] : rtpengine: add the cookie len to the iovec buffers This fixes rtpengine from sending the appropriate dictionary end 'e' in the buffer sent over the network. Thanks go to @ankogan on GitHub for reporting it. Close #2985 (cherry picked from commit 99d14dad58554a39adf1b75167aeae8fd3863884) 2023-01-07 OpenSIPS * [0266b44fc] : Rebuild documentation 2023-01-06 Liviu Chircu * [d9c60ef4c] : acc: Fix drop_accounting() (do not be a NOOP!) The bug here was that `drop_accounting()` was building its bitmask as: flag_mask = types * flags; ... whereas it should have done the same as in `do_accounting()`: flag_mask = types + types * flags; ------- ^ the actual acc types to reset were missing! (cherry picked from commit 211a63c9b2ccac346dfc57bca2ede71d286e9989) 2023-01-06 Vlad Patrascu * [7c2f454e4] : b2b_logic: complete fix from commit 14c8f8f 2023-01-04 Liviu Chircu * [fce68ba49] : dialog: Fix a race condition on mid-dlg Contact updates The "contact update on mid-dialog 2xx reply" logic may be invoked in parallel, in case two simultaneous UPDATE transactions are being processed, for example. This patch adds locking, to prevent a possible abort due to "double free" while updating the Contact. Also fix a small bug where the dialog is still flagged with DLG_FLAG_CHANGED, despite the malloc() failing during Contact update. (cherry picked from commit 7dfe2857eef8e109e2c984867eb5e80193f220e1) 2022-12-24 OpenSIPS * [ada72455b] : Rebuild documentation 2022-12-21 Vlad Patrascu * [14c8f8fc5] : b2b_logic: add ability to retry the initial bridge via API This allows the call_center module to properly move the call to the next agent or the queue, when the first agent rejects the call and a welcome message is not used. (cherry picked from commit ed783c473456788e3a2b23d90f2a2c303e50c7bf) =========================== Release 3.1.13 ============================== 2022-12-10 OpenSIPS * [85d0e3bc9] : Rebuild documentation 2022-12-07 Liviu Chircu * [e948b6e0b] : db_mysql: Do not read freed PKG memory after 1st failed reconnect During db_mysql_connect(), make sure to reset the "init" status after free'ing ptr->con. Per MySQL 5.7 docs on mysql_close(): "Closes a previously opened connection. ... Do not use the handler after it has been closed." (cherry picked from commit d616ed3f979100639ed43e45fd3123ccba787535) 2022-12-05 Razvan Crainea * [060b72b24] : b2b_entities: add more entropy to from_tag generation The initial from-tag generation cosisted of an md5 hash over the From URI. Thus, if you would have generating client requests to the same entity (such as a media server), you would always get the same from-tag for all those requests. The current patch adds more entropy when generating the from_tag, such as the current timestamp (expressed in milliseconds) along with the process pid. (cherry picked from commit b003891b468d5730fd68b445331735a92c770bce) 2022-12-03 OpenSIPS * [cdc64cdf0] : Rebuild documentation 2022-11-28 Callum * [0cba1fc58] : rate_cacher: :bug: fix parameter types (cherry picked from commit c8219a87024ef864f22a368dd84516cc617abb06) 2022-11-28 Callum * [218ced666] : rate_cacher: :bug: fix parameter typo (cherry picked from commit 0ec0936bac2dbf6ca6c930b5e76ae147a0ad4245) 2022-11-26 OpenSIPS * [ca439171e] : Rebuild documentation 2022-11-25 Liviu Chircu * [bd493f60a] : rtpengine: Fix possible startup crash in notification process When the "notification_sock" modparam was set, the process responsible for notifications would start by scanning a non-NULL terminated string past the end boundary, sometimes leading to a crash on startup. Fixes #2947 (cherry picked from commit cb59a84fcccc4ee34a1c1ddbd4fd09cc0c5834a0) 2022-11-24 Liviu Chircu * [c59785707] : rabbitmq: Fix bogus debug log Credits to Nick Altmann for the report! (cherry picked from commit aaeaf245733cedea540912442a6782325926db11) 2022-11-24 Liviu Chircu * [471b31cf6] : compression: Fix math bug leading to bad Content-Length Fix an edge-case in mc_ndigits() causing Content-Length values starting with "10..." to be incorrectly counted. (e.g. "107" produced 2, not 3). This bug affected both mc_compact() and mc_compress(). (cherry picked from commit 37213d245c63e426a16004ab161823bd5c2cc1ec) 2022-11-23 Razvan Crainea * [402272821] : siprec: unref failed dialogs Close #2674 (cherry picked from commit e3c74a39df0fd5f5b58679183ade8eee2e0749f6) 2022-11-19 OpenSIPS * [74d09741e] : Rebuild documentation 2022-11-18 Liviu Chircu * [538cbdf08] : mid_registrar: Fix occasional undesired De-REGISTER forwarding in mode 2 If the timings were aligned in a specific way, the mid-registrar (in AoR throttling mode) would actually forward a De-REGISTER downstream even though it had at least 1+ healthy remaining contacts after having applied the De-REGISTER locally. This would cause some degree of service loss, as the remaining UAs were registered on the mid-reg, but not on the backend. Many thanks to Carlos Cruz Luengo (@cruzccl) and @ryan-netizen for an accurate report, as well as helping come up with the fix! Fixes #2615 (cherry picked from commit 502f1ab66257628f06bee7bf8ea4564ab5e8a160) 2022-11-18 Liviu Chircu * [5fe2f1095] : sipcapture: Fix missing lock release on "buffer too small" errors Many thanks to Ryan Caicse (@ryancaicse) for reporting this bug! (cherry picked from commit 9f0fe53744ebf16467b61e9b59da5396bb356896) 2022-11-18 Liviu Chircu * [4a18a0a61] : b2b_entities: Fix missing lock release on OOM error case Many thanks to Ryan Caicse (@ryancaicse) for reporting this bug! (cherry picked from commit 43ffc3d445afc9842afda9caf23e90a0564ffff3) 2022-11-18 Liviu Chircu * [1dc964318] : b2b_logic: Fix missing lock release on OOM error case Many thanks to Ryan Caicse (@ryancaicse) for reporting this bug! (cherry picked from commit b5646bdcf8d1681d894b73af63257c2f0257d4fe) 2022-11-18 Liviu Chircu * [8efeafb13] : b2b_entities: Fix missing macro in previous commit (cherry picked from commit 2b807ad0cf08c15b1947d38674eb001fd64fd1f4) 2022-11-18 Liviu Chircu * [b27c91594] : b2b_entities: Fix missing lock release on SIP parsing errors Many thanks to Ryan Caicse (@ryancaicse) for reporting this bug! (cherry picked from commit a379e9367989e6f731c3c4ab1a3ed97d3c53e287) 2022-11-18 Liviu Chircu * [ae59f85e5] : b2b_sca: Fix double lock release on error case Many thanks to Ryan Caicse (@ryancaicse) for reporting this bug! (cherry picked from commit 4bdbaf222761a74a8fff03bce7afe758742ec3e0) 2022-11-17 Bogdan-Andrei Iancu * [166212ef7] : [dialog] fix missing locking in get_dlg_vals() Iterating the list of dlg vals must be done under lock (cherry picked from commit 728eff0a551c4eac3bc90d0cfac08de5a1280058) 2022-11-17 Liviu Chircu * [79381233a] : next_branches(): Fix infinite looping during error handling If someone has actually taken the time to corrupt the internal "$avp(serial_branch)" AVP, do not perform the "infinite while loop dance" and correctly progress to the next AVP. (cherry picked from commit 244cc92919c1cd6b3bf6a52bd4325b0268c88c76) 2022-11-17 Liviu Chircu * [e5739be82] : next_branches(): Fix bugs leading to READ on freed shared memory This patch fixes two code paths leading to the @avp pointer being freed, after which the dangling pointer is read afterwards by the search_next_avp() function at the "done" goto label. This will work 99% of the time, until the 1% where it won't (crash and burn!). Many thanks to Richard Revels (@rrevels-bw) and Sebastien Couture for an accurate report, as well as their involvement in troubleshooting! Fixes #2446 Fixes #2950 (cherry picked from commit 578fc2907374477449313c36e4fc3287701de800) 2022-11-16 Liviu Chircu * [a8e16576c] : CacheDB: Allow "," in URL passwords Many thanks to @xuxin010033 for the report! Fixes #2786 (cherry picked from commit f904694120ae6bea23bd12c14becd353a8071962) 2022-11-16 Liviu Chircu * [d31a0d09d] : CacheDB: Fix URL parser bugs with multiple hosts Although support for CACHEDB_ID_MULTIPLE_HOSTS has been in there for a long time, URLs such as "redis:ha://h1,h2,h3:6379" were not correctly parsed. (cherry picked from commit bacb776cc90d8532d58f360e276a00977da15fad) 2022-11-16 Gang Zhuo * [73fe193d9] : [db_oracle] Do not change asynch mode when connection lost. The sessions may be ended due to a network error, and change OCI_ATTR_NONBLOCKING_MODE attribute with no session will cause "ORA-03126: network driver does not support non-blocking operations" error. In the case, the function done_timelimit will failed with ORA-03126 error. The error is not considered as a connection loss, and subsequent operations will always throw this error, and the lost connection never reconnect. (cherry picked from commit a5657831f9b216168d2dc974b96e4474e15ff15a) 2022-11-15 Liviu Chircu * [d656d48bb] : usrloc: Avoid PN-related timer processing in "SQL/CacheDB Only" modes Since the "PN trigger" logic described in RFC 8599 is currently strongly tied to holding in-memory contacts, avoid any crashes or other side-effects when running in "CacheDB Only" or "SQL Only" together with PN support by simply avoiding linking contacts into the "PN trigger" timer list. Fixes #2902 (cherry picked from commit 60c1d54f9193e8fca733eb1d0fe92fd60ffe7a27) 2022-11-15 Bogdan-Andrei Iancu * [9c5575279] : [rr] Fix handling on maddr param in RURI If present in RURI, maddr value should be considered (instead of host part) for testing if RURI points (as domain) to OpenSIPS or not (the is_myselg() test) (cherry picked from commit f3cb92df91edd7e472c7c5cb4a2692a0585fad62) 2022-11-12 OpenSIPS * [114862b32] : Rebuild documentation 2022-11-08 Liviu Chircu * [846132178] : parse_via_param(): Fix out-of-bounds read edge-case (OSS-Fuzz) Similar to 5e9f72d3d, but for the parse_via_param() function. Severity: Low Fixes OSS-Fuzz#53080 (cherry picked from commit 6135ff05d0897342ca5c81585cef5a650eae67b9) 2022-11-08 Liviu Chircu * [06da52b00] : db_flatstore: Fix another race condition around MI 'flat_rotate' This race condition was related to invoking 'flat_rotate' 2+ times during the same second (UNIX timestamp). Due to the way the timestamping logic was implemented, this could lead to files NOT being rotated at all on the 2nd 'flat_rotate', which falls in the same second. Although very rare, this race condition could lead to massive CDR loss, since all CDRs between 2nd and 3rd 'flat_rotate' commands have a great chance of being fully lost (unread and discarded). (cherry picked from commit e180b1536e89e7bc8d6e2dd3264786e8531c71d7) 2022-11-08 Liviu Chircu * [569e336c8] : db_flatstore: Fix missing CDRs due to 'flat_rotate' race conditions This commit simply adds R/W locking around the 'flat_rotate' MI command, and all the SIP worker processes. The race condition was as follows: * SIP worker checks the 'flat_rotate' stamp and proceeds to write CDR * 'flat_rotate' is ran (timestamp++) * external process scans & fully reads the rotated file (with deletion to follow later as well, but this is irrelevant) * SIP worker finally writes the CDR using flushed/vector'ed I/O (too late at this point, CDR is forever lost) (cherry picked from commit d3b1463ee115a8b7d4d6b9658c8b07b9ef3d0549) 2022-11-08 Liviu Chircu * [8e4f97f11] : parse_via(): Fix out-of-bounds read edge-case (OSS-Fuzz) This patch fixes a possible off-by-one read overflow while parsing the Via buffer. Even so, the error was mostly harmless, as the supplied buffer is typically much larger and is guaranteed to be NULL-terminated (see udp_read_req(), for example). Severity: Low Fixes OSS-Fuzz#52326 (cherry picked from commit 5e9f72d3d90e8fc9cb20578a95c891631b4d91da) 2022-11-05 OpenSIPS * [e36404610] : Rebuild documentation 2022-11-04 Liviu Chircu * [8e17ae3d1] : registrar: Add a unit test for lookup("r") Related to #2917 (cherry picked from commit 02ddcc6cc52e6c27d27870447c4df7a352508a75) 2022-11-04 Liviu Chircu * [9800b21b4] : registrars: Fix an edge-case with lookup("r") This fixes a bug where the registrar library would return E_LOOKUP_NO_RESULTS upon encountering an AoR with 0 contacts, instead of continuing to walk the branches and expand the remaining AoRs. Many thanks to @MayamaTakeshi for a detailed bug report! Fixes #2917 (cherry picked from commit 9ac7739ef02079a22de6beb776d6a1628a4458cb) 2022-11-03 Răzvan Crainea * [8aca6740d] : Merge pull request #2919 from goharahmed/eventExpiry EVI: Event subscribers expiry enhancements (cherry picked from commit 3ddd19ea2a34cdc25ac43f3785bccab9ad0d42f9) 2022-10-29 OpenSIPS * [5b98ef082] : Rebuild documentation 2022-10-27 Liviu Chircu * [86207d5be] : dialog: Fix shtag restoration when loading from DB This fixes a hanging dialog profiles bug on the backup box (NULL shtag), in specific scenarios with dialogs + sharing tags, profiles with value and dialog + profile replication clusters (whole enchilada). In such cases, after restarting the backup box with active dialogs in the DB, it would end up with forever-hanging dialog profiles in memory, which would be continuously broadcasted to all cluster nodes, effectively adding (doubling) unnecessary counters to the overall limit. Credits to Vlad Pătrașcu for helping troubleshoot this bug! (cherry picked from commit d77a9c52c2becdd451ef19ec9b586d7152aa8884) (cherry picked from commit ab1e5d4a31e5a4d601ea1a7cef7a427d7e508ccf) 2022-10-27 Bogdan-Andrei Iancu * [6059abea5] : [gflags] fix wrong quotes in example Credits go to Karsten Wemheuer (cherry picked from commit 5945746b09b480dd0b7f8ea4b3584e4521bdac3a) 2022-10-27 Bogdan Andrei IANCU * [d28001aee] : Merge pull request #2914 from MayamaTakeshi/reg_lookup_log_correction Corrected 'getting contacts' log (cherry picked from commit 9be68bf34f8d1d54708a6a3de8f689e1e91288fc) 2022-10-27 Bogdan-Andrei Iancu * [4dcb3084e] : [tracer] avoid parsing the shm cloned SIP msg The TM TMCB_MSG_SENT_OUT callback may be called when doing a retransmission for a locally generated request. If for the original sending, a pkg malloc'ed sip_msg is passed to TMCB_MSG_SENT_OUT callback, for the retransmissions the shm cloned sip_msg is passed. As the 'tracer' callback (on TMCB_MSG_SENT_OUT) requires some FROM hdr parsing (to get the from tag), it should NOT parse directly on the shm cloned SIP msg as it will tain the shm sip_msg with pkg pointers -> better do a local parsing (not attached to the sip_msg) of the FROM HDR. This issue was leading to pkg leaking (of the parsed FROM hdr in the shm cloned sip_msg) or it a crash if using failure route from the local route. Note: this is specific to using tracer module from the local route. Closes #2728 (cherry picked from commit 4eabea8a9eb0a08909854722972cd35164557c76) 2022-10-26 Liviu Chircu * [ced7b4cf1] : Allow writing to AVPs with negative index This includes both SET and DELETE operations, for example: $(avp(foo)[-1]) = NULL; $(avp(foo)[-1]) = "42"; (cherry picked from commit df362fb231fc42735f6aedcbdb8f036a72a98f2e) 2022-10-25 ihsinme * [540254648] : Fix for access due to low memory. If you check after a memory access, then you always have access from outside. with stricter control of memory boundaries, this can lead to an abnormal termination of the program. (cherry picked from commit 9ed1485938944ae47f58ac081facb4470c30c47e) 2022-10-22 OpenSIPS * [15ef14a89] : Rebuild documentation 2022-10-21 Vlad Patrascu * [849ebc919] : cachedb_local: fix expiration of keys received through cluster sync Credits to Kingsley Tart from CallTracks for reporting. (cherry picked from commit d0c4fc48c7d46ac3588e540574a5a32b3d61992b) =========================== Release 3.1.12 ============================== 2022-10-15 OpenSIPS * [91dbef8b2] : Rebuild documentation 2022-10-13 Razvan Crainea * [8cdc3e3f6] : rtpengine: do not specify interfaces for non-offer/answer Avoid getting bogus `no more memory` errors when trying to specify in in/out interface when `direction` node is NULL. Close #2880 (cherry picked from commit bbb6f313bba3fdb7f32f80140ceb9c8dff1e8f1b) 2022-10-12 Vlad Patrascu * [3781adb58] : proto_tls docs: fix typos in modparam examples (cherry picked from commit 4d0df03e04d6d0c2c8a550e71f4ce5e5cbf2465c) 2022-10-12 Liviu Chircu * [48ad5f6fc] : context API: Fix ctx cleanup API; Document context_destroy() behavior Although this patch fixes a memory leak in clear_global_context(), this function is not being used at all. (cherry picked from commit 02e1177714b91fa8b7e29f0162c8e9385767f6b1) 2022-10-12 Liviu Chircu * [1b246e4dd] : Fix global msg context leakage in error_route While commit b5bcf046 fixed an issue with missing contexts during error_route, it was missed that the "parse_error" label does *not* free up the global context. The effects of this bug were mostly hidden, affecting only opensips.cfg scripts which employ the "error_route", causing a slow PKG memory leak, proportional to the amount of bad SIP received. Moreover, if these scripts also use async(), they may occassionally run into a quick abort() in t_resume_async(), due to a context being already set (BUG). (cherry picked from commit 43ee34bbbb48cfcfe02217b03ef72726c01cc83e) 2022-10-12 Liviu Chircu * [15c83fd7b] : async(): Attempt to recover from abort() state It seems the "if" condition at the start of t_resume_async() is actually reachable under the right circumstances and causes an immediate program crash. As an intermediate improvement until the source of the issue is found, try to simply overwrite the unexpected context, if one is found. A small memory leak coupled with a CRITICAL log message is preferable to an instant, forced crash. (cherry picked from commit 7167bec5b6379ba1a6762501391133deaf5ba80d) 2022-10-12 Liviu Chircu * [36505ce38] : sipmsgops: Fix ruri_del_param() return value on success The issue was that set_ruri() actually returns 0/-1, not 1/0 as the developer expected. Also update docs to reflect the function's return code meaning. (cherry picked from commit eea215278c479a22434aefd651c95b2ad777ecc1) 2022-10-10 Liviu Chircu * [c4a35a99f] : parse_msg(): Fix heap buffer overflow edge-case (OSS-Fuzz) This patch fixes a SIP message parsing error log which could lead to an unsafe printing of a non-NULL terminated string. Fortunately, the OpenSIPS PKG memory allocator minimizes the severity of this overflow, thanks to its pre-allocated, large chunk of heap memory. Severity: Low Fixes OSS-Fuzz#52204 (cherry picked from commit 2a6f8c67aa15ebf507cc9ff2bd881d771858fed7) 2022-10-10 Liviu Chircu * [b2f0480a1] : parse_content_length(): Fix integer overflow edge-case (OSS-Fuzz) This completes commit 7cab422e2f, where it was still possible to cause an integer overflow even after the fix, with input such as 2147483609, due to missing parentheses in the number equation. Fixes OSS-Fuzz#52112 (cherry picked from commit 837263b47dcb33909b109b5cc050c1ab4a6c64a2) 2022-10-10 Liviu Chircu * [e3218949b] : parse_to_param(): Rework previous fix (OSS-Fuzz) Invoking strlen() on a non NULL-terminated buffer is equally bad, possibly even worse. Instead, simply rely on the @end parameter being correct, which is an assumption already made by the current code of the function. Fixes OSS-Fuzz#41073 (cherry picked from commit 51b908f8fde0aa2eac8dbcfff319281625d6f3f2) 2022-10-10 Liviu Chircu * [91e0ca626] : parse_to_param(): Fix out-of-bounds read edge-case (OSS-Fuzz) Severity: Low Fixes OSS-Fuzz#41073 (cherry picked from commit 90aa25e64f36b22fbcae9aae910257b43f81641f) 2022-10-10 Liviu Chircu * [97e288542] : Fix rare UB on left-shift signed int overflow By default, most commonly used compilers *define* some behaviour when this overflow occurs, such that the program will continue normally, without any negative consequences. Severity: Minor Fixes OSS-Fuzz#40201 (cherry picked from commit 2ba963b0c5e2b6705a3f28ce44e57b248988a103) 2022-10-10 Liviu Chircu * [4e1363b60] : parse_msg(): Fix out-of-bounds read edge-case (OSS-Fuzz) Also add a unit test suite for parse_msg(). Severity: low Fixes OSS-Fuzz#39802 (cherry picked from commit 66898d8208d158d95a27f1a76078a29bd1e08d7e) 2022-10-10 Liviu Chircu * [e4e38bcc6] : parse_uri: Parse the port into an unsigned integer (OSS-Fuzz) Fixes OSS-Fuzz#51605 (cherry picked from commit b4a72a5f96f5726afa48854ad0850fe14f78909d) 2022-10-10 Liviu Chircu * [55e18ff66] : parse_uri: Complete the fix for undefined bitwise left-shift (OSS-Fuzz) The default auto-cast to (int) is not enough, as a value such as 255 << 24 can still overflow the 31 value bits... Fixes OSS-Fuzz#51542 (cherry picked from commit e0d90ec107484051e6c769056036447361c5724d) 2022-10-10 Liviu Chircu * [267e9eb64] : lib/csv: Fix some memleak corner-cases (reported by OSS-Fuzz) Fixes OSS-Fuzz#39925 (cherry picked from commit ff34d213cad9c2b24460aecc206520bac5411bdc) 2022-10-08 OpenSIPS * [f9c007121] : Rebuild documentation 2022-10-05 Liviu Chircu * [55033e93a] : drouting: Fix dr_match() docs * the groupID is actually mandatory * add missing "number" docs (cherry picked from commit a5236a863b9522ee2e7a5ed53bca4fbb51c2c234) 2022-10-01 OpenSIPS * [d16919559] : Rebuild documentation 2022-09-28 Liviu Chircu * [fb7b21a77] : freeswitch: If-guard some verbose DBG logs Suggested by @NormB (cherry picked from commit 6ec8ddec144ce133a365bdc8a095a1f267376f58) 2022-09-24 OpenSIPS * [61de4c5ed] : Rebuild documentation 2022-09-20 Vlad Patrascu * [854792c82] : b2b_entities: fix shm memory leak For the write back db mode, the entity storage data was only freed after inserting/updating the entity in the database. This would lead to memory leaks if the entity was deleted before the DB timer task had a chance to be run. Thanks go to Norm Brandinger from Five9 for reporting! (cherry picked from commit aee014beb78be050bd2272ee0080a6f8063d9ec0) 2022-09-17 OpenSIPS * [bc162b666] : Rebuild documentation 2022-09-16 Bogdan-Andrei Iancu * [2b68292e9] : [TCP] fix init TCP support for auto-scalled procs When starting the TCP Main proc, be sure we initialize the MAIN<>Worker communication sockets also for the procs to be potentially scaled in the future. `pt[n].unix_sock` is valid only for running procs (not for the "autoscale to-be"), so use the `pt[n].tcp_socks_holder[0]` holder (valid for all procs, running or not). Thanks go to Yury Kirsanov and Slava Bendersky for reporting and helping with the troubleshooting. (cherry picked from commit d7a4bf8f134d3d2cd761f528e6963445c9ef9b06) 2022-09-15 Liviu Chircu * [8d714eae9] : parse_uri: Avoid dereferencing invalid memory on error logging (cherry picked from commit 99c9a828dd80f2874e89a520150565fa9e9162c7) (cherry picked from commit 7df9ff7176497c3109ac0648f381aad751ec90dd) 2022-09-15 Liviu Chircu * [78434643e] : parse_uri: Fix some UB corner-cases (reported by OSS-Fuzz) * possible bitwise left shift with a negative value (UB) * possible integer overflow, due to multiplication (UB) Fixes OSS-Fuzz#48273 (cherry picked from commit cf95355290c64e2693f88d17e3830405f97962d9) (cherry picked from commit 7cc624275e6a98322a235062327f2469725dfbb2) 2022-09-14 Bogdan-Andrei Iancu * [22fd1760a] : [tm] fix adding rport in local route Force the VIA rebuild if add_local_rport() (for adding rport param to VIA) was called from local route Closes #2833 (cherry picked from commit c85d93c7a3c3e9177d4621163295816b77bcdddc) 2022-09-14 Bogdan-Andrei Iancu * [f0ff350d6] : [dialog] fix bad unref leading to dialog leaking When using the dlg_on_timeout to set a new timeout for the dialog, due to the timer related operations (re-inserting in the list), an extra ref cnt happens. If not unref'ed, the dialog will stay (as terminated) forever in memory. Closes #2788 (cherry picked from commit 4062de45d0ccfe62bb4f9475f6320d2726349bab) 2022-09-13 Liviu Chircu * [3230fe307] : clusterer: Always broadcast a packet after shtag activation Due to network outages, it is currently possible for both sharing tags of an Active/Backup pair to end up in ACTIVE state. This patch makes it so a "cluster_shtag_set_active" MI command always broadcasts (forces) the ACTIVE state onto all neighbours, thus fixing the incorrect, post-outage state of the tags. Credits to @bogdan-iancu and @rvlad-patrascu for their contributions to this fix! (cherry picked from commit 77c24e2122ea6f66f251349e05984cfbdef9166c) (cherry picked from commit ccfdb699bdb2e43979a780ead5baad31e2120a00) 2022-09-13 Liviu Chircu * [a8f3fe6a0] : clusterer: Fix bad shtag packet on BACKUP->ACTIVE transition This fixes an issue where a malformed cluster packet (missing trailer part) would be broadcast on a BACKUP->ACTIVE transition. Consequently, both nodes of an Active/Backup pair would have ACTIVE sharing tags after trying to switch traffic to the Backup node. 2022-09-12 Bogdan Andrei IANCU * [e7b327785] : Merge pull request #2885 from john08burke/multipart_crash pvar: fix crash when parsing multi-part body with negative index (cherry picked from commit cd853142daa005c20f54cfb93ae99d48ba1e510c) 2022-09-10 OpenSIPS * [aa3f87b79] : Rebuild documentation 2022-09-09 Liviu Chircu * [68d95907f] : mem.h: Avoid warnings when explicitly defining -DSYSTEM_MALLOC (cherry picked from commit a11f9c74064bd5ec79445e7042d85f151672d038) 2022-09-08 Vlad Patrascu * [1f7d377b3] : Add QM_DBG_MALLOC_HIST flag to Makefile.conf template (cherry picked from commit 4c748b3f8380185ed74ed8ea37e9e9e9470b685f) 2022-09-08 Razvan Crainea * [7247ef249] : media_exchange: make sure we do not unreference NULL dlg (cherry picked from commit 581a4b8e5b9575fb63c631886b58b051797f2642) 2022-09-06 Vlad Patrascu * [fa2d58da0] : mem/q_malloc: add support for debug history By setting a size via the QM_DBG_MALLOC_HIST define, we now keep a history of the file, func, line debug information in each fragment. (cherry picked from commit bc3e62f7e9e0c56b984ca38a26a78651669e594b) 2022-09-06 Liviu Chircu * [73c9d0664] : dialog: Fix crash in debugging function (debug_main_timer_list()) DBG:dialog:debug_main_timer_list: testing forward loop with visited = 1 DBG:dialog:debug_main_timer_list: testing backward loop with visited = 2 DBG:dialog:insert_dlg_timer_unsafe: inserting 0x7f303dba8d80 for 7205 DBG:dialog:debug_main_timer_list: testing forward loop with visited = 1 ERROR:dialog:debug_main_timer_list: Detected something wrong with main timer list on forward linking for entry 0x7f303dba8d80 DBG:core:handle_sigs: OpenSIPS exit status = 134 INFO:core:handle_sigs: child process 139408 exited by a signal 6 (cherry picked from commit 4c6a8ec5d4ac6e0faceaa5e0acb6863d992f59a7) 2022-09-06 Liviu Chircu * [f6d73310a] : dialog: Fix shm memleak on OOM error case (cherry picked from commit 6d03091833a0ee9a9d1294b0aff87a7435c60bf4) 2022-09-05 Liviu Chircu * [dc39450c5] : rtpproxy: Fix bad error handling on rare OOM case (cherry picked from commit d2cec34346fea49a98b5c5d33ae20044e47eec69) 2022-09-03 OpenSIPS * [296c58422] : Rebuild documentation 2022-09-01 Liviu Chircu * [ff175bbb2] : Cfg Parser: Allow whitespace before the "include_file" statement Fixes #2892 (cherry picked from commit c477e491b43358af235a83eb9292769127849ac1) 2022-08-30 Razvan Crainea * [86fbeedc4] : tracer: fix trace_stop removal from list Fix the way we detect the previous element when removing from list Before this change, if there were multiple elements in the list, they were leaking due to the bad handling of the list removal. (cherry picked from commit dae9817b313cb98ed3d4d449064c64c9a4ac7cd8) 2022-08-27 OpenSIPS * [6574cb754] : Rebuild documentation 2022-08-26 Vlad Patrascu * [7accdfc66] : Throw startup error if event_route can never be run OpenSIPS would start without any error or warning if an event_route is used but the 'event_route' module is not loaded. (cherry picked from commit bb9bd920feb712cf8ec0c32d4e418056fae8cc81) 2022-08-24 Razvan Crainea * [7d78c5ae6] : clusterer: advertise tag's active state only in defined cluster Thanks go to Vlad Patrascu for brainstorming this! (cherry picked from commit d741f1875cb2b01e6deb96ae2235e23e029dc35f) 2022-08-22 Razvan Crainea * [5fa00d10b] : b2b_entities: free key returned by client_new prevent pkg leak of b2b_key returned by client_new (cherry picked from commit 60043ae3713052614e535371c100a3668c47af8f) 2022-08-22 Razvan Crainea * [3d42cc2ce] : b2b*: consider dlginfo for requests an replies as well (cherry picked from commit 7aa2007300fac85645bb4edaea3085557aae7923) 2022-08-20 OpenSIPS * [b639c4d81] : Rebuild documentation =========================== Release 3.1.11 ============================== 2022-08-17 Bogdan-Andrei Iancu * [dd74ea175] : [call_center] avoid a negative setup_time in CDR In the DB schema, the setup_time is an unsigned, and a -1 value was computed while a call was rejected by an agent (cherry picked from commit 9dc28a91c68db792f1df4cf1d6ce8d0faf83ad0e) 2022-08-16 Liviu Chircu * [7f8776988] : Various code/doc improvements; Var renames; Fix typos (cherry picked from commit 28d87ad30f99abcfaca678955cff6b38bdc2b24f) (cherry picked from commit 2aa0cafcbee13131bdc4793b893530fa8126576c) (cherry picked from commit aaaae0d151fb4e1f459505c890df2fc12745220c) 2022-08-16 Liviu Chircu * [b4b539db2] : Fix various doc typos; Improve wording (cherry picked from commit dd7b3da0397fe5ccc9978ec9138a6d4395c3f941) (cherry picked from commit 7cdbc996ee61eae1ed9757c9bb401c67d96b48fd) (cherry picked from commit e0325625ca9e8dceb79225455527af62a2e8e298) 2022-08-08 Bogdan-Andrei Iancu * [2a75be281] : Fix possible bogus exec_msg_threshold reporting Reset the exec_msg_threshold stack (longest found actions) when a parse error is detected (before running the actual scritp). Otherwise we may inherit old records from previous runs (cherry picked from commit e7ed29e50f8dc76717fe38281945aa331958db25) 2022-08-06 OpenSIPS * [e1f942190] : Rebuild documentation 2022-08-01 Vlad Patrascu * [0c66936f3] : clusterer: add ability to disable replication packets dispatching Add a new "dispatch_jobs" modparam which controls whether the processing of replicated packets is dispatched through IPC or not. Disabling the dispatching mechanism prevents high CPU loads caused by the "thundering herd" problem. Credits go to Rizwan Syed and Connex Carrier Services for supporting the troubleshooting of this issue. 2022-07-30 OpenSIPS * [45db9cb11] : Rebuild documentation 2022-07-28 Vlad Patrascu * [db99f9a64] : clusterer: fix deadlock when broadcasting shtag state 2022-07-26 Liviu Chircu * [eb4a92c50] : proto_hep: Fix log message severity (just a debug log) (cherry picked from commit 612e7a1feb28a6aa359b24a6237928c0e06a3605) 2022-07-23 OpenSIPS * [1fc0e6010] : Rebuild documentation 2022-07-22 Maksym Sobolyev * [b225a8b86] : python: Don't leak memory in python_exec(). The bug was introduced in rev 302058d8d38 (April 2019) along with module API cleanup and affects all releases since 3.0. 2022-07-21 Vlad Patrascu * [3ea2ed843] : sql_cacher: don't allow usage of a replicated local cache Using a replicated collection for cachedb_local would lead to invalid keys in the cache due to reload version inconsistencies. (cherry picked from commit 1b9662649d2e0606225b5e198a083619d0ca97e1) (cherry picked from commit 6a71c14997936b3911ffa73d01e632838a40b97d) 2022-07-20 Vlad Patrascu * [383b23289] : clusterer: issue sync request under lock (cherry picked from commit bf178b04ffec9fa22d75fc5266286f93721eec5d) 2022-07-19 Vlad Patrascu * [652d89fbe] : clusterer: fix deadlocks when syncing 2022-07-16 OpenSIPS * [4472895fa] : Rebuild documentation 2022-07-15 Vlad Patrascu * [375ddf38f] : clusterer: fix possible deadlocks when discovering a new node Use only standard RW locking operations for the global list lock instead of the "switchable" mechanism (aquiring the lock for writing when necessary). (cherry picked from commit e0e9e2f943ca5bd35f653f6e55a89000e8b262e6) 2022-07-14 Vlad Patrascu * [df4508fb1] : clusterer: queue sync request after all send errors (cherry picked from commit 46e56d4170079eed46686c57986c2ccf5756779e) (cherry picked from commit 80a7df2433934a880a728ae9305a9a04c37d69a4) 2022-07-14 Vlad Patrascu * [b2225c086] : clusterer: properly compute sync fallback interval in all cases The timestamp of the sync request was not saved when queueing the sync after certain send errors. (cherry picked from commit 816ef38b7c97b811a5822ceab9ebbe81609b1b6b) (cherry picked from commit 5f99dd82e38bb98662f304a9ebe0e77ebac961d7) 2022-07-14 Vlad Patrascu * [20f7d457a] : clusterer: prevent permanent sync in progress state If the sync end marker packet is not received, nodes get stuck in a permanent "sync in progress" state. This commit introduces a timeout, configurable via the "sync_timeout" modparam, after which a node reverts to the not synced state, if no sync data packet is received. (cherry picked from commit 2e5bf28aa91d9cda8304bc19bbba770e83d7cb22) (cherry picked from commit 0d346f0b6927ceb8895ffd7a4f52f28e685c12f7) 2022-07-14 Vlad Patrascu * [db4e1bc4d] : clusterer: fix seed fallback during sync Do not fall back to the synced state for a capability if syncing is actually in progress. (cherry picked from commit 3960008a14fa75395cc4b49c7e7cae52ac68aed7) 2022-07-12 Razvan Crainea * [115cd963a] : b2b_entities: fix the right number of rows when leg is missing Thanks go to Norm Brandinger from Five9 for reporting, testing and providing all the help to pinpoint this issue! (cherry picked from commit b005a3795f9a762011f488cb403f2e9bd7a7ade1) 2022-07-09 OpenSIPS * [ef5c398db] : Rebuild documentation 2022-07-08 Liviu Chircu * [ed3a60c60] : acc docs: Clarify that do/drop_accounting() can be called multiple times (cherry picked from commit be2ca3851c80d1e572f536a3170345137e6018e6) 2022-07-08 Liviu Chircu * [9080c3cd3] : perl: Fix PKG corruption in perl_exec() (off-by-one) (cherry picked from commit d7f9a851149010d1b99aeb9e04339994414c8731) 2022-07-08 Liviu Chircu * [bfba8bd7d] : perl: Fix PKG memory leak in perl_exec() The leak would happen 100% of the time on each perl_exec(). (cherry picked from commit 0742814a7f72d99d0de6624acca7f107059f03bf) 2022-07-07 Nick Altmann * [3240d1859] : DEB Packaging: don't build auth_jwt package for old distributives 2022-07-04 Vlad Patrascu * [45c8875d5] : xml: fix accessing node value with CDATA sections (cherry picked from commit 4a4248cbfd9c289ea16d68b45d1dbaa8a5daf064) 2022-07-02 OpenSIPS * [3c3a3e591] : Rebuild documentation 2022-07-02 OpenSIPS * [98fc8139e] : Rebuild documentation 2022-06-28 Vlad Patrascu * [f085e8d0e] : b2b_logic docs: fix example for b2b_bridge_request() (cherry picked from commit 75fc8f0388b6505db1717a503a691c68dddd68df) 2022-06-28 Vlad Patrascu * [0ce6b3dc6] : b2b_logic: complete the Max-Forwards fix in commit b204fed Also decrease Max-Forwards when bridging, based on the value from the initial INVITE of the server entity, if it's still present in the session. (cherry picked from commit c328eb06d01c52d7d0a1fadd717c59003c4456b8) 2022-06-25 Vlad Patrascu * [50846c3cd] : clusterer: make sure a discovered node is not added multiple times Do not insert a new node into the list multiple times when: * receiving multiple CLUSTERER_NODE_DESCRIPTION BIN messages * we receive a CLUSTERER_NODE_DESCRIPTION message and the node also appears in CLUSTERER_FULL_TOP_UPDATE messages. (cherry picked from commit b8e107517fd032f16f16df242a02474efc2312d2) 2022-06-25 Vlad Patrascu * [5bb564165] : b2b_logic: fix possible crash when init_callid_hdr param is set The crash would occur if the Call-ID header name is received in compact form("i" instead of "Call-ID"). Thanks to David Escartin from Sonoc for reporting. (cherry picked from commit fa2145b12cb6590e4366cb8a2659b7b79813b374) 2022-06-25 Vlad Patrascu * [ee89aa19b] : b2b_entities: fix possible shm memory leaks Fix leaking transactions when deleting an entity without sending a final reply. Thanks to David Escartin from Sonoc for reporting. (cherry picked from commit c7a5f41754c03fa20921e86a7ff25d2f0b0abf76) 2022-06-25 Vlad Patrascu * [f90497bf0] : b2b_logic: prevent possible crashes when accessing $b2b_logic vars Make sure to always search in the hash for the current tuple instead of relying on a pointer saved in the b2b context. There might be races between processing BYEs and deleting the tuple and running a b2b_logic reply route where we access a $b2b_logic variable. Thanks to David Escartin from Sonoc for reporting. (cherry picked from commit ff646336e82ce1bdea56156c826520090c9786ad) 2022-06-25 Vlad Patrascu * [24f3c6b8b] : b2b_entities: properly handle negative replies to reINVITEs Do not change the dialog state to terminated as a result of a sending a negative reply to a reINVITE. This would have prevented the forwarding of further requests. Thanks to David Escartin from Sonoc for reporting and testing the fix. (cherry picked from commit e8df85a64a3b8095cd95c0b2d9254de605b61384) 2022-06-25 Vlad Patrascu * [e5f3840a6] : b2b_entities: properly handle unexpected ACKs Fixes an issue where a 487 reply is not relayed after an unexpected ACK is received following a CANCEL. Thanks to David Escartin from Sonoc for reporting. (cherry picked from commit 81cb0903aedd2271e9a93789e83e1d96e28352f1) 2022-06-25 Vlad Patrascu * [f8212c771] : b2b_entities: fix accessing $b2b_logic variables for PRACK requests Fixes #2686 (cherry picked from commit 3b6cf1640fc569a721574faaff4132b2e2d7c477) 2022-06-23 Vlad Patrascu * [b204fed7b] : b2b_logic: properly decrease value and pass Max-Forwrads header This applies to requests that are effectively "passed" from one entity to its peer. Fixes #2471 (cherry picked from commit fa84d8d0e6cf719c0d2c7bd215fa74e5e33e1a2f) 2022-06-23 Vlad Patrascu * [4c9300cc2] : b2b_entities: allow enforcing the Max-Forwards value Related to #2471 (cherry picked from commit 404f580026f2bb67cdacf56e1384213643a0505e) =========================== Release 3.1.10 ============================== 2022-06-18 OpenSIPS * [fbc7ee2e0] : Rebuild documentation 2022-06-17 Liviu Chircu * [d90897b7b] : cachedb_local: Fix missing lock_release() on error case Credits to @ryancaicse for the report in #2714 (cherry picked from commit 1e5dd94dbc3ecf9176e1bf88ec032b7773f2d57e) 2022-06-10 Bogdan-Andrei Iancu * [2812dea93] : Fix body re-assembling when adding a new body part to an emptry received body This fixes a regression introduced in b0591d285ad966c2cb13672de8071c03fcba7414 Fixes #2823 Credits go to @pergolafabio for the detailed reporting (cherry picked from commit a05893a631193a37548cfae292ed7f00f63044e3) 2022-05-28 OpenSIPS * [aded782cb] : Rebuild documentation 2022-05-27 Bogdan-Andrei Iancu * [8ab71077b] : [db_virtual] fixed the MI db_get output Fix typos leading to bad json structure Reported by @bctff Closes opensips-cli/#94 (cherry picked from commit 96d8113e9da6f01dc1222364b80d975284d42336) 2022-05-24 Razvan Crainea * [57d2943c9] : clusterer: print the command that cannot be parsed (cherry picked from commit 8ba0309d4751ed5670800cf4fb0bdd85d6b6d7be) 2022-05-21 OpenSIPS * [46b886f48] : Rebuild documentation 2022-05-18 Nick Altmann * [36664dee7] : Add missed condition for natping_partitions param in nathelper doc 2022-05-18 Răzvan Crainea * [1fb1df8e7] : Merge pull request #2783 from svanstone-resilient/patch-1 b2b_entities: parse from & to structs if they aren't 2022-05-14 OpenSIPS * [ed6f5ae0a] : Rebuild documentation 2022-05-09 Liviu Chircu * [7f7fa4312] : dialog docs: Improve "profiles_with_value" example Suggested by Fabien Aunay (cherry picked from commit d148f1dfa5c94418968cab6020d0dc9671023257) 2022-05-07 OpenSIPS * [2485a9235] : Rebuild documentation 2022-05-04 Nick Altmann * [64bed6332] : DEB package: add support for ubuntu 22 2022-05-04 Liviu Chircu * [faa9f75f4] : Makefile: Fix detection for gcc 11 and higher Context: newer OS'es, e.g. Ubuntu 22.04, ship with gcc 11 nowadays. (cherry picked from commit 7273a3f13a8bb29a4b4da529c2e8c9bc2cc45492) 2022-05-04 Bogdan Andrei IANCU * [6d1e0dfd3] : Merge pull request #2821 from lemenkov/format_security Fix -Werror=format-security (cherry picked from commit 47bfb3e3292a1acca6562427038b25a302d65ff1) 2022-05-02 Razvan Crainea * [e43af5644] : rtpproxy+rtpengine: fair election when the first try is disabled When a first attempt to use a rtpproxy/rtpengine node picks a disabled node, the next attempt should not consider the disabled nodes at all. (cherry picked from commit 9d5dd9539d54b2186f31d2447823cae9108b9c31) 2022-05-02 Bogdan-Andrei Iancu * [1a71fded7] : [presence_dialoginfo] Fix aggregating dialoginfo XML Fix the looping when aggregating the dialog info XML documents with multiple dialog elements. The xmlUnlinkNode() function inside the loop is breaking the looping (the "next" member is reset). Credits for reporting and fixing go to Damien Sandras (@dsandras) Closes #2815 (cherry picked from commit 0cca86fe789d77ea3e2b58326d6f282eb3433544) (cherry picked from commit 4bc9d9603f6612f5b294eb6fa55ab38a474d1ce2) 2022-04-23 OpenSIPS * [ac202139e] : Rebuild documentation 2022-04-21 Razvan Crainea * [51322b93b] : tm: use INVITE's AVPs when sending locally generated msgs This allows the TLS_MGM module to pick up the right tls_domain that should be used for sending the ACK/CANCEL message (cherry picked from commit 84c1614ecea5025230b46950408c8343c693ec8b) 2022-04-21 Razvan Crainea * [2fcf0b9ba] : rtpengine: fix switching set for rtpengine_play_dtmf Reported by Slava Bendersky, close #2808 2022-03-16 svanstone-resilient <62011179+svanstone-resilient at users.noreply.github dot com> * [c6d85c152] : 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. (Cherry-picked from 3.2 and 5e5fc98ad07889c6d285a913aee7caf769c2878b ) =========================== Release 3.1.9 ============================== 2022-04-20 Liviu Chircu * [f5b228b84] : Bump version to 3.1.9 2022-04-20 Liviu Chircu * [13a5185bd] : cachedb_redis: Allow quoting strings in raw queries In case the Redis raw query string arguments include whitespace (' ', \t, \r, \n), script developers can now enclose them in single (') or double quotes ("), and OpenSIPS will pass the correct string to Redis. For example: cache_raw_query("redis", "SET foo \"bar baz\"", "$avp(result)"); or: cache_raw_query("redis", "SET foo 'bar baz'", "$avp(result)"); ... are now possible and equivalent. Both of these will set the "bar baz" value, without the quotes. NEW module parameter in order to maintain backwards-compatibility with previous code (default: 0): modparam("cachedb_redis", "enable_query_arg_quoting", 1) Fixes #2036 (cherry picked from commit 6ecac89e5418b9a192519d1ed3cde000695079d1) 2022-04-20 Liviu Chircu * [04e71a8ad] : cachedb_redis: Use argv API instead of fmt-string API for raw queries This change allows "%" to be safely used in raw queries (e.g. maybe some Redis key contains a random "%" char), while also making the raw query operation a lot more safe and/or unexploitable from the outside. Many thanks to David Escartin (Sonoc) for a detailed bug report! (cherry picked from commit d03f17c4dffff5f8b9d114b036ff4d6dc0ad83ba) 2022-04-16 OpenSIPS * [498b78763] : Rebuild documentation 2022-04-12 Liviu Chircu * [36bf27147] : re.subst transformation: Fix possible pkg memleak The leak would only happen under these simultaneous conditions: 1. the "subst" (last) part of the RE is a variable 2. the variable is using an index (e.g. an AVP) 3. there are at least two different "subst" strings in the script, which can run alternatively (see the global "subst_re" logic to understand more about the "reusage" mechanism and this effect) Many thanks to Richard Revels for a detailed report on this bug! Fixes #2761 (cherry picked from commit c739c2f4de2b26767e894765bb5f47d908f88603) 2022-04-12 Bogdan-Andrei Iancu * [8b955ed5b] : [rtpengine] avoid returning 0 as it breaks the script execution Fixes #2796 (cherry picked from commit 1763c7a5c894c9adecd19023cd1470a408f626fb) 2022-04-12 Peter Lemenkov * [97baf8192] : Explicitly add fPIC and DPIC for gcc This addresses linking on Fedora 34 and later with gcc 11: ``` gcc -shared -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-O2 -Wl,-E alarm_checks.o hashTable.o interprocess_buffer.o openserMIBNotifications.o openserObjects.o openserSIPCommonObjects.o openserSIPContactTable.o openserSIPMethodSupportedTable.o openserSIPPortTable.o openserSIPRegUserLookupTable.o openserSIPRegUserTable.o openserSIPServerObjects.o openserSIPStatusCodesTable.o snmpstats.o sub_agent.o utilities.o -L/usr/lib64 -lnetsnmpmibs -lnetsnmpagent -lnetsnmp -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -lm -lsensors -ldl -lm -lrpm -lrpmio -Wl,--enable-new-dtags -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -lm -lssl -lssl -lcrypto -o snmpstats.so /usr/bin/ld: /tmp/cccfDV1K.ltrans0.ltrans.o: warning: relocation against `event_shm_threshold' in read-only section `.text' /usr/bin/ld: /tmp/cccfDV1K.ltrans0.ltrans.o: relocation R_X86_64_PC32 against undefined symbol `ctime_buf' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: bad value collect2: error: ld returned 1 exit status make[1]: Leaving directory '/builddir/build/BUILD/opensips-3.1.7/modules/snmpstats' make[1]: *** [../../Makefile.rules:39: snmpstats.so] Error 1 make: *** [Makefile:197: modules] Error 2 ``` Closes #2734. (cherry picked from commit 0896f9a46700005a304a65ddf7e09419a3963b82) 2022-04-09 OpenSIPS * [5a2312ba2] : Rebuild documentation 2022-04-08 Bogdan Andrei IANCU * [f461e38d3] : Merge pull request #2790 from Transatel/FIX_TOS_IPV6 Add TOS in IPV6 2022-04-08 Matthieu Casanova * [fd88ea53d] : fix indentation 2022-04-08 Matthieu Casanova * [87fdd67dd] : fix indentation 2022-04-08 Bogdan Andrei IANCU * [84a7b90c9] : Merge pull request #2779 from ppisar/openldap-2.6.1 Rename an ldap_connect() to opensips_ldap_connect() (cherry picked from commit 457111cebc2010225dffa668edd8155fdca6a62a) 2022-04-08 Bogdan Andrei IANCU * [de7062c28] : Merge pull request #2773 from carstenbock/use_library_for_require_parsing Use library function to fix edge case in require parsing (cherry picked from commit 432a53305ba421067f2feb7b19cb2c3f1b0289ee) 2022-04-06 Bogdan Andrei IANCU * [6ea4a7ac1] : Merge pull request #2806 from john08burke/redis_bugfix_3_1 [cachedb_redis] cleanup stale context pointer, branch 3.1 2022-04-06 John Burke * [439b8b099] : [cachedb_redis] cleanup stale context pointer revised version of d79f3765b35bd6268ca369b2152c379090bc5b2b for 3.1 branch 2022-04-06 Bogdan-Andrei Iancu * [38eeb4100] : Fix bad body re-assembling when handling a multi part with empty parts Credits for the finding and for the fix go to John Burke ( @john08burke ) Closes #2794 (cherry picked from commit b0591d285ad966c2cb13672de8071c03fcba7414) 2022-03-30 Razvan Crainea * [09daaa22f] : Fix crash in parse_sdp for fmtp, rtpmap and hold When invalid strings would have been passed, the remaining value would have resulted in an invalid memory access. Issue discovered during OpenSIPS Security Audit 2021, by Alfred Farrugia & Sandro Gauci (Enable Security) 2022-03-26 OpenSIPS * [3e08f3378] : Rebuild documentation 2022-03-24 Vlad Patrascu * [92614e94d] : cJSON: fix memory leak on object parsing error Issue discovered during OpenSIPS Security Audit 2021/2022, by Alfred Farrugia & Sandro Gauci (Enable Security) https://github.com/OpenSIPS/opensips/security/advisories/GHSA-2mg2-g46r-j4qr (cherry picked from commit 417568707520af25ec5c5dd91da18e6db3649dcb) 2022-03-24 Bogdan-Andrei Iancu * [81941d188] : [sipmsgops] fix codec_delete_XX() parsing Issue discovered during OpenSIPS Security Audit 2021/2022, by Alfred Farrugia & Sandro Gauci (Enable Security) https://github.com/OpenSIPS/opensips/security/advisories/GHSA-3ghx-j39m-cw4f (cherry picked from commit dd051f8ed5ae3347fb1d556ced3c97822c9d8450) 2022-03-19 OpenSIPS * [1e94508f4] : Rebuild documentation 2022-03-18 Liviu Chircu * [87e1f27d0] : core: Fix Content-Length parsing Issue discovered during OpenSIPS Security Audit 2022, by Alfred Farrugia & Sandro Gauci (Enable Security) https://github.com/OpenSIPS/opensips/security/advisories/GHSA-c6j5-f4h4-2xrq (cherry picked from commit 7cab422e2fc648f910abba34f3f0dbb3ae171ff5) 2022-03-16 Razvan Crainea * [0c37ba495] : b2b_entities: properly handle PRACK after dlg is matched Otherwise, simply relay the PRACK. (cherry picked from commit 8edf6ff627456c8cfa5c496e44c477e9ba8852a6) 2022-03-16 Liviu Chircu * [4ed384ef6] : dispatcher: Fix IP printing on error case Many thanks to @Cossack9989 for the report! Fixes #2780 (cherry picked from commit e2f13d3747577937152346b031b86639b37bc2b5) 2022-03-15 Vlad Patrascu * [75a59b801] : b2b_entities: fix entity storage memory leak Do not reset the pointer to the storage buffer when there is nothing to serialize after running the callback. (cherry picked from commit e19ed6eaaf8d238ada6b9868760127f097412439) 2022-03-12 OpenSIPS * [b17405b01] : Rebuild documentation 2022-03-09 Liviu Chircu * [3a93dae19] : dialplan: Always set the "attrs" pvar on success; Improve docs This patch avoids leaving an untouched "attrs_pvar" variable after a successful dp_translate(), in case the attributes are NULL or empty-string. In order to both prevent scripting bugs as well as boilerplate initialization code, the "attrs_pvar" is now always set to "" (empty-string) in case the "attrs" field is either NULL or empty-string. (cherry picked from commit a8f964c8f565f5fb66797ca7f352e013ec3aa79a) 2022-03-07 Razvan Crainea * [845eed213] : rtpengine: fix hostname detection for IPv6 (cherry picked from commit 4d921360eb9dfa4dffe100de3444849afc7af5c9) 2022-03-05 OpenSIPS * [84fc9936f] : Rebuild documentation 2022-03-04 Liviu Chircu * [2af7b6a2b] : mi_fifo: Fix double fclose() during error handling Example double-free scenario (multiple ones were possible): mi_fifo_callback -> mi_fifo_reply -> mi_fifo_flush -> mi_fifo_write -> ERROR -> fclose() -> mi_throw_error -> mi_fifo_write -> ERROR -> fclose() Many thanks to David Escartin (Sonoc) for a detailed report! (cherry picked from commit 85ba95d105dd564bdd1b02282dff1e6ab8ac109a) 2022-03-02 Liviu Chircu * [c5f1b7c92] : HP_MALLOC: Fine-tune the "frag split size" constants It seems that "split on 4096 or larger" is too large a value, leading to fragmentation issues on typical 1G - 4G SHM pools. With this patch, HP_MALLOC will visibly use less shared memory, but will also split fragments more often. (cherry picked from commit 043d4f31d084560681733358438e5cb13926f84d) 2022-03-02 Liviu Chircu * [d82fd36f4] : fraud_detection: Do not raise call-duration alerts for CANCEL/487 calls (cherry picked from commit 1c4a8a5ac7f685d5515191cd1654aa93c1f72739) 2022-03-02 ihsinme * [e6ed91f09] : incorrect error handling. (cherry picked from commit 336e6b0b2ccdf53673eac2c9d27d6923b977ab7b) 2022-02-17 benjamin.landais * [910af2ea8] : Add TOS in IPV6 =========================== Release 3.1.8 ============================== 2022-02-23 Liviu Chircu * [e0d46d3a6] : Bump version to 3.1.8 2022-02-23 Bogdan-Andrei Iancu * [21e20da9c] : Fix switch-case levels for Replaces and Feature-Caps header name parsing (cherry picked from commit 6b49736cca0d1e8ebf0440cf51f95a08f31b9222) 2022-02-23 Bogdan-Andrei Iancu * [77fff20e6] : [core] fix parse_uri() parsing Issue discovered during OpenSIPS Security Audit 2022, by Alfred Farrugia & Sandro Gauci (Enable Security) https://github.com/OpenSIPS/opensips/security/advisories/GHSA-358f-935m-7p9c (cherry picked from commit b2dffe4b5cd81182c9c8eabb6c96aac96c7acfe3) 2022-02-22 Liviu Chircu * [d446d2540] : parse_msg: Fix possible buffer read overflow with whitespace input Fixes OSS-Fuzz#44887 (cherry picked from commit a880e1faee1df2b23054de13689de97b2ec08f28) 2022-02-22 Liviu Chircu * [391ea3b21] : parse_uri: Fix possible buffer read overflow with urn: URIs Fixes OSS-Fuzz#39800 (cherry picked from commit 0b6e9db4fcdcd1ff91e4727be07c95ecef26c50d) 2022-02-19 OpenSIPS * [9a40c274a] : Rebuild documentation 2022-02-18 Liviu Chircu * [73ee10a3b] : Fix inet_pton() error handling in various modules (cherry picked from commit 594a5140a4677ed2d21c7d7d997c8d92ffb94597) (cherry picked from commit 886d1ebc601ac43ba9e70dd6dfe21ec55e4a7f43) 2022-02-16 Razvan Crainea * [938ddfcf8] : cgrates: properly parse $cgr index Many thanks to Sergei Lavrov (@ccppprogrammer) for reporting it Close #2737 (cherry picked from commit b6c4beb3547ec2bcc1b8ad9e9f508c34064d19c1) 2022-02-15 Vlad Patrascu * [6d45f7478] : clusterer: fix crashes when loading bad local node URL from DB Closes #2746 (cherry picked from commit e9932270ba593f2c95f7cc572cbb67e0174040d9) 2022-02-15 Bogdan-Andrei Iancu * [b95fac711] : [uac_redirect] update script sample in docs Reported by Slava Bendersky (cherry picked from commit 14179bf7e0c7b3d5a3fe321cedc76afbcb9b4476) 2022-02-12 OpenSIPS * [45c6f7d37] : Rebuild documentation 2022-02-11 Vlad Patrascu * [99390287c] : b2b_logic: fix and document the b2b_terminate_call MI command Closes #2530 (cherry picked from commit 0a6b2607fcf3282c941e4dedae122ddfc2fd927a) 2022-02-10 Liviu Chircu * [498508d5e] : fraud_detection: Complete previous commit (cherry picked from commit dea72f1c47eca22b14773aa23e70158e21448382) 2022-02-10 Liviu Chircu * [637631a32] : fraud_detection: Fix the 'call duration' events The 'call duration' events were not being raised anymore since commit a0fcf857ddb, due to the mismatching callback type check in dialog_terminate_CB(). Also rework commit a0fcf857ddb, where instead of switching the decrement operation on the DLGCB_DESTROY callback (to guarantee it only gets called one time), we just store and use a boolean marker, thus achieving the same effect but while using the optimal callbacks! (cherry picked from commit 7aa272aec749702627404c0d518b4b4fada5ec93) 2022-01-29 OpenSIPS * [2ff20721a] : Rebuild documentation 2022-01-28 Vlad Patrascu * [8c129d4f3] : dialog: fix previous commit (cherry picked from commit 7ab192753b3d14a87357099cb830b8152c4c8bd7) 2022-01-28 Vlad Patrascu * [122c1e31c] : dialog: fix crash when dropping unsynced dialogs (cherry picked from commit da47168d02a9359de5f95ab83f6f040bbb7c9db9) 2022-01-28 John Burke * [8d0e21ff5] : db: add `DB_BLOB` to string parsing macro Mysql/Mariadb return BLOB type when `group_concat_max_len`<=512. This will only occur when using custom SQL schema for OpenSIPS tables (such as VIEWs). (cherry picked from commit 969a5a304df20b875d53259950c234f80c48d41a) 2022-01-28 John Burke * [42e41cef5] : domain: add support for `DB_BLOB` attrs type (cherry picked from commit 0ed1ee5726c470f95de40bfff04b8d47b73e9e86) 2022-01-28 Vlad Paiu * [12119c415] : Force re-connection on the new MySQL 4031 code ER_CLIENT_INTERACTION_TIMEOUT in MySQL and ER_REFERENCED_TRG_DOES_NOT_EXIST in MariaDB (cherry picked from commit cde6757a3ebaaea09949107c2a49536681c8a88e) 2022-01-26 Razvan Crainea * [e58aa5179] : cgrates: properly restore replication acc and dst Credits go to Barnaby Ritchley (from sipsynergy) for reporting it. (cherry picked from commit 914f95aeff075d61843b4b54d11f0e21af8d75cd) 2022-01-25 Vlad Patrascu * [c0edd56aa] : dialog: fix crash when receiving replicated cseq update Prevent crash when receiving a cseq update for an unknown dialog. The dialog may be already deleted due to timeout or other unexpected race conditions. Fixes #2651 (cherry picked from commit bd7f5e4b7ab215c4affe72e927013f0033088836) 2022-01-25 Razvan Crainea * [05b6376bf] : httpd: Fix compilation warnings with libmicrohttpd v0.9.70+ httpd: adapt implementation to microhttpd v0.9.71 (cherry picked from commit 62a8b3c5736526235c1751876f2f26905f1c16d8) 2022-01-25 Liviu Chircu * [5efe4e268] : httpd: Fix ending newline in DBG log (cherry picked from commit 29188a85d5da0bbcf2b28a0ccd041d29fd17e858) 2022-01-25 Liviu Chircu * [cc06f74dd] : mid_registrar: Skip usrloc callbacks for foreign domains In case mid_registrar is used alongside registrar using separate domains (location tables), then mid_registrar must not process any callbacks for Contacts/AORs which it is not responsible for. A similar logic should be added for registrar as well, however it currently does not subscribe to any usrloc callbacks. Fixes #2716 (cherry picked from commit 30cdbd674eb6a974088e531a8206659c494f5868) mid_registrar: Improve previous commit Check the domain list for duplicates before appending a new one. (cherry picked from commit c5d884e60d1a708fd49540b622c66cfb6eb170b1) (cherry picked from commit 4541680d32c52dd77e4ab8a802c19f95c3cd0ba1) 2022-01-22 OpenSIPS * [2ef094c50] : Rebuild documentation 2022-01-21 Vlad Patrascu * [76207e557] : xml: allow '.' character in node name Fixes #2420 (cherry picked from commit d28805f9bc10b8dce5dc2ec45ab953b46b14a76f) 2022-01-18 Liviu Chircu * [62f6cf888] : dialog: Add quotation mark escaping in get_dialogs_by_val() In case a dialog name/value contained the '"' character (ASCII 34), such as values stored by pua_dialoginfo, the resulting JSON would be invalid. Also optimize the function code a bit, by merging lots of DEC_AND_CHECK_LEN() calls together wherever possible. Credits to Giovanni Maruzzelli for a detailed reporting on this issue! (cherry picked from commit 2b6c3239da501ec4d4627c48d58bd723785566ba) (cherry picked from commit 9c53945bdde63060aa476459cb6ec579fb65d43e) 2022-01-18 Bogdan-Andrei Iancu * [a1a0f6d17] : [mid-registrar/registrar] fix setting default max_contacts Be sure max_contacts global limit is set even when there are no flags passed to hte save() function. Credits go to John Burke / @john08burke Closes #2727 (cherry picked from commit 1aa6aa2ceea2b50e9b84bb8354877dba61ab7141) 2022-01-15 OpenSIPS * [6a3cd7829] : Rebuild documentation 2022-01-14 Liviu Chircu * [b86ad0712] : PN PURR processing: Handle "no Route headers" as success If the ";pn-purr=" parameter is not present in the R-URI and the request has no Route headers to search for it, it is a non-PN request. So return a "success" return code (2), as there is nothing left to do here. (cherry picked from commit b1fed3e74ea3529f6b1190f8104bf4181d28ec9a) 2022-01-14 Liviu Chircu * [7f355cc6f] : speeddial: NULL-terminate commands array Completes ae4e8256 (cherry picked from commit 7756d34316e1bc21f4d800bea43308af50c3e9ea) 2022-01-14 Razvan Crainea * [ae4e82562] : modules: fix array termination in cmd_export_t Terminate the commands array with an NULL entry, as this breaks on some architectures that do add enough padding after the structure, and allocates it right next to the following structure. Many thanks to Dan Jenkins (@danjenkins) for reporting it! (cherry picked from commit 05115c42e40bc54c2210a1ab5b89607383e18343) 2022-01-12 Razvan Crainea * [634bfe90b] : tracer: prevent crash when xlog tracing broken msg Prevent crash generated by xlog tracing a SIP message that lacks Call-ID (cherry picked from commit 0925ce379e8af9e4297e3f17a07232e54549b105) 2022-01-10 Alexey Vasilyev * [d5b86135a] : [mid_registrar] Fixes expires parameter when it must be 0. Fixes #2722 (cherry picked from commit 5d50923f40000dd8e36404845d22d55e3c70ed0a) 2022-01-10 Vlad Patrascu * [03f2e3112] : sql_cacher: fix parsing of 'cache_table' with trailing newline Closes #2682 (cherry picked from commit 312ab9fa032e9cfca231519110e30286e1c804cf) 2022-01-08 OpenSIPS * [1468f05e5] : Rebuild documentation 2022-01-07 Gang Zhuo * [9e556ab25] : [db_oracle] fix crash when executing db_oracle_raw_query(), function db_oracle_submit_query() require that CON_ORA(_h)->pqdata is not null. (cherry picked from commit d0fdbc04b608f003cad0a68e0e48b269ff5d98a9) 2022-01-07 Gang Zhuo * [adc1caf66] : [db_oracle] Using DB_STRING as character type Fix https://github.com/OpenSIPS/opensips/issues/2706 All modules (e.g. load_balancer) using DB_STRING as character type to checking column type. (cherry picked from commit 36d98a7c53f4acaf9e476d1fe34f28ab4f9c4c43) 2022-01-07 Liviu Chircu * [0019f5510] : Fix some corner-case file descriptor leaks Credits to @ryancaicse for the analysis and report in #2714 (cherry picked from commit 3ca4d8ce7218865ee81ae201f332ba034be56ae3) 2022-01-04 Bogdan-Andrei Iancu * [ab5f0f807] : [sipcapture] Fix array-out-of-bound when converting proto ID to string/name Instead of using a local array for mapping the proto IDs to names, better use the core get_proto_name() function - this will avoid duble code maintaining and risks of looking up IDs out-of-bound. Closes #2671 (cherry picked from commit 7de9b15f8bbac3f1294c418ec1e4bbe9111e1454) 2022-01-04 Nick Altmann * [2f5ed39fd] : DEB packaging: add auth_jwt module package 2022-01-04 Bogdan-Andrei Iancu * [cb813ba24] : Fix race condition on reporting successful per-proc cfg reload Set the initial per-proc reload status (to SENT) before actually sending the IPC job, to avoid any race condition (in updating the status) with the IPC callback (ran in the target process). Fixes #2584 Many thanks to @etamme on providing the troubleshooting logs (cherry picked from commit e85072cd6e9f54d0a593449b87e492c488393301) 2021-12-25 OpenSIPS * [8e3045947] : Rebuild documentation =========================== Release 3.1.7 ============================== 2021-12-22 Liviu Chircu * [952a8a2e6] : Bump version to 3.1.7 2021-12-22 Bogdan-Andrei Iancu * [c3e46d4da] : [auth_jwt] fix sql raw query Use simple quoting for values and avoid mysql specific time functions - better push the unix timestamp values from opensips side. Reported by Jonathan Hunter via user's mailing list (cherry picked from commit 05212f01291fd939db42c6d16adbf25492a41348) 2021-12-18 OpenSIPS * [d5645d512] : Rebuild documentation 2021-12-15 Bogdan-Andrei Iancu * [5732f6b63] : Solve the problem of recognizing the local SIP msg We need a consistent and solid way to recognize the internanlly generated SIP msg (as a result of t_uac) - these are msg structs resulted from the parsing of buffers with SIP msgs (cherry picked from commit 02c6ed9eaa3751623f19ed160dc802e11862df3d) 2021-12-14 Bogdan-Andrei Iancu * [68988b989] : Revert "[topology-hiding] fix detection of the UAC requests" This reverts commit 62d0edb18838d10c38abb30834fa4e958fdc8128. 2021-12-14 Liviu Chircu * [fe2e8dfe7] : nathelper: Fix bug introduced in ecbd9856efb Credits to Alexey Vasilyev (@vasilevalex) for reviewing the commit and catching the regression! (cherry picked from commit 54bb91a373a2457ad5c5ccc22ab70bd4c83c01d8) 2021-12-11 OpenSIPS * [f9c19ed33] : Rebuild documentation 2021-12-06 Bogdan-Andrei Iancu * [62d0edb18] : [topology-hiding] fix detection of the UAC requests Use a more generix approach (check VIA2 presence) to see if we deal with a locally generated or proxyed requests. Fixes #2690, credits go to @bcnewlin for reporting. (cherry picked from commit abeeb36d77e05df4a4a3fc71af1f0795dc2a7e61) 2021-12-06 Bogdan-Andrei Iancu * [2b84ad085] : [core] build_res_buf_from_sip_req(): fix hdr correlation Issue discovered during OpenSIPS Security Audit 2021, by Alfred Farrugia & Sandro Gauci (Enable Security) https://github.com/OpenSIPS/opensips/security/advisories/GHSA-7pf3-24qg-8v9h (cherry picked from commit 9cf3dd3398719dd91207495f76d7726701c5145c) 2021-12-06 Bogdan-Andrei Iancu * [018cb953c] : [usrloc] fix contact matching on registrations handling instead of pron-to-error string matching, use the SIP wise matching when matching the registered contacts. The SIP URI matching is more complex, mainly when comes about the URI parameters - some important (user, transport, etc) params must be present in both URIs in order to match, other generic params may match even if the param is present in only one URI. Some devices may use during registration some proprietary params for the contact, but without sending the full list when re-registering or when deleting the contact - and this is perfectly ok from the perspective of the SIP RFC3261. Prior to the fix, in the above scenario, OpenSIPS will have failed to re-register or un-register the contact, leaking registrations. (cherry picked from commit 85e67d890cc0e225d1a4512ccb8cadc1a5090a41) 2021-12-04 OpenSIPS * [dbded91a6] : Rebuild documentation 2021-12-03 Vlad Patrascu * [6440d44f6] : db_text: return a valid empty string for a null DB value This prevents crashes in modules which do not check the null flag in the db result before using the string value (eg. doing strlen()). Fixes #2658 (cherry picked from commit ddbec155fc89d2085149f2debc66edecb0789554) 2021-12-02 Vlad Pătrașcu * [5d3514ed0] : Merge pull request #2676 from GangZhuo/issues-2649 [sql_cacher] When on demand mode, get column types at mod_init (cherry picked from commit 69966d71127f34b6dec1f4d2a4b431a9778f5d72) 2021-11-25 Liviu Chircu * [237997bba] : nathelper: Fix rare message corruption due to bitwise opts on strings Credits to Damien Sandras for the report and initial PR! Closes #2695 (cherry picked from commit ecbd9856efb7a420e2fceff6769951d307be8c03) 2021-11-24 Vlad Patrascu * [a49ca4642] : event_route: allow a 'route' subscriber to be used from event_virtual (cherry picked from commit 447a88a19c86fc4159e290b2aa8475e4db5ce551) 2021-11-23 Liviu Chircu * [33113c14f] : drouting: Allow 64-bit integers for dr_rules.sort_profile This allows SQL views to represent the NULL value as a 64-bit integer without getting rejected by OpenSIPS, which expected a 32-bit integer for that column. Admittedly, any 64-bit integer "sort profile" will now be truncated to 32 bits, but OpenSIPS had no full support for 64-bit sort profile values in the first place, so it's better to just truncate and NOT error. (cherry picked from commit 7fb5ddf64826bc9d6c1c3d3c0d58cf7275e748dc) 2021-11-23 Liviu Chircu * [36c3c25bf] : perl: Fix PKG corruption in perl_exec_simple() (off-by-one) Credits to Kingsley Tart for the report! Fixes #2666 (cherry picked from commit 38e67d4ce6bbfec9f30188cedfd73bd80b18e1bc) 2021-11-23 Liviu Chircu * [1bd755e0a] : perl: Allow perl_exec_simple() from any route This function is neither tied to a SIP message nor does it perform any SIP signaling, so we can call it from any route! (cherry picked from commit 4dbd2ced3a1db3326b7201c64bba165033ab2d95) 2021-11-20 OpenSIPS * [e63924130] : Rebuild documentation 2021-11-19 Bogdan-Andrei Iancu * [e6ad0ccfd] : [drouting] update docs on carrier sorting algorithms (cherry picked from commit 394ba080486f97f44afaf794fa82aba1f630b186) 2021-11-18 Vlad Paiu * [be332478e] : Fix ACK CSEQ generation for in-dialog RE-INVITEs where in-dialogs pings have been sent out Closes #2678 (cherry picked from commit aaa3831c6cc878abdc805a2538e62026d67117f8) 2021-11-18 Vlad Patrascu * [78a91ac75] : tls_mgm: fix possible crash when reloading from DB The crash would occur after multiple DB reloads when there are also TLS domains defined in the script. (cherry picked from commit f877f8752f3ce334924c2b22985c89997aa0ffc2) 2021-11-18 Liviu Chircu * [30029bdcc] : rest_client: Add the 'max_transfer_size' setting Sets a limit on the maximum size of a single download. May be important for security purposes, to prevent certain attack vectors such as malicious "x5u" certificate URLs in STIR/SHAKEN setups. Default: 0 KB (check disabled) Issue discovered during OpenSIPIt'02, by Alfred Farrugia & Sandro Gauci (Enable Security) (cherry picked from commit b56bba344e0c067ee7af53bdd1add9ed05b403f3) 2021-11-17 Liviu Chircu * [2f1727b2b] : proto_hep: Do not corrupt PKG memory if HEP3 buffer too small This patch makes proto_hep more stable in production, so it doesn't cause a crash if it reaches an unexpected state, such as "buffer too small" followed by overrunning the PKG buffer, for example: CRITICAL:core:qm_debug_frag: qm_*: prev. fragm. tail overwritten(f00000a000c0000, abcdefedabcdefa0) [0x7f1b840306c8:0x7f1b840306f8] (build_hep3_buf, hep.c:1347)! Now, the respective tracing will simply fail and OpenSIPS processing continues safely. Still, the original bug remains to be understood and addressed. Issue discovered during OpenSIPIt'02, thanks to Alfred Farrugia & Sandro Gauci (Enable Security) (cherry picked from commit 78e4356aee36eb4cc4b89f712462588c1af28470) 2021-11-15 Bogdan-Andrei Iancu * [7b0144959] : Proper stack of the AVP list when running the dialog specific routes Fixes #2464 Credits go to Ben Newlin for reporting and assisting with the fixing. (cherry picked from commit 7193c5d8d86fa527433eab8c2c2af4b40a76e275) 2021-11-13 OpenSIPS * [6284500ef] : Rebuild documentation 2021-11-12 Razvan Crainea * [4e40f0455] : pvar: allow $socket_out matching based on tags Do not force a port, if not specified in the socket's string, otherwise the socket will no longer match its token (cherry picked from commit 1e952a7f13c7e78faec1afc2667758d1e7825a54) 2021-11-12 Bogdan-Andrei Iancu * [6ac9795dc] : [core] fix parse_via() parsing Issue discovered during OpenSIPS Security Audit 2021, by Alfred Farrugia & Sandro Gauci (Enable Security) https://github.com/OpenSIPS/opensips/security/advisories/GHSA-wxfg-3gwh-rhvx (cherry picked from commit ab611f74f69d9c42be5401c40d56ea06a58f5dd7) 2021-11-12 Bogdan-Andrei Iancu * [1d4e56fc1] : [sipmsgops] fix parse_to_param() parsing Issue discovered during OpenSIPS Security Audit 2021, by Alfred Farrugia & Sandro Gauci (Enable Security) https://github.com/OpenSIPS/opensips/security/advisories/GHSA-qvj2-vqrg-f5jx (cherry picked from commit cb56694d290530ac308f44b453c18120b1c1109d) 2021-11-11 Bogdan-Andrei Iancu * [a23908d30] : [sipmsgops] fix codec_delete_XX() parsing (2) Issue discovered during OpenSIPS Security Audit 2021, by Alfred Farrugia & Sandro Gauci (Enable Security) https://github.com/OpenSIPS/opensips/security/advisories/GHSA-67w7-g4j8-3wcx (cherry picked from commit c6ab3bb406c447e30c7d33a1a8970048b4612100) 2021-11-11 Bogdan-Andrei Iancu * [ee115c0e0] : [sipmsgops] fix codec_delete_XX() parsing Issue discovered during OpenSIPS Security Audit 2021, by Alfred Farrugia & Sandro Gauci (Enable Security) https://github.com/OpenSIPS/opensips/security/advisories/GHSA-xj5x-g52f-548h (cherry picked from commit 8f87c7c03da55f9c79bd92e67fa2c94b2a7ce5cf) 2021-11-08 Bogdan-Andrei Iancu * [290e1ab55] : [core] improve logging when IPC blocking is detected Throw a CRITical log with info on the target process (cherry picked from commit dce2643e5716f082847a90e409c2156dde9e4852) 2021-11-08 Bogdan-Andrei Iancu * [bfac92714] : [core] make the per-process IPC sending non-blocking A process may get stuck (history showed us such real cases) and we do not want to have other processes getting blocked by trying to do an IPC to such procs (if they are stuck, they will not consume their IPC cmds, so the IPC sender will also block after some time, when the pipe's buffer is full). So, better make the write pipe non-blocking, discard the current IPC cmd and avoid escalating the blocking over other procs. (cherry picked from commit 62af720cd5a9d04d982b474398294ef5068e9f45) 2021-11-06 OpenSIPS * [2ec3238bf] : Rebuild documentation 2021-11-02 Bogdan-Andrei Iancu * [41d57ac56] : [core] fix printing cfg file context for errors after a reload_routes Reset the file context list each time a new cfg parsing starts, to be sure we do not inherite the context from a previous parsing. If we do not do this, when doing a reload_routes, if an parsing error occurs, we will get references and dumps (of the faulty lines) from the original, startup script, not from the reloaded one. (cherry picked from commit 52e51809ca219c97ea9e348f5dab6a109859eece) 2021-11-02 Bogdan-Andrei Iancu * [7ea9b66f4] : [core] proper re-init of cfg parser during reload_routes The lex parser needs an explicit reset/init after a parsing attempt completed with a parsing error. This is needed to be able to start a new parting session, via the route_reload MI cmd (cherry picked from commit 5dd7976c03b6364f307b993bfdff1d8c1c010aa0) 2021-11-02 Razvan Crainea * [5ac273d60] : db_sqlite: fix memory leak for row values (cherry picked from commit 06a35a635e71778342ee272411657040ecdcb0e6) 2021-11-01 Vlad Patrascu * [c493e01b4] : clusterer: fix internal traffic flood caused by node UP event The capability update broadcasting mechanism would generate an unncessarily large number of packets, especially for clusters of more than 6,7 nodes. (cherry picked from commit 32dbcbae74bfaec095849d8c0349ab2f7ecc97bb) 2021-10-30 OpenSIPS * [a49a9e7a3] : Rebuild documentation 2021-10-28 Razvan Crainea * [a162f8859] : ratelimit: always update last local used when pipe is accessed Thanks go to SIPNav for troubleshooting and providing a fix for the problem. (cherry picked from commit 668acafc90f807b97ffe55a887a1b30e492bb65c) 2021-10-27 Liviu Chircu * [d79487042] : parse_param_name(): Improve param parsing macros Issue discovered during OpenSIPS Security Audit 2021, by Alfred Farrugia & Sandro Gauci (Enable Security) https://github.com/OpenSIPS/opensips/security/advisories/GHSA-jrqg-vppj-hr2h (cherry picked from commit dd9141b6f67d7df4072f3430f628d4b73df5e102) 2021-10-26 Bogdan-Andrei Iancu * [80588ce7c] : Fix the DB saved description of the caller/callee sockets Use the internal description of the socket when saving in DB. This means using the socket TAG when defined, versus the proto:ip:port description. This is how the replication is also doing, to cope with potential changes of the socket IP during a replication. And in our case, during a restart. (cherry picked from commit 7aa24e1c1973fb56da2d03aceaf843b71e87c8b0) 2021-10-23 OpenSIPS * [2c0bbbf7f] : Rebuild documentation 2021-10-22 Razvan Crainea * [0952d98a4] : cgrates: search for ctx in trans as well when reading When reading a $cgr* variable, we shall also check if the context is stored in transaction, not only in the current processing ctx. (cherry picked from commit be1e32e5839c5dc71dd89be1506760de95c5df48) 2021-10-21 Bogdan-Andrei Iancu * [73d171c25] : [msilo] Fixed setting proper time in offline message (cherry picked from commit cc20f738b83f5a9c7f24630309ddb5bab889bf56) 2021-10-21 Bogdan-Andrei Iancu * [633697eee] : [msilo] Fixed len calculation for added time Reported by "jacky z" on user's mailing list (cherry picked from commit 9bc117953730a0ea761e3ceaeea9fee7facea2cc) =========================== Release 3.1.6 ============================== 2021-10-20 Liviu Chircu * [b19fc7edd] : Bump version to 3.1.6 2021-10-18 Liviu Chircu * [599b11593] : is_ws(): Play well with UndefinedBehaviorSanitizer (UBSan) Avoid bitwise shifting by 31 of a signed integer type. Practically, this patch does not fix any bug on the widely used arches (the resulting assembly is 100% the same on these), but at least it makes the code more C-standards compliant. OSS-Fuzz#39920 (cherry picked from commit 6581e0efeace51234932d97621aaa1636ad56cc3) 2021-10-16 OpenSIPS * [c2283365a] : Rebuild documentation 2021-10-13 Razvan Crainea * [faf3515b8] : fraud_detection: allow empty prefix (cherry picked from commit ae8ec85b8b04703948846f871d6f6e18ce484c6a) (cherry picked from commit 8aabc2049832dc4fce87d7e8bad3b676d702c53c) 2021-10-11 Răzvan Crainea * [a52fc6825] : Merge pull request #2614 from danlshields/dshields/wsPartialExtendedLength Wait for more data if WS header doesn't have extended length yet (cherry picked from commit 078c57b515e0f3a2111205e058d431817d9e1d42) (cherry picked from commit debe7c928d2630b324ead288a7d280e1810d5f1a) 2021-10-11 Nick Altmann * [891fd513b] : RPM package: don't build smnpstats for fc==33 because of broken lib 2021-10-10 Nick Altmann * [3e48737a6] : RPM package: stop docs recoding 2021-10-10 Nick Altmann * [de35b2b53] : RPM package: don't build smnpstats for fc>=34 because of broken lib 2021-10-09 OpenSIPS * [23af830e7] : Rebuild documentation 2021-10-08 Razvan Crainea * [67eb12686] : cgrates: make sure default connection can reconnect (cherry picked from commit e941c1f248116fcee608ef0f2b7b5b54b1671dd3) 2021-10-08 Razvan Crainea * [c990e6ab1] : Fix crash in parse_sdp when a= is empty When a bogus SDP was provided, with an empty `a=` line, there was no check for the length to be compared, resulting in a bad memory access, hence a crash. Issue discovered during OpenSIPS Security Audit 2021, by Alfred Farrugia & Sandro Gauci (Enable Security) (cherry picked from commit 2617c97207b1fe2afead9f887f7a5df4da3b7d55) 2021-10-06 Vlad Patrascu * [25f379051] : proto_tls/wss: fix trace message for successful connect 2021-10-06 Vlad Patrascu * [1f780f072] : proto_tcp/tls/ws/wss: fix doc example for trace_destination (cherry picked from commit cc00b7fb53c834f198c34e48a63b02b54916b027) 2021-10-05 Razvan Crainea * [910014e74] : sipmsgops: disable stream when all codecs are deleted (cherry picked from commit 5f9c333d45242c7caa55513f2d84cad8fe24547c) 2021-10-02 OpenSIPS * [9a8365624] : Rebuild documentation 2021-09-30 Razvan Crainea * [34b982b26] : cgrates: returning a non-object response is not a problem (cherry picked from commit f7f66d39baef10ce0db4fce02119c23454dca940) 2021-09-28 Liviu Chircu * [0ea900e5c] : mid_registrar: Fix regression introduced in c11f92698 Avoid re-using anonymous structures outside of the block scope they were declared in, as the compiler may easily re-use that stack memory outside the given scope. Credits to Andrew Yager for providing debugging info, as well as bisecting down to the exact culprit commit! (cherry picked from commit 8df8fd960b3311487b58e10244023ca547884536) 2021-09-25 OpenSIPS * [40017d2fd] : Rebuild documentation 2021-09-24 Vlad Patrascu * [63359e868] : dialog: match replicated dialogs by did This fixes issues in call looping scenarios when trying to replicate multiple dialogs with the same SIP coordinates. (cherry picked from commit b3c31fbff198ee551b62dcf42ef7e2e45d2e8fcf) 2021-09-23 Bogdan-Andrei Iancu * [7917c4299] : Fix the timeout for wait_for_event() Even if a timeout is provided, it was not taken into account, leading to a potential permanent blocking of a request execution thread if there was no event ever delivered to it. 2021-09-18 OpenSIPS * [c38c59072] : Rebuild documentation 2021-09-16 Liviu Chircu * [0dfa49caf] : rtpproxy: Document adv+weight socket syntax; Improve dbg log (cherry picked from commit 067b547e98504eca688fb6e20977a00b17c63b34) 2021-09-14 Liviu Chircu * [a5d011ee8] : proto_bin docs: Fix 'bin_port_send_timeout' typo (cherry picked from commit 48aba0aed73af04f9860936a204496b9006d01af) 2021-09-14 Liviu Chircu * [d0ce8e553] : dialog: Fix missing unlock ops on DB load error-cases This patch fixes some startup deadlocks in case a dialog loaded from database has an incorrect DID (failed checksum check) or if OpenSIPS runs out of shared memory while importing dialogs from DB on startup. (cherry picked from commit 9e8d36c34390d18d5996121deddcce5cd143830f) 2021-09-11 OpenSIPS * [34ac9e781] : Rebuild documentation 2021-09-10 Razvan Crainea * [651e9c78a] : cgrates: make MaxUsage optional for InitiateSession reply In newer versions of CGRateS, MaxUsage is no longer returned - this means that the session should be allowed without any duration limitation. (cherry picked from commit ae596cccbcb89c9d66a6878421fd672201856f09) 2021-09-04 OpenSIPS * [18be6e883] : Rebuild documentation 2021-09-03 Razvan Crainea * [02e898b23] : rtpengine: only add mux flags if answer/offer (cherry picked from commit c342ab0633b5a774b81c1eedcefc17bf43474ce4) 2021-08-21 OpenSIPS * [c528ada09] : Rebuild documentation =========================== Release 3.1.5 ============================== 2021-08-19 Liviu Chircu * [1c1c7ff69] : Bump version to 3.1.5 2021-08-19 Razvan Crainea * [4330d9578] : 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 * [a7965974f] : cfg: enhance description when an unknown route is called (cherry picked from commit ca9f428a4d59a9b40ebd7235edf545e9609ddfeb) 2021-08-19 Liviu Chircu * [4b87fa2ab] : 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.1.4 ============================== 2021-08-17 Liviu Chircu * [676b30aab] : Bump version to 3.1.4 2021-08-17 Liviu Chircu * [73c5ce1a6] : 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 * [c266e8c87] : 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 * [0370387c4] : 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 Bogdan-Andrei Iancu * [35cf96e2c] : 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. 2021-08-16 Vlad Patrascu * [c6369b40d] : 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 * [e470700f9] : packaging/debian: fix Debian Bullseye build 2021-08-14 OpenSIPS * [ad79c6fc8] : Rebuild documentation 2021-08-13 Liviu Chircu * [907023eb1] : 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 * [977dd04f2] : 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 * [f0f6a22f3] : 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-11 Bogdan-Andrei Iancu * [3b8bdb794] : 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 2021-08-10 Norm Brandinger * [ac6f3a202] : 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 * [8b24f54a7] : Fix spelling (cherry picked from commit 41b4a018af55f08815dec7e19001d68442e19370) 2021-07-31 OpenSIPS * [b333a222f] : Rebuild documentation 2021-07-30 Vlad Patrascu * [19a50a190] : 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-29 Vlad Patrascu * [68ddeed61] : 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-28 Razvan Crainea * [985bdfa3d] : 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 * [f70fd8dce] : 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-24 OpenSIPS * [6dfe68806] : Rebuild documentation 2021-07-21 Vlad Patrascu * [91d97516d] : b2b_logic: overwrite existing context keys when using b2b_bridge_request() Closes #2424 (cherry picked from commit ba3bd6f4d18b2edca3ba942545aa3524d44f08e4) 2021-07-21 Razvan Crainea * [abb79b0e3] : 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 * [0987cffe6] : 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 * [49609290c] : 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 * [6782f5422] : 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 * [4a90daeed] : 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 * [7bbe1acac] : 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-20 Nick Altmann * [36d0957a4] : stir_shaken: fix cherry-pick issue 2021-07-17 OpenSIPS * [e5def93b1] : Rebuild documentation 2021-07-16 Razvan Crainea * [2bb958213] : mi_fifo: proper parse multiple commands received at once 2021-07-15 Vlad Patrascu * [231529468] : 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 Liviu Chircu * [eb38a5099] : Merge pull request #2572 from Shkiperon/3.1-fix-rate-cacher Fix crash when vendor hasn't price for prefix 2021-07-13 Artiom Druz * [be9caba4a] : Fix crash when vendor hasn't price for prefix 2021-07-10 OpenSIPS * [698f95ccc] : Rebuild documentation 2021-07-09 Bogdan-Andrei Iancu * [e77830b83] : [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) (cherry picked from commit 3f053873f05b5b6eaf15670083f6f0a4fc938544) 2021-07-07 Liviu Chircu * [51643e897] : tls_mgm: Print the OpenSSL error stack after library errors This may help with debugging some certificate or key loading issues. Thanks to @ovidiusas and @JeffreyVIP for the suggestion 2021-07-07 Bogdan-Andrei Iancu * [a9c4bb883] : Fix deadlock upon BUG/ERROR report Credits for finding this issue go to Damien Sandras @ Seconix (cherry picked from commit 2e042353ecdaa14cc3e901478c07965830ee5a3b) 2021-07-06 Vlad Patrascu * [b982e2eff] : 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 * [af1481052] : Be sure there is no "exit" between setting the PS and running the query 2021-07-06 Bogdan-Andrei Iancu * [d28153a0c] : Fix misuage of CON_RESET_CURR_PS in a while() loop Be sure you set CON_RESET_CURR_PS for each query at a time (while looping). Partial backport of #2470 Credits go to @wdoekes 2021-07-05 Razvan Crainea * [4b218ad2d] : 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 * [9902dda66] : 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 Liviu Chircu * [02e9b8539] : 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-03 OpenSIPS * [cb7450462] : Rebuild documentation 2021-07-02 Liviu Chircu * [635ce30f7] : 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 * [d1ba33683] : Fix ARM32 warnings (cherry picked from commit e89b09e9eac4dfd4ac6673b9b7aaed9610466384) (cherry picked from commit 6fc17804e8f5ee6769dd5a1dfb794852b66afe5c) 2021-07-01 Liviu Chircu * [c09421db7] : 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-06-28 Bogdan-Andrei Iancu * [c893c2378] : Fix pkg memory leak when building pres ID. This leak was introduced durin the 29e86ddf2b rework Reported by Bernard Buitenhuis 2021-06-26 OpenSIPS * [553603552] : Rebuild documentation 2021-06-22 Liviu Chircu * [c9450c8d4] : 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 * [43ac874ff] : 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 * [387bfe5ba] : Dialog module: skip bogus dialogs when loading from DB (cherry picked from commit dd6cab3dac6d0c87f04aab4ff3d0027282098a06) =========================== Release 3.1.3 ============================== 2021-06-22 Razvan Crainea * [d576a0659] : bump version to 3.1.3 2021-06-22 Liviu Chircu * [ae1ffaf89] : 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 2021-06-22 Liviu Chircu * [4b6097de4] : 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) 2021-06-19 OpenSIPS * [0b4d365e1] : Rebuild documentation 2021-06-18 Liviu Chircu * [bcb8ad95b] : 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 * [cdd7eb44e] : 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 (cherry picked from commit b03cb41a3155623ba15bbde582e46f1f55864f70) 2021-06-17 Liviu Chircu * [65feaf1b7] : 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-17 Liviu Chircu * [9a592a8cc] : registrar: Update the Contact URI on param-based matching (cherry picked from commit 8cc4b3249625802f2b3a11fb5f8b264cae6c6a11) 2021-06-15 Bogdan-Andrei Iancu * [48010230a] : 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 (cherry picked from commit 6a89cb8eb1f62578a71fa43353c564a7ea69c685) 2021-06-15 Razvan Crainea * [a4ca05eb5] : presence: fix memory leak when receiving an unmatched replicated publish (cherry picked from commit d1d898878555abe48cd3584ab1f3a8fe6f84ced7) 2021-06-12 OpenSIPS * [6298c80e2] : Rebuild documentation 2021-06-11 Razvan Crainea * [b45d73648] : b2b_entities: cover all cases where param is not printable Completes commit 0bd7fbe7 (cherry picked from commit 8ea5ce536664083b526e7fcf567e624bf9b7fe78) 2021-06-10 Vlad Patrascu * [d7bba42b3] : b2b_entities: run the create callbacks for the proper entities (cherry picked from commit 39f7aefb031ddafa5bd9dcebf0f8875f9d4c03fb) 2021-06-10 Vlad Patrascu * [317d1f6b1] : b2b_entities: fix entity type in create callbacks (cherry picked from commit 291417cc1f6564c6fe72dba50dd6adc5d5c86793) 2021-06-08 Bogdan-Andrei Iancu * [7ccf9088b] : [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-07 Liviu Chircu * [b433bd0b3] : 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-05 OpenSIPS * [907a9aea0] : Rebuild documentation 2021-06-04 Liviu Chircu * [60d62837e] : 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 * [8ffc647af] : 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 2021-05-29 OpenSIPS * [701337810] : Rebuild documentation 2021-05-28 Liviu Chircu * [7ab67f684] : MySQL DB migration: Remove duplicate tables 2021-05-27 Bogdan-Andrei Iancu * [00bdca20f] : [db] fix docs to point to 3.1 modules 2021-05-26 Bogdan-Andrei Iancu * [f63233ca3] : Fix debug message to properly show the tag's status (cherry picked from commit 0ccb7c89d04b68ef7b336476cc453bab0b06ae4c) 2021-05-25 Razvan Crainea * [d6e2aff37] : 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. (cherry picked from commit c2814f3be510ecaf7cb2a438e367597ff4e59360) 2021-05-25 Razvan Crainea * [a87c262ee] : cgrates: reset NULl flag if the variable is set (cherry picked from commit 9ea46a1f79d10fb9dc1cd29e25fa80d07720e89c) 2021-05-24 Razvan Crainea * [b10309fa4] : mi_fifo: fix syslog protected_fifos setting Credits go to Liviu Chircu (@liviuchircu) for spotting the error. (cherry picked from commit adf18b0333fbef4fad61dc98b090b2b91aa37e76) 2021-05-24 Razvan Crainea * [bd6ead32c] : 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 (cherry picked from commit 0882e7d6fc43ae6bd5f3c734144ff490582d775d) 2021-05-24 Razvan Crainea * [be9191c9d] : mi_fifo: proper print of fifo mode error (cherry picked from commit ba730cd8bcb0ff8391b8012762ed6325a324330c) 2021-05-23 OpenSIPS * [a06e3d721] : Rebuild documentation 2021-05-20 Razvan Crainea * [63cd8ea3c] : event_route: fix documentation typo (cherry picked from commit 5414d5b34164286c4935cfe5283ed020802a7fae) 2021-05-20 Razvan Crainea * [3d4316620] : statistics: turn on total pkg statistic (cherry picked from commit 886466543f85655bd83cab263c5de5eb7455917a) 2021-05-16 OpenSIPS * [19673e514] : Rebuild documentation 2021-05-10 Liviu Chircu * [9de82858b] : drouting docs: Fix modparam types (cherry picked from commit 7f7118bbfaf984426a180f1c31d98ac2c228bc64) 2021-05-09 OpenSIPS * [f4473776c] : Rebuild documentation 2021-05-07 Razvan Crainea * [5cdfedebb] : 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. (cherry picked from commit e13d0620407aa7e9b5a2905f76432e4c940dfc8b) 2021-05-07 Razvan Crainea * [c72c82dfc] : 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. (cherry picked from commit 40e660d74470ac14643b20a952dd8ebe21454480) 2021-05-06 Liviu Chircu * [39b54fd9f] : Packaging: Fix tarball URL for BSD systems 2021-05-06 Liviu Chircu * [539ab0b3a] : topology_hiding: Fix Clang warning on Xenial =========================== Release 3.1.2 ============================== 2021-05-06 16:38:09 +0300 Liviu Chircu * [b60b42376] : Bump version to 3.1.2 2021-05-05 13:09:59 +0300 Liviu Chircu * [136437c05] : Function fixups: Include file + line-num 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 Credits to Kingsley Tart for the report! Related to #2492 2021-05-02 00:06:08 +0300 OpenSIPS * [662025a65] : Rebuild documentation 2021-04-27 12:16:29 +0300 Walter Doekes * [ec0a7e6fc] : 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. (cherry picked from commit ad7a1c1d45b193bccd4893b24d54d340e6c65fbd) 2021-04-26 14:37:49 +0300 Walter Doekes * [fddb7eafb] : 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.) (cherry picked from commit 50fe41d2d07fffab91f22034518c2cf1cb631a3d) 2021-04-26 14:00:14 +0300 Liviu Chircu * [82085f5e5] : 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] (cherry picked from commit 4e43db731a5500163141607d9400e42a74d2f293) 2021-04-26 14:00:11 +0300 Liviu Chircu * [35b691815] : 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 (cherry picked from commit fc88b2c99238c85c53fabf363b5ba1393d54c10d) 2021-04-26 14:00:06 +0300 John Burke * [1b4ff6da6] : [rest_client] Fix async connection logic Fixes #2483 (cherry picked from commit 98c6652a08869f5eb82295c9e6b8a419a8e1b128) 2021-04-25 00:05:25 +0300 OpenSIPS * [bbf58fc14] : Rebuild documentation 2021-04-22 10:32:35 +0300 Razvan Crainea * [117839574] : dialog: only raise event if someone is listening (cherry picked from commit f5f85b677cceeb3ccf6c46a8f7428bc88652a977) 2021-04-21 19:24:27 +0300 Razvan Crainea * [f86c42459] : 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 (cherry picked from commit a8e98f9db99461a324edaefe51614a9080c6ab8e) 2021-04-21 19:17:55 +0300 Răzvan Crainea * [0157ad9db] : Merge pull request #2479 from john08burke/rtpengine_rtpproxy_cookie Fix cookie collision when using rtpengine/rtpproxy modules 2021-04-21 11:15:19 -0500 John Burke * [cc851498a] : Instead of summation, use combination schema for cookie: `PID_RAND_SEQN` 2021-04-21 09:26:47 -0500 John Burke * [e6cfd6f3c] : 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 2021-04-20 20:00:31 +0300 Aleksei Vasilev * [1683dfbc9] : [tls_mgm] Store IPv6 address in full form for TLS domain matching Fixes #2474 (cherry picked from commit eca45b73133b588b6de010a850b8044a9d637c8d) 2021-04-20 18:27:28 +0300 Bogdan-Andrei Iancu * [e3f843cc4] : 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 (cherry picked from commit ef3518bf2c4035821fab1c87a621182a623c3493) 2021-04-20 18:21:05 +0300 Razvan Crainea * [98b71f84f] : 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. (cherry picked from commit 065784586cd83fd6af53c7121763edcfa2ca999e) 2021-04-20 18:21:05 +0300 Razvan Crainea * [b8647ad6f] : 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. (cherry picked from commit 6a920dd3fd1e5605d08acbd79b0b9e9994008d00) 2021-04-17 23:54:23 +0300 OpenSIPS * [fda62f957] : Rebuild documentation 2021-04-16 17:04:22 +0300 Razvan Crainea * [5694adcf7] : dialog: allow dialog timeout set by different modules Addresses ticket #2380 opened by Adolphe Cher-Aime (@acheraime) (cherry picked from commit e3fdc964fad17488b92fb184beb8127405983aec) 2021-04-16 11:45:01 +0300 Razvan Crainea * [6a7e094eb] : stats: deprecate 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. This commit simply prevents updating the statistic, as it is not reliable. Reported by Ben Newlin (@bcnewlin) in Ticket #2460 2021-04-15 14:27:22 +0300 Liviu Chircu * [080198e0f] : Update contributors (cherry picked from commit 7b87cbc036ebd58ffff334bad99f05549b38e37c) 2021-04-15 14:26:22 +0300 Liviu Chircu * [70905f480] : stir_shaken: Fix two OpenSSL BIO memory leaks Patch provided by John Burke Fixes #2472 (cherry picked from commit 129834d125e3179ae60e56e4fc485b1ad74f9cc7) 2021-04-15 13:16:15 +0300 Liviu Chircu * [11995a0a6] : 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 and Alfred Farrugia (Enable Security) for helping uncover this issue! Issue discovered during OpenSIPIt'01 (https://opensipit.org/) (cherry picked from commit db899f6df1110463935ce57745f82294a55f6f7a) 2021-04-14 21:10:50 +0300 Liviu Chircu * [4df77bd47] : stir_shaken: Fix missing "return -1;" statements Issue discovered during OpenSIPIt'01 (https://opensipit.org/) (cherry picked from commit ecf5d64d52626cdc00cd935352115878f1442311) 2021-04-14 21:10:46 +0300 Liviu Chircu * [d7531e2d5] : 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/) (cherry picked from commit d6aa971e336509a98e879d0fe63ce926d647165d) 2021-04-14 16:20:56 +0300 Razvan Crainea * [b2ccb7192] : dialog: add event_id_format param This parameter is used to specify the format of the dialog identifier in the `E_DLG_STATE_CHANGED` event. It was added to prevent the event's compatibility with previous 3.1 versions, but also allow the possibility to have the id in a usable (hex or DB) form. This is sort of backport of e3221aa1 and a fix of #2463 2021-04-14 15:53:21 +0300 Liviu Chircu * [263e19aea] : 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/) (cherry picked from commit 9c9cce6f366d4313469f06cdf5760332ebf77287) 2021-04-14 15:14:10 +0300 Razvan Crainea * [3c29d422e] : 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. (cherry picked from commit af6399101a3c13e2d22fd4fbdcfea954bed82636) 2021-04-14 09:48:47 +0300 Liviu Chircu * [7ca7cf6d2] : 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/) (cherry picked from commit 46e4d143384b110bd21f76f547c36ac522d90432) 2021-04-12 18:37:14 +0300 Bogdan-Andrei Iancu * [3e03f2b50] : Fix internal detection of DUMMY messages. Closes #2464 (cherry picked from commit faafd673dddf2c0784e570565c2c18dcb5520f36) 2021-04-12 16:17:10 +0300 Liviu Chircu * [7cff7b60c] : 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. 2021-04-12 16:11:03 +0300 Liviu Chircu * [b3f511f7b] : 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.) 2021-04-12 16:03:13 +0300 Liviu Chircu * [140e4c0ef] : 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. 2021-04-12 15:53:13 +0300 Liviu Chircu * [76e42a25c] : dprint.h: Add LM_GEN() macro (generic logging with prefix) (cherry picked from commit ab447c15a477d6b9abddf3904a2ea1d6cd5dbdf9) 2021-04-12 15:15:45 +0300 Liviu Chircu * [35009a868] : 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. 2021-04-10 23:54:29 +0300 OpenSIPS * [96aef79a6] : Rebuild documentation 2021-04-10 22:41:42 +0300 Vlad Patrascu * [01b10b87d] : 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. (cherry picked from commit 8c842cc33dae524df1a76775e8f29f3981a87d8f) 2021-04-09 21:55:09 +0300 Vlad Patrascu * [6982c0dfb] : mi: improve error message for generic server errors (cherry picked from commit aad28f39c502944f810a7418563fb76e13a9e012) 2021-04-09 21:54:58 +0300 Vlad Patrascu * [7d462f117] : 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 (cherry picked from commit e9627e9dc4f1002a8980980aea0bfdfb1fa05e8b) 2021-04-09 21:54:50 +0300 Vlad Patrascu * [19a500827] : mi: include more details in invalid params errors (cherry picked from commit dc4199b15047e924e71efc5e76def92822f28a66) 2021-04-09 21:48:52 +0300 Vlad Patrascu * [b6aeba98d] : mi: fix possible crash when optional params are missing (cherry picked from commit fd10448de2ff0ff7f4b4c2780d54e84dcd0b3796) 2021-04-09 16:54:54 +0300 Razvan Crainea * [65b46950e] : dialog: fix docs about the default value of `dlg_id_column` param (cherry picked from commit a64635706c48e7bc014fe1cb50dc458dd0be3644) 2021-04-06 15:07:34 +0300 Bogdan-Andrei Iancu * [ac2ce9960] : Fixed tracing of the CANCEL replies 2021-04-06 09:06:35 +0300 Razvan Crainea * [b463132c1] : 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. (cherry picked from commit 50858e8aa823f9f4b4ff3bd0b8f069d1df3d25c8) 2021-04-05 13:03:13 +0300 Razvan Crainea * [a37693b7e] : 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 (cherry picked from commit fa027d00b419ffd10c5b52dd4577ad07ff601655) 2021-04-05 10:47:36 +0300 Răzvan Crainea * [5a95f0a0a] : Merge pull request #2447 from bambyster/fix_for_makefile_defs Fix for Makefile.defs (cherry picked from commit 23d8f38fbc06b12461ad57bdfd54268d6b13b8f8) 2021-04-05 10:46:50 +0300 Razvan Crainea * [0d3442d74] : Makefile.defs: add clang compiler handling for mode=debug Credits go to Andriy Pylypenko (@bambyster) for spotting the issue (cherry picked from commit 40b968fb87eef74cf031ed079b60378b839fe898) 2021-04-05 10:46:09 +0300 Razvan Crainea * [26b42b61f] : transfromation/regex: remove unnecessary regex limitation Thanks go to Calvin Ellison for reporting this in the mailing list Completes 6e1afe64 (cherry picked from commit a8f8aabc245ca86bd40a9eddf9befcd74a087be1) 2021-04-05 10:07:59 +0300 Bogdan-Andrei Iancu * [0ccb52c0d] : Fix tracing the outbound ACK in transactional tracing (cherry picked from commit 8684370eb7af2137324cc81fc3cd28e45ed0eb3e) 2021-03-27 23:54:17 +0200 OpenSIPS * [a000a66ab] : Rebuild documentation 2021-03-25 17:27:59 +0200 Razvan Crainea * [ea75892f0] : 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) (cherry picked from commit 3f964878b0f9585934c769bfe3f3c184a186cde7) 2021-03-24 17:09:31 +0200 Walter Doekes * [ba7d6a7b2] : 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 "); 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 "); - 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 "); + 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. (cherry picked from commit 18932e3db8fcb3892d6da6dcbce5517dd8ea529a) 2021-03-22 17:51:54 +0200 Razvan Crainea * [1f04ed427] : b2b_entities: retransmission ACK with SDP for late negociation (cherry picked from commit b38e8ff5e8a489c724446571e5e4172743d95074) 2021-03-22 12:08:23 +0200 Liviu Chircu * [f16ffc172] : Merge pull request #2441 from zooptwopointone/3.1 Fix memory cleak from freeswitch events. 2021-03-21 17:58:04 +0000 rance * [3d9d0f4f6] : Fix memory cleak from freeswitch events. 2021-03-20 23:54:40 +0200 OpenSIPS * [a09596497] : Rebuild documentation 2021-03-19 13:13:46 +0200 Liviu Chircu * [5ad179b12] : 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!) (cherry picked from commit 92541f2d2a19e5f9d1535ac1130c4ae5c66182f9) 2021-03-19 13:12:46 +0200 Liviu Chircu * [3a7818d1d] : -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. (cherry picked from commit 32e41a8c1880f04563695c28903991d3c43a55df) 2021-03-19 10:54:20 +0200 Liviu Chircu * [636760b1d] : drouting: Fix incorrect is_from_gw() examples Reported by Alexey Kazantsev (cherry picked from commit c64d8cb3d3149c1900e390bab655cbed2608bc8a) 2021-03-18 13:42:48 +0200 Razvan Crainea * [6c864516a] : 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 (cherry picked from commit 68806c4b079c7601941785decc9824cfe78c3d27) 2021-03-18 12:45:28 +0200 Razvan Crainea * [7e5d29cbf] : 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 (cherry picked from commit 855467245a5f60dcd4b66bee709da354ce9cb622) 2021-03-18 11:50:23 +0200 Liviu Chircu * [5812e391c] : drouting/qrouting: Avoid trailing " " in MI responses (cherry picked from commit c4eb952cc4a4a9e0224826aeb9c22e524249974c) 2021-03-18 10:17:01 +0200 Bogdan-Andrei Iancu * [b2ac8a2b2] : 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-16 19:27:17 +0200 Liviu Chircu * [83d0e35df] : 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 :-) (cherry picked from commit 0395eaf80d0b70dc1b4200beb22e97fb8ab5426e) 2021-03-16 17:33:58 +0200 Bogdan-Andrei Iancu * [c1c3c0bc5] : 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) (cherry picked from commit 68cca59e450b95f921c01ff00007566ea408180d) 2021-03-15 23:55:36 +0200 Vlad Patrascu * [5897b2294] : proto_tls/wss: complete fix in commit b6b7520 (cherry picked from commit dac973404b43b148f91d7fae66417d864f3c047d) 2021-03-15 23:47:36 +0200 Vlad Patrascu * [00090791c] : 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. (cherry picked from commit b6b7520024561c3cc65d272e038992adc0825fc7) 2021-03-15 12:11:39 +0200 Liviu Chircu * [d2a561f40] : Merge branch 'zooptwopointone-3.1' into 3.1 2021-03-15 12:09:57 +0200 Liviu Chircu * [1597913dc] : Merge branch '3.1' of https://github.com/zooptwopointone/opensips into zooptwopointone-3.1 2021-03-15 10:45:53 +0200 Peter Lemenkov * [5a4029c2c] : 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. Signed-off-by: Peter Lemenkov (cherry picked from commit d7145869e72fd9f0763847009e761af86bbcb0fa) 2021-03-15 10:36:15 +0200 Liviu Chircu * [f54af09bd] : dispatcher: Fix algorithm 9 regression Completes commit d9d1b9660b. Credits to John Burke for the report! Fixes #2413 (cherry picked from commit 9611e8680002f1cf226d17b44dfe136fefdeb24b) 2021-03-13 23:54:00 +0200 OpenSIPS * [ff9e515de] : Rebuild documentation 2021-03-12 15:23:16 +0200 Razvan Crainea * [4191307c9] : b2b_entities: don't require to_tag if empty (cherry picked from commit 963d87a932ec2e3eb7d0f3a9567ebd6ad3c93fa2) (cherry picked from commit 18a106147369312380591912abb10ecf9317874a) 2021-03-12 14:43:50 +0200 Liviu Chircu * [765c197bc] : db_sqlite docs: Remove extraneous wall of text Reported by Nick Altmann (cherry picked from commit b8166f56708395214e1ffacd661a62098b5c3ce5) 2021-03-11 17:46:31 +0200 Liviu Chircu * [0b2e7d119] : Module docs: Fix obsolete SIP authorize / challenge examples (cherry picked from commit 0236912c7b83c2bb562b0f0a6366f23f8cc713da) 2021-03-11 16:47:15 +0200 Liviu Chircu * [367b51946] : clusterer: Simplify/Improve cluster_check_addr() docs (cherry picked from commit 593ff1e9c7624f5db8d2656538489f04d4441e70) 2021-03-11 16:15:25 +0200 Liviu Chircu * [84d008969] : drouting docs: Avoid str vs. int confusion (cherry picked from commit 635ef0480a2c2827c862124499d304b4e4ff9ab2) 2021-03-09 22:34:29 +0000 rance * [0faf4d1b2] : Fix memory leak with Sockets not being cleaned up. 2021-03-06 23:53:42 +0200 OpenSIPS * [ee08dc9e9] : Rebuild documentation 2021-03-03 19:54:57 +0200 Liviu Chircu * [424dc58ce] : qrouting: Fix bad column names during reload Many thanks to Abdoul Osséni for the report! (cherry picked from commit 39e5dfd6d3951436431e230049b3233996c51f73) 2021-03-02 17:42:29 +0200 Bogdan-Andrei Iancu * [b55c85d03] : Migrated to the global DUMMY SIP msg support This is a completion to the 84d1bad2c41b4b58170c0943edd837b08d15012f (cherry picked from commit 2d5420ab2cf336f0d7da641f31444a1438086f42) 2021-03-02 16:54:39 +0200 Razvan Crainea * [8ecf22f10] : [evi] Migrated to the global DUMMY SIP msg support (cherry picked from commit 666959e193589b54c15418aadb42b52d0025d120) 2021-03-02 13:24:04 +0200 Razvan Crainea * [82b8a7360] : dialog: enhance errors when dlg cannot be inserted in db (cherry picked from commit 699832c98460aada6ed839847a9973cabad80fc5) 2021-03-02 13:16:28 +0200 Liviu Chircu * [eca0d2d3a] : db_mysql: add debug for failed to create ctx err (cherry picked from commit 24432524eee9057d4c71902a7c99087d0b7768f8) 2021-03-02 13:13:06 +0200 Liviu Chircu * [cf97bc573] : db: add extra logging for bogus integers (cherry picked from commit 8da72779af114cef12da52e0d60888480416fbc4) 2021-03-01 19:55:25 +0200 Bogdan-Andrei Iancu * [29e86ddf2] : 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. 2021-02-27 23:53:49 +0200 OpenSIPS * [9d37433f5] : Rebuild documentation 2021-02-24 16:49:20 +0200 Liviu Chircu * [29b395d97] : 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 (cherry picked from commit ed74875df66219e6e59a65f3f2f9a8a26dfb2e95) 2021-02-24 14:06:50 +0200 Liviu Chircu * [50b2dfe46] : 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) 2021-02-24 12:27:24 +0200 Dan Shields * [50611a91e] : Use DBG level for per-connection nominal log messages (cherry picked from commit a595cf17419d9c94148718383eaca2adcfaf9332) 2021-02-24 12:21:10 +0200 Fabian Gast * [acda46011] : Fix wrong route type in error message (cherry picked from commit 786fd9b96b1e5e3492e527e2fd0e14dcabbe381c) 2021-02-20 23:54:09 +0200 OpenSIPS * [a98b3b5e0] : Rebuild documentation 2021-02-18 15:14:06 +0200 Vlad Patrascu * [a72412e22] : db_http: fix crash when loading module along with tls_mgm (cherry picked from commit f925153d10f2da7cad8231329696425218d2738a) 2021-02-16 23:48:20 +0200 Vlad Pătrașcu * [7a7fe8e13] : Merge pull request #2404 from kworm83/patch-1 Clusterer: Fix parameter order in calls to raise_node_state_ev 2021-02-16 14:33:57 -0600 kworm83 <21957311+kworm83@users.noreply.github.com> * [6b9d6e8c5] : Fix raise_node_state_ev parameter order Calls to raise_node_state_ev had the node status and cluster_id parameters reversed. 2021-02-13 23:53:41 +0200 OpenSIPS * [90c6cb4dd] : Rebuild documentation 2021-02-12 14:35:33 +0200 Razvan Crainea * [0ae0b27f2] : call_center: fix MI cc_list_calls state print (cherry picked from commit 09c3fb94df538e8014e4f686408c11b375a55d95) 2021-02-10 13:58:03 +0200 Liviu Chircu * [7b35e6d7b] : usrloc ct IDs: Never pack more than 14 bits from a contact label (cherry picked from commit 872c4e89d23a2b830cdc944e898e40f4faf4c400) 2021-02-10 13:57:58 +0200 Liviu Chircu * [f9f6831fd] : 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) (cherry picked from commit 93163b9eb84df8edad1a0b1ea283d8d13042aab0) 2021-02-06 23:54:50 +0200 OpenSIPS * [438c1db1b] : Rebuild documentation 2021-02-05 18:07:03 +0200 Vlad Patrascu * [39fad64d1] : b2b_entities: don't pass empty storage packet to entity callbacks Reported in #2387 (cherry picked from commit ac2f9c8138f88a8e160d48affafb22a9c9b9144b) 2021-02-05 18:05:42 +0200 Vlad Patrascu * [55e41b41b] : b2b_entities: fix crash if DB loaded entity hash_index is too large (cherry picked from commit 2617ca44a0c2f9d7597903a924118c15c319abce) 2021-02-04 20:41:39 +0200 Liviu Chircu * [0f884dab9] : 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. (cherry picked from commit 34af3c45446ff7cef8ebd6176a94bb4a841418b7) 2021-02-04 13:10:31 +0200 Liviu Chircu * [0d761430a] : usrloc + mid-registrar: Fix possible SHM leak of "" strings Credits to Pete Kelly for the report! (cherry picked from commit 96f12ac272b1f20c805b5779f9cbbf8ea7499b80) 2021-02-03 09:56:44 +0200 Liviu Chircu * [de72c4f82] : $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! (cherry picked from commit f4b73ccced23d2945a485bd74c8abe252c3e326d) 2021-02-02 22:05:51 +0200 Liviu Chircu * [abe7ab7c7] : $socket(af) variable: Fix returned value type Credits to Alex Kinch for the report! (cherry picked from commit f3c3ed53e6c74b17151e9266d848e323c3eb54bc) 2021-02-02 10:11:19 +0200 Razvan Crainea * [b647d10bc] : dispatcher: set proper group when raising event Thanks go to Slava Bedersky (@volga629-1 on GitHub) for reporting it Close #2391 (cherry picked from commit 8107e30651917fd819905d75d1a0c18de47f334b) 2021-02-01 15:01:23 +0200 Razvan Crainea * [4c76a8a24] : dialog: swap the leg when starting 2nd re-INVITE in challenge mode (cherry picked from commit d698da1afcddd02f4b718c780865ace8600128d4) 2021-01-30 23:55:13 +0200 OpenSIPS * [01d8e8002] : Rebuild documentation 2021-01-29 08:37:59 +0200 Liviu Chircu * [0b19f68e5] : 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. (cherry picked from commit a764ea3e6827b17b8125afb58fa9beabd627022b) 2021-01-28 19:24:23 +0200 Razvan Crainea * [6430083ad] : 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 (cherry picked from commit d85d0b50ec635d859a33073875d7e5680fda3772) 2021-01-26 16:47:30 +0200 Bogdan-Andrei Iancu * [56c5aa070] : [proto_hep] Fix payload extraction for HEP2 If time is present, offset the "payload" buffer accordingly, as "start" and "length". Reported by JP Hindin (cherry picked from commit 87f235a1e6e3bc66eb1bc29954d18b0cfa476727) 2021-01-25 21:37:52 +0200 Vlad Patrascu * [8bab0da7b] : clusterer: properly persist MI changed node state in DB (cherry picked from commit 090088155b6ab4e8ad4832900e51c19ee153fe68) 2021-01-25 18:17:25 +0200 Liviu Chircu * [68e9d5578] : cachedb_local: Improve "cache_collections" docs The "default" collection always gets created, even when not included in the list of collections. (cherry picked from commit 8fcb97e4f39f91d70b62ad53e76b9d864201f0a4) 2021-01-25 13:16:36 +0200 Liviu Chircu * [3fd880ab5] : 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. (cherry picked from commit 2a3a1050e8e04f40d0500a8eb5d5e1429344077f) 2021-01-23 23:55:11 +0200 OpenSIPS * [22271edca] : Rebuild documentation 2021-01-20 13:08:42 +0200 Bogdan-Andrei Iancu * [b7cf71712] : [dbschema] remove bogus second primary key Issue introduced with 0625fa0dfd10e444b9c1ccfa36401d794ab445fb Reported by @kuuse Closes #2379 2021-01-19 19:31:52 +0200 Bogdan-Andrei Iancu * [5896084ef] : [core] run post processing callbacks only on SIP traffic Credits go to @lemenkov Alternative to #2316 (cherry picked from commit eee990d84a818352a2b653bfab96e7aa9e529072) 2021-01-19 19:23:54 +0200 Liviu Chircu * [ec1f4ccce] : $json set: Correctly interpret the content of pv_value_t (cherry picked from commit 6191f278a4542cc0ea4d588e093e2edaa6a48bbe) 2021-01-19 19:20:21 +0200 Bogdan-Andrei Iancu * [62127194a] : [b2b_logic] 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 Cherry-pick (manual) from 606d278dd665a763ddea4b6a5bf1e580d58d84c0 2021-01-19 14:11:56 +0200 Razvan Crainea * [0925ca3fa] : 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. (cherry picked from commit 0043bb0e6084e60fbda88269c0ddd8f0301444fd) 2021-01-18 21:59:17 +0200 Vlad Patrascu * [8ec5a12a9] : proto_tcp: fix possible crash when looking up connection Reported by Adrien Martin in #2369 (cherry picked from commit 2fe15bb20aec5e4dabe4f3d2f5c5c9e903e34881) 2021-01-16 23:54:48 +0200 OpenSIPS * [15d05306d] : Rebuild documentation 2021-01-15 23:07:13 +0200 Bogdan-Andrei Iancu * [8a714842d] : [drouting] proper ending of fallbacks at last cycle (cherry picked from commit cdcfe4435c5d30446593bec5ce679c72333c6ecb) 2021-01-15 19:29:04 +0200 Liviu Chircu * [b8f32f9b9] : 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) (cherry picked from commit bcdb417d53d6b258f69f8f8c3c087a6c5a2e23cc) 2021-01-15 18:24:14 +0200 Liviu Chircu * [a95838201] : 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 (cherry picked from commit 6c5953033f67589b3da07751c8746f3c99861c4b) 2021-01-15 18:02:47 +0200 Bogdan-Andrei Iancu * [5938004f7] : Revert "[auth] Proper auth username check" This reverts commit 71b0aa50372b944b299acf5ad3d498bf0f9cd437. 2021-01-14 13:52:06 +0200 Bogdan-Andrei Iancu * [71b0aa503] : [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 (cherry picked from commit 2d02dc85a3fbf168bb8457d5e5b6827092fb8cc8) 2021-01-14 09:39:26 +0200 Liviu Chircu * [0701082ae] : 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 (cherry picked from commit 6cd76760ece9665a88e5eaa5971777961e5b2806) 2021-01-14 09:39:23 +0200 Liviu Chircu * [36e606f0d] : Sample opensips.cfg: Avoid double-replying after save() (cherry picked from commit e4708c2aaf0ce1b0d87223407417679b5d6b4b29) 2021-01-14 09:39:20 +0200 Liviu Chircu * [d5f51ddf3] : 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!) (cherry picked from commit 46553a9aad6ab00d14a787a81300fd01599751f0) 2021-01-13 18:35:25 +0200 Liviu Chircu * [2c1492bd5] : mid_registrar: Fix the runtime override of "outgoing_expires" Fixes #2350 (cherry picked from commit 386f1cd7c5e8670460fc807dc7cc28f0013a1212) 2021-01-13 18:35:20 +0200 Liviu Chircu * [42ef683b6] : mid_registrar: Add extra startup/runtime checks; Re-org code (cherry picked from commit c8b28d417be8a407c90a8dcc9dce308d7950ca99) 2021-01-12 20:02:10 +0200 Liviu Chircu * [49eafeeaf] : 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! (cherry picked from commit 6ebbd9a2d68772ff840db8a38fcc7f2f786b527b) 2021-01-12 19:55:57 +0200 Liviu Chircu * [32b81ba0d] : drouting: Document outdated "W" flag of do_routing() (cherry picked from commit 46952b01f752858ecbc9305b468513634fc370f6) 2021-01-12 19:33:00 +0200 Liviu Chircu * [72c9e127d] : 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! (cherry picked from commit f03a9584821215531b0078ca2d5227403bfda14b) 2021-01-12 18:36:06 +0200 Liviu Chircu * [738fa2dc7] : Improve doc & code quality; Fix typos & inaccuracies (cherry picked from commit 2e17eb063cb1a6b4f84436329418b0a6ebed42e9) 2021-01-12 18:31:58 +0200 Bogdan-Andrei Iancu * [309ffff8b] : [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 (cherry picked from commit 78909c344fe4c25718233e6a00f6e2bd19373be3) 2021-01-12 18:11:41 +0200 Liviu Chircu * [c706a8598] : usrloc: Fully document the module API (cherry picked from commit 107b6fa58d25eac1ead669e6a51bc96ae130624c) 2021-01-12 16:52:08 +0200 Liviu Chircu * [7e1c18961] : Fix missing " " log line endings Credits to Nick Altmann for the hint! (cherry picked from commit 8880b5f339c3f2e1c2c3d6cc6145ec3e165fa8ca) 2021-01-12 13:04:07 +0200 Liviu Chircu * [3c87de68b] : async(): Report an error when using timeouts incorrectly (cherry picked from commit 1104a21d5a6d84b0dbf20164eabab558e1d3da32) 2021-01-11 14:45:20 +0200 Bogdan-Andrei Iancu * [bbbff7eef] : [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. (cherry picked from commit c8743de27c926bb4f85d4969956d384d3d9b19c6) 2021-01-11 14:37:24 +0200 Liviu Chircu * [c82a625e9] : 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"... (cherry picked from commit 97c6bc78a34ed7ff47ea993b8bf843f700428cc5) 2021-01-11 14:37:14 +0200 Liviu Chircu * [9587cb906] : 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(). (cherry picked from commit 85379e5ebfc4568c4a44ef35475f52ac170d7143) 2021-01-09 23:54:49 +0200 OpenSIPS * [d4165f098] : Rebuild documentation 2021-01-08 18:17:24 +0200 Bogdan-Andrei Iancu * [3f58031ef] : [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 17:14:08 +0200 Razvan Crainea * [7c0e2cb63] : db_sqlite: fix memory overwrite error when reallocing rows (cherry picked from commit 647bb69d248b9fc3a6a0c53a5e9850abc62ee78b) 2021-01-07 18:26:23 +0200 Bogdan-Andrei Iancu * [c8151cbf9] : [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 (cherry picked from commit 45b29f93b420d1e18a32a9b05d9b304e8eb44f65) 2021-01-06 18:12:57 +0200 Razvan Crainea * [30fad6821] : 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. (cherry picked from commit b1ce111bccea8f584076312119e703c42116479b) 2021-01-06 15:23:02 +0200 Razvan Crainea * [c4d965d5b] : sql_cacher: prevent memory leak for keys not present (cherry picked from commit 3081483af2e3187db4e7275c77a6e055d4a81709) 2021-01-05 20:02:14 +0200 Liviu Chircu * [afd51f756] : 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 (cherry picked from commit cbc0922bd45101d72a97eda01ef8725da60b2a8e) 2021-01-05 18:48:15 +0200 Liviu Chircu * [b68c60423] : sipmsg_validate(): Allow "(" and ")" in SIP URI usernames According to RFC 3261: mark = "-" / "_" / "." / "!" / "~" / "*" / "'" / "(" / ")" ... so both parantheses are legal within URI usernames. (cherry picked from commit c82d074d359777197d119f314dc4892a7738a4ba) 2021-01-05 11:05:38 +0200 Bogdan Andrei IANCU * [06dd25c5b] : Merge pull request #2358 from ccppprogrammer/patch-1 dialog: move "No matched dialogs" msg from LM_ERR to LM_DBG (cherry picked from commit 0ad1df3cc8fdcb7bd5472323d480d4814b20b086) 2021-01-04 18:35:17 +0200 Bogdan Andrei IANCU * [7a127552b] : Merge pull request #2319 from lemenkov/tm_respect_async_close_fd tm/async: Handle ASYNC_DONE_CLOSE_FD when switching to sync (cherry picked from commit 5b3052f5f52ce6d67690e3d69f5819e9fa916546) 2020-12-28 01:07:04 +0100 Nick Altmann * [0c45d4721] : RPM spec: fix source path 2020-12-26 23:55:24 +0200 OpenSIPS * [6faa802e8] : Rebuild documentation 2020-12-22 10:56:36 +0200 Razvan Crainea * [5cc2cc57d] : 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. (cherry picked from commit 9621cac2033308e1d386103a229702750ffb005b) 2020-12-19 23:54:47 +0200 OpenSIPS * [ab86df857] : Rebuild documentation 2020-12-18 16:45:12 +0200 Razvan Crainea * [3bd4cf9cf] : rtpengine: provide code to rtpengine_play_dtmf command Thanks go to Slava Bendersky for reporting it. Close #2349 (cherry picked from commit 0b94a2c7e401ee885f2245e9a427ca032511bb2c) 2020-12-18 13:05:55 +0200 Razvan Crainea * [cf646f4e9] : cachedb: document return values of get_counter() (cherry picked from commit ef9ab051cf665538e919fa233677b578e694143d) 2020-12-18 13:05:53 +0200 Razvan Crainea * [b7eabf1ab] : cachedb_mongodb: treat case when counter is missing (cherry picked from commit dd1446bb002ad7601d61dbb3d9167c2a3741a1f7) 2020-12-17 22:47:27 +0200 Vlad Patrascu * [fd0e4b7e4] : dialog: fix a memory leak when using topology hiding Credits to Anton Mosin for troubleshooting this. Fixes #2346. 2020-12-17 18:52:57 +0200 Vlad Patrascu * [58f0db327] : sip_i: fix setting of Subsequent number parameter (cherry picked from commit 82c4f9466fddca4f42e57281a5244fde375e08de) 2020-12-16 18:32:47 +0200 Razvan Crainea * [50cf032bf] : 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 (cherry picked from commit b8dee70e179e96825e6471a72a1d26501cf44878) 2020-12-16 13:54:35 +0200 Razvan Crainea * [add258744] : signaling: fix sig_local_totag pvar name length (cherry picked from commit 07eedd064df9628dd5a2f6ec0263c6d015f85c2b) 2020-12-15 23:46:37 +0200 Vlad Patrascu * [bb3bc0671] : 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 (cherry picked from commit 600cd1c3d881ff8f6f0d35a66780e7ae7db53887) 2020-12-12 23:54:23 +0200 OpenSIPS * [c550a4168] : Rebuild documentation 2020-12-11 13:49:30 +0200 Bogdan-Andrei Iancu * [8df69e94d] : [presence_dfks] Migrated to the global DUMMY SIP msg support (cherry picked from commit 28c95c1345757797b67d2041a9d864cadaef0e70) 2020-12-11 13:48:48 +0200 Bogdan-Andrei Iancu * [9c748b16a] : [dialog] Migrated to the global DUMMY SIP msg support (cherry picked from commit 7d4db24c42b6ddcf2bf4e70d6d082b7cb8e65846) 2020-12-11 13:48:33 +0200 Bogdan-Andrei Iancu * [2e9e31b69] : [sipcapture] Migrated to the global DUMMY SIP msg support (cherry picked from commit 81618cf75e99ad05119a38d3d221d81b45254830) 2020-12-11 13:46:50 +0200 Bogdan-Andrei Iancu * [a5854b407] : [event_routing] Migrated to the global DUMMY SIP msg support (cherry picked from commit be15273558bbd345f99762d8baa070cfb753ad4c) 2020-12-11 13:44:39 +0200 Bogdan-Andrei Iancu * [2a396d154] : [event_route] Migrated to the global DUMMY SIP msg support (cherry picked from commit 63107bddb88389b17ead2e460adc65390c1016e4) 2020-12-11 13:44:30 +0200 Bogdan-Andrei Iancu * [ece775ae9] : 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) (cherry picked from commit 84d1bad2c41b4b58170c0943edd837b08d15012f) 2020-12-10 14:44:44 +0200 Liviu Chircu * [2212865f1] : 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 (cherry picked from commit b7bcfd310ead33c73d2a64a93f7e3bf092d44e97) 2020-12-09 21:18:27 +0200 Vlad Patrascu * [f686b88db] : dialog docs: fix examples for dlg_list MI function (cherry picked from commit 80eecb92f24a7cd477d050313bdc30ef8ae1d084) 2020-12-09 15:40:30 +0200 Liviu Chircu * [29d3fb31a] : xlog(): Remove unused function parameter (cherry picked from commit b95c2ed5a3cf0ced2ccb7f5fbe739cbbb2875f29) 2020-12-09 14:50:54 +0200 Aron Podrigal * [6f6aa0ee2] : Fixed double release of read_lock in dr_match (cherry picked from commit 8786217695948dc7bc8f74dcaf6964b7eafcfc72) 2020-12-09 09:00:31 +0200 Liviu Chircu * [dc8cfe85a] : 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 2020-12-05 23:54:26 +0200 OpenSIPS * [684347015] : Rebuild documentation 2020-12-03 22:46:20 +0200 Vlad Patrascu * [7c5dc33c9] : sql_cacher: remove unused variable (cherry picked from commit 5f965a68b5f4013e91c2225042dc297db3a7a856) 2020-12-03 14:53:58 +0200 Bogdan-Andrei Iancu * [0888db78a] : Fixed copy paste error in module name 2020-11-28 23:54:26 +0200 OpenSIPS * [dd91abaa6] : Rebuild documentation 2020-11-27 22:53:05 +0200 Vlad Patrascu * [23bcac207] : sql_cacher: abort startup if DB connections/queries tests fail (cherry picked from commit 2ad1e1590787c19274c2dfd2893b7fafa1e1a31c) 2020-11-27 15:35:48 +0200 Vlad Patrascu * [278c16464] : 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. 2020-11-26 20:10:43 +0200 Vlad Patrascu * [8aab9f221] : 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. 2020-11-24 23:51:28 +0200 Vlad Patrascu * [e8a7cadd7] : tm: simplify the fix in commit 82b8d20 Just unref the transactions and avoid the extra checks done by do_t_cleanup(). 2020-11-24 17:42:36 +0200 Liviu Chircu * [357a3aeb6] : Missing route on startup: Lower severity from ALERT to ERROR (cherry picked from commit 5f8361179526bf06638b8fd3622cbb0c17c8fd11) 2020-11-21 23:55:08 +0200 OpenSIPS * [7ce3a4688] : Rebuild documentation 2020-11-20 19:34:22 +0200 Vlad Patrascu * [82b8d20f2] : tm: fix transaction leakage when receiving replicated CANCELs 2020-11-20 18:57:58 +0200 Vlad Patrascu * [15d1d6120] : tm: fix crash when receiving replicated CANCELs This commit fixes a crash on replicated CANCELs when doing pre-RFC3261 transaction matching. 2020-11-20 16:02:00 +0200 Vlad Patrascu * [792907b1d] : db_mysql: fix doc example for use_tls modparam (cherry picked from commit 1ca7ca8c04fa1d0d3c4187cc4e3d6f816f131c9f) 2020-11-20 15:53:59 +0200 Vlad Patrascu * [baa6a60af] : cachedb_local: fix outdated docs for cache_remove_chunk MI cmd (cherry picked from commit 29db5674f0b811a59dbdbf69cd09121f6f481546) 2020-11-19 17:52:00 +0200 Vlad Patrascu * [1dbea2040] : tm: support interface tags for local socket when replicating 2020-11-18 22:44:54 +0200 Vlad Patrascu * [c57d62be4] : tm: fix crash when having an anycast listener and no replication =========================== Release 3.1.1 ============================== 2020-11-17 Razvan Crainea * [03427c009] : Bump version to 3.1.1 2020-11-17 Vlad Patrascu * [b0bf4550f] : dialog: fix dlg_list[_ctx] MI output when passing identifier params Reported by Mark on the mailing list. (cherry picked from commit 99479fa956b731b23db814393780f3e5fc09047e) 2020-11-16 Ovidiu Sas * [f87edba16] : dialog: fix -Wmaybe-uninitialized compiler warning (cherry picked from commit c2cb01734c997e9a1ba348bc0e77fc44b66832f2) 2020-11-14 OpenSIPS * [5705dc498] : Rebuild documentation 2020-11-13 Vlad Patrascu * [22fbc7271] : 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. (cherry picked from commit 0d20cd55d1981b56795d44d02d46bd02329dad8e) 2020-11-13 Vlad Patrascu * [3e6293f49] : 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. (cherry picked from commit 582170270c3e0e41d539108b640552ae3cb23cfd) 2020-11-12 Bogdan-Andrei Iancu * [b71b2e9c1] : [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 * [afe85d25a] : [event_route] fix reseting the dummy sip msg after each usage (cherry picked from commit ef5073d9da5da6880bbb5ed033642eed6a36bf7d) 2020-11-11 Liviu Chircu * [96d97eea2] : 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 (cherry picked from commit 3a25c0b28f9bffc5e6942a7a3f5484ef903e28f6) 2020-11-10 Liviu Chircu * [b14a7eaff] : 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; 2020-11-09 Vlad Patrascu * [e85b96028] : 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. (cherry picked from commit dd237c001791be0b3b071d07b36057221f6ed3f6) 2020-11-09 Vlad Patrascu * [71a9d0a42] : b2b_entities: fix DB serialization of the entity storage The entity storage written to DB was always either a NULL value or bogus data. (cherry picked from commit af19d50733be3adde756f07845756f3c7f3ca0df) 2020-11-09 Liviu Chircu * [ac01ed5e0] : dialplan: Fix MI 'dp_translate' with 3 parameters 'partition' should be last, not first. 2020-11-07 OpenSIPS * [5aa38e89f] : Rebuild documentation 2020-11-06 Liviu Chircu * [b3016f094] : dialog docs: Fix missing quote (") in example (cherry picked from commit d9fba77764474a52800764571084f5a1c8bbfc6e) 2020-11-06 Liviu Chircu * [fe7e1e217] : 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 (cherry picked from commit 0b7d4d1fa27db61a15f826085aec0bd44b594c79) 2020-11-06 Liviu Chircu * [0f5574f17] : usrloc: Re-structure contact events; Remove useless globals (cherry picked from commit 0d88fa9092d9f060e8f885f63d0cca8fbeaa5d2d) 2020-11-06 Liviu Chircu * [93fe31924] : SIP PN Support: Change harmless log to DEBUG Empty (non-set) EVI parameters are possible and should be ignored. (cherry picked from commit e78f0d05e78c14e464e3f8e50a0dad622b8b41e6) 2020-11-06 Liviu Chircu * [d4da9e55e] : EVI: Small optimization (cherry picked from commit 9943f59656bb2081eeed1f2fe300d1b142da0928) 2020-11-05 Liviu Chircu * [867fb320a] : 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. (cherry picked from commit 1f3e56fbfffd0ebedd3a91df4c187166f824568c) 2020-11-05 Liviu Chircu * [c6ef76adf] : EVI: Improve debug logs (cherry picked from commit b30ac6be3348059684ed8e79d01183784f4cb5f5) 2020-11-05 Razvan Crainea * [5ae266af0] : dialog: update contact & SDPs for replicated updates (cherry picked from commit 52e6c425b101ce56d7eb35cb413faacbb9309f1a) 2020-11-05 Liviu Chircu * [e9f5edb4a] : dialplan: Fix broken MI 'dp_show_partition' cmd and output 2020-11-05 Liviu Chircu * [dfc10fb1e] : dialplan: Fix startup with a single, non-default partition 2020-11-04 Liviu Chircu * [0fa6e7d46] : 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 (cherry picked from commit 5b868337e60f0e9d503d6233409412abd27d2818) 2020-11-03 Liviu Chircu * [229c5da07] : 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". (cherry picked from commit 55eae8f4dde6749f72dcdd67ef775797614ff32e) 2020-11-02 Liviu Chircu * [74a180d2a] : registrars: Rebuild lib/reg on each build This fixes an issue where registrar would log lines resembling: INFO:mid_registrar:... due to the lib/reg/*.o files having been built beforehand with the mid_registrar source code and simply linked into the .so afterwards. This issue is fixed in 3.2+ using a different mechanism (separate build of the lib/reg/reg.a library). Reported by Vlad Paiu 2020-11-02 Liviu Chircu * [f9e68649b] : usrloc: Improve E_UL_CONTACT_REFRESH docs This event will not be raised for non-RFC 8599 contacts. (cherry picked from commit 7ad6af074d1e56b11fb245dd6a82f9c615749e09) 2020-10-31 OpenSIPS * [1ec0920f0] : Rebuild documentation 2020-10-29 Razvan Crainea * [52cd9df68] : 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 (cherry picked from commit 2ea8f86813bfbf87b4b0ab61c9f3e852ce777f4c) 2020-10-28 Razvan Crainea * [1dd32ba66] : proto_smpp: escape from and to users Reported by Johan De Clercq (@johandeclercqdemocon) in #2085 (cherry picked from commit f4ef3cc45a55a66aa7d9c5602b73e962d17e6568) 2020-10-28 Razvan Crainea * [ee00d1b58] : event_rabbitmq: cleanup connection after creating the socket Reported by @ycxwoo in ticket #2230 (cherry picked from commit 87e17276a79cc01ddef9334f0bf21256a6c21606) 2020-10-27 Liviu Chircu * [6011de52d] : Fix gcc warning (cherry picked from commit 4755826f7318a7e6e036a86aa28d7983a87bdbd6) 2020-10-27 Liviu Chircu * [2d6d5473a] : 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.). (cherry picked from commit 6757f56cdb982bc8a15519d6af0eb34188fa6951) 2020-10-27 Liviu Chircu * [279ad0c0b] : registrar: Fix misplaced RFC 8599 Contact detection This regression was introduced in Coverity fix 9ae42fd248 Many thanks to Abisai Matangira for the report! 2020-10-26 Liviu Chircu * [f0bd15d54] : registrar: Fix possible crash with save("o") flag Similar problem as in b3bdf7ce29d (cherry picked from commit b0b825b09133990b1e7934a4164d14e48e2a0514) 2020-10-24 OpenSIPS * [8895ae60d] : Rebuild documentation 2020-10-23 Razvan Crainea * [6b4d9c160] : tracer: ignore trace_on flag for dynamic entries Thanks go to Alexey Vasilyev (@vasilevalex) for reporting this. Fixes #2240 (cherry picked from commit aba6edf241428934ca7fc0838a4b0bcc4597263f) 2020-10-21 Liviu Chircu * [c2026bbd3] : Merge pull request #2287 from zooptwopointone/3.1 Fix Memory leak in Freeswitch ESL module. 2020-10-20 rance * [294e8c489] : Fix Memory leak in Freeswitch ESL module. 2020-10-17 OpenSIPS * [cece68cb2] : Rebuild documentation 2020-10-15 Razvan Crainea * [0a94095fc] : drouting: fix printing gw list for dr_number_routing Thanks go to Kirill Galinurov for reporting it on Slack (cherry picked from commit 0e5377c640296051ab46bd50820bb21b6b819223) 2020-10-13 Razvan Crainea * [0fe26bcd7] : dialog: do not update SDP on rejected INVITE/UPDATEs Reported by @nikbyte in #2177 (cherry picked from commit d447626c253185d2e1dc13dc196d04889f630c7a) 2020-10-13 Razvan Crainea * [15b6ca5f6] : packaging: fix typo in emergency module description Thank you @SB-JohnK for reporting it! Close #2263 (cherry picked from commit 25e55f10c7d690230e3e1060958d8b5f0621b540) 2020-10-13 Razvan Crainea * [ae0c71754] : dialog: restore SDP and advertised contacts Reported by @jpyle490 on GitHub. Close #2275 (cherry picked from commit 56e941130c5f8f84e1986bc8ffb1dad6f275adc4) 2020-10-13 Razvan Crainea * [811e593a4] : rtpengine: fix start and stop forwarding Credits go to Roman Kokorev for reporing and fixing in ticket #2281. Close #2281 (cherry picked from commit c45c71411f0acb2d7853297c5ad4fff2c7f04072) 2020-10-12 Razvan Crainea * [65c8661ef] : 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 (cherry picked from commit a66164811e1afbee0e5c80cf9106bfca61fb4f30) 2020-10-10 OpenSIPS * [af58987aa] : Rebuild documentation 2020-10-09 Liviu Chircu * [2d5cf1792] : 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. (cherry picked from commit 8ce9eb22e1ead5b0afeff367b01d0b510650cdc5) 2020-10-09 Maksym Sobolyev * [dd8a951ca] : 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. (cherry picked from commit d9574358d1670391c2b1cbe1d7ccbe37eb4defca) 2020-10-09 Maksym Sobolyev * [98faa6bbc] : 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); } (cherry picked from commit 36e0281b7309e2be39e478c96575cadf9a35260b) 2020-10-08 Liviu Chircu * [6c6930bc4] : emergency: Remove bogus curl_global_cleanup() at runtime Suggested by Walter Doekes (@wdoekes) (cherry picked from commit f91c13af1fa9ee55071bd99b249902360c8def65) 2020-10-08 Zero King * [4dabfca20] : emergency: fix memory leak on error (cherry picked from commit 18f9f7873330b7e5d7c1e31828062d80a6268402) 2020-10-07 Liviu Chircu * [64c3724fa] : usrloc is_contact_registered(): Add useful debug logs 2020-10-06 Bogdan Andrei IANCU * [b83f021a9] : Merge pull request #2272 from flaviogoncalves/flavio Fix in the residential script. Does not make sense to send a plus cha… (cherry picked from commit 903c24c0d211183da40de80d75a552c1be61130c) 2020-10-03 OpenSIPS * [499831928] : Rebuild documentation 2020-10-01 Vlad Patrascu * [3319120fb] : cachedb_local: fix processing of replication and sync packets Fixes #2092 (cherry picked from commit 466f96eeb024706a2e0fc467608e552b6b01316f) 2020-10-01 Vlad Patrascu * [4ebfabf93] : cachedb_local: fix an ERR log when syncing from cluster (cherry picked from commit 3a05dc1de32e7403cde3e65de2d0ca9ce2513900) 2020-09-29 Razvan Crainea * [86f7a4561] : 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 (cherry picked from commit 7ba72d434aee3db949c351a46970122f41a7c50a) 2020-09-28 Maksym Sobolyev * [ad5713218] : o Don't assume bash lives in /bin; o fix arguments ordering while calling head to work correctly on non-GNU systems. (cherry picked from commit b0612c10fe610a76499e9d8170ad392f63d4396f) 2020-09-28 Maksym Sobolyev * [bd5a1d027] : Use body->len as the only authoritative way to check if the provided body is empty or not. (cherry picked from commit b0997b1fb56d6f518a26b9fe32e45cb16b9a0284) 2020-09-28 Liviu Chircu * [6b2b9019f] : "qop" value parser: Fix and optimize memory access Based on @sobomax's bf37995549, but without breaking the tests. 2020-09-28 Ovidiu Sas * [b3a6243a9] : presence: update docs for cluster_federation_mode param - completes commit d4e82ea2beb24666201fe731b46f350708192c81 (cherry picked from commit a298b6779adaed67c2fa280d577c6af19969963d) 2020-09-26 OpenSIPS * [a2a17b13e] : Rebuild documentation 2020-09-25 Eric Green * [be33f6864] : sqlite - fix upsert in db_insert_update (cherry picked from commit 6f71f3f065fa78a65ee021931207aded5903c909) 2020-09-23 Liviu Chircu * [88f89e941] : gflags: Allow functions to be called from any route Reported by Jeff Pyle (cherry picked from commit eb5a900622e93f4c10213affb9602dcde16cf69c) 2020-09-19 OpenSIPS * [c5ef382ac] : Rebuild documentation 2020-09-18 Vlad Patrascu * [01c63f22e] : stir_shaken: improve debug and error logs (cherry picked from commit 6ad5d4e9eb440e60e8a512d0a5aebe576798bb69) 2020-09-18 Vlad Patrascu * [d9af18f06] : presence_dfks: fix dfks_set_feature doc example (cherry picked from commit 14cce667e1c4396c6e57ba40c9af6fc1366f66fe) 2020-09-18 Razvan Crainea * [51539456b] : tracer: proper distinction between types and flags/scope Fixes coverity CID #199984 (cherry picked from commit 44d14d6e19134fe4b25dd4116817e0dd31aa3610) 2020-09-18 Liviu Chircu * [74558d895] : Merge pull request #2253 from sippy/master_2020 Fix a rather obscure copy-n-paste bug in the digest parser (cherry picked from commit baddd32e2fd6cb43dd8b55f8a9f494fbd506d403) 2020-09-16 Liviu Chircu * [5942d53f7] : SIP digest auth: Complete 27d5862fb8 The b2b_entities was not patched well, as some weird switch fallthrough-on-error behavior was introduced. 2020-09-16 Razvan Crainea * [7b7fbfc7c] : 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. (cherry picked from commit f17737985e65e88d416b102f6f3f5503f918768f) 2020-09-15 Liviu Chircu * [27d5862fb] : SIP digest auth: Improve handling for multiple digest challenges Before this patch, OpenSIPS would always work with the digest credentials of the 1st WWW/Proxy-Authenticate header field. While RFC 3261 does not define the behavior with multiple WWW/Proxy-Authenticate headers, in § 22.3 it is stated that: Note that if an authentication scheme that does not support realms is used in the Proxy-Authorization header field, a proxy server MUST attempt to parse all Proxy-Authorization header field values to determine whether one of them has what the proxy server considers to be valid credentials. ... so a proxy must _walk_ through unacceptable headers until it finds one with "valid" credentials. In the context of the upcoming RFC 8760, this would also mean: finding an auth header field with an MD5 digest algorithm, which is the only one currently supported. TL;DR: this patch improves the "uac", "uac_registrant" and "b2b_entities" modules so they correctly process 3 WWW-Authenticate headers with the following algorithm preference: algorithm=SHA-512-256 algorithm=SHA-256 algorithm=MD5 ... and correctly build an MD5-based response for the 3rd header field. Issue discovered during OpenSIPIt 2020 2020-09-15 Bogdan-Andrei Iancu * [6a559d583] : [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 * [c701436bb] : [core] missing file from e1347ebe4 (cherry picked from commit 72e4b9d4f85ed5f8a745811fd47f6a2d02a6a993) 2020-09-15 Bogdan-Andrei Iancu * [5f9be4ed6] : [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-12 OpenSIPS * [58d5d11bf] : Rebuild documentation 2020-09-10 Vlad Patrascu * [1e046a9a8] : cJSON lib: fix double free in case of string parsing error Fixes #1977 (cherry picked from commit a53f3bd689a01c495809214823d07bfc3cab512a) 2020-09-08 Bogdan Andrei IANCU * [6a6087748] : Merge pull request #2244 from vasilevalex/cfg_parse Reset config errors counter on every config parsing (cherry picked from commit 926d7c71564d71c6eec207a811ab0ee68f860499) 2020-09-08 Ovidiu Sas * [51c5fbb9a] : dialog: fix/reformat some logs (cherry picked from commit 2efaeee24c69841e9776e360960bc8d644081ff9) 2020-09-07 Liviu Chircu * [29f8cca69] : nathelper: Do not crash on bad ping reply Credits to Alexey Vasilyev for the report! Fixes #2242 (cherry picked from commit fb34cbc51405d7928dac0768be4ad912f1bb0bed) 2020-09-05 OpenSIPS * [b34551c49] : Rebuild documentation 2020-09-04 Zero King * [4bd5634b6] : rtpengine: fix single-bit field type (cherry picked from commit 9c4f6c1c7f7ac88e19ff78b5169c33b17b1d8d38) 2020-09-04 Liviu Chircu * [fde639bee] : List new / missing contributors (cherry picked from commit ef7a6801c483ece3ea8ab07275fcec7aa051a3f8) 2020-09-03 Liviu Chircu * [33ef2068a] : 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-02 Zero King * [d36fa2b15] : Accept single \r as EOH in multipart This completes commit 3ec9d1b25430715f2b800c455c8518104a243f49. (cherry picked from commit f5d1b55aa213e448f2716751227234e073277855) 2020-09-02 Walter Doekes * [c2e8248de] : usrloc: Update doxygen comment about packing get_all_ucontacts (cherry picked from commit fc1c3ec32fa285e90cea457096f557e1088b1031) 2020-09-02 Walter Doekes * [df67bac58] : 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). (cherry picked from commit 5a6b3abe41a2eaed961a530675f6441a692e8640) 2020-09-02 Bogdan-Andrei Iancu * [ac3e6d3a5] : [permissions] Fixed mem leak on pattern field Closes #2197 (cherry picked from commit d6f3424d1fe71de94a545a36d0e14fbd9ecd3b3f) 2020-09-02 Andriy Pylypenko * [eccd189ab] : Wipe out the pointer to already destroyed data so a later error does not cause a crash. (cherry picked from commit a75dd210600374c7358c7b2ee0c33a3b6d00b4c2) 2020-09-02 Peter Lemenkov * [72592f679] : 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. (cherry picked from commit b801f04c4acc970e4c37bae736d0c0518ab0958b) 2020-09-02 Peter Lemenkov * [78740cf44] : 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. (cherry picked from commit 9ee8c06484dc8fa50a8c9ab44a6a9e7e7aa40e21) 2020-08-29 OpenSIPS * [9cf948b22] : Rebuild documentation 2020-08-28 Vlad Patrascu * [1f896fa04] : tls_mgm: fix setting TLS method from DB Fixes #2226 2020-08-28 Vlad Patrascu * [6ee7b856b] : tls_mgm: fix crash when setting an unsupported TLS method Closes #2204 Closes #2213 2020-08-27 Fabian Gast * [1f5326da9] : Fix command in documentation for clusterer_list_cap (cherry picked from commit 7a0f5991de5387b2496b1229f949353b568ad10c) 2020-08-27 Liviu Chircu * [46f6fb6c6] : rtpengine: Fix docs for `extra_id_pv` Suggested by Nick Altmann (cherry picked from commit 968063d9f3d652e94c2895d9dee46b7843c875b5) 2020-08-26 Razvan Crainea * [1102cba8d] : 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. (cherry picked from commit 68f8f9d5c7f43af0a6fb914883ad700a93048835) 2020-08-26 Razvan Crainea * [d25da9239] : 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 Zero King * [58f82eb7a] : Fix tls_method typo in cfg templates (cherry picked from commit ff17c8f0b885ac157b306cad4e0c1c1c63a03bdd) 2020-08-22 OpenSIPS * [6cc3b02bf] : Rebuild documentation 2020-08-20 Liviu Chircu * [9325b1d7b] : 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 (cherry picked from commit 2c008cd9225dc9a60df2fbf2e37d032ce6f27db0) 2020-08-18 Liviu Chircu * [8a3702dab] : 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 * [551eec154] : 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 * [447f563f7] : rtpengine: handle PRACK for answer Thanks go to @nikbyte for the report. Close #2208 (cherry picked from commit 1f9b433fd68889c3e692e249d54ea8dbb2d576d3) 2020-08-18 Liviu Chircu * [00f929c14] : 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 (cherry picked from commit 4f414366ee0fcc52fa2d18c59be0c5d753047934) 2020-08-15 OpenSIPS * [671d9919e] : Rebuild documentation 2020-08-14 Bogdan-Andrei Iancu * [f4c0726c8] : [tm] run the per-branch on reply route also as ONREPLY type Closes #2201 (cherry picked from commit ad178c5754bc70ce6a406e9517e559c62625dfe4) 2020-08-14 Bogdan-Andrei Iancu * [5206467cf] : Fix optional param for forward() If missing, there is nothing to be done for the parameter. Closes #2210 2020-08-08 OpenSIPS * [5700a349e] : Rebuild documentation 2020-08-07 Vlad Patrascu * [81d079958] : core: fix parameter type for cache_raw_query() Reported in #2198 2020-08-07 Vlad Patrascu * [147372642] : tls_mgm: fix crashes with db_text and null string values Closes #2192 (cherry picked from commit 3d26747cc309d7f5c461e3be49fb30db78bc3591) 2020-08-06 Bogdan-Andrei Iancu * [d2247a57d] : 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-04 Liviu Chircu * [c10248b88] : 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) 2020-08-03 Liviu Chircu * [51fddd051] : 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 (cherry picked from commit 4dba112130651ca6013c7ebc931fc744b3776774) 2020-08-03 Liviu Chircu * [35a614675] : 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 Razvan Crainea * [57caa6c03] : presence: reset delete prepare statement when delete not performed 2020-08-03 Razvan Crainea * [b2b809795] : rtpproxy: ignore unknown payload type media streams Thanks go to @wangduanduan for reporting and providing troubleshoot info (cherry picked from commit a682789d58bc175ac3780e1ddae0b8b9eee9a32f) 2020-08-01 OpenSIPS * [450606f93] : Rebuild documentation 2020-07-31 Liviu Chircu * [6f26ea1e7] : 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! 2020-07-30 Liviu Chircu * [13536402f] : 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 * [6a8b26ce8] : stir_shaken: complete fix in commit a9ca643 (cherry picked from commit a9e78b44677153319c00970bd02256d187d75167) 2020-07-30 Liviu Chircu * [8c6d82380] : userblacklist: Be compatible with db_cachedb over MongoDB Issue reported by Ryan Embgrets (cherry picked from commit f9fd982beec461cf15bd3001df744066e42af625) 2020-07-29 Vlad Patrascu * [a9ca643ac] : stir_shaken: fix compilation with openssl < 1.1.1 (cherry picked from commit 3bf2b9890b1e5fae6c69241c963ca2bbad66af85) 2020-07-29 Vlad Patrascu * [65c54c90b] : Cleanup null "id" from doc examples for evi transport modules (cherry picked from commit 294926bc6c81265f662a2440906003c134d898c8) 2020-07-29 Vlad Patrascu * [0734be9dc] : event_rabbitmq: remove unused modparam 2020-07-28 Vlad Patrascu * [31dae10a8] : 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. 2020-07-28 Vlad Patrascu * [123d9ccb1] : event interface: fix crash when raising event with no params Reported by Mark Allen on the mailing list. 2020-07-28 Bogdan-Andrei Iancu * [7cefe1b2d] : [core] fix missing data type flags for $socket_in(af) Reported by @hamid-elaosta Closes #2185 (cherry picked from commit 1da7da1c57122f4e5a7550ab21df5fc5d79c3b12) 2020-07-25 OpenSIPS * [4d80239fe] : Rebuild documentation =========================== Release 3.1.0 ============================== 2020-07-21 Liviu Chircu * [4b29d8dc3] : ut.h: Fix str_casematch() implementation Since str's have a known length, we should not stop the iteration at '\0'. (cherry picked from commit 7d0df27a40d9bd0207637ec08e5deb662c45bbf6) 2020-07-21 Vlad Patrascu * [a7a978893] : rabbitmq: fix crash in case of bad parameter for rmq_publish Fixes Coverity CID #199894 (cherry picked from commit e7ba585438ff0f62feef5c0f6285adee1ace325c) 2020-07-21 Vlad Patrascu * [81873567a] : lua: remove an useless null check Fixes Coverity CID # 199899 (cherry picked from commit 1319c4722ed9119e2dbedd4497598c1059a44342) 2020-07-21 Vlad Patrascu * [aa41d8145] : rabbitmq_consumer: suppress coverity warning Fixes Coverity CID #199947 (cherry picked from commit dca4868a04b050fa54ea94a4e3a3bf0915b951ed) 2020-07-21 Vlad Patrascu * [2cd3b41a1] : tm: fix bad string in the MI output of t_uac_dlg Fixes Coverity CID #199965, #199943 (cherry picked from commit 9bac91d5583ba8d640ca26d940e0d4e10f847a28) 2020-07-21 Vlad Patrascu * [44b21ad80] : tls_mgm: set the TLS session id context with the proper length Fixes Coverity CID #207904 (cherry picked from commit 4a18ce89c89b4f9831ff748bfa75e2aa5db1b303) 2020-07-21 Vlad Patrascu * [37c2d0c92] : event_flatstore: prevent NULL deref in case of bogus param Fixes Coverity CID #207918 (cherry picked from commit 596c572da62169d453fface97d13ec557d200561) 2020-07-21 Vlad Patrascu * [d138ec45a] : tls_mgm: fix uninitialized variable Fixes Coverity CID #199976 (cherry picked from commit 44abb30bbebcb701bd4b351b68b1a8e919d07abe) 2020-07-21 Razvan Crainea * [5515a294f] : tm: use msg_flags to indicate message is replicated (cherry picked from commit 804c9a0492940fe779e3dd1d4b4fe9f8cba57cf4) 2020-07-21 Razvan Crainea * [a8d6aef61] : 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 (cherry picked from commit 06f7297065f079ebd4201055079a02e69dde2cc5) 2020-07-21 Razvan Crainea * [3d6cbac6c] : 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. (cherry picked from commit d0641318ff238b01506e18bd4aa7422fb3cfeab7) 2020-07-20 Razvan Crainea * [ff8edcbcf] : pua_dialoginfo: always parse callid Fixes coverity CID #199930 2020-07-20 Razvan Crainea * [1e74a8358] : pua_xmpp: release memory in case of error Fixes Coverity CID #199967 2020-07-20 Razvan Crainea * [80a400523] : rls: release memory in case of error Fixes Coverity CID #199983 2020-07-20 Razvan Crainea * [a088d6b7f] : db: merge db_is_neq_type() in db_ut Fix coverity CID #40717, #40718, #40719, #40720, #40721, #40722 2020-07-20 Razvan Crainea * [7dcd73b9b] : fix more switch fall through Coverity CID #199932, #199927, #164020, #164013, #150486, #58380, #58379, #58375, #58374, #40705, #40700, #40701 2020-07-20 Razvan Crainea * [1c4be6cb1] : db_text: complete coverity CID #200093 2020-07-20 Razvan Crainea * [1db0a9d6d] : b2b_logic: fix coverity errors Fixes CID #200000, #211411, #211412, #211413, #211414, #211362, #40885, #40835, #40827, #40826, #40825, #40703, #40704 2020-07-20 Razvan Crainea * [6043efdff] : proto_tls: make sure we have destination to connect to Fixes Coverity CID #58361 2020-07-20 Razvan Crainea * [d8cf269ef] : proto_wss: add fall through indication Fixes Coverity CID #58373 2020-07-20 Razvan Crainea * [f3aca3506] : proto_hep: remove useless NULL check Fixes Coverity CID #163991 2020-07-20 Razvan Crainea * [26c6d2fc4] : proto_smpp: prevent NULL deref in case of bogus input Fixes coverity CID #199973 and #199931 2020-07-20 Razvan Crainea * [8fc31995c] : proto_smpp: skip entries with bad IP Fixes Coverity CID #200075 2020-07-20 Razvan Crainea * [766b28ca0] : proto_ws: make sure we have destination to connect to Fixes Coverity CID #58340 2020-07-20 Razvan Crainea * [8060e5548] : fix coverity detected false positives CID #40557, #211391 2020-07-20 Razvan Crainea * [cc02c7ee5] : proto_smpp: smpp_bind_transceiver_resp_t system id Reported by Coverity CID #199918 2020-07-20 Razvan Crainea * [ee98219b7] : db_text: fix no-op code fixes Coverity CID #200004 2020-07-20 Razvan Crainea * [8bf39d395] : tm: cleanup replicated cancel msg Fixes Coverity CID #200031 2020-07-20 Razvan Crainea * [2e67a655a] : parse_to: add fallthrough comments/indications for coverity CID #200094 2020-07-20 Razvan Crainea * [aced94fdb] : qos: fix getting SDP 2020-07-20 Razvan Crainea * [7d0aed01b] : remove dead code Fixes Coverity CID #163971, #40603, #163958, #163961, #200036, #211354, #211370, #211394 2020-07-20 Razvan Crainea * [2998d371f] : mi_html: fix improper free on error Fixes Coverity CID #200040 2020-07-20 Razvan Crainea * [b61c56bb2] : db_text: prevent buffer overflow Fixes Coverity CID #200093 2020-07-20 Razvan Crainea * [cecbb3dbb] : tracer: make sure vars are initialized Fixes Coverity CID #200098 2020-07-20 Razvan Crainea * [dbc9d07b0] : dialog: correctly handle str2int return code (CID #150473) 2020-07-20 Razvan Crainea * [3257fcd08] : dialog: initialize dummy value to sink CID #199944 2020-07-20 Razvan Crainea * [22c4376a4] : rework some annotations to make coverity happy 2020-07-20 Razvan Crainea * [f8c1caef9] : dialog: use correct dialog for sync (fix CID #40673) 2020-07-20 Razvan Crainea * [80610da51] : dialog: fix coverity CID #40494 2020-07-20 Razvan Crainea * [0d66a1dd1] : dialog: rework coverity fix CID #40640 2020-07-20 Razvan Crainea * [6c5607697] : callops: rework coverity CID #211369 2020-07-20 Razvan Crainea * [91bce48cc] : callops: fix coverity CID #211388, #211360, #211369 2020-07-20 Razvan Crainea * [ac91cd4b9] : evi: annotate evi_param_set_int to fix Coverity Fixes several Coverity alarms 2020-07-20 Razvan Crainea * [401c6db8e] : dialog: fix coverity issues CID #40640, #40494, #199944, #211361, #211358, #150473, #40673 2020-07-20 Razvan Crainea * [6cbc49cce] : rtpproxy: fix coverity issues CID #207908, #207917, #150494, #40688 2020-07-20 Razvan Crainea * [878bc3361] : rtpengine: fix some coverity warnings CID #211356 and #199981 2020-07-20 Razvan Crainea * [501573ef7] : callops: fix several coverity issues CID #211388, #211360, #211378, #211373, #211369 2020-07-20 Razvan Crainea * [fbdf77b91] : comment fall through switches Fixes Coverity #40710, #211397, #40716, #40726, #40727, #40728, #40730, #40732, #58373, #58381, #199975, #200059, #200094, #211380, #211372, #211359 2020-07-20 Razvan Crainea * [7732d2054] : fix tcp_persistent_flag when list is not defined properly Fixes Coverity #211381 2020-07-20 Razvan Crainea * [c72de0df5] : prevent leak in case of oom Fixes Coverity #211383 2020-07-20 Bogdan-Andrei Iancu * [2b9344075] : [load_balancer] Spelling over log messages (cherry picked from commit 3b6d0de16d68815b571cebca6bf4c9124f59f06b) 2020-07-20 Bogdan-Andrei Iancu * [252078d09] : [presence] fix ugly copy-paste error in MI output Reported by coverity CID 200057 (cherry picked from commit d4abd53b202eeb5d0cd932fb6fa59e0074f3848e) 2020-07-20 Bogdan-Andrei Iancu * [a06185aba] : [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 (cherry picked from commit b1d796344aa674e25fc4408bda5d336bce2bc605) 2020-07-20 Bogdan-Andrei Iancu * [dce86d20f] : [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 (cherry picked from commit 249b80741ddbb0952c7f737af2a7c2473f05eacf) 2020-07-20 Bogdan-Andrei Iancu * [49947bbfe] : [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 (cherry picked from commit ab7d4430941263d20acd1f45bbbbf09c80a5040f) 2020-07-20 Bogdan-Andrei Iancu * [9df5decf6] : [presence] Proper testing for the return code of get_body() Reported by coverity CID 207911 (cherry picked from commit 11e63b35941766c09810aceb48ed300c808a1ef1) 2020-07-20 Bogdan-Andrei Iancu * [a9d3da3d1] : [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 (cherry picked from commit f3530c10adc1d2a5b01340a9823f84db61c98e72) 2020-07-20 Bogdan-Andrei Iancu * [416cbf1b4] : [core] proper checking on return code for getsockname() Reported by coverity CID 200064 (cherry picked from commit c489f462d236fddb883e64a6cde7b04929a76191) 2020-07-20 Bogdan-Andrei Iancu * [fa7127030] : [drouting] Avoid handling a NULL 'gw' upon bogus function call Reported by coverity CID 211365 (cherry picked from commit b0135bb010c119328e9fb1ebb88f3f24c43fa27e) 2020-07-20 Bogdan-Andrei Iancu * [535c9c7c8] : [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 (cherry picked from commit 3b20c9db07ea88bd84609676f2657011588b8b41) 2020-07-18 OpenSIPS * [3c97b34ae] : Rebuild documentation 2020-07-18 Vlad Patrascu * [923438013] : 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. (cherry picked from commit 182ceb0ca6126251ca9e872844925c3bf60b1c90) 2020-07-17 Liviu Chircu * [bd8237de7] : tracer: Fix possible crash on NULL context CID #200069 (cherry picked from commit 1b4fcc06af59e479547d348935300949f0dfb70d) 2020-07-17 Liviu Chircu * [17f8bdd00] : 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 (cherry picked from commit 374fde456c1f713a3cea29c90ccfb3d3d4de8ede) 2020-07-17 Liviu Chircu * [be8f7fe4a] : tracer: Fix unchecked return codes CID #200092, #200088 (cherry picked from commit 82dfe4c408e614750c819e0a566a7312b96ec02a) 2020-07-17 Liviu Chircu * [9ae42fd24] : registrar: Fix possible crash with no Contact CID #211379 (cherry picked from commit 58fa56c6eda2b4fe067bfe7a83b6a8aaba13bacb) 2020-07-17 Liviu Chircu * [c7b3a0feb] : db_text: Complete 65b18091 (cherry picked from commit 673cf7f9eb3e5bd3a8da805483885e049bddc873) 2020-07-17 Liviu Chircu * [061ab9bc9] : proto_udp: Supress Coverity false positive CID #200029 (cherry picked from commit 33a0d617d4bc485e66a975d075cafb79a125de6d) 2020-07-17 Liviu Chircu * [b1e70c789] : 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 (cherry picked from commit 0eee2119991270bd23a6279e6b1a825586f2d227) 2020-07-17 Liviu Chircu * [1cdea214b] : exec: Always NULL-terminate the read buffer CID #200052 (cherry picked from commit 0230f9c9032bd01661c6c7c197965528507e3f2c) 2020-07-17 Liviu Chircu * [72f8888f2] : drouting: Always NULL-terminate the GW buffer While this doesn't immediately fix any bug, it should make Coverity happy. CID #200062 (cherry picked from commit df2ce6d826587f1130c5928b0815bd10ed2957f1) 2020-07-17 Liviu Chircu * [574f98130] : mpath: Fix possible buffer underrun Also attempt to mask the false positive in CID #200070. CID #211377 (cherry picked from commit 7f244f17a54833c6bb3f9ea58aa4afd855774ce1) 2020-07-17 Liviu Chircu * [1eed0969b] : mid_registrar: Add paranoid safety check This extra check doesn't fix anything right now, but at least it makes Coverity happy. CID #200020 (cherry picked from commit 2e60b50228a80c1e9629e43670a8cbcc5f71839c) 2020-07-17 Liviu Chircu * [93aa39ec4] : usrloc: Remove unnecessary NULL check CID #200086 (cherry picked from commit f305fa88f9341f37eb95bf88980e974723b57e94) 2020-07-17 Liviu Chircu * [8b97c4074] : mid_registrar: Remove unnecessary check CID #199954 (cherry picked from commit 7a638403ee648ba629fd1f6f4a17bdea091da16d) 2020-07-17 Liviu Chircu * [189150fbf] : statistics macros: Avoid unsigned integer comparisons against 0 CID #199900, #199913, #199923, #199934, #199941, #199964, #199998, #200032, #200049, #200074, #200096. (cherry picked from commit 39fc05ec0ff2122dd79ec5582ac020c999c11c30) 2020-07-17 Liviu Chircu * [17705530b] : HP_MALLOC status logging: Fix incorrect bitwise shift CID #200101 (cherry picked from commit fcdd224a5c8638a28e3be10e4028c27aa404a637) 2020-07-17 Liviu Chircu * [c9787307b] : Module deps: Fix missing va_end() during error handling CID #211355 (cherry picked from commit 3263b27015e243d85a11375a3d60aca8ffc8472d) 2020-07-17 Liviu Chircu * [2149d2924] : 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 (cherry picked from commit c9753a0505b936f7d423f839a550a43bc73c7f2a) 2020-07-17 Liviu Chircu * [79f26ff4b] : SIP PN support: Fix NULL pointer dereference Severity: high CID #211371 (cherry picked from commit 8cec5cbc59fe06017eab3a96496489cf50bb1604) 2020-07-17 Liviu Chircu * [cc5bc2eda] : SIP PN support: Fix possible NULL dereference CID #211389 (cherry picked from commit a5fbad573e30d4400c8509bb4356c7b19d6e376d) 2020-07-17 Liviu Chircu * [2fd7f2ac9] : qrouting: Avoid unnecessary NULL check CID #211396 (cherry picked from commit cfb4967ecf97169224fbacbab50ddcc845169ad2) 2020-07-17 Liviu Chircu * [dcd192886] : freeswitch: Fix a rare memleak CID #164007 (cherry picked from commit 2a9824cdc955eb783e08f88906b70d337dbdebe9) 2020-07-17 Liviu Chircu * [93a4e6d33] : usrloc: Fix unitialized variable CID #199971 (cherry picked from commit 5f03b8556bf241336795ba8ca517c982d732dd4a) 2020-07-17 Liviu Chircu * [212cda54a] : preprocessor: Fix memleak on preprocessing failure Fixes CID #200047 (cherry picked from commit 36a361d63cc77141314acd84551a5340b2c3db42) 2020-07-17 Liviu Chircu * [69efd2a72] : 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 (cherry picked from commit a4684d54f1d32088936a345afa36cb66bbf53727) 2020-07-17 Liviu Chircu * [17b7ce415] : 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. (cherry picked from commit c6682f208c6da5ce1517737e52835aafc5b3f2fa) 2020-07-17 Liviu Chircu * [694df95b5] : mid_registrar: Simplify lookup() code (cherry picked from commit eb018ad58740f240ac22e19b8bd06f5fe071925f) 2020-07-17 Liviu Chircu * [cd60900c0] : mid_registrar: Fix uninitialized variable Fixes CID #211376 (cherry picked from commit 96432213b694f3887419e7872f6fe948a1c19209) 2020-07-17 Liviu Chircu * [85360f98a] : 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 (cherry picked from commit 70d2e8f10a96f751d0c8245c5f9583dc4e20804e) 2020-07-16 Vlad Paiu * [986f0712a] : Fix excluding vendors with no price Closes #2169 (cherry picked from commit 67ce5cab174ec6e285f2a763b387adad7d6b99d5) 2020-07-15 Bogdan-Andrei Iancu * [5aa3fda97] : [pua_dialoginfo] Fix condition on empty "callee" string (cherry picked from commit e001abe34b2405ef31d7d3c616e18cc3551e5764) 2020-07-15 Vlad Patrascu * [355b54d45] : xml: properly handle oom when extending $xml result buffer Fixes Coverity CID #200068 (cherry picked from commit 3112b5942636ad281783a5ba0ec13992e0c78693) 2020-07-15 Liviu Chircu * [099a60849] : 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 (cherry picked from commit 5df8b636a15a799b5f1ab7a58ebe1c208ce49d2d) 2020-07-11 OpenSIPS * [bd3eff83b] : Rebuild documentation 2020-07-09 Vlad Patrascu * [f84c5cf21] : db_mysql: fix crashes when loading module along with tls_mgm (cherry picked from commit 9459f5d3acb5efa9a4a0e5c8d60c18733062bc04) 2020-07-08 Liviu Chircu * [86efa8464] : db_text: Fix Coverity warning (bad 'switch' fallthrough) Thanks to Răzvan Crainea for the help! Fixes CID #40711, #40712, #40713, #40714, #40715 (cherry picked from commit 6b56ca5fa1163bc290a4c01f554e07cae860fa8c) 2020-07-08 Liviu Chircu * [a54424be0] : b2b entities/logic: Inherit `db_default_url` if possible If there is still no DB URL, simply start without DB support (just as before) (cherry picked from commit ff7b5849751d11537d989afe2b17ef35ebd2a133) 2020-07-08 Liviu Chircu * [641044001] : proto_smpp: Fix crash on startup (cherry picked from commit 990d18f79735f547ed36da58236dea9c24221493) 2020-07-08 Liviu Chircu * [f94e1179f] : proto_smpp: Inherit DB URL from 'db_default_url' (cherry picked from commit 24f9e7b294903bdb439a4e681ee0950d1d0837f6) 2020-07-08 Liviu Chircu * [fa8c07252] : drouting: Improve confusing error logs (cherry picked from commit c8d442df627aaf569a774c434e3cedc949bba17a) 2020-07-08 Liviu Chircu * [4abd2617f] : 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") (cherry picked from commit efee3438773a83c1a05edc8b05ba45f53a83c5a6) 2020-07-08 Liviu Chircu * [dd0245e98] : dispatcher docs: Update partition, db_url and table_name (cherry picked from commit 89a618be1f005d1bc80d528bc41de73fff24533a) 2020-07-08 Liviu Chircu * [ba7a4e33a] : 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 = ...") (cherry picked from commit c7d668bad5b2b41a9c9065e1539914f0629ccf64) 2020-07-08 Liviu Chircu * [654f1e9ba] : dispatcher: Add useful debug log (cherry picked from commit 198687e17d13a06b0868676252292643c6d549c4) 2020-07-08 Liviu Chircu * [419f01194] : 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") (cherry picked from commit cc2f4a8c49402f99502a58940d2fbb51daed6e47) 2020-07-08 Liviu Chircu * [67c06628e] : permissions docs: Update partition, db_url and address_table (cherry picked from commit 180674b833ef9e82cb3f97105add2ada6843ddc1) 2020-07-08 Liviu Chircu * [5185859a5] : dialplan docs: Update partition, db_url and table_name (cherry picked from commit 6443ad5829c15f8ae7dad8bb9f0e4f418702b1ad) 2020-07-08 Liviu Chircu * [f061ad31d] : 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 (cherry picked from commit 2e8164368b31da9292f08623eac6934ef2057e22) 2020-07-08 Liviu Chircu * [9d0145df2] : dialplan MI 'dp_show_partition': Indicate client-side errors (cherry picked from commit 657a8b53f07120e3233059a79f05fa7694ebbc5d) 2020-07-08 Liviu Chircu * [e663ee6a9] : 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 (cherry picked from commit bb57cc1c375b9325138154eb415cebc2fa971ec0) 2020-07-06 Liviu Chircu * [6bde0c174] : MI JSON-RPC commands: Fix incorrect examples Many thanks to Adrian Fretwell for the report! (cherry picked from commit b4293384f76c5e50732eb2f1bf164efa1b83389a) 2020-07-06 Peter Lemenkov * [c9a1c4e6b] : rtpengine: Remove unused defines (cherry picked from commit 463e815cfa1835f1ef97f9b8f16a943fce0b8762) 2020-07-04 OpenSIPS * [c4196e968] : Rebuild documentation 2020-07-02 Liviu Chircu * [09261c347] : 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 * [a51421f5c] : cluster sync logging: Fix incomplete "if" condition Reported by William Jin (cherry picked from commit 892c2ee4776b18e3345d0d7bfd8353dd33442487) 2020-06-30 Bogdan-Andrei Iancu * [69c1117c8] : Fixed potentially un-init dlg variable Thanks to Trevis for its report :) (cherry picked from commit 9de8dd193c1b948aff7d4cb6cff67a3816473ee6) 2020-06-30 Bogdan-Andrei Iancu * [5ebea059d] : 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 * [f86b148b3] : 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 (cherry picked from commit d60830f49c9c0ac6c161b56cddbc2572c04d3c66) 2020-06-29 Ovidiu Sas * [3ba21678b] : rtpproxy: improve error logs: print # iovec buffers along errno/strerror on writev failure (cherry picked from commit f4ba69bc6708e94faeefe8d008f48c0a80d66eb8) 2020-06-29 Ovidiu Sas * [580f6d83a] : rtpproxy: fix writev error 22:Invalid argument - align code with rtpengine implementation for systems with no IOV_MAX defined (cherry picked from commit 565e25ba9b967bb5442d62f2ef5791c51787f078) 2020-06-29 Liviu Chircu * [ec888c2e4] : 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! (cherry picked from commit 84bea49d7e4392a23526790d135fbff816081ec3) 2020-06-27 OpenSIPS * [faa07c12c] : Rebuild documentation 2020-06-27 Ovidiu Sas * [2334543a8] : 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 (cherry picked from commit eda6ec3b6260db52a8420d3a9f0cc2f82273af0f) 2020-06-27 Ovidiu Sas * [6c8e89e33] : rtpengine: improve error logs: print # iovec buffers along errno/strerror on writev failure (cherry picked from commit bd099afa394a8033f6d988f355ff0923592c8c0b) 2020-06-27 Ovidiu Sas * [a0bc1f6b5] : 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 ... (cherry picked from commit b1bf482df43320cae37207bf7975215785e825ab) 2020-06-27 Liviu Chircu * [70c69fc08] : 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) (cherry picked from commit 05c1579cb3971a35ba499fcbaa8023a5e487c034) 2020-06-26 Liviu Chircu * [f975e3f7b] : 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... (cherry picked from commit 765a84b293db8ec3da960c0ae61f725f3519bfd9) 2020-06-25 Liviu Chircu * [f218c3637] : 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 * [bfadfc7b8] : 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 * [9887752cf] : 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 * [b2fdeed8e] : 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 :) (cherry picked from commit 1f2c8c4854f9494ff7b712be3dc1eba87cba57f7) 2020-06-24 Bogdan-Andrei Iancu * [2ffd96f97] : 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 * [69f1d9b8a] : [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 (cherry picked from commit 038717c35730731c100e90beec88e09eea735616) 2020-06-24 Liviu Chircu * [a1b29e7fe] : acc: Remove redundant code (cherry picked from commit fcbe480f2eeb9b0933bb5a3fb1d15379fb79c493) 2020-06-23 Razvan Crainea * [f8fd1d066] : 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. (cherry picked from commit a69e6ada6f57989e7a3af940e75d3b99ca8bced3) 2020-06-23 Bogdan-Andrei Iancu * [44003371f] : Fix the building of RR param holding the dialog ID Closes #2148 (cherry picked from commit b2c37f74fccf84706e23451eb1c1087b4e2bd192) 2020-06-23 Razvan Crainea * [3a4a9c41a] : 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 (cherry picked from commit b4cd132731f8e2fc0a949ea52b22952879b345ca) 2020-06-23 Razvan Crainea * [d525ca899] : 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. (cherry picked from commit d105f2007bae37dde077feab9c804900d9ea0f7a) 2020-06-22 Vlad Patrascu * [113734c1c] : rest_client: complete fix in commit d90d70b Related to #2115 (cherry picked from commit 31104219475b94b864c126f42f1e5abba8e41148) 2020-06-20 OpenSIPS * [a185ed960] : Rebuild documentation 2020-06-17 Vlad Patrascu * [d90d70b8a] : rest_client: fix crash when loading module along with tls_mgm Closes #2115 (cherry picked from commit f4227fa77a22e3439718fb9fe4b8077ea6fc659a) 2020-06-16 Razvan Crainea * [dce8cc072] : dialog: clarify usage scope of $DLG_dir Reported by @imdrpn in #2132 (cherry picked from commit 896be267dba83b2e45d4b246a37c2de1dde5d6d1) 2020-06-16 Razvan Crainea * [2d09ba411] : drouting: fix mi commands examples when names are required Credits go to @kertor for reporting this Close #2141 (cherry picked from commit 84211d8266607e5bf0269f10881f967d452fe9b7) 2020-06-16 Razvan Crainea * [a9b4a7040] : dialog: check advertised contract against peer's leg Full credits go to @dioris-moreno for reporting this and providing a fix in ticket #2108 (cherry picked from commit a41a859f4c6f78d899b8b79ad49e150ad9d54145) 2020-06-16 Razvan Crainea * [ec341b8c9] : rpm: fix crash at startup for RPM statistics Credits go to @samk-acw for reporting it Close #2122 (cherry picked from commit 700bd7bd3fcfa61f5c3ad045282e2b23d907089f) 2020-06-15 Razvan Crainea * [486ef833b] : 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 (cherry picked from commit b150486a6944f684b238a62dc2d2dc9e307dd007) 2020-06-15 Razvan Crainea * [9552c9342] : 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 (cherry picked from commit 3e862f0e34ab9fa7065e6132935ab7c429c730bb) 2020-06-15 Razvan Crainea * [15fc783ad] : callops: `mode` param should be only string string + int parameters are not supported in versions <= 3.1 Close #2139 2020-06-15 Razvan Crainea * [115de5f57] : callops: proper naming of the module (cherry picked from commit bfd2bbe30cda353aa32f557130d5aa726a76b547) 2020-06-13 OpenSIPS * [5601dccf0] : Rebuild documentation 2020-06-13 Vlad Patrascu * [417da70b2] : cachedb_mongodb: complete fix in commit 5fb9059 for openssl < 1.1.0 (cherry picked from commit 9f454463e42f2148990bd5f307eeff0acecb18bb) 2020-06-12 Vlad Patrascu * [5fb905959] : 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 * [6d67b28ba] : tls_mgm: fix a cleanup crash when failing to create a SSL_CTX (cherry picked from commit c6ac01258b61608b06ca400815e3b89302724107) 2020-06-11 Bogdan-Andrei Iancu * [073ff1c5e] : Fixed 3 x htons(), reducing to one :) (cherry picked from commit 1856155a6c2093efae7448fce80371e97eedd42a) 2020-06-11 Bogdan-Andrei Iancu * [356ed94f4] : 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 * [a9cc33a72] : media_exhange: handle case where body does not exist (cherry picked from commit 69223a7ecd40214caf053b1ff2e7407845c55b10) 2020-06-11 Bogdan-Andrei Iancu * [e796e2b8d] : Fixed the HEP type for the logs Credits go to @bibace Closes #2137 (cherry picked from commit 7b36e441a6314fbd54745d8084aa5cfe88c341d7) 2020-06-11 Razvan Crainea * [b2618a7ca] : callops: do not delete parameter if not inside R-URI (cherry picked from commit e1861346256c14456721e745485fa83654e11cea) 2020-06-10 Razvan Crainea * [48be56186] : callops: always check for orig RURI when searching for param (cherry picked from commit a592d100e291f164176761e213fffdf2669f0d20) 2020-06-10 Razvan Crainea * [bb13168e5] : media_exchange: rework the way of generating on hold SDP (cherry picked from commit 8cb9d0a553308d7eea380d9c04f999a4b2b356d9) 2020-06-09 Bogdan-Andrei Iancu * [57f05c416] : Fix crash in tracing xlogs from routes without SIP msg (cherry picked from commit b0a63d96ca16a26b3b4a623484ff2359d5533811) 2020-06-05 Liviu Chircu * [c0754d81f] : Module dependencies: Improve debug log text Suggested by Mark Farmer (cherry picked from commit 128c545677bfa7a8bdfd27b4d4ac399937df7bc2) 2020-06-02 Bogdan-Andrei Iancu * [b7490874c] : Fixed missing column in cc_agents table defintion Credits go to @Shkiperon Closes #2130 Closes #2127 (cherry picked from commit bf2023eb681ff3b0cdb24b4bc7d96bc2246bd1c3) 2020-05-30 OpenSIPS * [27b667892] : Rebuild documentation 2020-05-30 Liviu Chircu * [c8e2161e4] : db_perlvdb: Fix incorrect integer downcast Credits to Aaron Meriwether for spotting the bug and suggesting the fix Fixes #1952 (cherry picked from commit 3e83412d50b0d8dd5b8a0f7498fb8b66e96ef353) 2020-05-30 Liviu Chircu * [fd59535ce] : [mid-]registrar: Add high-level docs for the SIP PN Support (cherry picked from commit cd8d77143f73e90c8688004dd7b817c1d3db7cf7) 2020-05-27 Liviu Chircu * [93798a002] : DB schema: Update copyright years (cherry picked from commit 20b880b56543a3a529ba34efc06ec5959f9cd334) 2020-05-27 Razvan Crainea * [ef951af14] : Add ChangeLog for 3.1 2020-05-27 Razvan Crainea * [b9e959bc6] : Modify beta tag 2020-05-27 Liviu Chircu * [86f6e0c30] : Fix various typos, phrases & small issues; Update contribs 2020-05-27 Liviu Chircu * [7a04bda8b] : Update CREDITS for 3.1 2020-05-27 Razvan Crainea * [f2f1ee4ad] : callops: add E_CALL_HOLD event implementation 2020-05-27 Bogdan-Andrei Iancu * [5529e085c] : Fix underlaying command in the rtpengine_stop_media() function Credits go to @fedkis Closes #2121 2020-05-27 Bogdan-Andrei Iancu * [1d09175b2] : Fix building json when multiple callees are in dialog Credits go to @fedkis Closes #2120 2020-05-27 Razvan Crainea * [12d3cdbca] : callops: add E_CALL_HOLD documentation 2020-05-26 Vlad Patrascu * [da3923e9c] : dialog: fix CSEQ in ACKs for retransmitted replies of local re-INVITEs Closes #2106 2020-05-26 Vlad Patrascu * [eefd55e98] : dialog: always build the ACK with full Route set for re-INVITE ACKs for re-INVITEs sent with the "dlg_send_sequential" MI command would not have a full Route set as they were generated by TM instead of the dialog module itself. 2020-05-26 Liviu Chircu * [478596ab6] : opensips_residential.m4: Fix typo 2020-05-26 Bogdan-Andrei Iancu * [61fca80e5] : Update the cfg templates for config generator 2020-05-26 Liviu Chircu * [46d1c0758] : Update MySQL DB migration scripts for 3.0 -> 3.1 2020-05-26 Razvan Crainea * [8bf7b40a6] : callops: add call attended support to the call_transfer script function 2020-05-26 Razvan Crainea * [c2620a1ef] : callops: fix "trasfering" typo 2020-05-26 Razvan Crainea * [7feefed28] : callops: add call_transfer script function 2020-05-26 Razvan Crainea * [b52749d65] : dialog: add dlg_send_sequential function 2020-05-26 Liviu Chircu * [5839c042a] : auth_jwt DB schema: Change jwt_secrets.secret to TEXT Fixes the following with MariaDB 10.1.44 (Xubuntu 18.04): _mysql.connection.query(self, query) sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError) (1074, "Column length too big for column 'secret' (max = 255); use BLOB or TEXT instead") [SQL: CREATE TABLE jwt_secrets ( id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, corresponding_tag CHAR(128) NOT NULL, secret CHAR(2048) NOT NULL, start_ts INT NOT NULL, end_ts INT NOT NULL ) ENGINE=InnoDB] 2020-05-26 Razvan Crainea * [9a7a51447] : callops: add support for callid mode param 2020-05-26 Razvan Crainea * [d5a7ae268] : rtpengine: fix empty field in doc 2020-05-26 Bogdan-Andrei Iancu * [fe9bfd9c9] : EXpire the WAIT type subscriptions also (produced by async wait_for_event()) Credits go to @liviuchircu Closes #2054 2020-05-26 Bogdan-Andrei Iancu * [c0a603b88] : Allow t_was_cancelled from request and branch routes too Closes #2066 2020-05-26 Bogdan-Andrei Iancu * [d0d059070] : Skip the disabled GWs when using route_to_gw() Closes #2072 2020-05-26 Bogdan-Andrei Iancu * [169b5da38] : Allow no params for dlg_on_answer|timeout|hangup() to act as a reset 2020-05-26 Liviu Chircu * [519013bab] : Fix possible uninitialized variables (gcc 6) 2020-05-26 Razvan Crainea * [dbf3dc4a5] : modules/dialog: fix possible uninitialized variable 2020-05-26 Razvan Crainea * [d883a0d72] : dialog: always represent the dialog ID as hexa This commit normalizes the way the dialog id is represented or interpreted by different functions to a single, hexa representation of the hash entry and hash id of the dialog. It affects the following: * $DLG_did variable - changes the output representation * dlg_list MI command - instead of printing only the db ID, it now shows both the dialog ID, and the db id * dlg_end_dlg MI command - use the dialog id instead of the DB id to terminate a dialog * load_dlg_ctx function - the did always need to have the hexa representation * rtpproxy timeout & DTMF - the id will now have the hexa representation 2020-05-26 Razvan Crainea * [479bc5a1e] : callops: only use active dialogs 2020-05-26 Nick Altmann * [c7865c64c] : RPM spec: don't build cachedb_mongodb for centos-8 because of removed libzstd, fix perl build deps 2020-05-25 Bogdan-Andrei Iancu * [9976c258f] : Added docs for the dlg_on_answer|timeout|hangup() functions 2020-05-25 Bogdan-Andrei Iancu * [60c147b0c] : Fixed compile errors (typos) 2020-05-25 Bogdan-Andrei Iancu * [12ff3040a] : Added DB storing for rt_on_answer|timeout|hangup 2020-05-25 Bogdan-Andrei Iancu * [76d154c27] : Add dlg_on_timeout|answer|hangup() per-dialog triggers 2020-05-25 Liviu Chircu * [3a1f9c1e2] : usrloc: Re-organize timer code; Improve robustness * move all timer-related code in its dedicated file * skip the "buffered contact deletes" logic if it's not initialized Related to #2118 2020-05-25 Razvan Crainea * [2e3015da2] : callops: add call_hold and call_unhold mi commands 2020-05-24 Vlad Patrascu * [5520a0d3f] : usrloc: fix crash when deleting from DB due to uninitialised globals Closes #2118 2020-05-23 OpenSIPS * [b4b3442fa] : Rebuild documentation 2020-05-23 Bogdan-Andrei Iancu * [1867783fc] : Expose request within UAC trans, for acc purposes 2020-05-23 Bogdan-Andrei Iancu * [70f84f4d2] : Remove useless str* to char* in fixup functions 2020-05-23 OpenSIPS * [8a88111a6] : Rebuild documentation 2020-05-23 Nick Altmann * [321755648] : RPM package: add callops module 2020-05-22 Razvan Crainea * [6af7cb008] : Merge branch 'feature/callops' 2020-05-22 Razvan Crainea * [149f1868a] : callops: add documentation for the module 2020-05-22 Razvan Crainea * [19ad1d94e] : callops: modify name & values of E_CALL_TRANSFER 2020-05-22 Vlad Patrascu * [fe0cf4eaf] : b2b_logic: fix $b2b_logic.entity in local_route for new client entities 2020-05-21 Vlad Patrascu * [1d7bf7595] : b2b_logic: rename "b2bl_clustering.c/.h" files 2020-05-21 Vlad Patrascu * [d40931b35] : b2b_logic: fix inconsistency of context values when replicating Deleted context values on the replicating instance would still persist during the B2B session on the receiving instance. 2020-05-21 Vlad Patrascu * [75fd396c5] : b2b_logic: fix use of $b2b_logic.ctx before calling b2b_bridge_request() Do not overwrite all the existing context values when using $b2b_logic.ctx to set new values before calling b2b_bridge_request(). 2020-05-21 Razvan Crainea * [c3f90a3b2] : callops: add call attended transfer command 2020-05-21 Nick Altmann * [0fa60dbbe] : RPM package: rename event_jsonrpc module to event_stream 2020-05-21 Razvan Crainea * [3965ffa30] : callops: rename CALL_BLIND_TRANSFER event to CALL_TRANSFER 2020-05-21 Vlad Patrascu * [7f16a1cdb] : Rename event_jsonrpc module to "event_stream" 2020-05-21 Razvan Crainea * [c595e4aef] : SIP Parser: Add support for Replaces header field 2020-05-20 Razvan Crainea * [54ee13a36] : callops: add support for handling refer notifies 2020-05-20 Razvan Crainea * [a1dfda31a] : parser: add suport for refer event 2020-05-19 Bogdan-Andrei Iancu * [574388a26] : Added the $sig_local_totag variable 2020-05-18 Bogdan-Andrei Iancu * [cf16a5a11] : Added $msg.is_request and $msg.type variables 2020-05-18 Vlad Patrascu * [547cba508] : event_datagram/rabbitmq: format event payload as a JSON-RPC notification 2020-05-17 OpenSIPS * [f5e247870] : Rebuild documentation 2020-05-17 Bogdan-Andrei Iancu * [df8bbe453] : Added acc_[un]load_ctx_from_dlg() functions 2020-05-17 Bogdan-Andrei Iancu * [3d642741c] : Enable accounting for UAC transactions. 2020-05-17 Bogdan-Andrei Iancu * [37f9a24d0] : Improve load_dialog_ctx() function, added docs 2020-05-15 Razvan Crainea * [5d8b4437d] : callops: handle timeout when transfered call is not answered 2020-05-14 Vlad Patrascu * [3b6f20847] : b2b_logic: persist context values in DB 2020-05-14 Razvan Crainea * [064fd19ea] : callops: cleanup remaining debug logs 2020-05-14 Razvan Crainea * [0e8b914ac] : callops: add new module 2020-05-14 Razvan Crainea * [6d7d45b1a] : dialog: add support for proividing headers for indialog requests 2020-05-13 Vlad Patrascu * [5255c0f9d] : Remove some leftover lexer tokens 2020-05-13 Vlad Patrascu * [9e7f92343] : b2b_logic: remove some dead code 2020-05-13 Vlad Patrascu * [97b8db86d] : b2b_logic: replicate context values 2020-05-13 Vlad Patrascu * [95a300c20] : b2b_logic: provide more B2B context info and add a key-value storage Add the "$b2b_logic.ctx" script variable that offers a key-value storage at B2B session level. Also, provide more information about the current B2B context through the "$b2b_logic.key" and "$b2b_logic.entity" variables (tuple key, entity key and Call-ID of the involved entities). 2020-05-13 Liviu Chircu * [1485b382a] : [mid-]registrar: Add a helpful startup error log 2020-05-13 Bogdan-Andrei Iancu * [4f44f5a34] : Added $msg.flag(name) and $branch.flag(name)[] variables These are read/write variables to give you per-flag access. The great addition of these value is the posibility to print the status of a single flag. 2020-05-13 Bogdan-Andrei Iancu * [197fb811b] : Extent get_flag_id_by_name() to get len's name also The function may optionally receive the len of the name (if <=0, the len is ignored and strlen() over name is done). This will help using the function with char* and str* inputs 2020-05-12 Bogdan-Andrei Iancu * [6d19da093] : Added dr_match() function to match a variable against the dr rules 2020-05-12 Liviu Chircu * [578e73b07] : [mid-]registrar: Move "max_contacts" inheritance in lib/reg 2020-05-11 Liviu Chircu * [05759efbc] : call center DB schema: Fix copy/paste errors 2020-05-11 Razvan Crainea * [cbcad111e] : ut: add str_{case,}match_nt helpers 2020-05-11 Liviu Chircu * [14f148897] : Merge pull request #2109 from wdoekes/hepv3-ipv6-dest-chunk-fix proto_hep: Fix HEPv3 IPv6 destination contents (send DST not SRC addr) 2020-05-11 Walter Doekes * [7667483bb] : proto_hep: Fix HEPv3 IPv6 destination contents (send DST not SRC addr) 2020-05-10 OpenSIPS * [ef6766273] : Rebuild documentation 2020-05-08 Liviu Chircu * [3ccea1a32] : Fix compilation errors on older distros * do not declare variables inside for loops unless we're using C99+ * fix uninitialized variable Credits to Nick Altmann for the report! 2020-05-07 Razvan Crainea * [2110daf56] : rtpengine: fix callid matching and delete delay 2020-05-07 Razvan Crainea * [499671a0e] : dialog: do not update contact on TMCB_REQUEST_FWDED failed branches Prevent the dialog module from updating the caller's contact with the contact in the initial message, since this will result in private/un-fixed contact. Only branch 0 has the correct/fixed contact, all the other branches only have the original one. 2020-05-07 Razvan Crainea * [96017033f] : tm: expose branch index on TMCB_REQUEST_FWDED callbacks 2020-05-07 Razvan Crainea * [d0e42ae4c] : media_exchange: proper handling for negative replies for UAC 2020-05-07 Liviu Chircu * [2f7aff0d0] : Merge branch 'feature/rfc-8599-sip-pn' 2020-05-07 Liviu Chircu * [a30606f43] : SIP PN: Documentation is now up-to-date 2020-05-07 Liviu Chircu * [2d8adb558] : SIP PN: Add an extra return code to pn_process_purr() 2020-05-07 Liviu Chircu * [3cabc1d87] : SIP PN: Add safety check in pn_process_purr() 2020-05-07 Liviu Chircu * [dc7949ba0] : [mid-]registrar: Refactor the "pn_inv_timeout" modparam Refactor it into "pn_refresh_timeout", since now it's also used for timing out EBR subscriptions for BYE, Re-INVITE, etc. 2020-05-07 Liviu Chircu * [cd9f276ec] : SIP PN: Add auto-detection for PURR + missing record_route() Fun fact: this is actually mandated by RFC 8599, § 6.2.2 2020-05-06 Liviu Chircu * [81bad079c] : SIP PN: mid-registrar lookups at INVITE are now functional 2020-05-06 Liviu Chircu * [c62a23edc] : event_routing: Always try to load tm, but be silent This fixes a SIP PN bug where the EBR API notify_on_event() function is called, but the TM API is not loaded, since notify_on_event() was not detected to be called at script level. 2020-05-06 Liviu Chircu * [a9c93741f] : SIP PN: Be compatible with topology_hiding() When using mid-registrar + topology_hiding(), mid-dialog requests have no Route hfs at all, so do not treat the lack of Route as an error condition. 2020-05-06 Liviu Chircu * [52a793ab7] : SIP PN: mid-dialog PN processing is now functional 2020-05-06 Liviu Chircu * [dc59162fb] : SIP PN: Fix some bad checks 2020-05-06 Liviu Chircu * [c26337847] : group: Remove unnecessary macros The starting column lengths were completely bogus anyway (copy-paste errors?!). Luckily, they were fixed during mod_init() by strlen(). 2020-05-06 Liviu Chircu * [a8370c4e5] : Merge pull request #2104 from lemenkov/re_exp_column Fix typo (reg_exp_column -> re_exp_column) 2020-05-06 Liviu Chircu * [54521b0d6] : [mid-]registrar: Add PN-related script reload checks 2020-05-06 Liviu Chircu * [0c123df0e] : SIP PN: Refine Feature-Caps hf building logic The Feature-Caps content is not meant to be symmetrical for upstream/downstream sides. Some important ideas: * on downstream-forwarded REGISTER, we leak a _minimal_ amount of information. For example, just that we support "apns" PNs and that the element MUST NOT send PNs anymore to it, e.g.: Feature-Caps: +sip.pns="apns" * on upstream-forwarded 200 OK which are not PN capability queries, we include _maximal_ amounts of information into the Feature-Caps, fully informing the UA of our supported parameters, e.g.: Feature-Caps: +sip.pns="apns";+sip.pnsreg="130"; +sip.pnspurr="3a0.94000.00001921" Working for both registrar and mid-registrar... 2020-05-06 Peter Lemenkov * [f57c0f7a4] : Fix typo (reg_exp_column -> re_exp_column) 2020-05-06 Liviu Chircu * [ff8994efc] : SIP PN: Also match upstream Feature-Caps during PNS query 2020-05-06 Liviu Chircu * [b5dea2046] : SIP PN: Add INVITE-time support for 'pn-purr=' URIs 2020-05-06 Liviu Chircu * [e12503dcd] : SIP PN: Add REGISTER-time support for '+sip.pnspurr' 2020-05-06 Liviu Chircu * [ab01c7cb6] : event_routing: Extend API with ebr.async_wait_for_event() 2020-05-06 Liviu Chircu * [7ce1fb7a1] : SIP PN: Add PURR pack/unpack functions + unit tests 2020-05-06 Liviu Chircu * [88542bf11] : topology_hiding: Remove re-defined macros ... already defined in config.h 2020-05-06 Liviu Chircu * [d5a36ecf3] : SIP PN: Update codebase to use recent parser additions 2020-05-06 Liviu Chircu * [cf952d5c2] : SIP URI parser: Add unit tests for 29b34d686 2020-05-06 Liviu Chircu * [727b970d4] : SIP URI parser: Add support for RFC 8599 URI params ... namely: * pn-provider * pn-prid * pn-param * pn-purr 2020-05-06 Liviu Chircu * [2ae64fb32] : usrloc runtime: Remove 'always false' checks 2020-05-06 Liviu Chircu * [d2c3fdc1a] : registrar: Force a Contact URI update on param-based matching 2020-05-03 OpenSIPS * [ac60115c1] : Rebuild documentation 2020-04-30 Vlad Patrascu * [d012b9af3] : b2b_entities: properly sync from cluster 2020-04-30 Vlad Patrascu * [55f1534e4] : b2b_logic: replicate entire tuple info for all entity create events Even though it would be optimal to include the entire tuple info in a single replicated entity, this would cause races on the receiving instance when processing the packets. New entities carrying only tuple "updates" could be processed before actually creating the tuple. As such, the b2b_logic level entity could not be created in these cases. 2020-04-30 Vlad Patrascu * [344dd5827] : b2b_entities: fix a crash when replicating entity delete event 2020-04-30 Vlad Patrascu * [5808271ad] : b2b_entities: fix differing entity keys for replicated entities Use the received timestamp instead of the local one for the entity key of a new replicated entity. 2020-04-30 Liviu Chircu * [90ad02777] : SIP PN Support: Improve Feature-Caps interpretation Keep performing PN param-based Contact matching even when PNs are already handled by upstream side. Also move more common code under lib/reg 2020-04-30 Liviu Chircu * [0a98da7af] : registrars: Minor coding nitpicks Logging, coding style, duplicate macros 2020-04-30 Liviu Chircu * [84d1e7030] : SIP PN support: Avoid further pkg leak on oom 2020-04-30 Liviu Chircu * [36b38810f] : [mid-]registrar: Add handling for upstream Feature-Caps hf 2020-04-30 Liviu Chircu * [da29c36f1] : Feature-Caps parser: Add unit tests 2020-04-30 Liviu Chircu * [ae57b505b] : SIP Parser: Add support for Feature-Caps header field 2020-04-30 Liviu Chircu * [579c558e3] : mid-registrar PN: Add Feature-Caps hf management Both for forwarded REGISTER requests and for relayed 200 OK replies. 2020-04-29 Liviu Chircu * [a4e772c66] : registrar: Code styling & documentation nitpicks 2020-04-29 Liviu Chircu * [6bfb11c02] : mid_registrar PN: Finalize PN contact storage & matching 2020-04-29 Liviu Chircu * [4b779d0a7] : [mid-]registrar docs: Parameterize examples; Move to lib/reg 2020-04-29 Liviu Chircu * [11c8a18f1] : [mid-]registrar: Add the "max_contact_len" modparam 2020-04-29 Liviu Chircu * [349511539] : [mid-]registrar: Tidy up codebase & docs * move common modparams & docs in shared files * normalize coding style & variable naming 2020-04-29 Liviu Chircu * [adaf8e90a] : mid-registrar: Add PN modparams & deps; Update license headers 2020-04-29 Liviu Chircu * [549b12bd9] : [mid-]registrar: Improve Makefile logic Always include all lib/reg code, without having to enumerate each file. 2020-04-29 Liviu Chircu * [e6db1b98f] : registrar/mid_registrar: Fix redundant includes 2020-04-29 Liviu Chircu * [5acc3e00b] : registrar docs: Move common lookup() markup in one place 2020-04-29 Liviu Chircu * [f23f2f8f5] : mid_registrar/registrar: Move common lookup() code in lib/reg 2020-04-28 Liviu Chircu * [362f8ffa4] : drouting: Fix segfault during dr API reloads (fraud_detection) 2020-04-28 Liviu Chircu * [dbcd08991] : mid_registrar/registrar: Normalize shared variable names 2020-04-28 Liviu Chircu * [70ebe281d] : registrar: Move common code in lib/reg 2020-04-27 Liviu Chircu * [4943563b8] : registrar: Fix missing includes; Make tests more quiet 2020-04-27 Liviu Chircu * [6d45aab48] : registrar lookup(): Add a new retcode + unit tests The new return code "2" of lookup() is needed when all found contacts are PN-enabled. In this case, script developers must NOT call t_relay() afterwards. 2020-04-27 Liviu Chircu * [16e939b10] : registrar: Move common Feature-Caps code under lib/reg/ 2020-04-27 Liviu Chircu * [49641775b] : SIP PN Support: Add conditional module dependencies 2020-04-27 Liviu Chircu * [ffaa5148d] : module dependencies: Be able to easily specify N dependencies 2020-04-27 Liviu Chircu * [790a390a5] : mk_sip_req(): Properly init the sip_msg This way, parse_headers() will work as expected 2020-04-27 Liviu Chircu * [0837c1f53] : proto2a(): Do not segfault on PROTO_NONE (0) 2020-04-27 Liviu Chircu * [ab84f71dd] : registrar SIP PN: Finalize integration with tm 2020-04-27 Liviu Chircu * [5586cb80d] : tm: Extend the API with await/inject functions Specifically: * tm.t_wait_for_new_branches(msg) * tm.t_inject_ul_event_branch(msg) 2020-04-27 Liviu Chircu * [dddf9c253] : tm: Minor improvements * t_forward_nonack(): Avoid redundant str copying * improve docs on t->nr_of_outgoings 2020-04-27 Liviu Chircu * [5feebf42e] : usrloc: Add the 'domain' attribute to all events Fixes #2062 2020-04-27 Liviu Chircu * [b69d33947] : SIP PN: Rework the async Push Notification support Although the previous version seemed to work, it was broken conceptually, since passing a (ucontact_t *) without a ref counting mechanism may lead to invalid SHM memory access whenever the contact is freed before the PN job gets to be executed. 2020-04-27 Liviu Chircu * [41d2b5779] : evi: Be more compatible with calling code 2020-04-27 Liviu Chircu * [d761f1553] : registrar: Add some lookup() unit tests 2020-04-27 Liviu Chircu * [b0d9c5479] : registrar SIP PN: Finalize integration with EBR & usrloc 2020-04-27 Liviu Chircu * [46ce8bc1e] : usrloc: Export E_UL_CONTACT_REFRESH via API 2020-04-27 Liviu Chircu * [588131346] : registrar: Add 'pn_inv_timeout' modparam Controls the amount of time that the EBR subscription will be valid for. 2020-04-27 Liviu Chircu * [838d63e3a] : registrar: Add SIP PN contact detection & iteration 2020-04-27 Liviu Chircu * [5ed1fcc3a] : SIP Push Notifications: Add the "pn_skip_pn_interval" modparam Sometimes, it may be useful to skip sending a PN if a wake-up + re-registration were recently triggered. Default value: 0 seconds (always trigger a PN) 2020-04-27 Liviu Chircu * [b5b595294] : Improve module test infrastructure * ensure a global context while the tests are run * add an utility for quickly building parsed sip_msg structs * fix a Makefile wildcard expansion bug 2020-04-27 Liviu Chircu * [6623177b8] : usrloc/registrar: Minor clean-ups 2020-04-27 Liviu Chircu * [8b2d3d218] : Add support for writing module unit tests Developers may easily write module unit tests as follows: 1. any testing code .c files must be placed in modules//test/ 2. you must provide a "modules//test/opensips.cfg" file for the module tests to run on top of (TODO: ideally, there should be support for multiple of these) 3. the tests will be executed using an entry-point function, which _must_ be named "mod_tests: typedef int (*mod_tests_f) (void); 4. "make test module=registrar" in order to start OpenSIPS using your opensips.cfg and run your 'mod_tests' function 2020-04-27 Liviu Chircu * [f760bbfa0] : event_routing: Implement api.notify_on_event() 2020-04-27 Liviu Chircu * [e65653a22] : event_routing: Implement event SIP URI param filters 2020-04-27 Liviu Chircu * [e120ccc2e] : event_routing: Add API loading; Begin implementation 2020-04-27 Liviu Chircu * [4fa294843] : get_uri_param_idx(): Export as static inline 2020-04-27 Liviu Chircu * [204961532] : event_routing: Add module API interface & function stubs 2020-04-27 Liviu Chircu * [488ad45af] : t_inject_branches(): Do not load contact attributes Loading the attributes was completely redundant, as they were not used afterwards. 2020-04-27 Liviu Chircu * [d55c3aa81] : usrloc/tm: Refactor event code (avoid copy-paste) 2020-04-27 Liviu Chircu * [ac6acd228] : usrloc: Detach contact from timer list on expiry 2020-04-27 Liviu Chircu * [adbd56e40] : registrar: Document 'pn_trigger_interval' 2020-04-27 Liviu Chircu * [766c80284] : usrloc: Add the E_UL_CONTACT_REFRESH event By enabling 'contact_refresh_timer', the usrloc module will periodically scan for contacts which are near expiration and raise E_UL_CONTACT_REFRESH before the binding is about to expire. Currently, the triggering duration is given by registrar's 'pn_trigger_interval' module parameter (default: 120s before expiry). 2020-04-27 Liviu Chircu * [89baa600f] : usrloc: Move event interface code in its own file 2020-04-27 Liviu Chircu * [8a1e4573c] : SIP PN: Add handling for capability querying ... via the newly introduced header field, Feature-Caps. 2020-04-27 Liviu Chircu * [82af8653a] : Contact matching: Fix bad test; Improve coding style 2020-04-27 Liviu Chircu * [db3eaea24] : mid_registrar: Adapt to new contact matching interface 2020-04-27 Liviu Chircu * [3aae7e652] : SIP PN Support: Refactor usrloc code, move to /lib/reg Most of the PN support is better placed in the registrar module code, since that's where we also have access to the SIP message in order to make changes to it (e.g. append the Feature-Caps header field) 2020-04-27 Liviu Chircu * [450b6dc73] : str_list.h: Make "str_list" a typedef, not a struct This way, we gain consistency, as we now have the "str" and "str_list" typedefs. 2020-04-27 Liviu Chircu * [6a64c53a6] : usrloc: Document the "pn_pnsreg_interval" modparam 2020-04-27 Liviu Chircu * [231d4df88] : usrloc: Add flexibile RFC 8599 contact matching Once "pn_enable" is set to true, contacts are matched using pn-provider + pn-prid + pn-param by default. But this can be easily customized, for example: * pn-param can be dropped if it's irrelevant for a provider * new (custom) parameters can be included in the matching process 2020-04-27 Liviu Chircu * [ff6029b3c] : usrloc: Add modparams for RFC 8599 - SIP Push Notifications 2020-04-27 Liviu Chircu * [26b59520d] : usrloc: Organize mod_init() code Also remove the "init_flag" concept -- even if a module binds the usrloc API functions before usrloc is initialized, this is completely fine! 2020-04-27 Liviu Chircu * [559921962] : fraud_detection: Avoid random str_strcmp() error logs (cherry picked from commit f66d69a120c6bc2cd6123a9ccf88ef0c6545f574) 2020-04-26 OpenSIPS * [191e6c4fd] : Rebuild documentation 2020-04-23 Liviu Chircu * [43bf761c5] : fraud_detection: Improve fraud threshold names in events Make the threshold names consistent and more compatible with HTTP (so they don't require escaping): * calls-per-minute * total-calls * concurrent-calls * sequential-calls * call-duration 2020-04-23 Bogdan-Andrei Iancu * [e3317ce5f] : Added 'af' field to $socket_in/out() $af to be obsoleted by $socket_in(af) 2020-04-23 Bogdan-Andrei Iancu * [df9fa201b] : Updated the cfg templates with the new socket-related vars 2020-04-23 Bogdan-Andrei Iancu * [11303ed7c] : Bulk replacement of $proto with $socket_in(proto) 2020-04-23 Bogdan-Andrei Iancu * [ca00e8ebe] : Bulk replacement of $Ri/$Rp with $socket_in(ip)/(port) 2020-04-23 Bogdan-Andrei Iancu * [b599792c1] : Bulk replacement of [tcp_]children with tcp|udp_workers 2020-04-23 Bogdan-Andrei Iancu * [fa0826347] : Bulk replacement of "listen=" with "socket=" 2020-04-22 Bogdan-Andrei Iancu * [b41115beb] : Adapted default cfg to the changes in socket-related keywors/variables 2020-04-22 Bogdan-Andrei Iancu * [5d82f98ff] : When doing advertising, if advertised port is not give, use the real port 2020-04-22 Bogdan-Andrei Iancu * [70180f16b] : Mark several script vars as obsolete. $Ri to be replaced by $socket_in(ip) $Rp to be replaced by $socket_in(port) $pr/$proto to be replaced by $socket_in(proto) $fs to be replaced by $socket_out 2020-04-22 Liviu Chircu * [afb721ed1] : async statement: Improve error log when tm is missing 2020-04-22 Liviu Chircu * [fc6f8f040] : rest_client: Disable "Expect: 100-continue" by default Although the "100 Continue" flow sometimes saves bandwidth when the server replies with an error response, it also has some drawbacks: * extra roundtrips, adding latency and complicating the async handling * the client body upload and server body download must be performed within the same curl_multi_perform() loop, during the async resume callback, limiting the amount of parallelism that can be obtained when compared to the simple flow From now on, the "100 Continue" flow for POST/PUT requests with bodies larger than 1024 bytes is disabled by default. Developers may enable it using a new, backwards-compatible, "enable_expect_100" module parameter. Fixes #2081 2020-04-22 Bogdan-Andrei Iancu * [bf57444c3] : Added $socket_out and $socket_out(field) variable. This gives RW access to the outbound socket. If not explicitly set, the inbound will be used (as out==in will be assummed) 2020-04-22 Bogdan-Andrei Iancu * [dc26f908b] : Added $socket_in(field) and $socket_in variables 2020-04-22 Bogdan-Andrei Iancu * [a938e8d16] : Rename functions for operating with listener->sockets 2020-04-22 Bogdan-Andrei Iancu * [5cd1f52db] : Updated keywords list for vim 2020-04-22 Bogdan-Andrei Iancu * [21cc02f18] : Rename tcp_listen_backlog var to tcp_socket_backlog 2020-04-22 Bogdan-Andrei Iancu * [6ccc45b63] : Removed deprecated 'children', 'use_chidlren' and 'tcp_children' 2020-04-22 Bogdan-Andrei Iancu * [39e9a98dd] : Removed deprecared "fork" keyword Use "debug_mode" instead 2020-04-22 Bogdan-Andrei Iancu * [8487730a8] : Removed deprecated "debug" keyword Replaced by log_level 2020-04-22 Bogdan-Andrei Iancu * [b22d980cf] : Move from "listen" to "socket" for listner definition listen -> socket tcp_listen_backlog -> tcp_socket_backlog Old versions are still accepted, but with warning 2020-04-21 Vlad Patrascu * [629c19127] : b2b_entities: drop the "replication_mode" module parameter Possibly generating the same callid for new client entities from multiple instances has no use in the actual replication mechanism based on the clusterer module. 2020-04-21 Vlad Patrascu * [e6ca5949d] : b2b_entities: document the cluster_id modparam 2020-04-21 Liviu Chircu * [96fe12e50] : drouting: Clean up incorrect error log During use_next_gw(), if there is no AVP available for qrouting accounting, it means do_routing() was called w/o a QR profile! 2020-04-21 Vlad Paiu * [8222313dc] : Fixed crash in dispatcher mod_ini 2020-04-20 Bogdan Andrei IANCU * [d59715ec3] : Merge pull request #2037 from l2dy/tracer tracer: fix null pointer dereference 2020-04-19 OpenSIPS * [bddfe1a87] : Rebuild documentation 2020-04-19 Bogdan-Andrei Iancu * [b1faba4c3] : [call_center] added E_CALLCENTER_AGENT_REPORT event This reports any change in the agent status 2020-04-19 Bogdan-Andrei Iancu * [769ae098a] : [call_center] fix init of custom table/column names for cc_flows 2020-04-19 Bogdan-Andrei Iancu * [5dd5aa5c0] : [call_center] better error handling 2020-04-19 Razvan Crainea * [e4375ef90] : [call_center] bridge call_center agent and customer 2020-04-19 Razvan Crainea * [b15b02490] : [call_center] allow negative replies from media flow recording 2020-04-19 Razvan Crainea * [f8a1b9884] : [call-center] if a flow_id recording is available, leave the call in queue 2020-04-19 Razvan Crainea * [0937e6051] : [call_center] some spellchecking on docs 2020-04-19 Razvan Crainea * [bd17b24c3] : [call_center] pass via cc_handle_call() a custom param to B2B scripts an opaque string to be passed as parameter to the "callcenter" and "agent" B2B scenarios. It is itended for custom integration of the call center module and it is 100% up to the script writer about the value and purpose of this parameter, OpenSIPS will not touch or iterpret it. 2020-04-19 Razvan Crainea * [c6132f2da] : [call_center] expose flow columns as module parameters 2020-04-19 Razvan Crainea * [bfc16d65c] : [call_center] added the b2b XML scenario needed by audio ID 2020-04-19 Razvan Crainea * [52b655c24] : [call_center] add flags to bridge extern 2020-04-19 Razvan Crainea * [d2fc255f0] : [b2b_logic] add reject indication prevent CANCEL from being generated for entities that have been declined This only happens when bridging two calls 2020-04-19 Razvan Crainea * [6d34960a9] : [b2b_logic] suppress delete not found warning 2020-04-19 Razvan Crainea * [89b122335] : [b2b_logic] fix bridge_extern to consider cb mask 2020-04-19 Razvan Crainea * [e9c6081fe] : [call_center] add flow_id announcement/message support This is an optional audio announcement to be played to the agent (to get info about the flow) right before getting the call distributed from the flow. That's it, a audio identification of the flow which distributed the incoming call. 2020-04-18 Bogdan-Andrei Iancu * [e02bcb753] : [call_center] Added option to queue calls if no agents logged 2020-04-18 Bogdan-Andrei Iancu * [463d09d3b] : [call_center] Split a separate DB conn for runtime tables (cc_calls) 2020-04-18 Bogdan-Andrei Iancu * [bdb7e532a] : [call_center] Fix condition for persistent wrapup time 2020-04-18 Bogdan-Andrei Iancu * [0567aa4ef] : [call_center] Fixed bad number of columns in DB query 2020-04-18 Bogdan-Andrei Iancu * [95ba92ded] : [call_center] Make cc_agents table customizable Name and columns may be changed via modparams This makes easier to mapp the agents table on other DB tables 2020-04-18 Bogdan-Andrei Iancu * [2cf897536] : [call_center] boost the version for cc_agents and cc_flows tables 2020-04-18 Bogdan-Andrei Iancu * [8bba471ba] : [call_center] added the message_dissuading column to cc_flows 2020-04-18 Bogdan-Andrei Iancu * [c5526ec22] : [call_center] docs on the dissuading capabilities 2020-04-18 Bogdan-Andrei Iancu * [0306a0b72] : [call_center] Adding the dissuading columns in cc_flows table 2020-04-18 Bogdan-Andrei Iancu * [15f284e37] : [call_center] Adds call dissuading support Configurable per flow, the dissuading means to redirect a call to another destination, if the queue/flow is overloaded: * if the number of calls already in the queue exceeds the diss_qsize_th threshold * if the estimated time to wait of the queue exceeds the diss_ewt_th threshold * if the call was waiting in the queue for longer than diss_onhold_th threshold 2020-04-18 Bogdan-Andrei Iancu * [934c2ba55] : [call_center] Accept empty tables for flows & agents This allows the module to start even if there is no data provisioned 2020-04-18 Bogdan-Andrei Iancu * [a419fef67] : [call_center] updated docs on wrapup time 2020-04-18 Bogdan-Andrei Iancu * [81b56167a] : [call_center] Added wrapup time column to cc_flow and cc_agent 2020-04-18 Bogdan-Andrei Iancu * [49f45b2b9] : [call_center] Improved wrapup time support The flows and agents may have optional wrapup time. Rules: * if no per-agent wrapup time, use the global value * the per-flow wrapup overrides the per-agent value 2020-04-17 Vlad Patrascu * [17b44ea1f] : xml: allow access to nodes with undefined namespace prefixes Related to #1988 2020-04-17 Vlad Patrascu * [49622ba49] : b2b_logic: replicate tuple's extra headers 2020-04-16 Vlad Patrascu * [22cbb4e71] : Properly check script functions parameter types with the -c option Also, do not omit from syntax checking functions that are part of IF statement experssions. Closes #1993 2020-04-16 Bogdan-Andrei Iancu * [bb7afdc2d] : [exec] improve docs on exec async + launch Related to #2049 2020-04-16 Bogdan-Andrei Iancu * [223157444] : Merge branch 'robdyck-master' 2020-04-16 Bogdan-Andrei Iancu * [b47d7a617] : Removed extra space 2020-04-16 Bogdan-Andrei Iancu * [4558e7af6] : Merge branch 'master' of https://github.com/robdyck/opensips into robdyck-master 2020-04-14 Bogdan Andrei IANCU * [fe24824e0] : Merge pull request #2074 from besser82/topic/besser82/json_c_014_so_5 Add support for upcoming json-c 0.14.0. 2020-04-14 Vlad Patrascu * [39d85a22d] : stir_shaken: use the proper signature format Use the raw octet sequence of the R and S integer components instead of the DER encoding as the signature value before base64 encoding. Reported by Alexandru Tripon. 2020-04-14 Bogdan-Andrei Iancu * [bfdc1e34f] : Docs updated with dialoginfo_mute_branch() 2020-04-14 Bogdan-Andrei Iancu * [fb3736599] : Added new dialoginfo_mute_branch() function. This function mutes the publishing for a certain branch of the call (to be used from branch route). The muting may be total (caller and callee) or only for caller or callee (controlled via the optional param of the function). 2020-04-14 Björn Esser * [65ba3d4c7] : Add support for upcoming json-c 0.14.0. TRUE/FALSE are not defined anymore. 1 and 0 are used instead. 2020-04-13 Bogdan-Andrei Iancu * [dec009ee2] : Improve canceling of transactions doing only t_wait_for_new_branches(). If a transaction has no real signalling branch, but only doing t_wait_for_new_branches(), upon caller cancel inject a 487 reply on the phony/waiting branch in order to terminate the transaction on the spot. The provious behavior was to wait (even after the cancel) for the phony/waiting branch timeout (fr_inv_timeout) and to generate an 408 timeout. Now, there is no useless waiting and a proper 487 is generated. (cherry picked from commit 8af80a40bb9877b91380da670353a68c53f0a36b) 2020-04-13 Bogdan-Andrei Iancu * [ddc2ac911] : Fix un-released transaction upon t_wait_for_new_branches + cancel. If t_wait_for_new_branches() is used and no real signaling branch is added, the caller canceling must not be ignored upon branch selection. The injected 408 timeout on the phony branch must be considered, leading the transaction termination. Thanks to Chris Maciejewski for reporting and providing troubleshooting info. Also thanks to Razvan Crainea ( @razvancrainea ) for investigating and reproducing the problem. (cherry picked from commit 7221b984d555cb68fd07e1bfb502607446345d42) 2020-04-13 Liviu Chircu * [fa4e4fa70] : Fix compilation warnings with -DUSE_FUTEX It seems that whenever "time.h" is included without first enabling _GNU_SOURCE, including "unistd.h" afterwards will leave the "syscall" function undeclared, regardless whether _GNU_SOURCE is defined or not. ../../parser/../mem/../futex_lock.h: In function ‘get_lock’: ../../parser/../mem/../futex_lock.h:78:31: warning: implicit declaration of function ‘syscall’; did you mean ‘sysconf’? [-Wimplicit-function-declaration] #define futex_wait(lock, val) syscall(SYS_futex, lock, FUTEX_WAIT, val, 0, 0, 0) ^ ../../parser/../mem/../futex_lock.h:268:4: note: in expansion of macro ‘futex_wait’ futex_wait(lock, 2); ^~~~~~~~~~ 2020-04-13 Vlad Paiu * [2ac6f2bcf] : Added support for early BYE vs 200OK race condition Also polished docs a little bit 2020-04-12 OpenSIPS * [1b8adc7b2] : Rebuild documentation 2020-04-11 Bogdan-Andrei Iancu * [8a7b6f58f] : Fix bad err check and reporting Reported by Vasilios Tzanoudakis 2020-04-10 Vlad Patrascu * [07f7fdbfa] : b2b_entities: fix a crash when no entity storage backend is used 2020-04-10 Vlad Patrascu * [fd19afa98] : b2b_entities: do not call the entity callbacks under lock 2020-04-10 Vlad Patrascu * [5b579d7a7] : b2b_logic: add replication through entities storage 2020-04-10 Vlad Patrascu * [f866dc955] : b2b_entities: instruct entity_delete if replication should be done 2020-04-10 Vlad Patrascu * [d838df07b] : b2b_entities: add ACK event type for entity callbacks Split the sending/receiving of an ACK from the B2B_EVENT_UPDATE entity callback event type into a new type. 2020-04-10 Vlad Patrascu * [c92f8e694] : b2b_entities: inform callback about serialization backend type The entity callback now has an extra param which describes the serialization backend used (cluster or DB). 2020-04-09 Vlad Paiu * [d9d1b9660] : Added script attributes per dispatcher entry & added algo 10 2020-04-05 OpenSIPS * [dfe7b0511] : Rebuild documentation 2020-04-03 Liviu Chircu * [28fe6671c] : Merge pull request #2042 from l2dy/route Add missing NULL check 2020-04-03 Liviu Chircu * [a0b69ed08] : Merge pull request #2043 from l2dy/exec-check exec: fix NULL check after malloc 2020-04-03 Liviu Chircu * [f103dd47b] : Merge pull request #2044 from l2dy/rtpengine rtpengine: check NULL before assignment 2020-04-03 Liviu Chircu * [962ba0718] : Merge branch 'db_virtual' of https://github.com/l2dy/opensips into l2dy-db_virtual 2020-04-03 Liviu Chircu * [b64d072cb] : Merge pull request #2047 from l2dy/dialog dialog: fix possible overflow 2020-04-03 Liviu Chircu * [ae42930f7] : Merge pull request #2046 from l2dy/tm tm: type cast before shift to avoid overflow 2020-04-03 Liviu Chircu * [f1f892b03] : Merge pull request #2039 from l2dy/osp osp: actually fix potential use of uninitialized pointer 2020-04-03 Liviu Chircu * [31fbdc99f] : Merge pull request #2040 from l2dy/exec exec: fix potential use of uninitialized pointer 2020-04-03 Liviu Chircu * [5378fd007] : Merge pull request #2041 from l2dy/action Fix potential out-of-bounds access of sroutes->request 2020-04-03 Liviu Chircu * [ea12edba5] : Core: Add a memory allocator stress testing suite 2020-04-03 robdyck <58280584+robdyck at users.noreply.github dot com> * [8516ae538] : Update rtpproxy.c 2020-04-03 robdyck <58280584+robdyck at users.noreply.github dot com> * [7b70ecc9e] : Update rtpproxy.c 2020-04-03 Liviu Chircu * [54d4af2f3] : HP_MALLOC: Aggregate SHM statistic updates It is better to update the stats with a diff of the attached/detached/split/merged fragment changes. Updating the stats in a "step by step" manner has the side-effect of creating temporarily bogus values. (i.e. negative "used" and/or "real_used") Many thanks to 46Labs for supporting this work! 2020-04-03 Liviu Chircu * [0d6d33e58] : HP_MALLOC: Add "re-scanning" logic Given that HP_MALLOC has fine-grained locking, if the big fragment shifts down from hash bucket N to bucket N-1 due to another process performing the allocation, we may actually "lose" it during our own scan, since bucket N-1 was empty and we're now waiting for bucket N to unlock. When it does unlock, it will also be empty. As a solution: retry the scan up to N times, as long as it's feasible! Many thanks to 46Labs for supporting this work! 2020-04-03 Liviu Chircu * [3634b3982] : HP_MALLOC: Fix computation of PKG stats Many thanks to 46Labs for supporting this work! 2020-04-03 Liviu Chircu * [fc9344a5b] : HP_MALLOC: Dramatically reduce memory fragmentation For HP_MALLOC to offer optimal parallel allocation performance, it needs the memory to be fragmented: the more available chunks, the better its performance. However, there needs to be some coalescing as well, otherwise variable-length allocations past the 10K range will quickly deplete (fragment) even SHM pools of 10+ GB. This patch adds the following heuristics to HP_MALLOC and HP_MALLOC_DBG: * shm_malloc(): only split a fragment if the resulting chunk is at least MIN_SPLIT_SIZE bytes (default 256 for PKG, 4096 for SHM) * shm_free(): try to coalesce the next fragment (enough to fix all fragmentation issues) Many thanks to 46Labs for supporting this work! 2020-03-31 Ovidiu Sas * [1897599fd] : trace: improve documentation for mi trace command 2020-03-29 OpenSIPS * [b2698583b] : Rebuild documentation 2020-03-26 Liviu Chircu * [bc73c1a68] : Contributors: Merge duplicate identities 2020-03-25 Vlad Patrascu * [25d37b692] : dialog: fix a replicated profiles counting issue The incorrect profile counting was caused by a race between the processing of the replicated dialog create/update packets. While processing the create packet, the lock was released before linking the dialog into a profile and setting the sharing tag. As such, the process that handled the update packet could insert the dialog into a profile itself, but with an improper sharing tag. Thanks to 46Labs for reporting and help with troubleshooting this! (cherry picked from commit 7e623b302191b6a34087b1527ef5383914ed1663) 2020-03-25 Liviu Chircu * [d75def455] : mi_fifo: Add a default for "fifo_name" This is useful for test automation, since now we only have to load "mi_fifo.so" programatically in order to offer MI communication. 2020-03-24 Nick Altmann * [5d58407bf] : RPM packaging: add rate_cacher module 2020-03-24 Liviu Chircu * [86ef10af2] : acc: Improve oom handling Do not populate bogus str values (e.g. {NULL, 3}) when out of SHM and setting $acc_extra. 2020-03-24 Vlad Paiu * [1352823dd] : Added contrib to rate_cacher 2020-03-24 Vlad Paiu * [a0d3f3b6f] : Added Rate_Cacher module Module to be used for caching & real time querying of ratesheets attached to a client or vendor. Querying can be done from the script or from the MI level. The module can also filter and re-order vendors based on a set price profitability. 2020-03-24 Vlad Paiu * [b429f8f6d] : Added contributors 2020-03-24 Nick Altmann * [baa5cfcb9] : Revert "DEB packaging: add auth_jwt module package" Because not all supported distributives have libjwt-dev This reverts commit 5e7a57f14ae0817748ee18a7190003e0f5b6a717. 2020-03-23 Razvan Crainea * [24d0ef25c] : media_exchange: add support for updating media forks 2020-03-23 Nick Altmann * [41eafed17] : RPM packaging: add media_exchange module 2020-03-22 OpenSIPS * [b8557bd2f] : Rebuild documentation 2020-03-22 Ovidiu Sas * [4add9dcac] : mi_html: improve documentation for params for mi commands 2020-03-22 Ovidiu Sas * [408962ca4] : mi_http: update documentation with more examples 2020-03-20 Bogdan-Andrei Iancu * [7b62f2453] : The main process (attendant) is no longer running the child_init() The main proc must stay free of any db connections, so it can later fork and child_init() other procs (due auto_scaling). For the modules which were keeping a DB conn open in main proc for later usage, during module destroy, the new approach is to open the conn, on the spot, in the destroy handler. Related to #2003 2020-03-20 Razvan Crainea * [b3bf38016] : media_exchange: prevent double free for replicated media session 2020-03-20 Razvan Crainea * [c86340f40] : media_exchange: make sure we have storage replicated 2020-03-20 Răzvan Crainea * [c11538bd5] : Merge pull request #2038 from l2dy/media_exchange media_exchange: fix NULL check 2020-03-19 Bogdan-Andrei Iancu * [90c025cfb] : Avoid reusage of global ret code. This will override the ret code of the actual action, returning a 0 value -> script gets stopped. Fixes #2049 2020-03-19 Razvan Crainea * [5ec398183] : dialog: do not update topo hiding advertised contact This commit fixes a bug introduced by commit 7b7a9fc2bf, that was updating the contact *after* topology hiding has replaced it. This bug would be triggered when a re-INVITE/UPDATE was triggered on a call that had topology hiding enabled - in these scenarios OpenSIPS would re-learn the contact advertised by topology hiding, that is OpenSIPS itself, resulting in looped sequential requests. 2020-03-19 Bogdan-Andrei Iancu * [3ec9d1b25] : Proper detection/skipping of EOH in multipart. Do not assume a len of 2 (not even checking the content). OpenSIPS accepts (for hdrs) a single \n or \r as EOH 2020-03-19 Bogdan-Andrei Iancu * [7dd115134] : Fix wrong inheriting of Contact-Length hdr. When moving from multi part to single part, do not inherite the Ct-len hdr of the part. Fixes #1990 2020-03-19 Vlad Patrascu * [057b812d6] : b2b_entities: do not trigger an UPDATE event before CREATE For client entities, in some cases, sending the ACK and thus triggering the UPDATE event (callbacks and replication) would happen before triggering the CREATE event. Thanks to @razvancrainea for assisting! 2020-03-17 Vlad Patrascu * [9c959fa81] : b2b_entities: fix a concurrency issue between entity create and delete 2020-03-17 Vlad Patrascu * [47e2db235] : b2b_entities: always call the entity callbacks in the same order 2020-03-17 Zero King * [2132b1246] : dialog: fix possible overflow 2020-03-17 Zero King * [eeaab5255] : tm: type cast before shift to avoid overflow 2020-03-17 Zero King * [bbbe695ea] : db_virtual: check NULL before log 2020-03-17 Zero King * [f33f1d839] : rtpengine: check NULL before assignment 2020-03-17 Zero King * [8d7e2f310] : exec: fix NULL check after malloc hf->next_other should be checked instead. 2020-03-17 Zero King * [7edd729e4] : Add missing NULL check 2020-03-16 Zero King * [b6e5d0127] : Fix potential out-of-bounds access of sroutes->request 2020-03-16 Zero King * [9da92ced5] : exec: fix potential use of uninitialized pointer 2020-03-16 Zero King * [c8a99ad3d] : osp: actually fix potential use of uninitialized pointer If OSPPTransactionNew() failed, callids[0] is still uninitialized. 2020-03-16 Zero King * [375c8ea04] : media_exchange: fix NULL check 2020-03-16 Zero King * [d577608fd] : tracer: fix null pointer dereference 2020-03-16 Liviu Chircu * [590a19f11] : Merge branch 'auth' of https://github.com/l2dy/opensips into l2dy-auth Some improvements: * preserve the former behavior of returning a "Username Not Found" SIP error when the "username" or "password" PVs are not populated * return an internal error when the PVs contain unexpected values and/or types (e.g. NULL or non-string) * improve coding style in pv_authorize() 2020-03-16 Liviu Chircu * [b9a6292e9] : proto_help: Fix broken doc build 2020-03-14 Nick Altmann * [5e7a57f14] : DEB packaging: add auth_jwt module package 2020-03-14 Nick Altmann * [ef3a75fd6] : RPM packaging: add auth_jwt module package, but exclude it from build because there is no libjwt in centos/fedora 2020-03-14 Zero King * [96fcb5f9f] : auth: return -1 on error in auth_get_ha1() 2020-03-14 Zero King * [d8ec4f3b0] : Revert "auth: fix error check" This reverts commit b7772a087e4bf5c57fa4655d9fd53e074ca4247e. 2020-03-13 Razvan Crainea * [f7efd44c9] : parser/content: handle \r for Accept folding lines When receiving a heeader with folding lines, we also need to skip '\r' when parsing the new lines. This way we can accept headers such as: Accept: application/sdp, application/isup, multipart/mixed, application/dtmf, application/dtmf-relay Thanks go to 46Labs for reporting this 2020-03-13 Razvan Crainea * [071268083] : tm: proper handling of t_reply_with_body() in failure route Credits go to 46Labs for pointing out the limitation 2020-03-13 Liviu Chircu * [f59b12f46] : Merge pull request #2030 from l2dy/pua pua: fix bitmask check 2020-03-12 Razvan Crainea * [cafa49a46] : Merge branch 'feature/media_exchange' 2020-03-12 Razvan Crainea * [dfe1d930b] : b2b_entities: insert entity in hash before callback 2020-03-12 Razvan Crainea * [247b7d524] : b2b_entities: instruct update_param if replication should be done 2020-03-12 Zero King * [cd7dec8af] : pua: fix bitmask check 2020-03-12 Razvan Crainea * [1ee021465] : b2b_entities: add support for locked_by per entities 2020-03-12 Razvan Crainea * [04ab2c898] : media_exchange: fix bad error report in log 2020-03-12 Liviu Chircu * [166afb282] : Merge pull request #2029 from l2dy/b2b_logic b2b_logic: fix checking potentially uninitialized pointer 2020-03-12 Zero King * [fefd32149] : b2b_logic: fix checking potentially uninitialized pointer 2020-03-12 Liviu Chircu * [da3e78aa5] : Merge pull request #2028 from l2dy/osp osp: fix use of uninitialized pointer 2020-03-12 Zero King * [fc5b59ea3] : osp: fix use of uninitialized pointer 2020-03-12 Liviu Chircu * [32f022d72] : Merge pull request #2027 from l2dy/msilo msilo: fix excessive check 2020-03-12 Zero King * [71b6088d8] : msilo: fix excessive check 2020-03-12 Liviu Chircu * [ed1fae8d4] : Merge pull request #2025 from l2dy/dialplan dialplan: fix null printf 2020-03-12 Liviu Chircu * [fb216822e] : Merge pull request #2026 from l2dy/xsnprintf xsnprintf.c: fix excessive expression 2020-03-12 Zero King * [b04d53772] : dialplan: fix null printf 2020-03-12 Zero King * [99d35618a] : xsnprintf.c: fix excessive expression 2020-03-12 Liviu Chircu * [427a8f0ae] : Merge pull request #2024 from l2dy/auth auth: fix error check 2020-03-12 Liviu Chircu * [16bcf84bb] : Merge pull request #2023 from l2dy/stats stats: fix loop variable 2020-03-12 Zero King * [b7772a087] : auth: fix error check auth_get_ha1() returns 1 on error. 2020-03-12 Liviu Chircu * [18bcada96] : Merge pull request #2022 from l2dy/usrloc usrloc: fix malloc size 2020-03-12 Zero King * [a71272d7a] : stats: fix loop variable 2020-03-12 Zero King * [eecb094ad] : usrloc: fix malloc size 2020-03-12 Razvan Crainea * [f8d5fc901] : media_exchange: do not put on hold resuming leg 2020-03-12 Liviu Chircu * [47d9ec972] : Merge pull request #2021 from l2dy/osp osp: fix NULL pointer dereference 2020-03-12 Liviu Chircu * [92830e9df] : Merge pull request #2020 from l2dy/dialplan dialplan: fix insert error condition 2020-03-12 Zero King * [4fbb4529a] : osp: fix NULL pointer dereference 2020-03-12 Zero King * [67b1f6445] : dialplan: fix insert error condition 2020-03-12 Liviu Chircu * [596673c1a] : Merge pull request #2019 from l2dy/osp osp: remove unused variable 2020-03-12 Razvan Crainea * [5316ab0e2] : travis: exclude auth_jwt, since it is only available in buster 2020-03-12 Razvan Crainea * [10e8bcf28] : Revert "travis: add libjwt-dev" This reverts commit 88887fba0a887ddf2c0f7380ed1b30fffb72563e. 2020-03-12 Razvan Crainea * [88887fba0] : travis: add libjwt-dev 2020-03-12 Vlad Paiu * [547717bce] : Added AUTH_JWT module In some cases ( ie. WebRTC ) the user authenticates on another layer ( eg. on the actual website ), so it makes no sense to double-authenticate it on the SIP layer. Thus, the WebRTC client will simply present the JWT auth token it received from the server, and pass it on to OpenSIPS ( ie. Authorization: Bearer jwt_token_here ) which will use that for authentication purposes. 2020-03-12 Zero King * [6e062e6c6] : osp: remove unused variable 2020-03-12 Liviu Chircu * [393016591] : Merge pull request #2018 from l2dy/carrierroute carrierroute: fix return value of cr_do_route 2020-03-12 Liviu Chircu * [27326def4] : Merge pull request #2017 from l2dy/presence_xml presence_xml: fix typo in NULL check 2020-03-12 Liviu Chircu * [f7755740a] : Merge pull request #2016 from l2dy/pua_dialoginfo pua_dialoginfo: fix typo in NULL check 2020-03-12 Zero King * [b39639e50] : carrierroute: fix return value of cr_do_route 2020-03-12 Zero King * [7bc6526a6] : presence_xml: fix typo in NULL check 2020-03-12 Zero King * [64f2710f8] : pua_dialoginfo: fix typo in NULL check 2020-03-12 Liviu Chircu * [f2bf35aa1] : Merge pull request #2015 from l2dy/osp osp: fix errorcode in log 2020-03-12 Zero King * [73b6ba0a8] : osp: fix errorcode in log 2020-03-12 Liviu Chircu * [2d604cd41] : Merge pull request #2014 from l2dy/emergency emergency: fix empty debug log 2020-03-12 Zero King * [c7561c0d7] : emergency: fix empty debug log 2020-03-12 Liviu Chircu * [eadb666cf] : Merge pull request #2013 from l2dy/compression compression: remove redundant check 2020-03-12 Zero King * [921080e75] : compression: remove redundant check 2020-03-12 Liviu Chircu * [af8146e39] : Merge pull request #2011 from l2dy/mi_xmlrpc_ng mi_xmlrpc_ng: check return value of mi_xmlrpc_get_param 2020-03-12 Liviu Chircu * [fbf50f0f2] : Merge pull request #2010 from l2dy/ldap ldap: fix letter check 2020-03-12 Liviu Chircu * [36f011934] : Merge pull request #2008 from l2dy/rfc3261token Fix RFC3261 token check 2020-03-12 Zero King * [b7a715cf1] : mi_xmlrpc_ng: check return value of mi_xmlrpc_get_param 2020-03-12 Zero King * [601091dad] : ldap: fix letter check 2020-03-12 Zero King * [0a3bde458] : Fix RFC3261 token check token = 1*(alphanum / "-" / "." / "!" / "%" / "*" / "_" / "+" / "`" / "'" / "~" ) 2020-03-12 Razvan Crainea * [42edc8f4b] : media_exchange: remove extra ref for media_exchange_from_uri 2020-03-12 Razvan Crainea * [f314c6d54] : media_exchange: fix poping media forks for replication 2020-03-12 Liviu Chircu * [5b482b698] : Merge pull request #2006 from l2dy/osp osp: remove obsolete callback type check 2020-03-12 Liviu Chircu * [e4c744445] : Merge pull request #2007 from l2dy/style Code style fixes 2020-03-12 Liviu Chircu * [faee6e74c] : Merge pull request #2005 from l2dy/null-compare modules: Fix null pointer checks 2020-03-12 Zero King * [d13318eac] : msg_translator: fix indentation 2020-03-12 Zero King * [3e1127424] : proto_smpp: code style fixes 2020-03-12 Zero King * [b3dc69206] : osp: remove obsolete callback type check TMCB_ON_FAILURE_RO was removed but the corresponding debug check is kept, overriding TMCB_ON_FAILURE. See commit 2adbeacd3c7055f949048e793fa193119f3a6873. 2020-03-12 Zero King * [afecf7ce4] : tracer: fix pointer null check 2020-03-12 Zero King * [0bb45bcc7] : qrouting: fix pointer null check 2020-03-12 Zero King * [5f1068c14] : osp: fix pointer null check 2020-03-11 Razvan Crainea * [72da87b25] : rtpengine: fix compile warning Thanks to clang for spotting this 2020-03-11 Razvan Crainea * [e3f371c74] : rtpproxy: clarify notification socket docs 2020-03-11 Razvan Crainea * [0124ae362] : rtpengine: trigger event for DTMF keys Close #1691 2020-03-11 Liviu Chircu * [6418bd397] : Merge pull request #2002 from l2dy/https Fix homepage URLs 2020-03-11 Zero King * [94406117a] : Fix homepage URLs 2020-03-11 Liviu Chircu * [c4c87e1ae] : Merge pull request #2004 from hafkensite/master Fixed titles of some code examples in nathelper docs. 2020-03-11 Jasper Hafkenscheid * [cea688535] : Fixed titles of some code examples in nathelper docs. 2020-03-10 Liviu Chircu * [9056759bb] : Complete previous commit (0105ab4397e) 2020-03-10 Liviu Chircu * [0105ab439] : db_mysql/avpops: Properly return DOUBLE/DECIMAL values This patch fixes avp_db_query() calls which fetch data from DOUBLE columns in MySQL, which would otherwise return some strange errors. Many thanks to Calvin Ellison and Brett Nemeroff for the report and helping come up with the final fix! 2020-03-10 Liviu Chircu * [208c803d6] : Merge branch 'nullptr' of https://github.com/l2dy/opensips into l2dy-nullptr 2020-03-10 Liviu Chircu * [c2354606e] : Merge branch 'safemalloc' of https://github.com/l2dy/opensips into l2dy-safemalloc 2020-03-10 Liviu Chircu * [3f56049e0] : Merge pull request #1998 from l2dy/assign sipcapture: remove duplicate assignment 2020-03-10 Liviu Chircu * [a2edd0d17] : registrar: Fix segfault within debug log Many thanks to Robert Dyck for the report! 2020-03-09 Vlad Patrascu * [e5c8557f8] : b2b_entities: always allocate the proper size for the entity struct For replicated or DB restored server entities, the entity struct size would have an extra unused To tag length. 2020-03-09 Liviu Chircu * [8d3c03c2b] : Merge pull request #2001 from l2dy/typo usrloc: fix typos 2020-03-09 Zero King * [afb8ab95b] : mi_fifo: fix NULL pointer dereference 2020-03-09 Zero King * [8dcf840ce] : usrloc: fix typos 2020-03-09 Zero King * [c58df362b] : Fix malloc error handling 2020-03-09 Ovidiu Sas * [b45301e3c] : db_http: enhanced logging for easier troubleshooting 2020-03-09 Zero King * [53ff949b8] : sipcapture: remove duplicate assignment 2020-03-09 Razvan Crainea * [31fc3b609] : add DFKS to excluded modules 2020-03-09 Razvan Crainea * [6d3369485] : db_unixodbc: rename con.[ch] files to db_con.[ch] `con` is not a valid name under Windows. See ticket #1212 2020-03-09 Razvan Crainea * [ac0b377c9] : media_exchange: remove LM_INFO debugging lines 2020-03-09 Razvan Crainea * [cb5e2e610] : media_exchange: fix typo in fork vs session state Credits go to clang compier for spotting this :) 2020-03-09 Liviu Chircu * [1849eb174] : Merge pull request #1997 from l2dy/precedence Fix time comparison 2020-03-09 Razvan Crainea * [de949443f] : media_exchange: adhere to new b2be callback interface 2020-03-09 Zero King * [0720c5e2b] : Fix time comparison ?: has lower precedence than +. 2020-03-08 Liviu Chircu * [f294f3e92] : Merge pull request #1995 from l2dy/unreachable Remove dead code 2020-03-08 Zero King * [64daab832] : Remove dead code 2020-03-06 Vlad Patrascu * [40913a2de] : Revert "b2b_entities: fix a SHM leak when inserting an entity into the hash" This reverts commit 88eab410cb590f5fae94647d9f5c3e952af28893. 2020-03-06 Razvan Crainea * [e5dbbf807] : media_exchange: rework referencing and legs' state 2020-03-06 Razvan Crainea * [d5ea61075] : media_exchange: fix listitem structure in doc 2020-03-06 Razvan Crainea * [c0d9fd6c3] : media_exchange: adjust functions-routes mappings 2020-03-06 Razvan Crainea * [268663059] : media_exchange: add commands for pausing/resuming forks 2020-03-06 Razvan Crainea * [3e69d2a3e] : media_exchange: add support for handling reinvites 2020-03-06 Razvan Crainea * [eeab4be96] : parser/sdp: store sendrecv value even if on hold 2020-03-06 Razvan Crainea * [a40ef4424] : media_exchange: fix a few docs typos 2020-03-06 Razvan Crainea * [228e77bd9] : media_exchange: always store forks ip and port 2020-03-06 Razvan Crainea * [75e7fc065] : media_exchange: add support for stopping forking 2020-03-06 Razvan Crainea * [cfe67deac] : media_exchange: add persistency 2020-03-06 Razvan Crainea * [68944bdfc] : rtpproxy: add support for stopping recording 2020-03-06 Razvan Crainea * [0cc526dda] : media_exchange: add media_fork_to_uri implementation 2020-03-06 Razvan Crainea * [9acd52de3] : media_exchange: rework sdp static buffers 2020-03-06 Razvan Crainea * [2788ea2df] : media_exchange: implement media_fork_from_call 2020-03-06 Razvan Crainea * [70ada289d] : media_exchange: refactor sessions and utils code 2020-03-06 Razvan Crainea * [97b6fa530] : media_exchange: implement media_exchange_from_call_to_uri MI 2020-03-06 Razvan Crainea * [6ddd2f6dd] : media_exchange: implement media_exchange_from_uri() 2020-03-06 Razvan Crainea * [e0ed7da6e] : dialog: add command to get call direction 2020-03-06 Razvan Crainea * [b7ea07626] : media_exchange: s/media_send/media_fork, s/media_fetch/media_exchange 2020-03-06 Razvan Crainea * [1bf00ac8a] : media_exchange: add rtpproxy & b2b doc clarifications 2020-03-06 Razvan Crainea * [7e789944a] : media_exchange: fix resume when other participant is on hold 2020-03-06 Razvan Crainea * [c906c3ce2] : media_exchange: don't put the other leg on hold if it has ongoing session 2020-03-06 Razvan Crainea * [f28342371] : media_exchange: add MI media_terminate MI command 2020-03-06 Razvan Crainea * [64d2b5232] : media_exchange: add skeleton for MI commands 2020-03-06 Razvan Crainea * [6ed6a68d0] : media_exchange: add initial version of documentation 2020-03-06 Razvan Crainea * [6a1637db0] : media_exchange: make media_send_from_call leg optional 2020-03-06 Razvan Crainea * [66b63cc16] : media_exchange: terminate b2b sessions if dialog ends 2020-03-06 Razvan Crainea * [3e1a091b6] : media_exchange: make utils work with media_session_leg instead of dlg 2020-03-06 Razvan Crainea * [eb451f09b] : media_exchange: make nohold parameter integer 2020-03-06 Razvan Crainea * [6233710bd] : media_exchange: full implementation of media_fetch_to_call() 2020-03-06 Razvan Crainea * [8447abc7c] : dialog: indicate the leg to send the request to 2020-03-06 Razvan Crainea * [337d4ef49] : media_exchange: rework ref counting for media session instead of keeping ref for media session, we need to keep them at the leg level, and the counting at the session level will be indicated by the absence of media legs 2020-03-06 Razvan Crainea * [363637cd2] : dialog: add macro for getting dlg out buffer 2020-03-06 Razvan Crainea * [3b0e6ac46] : media_exchange: add session handling files 2020-03-06 Razvan Crainea * [2adc746cf] : media_exchange: complete previous commit :) 2020-03-06 Razvan Crainea * [f4bdbefa9] : media_exchange: fix module's name Credits go to @liviuchircu for pointing it out 2020-03-06 Razvan Crainea * [7c28348de] : media_exchange: initial skeleton 2020-03-06 Razvan Crainea * [7d45c7fb9] : dialog: add api command to send indialog request 2020-03-06 Razvan Crainea * [e4b4a8760] : dialog: remove useless method parsing 2020-03-06 Razvan Crainea * [be5ed3f4b] : dialog: add get_dlg_by_callid in API 2020-03-06 Razvan Crainea * [ad947dac9] : rtpproxy: remove error when API is loaded but module is not used 2020-03-06 Vlad Patrascu * [832ef451e] : rabbitmq_consumer: fix a bug in "connection_id" modparam parsing Closes #1987 2020-03-05 Vlad Patrascu * [88eab410c] : b2b_entities: fix a SHM leak when inserting an entity into the hash The leak would happen for server entities restored from the DB or received through replication. 2020-03-05 Vlad Patrascu * [f83fba9fe] : Merge branch 'feature/b2b-clustering' 2020-03-05 Vlad Patrascu * [39c7e83cd] : b2b_entities: refactor API exports into a new header file 2020-03-05 Vlad Patrascu * [d5247850b] : b2b_entities: properly insert into DB replicated client entities 2020-03-05 Vlad Patrascu * [2a9431171] : b2b_entities: only trigger entity delete event one time 2020-03-05 Vlad Patrascu * [80af12975] : b2b_entities: add generic data storage and entity events mechanism 2020-03-05 Vlad Patrascu * [59e2c4d09] : b2b_entities: remove unused dialog state 2020-03-05 Vlad Patrascu * [37360d25e] : b2b_entities: add cluster replication 2020-03-05 Razvan Crainea * [194398342] : proto_hep: clarify homer5_on parameter doc Thanks go to Shaun for reporting this on the mailing list 2020-03-04 Razvan Crainea * [89b740394] : rtpengine: handle scenario where callid/from/to tags are missing Instead of fetching the call coordinates at the beginning of the function, try to see if it was custom provided in flags. Thanks go to Rob Moore for spotting this 2020-03-04 Razvan Crainea * [eae2a86ee] : tm: fix t_reply_with_body doc - cannot be run from failure_route 2020-03-04 Razvan Crainea * [f36007009] : Revert "tm: Allow t_reply_with_body() from failure route" This reverts commit b3da92d6b3ecf281976ad8a5e262cfb1aadf30ad. 2020-03-03 Bogdan-Andrei Iancu * [9625a0de1] : [usrloc] Fixed the name of the table param in ul_add MI cmd (cherry picked from commit 7d75f49a29d55e8051d915b263515a2cb56c8687) 2020-03-02 Liviu Chircu * [b3da92d6b] : tm: Allow t_reply_with_body() from failure route This now also matches the docs, similarly to t_reply(). Credits to Nick Altmann 2020-03-01 OpenSIPS * [c4fb2df87] : Rebuild documentation 2020-02-28 Vlad Patrascu * [4b44d9a1d] : topology_hiding: improve doc for th_contact_encode_scheme 2020-02-28 Razvan Crainea * [0d548baae] : lua: allow `lua_exec` to be called from local_route Fix #1980 2020-02-27 Vlad Patrascu * [ead54d09c] : topology_hiding: add support for base32 encoding of thinfo param 2020-02-27 Vlad Patrascu * [10d43379f] : utils: add base32 encoding/decoding functions 2020-02-27 Liviu Chircu * [e818ac259] : cachedb_mongodb: Fix memory leak in cache_raw_query() Thanks to @ycxwoo for spotting this issue! Fixes #1985 2020-02-27 Liviu Chircu * [b0d65e9af] : cachedb_mongodb: Fix possible off-by-one error 2020-02-27 Liviu Chircu * [a87938f72] : cache_raw_query() parser: Do not PV-expand the list of AVPs 2020-02-27 Liviu Chircu * [00fdefe58] : qrouting: Add the "decimal_digits" modparam Controls the amount of decimal digits to use in logging or MI output. 2020-02-27 Liviu Chircu * [369d0b85a] : qrouting: Properly subscribe for internal 408 timeouts 2020-02-27 Liviu Chircu * [1e32d866f] : qrouting: Display the # of samples in logs and MI `qr_status` 2020-02-27 Liviu Chircu * [80b20a0e0] : qrouting: Fix broken interaction with use_next_gw() * rework the qrouting <-> drouting parameter passing logic such that gateway stats get properly attributed to the current gateway, during serial forking * avoid registering tm/dialog callbacks more than 1 time * other improvements (better logging, algorithm bugfixes) 2020-02-27 Liviu Chircu * [837cd9275] : qrouting: Simplify convoluted logic 2020-02-26 Liviu Chircu * [2e8b75883] : qrouting: Fix output structure in MI `qr_status` 2020-02-26 Liviu Chircu * [e20ed9955] : drouting: Remove unused structs; Add useful comments 2020-02-26 Liviu Chircu * [b0b9ecf65] : qrouting/drouting: Clean up TODOs and code 2020-02-26 Liviu Chircu * [527a87a83] : qrouting: A few fixes / UX improvements 2020-02-26 Liviu Chircu * [4ffe53608] : drouting: Fix an SHM leak with "acc_call_params_avp" Do NOT store an SHM pointer into an AVP, as you have a minimal chance of somehow getting invoked so you can properly free it! The solution is to store the entire struct into the AVP, as a (char *) buffer -- the tm module will properly free the whole AVP (including this buffer) afterwards. Thanks to Răzvan for the tip! 2020-02-26 Liviu Chircu * [46e55b993] : drouting: Fix a code merging bug in route_to_gateway() This commit fixes a merge error in e5b1358259e1, where route2_gw() got broken because the @tmp variable wasn't properly initialized. Also, some minor code style improvements / comment fixes / renames. 2020-02-26 Liviu Chircu * [b25f9901a] : qrouting: Include all custom stats in MI `qr_status` 2020-02-26 Liviu Chircu * [3f8940374] : qrouting: Usability improvements * do not allow functions to be called in startup_route. The data may not be available yet, as we're racing against the RPC reload issued via child_init() * add various useful debug logs 2020-02-26 Liviu Chircu * [a6948b526] : qrouting: Add "min samples" awareness, per stat qrouting may now be configured to ignore partially accumulated statistics for any of its gateways (this is the case after a restart, a dr_reload or during runtime, when there are simply not enough stats available). 2020-02-26 Razvan Crainea * [e409bd0db] : qrouting: remove redundant qr_get_rules declaration Fixes Travis build 655051590 2020-02-25 Liviu Chircu * [bea9102fc] : qrouting: Add generic support for custom stats Using the "extra_stats" modparam to define these custom statistics and the "qr_set_xstat()" script function to populate them, script writers may now add new dimensions to their quality-based routing logic. For example, some possibly useful custom stats for a gateway which may be worthwhile to factor into the routing logic could be its MoS (mean opinion score) or its R-Factor (rating factor). Both of these metrics indicate the quality of the media passing through the gateway. 2020-02-25 Liviu Chircu * [c48e3dc92] : qrouting: Add a weight-based selection algorithm qrouting now supports two destination selection algorithms, via a new "algorithm" modparam: * "dynamic-weights" (default) * "best-dest-first" New "penalty" columns have been added to the qr_profiles table, to act as a way of penalizing underperforming gateways, which will receive less traffic. Documentation updated accordingly. 2020-02-24 Razvan Crainea * [da636430d] : rtpengine: always learn process local pid Always learn the local process pid, even though there are no rtpengine sockets loaded from either script or database - they might appear later after an MI reload. Reported in sipwise/rtpengine#935 by @MarcoHierl 2020-02-24 Liviu Chircu * [0dc968169] : dialog: Fix some locking corner-cases * Re-INVITE pinging: synchronize writers and readers for the dlg->legs->adv_contact string, as well as the entire dlg->legs struct. Example subtle race conditions: 1. setting $DLG_timeout after t_relay() (read op) vs. concurrently processing a 200 OK (write op) 2. calling MI "dlg_push_var" after t_relay() (read op) vs. concurrently processing a 200 OK (write op) 3. in parallel forking, dlg_onreq_out() (read op) vs. concurrently processing 200 OK for prev. branch (write op) * DB load: to be 100% accurate, do not use ref_unsafe(), as we don't hold the lock -- use the safe version instead! 2020-02-23 OpenSIPS * [4e2f1b40d] : Rebuild documentation 2020-02-20 Razvan Crainea * [74daf88c3] : presence_dfks: specify a route param in the mi command Instead of specifying if the set route should be ran, one can add a parameter in the MI command triggered. This way one can check the value of the parameter in the route and determine how to behave. 2020-02-19 Razvan Crainea * [0bd7fbe7d] : b2b_entities: don't try to insert in db nonprintable param The b2b_entities module expects that the parameter provided during entity registrations to be a string. It stores this string in the database. However, there are cases where modules (such as siprec) force their parameter to be a pointer to a structure, therefore the string becomes non-printable. This breaks certain entities insertion in the database. This commit prevents the module from inserting a key that's not printable. In the case of siprec this is not a problem, since the module does not rely on the value that's stored in the parameter for restart - it rebuilds the value anyway. This is a temorary fix - ideally, the parameter should be able to be serialized before written in the database; although this is not possible now, it will be possible starting with 3.1. Hence this temporary fix. 2020-02-19 Razvan Crainea * [f1a2979b5] : siprec: reflect media_ip in o=line Close #1979 2020-02-19 Dan Pascu * [d8c15f8a3] : Fixed crashes and memory leaks due to improper memory cleanup 2020-02-19 Dan Pascu * [9c6931bff] : Fixed log message 2020-02-19 Liviu Chircu * [a5a4a187b] : Fix uninitialized variable warnings 2020-02-19 Dan Pascu * [443271176] : Fixed crash caused by invalid memory free (fixes #1974) 2020-02-18 Liviu Chircu * [80bd901aa] : tm + subscribers: Fix possible SHM leaks around tmb.t_req_within The severity is medium, however, as these leaks would only occur once the SHM pool is near depletion. 2020-02-18 Bogdan-Andrei Iancu * [cf62c5e3f] : Removed testing related line (cherry picked from commit ffb0577c4f476a952a59ee9e01f089e4aaf9b991) 2020-02-18 Bogdan-Andrei Iancu * [5df6702a5] : Migrated to 3.1 2020-02-18 Bogdan-Andrei Iancu * [6ad95094e] : updated to 3.0 (cherry picked from commit ba6957279ecd4a4016a2285127ec27d9659fbb4c) 2020-02-18 Razvan Crainea * [ab4cc7631] : sdp: make parse_sdp_sessions() accept optional \r\n at begin Instead of having to provide a mandatory \r\n at the begin of the SDP body that is going to be parsed, this is now optional. Thus the SDP can now start directly with the `v=` line. This commit also fixes two other issues: 1. the function might underflow if `v=` is found in the first two chars 2. if the SDP has some garbage at the begining, then it is valid, the previous function would have validated it 2020-02-18 Bogdan-Andrei Iancu * [b7b22d6e3] : Fix computing the cseq for a branch. Instead of assuming a +1 increment (to the cseq from request), better copy the cseq from the received reply. Thanks to @razvancrainea for the brainstorming. 2020-02-18 Bogdan-Andrei Iancu * [0200c0e14] : In UAS replies, preserve the CSEQ from the UAS request Instead of computing the cseq for the forwarded replied, better use the cseq value from the original requests (like restoring). Thanks to @razvancrainea for the brainstorming on the issue. Fixes #1969 2020-02-18 Răzvan Crainea * [339773071] : Merge pull request #1975 from lemenkov/rtpengine_rearrange_macro_def rtpengine: Move RTPE_IO_ERROR_CLOSE definition up 2020-02-17 Peter Lemenkov * [519c58d30] : rtpengine: Move RTPE_IO_ERROR_CLOSE up Move RTPE_IO_ERROR_CLOSE macro up to the rest of macros. Also don't undefine it later - we might consider using it. 2020-02-17 Liviu Chircu * [675a10e2f] : $param variable: Improve behavior on error * hint that named params are only allowed within event_route * throw an error on accessing $param(name) from a route() call without parameters (i.e. avoid doing a quick-exit, be consistent). This will help users when migrating to 3.x, since fetch_event_params() used to work within a simple route. * skip the redundant "params_no == 0" check, since params is always NULL when "params_no == 0". Even without this idea, the index check below will also catch this corner-case. Thanks to Vlad Paiu for bringing this issue to attention! 2020-02-17 Dan Pascu * [6c1110344] : Better comment in documentation 2020-02-17 Dan Pascu * [230fb05c4] : Allow missing values when specifying a TLS method range in configuration 2020-02-17 Dan Pascu * [2bf57c529] : Renamed function for clarity 2020-02-17 Dan Pascu * [cf1ba6931] : Fixed parsing range for TLS methods 2020-02-17 Dan Pascu * [18b8d594d] : Fixed output of the MI tls_list command caused by wrong enum order 2020-02-17 Dan Pascu * [a24bc825e] : Re-accept TLSany as an alias for SSLv23 in the configuration After 6d16b5a TLSany was no longer recognized in the configuration resulting in a crash at startup (fixes #1973) 2020-02-16 OpenSIPS * [80445e26e] : Rebuild documentation 2020-02-14 Liviu Chircu * [b6f35076f] : qrouting scoring: Fix incomplete logic * proper return type & usage for _qr_score_gw() * complete qr_score_grp() logic for non-dirty gateways 2020-02-14 Liviu Chircu * [0f07cb0a0] : qrouting: Rework/Fix bogus gwlist sorting logic The sorting logic was incorrect, as the carriers were never actually sorted within the gwlist array -- their positions were always fixed. Only groups of gateways in-between these carriers were getting sorted by their qrouting score. For example, assuming the numbers represent qrouting-assigned scores: this rule gwlist: "4, 2, 1, CR1=0.5, 1, 0" would get sorted as: "1, 2, 4, CR1=0.5, 0, 1", whereas the correct sort would have been: "0, CR1=0.5, 1, 1, 2, 4" 2020-02-14 Dan Pascu * [98cfd9243] : Fixed crash introduced by #d4e82ea 2020-02-14 Dan Pascu * [9a7a2f67f] : Added stir_shaken to the list of excluded modules 2020-02-14 Dan Pascu * [83deb5e16] : Fixed variable names in debian rules 2020-02-14 Liviu Chircu * [6867fdb2c] : drouting schema: Allow NULL `dr_rules.sort_profile` For a given dr_rule, as long as the 'Q' algorithm is not in use, the `sort_profile` column should be NULL. 2020-02-14 Liviu Chircu * [bbc2681d8] : qrouting/drouting: Improve sorting algorithm code/schema * the algorithms are now 'N', 'W' and 'Q' (default: 'N') * simplify algorithm parsing code * simplify sorting callback registration code * update DB schema docs 2020-02-14 Liviu Chircu * [3e969a5eb] : drouting/qrouting: Improve sorting code * fix badly handled and non-handled error cases * fix misleading comments * remove solved TODOs * normalize callback names and coding style * fix typos 2020-02-13 Razvan Crainea * [d9245d223] : siprec: start recording as soon as we have 2-way audio Engage recording even for 180/183 provisional replies, not only for 200. Reported by @MikhailKalashnikov in ticket #1970 2020-02-13 Razvan Crainea * [003022779] : siprec: allow siprec_start_recording() in reply route 2020-02-13 OpenSIPS * [5a4879a31] : Rebuild documentation 2020-02-13 Razvan Crainea * [ca0d748b4] : tls_mgm: initialize method_max when default is used This commit does not necessarily fix a bug right now, as the default TLS method used is SSLv23, therefore the method_max is not even used. However, if anytime the default will be changed, the max method would not be set, thus will result in an error. 2020-02-12 Liviu Chircu * [a80e30c8e] : qrouting: Sort the qr_profiles table by primary key The QR profile rows MUST be fetched in ascending order, otherwise the binary search algorithm (see qr_set_profile()) will break! 2020-02-12 Liviu Chircu * [50f1719ca] : qrouting: Improve PDD accuracy In case a 200 OK arrives without any 180/183 beforehand, we must also take care to bump up the PDD accordingly, since the user on the UAC side did not hear any audio feedback until the call was answered! 2020-02-12 Liviu Chircu * [d05cf2a4d] : qrouting: Add the "table_name" modparam 2020-02-12 Liviu Chircu * [b9ab01786] : qrouting: Add possibility to set a weight to each stat 2020-02-12 Liviu Chircu * [9765dce5d] : qrouting: Document the recently added logic 2020-02-12 Liviu Chircu * [5990fceb3] : qrouting: Add the E_QROUTING_BAD_DST event To be triggered whenever a prefix + gateway combination falls below a quality given by the "event_bad_dst_threshold" module parameter. Default: trigger the event whenever "1+ stats fall below CRIT limit" 2020-02-12 Liviu Chircu * [83ca0861c] : qrouting/drouting: Improve callback and function naming Also provide "rule->part_name" as a useful backpointer. 2020-02-11 Liviu Chircu * [159a80ccb] : qrouting: Remove bogus code copyrights 2020-02-11 Liviu Chircu * [5e5416ba8] : qrouting: Add script functions to enable/disable a destination 2020-02-11 Liviu Chircu * [f2cc17922] : qrouting: Add MI/script commands to enable/disable a destination 2020-02-11 Liviu Chircu * [a510ccbea] : qrouting: Fix doc links; Simplify qr_dst_t The internal "dst" enum within qr_dst_t can be anonymous. There is no need to write "dst.dst.gw" code, when we can just say "dst.gw"! 2020-02-11 Liviu Chircu * [eb7b7f5da] : qrouting: Add locking for the "qr_status" MI command Prevents potential crashes on concurrent dr_reload + qr_status MI commands. 2020-02-11 Nick Altmann * [6a4d4bf3d] : RPM packaging: add qrouting module, fix comments 2020-02-11 Liviu Chircu * [d5999f062] : Merge pull request #1966 from lemenkov/remove_obsolete_vars rtpengine: Remove unused struct fields 2020-02-10 Liviu Chircu * [6cb6696fa] : Fix more gcc 10 compilation errors 2020-02-10 Liviu Chircu * [1632ff2d5] : Fix redundant zero initializations for global vars 2020-02-10 Liviu Chircu * [b864b2915] : make: Prepare for upcoming gcc 10 (use -fno-common) Per https://gcc.gnu.org/gcc-10/porting_to.html#common, -fno-common will become a default in gcc 10, so variables defined within .h files will no longer be allowed! Thanks to Peter Lemenkov for the suggestion! 2020-02-10 Liviu Chircu * [afbf2871a] : dispatcher: Fix missing "tmb" definition 2020-02-10 Liviu Chircu * [d986b8c09] : Merge branch 'gcc10_no_common' of https://github.com/lemenkov/opensips into lemenkov-gcc10_no_common 2020-02-10 Liviu Chircu * [52f3fe218] : Merge branch 'feature/qrouting' 2020-02-10 Liviu Chircu * [08b1f4233] : qrouting: Add documentation 2020-02-10 Liviu Chircu * [1d238b899] : make contrib: Fix error when /doc has no commits Also re-generate the "average commit" project statistics 2020-02-09 OpenSIPS * [521566461] : Rebuild documentation 2020-02-09 Peter Lemenkov * [fd8262cee] : rtpengine: Remove unused struct fields These two fields were copied directly from rtpproxy module but never used by this module. 2020-02-08 Peter Lemenkov * [7b59ee14e] : Fix building with gcc 10 GCC 10 started to use -no-common by default. Here is an official explanation: * https://gcc.gnu.org/gcc-10/porting_to.html#common We have to mark all the declarations of global variables with extern keyword and put the definitions into a proper file. 2020-02-08 Peter Lemenkov * [242903711] : Add missing typedef keyword Without this keyword these struct definitions are considered by GCC as a variable definition. This was catched because there is a more strict check about these variable definitions since GCC 10: * https://gcc.gnu.org/gcc-10/porting_to.html#common 2020-02-07 Liviu Chircu * [b6ef99633] : registrar: Configurable max username/domain/AoR lengths Also merge copy-pasted extract_aor() function into lib/reg directory. 2020-02-07 Liviu Chircu * [e579bc3bd] : registrar lib: Add R_INTERNAL error; Refactor array 2020-02-07 Liviu Chircu * [c5b34a852] : qrouting: Add missing include guards 2020-02-07 Liviu Chircu * [628a126fe] : cfg syntax: Fix all complex assignment operators The opensips.cfg now fully supports the non-trivial assignment operators, such as: +=, -=, *=, /=, %=, &=, |= and ^=. Syntactially, they were supported until now, but were actually unimplemented (more precisely, they were equivalent to the "=" operator). Only the "+=" operator can also work with strings, for example: $var(x) = "foo"; $var(x) += "-bar"; # now contains "foo-bar" $rU = "+40"; $rU += "729" + "884950"; # now contains "+40729884950" All of them (including "+="), work with integers: $var(i) = 0; $var(i) += 2; # 2 $var(i) *= 3; # 6 $var(i) /= 6; # 1 ... 2020-02-07 Liviu Chircu * [536e7b065] : cfg syntax: Enhance the 'return' statement The opensips.cfg now additionally allows syntax such as: * return 1; * return +2; * return -3; * return $var(foo); 2020-02-07 Liviu Chircu * [72fba8416] : cfg syntax: Disallow esoteric if/while syntax The opensips.cfg no longer accepts constructs such as: if $var(foo) { ... } if [ $var(foo) == 2 ] xlog("bar\n"); while $var(foo) < 10 { ... } ... and forces the condition to be paranthesized. Aside from any consistency considerations, this change also allows us to disambiguate the if-if-else shift/reduce conflicts of the grammar, which were so far masked using the "expect 2" rule. 2020-02-07 Liviu Chircu * [a9e45e8e0] : mid_registrar: Configurable max username/domain/AoR lengths Fixes #1964 2020-02-07 Liviu Chircu * [79e338102] : qrouting: Fix some buggy corner-cases * fix un-initialized stat history intervals * improve handling for OOM during a dr_reload 2020-02-07 Liviu Chircu * [ab683aa5c] : qrouting: Refactor the "rw_lock_qr" lock * avoid unnecessary extra referencing level * improve naming 2020-02-07 Liviu Chircu * [6c85d3a92] : qrouting: Remove dead code 2020-02-07 Liviu Chircu * [359a20fec] : qrouting: Add MI qr_reload command Refactor the "qr_profiles" code so it can be reloadable. Also, after reloading a new set of qr_profiles, make sure to refresh the cloned dr rule structures so they point to the newly reloaded data instead. 2020-02-06 Liviu Chircu * [2e9c22fec] : qrouting: Drop the gateway disabling concept A gateway should _only_ be discounted from routing if it is dead (no ping replies!), and not because it received a poor rating from qrouting. On such a worst case, it is better to simply demote the gateway to the last position in the sorted list. This way, we don't risk breaking connectivity. 2020-02-06 Liviu Chircu * [ebe9ad8d7] : qrouting/drouting: Allow reloading just 1 partition The callback logic had to be changed in order to support this feature, which would otherwise crash the server (e.g. "dr_reload my_part"). The good news is that the resulting callback API is cleaner now! 2020-02-06 Liviu Chircu * [abede7d29] : qrouting/drouting: Fix shm/pkg memory leak 2020-02-06 Liviu Chircu * [46a8e50c8] : qrouting: Code refactoring * add helpful comments * improve field naming * fix misplaced LM_DBG, could segfault 2020-02-06 Razvan Crainea * [6c9c6efa8] : net: call initialize proto function for all connections This code fixes proto ws and wss, by calling the `conn_init` function even for connections that are not sent back to main. Reported by @suharik71 in #1956 2020-02-06 Razvan Crainea * [30a7f47a0] : ws & wss: merge duplicate ws_connect code 2020-02-06 Liviu Chircu * [fdf93032b] : qrouting: Improve GW stats list management * fix double free crash due to list being circular * avoid shm leak on OOM condition 2020-02-05 Liviu Chircu * [f12e8d527] : drouting: Store callbacks in pkg, not shm 2020-02-05 Liviu Chircu * [7211e7828] : qrouting: Fix undefined vars; Startup works now 2020-02-05 Liviu Chircu * [9cf7fadc5] : qrouting/drouting: Update module dependencies 2020-02-05 Liviu Chircu * [8142b352b] : qrouting/drouting: Improve code quality [part 2] * fix "n_partitions" logic * add more OOM checks * simplify if conditions and redundant code (e.g. "return;") * improve callback ordering at registration (in execution order) * normalize coding style 2020-02-05 Liviu Chircu * [1239cb49a] : qrouting/drouting: Remove unused (deprecated?) callback 2020-02-05 Liviu Chircu * [007218a73] : qrouting/drouting: Simplify callbacks code [part 2] * avoid unnecessary, extra referencing level?! * avoid unnecessary pkg_malloc() bloat * fix several pkg memory leaks 2020-02-05 Liviu Chircu * [c29be8638] : qrouting/drouting: Simplify callbacks code [part 1] * merge unnecessary DRCB_SET_PROFILE callback * avoid unnecessary pkg_malloc() bloat, just use stack structures * fix a ton of pkg memory leaks 2020-02-05 Liviu Chircu * [4de3e3c48] : qrouting: Improve code quality [part 1] * fix some SHM leaks * avoid redundant zero initializations (either globally or on stack) * avoid redundant pointer resets to NULL after a shm_free(). If there's a double free, all modern OpenSIPS debugging allocators will detect it anyway * eliminate free_history(), just use shm_free_all() * normalize coding style 2020-02-05 Liviu Chircu * [81c9f5eb4] : qrouting: Code refactoring * name the timer function * simplify code * normalize coding style 2020-02-05 Liviu Chircu * [da22c0807] : drouting: Fix missing MI recipe array terminations 2020-02-05 Liviu Chircu * [a00b2efbc] : qrouting: Clean up mod_init code 2020-02-05 Liviu Chircu * [a6d2b5a25] : qrouting: Re-organize MI code; Update copyrights 2020-02-05 Liviu Chircu * [d054ffa86] : qrouting: Fix gcc warnings 2020-02-05 Liviu Chircu * [f5986fcc2] : Complete commit 70a7c6e30682 The email is mandatory, as it does not exist in "author_aliases" 2020-02-05 Liviu Chircu * [562a2c700] : qrouting: Integrate with 3.1 codebase * adapt to new MI API * adapt to new module interface * adapt to new timer interface * simplify dr callbacks and param passing 2020-02-05 Liviu Chircu * [e474a0b46] : Merge pull request #1962 from spacetourist/master Update contributor github aliases 2020-02-05 Callum Guy * [70a7c6e30] : contributor github alias 2020-02-04 Razvan Crainea * [41714f134] : hp_malloc: run check_double_free() under lock 2020-02-04 Razvan Crainea * [410c664c9] : hp_malloc: populate DBG info for hp_free* 2020-02-04 Razvan Crainea * [9a4a96fe9] : msg/body: reuse osips_{malloc,free}_f functions 2020-02-04 Liviu Chircu * [ff7ba6e2d] : HP_MALLOC: Fix a shm_realloc() concurrency issue On a fragment shrink operation, we must also grab the lock on the resulting fragment before inserting it (this cannot be an _unsafe operation!) Many thanks to 46Labs and Răzvan Crainea for helping troubleshoot this 2020-02-03 Vlad Patrascu * [7b4a54d78] : b2b_entities: fix several missing keys in b2be_list MI output 2020-02-02 OpenSIPS * [f3b9efc6e] : Rebuild documentation 2020-02-02 Razvan Crainea * [01e0ff99f] : core: fix string2hex returned length Reported by @johandeclercqdemocon in Ticket #1957 2020-02-02 Razvan Crainea * [df3f537d7] : tls: fix the length of masker key 2020-02-02 Razvan Crainea * [8ea7d46b8] : smpp: fix send_smpp_message() doc Thanks go to @johandeclercqdemocon for reporting this 2020-01-31 Liviu Chircu * [046e6de90] : rest_client: Fix doc build 2020-01-31 Liviu Chircu * [a9a0c44ce] : Merge pull request #1960 from spacetourist/feature-libcurl-encode [FEATURE] rest_client transformations (RFC3986 encode) 2020-01-31 Callum Guy * [268f4cb39] : :memo: provide usage instructions for RFC3986 escape transformations 2020-01-31 Callum Guy * [1c5eaead5] : :sparkles: export transformations for RFC3986 escaping 2020-01-30 Răzvan Crainea * [3dbbca754] : Merge pull request #1955 from fgast/tls_mgm_emptycrl fixes #1954 - change return value if we can not add crl files 2020-01-30 Razvan Crainea * [af5ba5205] : tls: make sure crypto rand functions are reentrant Reported by @fgast in #1953 2020-01-30 Fabian Gast * [7a84935b5] : fixes #1954 - change return value if we can not add crl files 2020-01-29 Liviu Chircu * [1a09d4cfb] : drouting: Normalize license headers; Update copyrights 2020-01-29 Liviu Chircu * [e5b135825] : drouting: Integrate qr callbacks with 3.1 codebase [part 2] 2020-01-29 Liviu Chircu * [89ad979a4] : drouting: Integrate qr callbacks with 3.1 codebase [part 1] 2020-01-29 Razvan Crainea * [587316afc] : sanitize mpath length Fix Coverity #199897 2020-01-29 Razvan Crainea * [1534d26e4] : preproc: fix possible leak when errors trigger Fix Coverity #199907 2020-01-29 Razvan Crainea * [cae397c89] : async: fix small typo when printing fixup errors Fix Coverity #199935 2020-01-29 Razvan Crainea * [3b1b9d7d0] : reload: fix possible FILE * leak when error Fixes Coverity #199978 2020-01-29 Razvan Crainea * [389d746dd] : preprocessor: check if binary is specified before running Close Coverity #200024 2020-01-29 Razvan Crainea * [ea8fa2eb3] : auto_scaling: prevent bogus scaling if no process in group Fixes Coverity #200043 2020-01-29 Razvan Crainea * [52f071ed1] : auto_scale: prevent possible overflow in auto_scale detection Fix Coverity #200080 2020-01-29 Razvan Crainea * [009e8efc3] : pt: fix possible (yet highly unprobable) division by 0 Fixed Coverity #200087, #200079, #200002, #200015 2020-01-29 Razvan Crainea * [edf7b5438] : transormation: properly check str2ipv6 transformation Fix Coverity #200023 2020-01-29 Razvan Crainea * [780d77f6a] : evi: fix checking if event was raised Fix Coverity #207909 2020-01-29 Razvan Crainea * [19fdd5281] : script: fix error detection on route() with var name Fix Coverity #207912 2020-01-29 Razvan Crainea * [1b8a9acb9] : stats: initialize found to 0 Fix Coverity #207916 2020-01-29 Razvan Crainea * [3a10745bd] : script: fix crash setting ruri username to NULL Fixes Coverity #207920 2020-01-29 Razvan Crainea * [85c851d96] : event_{xmlrpc,jsonrpc,rabbitmq}: read sync reply in a long variable Close Coverity #207921, #207924, #207930 2020-01-29 Razvan Crainea * [9eca6b474] : core: fix calling cachedb_raw_query() with empty params Fixes Coverity #207922 2020-01-29 Razvan Crainea * [873446914] : script: fix route index overrun Fix Coverity #207926 2020-01-29 Razvan Crainea * [990981887] : script: fix crash setting ruri/dsturi port to NULL Fixes Coverity #207928 2020-01-29 Razvan Crainea * [333d6a4c3] : drouting: if pri_prefix has len, it will always have s too Fixes Coverity #207929 2020-01-28 tallicamike * [b2a3cdd4a] : [qrouting] QR aware of DR partitions; qr_status modified to recognize partitions 2020-01-28 tallicamike * [2af111b66] : [qrouting] qr destinations register for multiple partitions; qr unaware of partitions 2020-01-28 tallicamike * [8e318838f] : [qrouting] changed sorting algorithm 2020-01-28 tallicamike * [b3e196315] : [qrouting]callback for adding profile to rule 2020-01-28 tallicamike * [b249576c6] : [qrouting] qr_profiles table added 2020-01-28 tallicamike * [04edbcee9] : [qrouting]sort_alg field added to dr_carriers table and sort_alg, sort_profile fileds added to dr_rules table, sorting related cbs moved to dr_sorting_cbs.h 2020-01-28 tallicamike * [1d122c2a9] : [qrouting] added grp score, drouting sorting callback based, free shm memory for dialog_prop and trans_prop 2020-01-28 tallicamike * [5a244256f] : [qrouting] call acc done only on invites 2020-01-28 tallicamike * [f225676cf] : [qrouting] registering carriers, debug info and qr_create_gw 2020-01-28 tallicamike * [ef05c100c] : [qrouting] dr callbacks for creating rules, and registering gw to dr and qr_status mi cmd 2020-01-28 Vlad Patrascu * [286ab285d] : perl: improve docs regarding the return value of perl_exec() 2020-01-28 tallicamike * [e3c9a3890] : qr_status and score for destinations 2020-01-28 tallicamike * [ae553b752] : added error labels, and free memory in case of error; protect the current interval w locking; complete acc 2020-01-28 tallicamike * [68af1f9ac] : [qrouting]invite time stored in tmcb_params; call duration using dialog 2020-01-28 tallicamike * [a199bc6d7] : ASR, CCR, PDD computed 2020-01-28 tallicamike * [bb6a888f2] : structures and basic functions for qrouting 2020-01-28 Razvan Crainea * [7b7a9fc2b] : dialog: update contact only after routes have been run 2020-01-28 Vlad Patrascu * [c4652e179] : perl: fix script halting caused by perl_exec_simple() Fixes #1951 2020-01-28 Liviu Chircu * [579527486] : auth_aaa: Fix missing static struct termination line Fixes #1922 2020-01-28 Razvan Crainea * [ab964d92e] : lua: set functions under opensips name This solves issues with lua libs > 5.2 Reported by @volga629-1 in #1946 2020-01-28 Razvan Crainea * [c0e566598] : lua: replace manual global table loading with luaL_openlibs() 2020-01-28 Razvan Crainea * [4b65de923] : proto_smpp: fix several encodings Thanks go to @johandeclercqdemocon for reporting them in ticket #1935 2020-01-28 Razvan Crainea * [2e237b12e] : proto_smpp: proper detection of application type 2020-01-27 Vlad Patrascu * [c7c44a566] : presence docs: list all possible events that can be handled 2020-01-27 Vlad Patrascu * [f6f962603] : presence docs: mention seed node requirement for 'full-sharing' mode 2020-01-27 Vlad Patrascu * [f589f18f0] : presence: add cluster syncing at startup for 'full-sharing' federation mode 2020-01-27 Vlad Patrascu * [d4e82ea2b] : presence: don't query the cluster in the 'full sharing' federation mode Also, switch to more user-friendly, string values for the 'cluster_federation_mode' modparam. 2020-01-27 Bogdan-Andrei Iancu * [b4fce7b66] : Fix db backend init for trace_id's Do not perform DB queries during cfg parsing, but only at mod_init stage, as some DB backends (like db_text) may not be initialized before mod_init. Closes #1947 2020-01-27 Bogdan Andrei IANCU * [7e16079fc] : Merge pull request #1949 from fgast/perl_newline Add missing newline 2020-01-27 Razvan Crainea * [f6934e905] : route: initialize full "union" for route variable names 2020-01-26 OpenSIPS * [224fc80e2] : Rebuild documentation 2020-01-25 Fabian Gast * [b05524ce7] : Add missing newline 2020-01-23 Liviu Chircu * [29f91adc8] : uac: Fix regression in de7606dfb2 In restore_mode == auto, the To/From URI restoration for upstream sequential requests was affected, as < and > were now always removed when restoring the header back to the upstream side. Credits to Vitalii Aleksandrov for the report & debugging data (cherry picked from commit c2e0603331a5b1c977c727d8806cda51a0ddf666) 2020-01-23 Liviu Chircu * [cb424c7d8] : uac: Fix possible crash in display name fixup Some variables, such as $dlg_val, return {NULL, 0} strings instead of {"", 0} (e.g. $var), causing the dereference op to crash. (cherry picked from commit 53296244b33d20abbf0fca79f6ea5d27bdadaaa9) 2020-01-23 Răzvan Crainea * [f7828411a] : Merge pull request #1944 from lemenkov/topology_hiding_verbose_error topology_hiding: More verbose in case of error 2020-01-22 Liviu Chircu * [ac7de673a] : HP_MALLOC statistics: Fix an int vs. long casting bug 2020-01-22 Peter Lemenkov * [7ada147dd] : topology_hiding: More verbose in case of error Be more verbose in case of error so you'll get the idea what's going on. Instead of a message that something went wrong you'll get more insightful one: Jan 22 15:38:32 li443-44 /usr/local/sbin/opensips[1278]: ERROR:topology_hiding:topo_callid_post_raw: could not parse resulted sip message: HEP3#001À 2020-01-22 Vlad Pătrașcu * [d680f158e] : Merge pull request #1892 from wdoekes/feature/clustering-publish-to-any presence/clustering: Keep presence state on all nodes without shared DB 2020-01-22 Liviu Chircu * [0278b070a] : Fix error on startup during fixup phase Related to 2c58dd341588 2020-01-22 Liviu Chircu * [abbb728f6] : cJSON library: Improve precision for myfloor() Fixes a bug where large MI tree integers would get printed as: { "shmem:total_size": 2.147484e+09, ... } ... due to lack of precision. 2020-01-22 Razvan Crainea * [2c58dd341] : cfg: make variable the name of the route called Close #1934 2020-01-22 Liviu Chircu * [4afb6fa4a] : HP_MALLOC: Do not attempt mem warming with non-HP allocator 2020-01-22 Liviu Chircu * [b2191bb69] : uac: Force URI enclosing for sequential requests This is a continuation of commit a75b2369b15972c, where we do the same thing for sequential requests as well, avoiding any ambiguous resulting headers, such as: ACK To: "Alice" sip:sipp;p1=yes@10.0.0.10:5060;p2=yes;tag=abcde ... which we now disambiguate as follows: ACK To: "Alice" ;tag=abcde Sponsored by 46Labs 2020-01-21 Razvan Crainea * [6d16b5a49] : tls_mgm: tls_method accept range of versions 2020-01-21 Razvan Crainea * [aa01dacdf] : proto_smpp: specify to, from and body from script Allow script writer to specify the source and destination numbers, as well as body and body encryption from the script. Close #1778 Also can be used to sort out ticket #1943 2020-01-21 Vlad Patrascu * [a4e94de60] : event_flatstore: handle oom errors on pkg allocations 2020-01-21 Liviu Chircu * [d61882523] : sipmsgops: Fix docs for sipmsg_validate() 2020-01-21 Razvan Crainea * [75f07b707] : proto_smpp: convert UTF-8 to gsm7 Reported by @johandeclercqdemocon in @1935 2020-01-20 Vlad Patrascu * [a2f4f80fd] : event_flatstore: improve handling of multiple subscriptions for the same file Use the same internal shm struct corresponding to a file for each evi subscription for that file. This fixes an issue with the 'evi_flat_rotate' MI command not properly "rotating" multiple subscriptions to the new file. Besides, a file is now opened only once regardless of how many subscribtions there are for the same file. Also, do not reuse an old 'evi_reply_sock' structure for a new subscription for the same file (if the file corresponding to an old subscription was not yet closed by all processes). This led to incorrect expire times for new subscriptions. Fixes #1933 2020-01-20 Liviu Chircu * [7b9239d63] : {ip.matches} transformation: Fix pkg memory leak Many thanks to Callum Guy for providing helpful data on this bug! (cherry picked from commit 1c4fa53f2fab6877c779799b01d21fce257cb7ad) 2020-01-19 OpenSIPS * [41e03b7f2] : Rebuild documentation 2020-01-17 Vlad Patrascu * [5a64b31ea] : dispatcher: add cluster syncing at startup and after DB reload 2020-01-17 Vlad Patrascu * [d193c981f] : drouting: add cluster syncing at startup and after DB reload 2020-01-17 Vlad Patrascu * [373f9b395] : load_balancer: add cluster syncing at startup and after DB reload 2020-01-17 Liviu Chircu * [a6a85cde8] : menuconfig templates: Migrate to 3.1 syntax Fixes #1940 (cherry picked from commit 3117b855b72a048f8524bbbc4c50ddfe5c673068) 2020-01-17 Bogdan-Andrei Iancu * [ee19a4f7e] : Added timeout support for async() statement While this is a generic support for timeout (passing values and triggering the right callbacks), each async function must handle the timeout event according to its logic. If the async cfg function does not implement the timeout support, the timeout value from the async() statement will be discarded -> this change is backward compatible with the existing implementation of the async functions. 2020-01-17 Liviu Chircu * [96f2ad150] : RPM mem: Fix bad ifdef blocks Fixes compilation with: #-DF_MALLOC -DQ_MALLOC -DHP_MALLOC 2020-01-17 Liviu Chircu * [8d7db1522] : Fix compiler warning mem/rpm_mem.h: In function 'rpm_status': mem/rpm_mem.h:308:6: warning: the address of 'qm_status' will always evaluate as 'true' [-Waddress] if (!RPM_STATUS || !rpm_block) Credits to Bogdan for the catch! 2020-01-17 Liviu Chircu * [7abd824a3] : Fix improperly initialized str modparams Fixes #1427 2020-01-17 Liviu Chircu * [b0aa68e84] : ratelimit MI rl_list: Improve handling for non-existing pipes Fixes #1863 2020-01-17 Bogdan-Andrei Iancu * [58cbc725d] : Add timeout support for reading fd'd in reactor. Exposes news reactor_add_reader_with_timeout() function. Provides the needs for #1838 2020-01-17 Razvan Crainea * [f8e7ccc69] : stats: rename STAT_NO_ALLOC with more intuitive STAT_NOT_ALLOCATED 2020-01-17 Razvan Crainea * [0838b2de2] : proto_smpp: fix utf8 for [0x7f,0xff] chars Thanks go to @johandeclercqdemocon for reporting this in ticket #1935 2020-01-17 Razvan Crainea * [b694057d7] : Revert "tls_mgm: make TLSv1.2 default method" This reverts commit 281b22dbfd0384f6eaa02793640d30dcf6d36eda. 2020-01-16 Razvan Crainea * [b2b5f7b4b] : tls_mgm: add support for TLSv1.3 2020-01-16 Razvan Crainea * [281b22dbf] : tls_mgm: make TLSv1.2 default method 2020-01-16 Razvan Crainea * [7261f1271] : tls_mgm: remove SSLv2 and SSLv3 from documentation 2020-01-16 Razvan Crainea * [c37badde0] : exec: fix assinging int val to environment values 2020-01-15 Liviu Chircu * [3d2461220] : cachedb_mongodb SQL adapter: Dup all string columns The strings provided by bson_iter_utf8() and bson_iter_binary() are ephemeral. We must duplicate them as soon as possible, to prevent invalid memory pointers within the result set as multiple rows get processed. Fixes #1903 (cherry picked from commit 50992ba690d2eca0f0751676f510097e68175034) (cherry picked from commit 4207abc5841b5c9fc50f233eb5a09d5007dc4031) 2020-01-15 Razvan Crainea * [c72855292] : cfgutils: fix check_time_rec() leak 1. The timerec should be allocated in pkg memory, there's no reason why it should be shared 2. After checking the timerec, the function needs to release the memory 2020-01-14 Liviu Chircu * [b5a533f4e] : MI mem_rpm_dump: Do not crash if RPM mem is disabled 2020-01-14 Liviu Chircu * [0617b35e9] : HP_MALLOC memory warming: Also work with HP_MALLOC_DBG 2020-01-14 Liviu Chircu * [368e3699e] : HP_MALLOC: Fix the memory warming feature As some initial SHM allocations are done, the large chunk of memory tends to move towards the end of the list, so we must properly locate it before we are able to chop it up. Fixes #1638 2020-01-14 Bogdan-Andrei Iancu * [f73abff95] : Do not inherit nothing (from prev branches) in failure route. Reset all per-branch values before entering failure route - provide a fresh start for creating the new branches. 2020-01-14 Bogdan-Andrei Iancu * [0390ec9dc] : Proper inheriting of advertised address/port during dns based failover. As the DNS based failover has to create a new branch as a perfect copy of the failed branch (as branch attributes), use the per-UAC advertised address and ports rather than the the per-MSG values. 2020-01-14 Bogdan-Andrei Iancu * [09473b34d] : Proper inheriting of branch attributes during DNS-based failover. When creating a fake request based on an existing UAC entity, use the DST_URI and PATH_VEC specific to that UAC entity and not the per-message values. This will correctly preserve the DST_URI and PATH_VEC during a DNS based failover, where the new branch must be a perfect copy of the original failed branch. 2020-01-14 Razvan Crainea * [75ec1d5db] : event_rabbitmq: add suppress_event_name parameter Close #940 2020-01-14 Razvan Crainea * [7b3abf809] : siprec: add associations to the resulted XML Close #1264 2020-01-14 Razvan Crainea * [c73235f36] : proto_smpp: don't move to next char if escape is not recognized 2020-01-14 Bogdan-Andrei Iancu * [4d8d9ca90] : Fix inheriting branch specific attributes while forking via failure route. The path vector and Q value are per-branch values and they must not be inherited while creating new branches from failure route. Closes #1887 2020-01-14 Vlad Patrascu * [49d01575c] : sql_cacher: fix a 'cache_table' modparam parsing bug Fixes #1900 2020-01-14 Vlad Patrascu * [e8496cd10] : lua: fix a Makefile typo 2020-01-14 Razvan Crainea * [d2218763d] : lua: add new line for all siplua logs 2020-01-14 Razvan Crainea * [c7028afea] : lua: port interface to lua5.2 & lua5.3 Close #1066 2020-01-13 Razvan Crainea * [4e5ac0d30] : tls: use is_peer_verified for both TLS and WSS Close #1765 2020-01-13 Vlad Patrascu * [19bbf8ca0] : dialog: fix double decrement issue with cachedb shared profiles If dialog replication is enabled and a dialog expires, the cachedb counter will now only be decremented if the sharing tag is active. Fixes #1937 2020-01-13 Razvan Crainea * [d81eaf9d0] : proto_smpp: fix several memory leaks headers, body and payload was not properly released after sending a SMPP message 2020-01-13 Razvan Crainea * [417ac1185] : proto_smpp: convert GSM7 to UTF-8 for incoming SM Thanks to @johandeclercqdemocon for reporting this in #1935 2020-01-13 Razvan Crainea * [f67f38e29] : proto_smpp: arrange convertion logic in functions 2020-01-13 Dan Pascu * [0e2e434fd] : Clear SSL errors before performing SSL operations Calling SSL_get_error() doesn't remove the error from the stack. As a result SSL errors can remain on the stack and show up erronously in later SSL operations and even spill out and affect other SSL contexts. 2020-01-13 Dan Pascu * [d73ac1a18] : Simplified TLS cleanup code 2020-01-13 Liviu Chircu * [3a2e07380] : usrloc: Disambiguate ul_flush / ul_sync docs 2020-01-12 OpenSIPS * [17c125a4e] : Rebuild documentation 2020-01-10 Vlad Patrascu * [ecd0bf680] : load_balancer: add opaque attribute string to destinations The attributes can be returned by the lb_start(), lb_next(), lb_start_or_next(), lb_is_destination() script functions and are also included in the output of the lb_list and lb_status MI commands. 2020-01-10 Vlad Patrascu * [6453c569d] : drouting: add attributes to output of dr_gw_status and dr_carrier_status 2020-01-10 Razvan Crainea * [caaa55d7a] : tm: remove unused code Close #1842 2020-01-10 Razvan Crainea * [014f5d277] : menuconfig: more verbose output in case of error Close #1242 2020-01-10 Razvan Crainea * [be8a7e7b4] : proto_tls: fix typo in doc param specification 2020-01-10 Razvan Crainea * [fab8c357f] : tls: split send and handshake timeouts Move `tls_send_timeout` and `tls_handshake_timeout` from `tls_mgm` to each module that can use it (`proto_tls` and `proto_wss`), making this tuning more customizable, per module. 2020-01-10 Bogdan-Andrei Iancu * [f12a53907] : Improve/clean logging on expire notifications Credits go to @wdoekes / Walter Doekes Related to #1722 2020-01-09 Vlad Patrascu * [e6290b861] : presence_dfks: add contrib docs 2020-01-09 Vlad Patrascu * [85ff6edac] : presence_dfks: add module docs 2020-01-09 Vlad Patrascu * [e8b2034e6] : presence_dfks: allow suppressing of NOTIFY's from DFKS routes 2020-01-09 Vlad Patrascu * [0a7672228] : presence_dfks: support multiple optional feature values Add 'ringCount' value support for CallForwardingNoAnswer. Other values may be added in the future if required. 2020-01-09 Vlad Patrascu * [0b72c3dc7] : presence_dfks: do not require the 'device' XML node in SUBSCRIBE 2020-01-09 Vlad Patrascu * [00c7e84d6] : presence_dfks: use proper ending boundary for multipart body 2020-01-09 Vlad Patrascu * [2f80c1481] : Add new presence_dfks module 2020-01-09 Vlad Patrascu * [f21c4eced] : presence: allow build_notify_body_t to suppress sending the NOTIFY 2020-01-09 Vlad Patrascu * [4deff0dba] : presence: fix several issues when using build_notify_body_t * use the custom content type body if provided * populate the actual pres_ev_t list element with the build_notify_body_t function * use a proper free function for the notify body string in case of error * improve comment-docs for build_notify_body_t 2020-01-09 Bogdan-Andrei Iancu * [cd78b8360] : Fix "replace" SQL syntax to "replace into" Closes #1904 2020-01-08 Liviu Chircu * [19c273941] : permissions: Fix typo in MI "subnet_dump" Fixes #1901 2020-01-08 Liviu Chircu * [2a4290d66] : mid_registrar: Add request retransmission detection Instead of leaking shared memory on scripts which do not properly call t_check_trans() beforehand, mid_registrar_save() will now act as a t_check_trans() call and perform a default processing of the retransmission. Fixes #1907 2020-01-08 Vlad Patrascu * [89bbb67e3] : dialog: fix a crash when receiving an unknown replicated profile Reported by SamyGo on the mailing list. 2020-01-08 Razvan Crainea * [3259dd529] : rtpengine: add play_dtmf command 2020-01-08 Razvan Crainea * [675fb8757] : rtpengine: simplify rtpengine_stop_media() implementation 2020-01-08 Razvan Crainea * [62f7a6216] : rtpengine: add start/stop forwarding functions Close #1686 2020-01-08 Razvan Crainea * [1bc5cd87d] : tls: protect openssl rand functions with lock 2020-01-08 Razvan Crainea * [b54ccb29c] : net: initialize connection extra data in workers 2020-01-08 Razvan Crainea * [97c0a271b] : tls_mgm: create tls domain per process 2020-01-08 Razvan Crainea * [3d508e7bc] : tls_mgm: use the new threadid interface for ssl 1.x.x 2020-01-08 Razvan Crainea * [be93525d9] : proto_ws: fix generation of random 16 bytes for Sec-WebSocket-Key Credits go to @wdoekes for pointing this out! 2020-01-08 Liviu Chircu * [25ed95214] : cfgutils: Add the get_accurate_time() function Although $Ts and $Tsm are useful, they cannot be read simultaneously, potentially leading to bad data. Sponsored by 46Labs 2020-01-08 Razvan Crainea * [6f24b2620] : proto_ws: decline Sec-WebSocket-Key keys that are not 24 bytes In case the key is not 24 bytes, the some internal buffers might be overwritten, resulting in malformed/bad Sec-WebSocket-Accept generation. And since the RFC requires the key to be random 16-bytes-base64 encoding, the length should always be 24 bytes. Thanks go to @hafkensite for reporting it on GitHub and to @wdoekes for profiving the fix. Close #1928 2020-01-08 Razvan Crainea * [a1689c6e5] : Add support for urn:nena:service URI scheme Thanks go to Carl Lemieux from Comtechtel for providing the patch for this 2020-01-08 Liviu Chircu * [686285085] : Status pipe reporting: Do not log errno on success ... as this may cause bogus debug logs, such as "Bad file descriptor" on 100% successful operations. 2020-01-08 Liviu Chircu * [ed905d1a3] : Timer process counting: Drop obsolete code The timer counting and timer status code reporting logic was reworked in caabbe53229bde (from N timer processes to 1+1, later 1+1+1), so the "init_timer_no" shared integer logic is no longer needed. 2020-01-07 Vlad Patrascu * [113723309] : presence: fix an overflow bug introduced in commit 929ab4d 2020-01-07 Razvan Crainea * [94b03427b] : drouting: fix partition recursive call when wildcard is used 2020-01-07 Liviu Chircu * [ac153f449] : cachedb_redis: Improve reconnect logging * lower failed query log severity from ERROR -> INFO * make sure to log query recovery after a reconnect 2020-01-07 Bogdan-Andrei Iancu * [5fb57167b] : Document the limitations of the FEEDBACK alg Closes #1915. 2020-01-06 Bogdan Andrei IANCU * [16dd54c30] : Merge pull request #1929 from lemenkov/python3 python: Explicitly mark include as system-wide one (minor, almost cosmetic) 2020-01-05 Peter Lemenkov * [999d57265] : python: Explicitly mark include as system-wide one 2020-01-05 OpenSIPS * [e1d89238a] : Rebuild documentation 2020-01-05 Nick Altmann * [18d64c7b1] : RPM spec: fix rhel8 condition 2020-01-04 Bogdan-Andrei Iancu * [bc0578ded] : Fix detection of current partition in multi-partitions scenario Fixes #1927 (cherry picked from commit 81dbe503720379e2b427f55636cec3c3372baafe) 2020-01-04 Nick Altmann * [d7ce57d9d] : RPM spec: support for python module build on rhel8 2020-01-04 Bogdan-Andrei Iancu * [682e96d24] : Improve docs on loose_route() and strict versus loose routing 2020-01-04 Nick Altmann * [bef604028] : RPM spec: support for rhel8 2020-01-04 Bogdan-Andrei Iancu * [c28876540] : Fix missing `my_bool` for mysql version higher than 80000 2020-01-04 Bogdan-Andrei Iancu * [638160496] : Fix flags for event backend to avoid conflicts with event_flatstore 2020-01-03 Bogdan-Andrei Iancu * [929ab4d43] : Delete expired subscription only with active tags In clustering setup, the DB rutine handling subsscription should delete from DB and run the del handler only if the subscription has an active sharing tag. Fixes #1848 2019-12-29 OpenSIPS * [333ba680a] : Rebuild documentation 2019-12-23 Bogdan-Andrei Iancu * [43c7d916d] : Fix locking when flushing state to DB Indeed there was no data locking when the flushing the destination's state to DB. Closes #1911 2019-12-23 Bogdan-Andrei Iancu * [e5991e1af] : Fix overflow when using large number of GW per rule Instead of fix-size internal buffer, user self-scaling buffers for handling/sorting the destinations/gateways in rules and carriers. Fixes #1910 2019-12-22 OpenSIPS * [9a8de335f] : Rebuild documentation 2019-12-18 Răzvan Crainea * [52f675be5] : Merge pull request #1914 from vasilevalex/usrloc_event_ua usrloc: Add "user_agent" parameter to E_UL_CONTACT events 2019-12-18 Răzvan Crainea * [a413f5856] : Merge pull request #1918 from Ozzyboshi/master Wrong log message (params in wrong order) 2019-12-18 Alessio Garzi * [f84e5152f] : Wrong log message (params in wrong order) 2019-12-18 Razvan Crainea * [1f7b04fa3] : net/net_tcp: remove FIXME comment There's nothing we can fix regarding the tcp conn ref, because the same lock is also used in larger blocks, that require more than simply increasing and decreasing a counter. 2019-12-16 Razvan Crainea * [584367956] : topology_hiding: prevent module for engaging twice Prevent the module from engaging TH callbacks twice, in case topology_hiding() was called twice; however, do append the new flags to the dialog module flags. 2019-12-15 OpenSIPS * [25232932d] : Rebuild documentation 2019-12-13 Liviu Chircu * [84a8ce7f2] : acc: Fix usage of $acc_* vars in global onreply_route This patch fixes a bug where if the script writer reads or writes to $acc_extra or $acc_leg within the global (stateless) onreply_route, the stateful onreply routes will no longer see the $acc_* vars function properly, as acc will be working on a temporary (empty) context. The solution is to simply merge and drop this temporary acc context as soon as the transaction matching is done and the "real" accounting context is extracted from it. An interesting side-effect is that the $acc_* variables may now also be initialized globally, within onreply_route, and their value will still be carrier over to the lower-level onreply_routes, as well as until the end of the dialog. 2019-12-11 Alexey Vasilyev * [369a2edbf] : usrloc: Add "user_agent" parameter to E_UL_CONTACT events 2019-12-08 OpenSIPS * [c3de921ca] : Rebuild documentation 2019-12-06 Vlad Patrascu * [b0a6d15d1] : presence: fix bad CT header length calculation for NOTIFY 2019-12-06 Liviu Chircu * [557226506] : dialplan: Fix misleading 'dp_reload' docs and logs (cherry picked from commit 984468f848a92e8cd8f8075a741c41f69289c2c7) (cherry picked from commit 93970954f14329f8f56d28ae72c559043c20f9cb) 2019-12-05 Bogdan-Andrei Iancu * [37ee4b682] : Fix re-indexing of reloaded routes Fixes #1899 (cherry picked from commit fc728f0c5a8c012cb060f7490d9c31ff9e4fc590) 2019-12-03 Bogdan-Andrei Iancu * [3ebeabfda] : Pre-allocate the str holder for the CT body for build_notify_body_t 2019-12-03 Vlad Paiu * [2caa1893c] : Fixed long select queries reporting 0 rows instead of ERROR if mysql_store_result throws an empty result set, first check mysql_errno and if that is ok, only then assume the result set is empty (cherry picked from commit ef33057a21860c9acea31da8d44bd9d730cae4cd) 2019-12-03 Razvan Crainea * [f53cbabda] : rtpproxy: document rtpproxy DTMF feature availability 2019-12-03 Razvan Crainea * [1f9bd7d10] : rtpproxy: suppress commands received through notification 2019-12-03 Razvan Crainea * [6c749c895] : rtpproxy: don't add catch DTMF notify tag on answer 2019-12-03 Razvan Crainea * [8ce7b2557] : rtpproxy: add some safety checks 2019-12-03 Razvan Crainea * [fb7316256] : rtpproxy: add stream identifier in event 2019-12-03 Razvan Crainea * [9c1af68cd] : rtpproxy: ignore timeout if not used 2019-12-03 Razvan Crainea * [8cc863ae3] : add DTMF detection support in RTPProxy 2019-12-03 Bogdan-Andrei Iancu * [0b3d86d21] : [presence] added some more API functions * presence API - notify_all_on_publish() - the function may be used to trigger notification (NTOTIFY'es) to all subscribers/wachers registered for a given presentity. This is basically a virtual PUBLISH (without any SIP request, but with the same behavior) * event API - build_notify_body() - the function provides a substitute for the presentity information. Upon a subscribe, instead of pushing a notify with a body built from the published presentities, you can dynamically build with this function whatever body you want to be returned with the body 2019-12-01 OpenSIPS * [c797f8200] : Rebuild documentation 2019-11-27 Liviu Chircu * [6bd19fcc9] : benchmark: Fix 'bm_poll_results' MI command Reported by Nick Altmann 2019-11-26 Razvan Crainea * [b411063f1] : b2b_entities: remove bogus content length check 2019-11-26 Liviu Chircu * [b3bdf7ce2] : mid_registrar: Fix mishandled corner-cases * avoid extraneous "udomain unlock" operations on some error cases * fix possible crash with the "o" flag 2019-11-26 Liviu Chircu * [3dac47137] : gflags: Fix crash introduced with function porting Reported by Nick Altmann Fixes #1906 (cherry picked from commit 6896bcdc30fa5f585db63ea42fc764c08345d8af) 2019-11-26 Razvan Crainea * [fe844ad49] : registrant: document password format in db schema The format of the password is actually driven by the format of the `credential` parameter in the uac_auth module. Closes #1817 2019-11-26 Vlad Patrascu * [a8e1b2ee7] : stir_shaken: fix compile error /usr/include/stdio.h:314:6: error: unknown type name ‘_IO_cookie_io_functions_t’ _IO_cookie_io_functions_t __io_funcs) __THROW __wur; Observed on libc 2.23 2019-11-26 Liviu Chircu * [d3ed562b8] : Merge pull request #1902 from Ozzyboshi/patch-1 Memory leak fix for mongodb module-reply not freed 2019-11-26 Alessio Garzi * [4e0d8ffd2] : Memory leak fix for mongodb module-reply not freed 2019-11-26 Razvan Crainea * [c914f1500] : dialog: build the ACK with full route set for re-INVITE When the dialog module was sending re-INVITEs, the ACK to those re-INVITEs was generated by the TM, thus was lacking a valid Route set. This commit prevents the TM from generating the ACK, having the dialog module sending it, with the learned Route set. Thanks go to 46Labs for reporting and testing this! 2019-11-25 Liviu Chircu * [190ec7ddf] : stir_shaken: Fix compile warning with -DUSE_FUTEX 2019-11-25 Razvan Crainea * [7b87cf4ff] : rtpproxy: add support for specifing advertised notification socket Close #1563 2019-11-24 OpenSIPS * [83ad194e4] : Rebuild documentation 2019-11-23 Bogdan-Andrei Iancu * [6e36b6618] : Proper handling of subscription session overlapping 1) be sure we send back a 500 reply in all error cases 2) detect the cases of subscription session overlapping (see #1722) Similar to 4918544248c495b1099a54326f97a82df97bbe76 2019-11-23 Bogdan-Andrei Iancu * [491854424] : Proper error handling in handle_subscribe 1) be sure we send back a 500 reply in all error cases 2) detect the cases of subscription session overlapping (see #1722) This is based on ec1889638a9d43280ba1362f6108a175efd4a854, with the update of the generation of the To-tag before the subscription check/reply 2019-11-23 Bogdan-Andrei Iancu * [873b70647] : Refactor signaling, sl & tm APIs to add gen_totag() This is a new function to generate the To-tag (which is msg specific and computed in a deterministic way) whitout actually sending a reply. First stage of a fix for #1722 2019-11-22 Bogdan-Andrei Iancu * [2af8412e7] : Docs updated with the new Mxx flag for save() 2019-11-22 Bogdan-Andrei Iancu * [3a1c9a2b0] : Link the per-module matching mode setting to the new per-contact matching mechanism 2019-11-22 Bogdan-Andrei Iancu * [723e2586f] : Added new contact matching mode, uri param based Instead of performing full contact URI matching, you can set the matching only on a specific URI param, for example "rinstance" For "sip:bob@10.10.10.10:45319;rinstance=8e7e76fa84713d6f;transport=UDP" contact, you can use save("location","Mc4") 2019-11-22 Bogdan-Andrei Iancu * [7c5f990ed] : Added support for per-contact matching mode The [mid_registrar_]save() functions may take an optional M parameter to control the contact matching (0 - CONTACT_ONLY, 1 - CONTACT_AND_CALLID). Default is CONTACT_ONLY / 0. Ex: save("location","M1c4") 2019-11-22 Liviu Chircu * [e9e6f4042] : usrloc: Fix incomplete docs on 'cluster_mode' Thanks go to Bogdan for the catch! 2019-11-22 Liviu Chircu * [be5c5e50b] : pua_usrloc: Do not crash during usrloc sync ... on the backup box, due to `current_processing_context` being NULL. Thanks to Pete Kelly for reporting and testing! 2019-11-21 Liviu Chircu * [b72d0fe1c] : permissions: Fix 'subnet_dump' MI command Reported by Ovidiu Sas 2019-11-21 Vlad Patrascu * [2528d81bc] : mi: cache_fetch: return an error response if value not found Closes: #1894 2019-11-21 Razvan Crainea * [4286bb57f] : rest_client: initialize cURL library in mod_init() This fix prevents crashes generated by rest_client trying to initialize the SSL library from multiple processes in parallel, without any locking mechanism on the internal shared objects. Many thanks to Clif Jones and Ben Newlin for reporting and providing plentora of logs and configurations that replicate this issue. Without their help I couldn't have figured this out. Close #1771 2019-11-20 Razvan Crainea * [e2e2c8a92] : dialog: improve $DLG_dir docs 2019-11-19 Vlad Patrascu * [f25e89ea9] : rtpengine: fix 'teardown' MI command 2019-11-19 Vlad Patrascu * [b5896f4a7] : dialog: improve API terminate_dlg() to also identify dialog by callid 2019-11-19 Razvan Crainea * [9feea19ec] : fix several LGTM warnings 2019-11-19 Razvan Crainea * [1c7a4e76c] : dialog: properly free resources from previous commit Completes commit bef6f542b 2019-11-19 Nick Altmann * [6deabf8c2] : Packaging: add stir_shaken description for deb and rpm 2019-11-19 Razvan Crainea * [bef6f542b] : dialog: fix dlg_end_dlg local_route execution Before this commit, when running any flavor of `dlg_end_dlg` from an external process (not a SIP worker), the command that was generating the BYE messages (tm's `t_request_within`) was dispatching the job to a SIP worker, using IPC dispatch. This means that the BYE messages were created in a different process than the initial one, thus not exposing a proper context in `local_route`, but a dangling one, whichever was not properly cleaned up after a request was processed. This resulted in bogus data, such as inexisting `$DLG_dir` output, or even worse, whatever broken values were leftover in the dangling context. This commit fixes this issue by dispatching every `dlg_end_dlg` job to a SIP worker, thus creating and populating the dialog context properly. This command affects any function that can be run through MI, or from an external process such as: * MI dlg_end_dlg * MI profile_end_dlgs * RTPProxy/RTPengine timeout notifications Credits go to Darpan Patel for reporting this issue on GitHub Fix #1896 2019-11-19 Vlad Patrascu * [861e9b02e] : stir_shaken docs: add README 2019-11-18 Liviu Chircu * [3aaa73218] : build-contrib.sh: Include the latest module rename 2019-11-18 Bogdan-Andrei Iancu * [312cad888] : Removed useless SQL condition The contact_id is an unique ID of the contact, so using the callid (as part of the query key) is redundant and useless (probabaly a leftover from the code re-factoring when the contact_id concept was introduced) 2019-11-18 Vlad Patrascu * [b87bad87a] : stir: rename module to 'stir_shaken' 2019-11-18 Vlad Patrascu * [4a8bfd434] : stir: small doc improvements 2019-11-18 Vlad Patrascu * [9652493eb] : stir: add module documentation 2019-11-18 Vlad Patrascu * [015602fa1] : stir: don't include the tls_mgm api header file 2019-11-18 Vlad Patrascu * [b848e886c] : stir: add script function that checks certificate validity 2019-11-18 Vlad Patrascu * [a8d202e47] : stir: fix module exports 2019-11-18 Vlad Patrascu * [a1fbb34f3] : stir: don't try to load CA certs if modparams are not set 2019-11-18 Vlad Patrascu * [60a48cc17] : stir: also load CAs and CRLs from directory 2019-11-18 Vlad Patrascu * [2c6f56426] : stir: properly enable CRL checks 2019-11-18 Vlad Patrascu * [c26678368] : stir: capitalize the reason phrase returned for 437 error 2019-11-18 Vlad Patrascu * [e5bf550fd] : stir: fix missing CRLF length when alloc'ing identity HF buffer Thanks to Liviu Chircu for spotting this! 2019-11-18 Vlad Patrascu * [9ad226305] : stir: move certificate and private key loding code from tls_mgm 2019-11-18 Vlad Patrascu * [7e2eeecb3] : stir: check the values of the common stir/shaken PASSporT claims 2019-11-18 Vlad Patrascu * [8765ee105] : stir: check empty values for PASSporT claims 2019-11-18 Vlad Patrascu * [45185f131] : stir: add $identity variable This is a read-only pseudo-variable that returns parsed fields from the Identity header(eg. attestation level, origid etc.). 2019-11-18 Vlad Patrascu * [b11a41878] : stir: fix certificate validity check 2019-11-18 Vlad Patrascu * [2de46f2db] : stir: add stir_check() function 2019-11-18 Vlad Patrascu * [54fbcac2c] : stir: implement stir_verify() function 2019-11-18 Vlad Patrascu * [1de6e93ca] : utils: use the proper char table for base64 URL decoding 2019-11-18 Vlad Patrascu * [ab43a99a9] : Add new stir module Implement the stir_auth() function. 2019-11-18 Vlad Patrascu * [3818ee11e] : tls_mgm: remove unnecessary include from api.h 2019-11-18 Vlad Patrascu * [71c471802] : utils: add base64URL encode/decode functions 2019-11-18 Vlad Patrascu * [722f7a9fa] : utils: Add E.164 number test function 2019-11-18 Vlad Patrascu * [fcfa70bc8] : tls_mgm: add support for basic certificate holders through the API 2019-11-18 Bogdan-Andrei Iancu * [afa5d7cf3] : Fixed handling of signed numbers as script route params (cherry picked from commit 76dfead300f75fd3f193b5fb1bd53d4bc498b2c0) (cherry picked from commit 3396f5b38bc91d1186852bb5eee7e5e061fa92e5) 2019-11-17 OpenSIPS * [efae5d31f] : Rebuild documentation 2019-11-15 Razvan Crainea * [9dbded3c1] : rtpproxy: fix skipping notification command Fix bug introduced in commit 586af048, where the command was not properly skipped after being processed 2019-11-14 Bogdan-Andrei Iancu * [e14cfb43b] : Change default for "auto_aliases" to no/disabled/off/0 CFG samples updated (removing auto_aliases as now it is by default off) 2019-11-13 Liviu Chircu * [1fc69bee0] : Makefile: Re-order deps to fix parallel `make install` `make -j install` is now fully functional Fixes #892 (cherry picked from commit 486f0685167cf5be3866e8da9b4b6e199663a68d) 2019-11-13 Liviu Chircu * [8e54f04fe] : mid_registrar: Fix possible crash on shutdown Since the TMCB_TRANS_DELETED callback _may get called after_ the module destroy() phase, the udomain_t structure attached to the callback must not be accessed anymore if OpenSIPS is shutting down, as the usrloc module may have already freed most of its data structures. Fixes #1641 (cherry picked from commit 1fbe9a66c57ea35eb73661c528d5a5dbc77f5858) 2019-11-13 Bogdan-Andrei Iancu * [2fac233ef] : Proper free and reset of dummy SIP msg after running HEP route (cherry picked from commit 501c893894b0a71b1649786de9f5fb1f133a8239) 2019-11-13 Bogdan-Andrei Iancu * [d267278f3] : Avoid mem leak when running the check trace route for TCP. Do proper free of the summy SIP msg after each run. (cherry picked from commit cff73d685996ddd9a1543c4040de02b9c43fb7b5) 2019-11-13 Bogdan-Andrei Iancu * [db2719170] : Proper dummy sip msg cleanup after running startup route (cherry picked from commit 2c1999bc8c5eb64c59a0d300ff860bdda65e639d) 2019-11-13 Bogdan-Andrei Iancu * [84daf4dc4] : Proper reset of the sip_msg struct after each run of timer route. Some cleanup of the free_sip_msg() function. This function is suppose to only free the attached content of a SIP msg, but without doing any kind of reset of the subfields. Closes #1878 (cherry picked from commit b3dc0f7065bcf53392446fbc253dd24bb99d6bc8) 2019-11-13 Liviu Chircu * [1fa98a977] : struct hist API: Add rotating log list support The struct hist debugging support now also offers rotating logging lists with capped sizes. Whenever the "flush" condition occurs, the new sh_list_flush() function can be invoked in order to dump the currently held logs to disk. Inspired by #1580 2019-11-13 Bogdan-Andrei Iancu * [490d1ed53] : Fix crash of list_hdr_add_option() on an empty body hdr Reported by Elliot Journeaux. (cherry picked from commit f1857c8b3e84b3888f624446c046a5f59d8fd5c1) 2019-11-12 Liviu Chircu * [b01fea263] : build-contrib.sh: Add new contributors 2019-11-12 Liviu Chircu * [152e0f97c] : clusterer: Improve doc for 'seed_fallback_interval' 2019-11-12 Liviu Chircu * [a8b858703] : clusterer API: Refactor the "require_sync" parameter Rename to "startup_sync", which better reflects its actual behavior. 2019-11-12 Liviu Chircu * [b7db8e675] : Fix various typos & minor doc/code shortcomings 2019-11-12 Liviu Chircu * [ca097f489] : dispatcher: Clean up obsolete code 2019-11-12 Liviu Chircu * [3d2e33742] : dispatcher: Fix the "round robin" algorithm ds_select_dst() must not get called multiple times on a given set, as some destinations may get skipped in the process. Fixes #1889 2019-11-11 Vlad Patrascu * [3726b8a4f] : perl: fix memory leaks when calling script functions from perl 2019-11-11 Vlad Patrascu * [42d14d1ce] : python: fix crash when calling python_exec() with 1 parameter 2019-11-11 Vlad Patrascu * [4038d7870] : python: fix memory leaks when calling script functions from python 2019-11-11 Liviu Chircu * [d038e1097] : launch() statement: Fix an AVP list management bug Whenever a launch() operation gets executed inline (thanks to some favorable conditions), two things must happen: * no AVP from the message execution context should leak into the report route execution context * the AVPs from the message execution context must be restored after running the report route. They _must not_ be destroyed, as message processing will continue afterwards! Many thanks to Alexey Vasilyev for some valuable troubleshooting info Fixes #1580 (cherry picked from commit 4a639db5b110de5da03e23607f0d74549a0e6087) (cherry picked from commit 706e798d5ecc8109e335c4120f5d7f8fcf183c9e) 2019-11-11 Vlad Patrascu * [c24b90358] : lua: fix memory leaks when calling script functions from lua Fixes #1835 2019-11-11 Walter Doekes * [1c88f8fa0] : presence/clustering: Keep presence state on all nodes without shared DB Add the option to set cluster_federation_mode = 2, which does the following: - All PUBLISH/presence state is recorded on the presence node, even when no one is subscribed. PUBLISH is now accepted on any node for updated state. This means that you can round-robin your PUBLISH instead of having to choose a single presence endpoint. And it also means you can switch to other nodes and get up-to-date state from there, when a node dies. This is achieved without using a shared DB (which has its own limitations obviously). 2019-11-11 Razvan Crainea * [be8596544] : siprec: fix unref mechanism Fix unref mechanism to prevent it from unlocking an already freed session 2019-11-11 Bogdan-Andrei Iancu * [3549f3c9c] : Fix printing of bind_address for first CALLEE leg If there was no reply yet on the given leg, the bind_address is NULL, so take care when printing it Closes #1890 (cherry picked from commit 8df8aa13dcf0cbf9ff3b8c204479b21f2b513e09) 2019-11-11 Razvan Crainea * [af6be0a44] : ratelimit: allow traffic if NETWORKING stat not updated Adresses issue #1882 reportd by Ben Newlin 2019-11-10 OpenSIPS * [7b886f214] : Rebuild documentation 2019-11-08 Razvan Crainea * [14e15150d] : proto_smpp: make sure fields do not overlap SMPP C-Octet String is defined as a limited number of characters, followed by a NULL terminator. This means that a SMPP field consisting of maximum N characters, can only have N-1 useful data + 1 NULL terminator. However, in real life, some operators require 9 length passwords, which result in 10 chars password fields, which conflicts with the SMPP specification. Check this thread for more information (yeah, I know it's old, but it is still relevant): https://devel.kannel.narkive.com/iyzAKxzC/smpp-maximum-password-length This commit "breaks" a bit the SMPP 3.4 specs, allowing data to have N characters _without_ the NULL termination, resulting in N+1 fields tops (i.e. the password field can have 9 chars + '\0' = 10 chars). Although this is not 100% correct, this makes our module more flexible, because if you don't need 9-long passwords, it will be just fine. So the specs are broken *only* if the provider requires it. This commit also fixes a bug (described in ticket #1867), where OpenSIPS was not storing a NULL termination for certain strings in their internal storage, resulted in strings concatenated together in resulted messages. 2019-11-08 Razvan Crainea * [586af0485] : rtpproxy: rework notification mechanism 2019-11-08 Razvan Crainea * [90c3b0f4b] : dialog: add wrappers for handling did 2019-11-08 Bogdan Andrei IANCU * [652f3ccc9] : Merge pull request #1832 from vasilevalex/th_bugfix [topology_hiding] Fix encoding $TH_callee_callid and small cleanup 2019-11-08 Vlad Patrascu * [72d33eb5f] : tls_mgm docs: remove references to obsolete default domain concept 2019-11-08 Liviu Chircu * [3dec49a11] : mid_registrar: Add RFC 3327 (Path header) support Identical behavior to registrar's "p0" / "p1" / "p2" flags. 2019-11-08 Liviu Chircu * [a97ca66a2] : mid_registrar: Remove Path when forwarding REGISTERs Regardless of its working mode, the mid-registrar always rewrites the Contact header to point to itself, so it stays in the path of future calls. Consequently, when relaying REGISTERs, it MUST no longer include the Path header(s) built by the upstream elements, as this will break call routing. 2019-11-08 Liviu Chircu * [6695b31df] : mid_registrar: Implement the "attributes AVP" logic 2019-11-08 Liviu Chircu * [b0ac52b2f] : usrloc: Avoid locking issues on shutdown At mod_destroy, there is no need to lock the hash anymore. (same reason as the one behind 160b42410) 2019-11-08 Liviu Chircu * [19c46d6ff] : registrar: Add the "o" save() flag Similar feature to a5a4bbaa0f 2019-11-08 Liviu Chircu * [a5a4bbaa0] : mid_registrar: Add the "o" save() flag The "o" flag will cause 200 OK replies to REGISTER requests to "Only include request contacts". Technically speaking, this is against RFC 3261, § 10.3, (8), which says: 8. The registrar returns a 200 (OK) response. The response MUST contain Contact header field values enumerating all current bindings. Each Contact value MUST feature an "expires" parameter indicating its expiration interval chosen by the registrar. The response SHOULD include a Date header field. 2019-11-08 Liviu Chircu * [7ff8b476f] : registrar: Fix a rare "max_contacts" bug When registering 2+ contacts in a single REGISTER, on an AoR with at least 1 registered contact, the "max_contacts" feature would not work properly anymore. 2019-11-08 Liviu Chircu * [52eaaa0e9] : mid_registrar: Implement the "max contacts" logic This patch adds support for placing a ceiling on the number of registered endpoints for an AoR at any given time, either through the global "max_contacts" modparam, or through the fine-grained "cNN" and optional "f" flags. 2019-11-08 Vlad Patrascu * [f17e4f4c3] : dialog: make 2nd parameter of get_dialogs_by_profile() optional 2019-11-08 Bogdan-Andrei Iancu * [b000bef83] : Expose sharing_tag while listing subscriptions Helper for #1848 (cherry picked from commit d91454a3ad414b58ddcf1aed4df0f64cc28087c5) 2019-11-07 Bogdan-Andrei Iancu * [9bb0fcccd] : Access the route's array after the IPC dispatch. The array with the script routes is not available in all procs, so, if the event is triggered from a non-scripting proc (like MI), the array will be empty. As a fix, use the array (get the action list based on route ID) only via IPC dispatching, when we know for sure that we are in a process with the valid array of routes. Fixes #1877 (cherry picked from commit 436dd69da5fcdb6fbb42a57e758c9696b662d0ef) 2019-11-07 Bogdan-Andrei Iancu * [f8e4072b9] : Check for RAW_QUERY support if DB_ONLY Fix for initial problem on #1877 2019-11-07 Bogdan-Andrei Iancu * [1ed25cc50] : Proper unlock on RADIUS AVP failure DO not forget to release the ACC data lock if the operation of adding new RADIUS AVP fails. Reported by Richard Revels Closes #1864 2019-11-06 Vlad Patrascu * [9d76d4ea9] : tls_mgm docs: add missing CRL related modparams Also improve the description of the 'ca_dir' modparam. 2019-11-06 Vlad Patrascu * [40923a75a] : acc docs: add 'ms_duration' param for E_ACC_CDR event 2019-11-05 Vlad Patrascu * [6d90a700a] : Fix MI response structure for 'uptime' command Fixes #1884 2019-11-05 Vlad Patrascu * [4bc134fe3] : acc: include all fields in the DB queries for failed accounting This is useful for writing all the acc fields(even if they have empty or default values) when using a DB backend with no schema, such as db_flatstore. Closes #1780 2019-11-03 OpenSIPS * [b14bc2bc9] : Rebuild documentation 2019-11-01 Razvan Crainea * [8f26f5aa5] : ratelimit: make rl_feedback_limit extern Make sure `rl_feedback_limit` is properly alocated for the entire module, not only for the current object. Fixes the crash reported by Ben Newlin. Close #1882 2019-11-01 Razvan Crainea * [4ffbeee5d] : net: handle CONN_ERROR2 on main 2019-10-30 Razvan Crainea * [0706a1052] : python: port interface to python 3 Credits go to Peter Lemenkov for reporting the issue. Close #1827 2019-10-29 Vlad Patrascu * [cefc07160] : sql_cacher: fix concurrent use of $sql_cached_value For example, this fixes issues when calling a script function with multiple $sql_cached_value params as PV specs. The function would get the same static buffer that would be progressively extended and overwritten. 2019-10-27 OpenSIPS * [a36d64ff1] : Rebuild documentation 2019-10-26 Roman Sevko * [b0696734b] : Update dispatcher_admin.xml Fix unsupported in version 3.0 flag "s" in the example for ds_select_dst (opensips 3.0 is not working with it). (cherry picked from commit c7c4e8862ba5f2d8ae3d5bee61040011be20a791) 2019-10-20 OpenSIPS * [4da69d5e1] : Rebuild documentation 2019-10-18 Vlad Patrascu * [d8e221b72] : Return proper MI response for reset_statistics on success 2019-10-17 Liviu Chircu * [d9b0102e5] : struct hist API: Fix possible crashes; Improve API Commit a74fff149a introduced a race condition on this logic: lock_get(&sh->shlist->wlock); sh_unref_unsafe(sh); lock_release(&sh->shlist->wlock); , where "sh" must no longer be read following the unref operation. This commit fixes this issue, along with: * fix crash with -DSTRUCT_HIST but no -DDBG_TCPCON * speed optimizations: eliminate memset() operations (not needed) * make sh_push() more flexible (extra ref counts from outside) * code: hide structs, so importing struct_hist.h doesn't conflict with mysql.h's own "struct list_head" (cherry picked from commit 0db946724e9eaa364f54425f8664d96529e848a1) 2019-10-16 Liviu Chircu * [51d6fa736] : assert() statement: Fix crash on startup The asserted expression must be ran through the fixup logic before it can be fully usable. For example, this fixes: assert($var(x) =~ "X", "test-op-match-1"); (cherry picked from commit cf117186ae389672a5d4e48538e81ed2b7de4fd6) (cherry picked from commit 7345e9ee8281577efe8a214f27dc08388dc91ef4) 2019-10-15 Liviu Chircu * [755defe07] : usrloc docs: Fix misleading info on timer behavior 2019-10-15 Razvan Crainea * [34fa4b739] : dispatcher: fix do_routing() max_res bug Commit b5557bdcb introduced a bug that was limiting the failover set to 0. This commit reverts the maximum results limit to 1000, as it was before the commit. Reported by Jonathan Hulme on Slack 2019-10-15 Razvan Crainea * [b63e7f6ca] : dispatcher: remove useless debug 2019-10-14 Vlad Paiu * [1ae680e11] : Add the profiles to the $DLG_ctx_json pvar take special care to not build broken json for dlg in same profile but with different values 2019-10-14 Vlad Paiu * [0e5d5094d] : Build $DLG_json and $DLG_ctx_json under dlg lock 2019-10-13 OpenSIPS * [80a82624e] : Rebuild documentation 2019-10-10 Răzvan Crainea * [27afe4b95] : Merge pull request #1852 from maxika-a/patch-1 [BUG] SipCapture Module #1851 (cherry picked from commit e721124af8092a855b55821058654f48d21cc1e8) 2019-10-09 Razvan Crainea * [2ae51207a] : properly populate route_type for certain routes Reported by Ben Newlin in ticket #1846 2019-10-09 Razvan Crainea * [a37642ab6] : ratelimit: don't add json object if map is empty An object map was added for each hash entry, even though there were no pipes in that hash, resulting in a huge list of empty hashes [{},{} ...] This fix does not add an object in the resulted array if the map is empty. 2019-10-09 Razvan Crainea * [e4c629c80] : mathops: allow math operations from any route Reported by Nick Altmann, close #1850 2019-10-08 Razvan Crainea * [59ce4d284] : siprec: fix deserialization of siprec session 2019-10-08 Răzvan Crainea * [a9dbb6e94] : Merge pull request #1849 from lemenkov/rtpengine_comment_typo rtpengine: fix typo in comments 2019-10-08 Peter Lemenkov * [9f8bc3dd8] : rtpengine: fix typo in comments 2019-10-07 Bogdan-Andrei Iancu * [304314ff9] : [cfgutils] Downgrade polluting INFO log to DBG 2019-10-07 Razvan Crainea * [d9435208b] : Makefile: remove DEBIAN_VERSION Thanks go to Ken Rice for pointing this out! 2019-10-07 Razvan Crainea * [409346a33] : dialog: fix dlg_send_sequential mode parsing & doc Reported by Giovanni Maruzzelli, close #1844 2019-10-06 OpenSIPS * [9ed7a8cac] : Rebuild documentation 2019-10-04 Razvan Crainea * [b660a21e1] : siprec: decrease level of unknown SDP media error 2019-10-04 Razvan Crainea * [630c64522] : evi: add raise_event MI command Close #1526 2019-10-04 Razvan Crainea * [cc3a4d453] : evi: add function to duplicate evi params 2019-10-04 Liviu Chircu * [f068fc1b6] : Module deps: Fix a corner-case leading to a crash When setting a dependency-inducing modparam multiple times (e.g. avpops db_url) while having loaded no further dependency-inducing modules, OpenSIPS would crash on startup. Thanks to Xiao Huang for the report and fix Fixes #1843 (cherry picked from commit 9c49b09c1888c29208475e5d7d5827eea3a964cf) 2019-10-04 Bogdan-Andrei Iancu * [d270f134c] : [cfgutiles] Allow check_time_rec() to check a different time A second optional parameter allows you to pass an UNIX timestamp to be checked against the time recurance (instead of checking the current time) 2019-10-02 Razvan Crainea * [0d981b8f8] : Makefile.json: change json library based on include if we are going to include json-c header, than we shall use the json-c library, instead of json 2019-10-01 Vlad Patrascu * [4dde71c13] : event_virtual: improve the behaviour of the FAILOVER policy A previously failed subscriber is now skipped for further notifications for a configurable interval (via the new "failover_timeout" modparam). This is useful when the actual event backend blocks for a considerable amount of time when rasing the event. This commit greatly decreases the overall amount of time OpeSIPS processes remain stuck when a subscriber is unresponsive. Related to #1836 2019-10-01 Vlad Patrascu * [fec5b51a0] : event_rabbitmq: don't block indefinitely on connect The connection timeout is configurable via a new module parameter. Related to #1836 2019-10-01 Razvan Crainea * [d2e6874f3] : tls_mgm: don't run ATEXIT openssl callbacks for 1.1.1b The NO_ATEXIT flag was added in openssl 1.1.1b, not 1.1.1 Credits go to Nick Altmann for reporting this 2019-10-01 Razvan Crainea * [5d177ba9f] : rtpengine: enhance symmetric documentation Close #1841 2019-09-30 Liviu Chircu * [688473a60] : dialog: Fix unsafe profile list iteration The dialog->profile_links list _must always_ be walked after first grabbing the dialog's lock, regardless of the current ref count. Failing to do so may lead to invalid memory access, as the list elements may get freed from other processes. Many thanks to 46Labs for supporting this fix (cherry picked from commit 5613922793b2b332354da30ab54b4e56f276bbda) (cherry picked from commit 0877fac687faa4b1e6dc36edab2ee61f669ce556) 2019-09-30 Liviu Chircu * [7ba3c19de] : dialog: Fix possible deadlocks with pinging + HA The OPTIONS pinging + replicated dialog creation routines were sufferring from a possible AB/BA deadlock, as they were both attempting to grab the dialog and the ping timer list locks, but in differring order. Many thanks to 46Labs for supporting this fix (cherry picked from commit e75ebb8b80af41e9829368618618afe558f88ca0) 2019-09-30 Liviu Chircu * [25c7c5994] : Transformations: Fix a series of buffer overrun bugs This patch adds several buffers, on two layers, such that the following operations are no longer broken (i.e. leading to buffer overruns and incorrect results): * putting together any kind of transformation chain without the risk of reading and writing into the same transformation buffer * passing multiple transformation-enabled variables with arbitrary chaining lengths to a script function without the risk of any two of them making use of the same buffer Many thanks to Răzvan Crainea for some timely tips! Fixes #1572 2019-09-30 Liviu Chircu * [1aac6c20a] : cfg language: Fix binary string comparisons When dealing with binary strings (e.g. the ones produced by {ip.pton}), some of the string comparison operators were broken, such as: !=, >=, >, <= and <. Completes dee8a6a375 2019-09-29 OpenSIPS * [b045af53a] : Rebuild documentation 2019-09-28 Liviu Chircu * [c7013403f] : pi_http: Fix undefined 'PROC_BIN' reference 2019-09-27 Bogdan-Andrei Iancu * [b96abf0be] : Remove old, unused reference to PROC_BIN (cherry picked from commit 838349d5827d05c8c5430d53ca125f49600967a8) 2019-09-27 Bogdan-Andrei Iancu * [02bb96f9d] : [droutoing] fix typo in comment (cherry picked from commit d5be677e7db08f5c5fd86bb251b8975ec5fb11ab) 2019-09-27 Bogdan-Andrei Iancu * [a75b2369b] : [uac] force enclosing of the newly added URI As the new URI may contain URI params, to be sure we are not mixing them with hdr params, we enclose the new URI (if not already). Closes #1741 (cherry picked from commit 146bcee04f4c66bf78254dd985bf651f888396c1) 2019-09-27 Bogdan-Andrei Iancu * [8f16c3ee8] : Loop and wait for multiple terminted processes. If you have a bunch of exec() calls (translated into a bunch of additional processes created), upon their termiantion OpenSIPS will get a cascade of SIGCHLD signals - as the kernel does not guarantee the delivery of the signals (like mergining similar multiple signal triggers), we will not have a 1-to-1 between terminated processes and received signals. So, let's do our best and upon a single SIGCHLD we will try to "catch" as many terminated processes as possible/available. Closes #1773 (cherry picked from commit 57f3619ffb848a9dce51668cd22ed964b5bcc8f2) 2019-09-27 Vlad Patrascu * [e5e249b4d] : clusterer: select the proper send socket for multiple bin listeners Fixes #1671 2019-09-27 Liviu Chircu * [329ba6031] : dialog: Optimize link_dlg_profile() Reduce the number of pointer de-reference operations performed, be it under lock or not (from 8-9 de-references down to just 1). 2019-09-27 Liviu Chircu * [20a962a23] : dialog: Various small code/performance improvements * remove redundant "is_replicated" function parameter * speed up profile hash computation (size is always 2^N, see new_dlg_profile() -> we can do bit AND) * shorten cookie-cutter code with add_last() and str_cpy() * fix over-complicated if condition * do not leak PKG memory on some error case * remove useless comment 2019-09-26 Liviu Chircu * [28294ad07] : dialog: Fix a very rare race condition A dlg->h_id with value 0 is perfectly possible, see link_dlg_unsafe(): dlg->h_id = d_entry->next_id++; It should not be treated as some special case. (cherry picked from commit d4be27178f7cb5bc09eb45b331e4cc4a61261444) (cherry picked from commit abf4ac9b009ce467707c698360235113f4f2f239) 2019-09-26 Liviu Chircu * [8af37b7bc] : dialog: Fix unsafe profile linker handling Once a profile linker is attached to dlg->profile_links, it _must not_ be touched anymore, as it can be freed at any moment (e.g. within a simultaneous processing of dialog CREATE + DELETE bin packets). Many thanks to 46Labs for uncovering this bug and for supporting the fix (cherry picked from commit ddbff50033fb8701ec3a0bdc189be75a44558639) (cherry picked from commit 7d75d6fea4aaa587d6853ebaa234aa3bf0aae264) 2019-09-26 Vlad Patrascu * [f829eedda] : acc: fix bad event parameter values for evi accounting All dialog specific accounting fields were incorectly pushed as event parameters for E_ACC_EVENT and E_ACC_MISSED_EVENT. This would result in bogus values, possibly set by previous triggerings of E_ACC_CDR_EVENT. This commit also fixes a type conversion bug causing the 'setuptime' and 'created' parameters of E_ACC_MISSED_EVENT to be improperly set. Closes #1786 (cherry picked from commit b0760cd10122ef879eec325a2b4ce564e73ec03e) 2019-09-25 Liviu Chircu * [d19bc1b13] : usrloc: Fix some incorrect startup checks On some misconfigured scripts (e.g. DB usrloc + db_url modparam, but without any SQL DB module loaded), the module would report some strange errors, instead of the more intuitive: WARNING:core:solve_module_dependencies: module usrloc depends on an sqldb module due to modparam working_mode_preset, but none was loaded! ERROR:core:main: failed to solve module dependencies Thanks to Vlad Pătrașcu for the catch! (cherry picked from commit 0b55ca32e74ec5d9b488de3226ba7ffe1d387764) 2019-09-25 Razvan Crainea * [23fb41e08] : drouting: fix clang warnings related to char signed checks 2019-09-25 Razvan Crainea * [3d30217a8] : tls_mgm: don't run atexit callbacks at shutdown prevent OpenSIPS from crashing during shutdown due to bogus atexit() `OPENSSL_cleanup()` routine, that is ran after the SHM memory is destroyed, thus crashing during shm memory release. 2019-09-23 Liviu Chircu * [ca75c705a] : core_hash(): Clarify parameter requirement 2019-09-23 Liviu Chircu * [fda854eee] : fraud_detection DB schema: Fix missing default values 2019-09-23 Liviu Chircu * [4a0558b27] : fraud_detection: Various small improvements * refactor unreadable/unmaintainable code * fix bad hash sizes, leading to unused buckets * improve some key errors reported to the users 2019-09-23 Liviu Chircu * [749fbef88] : fraud_detection: Fix a seq calls computation bug The sequential calls of a user should be counted using the dialed numbers, NOT the matched fraud rule prefixes (which are almost always shorter). Reported by Benjamin Pasquet from OpenIP 2019-09-23 Liviu Chircu * [04704dc05] : fraud_detection: Fix a dangling SHM access bug This patch fixes a race condition where a fraud_detection reload could free the global SHM "threshold" objects which are still being referenced N times (once for each ongoing dialog -- callback is invoked on termination). The solution is to simply store the integer values of the thresholds into the callback data, and avoid storing any SHM pointers which have no lifetime guarantees. 2019-09-23 Liviu Chircu * [ccdc8d2d1] : fraud_detection: Fix incomplete locking logic The get_item() function results were insufficiently guarded, such that the SIP workers may concurrently perform insert operations on the same map object, possibly leading to shm corruption. Fixes #1389 2019-09-23 Liviu Chircu * [e7fa2d185] : Revert "fraud_detection: Fix hash-level locking issues" This reverts commit 32ec7a291db3a9ac8865a439b04874a9e1798e8e. 2019-09-23 Bogdan Andrei IANCU * [7832736de] : Merge pull request #1834 from lemenkov/any_route_removal rtpengine: Use standart ALL_ROUTES macro 2019-09-23 Bogdan-Andrei Iancu * [7ade34c57] : [acc] added loose dependency to dialog module We need to be sure that dialog module is init before acc (if dialog is loaded), to prevent any crashes when acc registers the DLGCB_LOADED callback in dialog (the registraion of the callback will try to run the callback on any pre-existing dialogs, so the hash table for the dialogs must be created/init). It is a loose dependency as it does not require the dialog module to be loaded. But if loaded, it must be init before ACC module. Fixes #1833 (cherry picked from commit 3c18dbfc198d7bece144e708762ea35299bdc8b5) 2019-09-22 OpenSIPS * [e4cd76742] : Rebuild documentation 2019-09-21 Peter Lemenkov * [68447a1b0] : rtpengine: Use standart ALL_ROUTES macro ALL_ROUTES macro was introduced in commit 85413735093b55f64390c0284ec4c2f63fad3526. Let's use it instead of hand-made non-standart ANY_ROUTE. 2019-09-20 Liviu Chircu * [abf3e32f9] : sql_cacher: Fix a series of memcmp() bugs This patch fixes a series of string comparison bugs, which would have lead to either false positives or invalid memory access. Credits to Răzvan Crainea for the report 2019-09-20 Bogdan-Andrei Iancu * [20f14c036] : Fixed calling receive_msg() from non-worker process As starting 3.0 only the worker processes have access to the config script, the packages recevied via the raw sockets (in a module process) needs to be handled in the proper worker-processes via an RPC call. Closes #1813 2019-09-20 Bogdan-Andrei Iancu * [4001b4681] : Fix missing alias ports in TCP conn description The alias ports of a TCP connections are essential information when debugging issues related to the TCP conn re-usages. 2019-09-19 Alexey Vasilyev * [0c31818cd] : Small cleanup of never executable code 2019-09-19 Alexey Vasilyev * [3c74e41f7] : Use word64encoding for $TH_callee_callid like in PR #1448 2019-09-19 Razvan Crainea * [fed5bade4] : Rename the mod_exports dependencies function to preinit Commit b29931e4f added a new function in `mod_exports`, sadly named `dependency` function. This created a confusion with the existing dependency mechanism. This commit changes renames the newly added function to `preinit`. Kudos to Liviu Chircu and Vlad Patrascu for arguing about this. 2019-09-19 Bogdan-Andrei Iancu * [bd61ef3bf] : [drouting] Allow non-digit chars in the prefix New modparam `extra_prefix_chars` may define a list of non-digit chars to be accepted in the DR prefixes. 2019-09-19 Bogdan-Andrei Iancu * [3812dea3e] : [drouting] fix solving the script route upon load Do not lookup the name of the route at DB load (as we do not have the proper structure), but do it at runtime. Closes #1824 2019-09-19 Liviu Chircu * [fabcfa1de] : clusterer: Fix misaligned sync packets (related to be7265f1) Commit be7265f11d broke the sync on `master`, since it did not take into account commit 40b742256a, where the BIN packet receival mechanism was optimized. Reported by Răzvan Crainea Credits to Vlad Pătrașcu for helping speed up the fix 2019-09-19 Bogdan-Andrei Iancu * [7bb74dbea] : [b2b_logic] Do not try to re-evaluate the script params. The script parameters (provided from script level) are already evaluated (from the variable perspective), so there is no need to do it again. Closes #1819 (cherry picked from commit f9bc3ce41d0cfc25c252215f35f8e04af7035f9b) 2019-09-19 Razvan Crainea * [68a764c06] : acc: register DLGCB_LOADED callback in mod init Move the registration from the dependencies function, because at that point the dialog module does not have anything loaded. 2019-09-19 Razvan Crainea * [f54e3fd76] : acc: always try to load dialog module In case the `cdr` flag is used as variable, we can not figure out during startup parsing whether the dialog module should be loaded or not. Therefore we always try to load the dialog module, and in case we can't and the `cdr` flag is used, we trigger a warning. 2019-09-18 Liviu Chircu * [e5dad693a] : usrloc: Be more strict with bad modparams Do not attempt to auto-fix invalid modparam values and throw a warning, because some users may skip reading the logs on a "succesful" startup! 2019-09-16 Razvan Crainea * [72982c2ca] : smpp: fix payload when sending SM/DM response Error reported by Johan De Clercq over GitHub/mail. Related to #1807 2019-09-15 OpenSIPS * [9b44b3d14] : Rebuild documentation 2019-09-12 Liviu Chircu * [295f4ba92] : dialog: Fix broken Re-INVITE pinging timeouts Commit 0d026b9 introduced a regression where the Re-INVITE pinging timeouts would not work anymore. Fixes #1797 2019-09-12 Liviu Chircu * [886252416] : federated usrloc + Cassandra: Fix metadata deletion Due to the fact that the key/value cachedb API often uses hardcoded key names in each backend implementation (e.g. "opensipskey"), usrloc AoR metadata delete operations were not working with Cassandra, as usrloc asks the API to delete the "id" key. 2019-09-11 Liviu Chircu * [c21c0944d] : usrloc: Undo removed condition in da1dac8f Credits to Vlad Pătrașcu for the catch! 2019-09-11 Liviu Chircu * [da1dac8f4] : usrloc: Fix a replicated AoR label matching bug This patch makes it so the AoR label gets included in the "AoR created" replication packets and mirrored in the receiver instance. This prevents a series of bugs where the usrloc API fails to match a contact by its contact ID, e.g.: * nathelper being unable to delete dead TCP/TLS contacts after a restart + usrloc cluster sync * mid-registrar (mode 1) being unable to look up a contact by contact ID after a restart + usrloc cluster sync Reported by @vasilevalex Fixes #1492 2019-09-11 Razvan Crainea * [fc73c9fb2] : obsolete/seas: revert bug introduced in commit fa0bcd201a Many thanks to Walter Doekes (wdoekes on GitHub) for reporting this in ticket #1828 2019-09-11 Razvan Crainea * [a48aeca2d] : tm: dup in pkg the faked msg headers before this commit, the faked reqests were having the headers fields stored in shm_mem and shared with the tm request uas. Thus, during concurrent accesses to one of the headers' `parsed` field, the first process would have parsed the field in pkg memory, and the second process would have found that header already parsed. However, it couldn't read the other's process memory, resulting in an invalid access. Moving the headers in a private area for the faked request solves this issue, as each process will have its own `parsed` field in pkg memory. Credits go to Rizwan Syed and Jonathan Hulme from Connex CS for reporting and supporting the testing and fixing of this issue. This issue has also been reported in ticket #1808 2019-09-11 Vlad Paiu * [2760e6998] : Fix length detection when we need to split UCS2 messages into chunks 2019-09-11 Vlad Paiu * [bb8ac38ad] : Implement UDH, allowing to send SMPP messages exceeding the 140 characters limit Closes #1821 2019-09-10 Liviu Chircu * [2fc86f7d8] : mid_registrar: Improve throttling performance (modes 0 and 1) This patch fixes a bug with UACs that send expiration values which are _beyond_ the configured "outgoing_expires" value. In this case, the throttling logic would only keep absorbing REGISTERs up to "outgoing_expires" seconds, and would disregard the actual value returned by the main registrar. (cherry picked from commit ad9ff9a27eab2b56d7ce617d03f03024ad55b3fe) 2019-09-10 Vlad Paiu * [d724cec9c] : Added support for UCS2 type of SMS messages ( in & out) Added support for requesting delivery receipts for outbound SMS 2019-09-09 Liviu Chircu * [66f99833f] : mid_registrar: Fix unsafe aor->contacts access In modes 0 and 1, the aor->contacts list was accessed in an unsafe manner, as the AoR lock would be relinquished too early. This could lead to a crash in rare cases. 2019-09-09 Liviu Chircu * [74e847af7] : Merge pull request #1805 from ar45/fix_1804_mis_registrar_save Fix #1804 - mid_registrar_save() should save new contact from registe… 2019-09-09 Razvan Crainea * [91210a9fe] : perl: silence uninitialized RETVAL warning 2019-09-09 Razvan Crainea * [d8beff877] : travis: replace libradiusclient-ng-dev libradcli-dev 2019-09-09 Răzvan Crainea * [c0f8407d3] : Merge pull request #1787 from sippy/master_warnfix Fix 2 compilation warnings. 2019-09-09 Liviu Chircu * [2db8c1715] : sipcapture: Run child_init() during startup This allows, among others, sending HTTP requests from the script, as the rest_client module needs to initialize its state before it can be used. Reported by @hydrosine Fixes #1818 2019-09-08 OpenSIPS * [1ca9b8b2c] : Rebuild documentation 2019-09-03 Liviu Chircu * [c052afe59] : textops: Fix bad subst_body() example (cherry picked from commit 25f9070ab7509a8ab186b69a1a7ee2d5aeb896bc) (cherry picked from commit 86d83c2b545dc88e1aaae47f5e02e021caf81f7d) 2019-09-01 OpenSIPS * [48bc3ac05] : Rebuild documentation 2019-08-29 Vlad Paiu * [d26b99800] : RFC 5389 : "Defined a generic padding mechanism that changes the interpretation of the length attribute. This would, in theory, break backwards compatibility" Skip the new padding, also skip non-mandatory attributes 2019-08-28 Vlad Patrascu * [f0df71a3c] : dialog: do not replicate 0 profile counter under lock (cherry picked from commit 4129583965e171160137a077cf37ca08df7d1e5d) 2019-08-26 Liviu Chircu * [21e33d0ae] : dialog: Add optional ref troubleshooting support 2019-08-26 Liviu Chircu * [deb03fe86] : struct hist debugging: Enhance the API * add the possibility to disable auto-logging. Previously, each debugged entity would periodically dump logs to disk as it accumulated logs. Disabling auto logging is especially useful when troubleshooting code in high-throughput environments. * sh_log() is now a macro, which will additionally print the FILE / FUNC / LINE of the calling code, offering more troubleshooting insights and reducing the amount of code written * simplify sh_unref(), the 2nd parameter was unnecessary 2019-08-26 Liviu Chircu * [af1e44255] : acc: Fix segmentation fault on startup Reported by Dan Pascu 2019-08-26 Dan Pascu * [3febdf5de] : Removed leftover code after pthread overwrite fix 2019-08-26 Dan Pascu * [92d7188b2] : Fixed overwriting pthread locking functions 2019-08-26 Dan Pascu * [a769a6cfe] : Fixed segmentation fault caused by illegal memory access 2019-08-25 OpenSIPS * [525ac2a44] : Rebuild documentation 2019-08-23 Dan Pascu * [21348b39c] : Fixed potential illegal memory access to freed structure 2019-08-23 Dan Pascu * [945297b55] : Fixed consistency 2019-08-23 Razvan Crainea * [3aa5596c5] : acc: use the dependencies function to register dlg ctx This is a temporary fix, until we figure out a way of registering the dlg ctx index only if cdr is used. 2019-08-22 Vlad Patrascu * [c0697b9ad] : dialog: discard a replicated update for a deleted dialog A race between the processing of a dialog update and delete replication packets can lead to an incorrect dialog state and bogus unrefs. 2019-08-22 Razvan Crainea * [35ab1f24c] : fix returned code for strip and prefix functions Instead of returning 0, which halts the script, return 1 or -1 in case of error. 2019-08-22 Razvan Crainea * [b29931e4f] : add dependencies function in module_exports Add a new function in module_exports that is run to determine what kind of dependencies (of other modules) a module has. This function is ran before running the initialization phase of the module. 2019-08-22 Razvan Crainea * [795395fd9] : dialog: use static holders for statistics loaded at startup This prevents OpenSIPS from crashing because the statistics were not yet initialized. This fix is needed due to the revert of the previous two commits, related to the start of OpenSIPS on child init. 2019-08-22 Razvan Crainea * [21c013edd] : Revert "dialog: Fix broken stats after a restart+reload" This reverts commit aa2f534e18dc0830a160bb90d4cc3a116386953d. 2019-08-22 Razvan Crainea * [cf48b8f3a] : Revert "dialog: load dialogs on child init" This reverts commit 3ddae43445cd6f3e3f6d4e9480f1e8c35801d008. 2019-08-22 Bogdan-Andrei Iancu * [527f718cc] : [registrar] fixed type s/stirng/string/g (cherry picked from commit c45ee49e35e836dddd6ed490b337bc23cf0dbea7) 2019-08-22 Bogdan-Andrei Iancu * [2b30c032f] : [registrar] Fix wrong doc on is_contact_registered() (cherry picked from commit a3d422e4e9812696279f39a5df62fc76dc81fea5) (cherry picked from commit 7ce84c42a32b64cbf888423eebdd71343f724737) 2019-08-21 Vlad Patrascu * [5386bb7a4] : clusterer: fix possible crash when sending a bin packet This commit fixes a crash caused by a race condition when computing the next hop for a destination before sending a bin packet. The actual 'next_hop' field from the 'node_info_t' struct may be changed by another process after getting the return code from the 'get_next_hop_2()' function. 2019-08-18 OpenSIPS * [6cc80506c] : Rebuild documentation 2019-08-17 Liviu Chircu * [17558c5bd] : mk_proxy(): Improve robustness A lot of code which calls mk_proxy() for DNS resolution assumes that the "proxy->host->h_addr_list" array contains at least one value, e.g.: modules/drouting/routing.c +611: hostent2ip_addr(&pgw->ips[0], &proxy->host, proxy->addr_idx); modules/dispatcher/dispatch.c +281: hostent2ip_addr( &dp->ips[0], &proxy->host, proxy->addr_idx); This would cause a segfault immediately if h_addr_list contains 0 results (i.e. first value is a NULL pointer). As the overall intention is to resolve the hostname into at least 1 IP address, this patch changes mk_proxy() to return NULL on a successful query with 0 results. Credits to Jonathan Hulme for the report 2019-08-16 Liviu Chircu * [45dd0e560] : registrar: Fix a ";received=" Path parsing bug with save("v") Commit 71c7d75 introduced a parsing bug causing the ";received=" info to not get stored into usrloc, as well as the NAT flag. If we're saving these contacts with save("v") instead of save("p1v"), we cannot route to them anymore (the latter version fully stores the Path, so the front-end LB is still able to route back to the devices). Credits to John Burke for the accurate report Fixes #1809 2019-08-16 Dan Pascu * [6916a898b] : Revert "Added new MI function to list all active dialog IDs" This reverts commit 217613cc79d14935da43a180ab791e8d93b2adb1. 2019-08-16 Aron Podrigal * [98636d41d] : Fix #1804 - mid_registrar_save() should save new contact from register following an unregister. When using `sql_mode` is set to `SQL_WRITE_BACK` and `rr_persist` is `RRP_LOAD_FROM_SQL` contacts are not immediately deleted from memory, contacts are marked `expires = UL_EXPIRED_TIME`. So when a `REGISTER` request is received following an UNREGISTER, do not return the previous contact marked for deletion. Returning the previous contact record, could have potentially lead to a crash, if opensips would free the contact record while mid_registrar would retreive that using `get_ucontact()`. 2019-08-15 Liviu Chircu * [8070dac14] : path: Do not omit ";received=" when merging Path headers If "enable_double_path" is on and the inbound and outbound sockets match, the second Path header would not be added anymore (good!), thus skipping the ";received=" parameter completely (bad!). The above behavior is actually a regression, introduced in 71c7d75f66c Many thanks to Pete Kelly and Bogdan Iancu for spotting the problem! 2019-08-14 Bogdan-Andrei Iancu * [f561eed7b] : [proto_hep] Fix mem leaks upon errors. If resolving the destination fails, do not forget to free the so far allocated memory. Closes #1782 (cherry picked from commit 11d7dcc28d9a4ae9351e12c5a5d1f9a2da2d7279) 2019-08-14 Liviu Chircu * [07e80bc29] : Merge pull request #1802 from Ozzyboshi/master matching_mode honored in cachedbs 2019-08-14 Alessio Garzi * [61efba2e5] : Indentation fix 2 on urecord One line was missing tab indentation 2019-08-14 Alessio Garzi * [5d1678a37] : Better indentation on switch case inside urecord Just indentation fixes 2019-08-14 Vlad Patrascu * [4ccc0dd39] : clusterer: fix crash when loading null string columns from DB The bug was introduced in commit: 66ae3ac (cherry picked from commit e8255c83a655e8e6e8fb8136344599155da01e65) 2019-08-14 Razvan Crainea * [6b0da180a] : dialog: fix double lock get on replication update When a replicated packet was received due to a timeout update, the dialog was refferenced with the lock already acquired, resulting in a deadlock. This fix refferences the dialog in an "unsafe" way, without trying to acquire the lock, since it is already acquired. 2019-08-14 Dan Pascu * [217613cc7] : Added new MI function to list all active dialog IDs 2019-08-13 Alessio Garzi * [db7eca79a] : matching_mode honored in cachedbs Function cdb_add_ct_update ignores matching modes set on opensips.cfg, this result in an unexpected behaviour if the user sets matching_mode=0 since multiple records with same contact (but different callid) are stored in the cache database. This fix checks, before getting the base64 hash, if matching mode is contact only, if yes, the callid string is not included in the resulted base64 hash. If matching mode is CONTACT_CALLID, this function behaves like before, and the hash is calcuated using contact:callid. 2019-08-13 Bogdan-Andrei Iancu * [7b80bdc7d] : Fixed bogus condition in fixup_check_avp Closes #1800 2019-08-12 Liviu Chircu * [c98f9b596] : pkg memory: Dump memory status on SIGSEGV Also improve robustness of the memory block iteration: minimize the chance of a crash while walking through the fragments in order to produce the status. For example, if f->size holds a large value due to a programming error, the FRAG_NEXT(f) macro would overflow the f holder. 2019-08-12 Liviu Chircu * [6dbbf1246] : dialog: Fix two referencing issues * an unsafe referencing bug, introduced in 65a9f51f1ee. As long as the dialog is not locked, we _must not_ call ref_dlg_unsafe(). This unsafe increment operation could lead to occasionally missing references, possibly even a crash. * a long-standing bug, where read_dialog_profiles() is invoked on replicated create/update events with a dialog that has no extra reference, so it could very well be a lingering/freed pointer. Under the right conditions, this too could lead to a crash. (cherry picked from commit 0e85dd69f9d9ead1363e2afe8f6b4f0d3293f4db) (cherry picked from commit 5bbebf682657ce0e162645ae593b503b6995bb27) 2019-08-11 OpenSIPS * [173e33d76] : Rebuild documentation 2019-08-09 Vlad Patrascu * [c26bea063] : clusterer: fix bad parsing of node specification modparams Multiple string properties in 'my_node_info' and 'neighbor_node_info' modparams would not be parsed correctly. Fixes #1775 2019-08-09 Bogdan-Andrei Iancu * [f1c9f606a] : [urloc] fix reading int val in modparam function Fixes #1790 2019-08-07 Liviu Chircu * [cfbd70494] : CSV parser: Relax the RFC 4180 implementation Do not implement RFC 4180 down to the letter (e.g. double-quotes are ONLY allowed within a field if they are escaped using another double-quote). Rather, only follow this rule if a field _begins_ with a quote. This helps maintain backwards-compatibility with the previous OpenSIPS CSV parser, and is also desirable in many situations (e.g. parsing a WWW-Authenticate header). Fixes #1794 (cherry picked from commit 4072d9e54e631b20e71d3abc181d1f329084c95b) 2019-08-07 Vlad Patrascu * [165b87912] : Fix missing param in construct_uri() function export 2019-08-07 Vlad Patrascu * [a08cf0fd9] : Fix missing optional param flag for cache_add/sub() functions 2019-08-07 Vlad Patrascu * [6884b3d17] : Warn about usage of deprecated function names Commit 525b30a2a08e4c960e2448d746d5926cca33cbe1 removed the alternative names for the core functions that rewrite the R-URI. 2019-08-07 Bogdan-Andrei Iancu * [f1a6d0d8e] : [tm] fixed regression on cancelling empty branches upon timeout While adding support for Content-Disposition: no-cancel (see 4747da559f4df161441be8373488dee9fd16c282), a regression was made, allowing TM to send out cancel (upon internal 408 timeout) to branches with no incoming replies. Only this cancelling scenaio was affected (internal 408 timeout). The cancelling upon 200OK or incoming cancel were not affected. Thanks to Richard Revels for spotting and reporting this. 2019-08-04 OpenSIPS * [bf158332d] : Rebuild documentation 2019-08-02 Maksym Sobolyev * [df88ac3a4] : Merge branch 'master' of github.com:OpenSIPS/opensips into master_warnfix 2019-08-02 Bogdan-Andrei Iancu * [269ad7a3f] : [sipmsgops] Added strict char validation for URI username Do char validation as per RFC3261 for URI username in RURI and TO / FROM hdrs : user = 1*( unreserved / escaped / user-unreserved ) user-unreserved = "&" / "=" / "+" / "$" / "," / ";" / "?" / "/" escaped = "%" HEXDIG HEXDIG unreserved = alphanum / mark mark = "-" / "_" / "." / "!" / "~" / "*" / "'" Closes #1408 2019-08-02 Bogdan-Andrei Iancu * [1fee2abe1] : [sipmsgops] wrap up long lines 2019-08-01 Maksym Sobolyev * [6452be40c] : Avoid compilation warnings. 2019-08-01 Liviu Chircu * [8e391c2f8] : clusterer: Log all major sync stages at INFO level Motivation: these logs are not spammy at all, yet very useful/reassuring to see in production after issuing data sync commands. 2019-08-01 Bogdan-Andrei Iancu * [9198eccbd] : [sql_cacher] Proper handling of empty tables if there are no records in the table (after a reload on a fully cached table), do not consider it an error and (even more important) take care and do the version change on the keys (to remove the old values). Closes #1784 Credits go to @clifjones for the patch 2019-08-01 Bogdan-Andrei Iancu * [68bedfee4] : Fixed the stats for counting transaction based on the final reply code The fix consist of counting only ONCE each transaction (for the xxx_transaction statistics), disregarding its retransmissions, multiple 200OK replies or final code override (like 200 after a negative reply). Closes #1636 Many thanks to @bcnewlin for his testing and validation of the fix. 2019-08-01 Liviu Chircu * [f4015c854] : compression: Do not strip "a=rtpmap" lines with types 96-97 According to the IANA RTP payload types register, the dynamic payload types (custom-defined, for which the "a=rtpmap" lines are mandatory and cannot be stripped) begin at 96, not at 98. Reported by JP Hindin 2019-07-31 Liviu Chircu * [57cf12dfa] : dialog profiles: Fix deadlock during startup This updates commit b26d59e30c2c, which introduced a deadlock while loading dialogs from DB which also contain profiles. 2019-07-31 Liviu Chircu * [db2fc72dd] : dialog sync: Fix some subtle backup box restart bugs In an HA setup, following a restart of the backup box, there would be: * an extra ref for dialogs loaded from DB but not confirmed through sync, leading to a few hanging state 5 dialogs (added in 51b5ec3b) * too little 'active_dlgs' stat decrements during the above corner-cases, since update_dlg_stats() ignores state 5 dialogs (cherry picked from commit 509e18113be5f217e6f421c97d2545239d996729) 2019-07-30 Vlad Patrascu * [525b30a2a] : port core script functions to the same interface as module functions 2019-07-30 Liviu Chircu * [3119f66b0] : opensips.wsgd: Update README.md 2019-07-30 Liviu Chircu * [ece8e08af] : utils: Add a Wireshark BIN dissector for 2.4+ packets Not all packets are supported in this initial release. So, far we have: * dialog replication packets (2.4+) * dialog profiles broadcast packets (2.4+) * dialog sync packets (2.4+) * ratelimit pipes broadcast packets (2.4+) * usrloc contact update packets (2.4+) Still plenty of work to be done, but this is a solid stepping stone! See the README for installation tips. 2019-07-30 Liviu Chircu * [aaedaace9] : dialog: Fix broken re-INVITE pinging after failover The mandatory re-INVITE pinging data (SDP1, SDP2, ct1, ct2) was not included in the BIN replication packets, so the pinging would stop working once we'd failover to the backup box, in an active/backup HA scenario. (cherry picked from commit 65a9f51f1ee43e500d6fbe34c3a0e07722bd75b2) (cherry picked from commit ba7516e92f4ba5ecf34234872d49ee2d07750888) 2019-07-30 Liviu Chircu * [d37170707] : dialog sync: Fix ref miscount during post-sync cleanup The hash reference must only be decremented a single time during the lifetime of a dialog. Given that multiple pieces of code may attempt to delete a dialog concurrently (e.g. a BIN "delete" packet and the post-sync cleanup routine), the only way to guarantee a single decrement of the hash ref is by using the dialog state machine transition. Iff we're the ones to transition from ACK -> DELETED, we can (and MUST) also decrement the hash reference. (cherry picked from commit 51b5ec3bac182104781a5e12287a217053170432) (cherry picked from commit ddcdab724f0da3ef1430353acceb8da686c8add1) 2019-07-30 Liviu Chircu * [809746f16] : dialog: Decrement dialog stats during post-sync cleanup After a sync completes, it proceeds to clean up all dialogs loaded from DB which did not match the data received via sync. However, make sure to also decrement the 'active' / 'early' dialog stats on each delete! (cherry picked from commit f88c41064c9d895e52c6a8dac62867246da3b253) (cherry picked from commit a468005019539d32613617e9bc549c1765e00764) 2019-07-30 Liviu Chircu * [b26d59e30] : dialog: Fix data reload race conditions on startup Since loading the data on child_init(), the load_dialog_info_from_db() routines and rcv_cluster_event() routines could run in parallel, without any synchronization on the dialog table, which could lead to duplicate dialogs in the hash. (cherry picked from commit aa93d0fbf369078f1c0e85fc10314fe7799aeca0) (cherry picked from commit a6345cc2d1ff801d51510001df04278b1ae12810) Conflicts: modules/dialog/dlg_db_handler.c 2019-07-30 Liviu Chircu * [4c749d6e7] : dialog sync: Do not include early or ended dialogs (cherry picked from commit b8bde2f014e5b427c8517493a7ada16923d0928c) (cherry picked from commit 765c521e4ba041236f234cc186cc978247783dc7) 2019-07-30 Liviu Chircu * [616c989e4] : dialog replication: Revert the sync packet alignment code ... since now it is unnecessary, thanks to the sync layer enhancements. (cherry picked from commit e33565342065298eeb542a73503f84402cc1076d) (cherry picked from commit 82b87044e7d641ab307c8ceed65fc6c5fa0f710e) 2019-07-30 Liviu Chircu * [f2956e9f4] : dialog replication: Prevent crashes due to differing packet versions Commits 58dc435cb563 and 852e629e4700 changed the format of the dialog binary data packets. This would cause an immediate crash during a rolling upgrade, since upon upgrading and restarting the backup node, it would sync from or receive packets from a primary node running the older version, with the previous data format. This patch makes it so dialog packets which do not meet the expected version are simply discarded, rather than being left to cause a crash. (cherry picked from commit 57bbad55c13e3156dcebf95bcd8adf8e52e97ecd) 2019-07-30 Liviu Chircu * [d18089d89] : cachedb_local: Fix compile error (cherry picked from commit 9072fe1513506c548e6720bc80b7d7db66ab1ed2) 2019-07-30 Liviu Chircu * [be7265f11] : clusterer: Enhance the versioning of sync packets This commit adds an additional "version" field for the sync packets, which are more complex than the other ones. Since they contain serialization logic from two different layers (clusterer + data module), they should also contain two version fields, to allow each module to discard data coming from an OpenSIPS donor node running on a differing binary version. (cherry picked from commit a20a0acb5d9e8ef75d4cf2bb081ed1d5d259a3dd) (cherry picked from commit 60bac3c3abc3fb2ba6a51f6659a9ac22a1eafddc) 2019-07-30 Liviu Chircu * [1f7ea9613] : clusterer: Make the data sync interface more robust This patch improves the data sync interface so that during a sync, modules are no longer forced to micro-manage the data packets they are receiving from the interface. They can now freely abort the processing of a sync chunk at any time, without disrupting the processing of the entire sync packet (composed of many more of such data chunks). Additionally, since the sync packet format has changed (an extra integer is needed for each chunk in order to allow the "skip" mechanism), the sync packet version is now bumped from 1 -> 2, in order to prevent any compatibility issues with OpenSIPS nodes without this patch. (cherry picked from commit 0b3ad435be73d7ef49c511d2b70039c39a883135) Conflicts: modules/clusterer/sync.c 2019-07-30 Razvan Crainea * [ff245d48e] : siprec: provide means to add headers to initial req 2019-07-28 OpenSIPS * [1c385981b] : Rebuild documentation 2019-07-27 Liviu Chircu * [ae3fcda3b] : cfg syntax: Fully implement the 'break' statement The opensips.cfg now supports: * 'break' under an 'if', within a 'switch' statement (any part) * 'break' within a 'while' statement * 'break' under an 'if', within a 'while' statement * 'break' within a 'for-each' statement * 'break' under an 'if', within a 'for-each' statement * 'break' from nested 'switch' / 'while' / 'for-each' statements 2019-07-27 Liviu Chircu * [a970602b7] : cfg script: Remove max line length limitation to 4096 bytes 2019-07-27 Liviu Chircu * [bf968d016] : cfg preprocessor: Fix a dirty buffer management bug One of those pesky bugs, caused by not knowing your snprintf's well... This strange, seemingly inexplicable bug only manifested whenever a series of config file lines + preprocessor tokens formed a multiple of 4096 bytes, the amount by which the preprocessor buffer gets extended with each reallocation. With such config files, the snprintf() would truncate the last byte of the config file line adding up to N*4096 bytes (usually a '\n'), and put a '\0' instead, after which the preprocessing continued normally. However, it seems Yacc isn't too happy when you feed it with a buffer which includes '\0' characters, as this will cause it to barf some binary data to stdout, somewhat ruining the logfile. 2019-07-26 Liviu Chircu * [346b9528d] : dialog: Improve accuracy for active/early dialog stats Avoid lingering increments whenever a dialog is loaded from DB which eventually ends up getting discarded. 2019-07-25 Vlad Patrascu * [9db3a562a] : dialog: fix memory leak in unset_dlg_profile() (cherry picked from commit ca0ea3f7fb5849f208d6a685739fdbae567caed3) 2019-07-24 Liviu Chircu * [94bbbebbc] : usrloc shutdown: Destroy the CDB conn _after_ cleanup This fixes a possible crash on shutdown whenever a contact expires during the shutdown and needs to be flushed. Credits to @bogdan-iancu for the accurate report 2019-07-24 Razvan Crainea * [bc62c9bb6] : fix previous commit rebase issue 2019-07-24 Razvan Crainea * [935d76907] : event_*: use the new sync pipes mechanism Use the new pipe sync mechanism to notify the status of commands sent by the following modules: * event_xmlrpc * event_jsonrpc * event_rabbitmq 2019-07-24 Razvan Crainea * [d176c6286] : ipc: add new set of synchronous pipes These new pipe set for each process can be used to synchronously send a command from one process to the other. When using these pipes, make sure that there's no other job that can overlap, otherwise the receiver will not be albe to handle it 2019-07-23 Razvan Crainea * [139bb4c0c] : pt: expose number of processes at mod_init Add a function that exposes the number of processes at mod_init(). Even if this is not entirely accurate (some processes might remove their external processes during mod_init), it's the best chance we can get to count the number of pipes we need to create for modules that use synchronous communication. This fix solves event_* sync processing. Thanks go to Rizwan Syed for reporting this, close #1768 2019-07-23 Razvan Crainea * [73cc6ec8d] : evi: fix subscribers list mi cmd 2019-07-23 Razvan Crainea * [7d01f00a0] : mathops: make GNU_SOURCE set for math.h 2019-07-23 Razvan Crainea * [8c4332ead] : tls_mgm: fix glibc version check 2019-07-23 Razvan Crainea * [e6d8c1f43] : resolve: define MAXHOSTNAMELEN if not defined 2019-07-23 Razvan Crainea * [2a175eba2] : socket: properly check glibc version 2019-07-22 Vlad Patrascu * [5f52ae391] : b2b_entities: fix call to _do_uac_auth() from auth API 2019-07-22 Vlad Patrascu * [1ebb8ac3d] : auth: fix a compile warning 2019-07-22 Liviu Chircu * [aafbb85ce] : cachedb_mongodb: Add support for TIMESTAMP and BINARY types 2019-07-22 Vlad Patrascu * [5dbded6e9] : uac_auth: add support for "auth-int" qop 2019-07-22 Vlad Patrascu * [a5a9c1c28] : auth, auth_db: add support for "auth-int" qop 2019-07-21 OpenSIPS * [cd3bc09c7] : Rebuild documentation 2019-07-19 Nick Altmann * [8511c22c4] : RPM spec: fix package description (following apt spec) 2019-07-19 Dan Pascu * [0e6e1be7e] : Updated debian package description 2019-07-19 Dan Pascu * [8bd9c604f] : Fixed Engrish 2019-07-19 Dan Pascu * [f5c4df538] : Replaced TABs with spaces in the debian control file 2019-07-18 Razvan Crainea * [f21e0bb66] : dialog: set a termination reason for CANCELled dlgs Close #1481 2019-07-18 Razvan Crainea * [6e3938523] : tm: check branches that should be cancelled under lock This fix avoids race condition between a CANCEL message and replies that are coming in the same time. Thanks go to Tommy Brecher for reprting this and offering extensive logs to debug the issue in ticket #1759. Credits for the fix are shared with Bogdan Iancu for the brainstoring. 2019-07-17 Vlad Patrascu * [2f5be7bb2] : sip_i: allow add_isup_part() in request and failure routes Reported by Sagar Malam on the mailing list. 2019-07-17 Razvan Crainea * [91be787f1] : smpp: make sure we re-fetch the connection after rebinding Reported by volga629 in ticket #1728 2019-07-14 OpenSIPS * [cdb90bca7] : Rebuild documentation 2019-07-12 Vlad Patrascu * [642271cf4] : sql_cacher: don't query the SQL DB under lock when reloading Previously, retrieving any key from the cache during a reload would blocked until the SQL DB query completed. Suggested by Ben Newlin in #1760 2019-07-12 Liviu Chircu * [ecea9b074] : 'include_file' statement: Re-introduce relative file paths During the preprocessor migration, it seems the support for relative file paths was lost. This commit re-introduces all the lost features: * allow relative-path imports, e.g. include_file "cgrates.cfg". These file paths are considered to be relative to the .cfg file that is importing them * prioritize any relative-path imports found in the startup directory (Note: this is different from the "-w" working directory!) * detect infinite "include_file" loops Many thanks to Jonathan Hulme for discovering and reporting this issue! 2019-07-12 Bogdan-Andrei Iancu * [72f06a574] : [load-balancer] Link Resource under each Destination node Fixes how the output of the "lb_list" MI command is structured. 2019-07-12 Bogdan-Andrei Iancu * [303ff59c9] : [rtpengine] Fixed wrong test when building MI output 2019-07-12 Bogdan-Andrei Iancu * [dc6ac9e47] : [rtpproxy] Fixed wrong test when building MI output 2019-07-12 Razvan Crainea * [6638b06f3] : dialog: run loaded callback for dialogs loaded from db Fixes a bug introduced in commit 8c8f27f that was relying on the fact that dialogs were loaded from db *before* registering the loaded callback, due to the dependencies mechanism. Thus the loaded callback was ran on the spot, when the it was registered. However, this is not entirely correct, since there are modules (such as acc module) that do not have dialog dependencies, but still register LOADED dialogs - in these cases, if dialog was loaded (in script) after the module itself, the callback was never run. This behavior was amplified by commit 3ddae43, which was basically never loading the dialogs before registering the callback, thus the loaded callbacks were never ran. The purpose of this commit is to fix this issue, reported in #1754 Thanks go to Liviu Chircu for reporting the issue and providing the fix 2019-07-11 Vlad Patrascu * [f6232b068] : sql_cacher: properly increment relod version on timer reloads Reported by Ben Newlin in #1760 2019-07-11 Vlad Patrascu * [aa38fb1fb] : sql_cacher: fix a memory leak in case of a failed SQL query Reported by Ben Newlin in #1760 2019-07-11 Vlad Patrascu * [dea97be92] : sql_cacher: fix several possible deadlocks in case of errors Reported by Ben Newlin in #1760 2019-07-11 Bogdan-Andrei Iancu * [9ca66c8df] : Fix wrong test (cherry picked from commit c203ddec1e9ffcea5e141fbd03709921ded14c37) 2019-07-11 Liviu Chircu * [3b2586d64] : rest_client: Let libcurl use the system malloc functions The fact that libcurl spawns a thread in order to perform each transfer is well known. Also known was the fact that by instructing libcurl to use the pkg_*alloc() functions, an OpenSIPS worker must synchronize with the libcurl thread before they can both manipulate the PKG pool. Commit 900f6c996c697b was an attempt to solve this, however the fix DOES NOT hold, as it was implemented in that commit (the curl thread is aware of the thread lock while the original process ignores it...). The only way we can make libcurl use the opensips pkg mem allocation functions is by changing pkg_malloc() itself to also grab a thread lock. And this is already too much, as it would unnecessarily slow down the pkg allocator, while the benefits are minimal anyway: what do we stand to gain if libcurl uses our mem pool? Close to nothing. We just let libcurl use the system memory manager (along with as much memory as it wants) and we're done with this issue for good. Fixes #1546 2019-07-11 Liviu Chircu * [04a56fbd7] : rest_client: Make async(rest_put()) do a PUT, not a POST 2019-07-11 Bogdan-Andrei Iancu * [88452327e] : Fix leak due bad free of temporary parsed RR hdr Free the list (of RR body) starting from the original RR body, not from the iterator value (which will be NULL all the time) (cherry picked from commit 2c7449091ef1920ae4d9030061c0992c27dfdb2b) 2019-07-10 Bogdan-Andrei Iancu * [ef30e4f44] : Fix wrong internal mapping for "add_path_received" The mix probably happened durring the upgrade of the module interface. Fixes #1739 (cherry picked from commit 861b4911298b103a6f879922b456a18eeba8fbc7) 2019-07-09 Vlad Patrascu * [ccf3c20da] : clusterer: fix doc example for cluster_send_rpl() 2019-07-09 Vlad Patrascu * [d15c80e49] : tls_mgm: improve docs for the verify_cert and require_cert modparams 2019-07-09 Liviu Chircu * [f418c2a15] : cachedb_local: Fix missing array terminator Fixes #1757 2019-07-08 Vlad Patrascu * [b6914e27b] : cachedb_local: fix call to request_sync() from clusterer api 2019-07-08 Vlad Patrascu * [66969bfcd] : clusterer: improve the seed node mechanism The "seed" node will now revert to a "synced" state after a configurable interval instead of directly form startup. Closes #1591 2019-07-08 Dan Pascu * [1ca0501eb] : Refactored presence/rls configuration for specifying the Contact URI Removed the server_address modparam and replaced it with contact_user. The server_address was used to specify the URI for the Contact header and it was optional for presence but mandatory for rls. The idea of manually locking the Contact URI to a fixed value that is specified in the configuration is non-functional in any setup that involves the proxy listening on more than 1 IP/port/transport combo. In the new model, the only configurable part of the Contact URI is the username part, that can be specified through the contact_user modparam, while the rest of the elements of the URI are automatically determined from the interface where the request was recevied or sent from. 2019-07-08 Dan Pascu * [0cdaff167] : Renamed refreshWatchers to refresh_watchers in documentation 2019-07-08 Dan Pascu * [36b4be987] : Properly set the SI_IS_LO flag on interfaces specified using IPs/hostnames 2019-07-08 Dan Pascu * [61debb389] : Fixed variable name in function call 2019-07-07 OpenSIPS * [52949f490] : Rebuild documentation 2019-07-06 Dan Pascu * [be0d3b7bb] : rls: Cleanup spacing 2019-07-06 Dan Pascu * [a72132832] : rls: Report the actual code that was used in reply 2019-07-06 Dan Pascu * [5692501f8] : rls: Fixed memory leak in rls_handle_subscribe 2019-07-05 Ovidiu Sas * [0a7b4fc3e] : Makefile.defs: increase version to 3.1.0-dev 2019-07-05 Razvan Crainea * [18f8714f2] : proto_smpp: make sure to properly reconnect session Addresses ticket #1728 2019-07-05 Dan Pascu * [eec488d82] : Fixed indentation 2019-07-05 Razvan Crainea * [31b2c8353] : proto_smsc: rebind connection when lost Thanks go to Slava Bendersky for reporting this in ticket #1728 2019-07-05 Razvan Crainea * [ab063d32e] : proto_smpp: add unbind handler Thanks go to Slava Bendersky for reporting this in ticket #1728 2019-07-05 Liviu Chircu * [ca81c501f] : cachedb_local: Improve 'cache_collections' parser The 'cache_collections' modparam parser is now fully tolerant to any kind of whitespace present in the string. Fixes #1424 2019-07-05 Liviu Chircu * [394f57a8d] : {csv.} transformation: Use the lib/csv.h parser Fixes #1220 Closes #1416 2019-07-05 Liviu Chircu * [769ddedf3] : lib/csv.h: Full unit test coverage 2019-07-05 Liviu Chircu * [477d0f678] : lib/csv.h: Add an RFC 4180 CSV parser * also invert the CSV_SIMPLE flag into CSV_RFC_4180 * adjust all calling code to use the new set of parsing flags 2019-07-04 Liviu Chircu * [aa2f534e1] : dialog: Fix broken stats after a restart+reload * the "active_dialogs" and "early_dialogs" stats were broken along with the data reloading move to child_init() * the global helper counters, "active_dlgs_cnt" and "early_dlgs_cnt" are no longer needed 2019-07-04 Bogdan-Andrei Iancu * [d949a7a7b] : [pua_dialoginfo] fix docs for nopublish_flag 2019-07-04 Razvan Crainea * [c29a0d09e] : dialog: fix broken error check in load_dlg_db 2019-07-04 Razvan Crainea * [a105be21b] : acc: store ctx in dialog when starting accounting 2019-07-04 Vlad Patrascu * [668fcbd8c] : bin interface: lower level of irrelevant log message to DBG 2019-07-04 Bogdan-Andrei Iancu * [18c7aad4a] : Fixed missing error reporting. 2019-07-04 Bogdan-Andrei Iancu * [8076cdbdf] : [pua_dialoginfo] Fixed nopublish_flag modparam It seems the parameter (a msg flag) was not migrated to string format. Also the actual test of the flag got lost somewhere during the rework 2019-07-04 Dan Pascu * [39afa5911] : rls: Normalized some spacing (use TABs to indent) 2019-07-04 Dan Pascu * [d4a33111e] : presence: Removed unnecessary goto 2019-07-04 Dan Pascu * [23abe46bc] : presence: Normalized spacing in a few places 2019-07-04 Vlad Patrascu * [40b742256] : clusterer: improve performance of replication packets processing Dispatch through IPC the actual processing of the received replication packets. This prevents bottelnecks in a single TCP process that receives all the BIN packets in high traffic scenarios. 2019-07-04 Razvan Crainea * [2074d7ceb] : cgrates: allow setting NULL variables Close #1750 Thanks go to Vasilios Tzanoudakis for reporting this! (cherry picked from commit 44afc4a159517568007bda25418c80a82e501363) 2019-07-04 Dan Pascu * [d894c5471] : Refactored get_local_contact to accept an optional username argument 2019-07-04 Dan Pascu * [720cf839b] : Fixed test for socket str length 2019-07-04 Dan Pascu * [fa135cf49] : Compacted declaration 2019-07-04 Dan Pascu * [1f8f12c41] : Fixed comment 2019-07-03 Nick Altmann * [83e2ed6e7] : Merge pull request #1751 from razvancrainea/master redhat_fedora: specify cfg_target when installing Thanks Razvan Crainea for patch 2019-07-03 Razvan Crainea * [056e43020] : debian: encourage using MaxMindDB, rather than geoip This way whoever builds the package can choose which lib to install, and the appropriate version of the mmgeoip module will be built. Addresses issue #1618 2019-07-03 Razvan Crainea * [21f3bdb6e] : redhat_fedora: specify cfg_target when installing When installing osipsconsole, we need to know the `cfg_target` to be able to retrieve it later, otherwise it will default to `/usr/etc/opensips.cfg`, which is broken. This addresses #1676 2019-07-03 Razvan Crainea * [b07a82d62] : sql_cacher: nr_columns limitation is 64, not 8 Fix limitation when the number of columns was wrongfuly limited to 8, instead of 64, preventing loading more than 8 columns Thanks go to Bogdan Iancu for spotting this and suggesting the fix 2019-07-02 Razvan Crainea * [a9b238fcb] : mem/rpm: fix double close Reported by Coverity CID #199936 2019-07-02 Razvan Crainea * [9db6556a7] : mem/hp: remove useless debugging 2019-07-02 Razvan Crainea * [0d31e6bd0] : fix stats decremented with unsigned values Reported by Coverity CID #200104, #200030, #200096, #200091, #200090, #200074, #200073, #200049, #200039, #200035, #200032, #200009, #200003, #199998, #199996, #199991, #199988, #199986, #199985, #199982, #199977, #199970, #199964, #199963, #199960, #199952, #199948, #199945, #199941, #199938, #199934, #199923, #199920 #199913, #199900, #199896 2019-07-02 Razvan Crainea * [d8c03f325] : acc: fix leak generated by dialog replicated update 2019-07-02 Bogdan-Andrei Iancu * [b9bcc8390] : Fixed missing reset of current transaction holder The missing reset could lead to wrong access to old transactions when running more than one notification route, one after each other. Credits for reporting and helping with testing go to Ivailo Dobrev (cherry picked from commit 88b84e90145b7582be85793b47b7d0456b98831d) 2019-07-01 Razvan Crainea * [3ddae4344] : dialog: load dialogs on child init 2019-06-30 OpenSIPS * [42f65b1ca] : Rebuild documentation 2019-06-28 Dan Pascu * [b367b7c5d] : tls_mgm: Streamlined reporting of certificate verification errors 2019-06-28 Dan Pascu * [fa2ceb52b] : Fixed handling depth issue for certificate chains that are too long 2019-06-28 Bogdan Andrei IANCU * [0e1164872] : Merge pull request #1738 from varghesepaul/2.4 Do not simply link the buffered lumps, but better clone them -> this … (cherry picked from commit 08d869bf819d77f5cd18c9eb33330c0afd6d86ec) 2019-06-28 Bogdan Andrei IANCU * [7fd7f4b50] : Merge pull request #1743 from rrb3942/isip Add {ip.isip4} and {ip.isip6} convenience transformations 2019-06-28 Bogdan-Andrei Iancu * [b814fe915] : [b2b_entitites] Fix crash on empty To display name. As the To display name may be empty and the DB does not enforce a not NULL, better be ready to read a NULL. This happens when using db_cachedb + cachedb_mongodb as backend Closes #1606 (cherry picked from commit 68aaa20113dcbb12c3123108fbe2cbc11f5e7b82) 2019-06-27 Dan Pascu * [b105886f6] : tls_mgm: Fixed bug where client domains where missing in tls_list MI output 2019-06-27 Dan Pascu * [7f2261764] : tls_mgm: Fixed bug where domain filters were shown under ip address filters 2019-06-27 Liviu Chircu * [71d40f919] : rest_client: Document the TCP connection reusage behavior 2019-06-27 Razvan Crainea * [183072254] : statistics: alocating enough mem for stat name Commit bc9423713 broke statistics because it was no longer alocating space for the name of the statistics. This commit fixes the issue. Thanks go to Maxim Sobolev for reporting this and pointing out the issue! 2019-06-26 Bogdan Andrei IANCU * [a4dfbf5a9] : Merge pull request #1744 from rrb3942/nofork_daemon_error Only report status if in forking daemon mode 2019-06-26 Razvan Crainea * [a5822bc46] : fix clang warnings 2019-06-25 Ryan Bullock * [5ca43f4cc] : Only report status if in forking daemon mode 2019-06-25 Ryan Bullock * [98e29442d] : Add {ip.isip4} and {ip.isip6} convenience transformations for quickly checking if the provided string parses to a valid ipv4/ipv6 network address 2019-06-25 Vlad Patrascu * [82c446d29] : sql_cacher: fix crashes when failing to validate db connections Fixes: #1734 2019-06-25 Razvan Crainea * [1f7af0bdc] : fix various LGTM warnings 2019-06-25 Razvan Crainea * [d27a802f7] : net: handle new WRITE_ASYNC2 in main as well 2019-06-25 Razvan Crainea * [bc9423713] : replace ctime and localtime with safe functions replace ctime and localtime with ctime_r and localtime_r functions 2019-06-25 Razvan Crainea * [26ba59cb8] : topo_hiding: warn when a generated message is malformed Close #1148 2019-06-24 Vlad Patrascu * [f682abe53] : event_virtual: improve docs regarding the failover policy Closes #1510 2019-06-23 OpenSIPS * [0b360b5ec] : Rebuild documentation 2019-06-21 Bogdan-Andrei Iancu * [110b18527] : Revert "Proper error handling in handle_subscribe" This reverts commit ec1889638a9d43280ba1362f6108a175efd4a854. 2019-06-21 Bogdan-Andrei Iancu * [81db9c5ef] : [registrar] Fixed bogus testing of optional parameter 2019-06-21 Bogdan-Andrei Iancu * [4f1c82dfa] : [registrar] Fixed bogus testing of optional paramter Reported by Johan de Clercq 2019-06-21 Liviu Chircu * [cba99632f] : DB URL parser: Avoid double free on missing URL DB On URLs such as: mysql://opensips:opensipsrw@master.naudb.service.consul ... the DB URL parser would perform a double free within the error handling code. Reported by Kirill Galinurov 2019-06-21 Liviu Chircu * [0a8cf7402] : Script: Allow signed integers as module func params This fixes a regression where the behavior of some OpenSIPS 2.4 module functions was restricted in 3.0, e.g. is_from_gw(): In 2.4: is_from_gw("-1", "n", "$var(gw_attr)") # starts OK In 3.0 (without this patch): is_from_gw(-1, "n", $var(gw_attr)) # would fail to start 2019-06-21 Liviu Chircu * [dee8a6a37] : Script: Fix binary string comparisons Addresses the following: $var(ip_1_s) = "[2001:6c8:5e00:1::249]"; $var(ip_1_b) = $(var(ip_1_s){ip.pton}); # Save binary IP to variable $var(ip_2_s) = "[2001:6c8:5e00:1::24a]"; $var(ip_2_b) = $(var(ip_2_s){ip.pton}); # Save binary IP to variable if ($var(ip_1_b) == $var(ip_2_b)) { xlog("Variable saved Binary addresses are EQUAL"); } else { xlog("Variable saved Binary addresses are DIFFERENT"); } Correct result: DIFFERENT. Maybe this should be a unit test somehow. Reported by @vasilevalex Related to #1568 2019-06-21 Vlad Patrascu * [c067cb97f] : dialog: fix processing of sync packets containing known dialogs (cherry picked from commit e85aa14b9d8539800765feec34f97bdc7df3441b) 2019-06-21 Razvan Crainea * [bed0c1198] : dialog: update the dialog with the fixed contact Thanks go to Pete Kelly for reporting the issue in #1625! 2019-06-20 Razvan Crainea * [8eb71e897] : acc: update dialog vars on DLGCB_PROCESS_VARS callback Make sure all variables are updated when a replicated dlg UPDATE packet is received 2019-06-20 Razvan Crainea * [b3e3eec97] : dialog: add DLGCB_PROCESS_VARS callback This callback shall be called every time a replicated packet that includes dialog variables is received. 2019-06-20 Razvan Crainea * [efc8d6cc2] : acc: move ctx in dlg ctx, instead of dlg val 2019-06-20 Razvan Crainea * [ba623053e] : event_route: decrease severity for params fetch 2019-06-19 Razvan Crainea * [31ce92b40] : dialog: fix ctx funcs prototype load 2019-06-19 Razvan Crainea * [4feaca2b0] : dialog: add ctx functions 2019-06-19 Razvan Crainea * [0b3ca526c] : dialog: add context 2019-06-18 Razvan Crainea * [b90567396] : github: add stale bot config 2019-06-18 Razvan Crainea * [81711d51f] : rtpengine: fix media and dtmf block readme 2019-06-16 OpenSIPS * [01a9cde40] : Rebuild documentation 2019-06-14 Bogdan-Andrei Iancu * [33e6dc1bd] : Migrated modules to use shared ip_addr_is_1918() 2019-06-14 Bogdan-Andrei Iancu * [4994276c9] : Added new {ip.isprivate} transformation 2019-06-14 Bogdan-Andrei Iancu * [fac907324] : Added ip_addr based function for testing private IPs. New ip_addr_is_1918(str*) function added, inspired from is1918addr() in nathelper, but reworked to work with ip_addr oriented functions. 2019-06-14 Bogdan-Andrei Iancu * [d02c4f731] : Move str2ip/str2ip6() functions into ip_addr.h file These are 100% ip_addr related functions (for parsing a string into an ip_addr structure), so their place should be in the ip_addr files 2019-06-14 Bogdan-Andrei Iancu * [ec1889638] : Proper error handling in handle_subscribe 1) be sure we send back a 500 reply in all error cases 2) detect the cases of subscription session overlapping (see #1722) 2019-06-13 Bogdan-Andrei Iancu * [b24be3c4d] : Fix missing pointer. Follow up of bcefb6a753a618bed011e3be49a1d1a59ee816a6 remarked by @liviuchircu 2019-06-13 Bogdan-Andrei Iancu * [bcefb6a75] : More fixes on wrong cast for fixup result Credits go to @atrips Related to #1730 2019-06-13 Bogdan-Andrei Iancu * [f48036afe] : Fix wrong cast for fixup result Similar to 2ffe55139290aa3ca3c23a7696ce8541799748e4 Closes #1730 (cherry picked from commit 377df2272a3590248f43ed89a57c278b3b067abd) 2019-06-13 Bogdan-Andrei Iancu * [2fd4ea86d] : Fix wrong cast for fixup result Fix for #1730 (cherry picked from commit 2ffe55139290aa3ca3c23a7696ce8541799748e4) 2019-06-12 Liviu Chircu * [11884b237] : dispatcher: Swap ds_mark_dst() parameters [BACKWARDS-INCOMPATIBLE] In 3.0, ds_mark_dst() had its parameters swapped by mistake, without any real benefit in doing so, both breaking backwards-compatibility and also leading to uglier script, such as: ds_mark_dst(, "p"); This commit simply reverts the function to its previous behavior, addressing both issues above. Hopefully, I don't upset too many people who migrated to 3.0 during this month following the stable release. 2019-06-12 Liviu Chircu * [36a09ee7a] : dispatcher: Fix modparam typo (ds_probing_threshhold) The old version is still kept for backwards-compatibility. 2019-06-12 Bogdan-Andrei Iancu * [ddfd37a0e] : Fix ds_next_xxx() when missing partition param. Flag CMD_PARAM_FIX_NULL is missing Fixes #1731 (cherry picked from commit 905c7f7c165ca26ce6aa14b55979ba98eb93bcce) 2019-06-11 Dan Pascu * [3ae087af7] : [call_control] Refactored code 2019-06-11 Dan Pascu * [3840e3f98] : Send the dialog id instead of h_entry and h_id to mediaproxy 2019-06-11 Dan Pascu * [9a305b676] : Send the dialog id instead of h_entry and h_id to the call control app 2019-06-11 Dan Pascu * [81130bdd7] : Removed unused structure 2019-06-11 Dan Pascu * [edc6057a4] : Use the appropriate format modifier to avoid type casting 2019-06-11 Dan Pascu * [a38c191e0] : Calculate the dialog id as an unsigned value to avoid truncation 2019-06-10 Liviu Chircu * [c0fe97a0e] : mathops: Allow negative operands in math_rpn() 2019-06-10 Liviu Chircu * [72838f24d] : usrloc: Fix missing KV-Store in ul_dump output 2019-06-10 Razvan Crainea * [e2d4c5b7a] : sipcapture: fix load_hep module finding Reported by atrips (on GitHub), close #1727 2019-06-10 Razvan Crainea * [4703d29da] : proto_hep: fix off by one comparison 2019-06-10 Razvan Crainea * [bb072f6fd] : smpp: at least one listener is mandatory for this module Thanks go to Slava Bendersky (volga629 on GitHub) for reporting this Close #1723 2019-06-09 OpenSIPS * [1ba8fda18] : Rebuild documentation 2019-06-08 Nick Altmann * [df1046fee] : packaging/rpm: fix copy-paste error 2019-06-07 Razvan Crainea * [12385b46f] : rtpengine: allow flags to be sent to rtpengine_stop/start_recording 2019-06-07 Razvan Crainea * [1aa3e9be7] : rtpengine: add stop recording functions 2019-06-07 Razvan Crainea * [14b8f4bdc] : rtpengine: add media/dtmf block/unblock functions 2019-06-07 Razvan Crainea * [ac09ece78] : rtpengine: add support for play and stop media Close #1703 2019-06-07 Razvan Crainea * [641e62c2c] : rtpengine: add doc about jitter, roundtrip and packetloss stats 2019-06-07 Răzvan Crainea * [a27d8d15f] : Merge pull request #1726 from john08burke/feature_rtpengine_stats Add support for jitter, roundtrip, packetloss in $rtpstat 2019-06-06 John Burke * [8109e86a5] : feature: add support for jitter, roundtrip, packetloss for $rtpstat 2019-06-06 Nick Altmann * [a4f85cfb6] : packaging/rpm: uuid module packaging 2019-06-05 Liviu Chircu * [8d43873f4] : Fix build on ARM architectures Compiling mod_fix.c In file included from mem/../lock_alloc.h:55:0, from mem/../locking.h:66, from mem/../statistics.h:155, from mem/hp_malloc.h:29, from mem/common.h:46, from mem/mem.h:37, from mod_fix.c:25: mem/../mem/shm_mem.h: In function ‘shm_threshold_check’: mem/../mem/shm_mem.h:250:5: error: ‘shm_block’ undeclared Fixes #1725 2019-06-05 Razvan Crainea * [32cb3d790] : packaging/debian: complete uuid module packaging 2019-06-05 Vlad Patrascu * [033ef1c00] : clusterer: complete fix in commit 69aaa19 2019-06-05 Razvan Crainea * [f2588cae6] : packaging: add uuid module 2019-06-05 Vlad Patrascu * [4ae6e46d6] : uuid: fix missing field in module exports 2019-06-05 Vlad Patrascu * [f9fec46ce] : Add new uuid module 2019-06-04 Vlad Patrascu * [69aaa1904] : clusterer: fix incorrect link state due to pinging race conditions This fix addresses possible races between setting the appropriate link state after sending a ping and receiving the reply. If the reply is received before the pinging process manages to change the link state, we might get stuck in a 'probing' state for the respective node. 2019-06-04 Bogdan-Andrei Iancu * [9f722979e] : Remove old 'uri' module from packaging specs 2019-06-04 Bogdan-Andrei Iancu * [1501fcf39] : Moved sms module as obsolete 2019-06-04 Bogdan-Andrei Iancu * [c94a8a1b2] : Moved seas module as obolete 2019-06-04 Bogdan-Andrei Iancu * [8292659d5] : Removed obsolete file 2019-06-03 Bogdan-Andrei Iancu * [1f787e77e] : [avpops] Fixed missing len duplication Fixed tested and validated this time 2019-06-03 Bogdan-Andrei Iancu * [c51a329af] : Fix FILE stream usage after freeing its buffer. Instead of returning the cfg FILE stream, better directly return the buffer used to build the FILE stream, as anyhow we need a cfg buffer after all 2019-06-03 Bogdan-Andrei Iancu * [7f2e72970] : Revert "Fixed missing len duplication" This reverts commit 764969a0eb06e4ec743ef6302e559a8ab0e80434. Further investigation is needed here 2019-06-03 Bogdan-Andrei Iancu * [764969a0e] : Fixed missing len duplication 2019-06-03 Razvan Crainea * [8ecd8b380] : tm: add anycast cid for locally generated msgs Reported by suharik71 on GitHub Close #1721 2019-06-03 Liviu Chircu * [69e5c8dbf] : httpd: Do not crash on empty-body POSTs 2019-06-03 Razvan Crainea * [5e4a99ee6] : dialog: prevent dlg_onreq from crashing Check if current_context_ptr exists before trying to fetch the dialog Fixes #1719 2019-06-03 Razvan Crainea * [e50a3d3cd] : siprec: reverse the order of t= and c= lines Reported by michaeljdresser on GitHub Close #1720 2019-06-03 Bogdan-Andrei Iancu * [dafa8f6a5] : Accept BIGINT also for table version 2019-06-02 OpenSIPS * [cd7fe92c1] : Rebuild documentation 2019-05-31 Razvan Crainea * [603a49348] : dialog: prevent crash when running in auto-CANCEL mode When auto-CANCEL mode is enabled, the node that receives the replicated CANCEL does not have a processing context, since it is running out of the script context. This patch prevents OpenSIPS from crashing. Reported by Pasan Meemaduma (pasanmdev on GitHub) in #1719 2019-05-31 Bogdan-Andrei Iancu * [5c65090cf] : Revert "Added some auto-debug code for load stats." This reverts commit a2460ee74a4b3b43dd8be787931607cca2896e57. 2019-05-31 Liviu Chircu * [7f14b6a30] : load statistics: Fix a bunch of integer overflow bugs Most of the summed up load statistics were skewed by a factor of 10, due to a series of integer multiplications which was overflowing the 32-bit result holder. load, load1m, load10m before this patch (16 processes, 3 fully loaded): 12 99 9 12 99 9 12 101 10 13 103 10 13 104 10 12 106 10 ... and after: 12 9 0 11 10 1 12 10 1 13 10 1 Fixes #1650 2019-05-31 Liviu Chircu * [0e40f6d46] : load statistics: Fix an unsigned integer underflow bug This integer subtraction bug was leading to occasional, seamlessly random load1m and load10m statistic spikes, for example: 4 2 0 4 2 0 4 3 59 4 3 0 5 3 0 2019-05-30 Liviu Chircu * [022166a51] : Remove all remaining deprecated integer flags Completes commit 382f6e3af688. Thanks to Dan Pascu for spotting this problem! 2019-05-30 Dan Pascu * [53fd3cb66] : Renamed refreshWatchers MI command to refresh_watchers This was the only MI command that used camel-case notation. The refreshWatchers command is still available as an alias, for backwards compatibility, but it is considered deprecated and it will be removed in a future version. 2019-05-29 Liviu Chircu * [e1630a91d] : Use a QA memory allocator by default on the dev branch 2019-05-29 Liviu Chircu * [59f8505d3] : Fix various documentation typos or shortcomings 2019-05-29 Bogdan-Andrei Iancu * [b14e87109] : More removal for opensipsunix hacks will always hunt you back :P 2019-05-29 Bogdan-Andrei Iancu * [cbe2c6509] : [sms] Fixed compiler warning. Even if harmless, make the code consistent and avoid warnings - if using null-terimated functions, be sure you have the space for the the ending NULL. Reported by Dan Pascu ( @danpascu ) 2019-05-29 Razvan Crainea * [80ec779e0] : cgrates: fix resuming function for cgrates_cmd() Reported by Vasilios Tzanoudakis #1713 2019-05-29 Liviu Chircu * [f6ad48444] : rest_client: Update commit a64d411d The input may be an IPv4 buffer, so memcpy() is not the way to go, as we'd segfault immediately in that case. Extending the destination buffer by 1 byte seems to be the cleanest way to solve this warning. 2019-05-29 Bogdan-Andrei Iancu * [de3e16698] : Dropped outdated & useless 'opensipsunix' 2019-05-29 Bogdan-Andrei Iancu * [606f7b38a] : Purging references to fifo_relay 2019-05-29 Bogdan-Andrei Iancu * [56c04d386] : Dropped outdate & useless fifo relay (in php) 2019-05-29 Liviu Chircu * [a64d411d9] : rest_client: Fix string truncation compiler warnings Reported by Dan Pascu 2019-05-29 Liviu Chircu * [d20f163f3] : freeswitch ESL: Fix string truncation compiler warnings esl/src/esl.c: In function ‘esl_recv_event’: esl/src/esl.c:1406:4: warning: ‘strncpy’ specified bound 1024 equals destination size [-Wstringop-truncation] strncpy(handle->last_reply, hval, sizeof(handle->last_reply)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function ‘esl_send_recv_timed.part.6’, inlined from ‘esl_send_recv_timed’ at esl/src/esl.c:1537:27: esl/src/esl.c:1604:5: warning: ‘strncpy’ specified bound 1024 equals destination size [-Wstringop-truncation] strncpy(handle->last_sr_reply, hval, sizeof(handle->last_sr_reply)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from esl/src/esl_config.c:34: esl/src/esl_config.c: In function ‘esl_config_open_file’: esl/src/include/esl.h:43:37: warning: ‘strncpy’ output may be truncated copying 511 bytes from a string of length 1023 [-Wstringop-truncation] #define esl_copy_string(_x, _y, _z) strncpy(_x, _y, _z - 1) ^~~~~~~~~~~~~~~~~~~~~~~ esl/src/include/esl.h:44:32: note: in expansion of macro ‘esl_copy_string’ #define esl_set_string(_x, _y) esl_copy_string(_x, _y, sizeof(_x)) ^~~~~~~~~~~~~~~ esl/src/esl_config.c:72:4: note: in expansion of macro ‘esl_set_string’ esl_set_string(cfg->path, path); ^~~~~~~~~~~~~~ Reported by Dan Pascu 2019-05-29 Bogdan-Andrei Iancu * [decbd1bdd] : [utils] Fixed compiler warning Even if harmless, make the code consistent and avoid warnings - if using null-termiated functions, be sure you have the space for the the ending NULL. Reported by Dan Pascu ( @danpascu ) 2019-05-29 Bogdan-Andrei Iancu * [73c2fe907] : [jabber] Fixed compiler warning. Even if harmless, make the code consistent and avoid warnings - if using null-terimated functions, be sure you have the space for the the ending NULL. Reported by Dan Pascu ( @danpascu ) 2019-05-29 Razvan Crainea * [266a2cf77] : usrloc: fix warnings from casting pointers to uint64 This warning is raised on 32-bits systems Reported by Dan Pascu 2019-05-29 Razvan Crainea * [3e2aed097] : rtpproxy: fix ipv6 handling of timeout socket Reported by Dan Pascu on mailing list 2019-05-29 Razvan Crainea * [566d8d4b1] : rr: fix uninitialized warning 2019-05-29 Vlad Patrascu * [313b3fd5f] : tls_mgm: fix a bug when matching the tls domain When matching a tls connection with a tls domain, use a null terminated sip domain filter string for fnmatch(). 2019-05-29 Vlad Patrascu * [802ee8c79] : clusterer: fix MI commands that dispatch other commands in cluster Adapt 'cluster_send_mi' and 'cluster_broadcast_mi' commands to the new MI interface. 2019-05-29 Razvan Crainea * [c90d251ce] : cgrates: handle inter-mixing of requests and events In case when OpenSIPS sends a request, but before receiving the reply on the same connection, it receives an event, we need to make sure the reply is not marked as completed. Before this fix, when the actual reply was coming back, we no longer had a reply handler, therefore OpenSIPS was crashing. Reported by Vasilios Tzanoudakis (vtzan on GitHub) in ticket #1713 2019-05-29 Liviu Chircu * [382f6e3af] : Remove various deprecated parameters * no longer accept deprecated flag modparams with integer values * tm: remove deprecated "fr_timer" and "fr_inv_timer" modparams 2019-05-29 Liviu Chircu * [eec31bd98] : Makefile.defs: Improve docbook.xsl detection An adaptation of commit faec7ebc9473 which also helps preserve the previous behavior. 2019-05-29 Bogdan-Andrei Iancu * [db8a522aa] : Fix collision in local To-tag generation. Use MD5 on 128 (instead of CRC on 16 bits) for a better dispersion of the To-tag values. Solves problem (1) in #1662 2019-05-28 Bogdan Andrei IANCU * [3ddbbf627] : Merge pull request #1208 from dronord/ora_bigint db_ora: dont trim VAL_BIGINT 2019-05-28 Bogdan Andrei IANCU * [f7e45ba6e] : Merge pull request #1207 from dronord/ora_fetch fix and optimize oracle fetch 2019-05-28 Bogdan Andrei IANCU * [fd1c2f0cb] : Merge pull request #1701 from vitalikvoip/2.4_fix_tcpchild_busy_counter Fix TCP connections load balancing to use all TCP workers evenly (cherry picked from commit 55d95ecae41274fbeafed9b39a6251cbb0aa47b1) (cherry picked from commit 5c3c32d8d19e03cfcf8c8e2a8e5a8cefc3fa2aee) 2019-05-28 Bogdan Andrei IANCU * [a6c9376e7] : Merge pull request #1239 from dronord/ora_integer Oracle NUMBER not NUM in application 2019-05-28 Bogdan-Andrei Iancu * [236d46619] : [proto_tls] Added missing xreflabel in docs 2019-05-28 Bogdan-Andrei Iancu * [e41465513] : Added proto function for extra conn matching. A TCP-based protocol may export an API function for performing extra checks when comes to matching and re-using existing connections. For now the SSL using modules (TLS & WSS) are using the function to perform SSL cert matching, to avoid re-using connections with wrong SSL certificate. Fixes #1651 2019-05-28 Răzvan Crainea * [3ed991ed4] : Merge pull request #1716 from rzerres/makepkg Build on Arch Linux (v3.0.0), bugfix 2019-05-28 Razvan Crainea * [b1b6f814e] : tls_mgm: make unused functions inline 2019-05-28 Alexey Vasilyev * [ad1592408] : Load chain of certificates and all CA certificates from DB 2019-05-28 Razvan Crainea * [154a1560c] : tls_mgm: increase ca_list size Thanks go to Alexey Vasilyev (vasilevalex on GitHub) for reporting it Close #1709 2019-05-28 Razvan Crainea * [d3fa736c0] : pi_http: fix LONGBLOB specification 2019-05-28 Razvan Crainea * [0300eb1d5] : usrloc: fix next hop compute for usrloc with DB Thanks go to Jasper Hafkenscheid (hafkensite on GitHub) for reporting it Close #1710 2019-05-28 Liviu Chircu * [3919f0a8e] : usrloc: Never leave 'pinging_mode' uninitialized When omitting 'working_mode_preset', the 'pinging_mode' would remain uninitialized, possibly leading to future crashes in the contact pinging routine. Thanks to Răzvan Crainea for catching this! 2019-05-28 Dan Pascu * [0d3794f1b] : More fixes for MI implementation errors 2019-05-28 Vlad Patrascu * [c6a664302] : python, lua, perl: fix calling of module functions with regex params 2019-05-28 Vlad Patrascu * [f55b453a8] : perl: fix calling of script module functions from perl code 2019-05-28 Vlad Patrascu * [4b43ab524] : lua: fix calling of script module functions from lua code 2019-05-28 Vlad Patrascu * [0cd1b9f1a] : lua: fix function param buffers size in lua_exec() 2019-05-28 Vlad Patrascu * [385d7c36c] : python: fix calling of script module functions from python 2019-05-28 Dan Pascu * [51719c77e] : Fixed MI address_dump function 2019-05-28 Razvan Crainea * [149e69e3f] : tls_mgm: make sure pthread locking has SHARED support Prevent system lock when using openssl 1.1, that is using phreads as syncrhonizing mechanisms. Close #1590 2019-05-28 Dan Pascu * [394409a05] : Fixed travis error 2019-05-28 Dan Pascu * [8f49a55c0] : Use the size_t modifier to avoid an unnecessary cast 2019-05-28 Dan Pascu * [dfc4a8fa9] : Fixed a few more warnings on 64 bit platforms 2019-05-28 Dan Pascu * [66f0f6056] : Fixed some compilation warnings 2019-05-28 Bogdan-Andrei Iancu * [04be3350b] : Fixed compile error with SHM_EXTRA_STATS. Variable mismatch introduced with commit 24b0735076c20464f22047201674f78d184d72ee0 2019-05-28 Bogdan-Andrei Iancu * [a8a1c077c] : Fixed handling of unset socket parameter. 2019-05-28 Bogdan-Andrei Iancu * [862a9ea2d] : Revert "tm: Fix crash in t_uac_dlg (uninitialized stack var)" This reverts commit 061b7584d3b132eddb74472050ea20cc8ed0478c. 2019-05-28 Dan Pascu * [74ff59dc0] : Be consistent with comments, spacing and NULL values 2019-05-27 Ralf Zerres * [6f577a9a9] : doxygen: update config handling - comment out obeolete tags (as of doxygen v1.8.15) - update element list (include new objects, remove obsolete objects) - align in alphabetic order (decending) 2019-05-27 Ralf Zerres * [faec7ebc9] : Makefile.defs: adapt default settings for XSL parser 2019-05-27 Ralf Zerres * [f9dcc4be9] : opensips_json_c_helper.h: fix preprocessor definition on __amd64__ - json.h moved to system include subdir json-c (json-c v0.13.1) 2019-05-27 Ralf Zerres * [30f574194] : osp: Fix module compilation - missing header (route_struct.h) - typo in array definition cmds[] 2019-05-27 Ralf Zerres * [53f74790c] : packaging: supporting arch-linux - PKGBUILD.git: install package from github branch "master" Split packages for opensips (core,parser), modules and documentation - Makefile.conf.template: adopt and customize for linux environment - systemd: include service and tmpfiles - opensips.install: run script after package is installed on target system 2019-05-27 Liviu Chircu * [216bf4df0] : tm: Refactor code to use bulk shm operations 2019-05-27 Liviu Chircu * [3a921cc37] : shared memory: Add support for bulk operations This patch adds the following functions: * shm_malloc_bulk() * shm_free_bulk() Their purpose is to minimize contention, in situations where the developer needs to perform lots of consecutive shared memory operations. In this case, their usage is as follows: shm_lock(); shm_malloc_bulk(); shm_malloc_bulk(); ... shm_free_bulk(...); shm_malloc_bulk(); shm_free_bulk(...); ... shm_unlock(); 2019-05-27 Liviu Chircu * [24b073507] : shared memory: Fix unsafe shm_free() when debugging When HP_MALLOC was included in the build, the F_MALLOC_DBG and Q_MALLOC_DBG allocators were broken, since their shm_free() operation was purely lockless and could corrupt the memory at any time. 2019-05-27 Liviu Chircu * [4bd078f11] : rpm memory: Fix rpm_free() locking * fix "shm_unlock()" copy-paste error * the ifdefs are unnecessary, as the rpm_lock/unlock macros do exactly that 2019-05-27 Liviu Chircu * [6ecd6bfbb] : shm: Remove unused/deprecated functions 2019-05-27 Razvan Crainea * [1880111a3] : tls_mgm: initialize mem functions asap Initialize the memory functions as soon as possible to prevent any other module that uses openssl to use the default ones. Fix #1114 #21 #1708 2019-05-27 Razvan Crainea * [c6fb6c960] : add function that is ran after loading a module 2019-05-27 Dan Pascu * [59ba0f7aa] : Return statistics as numbers 2019-05-26 OpenSIPS * [e7770a97a] : Rebuild documentation 2019-05-24 Liviu Chircu * [1dae7c50f] : opensips -h: Update the help message with the 3.0 additions 2019-05-24 Liviu Chircu * [a977a1c34] : core: Add new parameter ('pv_print_buf_size') This setting will be useful in case large bodies of text need to be expanded during a pseudo-variable format printing. For example: avp_db_query("SELECT $var(columns) FROM $var(table)", $avp(result)); ^ before this commit, the output of this format was capped at 1024 bytes Closes #1659 2019-05-24 Liviu Chircu * [52f576269] : packaging: Allow specifying custom options with Debian systemd (cherry picked from commit e83a116c179ff8be04e8976a21a94aad6730d97e) 2019-05-24 Nick Altmann * [63d53ddd9] : Fix packaging (remove opensipsdbctl manpage) 2019-05-23 Bogdan-Andrei Iancu * [929c854b0] : Store in TCP conns the real ephemeral port and not the listening port Related to #1692 2019-05-23 Bogdan-Andrei Iancu * [d6a663f9b] : Trace the real ports (from IP level) instead of SIP level ports As the TCP based ops may report different ports at IP level versus SIP level, trace (if available) the IP level information. Related to #1692 2019-05-23 Bogdan-Andrei Iancu * [9dde6d5f0] : Expose the real ports (src/dst) used by TC-based write op As src/dst ports may be ephemeral, expose (via holders in socket_info struct) the real used ports during the last write operation Related to #1692 2019-05-23 Liviu Chircu * [d39f07d65] : tm doc: Fix broken t_uac_dlg example 2019-05-23 Liviu Chircu * [869a78eef] : tm t_uac_dlg: Un-escape CRLF input from the "headers" param 2019-05-23 Liviu Chircu * [061b7584d] : tm: Fix crash in t_uac_dlg (uninitialized stack var) 2019-05-23 Razvan Crainea * [a3eda1b13] : proto_ws: build GET Host header based on destination IP and port Thanks go to Bogdan Iancu for spotting this 2019-05-23 Razvan Crainea * [ba8196685] : siprec: fix documentation to align with b6f2f84baa In commit b6f2f84baa58e15baee43879308458bf38165b64 the signature of the `siprec_start_recording` function was changed - instead of specifying the rtpproxy set, now the function receives the rtpproxy node used for that call. This commit fixes the documentation for that. Thanks go to solarmon(GitHub) for reporting this in ticket #1664 2019-05-23 Bogdan-Andrei Iancu * [dbdf02fc1] : Better naming of attributes in tcp_list_conns output Replace Source/Destination with Remote/Local, to be easier to understand 2019-05-23 Bogdan-Andrei Iancu * [a7791a6d8] : Be consistente - take IP and Port from the same structure. As we replicate the socket, take the listening port from the socket. The DST port should reflect the IP layer, where you may have an ephemer port. 2019-05-23 Liviu Chircu * [8a7abc051] : Drop support for opensipsctl/opensipsdbctl These tools have been superseeded by the Python3-based opensips-cli. 2019-05-23 Bogdan-Andrei Iancu * [af2bd1db8] : Fix choosing the IP:port to used when building PAI Instead of searching by port (which mya trigger false positive), better use the bind interface used for receiving the request 2019-05-23 Razvan Crainea * [cbd2e48e9] : rtpproxy: invalidate buffer when malformed data is received Reported by gcuppers(GitHub) Close #1657 2019-05-23 Liviu Chircu * [fec5c1dc2] : Add 2.4 -> 3.0 MySQL DB migration scripts 2019-05-23 Razvan Crainea * [739853968] : tracer: always try to load HEP protocol, if available 2019-05-22 Liviu Chircu * [71465a56b] : Revert "dialog: suppress error in case SDP does not exist for the leg" This reverts commit 8fdb2eb8b68ecb70b128a2d1bc9135a05689f4bf. 2019-05-22 Liviu Chircu * [2af6cef24] : str_strcmp: Silence noisy log 2019-05-22 Vlad Patrascu * [d3bc0e256] : dialog: fix behavior of is_in_profile() if no value is passed The function should also return true when a dialog does belong to a profile with values but no value is passed to reinforce the check. 2019-05-22 Bogdan-Andrei Iancu * [2ba271c6d] : Fix the returning if local route does not exist while doing RPC 2019-05-22 Razvan Crainea * [8fdb2eb8b] : dialog: suppress error in case SDP does not exist for the leg 2019-05-22 Bogdan-Andrei Iancu * [c61278bf0] : Revert "dialog: send dlg command using rpc" This reverts commit ef9de0173f66727488e75d11e341d6b90b8fcf9a. This is not necessary as the RPC for local route is now done internally by t_uac() 2019-05-22 Bogdan-Andrei Iancu * [620fe1025] : Reverted d13f3eb61764a9246542f37b72482f2b27a0aaf2 Running local route via RPC is now supported intenally by t_uac() 2019-05-22 Bogdan-Andrei Iancu * [234a93e49] : Re-implement t_uac() to do RPC if local_route cannot be locally run IF triggered from MI or non-SIP processes, the t_uac() cannot run local route (as such procs do not have the script anymore). Instead of various fixes in different parts of code / modules, let's address the problem internally in t_uac() - if needed and script is not available, run local route via RPC (while doing busy waiting) 2019-05-22 Bogdan-Andrei Iancu * [b7b915117] : Fixed some optional params for t_uac_dlg Side effect of the previos reverting 2019-05-22 Bogdan-Andrei Iancu * [e3a1b7c9b] : Revert the commits for RPC-zing the t_uac_dlg Reverted commits: 7df5d5e9ccd639a9f6035e64dadbc1e6b8a71758 8883a7c6caac5b4bed228381e2d64f53d7364b81 d0a043e89b2cdde1131a336964c0ade079269b4c The RPC-zing will be added internally to t_uac() function, transparent for the code using it. 2019-05-22 Razvan Crainea * [295a5842d] : rtpproxy: engage late negociation even after call is established Thanks go to spacetourist(GitHub)/Callum Guy for reporting this Close #1702 2019-05-22 Liviu Chircu * [fa651ce59] : dialog: Fix some buffer management bugs 2019-05-22 Razvan Crainea * [bb5b0c9e8] : mi: remove id from shm response This fixes asynchronous commands that store the id in the response as system allocated, but after that they are released as shm. This bug was afecting the mi_http fifo backend. 2019-05-22 Liviu Chircu * [65ae04c89] : dialog: Do not replicate CSeq changes w/o a cluster 2019-05-22 Bogdan-Andrei Iancu * [997096275] : Fix usage of buffered RR lumps Do not simply link the buffered lumps, but better clone them -> this will avoid a mixage of lump types (shm versus pkg) when using async() Fix for #1683 (cherry picked from commit 4bca4792d6543dfde5f472b158878942223625e8) 2019-05-21 Bogdan Andrei IANCU * [91e9d4d81] : Merge pull request #1699 from taozhiying/patch-1 LB will always to one dst when use lb_next (cherry picked from commit 2dd76a784450be9f85a18237c54a0b9fe945100b) 2019-05-21 Razvan Crainea * [ef680f665] : tm: run TMCB_REQUEST_BUILT before sending msg Althought this was initially documented as being ran before sending the message out, this callback has been moved *after* the message is sent. Therefore it can generate some concurrency issues in the dialog, when a reply is received faster than the outgoing leg would have been updated. 2019-05-21 Razvan Crainea * [46877f2ac] : dialog: duplicate out SDP when cloning a leg also, make sure the src_leg is used *after* enlarging the dialog legs, otherwise it might remain dangling 2019-05-21 Razvan Crainea * [815601872] : tm: specify sent buffer for TMCB_PRE_SEND_BUFFER Make sure we have access to the sent buffer in the TMCB_PRE_SEND_BUFFER tm callback. 2019-05-21 Bogdan-Andrei Iancu * [a2460ee74] : Added some auto-debug code for load stats. Track if the computed load is higher than 100% and dump various internal data. Related to #1650 2019-05-21 Bogdan-Andrei Iancu * [0a5674071] : Fixed bogus "return" in LOAD computing macro This affected only the 1 minute statistic. (cherry picked from commit af4d8479d3e2902019a9d209690362075c9120d9) 2019-05-21 Razvan Crainea * [56c4b0964] : dialog: unref dialog after updating cseq 2019-05-21 Bogdan-Andrei Iancu * [d4c46def9] : Fix incomplete interation Do not abort the interation on error, but skip and continue with the next elements / subscriptions. 2019-05-20 Vlad Patrascu * [27507331d] : clusterer: add mising optional param flag for cluster_check_addr() Closes #1693 2019-05-20 Liviu Chircu * [6bf972ce5] : cachedb_redis: Do not leak pkg mem on exceptional cases In case the driver returned unexpected data, the Redis raw query function would leak pkg memory. 2019-05-20 Liviu Chircu * [499f0f321] : cachedb: Improve variable naming Make it more obvious that we're dealing with a rows x columns matrix. 2019-05-20 Razvan Crainea * [9d48ebc56] : clusterer: make sharing tag output array 2019-05-20 Vlad Patrascu * [ad1232d21] : cachedb_cassandra: use extensible buffers for query strings This fixes errors caused by queries being truncated becuase of the small static buffers that were previously used. Closes #1696 2019-05-20 Liviu Chircu * [e66486fbd] : AVP printing: Properly print NULL AVP fields AVPs such as ["foo", NULL, "bar"], which are only made possible by a few select modules (e.g. Redis) were crashing in $(avp(foo)[*]). 2019-05-20 Vlad Patrascu * [217d3fc67] : clusterer: remove the 'Enabled' filed from clusterer_list output 2019-05-19 OpenSIPS * [939ee2cb8] : Rebuild documentation 2019-05-17 Liviu Chircu * [0dcbf9eed] : statistics: Improve iteration example Clarify a hidden gotcha: the stat name iterator does not include the stat group! 2019-05-16 Vlad Patrascu * [984208549] : clusterer: docs: fix outdated output examples for mi commands 2019-05-16 Bogdan-Andrei Iancu * [bf130c524] : Un-butcher the custom reason string for 100 SIP reply Closes #1670 2019-05-16 Bogdan-Andrei Iancu * [9c960bba4] : Do Trasaction post script updates only if method matches A translation of PR #1678 done by @rrb3942 Closes #1678 Closes #1669 2019-05-16 Bogdan-Andrei Iancu * [20be5febe] : Fix setting var to NULL on each iteration Closes #1697 Credits go to @razvancrainea 2019-05-16 Razvan Crainea * [fb20eed07] : dialog: initialize dst_leg before getting dlg 2019-05-16 Razvan Crainea * [130e70421] : dialog: add replication for cseq updates 2019-05-15 Bogdan-Andrei Iancu * [9703aa8c1] : Fix bogus offsetting in BIN package 2019-05-15 Bogdan-Andrei Iancu * [801405643] : Fix missing arming of re-invite pinging for replicated dialogs 2019-05-15 Razvan Crainea * [63a8cf3f6] : dialog: fix bogus operation introduced in previous commit Thanks go to travis and clang for spotting it :) 2019-05-15 Razvan Crainea * [c7b46c88d] : dialog: add contact on second leg of challenge 2019-05-15 Vlad Patrascu * [1144de0ef] : clusterer: fix output of clusterer_list_topology mi command 2019-05-15 Razvan Crainea * [40a1e5aba] : dialog: update inbound body on request and replies 2019-05-15 Vlad Patrascu * [c5638e9bb] : dialog: do not accept replicated counters for local profiles 2019-05-15 Razvan Crainea * [ba7186fdb] : dialog: provide content type for MI generated sequentials 2019-05-15 Razvan Crainea * [ef9de0173] : dialog: send dlg command using rpc 2019-05-15 Razvan Crainea * [37cf3c13b] : dialog: advertise proper contact when generating sequential 2019-05-15 Bogdan-Andrei Iancu * [c5d60c815] : Fixed updating replicating advertised contact In a TH scenario, during the dialog replication, the advertised contact may change, if the interface/socket has a different name than on the original server (due tagging, advertising, etc) 2019-05-15 Bogdan-Andrei Iancu * [80479f53d] : Fixed testing wrong flags for TH status 2019-05-14 Vlad Patrascu * [40ccbf9ca] : dialog: improve performance of replicated profiles Improve the performance of operations with replicated profiles (increment/decrement, get count) by avoiding the traversal of a list of counters proportional with the number of dialogs. This patch mostly impacts profiles with value. 2019-05-14 Razvan Crainea * [58a1e1bb4] : tracer: use a valid info when tracing messages This commit prevents a crash when tracing a message without having a dialog or transaction created. Thanks go to Konrad Malewski (gitkoyot on GitHub) for reporting this! Close #1695 2019-05-14 Dan Pascu * [1e14844dd] : Fixed list_statistics MI command 2019-05-14 Bogdan-Andrei Iancu * [58343d45a] : Fixed missing replication for the adv_contact This affected clustering scenarios where dialog module is used with Topo-Hiding and re-Invite pinging - the contact of the re-INVITE pings will be wrong on the nodes receiving the replicated dialog 2019-05-14 Bogdan-Andrei Iancu * [bab898eb3] : Add adv_contact ONLY if it is a local contact Extract the outgoing contact and store it as adv_contact ONLY is a self-point contact resulted from Topo Hiding. 2019-05-13 Vlad Paiu * [142957c2c] : Fixed send_smpp_message breaking script It now returns a proper return code, as per the doc (cherry picked from commit 455066ffac75611c5aa0bd6e24c4998194b0d577) 2019-05-13 Vlad Paiu * [7df5d5e9c] : Fixed t_uac_dlg body sending (cherry picked from commit 3bb6a07a0304bc93a2b5ecf64a706675829413d0) 2019-05-13 Vlad Patrascu * [d721a9423] : dialog: fix a crash when removing dialog from profile Do replicate counter structure deletion if the profile is not shared. 2019-05-12 OpenSIPS * [f6d0f927c] : Rebuild documentation 2019-05-12 Razvan Crainea * [ce7df8ac6] : dbtext: use python2 explicit shebang This is needed for Fedora 30. Reported by Nick Altmann 2019-05-10 Ovidiu Sas * [9d7ac44d9] : db_text: avoid buffer overflow for large names and/or values in db_text files 2019-05-10 Vlad Paiu * [586311771] : Fixed crash in case there's no SMPP connection (cherry picked from commit ea01bba7a6f13fbc697619babb90af202b4e73df) 2019-05-10 Vlad Paiu * [2497e12f5] : Add rabbitmq_consumer to the list of default excluded compilation (cherry picked from commit 7b23c14cf472c8ebbcec79f3d258ffe8b45596c4) 2019-05-09 Razvan Crainea * [deafdb7f4] : tm: prevent concurrency between different cleanup This fixes a problem that was happening when having a transaction that wasn't fully updated, for example in a Push Nofitication scenario where no t_relay() was made, multiple messages may have reached the do_t_cleanup() function in parallel, both updating the transaction. Reported by 46Labs 2019-05-09 Vlad Patrascu * [3d081c88f] : dialog: extend the fix in commit 3abb14d to profiles without value 2019-05-08 Vlad Patrascu * [0256fadcc] : Complete the fix in commit: 3abb14d 2019-05-08 Vlad Patrascu * [3abb14d6e] : dialog: fix a bug in local profiles counting Fix the counting of local profiles with value when profile replication is active. Altough the /b profiles were counted correctly, the same mechanism would be aplied also for other profiles that were not shared, resulting in a bad value. 2019-05-07 Vlad Patrascu * [6816fa91d] : textops: fix subst() functions fixups when using the '$' character 2019-05-07 Vlad Patrascu * [52d1ac41f] : Never pv-expand regex type function parameters 2019-05-07 Vlad Patrascu * [307e8c8ad] : Fix the CMD_PARAM_NO_EXPAND parameter flag The fixup of parameters flagged wih CMD_PARAM_NO_EXPAND would fail if the string contained a '$' character not followed by a valid variable. 2019-05-06 Liviu Chircu * [206af742f] : Preprocessor: Proper fix for the issue behind f1fb2bd339 The actual issue was related to the fact that most stream-oriented GNU tools (cat, sed, m4, etc.) work by managing a continuous flow of reads from the input source and writes to the output one, until the input file ending is reached. This technique allows large amounts of data to be transformed without requiring any intermediary, equally large buffers. This patch creates the matching write/read looping logic into OpenSIPS, as it both feeds these preprocessing tools with the config file input, and consumes their output, unlocking them to process more bytes. Thanks to Răzvan Crainea for spotting the problem! 2019-05-06 Vlad Patrascu * [9014550fa] : opensipsdbctl: fix tracer module name in EXTRA_MODULES var 2019-05-06 Liviu Chircu * [f06f948de] : Fix build on CentOS 6.x Reported by Nick Altmann 2019-05-05 OpenSIPS * [76c9d9f8a] : Rebuild documentation 2019-05-03 Vlad Patrascu * [27b899be0] : dispatcher: fix replication of the probing state 2019-05-03 Vlad Patrascu * [89127cc95] : statistics: fix crash in update_stat(), reset_stat() 2019-05-02 Dan Pascu * [08cff3486] : Revert "tracer: always load the trace api" This reverts commit 779130478937fe92fcac145205dc4039c1126772 which forced one to load proto_hep and define at least 1 listener for it even when HEP was not used, in order to have the tracer module load. 2019-05-02 Dan Pascu * [216dc40a0] : Fixed error in handling fcntl's output (which is an int) 2019-05-01 Liviu Chircu * [f1fb2bd33] : preprocessor: Improve handling for large input files Reported by Vasilios Tzanoudakis 2019-05-01 Liviu Chircu * [03de04f29] : preprocessor: Fix off-by-one buffer overflows Reported by Dan Pascu 2019-05-01 Dan Pascu * [0e1d4f341] : sipmsgops: Fixed is_present_hf for non-standard headers 2019-05-01 Dan Pascu * [cadac89b4] : aaa_radius: Added back aaa_bind_api to the command interface 2019-05-01 Razvan Crainea * [779130478] : tracer: always load the trace api 2019-05-01 Răzvan Crainea * [6f5d7953e] : Merge pull request #1684 from fgast/fix-typo-opensips_cfg Remove quotes breaking default config 2019-05-01 Nick Altmann * [30373dcf5] : DEB packaging: remove m4 support 2019-05-01 Nick Altmann * [01afc2284] : RPM packaging: remove m4 support 2019-04-30 Dan Pascu * [67a1a0218] : group: Fixed buffer overflow caused by missing end structure marker 2019-04-30 Dan Pascu * [04175e572] : Allow specifying auto scaling profile with udp_workers 2019-04-30 Dan Pascu * [80ce8f988] : Fixed typos 2019-04-30 Fabian Gast * [9f2b776b2] : Remove quotes breaking default config 2019-04-29 Razvan Crainea * [57e4d5913] : dialog: update SDP under lock 2019-04-28 OpenSIPS * [6e337818b] : Rebuild documentation 2019-04-26 Razvan Crainea * [5c7dd8ab8] : tm: proper return code for replicated CANCEL Thanks go to 46Labs for reporting this 2019-04-26 Razvan Crainea * [9f050c95f] : tm: fix CANCEL replication when CANCEL is malformed Thanks fo to 46Labs for reporting this 2019-04-25 Bogdan-Andrei Iancu * [d5b137006] : Fix wrong quoting on integer parameter 2019-04-25 Vlad Patrascu * [03e18087b] : Remove leftover commented code in several modules 2019-04-25 Vlad Patrascu * [e456ddd81] : Align docs to latest changes in module functions parameters 2019-04-25 Vlad Patrascu * [26ab860aa] : proto hep: fix parameters in correlate() cmd export 2019-04-24 Liviu Chircu * [b7af3d764] : TCP: Fix confusing log on connect timeout 2019-04-24 Liviu Chircu * [6539bae74] : Merge pull request #1680 from wdoekes/fix-mantainer-typo Fix mantainer-clean -> maintainer-clean typo 2019-04-24 Walter Doekes * [884f63053] : Fix mantainer-clean -> maintainer-clean typo 2019-04-24 Liviu Chircu * [1a38e8dc3] : Merge pull request #1674 from wdoekes/fix-compiler-warnings Work around a few poor compiler warnings 2019-04-24 Bogdan-Andrei Iancu * [388ab01b5] : Fixed counting of extra UDP procs when UDP is not used Reported by Konrad Malewski 2019-04-24 Liviu Chircu * [2f2ba235a] : cachedb URLs: Complete commit 887f9f0e032 * do not parse "schema://host:port/" as "" database (keep it NULL) (otherwise, this breaks Redis) * do not treat similar URLs with differing options as the same URL * pkg_free() the options chunks at shutdown Reported by Ryan Bullock Fixes #1677 (cherry picked from commit f1c5a7ea3c1c441262580de768197d53e6ddb9dc) 2019-04-23 Vlad Patrascu * [5bb4e9c8f] : rtpproxy: fix parameter types for rtpproxy_stream2uac/uas() 2019-04-23 Vlad Patrascu * [db0a391e1] : rtpengine: fix parameter type for rtpengine_start_recording() 2019-04-23 Razvan Crainea * [daaf39059] : tracer: complete fix for previous crash 2019-04-23 Walter Doekes * [94c50b781] : Work around a few poor compiler warnings Like: dlist.c: In function ‘get_all_ucontacts’: dlist.c:759:37: error: ‘next_hop_host’ may be used uninitialized in this function [-Werror=maybe-uninitialized] And: In function ‘memcpy’, inlined from ‘get_domain_db_ucontacts’ at dlist.c:294:4: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: error: ‘__builtin_memcpy’: specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=] And one probable bug: b2b_logic.c: In function ‘mi_b2b_list’: b2b_logic.c:1548:10: error: ‘server_item’ may be used uninitialized in this function [-Werror=maybe-uninitialized] ^- should be client_item 2019-04-23 Vlad Patrascu * [f0dae1101] : b2b_logic: fix first parameter fixup for b2b_init_request() Thanks to Konrad Malewski for reporting 2019-04-23 Liviu Chircu * [95edbd2c8] : usrloc: Fix compiler warning dlist.c: In function ‘get_all_ucontacts’: dlist.c:750:37: error: ‘next_hop_host’ may be used uninitialized in this function [-Werror=maybe-uninitialized] ((struct proxy_l *)cp)->name.s = next_hop_host; ^ 2019-04-23 Liviu Chircu * [28a31887b] : cachedb_mongodb: Improve connection string examples * give a "connecting to a replica set" example * better highlight the "engine:group://" syntax 2019-04-23 Liviu Chircu * [a22c37e81] : group: Align docs to latest changes 2019-04-23 Razvan Crainea * [b80478b80] : tracer: prevent crash when tracing context is not created 2019-04-23 Bogdan-Andrei Iancu * [3954e0da5] : Updated copyright years (cherry picked from commit 39cc3f96d9f320b42455d1c456114c81b0e799f1) 2019-04-23 Bogdan-Andrei Iancu * [1fee8260f] : Fixed copy paste error in DB schema section name (cherry picked from commit c15abd769101eb517bedc9a9c544574af975b53f) 2019-04-23 Bogdan-Andrei Iancu * [6c0cb7ee3] : Removed empty DB schema section Related to #1672 (cherry picked from commit 116860e458a717123ff48e77af12fb34723cf2f3) 2019-04-23 Vlad Patrascu * [07b476b05] : ratelimit: fix parameter type for rl_check() 2019-04-22 Liviu Chircu * [a8fe40dcb] : acc, alias_db, auth_db: Align docs to latest changes 2019-04-22 Liviu Chircu * [f1ba403e1] : auth_aaa, carrierroute: Align docs to latest changes 2019-04-22 Liviu Chircu * [085dbc18e] : avpops, exec: Align docs to latest changes exec: also remove some deprecated (and unused code) 2019-04-22 Dan Pascu * [09edd15c9] : enum: Reworded description in documentation 2019-04-22 Liviu Chircu * [a1da98cb1] : enum: Move the "number" optional parameter last This preserves the backwards-compatibility of enum_query(). Additionally, "number" is the least used of the optional paramters, so it makes more sense for it to go last. Suggested by Dan Pascu 2019-04-22 Liviu Chircu * [687b3e4c3] : cfgutils, json: Align docs to latest changes 2019-04-22 Dan Pascu * [b35cf3585] : Changed log message from info to debug 2019-04-21 OpenSIPS * [8fe40e67d] : Rebuild documentation 2019-04-20 Liviu Chircu * [4b33da67f] : lexer: Fix multi-line string parsing Multi-line strings were broken by the generic preprocessing support, as both double and single quoted strings have their own lexing rules, which take precedence over the "consume preprocessor tokens" lexer rule. Reported by Dan Pascu 2019-04-19 Liviu Chircu * [9d8286170] : cachedb_mongodb: Allow specifying URL options This patch allows script writers to append essential connect string options near the end of a cachedb_mongodb URL, such as: * ?replSet=mongo-set-1 * ?readConcernLevel=local Consult the MongoDB connect string docs for a full listing of available URL options. Reported by Vasilios Tzanoudakis Fixes #1656 (cherry picked from commit 887f9f0e032da4bf092540cb92369a6daee90ffa) 2019-04-19 Vlad Patrascu * [32d3163d9] : usrloc: update docs regarding supported NoSQL databases 2019-04-19 Razvan Crainea * [3b83d36c9] : mem: trigger error when setting pkg allocator with sys malloc 2019-04-19 Razvan Crainea * [3b196a9da] : tracer: fix module to allow multiple trace instances 2019-04-19 Dan Pascu * [67374892a] : Fixed some typos 2019-04-19 Nick Altmann * [d44576598] : RPM spec: fix bogus date 2019-04-18 Liviu Chircu * [dd16f66fa] : emergency docs: Fix misclosed section 2019-04-18 Liviu Chircu * [3e21553e7] : enum: Significant cleanup * merge enum_pv_query() into enum_query() * fix potential segfaults in all functions (due to param migration) * bring the docs up-to-date 2019-04-18 Vlad Patrascu * [f5875b575] : load_balancer: fix parameter type in lb_start() command export 2019-04-18 Dan Pascu * [24c5d8298] : Fixed segfault when updating stats in _stop_expire_timer 2019-04-18 Razvan Crainea * [63984dedc] : dialog: add documentation for dlg_send_sequential 2019-04-18 Dan Pascu * [3a6ad9a08] : enum: Fixed function name 2019-04-18 Liviu Chircu * [531a7225e] : mem: Fix typos 2019-04-18 Razvan Crainea * [e82dbdeff] : mem: allow func_mem usage for system malloc too Reported by Dan Pascu on Devel user list 2019-04-18 Liviu Chircu * [8e42ffaa4] : dialog: Fix uninitialized variable This patch prevents broadcast_profiles() from sometimes starting off by broadcasting an empty packet (should it read a large, positive integer off the stack garbage), then proceeding normally. Reported by Bogdan-Andrei Iancu 2019-04-18 Liviu Chircu * [6929c4ad5] : usrloc: Fix a bug in MI "ul_dump" output structure When the code was ported to the new MI interface, the AoR KV-Store ended up being moved to the wrong place, effectively crashing on 0 contacts. 2019-04-17 Nick Altmann * [98f3c69a5] : RPM spec: rabbitmq_consumer module 2019-04-17 Dan Pascu * [f2c9ed676] : Moved rabbitmq_consumer module to the opensips-rabbitmq-modules debian package 2019-04-17 Vlad Patrascu * [4af34c03e] : Fix bad modparam names and doc examples caused by mi modules rename 2019-04-17 Dan Pascu * [2ede3c099] : Compacted structure initialization 2019-04-17 Dan Pascu * [f9e2a4284] : Debian priority Extra was replaced by Optional 2019-04-17 Dan Pascu * [57f16c969] : Removed unnecessary line continuation 2019-04-17 Dan Pascu * [8138d8740] : Removed opensips-console debian package from control file 2019-04-17 Razvan Crainea * [42872fafb] : packaging: bump all the other versions to 3.1 Thanks go to Dan Pascu for reporting this 2019-04-17 Dan Pascu * [b569899cc] : Updated documentation with new function signatures 2019-04-17 Dan Pascu * [16855cfd9] : Compacted structure 2019-04-17 Dan Pascu * [2f18c51aa] : Be consistent with comment format 2019-04-17 Dan Pascu * [60477618b] : Updated copyright 2019-04-17 Dan Pascu * [dd6ec9e4f] : Removed commented out code 2019-04-17 Dan Pascu * [539ee1544] : Fixed signatures for system memory allocator functions 2019-04-17 Liviu Chircu * [0b592f7fe] : tracer: Fix doc build 2019-04-16 Razvan Crainea * [97b21e0ea] : scripts/opensipsdbctl.mysql: migrate tls_mgm table 2017-12-21 dronord * [d2542c033] : db_ora: val.c - fix OCI NUMBER 2017-12-21 dronord * [30c6f5b7a] : db_ora: res.c - fix OCI NUMBER 2017-12-21 dronord * [dd4a6a8d9] : db_oracle.c fix indentation 2017-11-03 dronord * [abfd5aae0] : db_ora: dont trim VAL_BIGINT 2017-11-03 dronord * [84f6e418f] : db_ora: optimize fetch of large amount rows by OCI_ATTR_PREFETCH_ROWS 2017-11-03 dronord * [a65f53dab] : db_ora: alg: fetch OCI_FETCH_LAST, then from down to up by OCI_FETCH_PRIOR.