=========================== Release 2.4.6 ============================== 2019-06-11 Razvan Crainea * [fb6af78d4] : Bump version to 2.4.6 2019-06-11 Bogdan-Andrei Iancu * [fdbdcf13e] : 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 (cherry picked from commit 9dde6d5f00626ac78cec948c84443b2caea33013) 2019-06-11 Bogdan-Andrei Iancu * [d698b42e9] : 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 (cherry picked from commit d6a663f9b9b33205120519b85135fe4bc34b852d) 2019-06-11 Bogdan-Andrei Iancu * [1bdf0b90f] : Store in TCP conns the real ephemeral port and not the listening port Related to #1692 (cherry picked from commit 929c854b084cdbf9c6cf8e253f9fa60fcdec3c18) 2019-06-11 Bogdan-Andrei Iancu * [06178ac5b] : Accept BIGINT also for table version (cherry picked from commit dafa8f6a50958e1c6905621cceb2457f94163cc5) 2019-06-11 Razvan Crainea * [d589855ea] : dialog: unref dialog after updating cseq (cherry picked from commit 56c4b09640f2dcd54964fd7e87cdcdfd64e90866) 2019-06-11 Razvan Crainea * [1b3ff7be4] : dialog: add replication for cseq updates (cherry picked from commit 130e70421274c1e8ec716604372bc974d978556b) 2019-06-10 Liviu Chircu * [b4631d7b6] : mathops: Allow negative operands in math_rpn() (cherry picked from commit c0fe97a0e9b980327033e4bdf667106e51462288) 2019-06-10 Razvan Crainea * [12335f727] : proto_hep: fix off by one comparison (cherry picked from commit 4703d29da294433968547adf54b1ea0585b94359) 2019-06-09 OpenSIPS * [a6bd89e44] : Rebuild documentation 2019-06-05 Vlad Patrascu * [c6ddf07e2] : clusterer: complete fix in commit 69aaa19 (cherry picked from commit 033ef1c00cbf1acd40e2f12f2ad144437b1b113c) 2019-06-04 Vlad Patrascu * [3f5444bef] : 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. (cherry picked from commit 69aaa1904de891ebd6a809442c868ac44376b8b6) 2019-06-04 Bogdan-Andrei Iancu * [a9d8d4372] : 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 (cherry picked from commit db8a522aacbe9e6b6ce2b0e0b37186f875ca0c73) (cherry picked from commit 2a8679089c5de91f91339fd2253271902aa3c465) 2019-06-03 Razvan Crainea * [af600d61e] : tm: add anycast cid for locally generated msgs Reported by suharik71 on GitHub Close #1721 (cherry picked from commit 8ecd8b3801266671582b51f8c269d5f940cba8b8) 2019-06-03 Razvan Crainea * [d35d2eec1] : dialog: prevent dlg_onreq from crashing Check if current_context_ptr exists before trying to fetch the dialog Fixes #1719 (cherry picked from commit 5e4a99ee6f9abdf18f58697fabd141036096ab3e) 2019-06-03 Razvan Crainea * [1d359ce18] : siprec: reverse the order of t= and c= lines Reported by michaeljdresser on GitHub Close #1720 (cherry picked from commit e50a3d3cdcefd747abc6c3ead520877501a01400) 2019-06-02 OpenSIPS * [7a342463c] : Rebuild documentation 2019-05-31 Razvan Crainea * [ddafbc452] : 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 (cherry picked from commit 603a493488d767757ee2122d8d03a555df883b71) 2019-05-31 Liviu Chircu * [60097425d] : 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 (cherry picked from commit 7f14b6a30a79e6156ae732d1cbb8f1e3f102e3d3) (cherry picked from commit 319b1ba229dc25ec3ac903d3659a8e98dd85a0a2) 2019-05-31 Liviu Chircu * [96199dd55] : 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 (cherry picked from commit 0e40f6d46a635eae7b9587d71c49041802d6cc4b) (cherry picked from commit 9abf9fcf24fbb393a524f0288234c86fedb52a45) 2019-05-29 Liviu Chircu * [1b970d85e] : Fix various documentation typos or shortcomings (cherry picked from commit 59f8505d3597c2848ca05f64879d97a8748997ea) 2019-05-29 Razvan Crainea * [121618821] : cgrates: fix resuming function for cgrates_cmd() Reported by Vasilios Tzanoudakis #1713 (cherry picked from commit 80ec779e004fd69f343a56deab18c98c1e3079f3) 2019-05-29 Razvan Crainea * [85c95231c] : 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 (cherry picked from commit c90d251cef30fb6a991b859652a3ba7bcb32c37c) 2019-05-29 Bogdan-Andrei Iancu * [71983858d] : [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 ) (cherry picked from commit cbe2c6509ee4ffc518b5feed26dd4375e4bae9f0) 2019-05-29 Liviu Chircu * [c5d44aa4e] : rest_client: Fix string truncation compiler warnings Reported by Dan Pascu (cherry picked from commit a64d411d92a55b9348f9a3cfe98e08afbf4a6ec0) (cherry picked from commit 9fa666c5e7c3ea384508228faa6b6017e66889f9) 2019-05-29 Liviu Chircu * [7305fae08] : 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 (cherry picked from commit d20f163f3bceb213e4a7937a43074bf106ad9aaf) 2019-05-29 Bogdan-Andrei Iancu * [f8e0cbbec] : [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 ) (cherry picked from commit decbd1bddee7a77194fcc989f12b587e1b7ee548) 2019-05-29 Bogdan-Andrei Iancu * [82f12d0d9] : [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 ) (cherry picked from commit 73c2fe907e59cb6ce79c7c4fef1caf68cc954aff) 2019-05-29 Razvan Crainea * [87748b750] : usrloc: fix warnings from casting pointers to uint64 This warning is raised on 32-bits systems Reported by Dan Pascu (cherry picked from commit 266a2cf7705870765e27f7e628d5d61ad4cb6493) 2019-05-29 Razvan Crainea * [9ba0ec5b3] : rtpproxy: fix ipv6 handling of timeout socket Reported by Dan Pascu on mailing list (cherry picked from commit 3e2aed097518ca37862638d6dd7fe2b4ee3e583a) 2019-05-29 Alexey Vasilyev * [7fd38342b] : Load chain of certificates and all CA certificates from DB (cherry picked from commit ad159240835932e5ea53dc5df914df44f1414e6a) 2019-05-29 Razvan Crainea * [37a0d1132] : tls_mgm: make unused functions inline (cherry picked from commit b1b6f814e5589dc1a52b5486f05a017666fba1cd) 2019-05-28 Bogdan Andrei IANCU * [2ce502c12] : Merge pull request #1208 from dronord/ora_bigint db_ora: dont trim VAL_BIGINT (cherry picked from commit 3ddbbf6275b381a8bee0f45a856595304a26d1ce) 2019-05-28 Bogdan Andrei IANCU * [ad91916e0] : Merge pull request #1207 from dronord/ora_fetch fix and optimize oracle fetch (cherry picked from commit f7e45ba6e02cb1b130d5eef4285aadf879e948f8) 2019-05-28 Bogdan Andrei IANCU * [55d95ecae] : Merge pull request #1701 from vitalikvoip/2.4_fix_tcpchild_busy_counter Fix TCP connections load balancing to use all TCP workers evenly 2019-05-28 Bogdan Andrei IANCU * [7ab1776f6] : Merge pull request #1239 from dronord/ora_integer Oracle NUMBER not NUM in application (cherry picked from commit a6c9376e7514bb0e7c4a7061057d1a59a2e421c1) 2019-05-28 Vlad Patrascu * [9b30d717e] : dialog: complete the fix in commit: c6d31e3 2019-05-28 Vlad Patrascu * [c6d31e34a] : dialog: fix a crash when unrefing dialog Caused by accesing dialog through dangling pointer after it was freed. 2019-05-28 Razvan Crainea * [2234a4530] : tls_mgm: increase ca_list size Thanks go to Alexey Vasilyev (vasilevalex on GitHub) for reporting it Close #1709 (cherry picked from commit 154a1560c84dace2661c61101038878cf6d8eeab) 2019-05-28 Razvan Crainea * [1c383047a] : pi_http: fix LONGBLOB specification (cherry picked from commit d3fa736c0fef59a5da069220efba0eacdfeaf467) 2019-05-28 Razvan Crainea * [164cb4930] : usrloc: fix next hop compute for usrloc with DB Thanks go to Jasper Hafkenscheid (hafkensite on GitHub) for reporting it Close #1710 (cherry picked from commit 0300eb1d5986a86bc6062dfb2b7b00a50eaad25d) 2019-05-28 Razvan Crainea * [3d9132e72] : 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 (cherry picked from commit 149e69e3f67013884623e7986c47742aad787ece) 2019-05-27 Razvan Crainea * [1b624d2d4] : 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 (cherry picked from commit 1880111a33beed6ba87d64fb2700a22e71dc0184) (cherry picked from commit 5ff0afeea8de63c5c2c57cd6a225c0b7e0fb7605) 2019-05-27 Razvan Crainea * [66b6d7b66] : mi_json,uri: add null load function complete 42b33c4c80733bec05f2f15a623214b6a74eef9b 2019-05-27 Razvan Crainea * [42b33c4c8] : add function that is ran after loading a module (cherry picked from commit c6fb6c96093ff2e81dda5746755594a64b5764ee) 2019-05-26 OpenSIPS * [5dbd97e8b] : Rebuild documentation 2019-05-24 Liviu Chircu * [285b49e1d] : packaging: Allow specifying custom options with Debian systemd Additionally, use the "$OPTIONS" during the script startup checks! 2019-05-23 Razvan Crainea * [7d53b5176] : proto_ws: build GET Host header based on destination IP and port Thanks go to Bogdan Iancu for spotting this (cherry picked from commit a3eda1b1393c7eb0475b41b4db1a51d86eb0882f) 2019-05-23 Razvan Crainea * [6257ce4fd] : 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 (cherry picked from commit ba81966851cd4e10961b4d2c05c899b2c952872e) 2019-05-23 Bogdan-Andrei Iancu * [260574a3e] : Better naming of attributes in tcp_list_conns output Replace Source/Destination with Remote/Local, to be easier to understand Cherry pick from dbdf02fc1be0fe62ad4a7863447d4a1493322e4e 2019-05-23 Bogdan-Andrei Iancu * [7dc25e07b] : 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. (cherry picked from commit a7791a6d838d757a5faa43175aa319daadc56c86) 2019-05-23 Bogdan-Andrei Iancu * [d5bb7ab40] : 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 (cherry picked from commit af2bd1db8848d1a925680baa1ff2c57ec4ffc21b) 2019-05-22 Vlad Patrascu * [405bcd513] : 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. (cherry picked from commit d3bc0e256f925ee2c25aea483e14afca8dfcdbbe) 2019-05-22 Razvan Crainea * [ce93ed5b8] : rtpproxy: engage late negociation even after call is established Thanks go to spacetourist(GitHub)/Callum Guy for reporting this Close #1702 (cherry picked from commit 295a5842dee444a1f26b8eb5af539e58e4db8d44) 2019-05-21 Bogdan-Andrei Iancu * [4bca4792d] : 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 2019-05-21 Bogdan Andrei IANCU * [2dd76a784] : Merge pull request #1699 from taozhiying/patch-1 LB will always to one dst when use lb_next 2019-05-21 Razvan Crainea * [7d24077f9] : 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. (cherry picked from commit ef680f665066dabf2d99d616976ba7126092f124) 2019-05-21 Razvan Crainea * [5af9289d3] : dialog: prevent src_leg from remaining dangling 2019-05-21 Razvan Crainea * [25665122b] : 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. (cherry picked from commit 815601872cca5debd4b6f7e9ff4956bfdceaec51) 2019-05-21 Bogdan-Andrei Iancu * [af4d8479d] : Fixed bogus "return" in LOAD computing macro This affected only the 1 minute statistic. 2019-05-21 Bogdan-Andrei Iancu * [7e24e5a9d] : Fix incomplete interation Do not abort the interation on error, but skip and continue with the next elements / subscriptions. (cherry picked from commit d4c46def9155c89c3dce3e1b74a93a05448b6fa3) 2019-05-20 Liviu Chircu * [82440f6b8] : 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. (cherry picked from commit 6bf972ce5876fc15999a4bcc2e3e29596b2dc0ae) 2019-05-20 Liviu Chircu * [169d4bd2d] : cachedb: Improve variable naming Make it more obvious that we're dealing with a rows x columns matrix. (cherry picked from commit 499f0f3219fe0391e013b8c901983990013669bd) 2019-05-20 Vlad Patrascu * [f112620c6] : 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 (cherry picked from commit ad1232d211ab97b4367c1f22fbb2828df6b534d1) 2019-05-20 Liviu Chircu * [4a1390b8e] : 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)[*]). (cherry picked from commit e66486fbd2398fbf81b893b727ebb03074f23ab0) 2019-05-19 OpenSIPS * [7fb724b6a] : Rebuild documentation 2019-05-17 Liviu Chircu * [47749bbbb] : statistics: Improve iteration example Clarify a hidden gotcha: the stat name iterator does not include the stat group! (cherry picked from commit 0dcbf9eed63873aeeb5f636fb418918a640c58b8) 2019-05-16 Bogdan-Andrei Iancu * [6731e05e2] : Do Trasaction post script updates only if method matches A translation of PR #1678 done by @rrb3942 Closes #1678 Closes #1669 (cherry picked from commit 9c960bba41216359786cfe8d382b639cc5bf020c) 2019-05-16 Vlad Patrascu * [113c02b54] : dialog: fix a deadlock introduced in commit df90f8d 2019-05-15 Vitalii Aleksandrov * [d604cdeda] : net: do not decrement tcp_c->busy counter for connections previously acquired by tcp_conn_get() 2019-05-15 Vlad Patrascu * [9afa2c5f0] : dialog: do not accept replicated counters for local profiles (cherry picked from commit c5638e9bb58d6db6b428c3cd65502513b28817a5) 2019-05-15 TaoZhiying * [793959e14] : LB will always to one dst when use lb_next The current dst is not a larger load. When skipping, the index of the bitmask does not move. 2019-05-14 Vlad Patrascu * [df90f8dc7] : 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. (cherry picked from commit 40ccbf9cabad05b4cfd264cefeb113187131dd43) 2019-05-14 Razvan Crainea * [a4b209583] : dialog: improve error report on sockets mismatch Report socket that was not found during dialog replication. (cherry picked from commit 00f6d2314c68c568729d846d76415d7bc6694ffd) 2019-05-13 Ovidiu Sas * [1bb93819c] : db_text: avoid buffer overflow for large names and/or values in db_text files (cherry picked from commit 9d7ac44d9eee7dc7eeca14c7bf4e12202715a429) 2019-05-13 Vlad Patrascu * [0357a6336] : dialog: fix a crash when removing dialog from profile Do replicate counter structure deletion if the profile is not shared. (cherry picked from commit d721a94237c48343b2bcab16bd2a84f3dd618d69) 2019-05-12 OpenSIPS * [db80b0fb2] : Rebuild documentation 2019-05-12 Razvan Crainea * [214ba300e] : dbtext: use python2 explicit shebang This is needed for Fedora 30. Reported by Nick Altmann (cherry picked from commit ce7df8ac697cab164cf027f2cb7ef1784a08029f) 2019-05-09 Razvan Crainea * [3a994ceea] : 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 (cherry picked from commit deafdb7f4b474701289a8086fbf44a05e19feca6) 2019-05-09 Vlad Patrascu * [8c9ee6d8d] : dialog: extend the fix in commit 3abb14d to profiles without value (cherry picked from commit 3d081c88f4515ac0ed5424f43e6b5304b095ab85) 2019-05-09 Liviu Chircu * [a1357f482] : systemd: Inherit default settings when checking config This prevents oom errors when starting the service with some heavy-duty scripts which load lots of modules / have lots of startup logic and demand a bit more memory than the binary's defaults provide. Reported by Ken Rice. 2019-05-08 Vlad Patrascu * [de02435ba] : Complete the fix in commit: 3abb14d (cherry picked from commit 0256fadcc11f91781113980b867599e844acfe8b) 2019-05-08 Vlad Patrascu * [2eac15f5c] : 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. (cherry picked from commit 3abb14d6e629db0625cb0fe9f360d10eee07d00e) 2019-05-07 Liviu Chircu * [f10d00d7d] : transformations: Fix noisy log 2019-04-28 OpenSIPS * [da679456d] : Rebuild documentation 2019-04-26 Razvan Crainea * [a135cec5b] : tm: proper return code for replicated CANCEL Thanks go to 46Labs for reporting this (cherry picked from commit 5c7dd8ab8ea7fe378204d33dafe14434412404b5) 2019-04-26 Razvan Crainea * [3fbd3ef21] : tm: fix CANCEL replication when CANCEL is malformed Thanks fo to 46Labs for reporting this (cherry picked from commit 9f050c95f66ff44fd657a7266ce4acaad572e5c6) 2019-04-24 Liviu Chircu * [7a8ec4ad6] : TCP: Fix confusing log on connect timeout (cherry picked from commit b7af3d764118218e88e59aa56d4da8c1de7a4d21) 2019-04-24 Liviu Chircu * [37e732d52] : Merge pull request #1675 from wdoekes/fix-compiler-warnings-2.4 Work around a few poor compiler warnings (2.4 branch) 2019-04-23 Liviu Chircu * [f1c5a7ea3] : 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 2019-04-23 Walter Doekes * [70ca1636b] : 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 (cherry-picked from 94c50b781) 2019-04-23 Liviu Chircu * [ed08dabf6] : 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; ^ (cherry picked from commit 95edbd2c8cd8ed208248b8f47805654a41e5e129) 2019-04-23 Liviu Chircu * [bbd9950c2] : cachedb_mongodb: Improve connection string examples * give a "connecting to a replica set" example * better highlight the "engine:group://" syntax (cherry picked from commit 28a31887b286cb981b5f5c1798fad1d2519ad6ae) 2019-04-23 Bogdan-Andrei Iancu * [c15abd769] : Fixed copy paste error in DB schema section name 2019-04-23 Bogdan-Andrei Iancu * [3099040e1] : Updated copyright years 2019-04-23 Bogdan-Andrei Iancu * [116860e45] : Removed empty DB schema section Related to #1672 2019-04-21 OpenSIPS * [3af7d0fe8] : Rebuild documentation 2019-04-19 Liviu Chircu * [887f9f0e0] : 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 2019-04-15 Razvan Crainea * [c82972d78] : dialog: fix mem leak generated by missing replies When cseq was to change generated replies, if those replies were never generated (due to missing replies from UAC), the callback was leaking. (cherry picked from commit 13bceaf647b2cd885f516bb61e2dd04da964d1a4) 2019-04-14 OpenSIPS * [22465c6a4] : Rebuild documentation 2019-04-08 Bogdan-Andrei Iancu * [d0156db0a] : Fix missing escaping in JSON output via mi_json TAB, Back Space, Form Feed, New Line and Carriage Return must be escaped in the values returned by mi_json. 2019-04-08 Bogdan-Andrei Iancu * [b8b835200] : Name the MI nodes in t_uac_dlg reply Without names, the reply will be inconsistent in JSON format 2019-04-07 OpenSIPS * [6332aa9b2] : Rebuild documentation 2019-04-03 Bogdan-Andrei Iancu * [e1004f864] : Fix concurrent parsing over samed shm message. As print_rr_body() may be called from different processes but over the same shm request, the performed parsing may lead to conflicts (different procs will fight one each other in setting the "parsed" field of the hdr_field in shm. This will easily lead to memory corruption and crashes. As real case, different replies to the same request may trigger print_rr_body in topology_hiding(), over the same shm cloned request. The newly added paramter (no_change) will instruct print_rr_body() to do its job but without changing anything in the inout set of RR hdrs. 2019-04-03 Bogdan-Andrei Iancu * [2b6b00030] : Fix dangling path vector in shm cloned request. When doing save() on reply, be sure you free whatever path_vec may be attached via save_aux() in pkg. Keep in mind that the request is a cloned request in shm. Closes #1640. May thanks to @netaskd for his help in troubleshooting this issue. 2019-04-02 Bogdan-Andrei Iancu * [79a9daf65] : Fix replicating wrong event with BLF & mix_dialog_presence If mix_dialog_presence is enabled for BLF, the wrong event is replicated (presence instead of dialog) due some hackish code. Better restore the correct event after forcing the handling of the BLF publish as presence, so the clustering layer will see the corrent event type. 2019-04-02 Liviu Chircu * [1c3c4a1a1] : Update contributors file (cherry picked from commit dac6ef8a98af1aad01c0e68ea9d3254cb0c7c2b3) 2019-03-31 OpenSIPS * [22fe15c1b] : Rebuild documentation 2019-03-29 Razvan Crainea * [b7570319e] : usrloc: make next_hop point within the shared buffer Before this commit, the `next_hop` fields returned by `get_domain_*_ucontacts()` were pointing to a shared memory, that might dissapear when the contact is gone, resulting in a crash. This patch re-points the `next_hop.name` field within the buffer. Crash reported in ticket #1652 (cherry picked from commit e162f5f1024f8dad4bf5554600aa25183fcf92fc) 2019-03-29 Liviu Chircu * [cd5fe0b08] : Normalize free(NULL) logging across all allocators Many thanks to Ryan Bullock for reporting! Fixes #1646 2019-03-26 Gohar Ahmed * [2f8301336] : Fixed bug where any addr get positive match in config if cluster_id is invalid or Invalid IP addr is given to cluster_check_addr() (cherry picked from commit b8cf9336dd9885e2bcc5472d8a06684cc63dfc52) 2019-03-26 Bogdan Andrei IANCU * [f137771f6] : Merge pull request #1643 from rrb3942/postgresql_bulk_fix db_postgres: Fix errors on bulk insert after delete/update (cherry picked from commit b931ffe57d207f99f831a19a2a571e29ed0d3279) 2019-03-26 Razvan Crainea * [56f9a8bf2] : dispatcher: add partition support to ds_list MI cmd 2019-03-26 Bogdan-Andrei Iancu * [bf25311d9] : Fix AVP context over sending requests via local route. Be sure the internally expose the same AVP list for running the local route and sending the request out. Fixes #1642 2019-03-24 OpenSIPS * [29cb099a7] : Rebuild documentation 2019-03-22 Liviu Chircu * [e6412b149] : mid_registrar: Fix poorly handled lifetime reductions If the downstream registrar reduces the lifetime of the contacts we advertise to it, we (the mid-registrar) should properly adhere to the change, and not utterly ignore it. This bug was only present in modes 0 and 1. Thanks to Jeff Pyle for the report! (cherry picked from commit e5fd28efa238b5d25b5ebbce81d0a6421b04f1b8) 2019-03-20 Liviu Chircu * [181c2d22f] : mid_registrar: Fix possible crash in mode == 2 It seems commit d8fe587cef17 broke the handling for non-star de-registrations which remove the last standing contact, causing replies from the main registrar to not include a "Contact" header field. The latter, in itself, is perfectly fine -- however, it must be handled properly. (cherry picked from commit d4f023e8da8fc6bda92b4d4aa8e58cde0282ee67) 2019-03-20 Liviu Chircu * [d87169c7a] : pua_dialoginfo: Fix pkg memleak 2019-03-19 Liviu Chircu * [541f80864] : Red Hat init.d: Adjust stop command to 2.4 shutdown behavior The default `killproc` timeout of 3 seconds is too short, causing it to incorrectly SIGKILL the attendant before it gets a chance to properly finish the shutdown sequence: * broadcast graceful termination jobs * wait up to 5 sec * forcefully kill all workers * commit seppuku (cherry picked from commit 158f98e93fcd8dfe719d76ed632686e75a74d8cc) 2019-03-19 Liviu Chircu * [47b960d9a] : clusterer: Fix missing lock_release() calls (cherry picked from commit a2a305fc2e5e56b2ce17c1ed6c25c0b2c561c5f1) 2019-03-17 OpenSIPS * [dfbab5d08] : Rebuild documentation 2019-03-14 Liviu Chircu * [3a566f156] : rest_client: Explicitly set retcode_pv to 0 on error This avoids any scripting mistakes where: * the user does not init $var(http_rc) to 0 prior to rest_get() * rest_get() fails (e.g. connection timeout -- web server is down) * $var(http_rc) is untouched, yet mistakenly holds 200 from a previous (successful) run of the same process (cherry picked from commit 9e842178d6c3d96143f4d1881bb57cdd180153f6) 2019-03-13 Bogdan Andrei IANCU * [faa2b2793] : Merge pull request #1635 from rrb3942/compact_session_expires Add Session-Expires header to compact_form_hdrs (cherry picked from commit 18a4b9024d9e6864693f27830d86e7ead4c77e3e) 2019-03-12 Bogdan-Andrei Iancu * [f5ffb1a13] : Fix useless/bogus pointer reset Related to previos commit (cherry picked from commit 0c80bcaf68b34c99a8b62b2e3c88bae43df97ff8) 2019-03-12 Bogdan-Andrei Iancu * [3bc72d493] : Small fix in test during blacklist name parsing Related to d11ba50413b53e2c0dafa091de98b6bb8bd5b972 (cherry picked from commit 71120b601371bf7d49e49ed4eb9f0e11f284b0b3) 2019-03-12 Bogdan-Andrei Iancu * [0bc8bf3a7] : Fix building blacklist's name when using partitions Do not include the partition name in the name of the blacklist (cherry picked from commit d11ba50413b53e2c0dafa091de98b6bb8bd5b972) 2019-03-12 Bogdan-Andrei Iancu * [11aebdeb9] : Avoid warnings when duplicates found in blacklists. 2019-03-12 Bogdan-Andrei Iancu * [176721030] : Removed bogus critical logs. Do not report errors if data does not exists - we may end up in such a cleanup situation during a failed startup (with no data loaded). (cherry picked from commit 427affcf474d62305ddbe5a8616944a61ee69d80) 2019-03-12 Bogdan-Andrei Iancu * [2c7ebe6de] : Improve docs on "define_blacklist" param 2019-03-12 Bogdan-Andrei Iancu * [16b47f04f] : Fix t_reply_with_body() when called after t_newtran() Force an update of the cloned request (from transaction) with info from the real request before internally running t_reply_with_body(). As t_reply_with_body() works with the cloned request, we need to be sure it is up-2-date; and t_newtran() does a partial cloning of the requests - so, if the transaction already exists better update its cloned request to be sure it has all data. Credits for detailed reporting to @rrb3942 Closes #1632 (cherry picked from commit 00a3ab348b0400fc63d25f742916ec65602f7e3f) 2019-03-11 Bogdan-Andrei Iancu * [f31de6d6d] : Fixed $log_level for returning negative values Use signed function to covert from int to str, as log_leve may be negative (-1==ERR). (cherry picked from commit 0b465a386b4759dfb51b6265484deb5d9dd7710e) 2019-03-10 OpenSIPS * [431c8f82f] : Rebuild documentation 2019-03-08 Liviu Chircu * [5cd2afae6] : registrar: Clarify the 'm' lookup() flag (cherry picked from commit aa276bff046246f3d5fba8ec8161968119f7c44d) =========================== Release 2.4.5 ============================== 2019-03-07 Razvan Crainea * [b9eaf7dd2] : Bump version to 2.4.5 2019-03-07 Razvan Crainea * [0d752142d] : b2b_entities: don't unref UNDEFINED tm Close #1629 (cherry picked from commit e6f181e26129cf1ad64071723c0c2456bac60bb7) 2019-03-07 Liviu Chircu * [b92203da3] : mid_registrar: Fix unnecessary error log Thanks to @StellaTeam for the report! Fixes #1620 (cherry picked from commit d8ad6551c0cfbebc18995cfc79e40a7f38b0ea59) 2019-03-07 Liviu Chircu * [303b00dec] : mid_registrar: Do not ignore "advertised address" Whenever the send socket address is overridden, in decreasing precedence order, through either: * listen = AS * set_advertised_address() script function * advertised_address = global parameter ... the mid-registrar will now properly take this into account and include the advertised address in all REGISTER Contacts header fields it relays. Many thanks to Italo Rossi (@italorossi) for reporting this issue. Fixes #1619 (cherry picked from commit 5c893731666ff374e9cc3183d3358f195dd7087d) 2019-03-07 Bogdan-Andrei Iancu * [732038b6d] : Fixed access to acc vars in failure route during internally generated final replies(408) Register the internal TM callback for FAILURE all the time, as it will be responsible for populating the acc context in Transaction when handling an internally generated final reply (408). Credits for reporting and identifing the issue to @rrb3942 Closes #1602 2019-03-06 Liviu Chircu * [d25602ba4] : clusterer: Fix missing lock_release() (cherry picked from commit 1e14a83cbeb0f7f8e814037601ad65a693c7e52f) 2019-03-06 Razvan Crainea * [a127598bb] : dialog: proper parsing of serialized dlg vals Before this fix, if a value was having more than two "legitimate" `\` (ascii 92) chars inside the value, OpenSIPS would have crashed. Credits go to 46Labs for reporting! (cherry picked from commit 9c4bb36bcb7938409e317b2227e917150bb24855) 2019-03-06 Răzvan Crainea * [87cc072ea] : Merge pull request #1594 from vasilevalex/validate_ipv6 Allow IPv6 address in hostname (cherry picked from commit 873bd820cb1770b048435dc5bb7a7b99a156539e) 2019-03-05 Vlad Patrascu * [67e346d3d] : dialog: fix processes serialization when fetching sharing tag state High contention on a RW lock aquired for switchable reading has the same downsides as direclty aquring it for writing. This commit improves this by switching from read to write in separate steps, with basic rw lock ops (start/stop read/write). 2019-03-05 Bogdan-Andrei Iancu * [0b1cc464a] : Remove some extensive logging (needed only for dev) (cherry picked from commit 60024ad92931054104b88dce4a0ca04935cb76e5) 2019-03-05 Bogdan-Andrei Iancu * [7664d24d5] : Fix cps counting for the SBT algorithm Credits shared with @razvancrainea for sorting out the issue and reworking the alg implementation. (cherry picked from commit 732e3d6157f92f22ab8ad83d1e87d8beb4aa838e) 2019-03-05 Bogdan-Andrei Iancu * [0c64403e7] : Fix the parsing of $rl_count name (cherry picked from commit d7224382be37821026643e753de68c17b24307c3) 2019-03-03 OpenSIPS * [bbd6eb84c] : Rebuild documentation 2019-03-01 Razvan Crainea * [637604dfd] : dialog: init ret value to skip warnings 2019-03-01 Razvan Crainea * [a93800952] : dialog: replicate profiles outside lock (cherry picked from commit fdefec49d0415be9b499bb857e4b076d71729e78) 2019-02-28 Liviu Chircu * [6c6c513f2] : dialog: Propagate new $DLG_timeout values to DB/BIN Make sure to store/replicate the new value, not the old one! Credits to Vlad Patrascu for helping track this down (cherry picked from commit d948aa037b04bbfa37581876655edd7fcd26570e) 2019-02-27 Di-Shi Sun * [0101343ee] : Updated OSP Toolkit project repository. 2019-02-26 Razvan Crainea * [922e188c1] : dialog: prevent bin buffer double release (cherry picked from commit 738905d2fc735e82043335d51ff23f714e2306b8) 2019-02-24 OpenSIPS * [e64b11799] : Rebuild documentation 2019-02-22 Liviu Chircu * [0de94a899] : rr: Fix a buffer mgm bug during strict routing callbacks While doing strict routing (e.g. the R-URI host is a local domain) and executing the module callbacks, the rr module would provide some bogus memory pointer as the result of the rr_api.get_route_param() function. Although opensips would not crash due to the dangling pointer residing in pkg memory, some callbacks would misbehave (e.g. uac_auth() would fail to adjust the outbound ACK CSeq, since it cannot locate the ";aci" Route header field parameter within the dangling pkg area). Related to #1613 (cherry picked from commit ec89b78667430da51e4146bc7f2514f68e9d21a9) 2019-02-17 OpenSIPS * [498aec2a3] : Rebuild documentation 2019-02-15 Razvan Crainea * [5f30be420] : siprec: fix socket enforce (cherry picked from commit a7a65d39566ba4eec5d639b01909fad97a9c6586) 2019-02-12 Liviu Chircu * [71cb2b015] : mid_registrar: Improve ';ctid= not found' error logs (cherry picked from commit b830a2f32b145d32e7f85cd41dd4848211e27c11) 2019-02-12 Bogdan Andrei IANCU * [a7eeaf187] : Merge pull request #1614 from wdoekes/wjd-correct-presence-list-mi-flush-2.4 Correct presence list MI flush in OpenSIPS 2.4 2019-02-12 Walter Doekes * [fd75d765e] : mi_datagram: Correct leftover bytes count Before this fix, a flush_mi_tree without new data would decrement the bytes-left for no reason, and after a bunch of these, we'd run out of space. Errors like these would flood the logs: failed to write -line too long! failed to write - EOC does not fit in! Additionally, mi_datagram_write_node would decrease the length by more than necessary, causing less than half the full size to fit in the response. (dtgram->len is "bytes left", not "total length") 2019-02-12 Walter Doekes * [fd3a6e4a7] : presence: MI flush subs_phtable_list only if there is data Also flush pres_phtable_list after more than 50 entries. Corrects problem with (soon to be removed) mi-datagram where flushing after 0 bytes creates a negative response. 2019-02-11 Răzvan Crainea * [d57ce2d41] : Merge pull request #1601 from rrb3942/rtpproxy_socket_clipping Don't clip notify socket to older rtpproxies when using unix sockets (cherry picked from commit 9f6b15e2895260f6537d57f16575ff96955dba6a) 2019-02-10 OpenSIPS * [168466166] : Rebuild documentation 2019-02-08 Razvan Crainea * [e563f7dbd] : net/tcp: save fd before sending the conn to main Save local fd of the connection before sending it to TCP main, to make sure we it won't get overwritten by main, and we close somebody else's file descriptor. (cherry picked from commit ed4e862db1dbeefd6db8559425c2da26fa239dd9) 2019-02-08 Bogdan-Andrei Iancu * [eb07ae953] : Remove double free on bad input Credits for the fix go to @rrb3942 Closes pull request #1599 2019-02-07 Vlad Patrascu * [765dba5c4] : dialog: fix some profile replication locking issues * fix an extra relase instead of acquire for the received counters lock * fix an unrelased profiles lock in case of error 2019-02-05 Vlad Patrascu * [a6790d5bd] : dialog: also include sdp body when replicating dialogs (cherry picked from commit c8907aa3d61955f76887e32e75666468ab856f1f) 2019-02-05 Bogdan-Andrei Iancu * [945c2eccf] : Fixed over/undeflow due signed/unsigned differences Introduced with the last commit f8b7e9c 2019-02-05 Bogdan-Andrei Iancu * [f8b7e9c8d] : Fixed calculating the ovrall load stats Correlate the summed used processing time with the number of summed processes, not total processes. (cherry picked from commit bf2e51cfbe16262a29f0f52c83532c55cdb43e67) (cherry picked from commit 3354d87807e3298cfea2e0dc3f471af3538b2b0f) 2019-02-03 OpenSIPS * [45c5200e8] : Rebuild documentation 2019-02-02 Bogdan-Andrei Iancu * [033db9fd0] : Fixed uninit len for th_contact_encode_passwd param. As the used len was all the time 10 (the len of the default passwd), if you have set a shorter one, the actual used passwd has some trailing memory garbage (up to 10 char len). This grabage could be (99.999%) constant during runtime, but 100% different after a restart. Shorly, the decoding on ongoing contact would have failed after a restart. (cherry picked from commit 4a17a828861feb6be07f67103ad352e7d8c817f6) 2019-02-01 Liviu Chircu * [b6e6d4fc1] : freeswitch_scripting: Remove dead code (cherry picked from commit 13d77ed4bdccdf77d0142900d43b76d490faf4c4) 2019-02-01 Liviu Chircu * [76c02314b] : freeswitch_scripting: Fix startup crash with no modparams Thanks to Bogdan for catching this one (cherry picked from commit fd35cfd400348b30d89608f4ca700c3e8c526ec6) 2019-02-01 Vlad Patrascu * [2a05d560e] : clusterer: fix description of 'state' column in db schema Closes #1595 (cherry picked from commit 7aed4c179146140c055ecb34c190f176030766c0) 2019-01-30 Liviu Chircu * [f67f8d6cf] : Avoid errors on "$rU = ;" statements (cherry picked from commit 94d2f05940e7078d1acf485ea848eb9e5f34b00f) 2019-01-29 Vlad Patrascu * [e9d75edfe] : clusterer: complete previous fix (cherry picked from commit ad8d40c3bfa0d4d2aa095c12507295049685c12a) 2019-01-29 Vlad Patrascu * [d083b74cb] : clusterer: fix crash introduced in previous commit Also do not reset the capabailities states after running 'clusterer_reload'. (cherry picked from commit a3d5a798498cfd3552c328c4040098d86b4bcafd) 2019-01-29 Vlad Patrascu * [190ba59ac] : clusterer: fix loss of capabilities when doing clusterer_reload (cherry picked from commit 0dc0ee54317de5f663703000e374aa9ad92c0fe9) 2019-01-27 OpenSIPS * [542c7a66b] : Rebuild documentation 2019-01-23 Liviu Chircu * [d1055351a] : avpops: Make an empty avp_print() more obvious (cherry picked from commit f9a4874f6710099b293229c679ce79bc34a99a74) 2019-01-23 Liviu Chircu * [c43ee631a] : doc/build-contrib.sh: Add new contributors (cherry picked from commit 9569c2c8e0a974438b954c6a1fa721048c9b7b2c) 2019-01-23 Liviu Chircu * [dd013d010] : clusterer: Do not segfault on failed OpenSIPS startup (cherry picked from commit 00504b1a85d969a16a516fa73eafb23f6b66a18c) 2019-01-23 Liviu Chircu * [52ff74af8] : Fix poorly managed route param recursion level on an error state (cherry picked from commit b491999b2449b0f22d57dd92ce53e0b4f51a35de) 2019-01-20 OpenSIPS * [c3b087f44] : Rebuild documentation 2019-01-18 Liviu Chircu * [7b61a7e9e] : registrar: Fix incomplete commit d2a958dca Many thanks to @fedorna for catching this one! Fixes #1588 (cherry picked from commit d47b51604604431a0390cd1ecc4514e0e0fe195b) 2019-01-18 Liviu Chircu * [8d28ab639] : usrloc: Fix "shared_pinging" docs to match the code Thanks to John Quick for reporting this issue 2019-01-18 Liviu Chircu * [b600b23bb] : nathelper: Fix segfault while interpreting the branch value (cherry picked from commit 81f6ac78649d17372d6183a97403514281c537e0) 2019-01-17 Razvan Crainea * [c1403a1d9] : clusterer: initialize db connections in mod init Prevent the module from using a single DB connection from all processes, because it leads to commands responses overlaps. Close #1579 (cherry picked from commit 4c29eedc3dbdd9e74781cd81f626b64c71a4e16d) 2019-01-13 OpenSIPS * [b0a3a3d23] : Rebuild documentation 2019-01-10 Razvan Crainea * [1f8facec9] : tm/cluster: don't send replies for transactions not found (cherry picked from commit 1e0349ff2e217fcccc6b9c66549c799163b50395) 2019-01-09 Ovidiu Sas * [698caac79] : httpd: Handle Content-Type: text/html and enhance some err logs (cherry picked from commit 7829916b8505b6425cdf2b7dc6a25b0604a91bb5) 2019-01-09 Bogdan-Andrei Iancu * [6fc556c46] : [mi_xmlrpc_ng] Fix methodResponse XMLRPC formating The 'struct' tag must be enclosed in a 'value' tag. Fixes #1499 (cherry picked from commit c1cfba8806e64158942a13e062bfdf2611d76f21) 2019-01-08 Bogdan-Andrei Iancu * [ff21cea19] : [MI] Fix missing/wrong Content Type in HTTP responses When registering a callback to the HTTP server, let it also know what will be the Content Type for the returned data. Fixes #1509 (cherry picked from commit b3e0f6cc9c3e04f986f00919778b92c1f6839104) 2019-01-06 OpenSIPS * [1fcca4aeb] : Rebuild documentation 2019-01-04 Bogdan-Andrei Iancu * [87a59ea47] : [registrar] Fix 'contact' matching in remove() Deal with the 'contact' parameter as a string and to a string matching against the registered contacts. Fix for #1569 Cherry-pick from 2e1e1e98318bede41737945395a8b24366130c9c 2019-01-04 Liviu Chircu * [8b0b7f3db] : mid_registrar: Fix incorrect error log (cherry picked from commit 0062ef0842c36fcd32942f53800401505354d1dd) 2018-12-23 OpenSIPS * [184adb83e] : Rebuild documentation 2018-12-22 Razvan * [6fcc6005f] : cgrates: don't serialize dlg vals for deleted dlgs (cherry picked from commit effaf925c2a3e40990521d495edce8f18aee68a9) 2018-12-21 Razvan Crainea * [32b4af7e5] : compression: re-compute the uri after rebuilding the buffer When freeing the buffer in be3b603667, the URI in transaction remained pointing to the old buffer. Therefore when building local ACK or CANCEL, URI was having garbage. Fixes #1575 Many thanks to Jock McKechnie for reporing it and offering testing support (cherry picked from commit d87766364096e567dbd15f9d8ff1dd2b6082703e) 2018-12-20 Razvan Crainea * [ee932827f] : dialog: do not replicate update messages on early This suppresses some errors generated by incomplete replicate messages (missing callee socket, tags, etc.) (cherry picked from commit 7dd023c2501579adb287506aa59c32801e57b1cc) 2018-12-19 Alexey Vasilyev * [4c08620d6] : db: correct parsing ipv6 address for host (cherry picked from commit bfbfa83ba860aead9d6d7b1c91f08185ee4425e1) 2018-12-19 Alexey Vasilyev * [07a4390eb] : cachedb: correct parsing ipv6 address for host (cherry picked from commit 084ab2c38667a71120552d933ffa901fdbf5b9dc) 2018-12-18 Liviu Chircu * [714cddc17] : Fix more bad "method ==" examples Completes 8370a8d7 (cherry picked from commit 4b697f37538a60f0d0f2404a45172fa5d0f11ec9) 2018-12-18 Bogdan-Andrei Iancu * [04c1bc8cf] : Fix example in module docs. The 'method' keyword is obsolete and replaced with is_method() Reported by VozToVoice Net. (cherry picked from commit 8370a8d7f6919ad621f7123b405bc023434c5123) =========================== Release 2.4.4 ============================== 2018-12-18 Razvan Crainea * [d0252793f] : Bump version to 2.4.4 2018-12-18 Bogdan-Andrei Iancu * [4fa79d546] : Fix parsing SIP buffer when needed HDR is last. Be sure and not not include the HDR to BODY separator as part of the last hdr. Fixes #1555. (cherry picked from commit 24ebbbe42bb1a888b0a06b08dd5c6a280e4ec2c6) 2018-12-18 Liviu Chircu * [4253767be] : registrar / mid_registrar: Fix lookup() with a custom AoR Thanks to Antonis Psaras (@apsaras) for reporting! Fixes #1571 (cherry picked from commit d2a958dcad300ba4dd9e63e8a4ccbc2da6d60224) 2018-12-18 Vlad Patrascu * [0b7ced846] : mmgeoip: fix gcc compile warning (cherry picked from commit 88ef1217067f08998ff4d5f28dcd4aabfc677a23) 2018-12-18 Vlad Patrascu * [6dabe1546] : mmgeoip: update driver to support GeoIP2 Closes #1362 (cherry picked from commit 4272fcee0a18fec577f2e1438909dcfdb1b4418d) 2018-12-17 Razvan Crainea * [3dab82938] : cgrates: serialize variables in a different var This prevents ongoing sessions from being overwritten by the serialized value. (cherry picked from commit ae10e1aab24f7d1a3988790c7e5d9a907f2e967b) 2018-12-17 Razvan Crainea * [6d1eda3ed] : compression: do not free buf for stateless The callback frees them for you, resulting in a double free. Bug introduced in be3b6036. Reported by Ryan Bullock on GitHub. (cherry picked from commit 57f142bdeda5dd7ad4406cab184ab7a2668e32a1) 2018-12-16 OpenSIPS * [413aa5b7c] : Rebuild documentation 2018-12-13 Razvan Crainea * [a2662be82] : rtpengine: fix possible crash in via-branch Before this fix, if one was asking for a via branch id that was not available, OpenSIPS was crashing. Fixes #1556 (cherry picked from commit 624317765d4ad49e0a3dd31b563b0c3c91657959) 2018-12-12 Razvan Crainea * [13589ff3a] : tm: t_check_trans() return -2 for end-to-end ACKs Using this return code we can detect end-to-end ACKs in script. (cherry picked from commit 97dda5bb74f9229063955154ec2cc6bde484bd0c) 2018-12-11 Liviu Chircu * [416a87122] : seas: Fix compile error 2018-12-11 Bogdan-Andrei Iancu * [c4578e150] : Fixed compile warning (include file missing) Related to b90a34c54bf747958544c66502f406cc4b935fb6 2018-12-11 Liviu Chircu * [99f306a5d] : dialog: Fix compile errors 2018-12-11 Bogdan-Andrei Iancu * [b90a34c54] : Remove circular include. Reported by Peter Lemenkov (@lemenkov) Addresses #1562 2018-12-09 OpenSIPS * [9b4ee034a] : Rebuild documentation 2018-12-03 Bogdan-Andrei Iancu * [5f1ec371b] : Fixed cloning of hostend structs. The h_addr is only a #define to h_addr_list[0], leading to overwriting the new h_addr_list[0] with the old (src) value. Credits to Dan Pascu (@danpascu) for reporting and assisting with the troubleshooting. 2018-12-03 Liviu Chircu * [c24a099fd] : Fix possible pkg buffer overflow in all {sdp.*} transformations Thanks to Bogdan for directing the troubleshooting of this bug. Thanks to 46Labs for providing extensive troubleshooting information. (cherry picked from commit 52e3ada3ab649875e9a8f5e62a2c927ed8858d76) 2018-12-03 Razvan Crainea * [a1fdfcb0e] : event_jsonrpc: fix yet busy flag value This time the flag was overlapping with event_flatstore one. More details in #1533 (cherry picked from commit 84bf5f3b055de4c849c2406171be55442ca83a7f) 2018-12-02 OpenSIPS * [f9fc9c905] : Rebuild documentation 2018-11-29 Dan Pascu * [797af7239] : Fixed segfault when resource list document is not found 2018-11-28 Razvan Crainea * [9d32492f1] : mongodb: remove deprecated is_error() in json-c 0.13 (cherry picked from commit 0d819747817b90d05610e57a1168ce56b0610c09) 2018-11-27 Razvan Crainea * [5cf1811aa] : rtpengine: fix checking "cached" stats Credits go to Nick Altman for reporting this in ticket #1500 (cherry picked from commit e7fa92cc2c8124f40240deecdc56ad2f258ff21a) 2018-11-27 Razvan Crainea * [d7f636733] : compression: fix leaks when message was rebuilt When the initial buffer had to be changed, the previous one was no longer released, resulting in a memleak. Credits go to Jock McKechnie for reporting and providing testing env! (cherry picked from commit be3b60366763c3c0390f20be590420440c834204) 2018-11-27 Bogdan-Andrei Iancu * [7c785fc4d] : Correct parsing IPv6 address Manual backport of 7b2a296daa1fee0c9a6c7cd2f0be2bfde25e0e0b 2018-11-27 Bogdan-Andrei Iancu * [e6aead732] : Improve docs A bit more details on handling GRUU. Thanks to Robert Dyck for contributing on this. (cherry picked from commit 2fa7389b973360c12c46963ec6cef9bb038e3b0d) 2018-11-26 Liviu Chircu * [4aec0b238] : Logging: Fix missing '\n' endings (cherry picked from commit 3f698a26c816d8b14530da65f208f417845d0852) Conflicts: modules/cachedb_cassandra/cachedb_cassandra_dbase.c modules/dialog/dialog.c modules/tls_mgm/tls_mgm.c modules/uri/db_checks.c 2018-11-26 Liviu Chircu * [f82c49eb9] : acc/dialog: Drop redundant operations (cherry picked from commit 770ff565f99554dedc606c98f1d31c1947a07470) 2018-11-26 Liviu Chircu * [59667fb08] : registrar: Fix a flag parsing limitation Once again allow the "i" and "e" flags to be given before or after the regexp following the "u" flag. Many thanks to @ivanoff946 for reporting! Fixes #1545 (cherry picked from commit 20f13a53d5460ef610bb784734e093cfd43ff218) 2018-11-26 Razvan Crainea * [156cc6f0b] : b2b_logic: use late negociation for last ACK using MI bridge (cherry picked from commit 25fb33ee7f562b1f2b7a4001d9c6460ba3199a04) 2018-11-26 Vlad Paiu * [471be6300] : Fixed dr_number_routing crash with empty partition (cherry picked from commit b0bf9270729b0de5f7894688411353e1c5738be3) 2018-11-26 Bogdan-Andrei Iancu * [e2d1a67ab] : Fix formating floats in SQL queries. Force POSIX locale for LC_NUMERIC to be sure that the dot separater is used when using floats in SQL queries (some locales are using the comma for that, breaking the SQL syntax). Closes #1538 (cherry picked from commit 0ccda2e249890238f94736dfd8b179c359afa8f0) 2018-11-25 OpenSIPS * [24dbe1d01] : Rebuild documentation 2018-11-22 Liviu Chircu * [405d2889b] : acc: Fix buffer overflow The set_dlg_value() code would initialize the buffer to STRING_INIT_SIZE (128) bytes but then immediately proceed to using it without any more length checks, thus corrupting the memory any time it is run with larger than 128-byte acc_extra values. 2018-11-22 Aron Podrigal * [1d9e1f36d] : Fixed what was missed out in 6bc2a94 refs #1537 (cherry picked from commit 3462e8906c878f779ba696db29b3610606f0d9f5) 2018-11-22 Bogdan-Andrei Iancu * [b4f7ad3a2] : Fix nested triggers of local route. Use a dynamically allocated sip_msg struct rather than a static one. Credits go to Aron Podrigal to spot and report the problem. Addresses #1537 (cherry picked from commit 6bc2a94c85d61c61f50ed5fc63e626a23a63258e) 2018-11-22 Razvan Crainea * [4b5e254a2] : net/tcp: listen for read events after async connect After an async connect succeeds, the fd should also be added in reactor for read events, otherwise these will be lost. Many thanks go to Pete Kelly for reporting and testing! (cherry picked from commit ca643dee0f8851be7c1756bd270f168e41fb053c) 2018-11-22 Bogdan-Andrei Iancu * [95bf163ae] : Fix setting loop params during fallback. While doing a prefixless rule matching, reset the rule_idx to be sure we break the fallback looping. Addresses #1536 2018-11-19 Liviu Chircu * [e25895624] : acc: Do not dereference NULL dialog contexts This bug could be triggered in failover scenarios, where the accounting context would be created and cleaned up at least once before actually calling do_accounting(). One way to trigger it would be: * create_dialog(); * $acc_extra(foo) = "bar"; # create a dialog-stored acc context * t_relay(); exit; # msg is relayed, but ctx is unused => the code frees it and leaves a NULL dialog value marker. * inside failure_route, do: $acc_extra(foo) = "bar". We fetch the NULL context stored inside dialog, dereference it and crash. Many thanks to 46Labs for reporting this issue, as well as providing extensive troubleshooting information. (cherry picked from commit 6eb14f6a3d23bb6a646aa414907755ea9b381511) 2018-11-19 Fabian Gast * [ce6512a4e] : Fix changed iana url (cherry picked from commit 97dbc56a44b0cbfd7321cc03adc9a0f4ba044632) 2018-11-18 OpenSIPS * [c6d75e7b8] : Rebuild documentation 2018-11-16 Liviu Chircu * [0f075233e] : tm: Properly re-init branches after t_relay("0x02") fails A t_relay("0x02") failure would do the required t->uac[] array element buffer cleanups (good!) but then have these elements completely zeroized (bad!). These entries must additionally be initialized afterwards, similarly to how init_branches() leaves them after a new transaction is built. Many thanks to Debasis Das from Twilio for reporting this bug. (cherry picked from commit 853755f11d372c29866bed948796320314540084) 2018-11-15 Razvan Crainea * [3fe6c3804] : event_jsonrpc: use an unique flag for declaring events (cherry picked from commit 8bbc185888730fc1c49a8b3f3fec1550afbf4a74) 2018-11-14 Liviu Chircu * [fb2aaf65e] : rest_client: Fix swapped parameters Affected functions: async rest_post() and async rest_put(). Reported by Ben Newlin. (cherry picked from commit 8f73149b26a142b2511804b9c7385babc916874b) 2018-11-14 Razvan Crainea * [c940412bb] : rtpengine: reconnect socket in case of bad fds (cherry picked from commit 2bee3c6df0a4a1c6ffde7556c95c7ee88b923b6f) 2018-11-13 Bogdan-Andrei Iancu * [bc859828a] : Fix annoying bogus error log (cherry picked from commit 42934c42400842a2e72e6766e040037f366643f4) 2018-11-12 Liviu Chircu * [7730f225b] : dialog: Fix outdated warning (cherry picked from commit ae32d8e487e37955be7e594dd439eb03f3554dfc) 2018-11-11 OpenSIPS * [8d3d8b8a4] : Rebuild documentation 2018-11-11 Liviu Chircu * [d6a6e8d68] : build-contrib.sh: Fix a counting bug with renamed modules The "pre-rename" documentation-related commits were being skipped when dealing with renamed modules. 2018-11-10 Liviu Chircu * [30a7d8773] : Improve documentation * sql_cacher: fix grammar * usrloc: fix out-of-date explanations; improve wording * rtpproxy: improve function signatures (each param is optional) * acc: Add $acc_leg examples (negative index); Add links * fix typos (cherry picked from commit 03c910bdf36a5740ee0f79b146ad46895d2ecda9) 2018-11-09 Vlad Patrascu * [3d23d0fcf] : sql_cacher: small doc improvement regarding delimiter parameters (cherry picked from commit 3b1c13a749328a9f3e341d942ca2a990e95ae877) =========================== Release 2.4.3 ============================== 2018-11-08 Razvan Crainea * [7704abb72] : Bump version to 2.4.3 2018-11-08 Razvan Crainea * [a67387f3a] : tls_mgm: fix tls_method for openssl >= 1.1.0 Reported by netaskd(GitHub) in #1517 (cherry picked from commit c5d6c087268c09d0acd0fa7bd3cdb321207c1536) 2018-11-08 Bogdan-Andrei Iancu * [a9eba1f38] : Fix INT only restriction on integer columns in DR The mysql views report any static integer as DB_BIGINT, makeing it impossible to be used with drouting. 2018-11-08 Bogdan-Andrei Iancu * [6a11f68cb] : Fix too script restrictions on allowed types of routes for runing certain functions. 2018-11-08 Razvan Crainea * [7943ae41d] : registrar: fix contacts re-alloc issue When more than 20 contacts were serialized in a buffer, the realloc was not allocating enough space for the buffer to hold all entries. This lead to a memory corruption and further to a crash. (cherry picked from commit 54ca97b50ad0f52d43a5b6819ce7f42ea019ecc6) 2018-11-07 Liviu Chircu * [a9b916954] : opensipsctl trap: Be quiet if opensips is not running (cherry picked from commit 5dee6cd8e13ba7c8442db833c8eb7ef4e8163413) 2018-11-05 Liviu Chircu * [489de02c4] : usrloc: Fix a replication bug of commit 7c13f2e7d8 Do not overwrite the K/V storage buffer while reading additional data from the received update packet. Reported by @sekil75 Fixes #1523 (cherry picked from commit 41fd98ea2025fdce0e9d031a91b27b052bc851e9) 2018-11-05 Liviu Chircu * [ab005ac75] : usrloc: Fix possible crash in federation mode (cherry picked from commit 3650af33bf4a45d0f783375878bf4921a2b823bc) 2018-11-05 Liviu Chircu * [98706f3c3] : rest_client: Fix warnings with clang 5.0 (cherry picked from commit 6126c2039e9ed6d2820e1dd3a66c97af4087da08) 2018-11-05 Liviu Chircu * [f3e73546b] : rest_client: Update documentation (cherry picked from commit 59da2616ada4457447a5f816b1620e59577fffad) 2018-11-05 Liviu Chircu * [8e480668e] : rest_client: Add new error return codes for all transfers 1: success -1: connection refused -2: connection timeout (i.e. 'connection_timeout' was hit) -3: transfer timeout (i.e. 'curl_timeout' was hit) -10: internal error (i.e. "I hope OpenSIPS is still running") This patch also includes additional fixes related to error handling: * fix undetected error conditions on "async-but-blocking" transfers (these transfers happen once you hit 'max_async_transfers') * fix a bunch of code paths where the rest_() functions return success despite not being able to set one or more output pvars * never abort(), regardless of what libcurl says (cherry picked from commit 04e2ef3d091bba7a237589be03f53f27deabf413) 2018-11-04 OpenSIPS * [1fd7e2eb0] : Rebuild documentation 2018-11-02 Vlad Patrascu * [82f0d7587] : dialog: complete the fix in commit 596c39d9 This commit improves the previous fix that was incorrectly allowing DLGCB_EXPIRED callbacks registered by other modules than acc and cgrates to be run. (cherry picked from commit 3642e3f9e8eb70bce3793c0216bec63518bfc8be) 2018-11-02 Razvan Crainea * [cbb888a07] : dialog: enhance LOADED and EXPIRED callbacs docs (cherry picked from commit 37c56cf3973611a19e52aa13abd3616d2f4148a4) 2018-11-02 Fabian Gast * [35252a877] : fix quotes in clusterer documentation (cherry picked from commit af8c95bfa80fe5597522771f8268925533d4209a) 2018-11-02 Vlad Patrascu * [c60b94958] : dialog: do not unnecessarily fetch sharing tag state (cherry picked from commit f511f1c73dcdd64fdebe71205f5009ebf2da149e) 2018-11-02 Vlad Patrascu * [c037e104f] : dialog: fix behavior of backup node when replicating dialogs The node that has a backup state for the sharing tag of a dialog was incorrectly: * skipping the replication of all dialog events * bypassing all registered DLGCB_TERMINATED and DLGCB_EXPIRED callbacks This behavior was causing issues when replies and sequential requests did arrive on the backup node. Eg. unable to match and fix the BYE for an existing topology hiding dialog. After this fix, only the acc and cgrates modules will skip all actions in the above mentioned callbacks if the sharing tag is backup. (cherry picked from commit 596c39d905dec66c87cf04ac43cac63921c1b7b8) 2018-11-01 Razvan Crainea * [1cd794c4d] : usrloc: use contact id in update replicated msg This commit also sends the contact_id in a replicated update packet. This is useful when the instance that receives the replicated update does not have the actual contact (it previously expired), and needs to treat the update as an insert - before this patch insert would have generated a new contact_id, possibly overlapping with another one generated by the primary server. (cherry picked from commit 7c13f2e7d89a8e5f297f0d29faa047b1b1a5cb04) 2018-11-01 Bogdan-Andrei Iancu * [e3dca71ee] : Fix delete query for expired presentities. Set the table to be used again before the delete (even if already set before the select), as other called functions like publ_notify() may change the table. Reported by Dan Pascu. 2018-11-01 Liviu Chircu * [ede4db8ce] : HP_MALLOC: Recover from double pointer free Similar idea to commit 2254d00115. Related to #1518. (cherry picked from commit 9094b55152423617d9c4455ae9513b881616eaff) 2018-10-31 Razvan Crainea * [c76ce3913] : stun: prevent buffer overflow on error (cherry picked from commit dca22b0484725ddbbbb7d8acd1e0faf57f278e38) 2018-10-30 Razvan Crainea * [bad974abe] : trans/sdp: fix detection of first line (cherry picked from commit b8e3f61a7b1b95cc8f8e0cece789271e2867cd7d) 2018-10-29 Liviu Chircu * [0a357a93a] : mid_registrar: Do not panic on 200 OK with external contacts It is fine for 200 OK registration replies to occasionally include extraneous contacts which did not register through the mid-registrar (i.e. they are missing the ";ctid=" Contact URI parameter). Reported by Jeff Pyle Fixes #1516 (cherry picked from commit 20082b28fe95a4f0ad2eba9832f21b7c1f2778bf) 2018-10-29 Bogdan-Andrei Iancu * [9641eb0ac] : Fixed missing etag condition in DB query. After refactoring the code to enable clustering in 2.4, some of the DB queries for updating / deleting the presentity records were missing the etag condition. As a result you may have experienced records leaking in DB or strange errors about unique key violation. Many thanks for helping with the troubleshooting to Dan Pascu @ AG Projects and to Ognjen Šešlija. Closes #1422 Closes #1378 (cherry picked from commit 1ac9010f4fb8fff513ce25e06fdf210412c4a39b) 2018-10-29 Razvan Crainea * [c0355560c] : menuconfig: add stdio header (cherry picked from commit 0f939682e89caa188aad53c9f4cb4051bd6f45ad) 2018-10-28 OpenSIPS * [893bd0418] : Rebuild documentation 2018-10-27 Liviu Chircu * [4f017ec93] : rest_client: Plug pkg leak on failed async transfers (cherry picked from commit fe5e1b8da01ba0e5698e080c27726cf2abb74249) 2018-10-27 Liviu Chircu * [d3011e374] : rest_client: Refactor duplicate code (cherry picked from commit 10d9b42c2a702751781f2856f71aaca86bb70a79) 2018-10-27 Liviu Chircu * [a78121039] : rest_client: Repair poor timeout settings at startup (cherry picked from commit a2a8dc78d2a78676ce1f5b8c9b8f31ef27cb1906) 2018-10-26 Bogdan-Andrei Iancu * [5fa431eb2] : Fixed crash in starting with HP_MALLOC The HP allocator seems to init its stats after the statistics collector starts, so any malloc operatation translates into a crash (before init'ing the stats colector). Move the first shm malloc after the the collector init. Reported by Nick Altmann 2018-10-26 Razvan Crainea * [cdb82ba0f] : tcp: init tcp req even for CRLF pingpong Before this commit, the TCP request was not released for ping-ping constructed using multiple packets. This lead to an unknown state in the TCP parser, hence an abort() was triggered. (cherry picked from commit c20181fa36de2d96d6dd9e8dbc533bcc6b95d8a8) 2018-10-26 Razvan Crainea * [bfa40859f] : bin: fix invalid memory access Inspired from a3a260d7d45868382d00ee366e00000e7badd36a (cherry picked from commit 63f0ad718861870a1ba6d931db573ab6e98627a3) 2018-10-26 Razvan Crainea * [f32e9cbdd] : net: reset msg attempts every time a msg is fully processed (cherry picked from commit 6a4bf36ca3524e0211a874c9d5e62c65b33cb28e) 2018-10-26 Razvan Crainea * [cf1c7ece5] : proto_hep: reset msg attempts when request is completed (cherry picked from commit bf74fccad45e85869f1fb73d47787c7c661bfeff) 2018-10-26 Bogdan-Andrei Iancu * [9da632181] : Fixed wrong error messages. Reported by Nick Altmann (cherry picked from commit 40c73fc1bada8fea20b0408186da2ed15eb8c285) 2018-10-23 Liviu Chircu * [0cbcdf97a] : drouting doc: Fix bad examples and descriptions * dr_is_gw() works fine with any pvar * is_from_gw(): clarify that it matches IP + port * improve example quality (cherry picked from commit 8c4ac521bfeaddb68ff9a9dd96f556e3d8c38b0d) 2018-10-22 Razvan Crainea * [d4ae514a7] : rtp*: add errno in error output (cherry picked from commit 36e6c87f0e8acff7da43d7838cb5067174f956ac) 2018-10-22 Razvan Crainea * [a36c93e30] : debian: add python module (cherry picked from commit bd86da3db984ff024abb467d809e51fe88f89a45) 2018-10-22 Razvan Crainea * [aecf13b51] : dialog: release bin packet on prof replicate error If the profile cannot be replicated, release the bin packet to prevent pkg memory leak. (cherry picked from commit 4032ef0ed9ddb45b3cd66e49511a689b4555e508) 2018-10-22 OpenSIPS * [ac0cc156b] : Rebuild documentation 2018-10-19 Liviu Chircu * [026ec3dc3] : clusterer: Improve handling for NULL sip_addr A NULL sip_addr field should result in a false sip_addr matching with any other node. This prevents unnecessary error logs in simple federated usrloc setups (no HA) where we don't necessarily need to fill in a "sip_addr" field for each node. (cherry picked from commit 0cf846a1e1e7fb76960598bb1738033aa9597343) 2018-10-16 Bogdan-Andrei Iancu * [f98a70187] : Improve docs Add external reference to the advanced ACC tutorial (cherry picked from commit 3f04700e329f19c4024bb4cc1e2d70d3558cbd39) 2018-10-16 Dan Pascu * [2ab5efed1] : Fixed memory leaks when freeing socket_info 2018-10-16 Dan Pascu * [e80f2fc8f] : Fixed illegal memory access after being freed 2018-10-16 Liviu Chircu * [6be7190f3] : siptrace/script_helper: Fix crashes with missing headers Thanks to Ben Newlin and Jon Abrams for spotting this issue! (cherry picked from commit b14f1435e0a3da22ab4fded86aeb4d94a050f775) 2018-10-15 Liviu Chircu * [4726deab2] : db_postgres: Fix doc build (cherry picked from commit b8b33e9a4e56301e89d439135c312daf4cd8d0b0) 2018-10-15 Liviu Chircu * [4deea5a25] : dialog: Fix a decrement bug with shared profiles Thanks to Vlad Pătrașcu for helping troubleshoot this one! (cherry picked from commit 681155e4baef0075dbbf573b3c367efff34d0648) 2018-10-11 Razvan Crainea * [957fcf03c] : acc: fix leak when registering missed 2nd time When calling do_accounting() twice, and the second time was containing the "missed" flag, the actual acc context was leaking due to an extra ref. This commit unrefs the context at the end of transaction. Many thanks to Arto Kuiri for reporting this and for providing valuable debugging information! Close #1489 (cherry picked from commit 741c6f346b6b5e94f7991ab41c1bf9a9e89473af) 2018-10-09 Vlad Patrascu * [263aaff08] : Fix detection of the $json pseudo variable type This fixes incorrectly thrown parsing errors for the json_link() module function and also when using $json iterators in foreach statements. (cherry picked from commit dfa727713195e8a1a83cd4bf4f144793b7f28e86) 2018-10-09 Bogdan-Andrei Iancu * [1d958112c] : Revert "Merge pull request #1485 from vasilevalex/drouting_sock" This reverts commit f5f666b4e8014b299bf1996b42aab720c1d2054c, reversing changes made to 989b7b939c1f88e4ba6fe18e44ec640ca2f9a467. 2018-10-09 Bogdan Andrei IANCU * [f5f666b4e] : Merge pull request #1485 from vasilevalex/drouting_sock Drouting module probing socket parameter 2018-10-08 Alexey Vasilyev * [17e607092] : Docs for probing_socket parameter in drouting module 2018-10-08 Alexey Vasilyev * [ec1b4835b] : Added probing_socket parameter for drouting module 2018-10-08 Razvan Crainea * [989b7b939] : async: fix fd leaking and invalid memory overwrite Also simplify the async interface to prevent dereferencing the fd. This commit combines the following master commits: 9b45482861c53d79718f4eeff57a25b278964c5f 2b264d0b8c0b8f25d1e895247a1f0f8697ae34e5 ac549a0d5f3a084cd7034bf45b603f95c64025af Kudos to Liviu Chircu for brainstorming and optimizing the initial fix. 2018-10-08 Razvan Crainea * [e2761e0f7] : db_mysql: add support for mysql 8.0 Fix includes path to prevent adding mysql from source code. no longer define bool for libmysql > 8.0 Credits go to KetanKothari(IRC) for reporting this. Close #1456 (cherry picked from commit 13c6bbbf7bdefeb314ba3624b311684c366c33bc) 2018-10-03 Liviu Chircu * [8024abdeb] : str_strstr(): Fix unnecessary error log (cherry picked from commit 640263ded013767b25a19eea8bf1276a5f6be5b0) 2018-10-03 Bogdan-Andrei Iancu * [d3e0a86b9] : Fix error logs in terms of missing newline or formating (cherry picked from commit 76cf8f4513b0de4353ee52dec5e4df00f23dc493) 2018-10-03 Bogdan-Andrei Iancu * [6c6e271ce] : Properly set the custome values for the dr tables. IF set via modparam, be sure we recalculate the len of the new table name BEFORE we start using it :) Thanks to @nikbyte and @kertor for report and help. Closes #1479 (cherry picked from commit a9cd32d75530b79a365f9262f0f919285048cbf7) 2018-10-02 Bogdan-Andrei Iancu * [87376b703] : Move initial data load post-startup sequance Instead of loading the DB data during the startup sequance via init_child (and potentially blocking/delaying the oveall OpenSIPS startup), do the data load via IPV job after the startup. (cherry picked from commit 32cba1d751ee5a5b705da97ac4333fcad3d67728) 2018-10-02 Bogdan-Andrei Iancu * [1d9fa68ff] : Do not print error if the tm API is not available 2018-10-02 Bogdan-Andrei Iancu * [c0fd2f810] : Fixed crashes and mis-behavior in tracing * do not crash if siptrace loaded but not sip_trace() done from the script * do not crash when using sip_trace() without the tracing scope (m,t,d) * properly enable dialog/transaction tracing (best effort depending on the loaded modules) when using sip_trace() without the tracing scope (m,t,d) 2018-10-02 Liviu Chircu * [0a062411a] : dispatcher: Do not start without any partitions (cherry picked from commit a1b1f38088a0306310dfeffc189dd813015a93bd) 2018-10-02 Razvan Crainea * [935add78b] : compression: fix memory in mc_compact() The function was not releasing the parsed bodies for known headers Reported by Jock McKechnie on mailing list (cherry picked from commit 3fef51da747721895fe418987dd8c5db025d478a) 2018-10-01 Di-Shi Sun * [fd4c9ef41] : Bug fix Fixed memory leak for 6xx. Fixed memory leak for cancel call scenario. Fixed memory leak issue for P-Charging-Vector. Fixed SDP error messages for without SDP. Fixed UTF-8 issue. Fixed crash caused by without calling number. Fixed retcode issue. Fixed From header URI otg parameter parse issue. Added q parameter for Contact in SIP 3xx. Added np export order option. Added string trim function. Updated STIR implementation. 2018-10-01 Liviu Chircu * [8462580ef] : Fix compile error on the Travis environment (cherry picked from commit cfc0259886e1a1b0724bf7066e42c0532534cbca) 2018-10-01 Liviu Chircu * [a73128fd5] : acc: Fix constant-sized pkg leak on startup (cherry picked from commit 1c60e0e49fd1f53c316fc8affd296f99fa83d39f) 2018-10-01 Liviu Chircu * [91320f767] : mid_registrar: Fix segfault on invalid AoR parameter How to reproduce: mid_registrar_save("location", , "3600"); (misplaced parameter: we actually provide a bad AoR SIP URI!) (cherry picked from commit f24351189abb9acc4da1f0485c173f8f02fded3b) 2018-10-01 Liviu Chircu * [cd597cb0a] : acc: Inherit db_default_url if db_url is not set (cherry picked from commit e4747712bc99b6fedf3f2ec35ebf71198466ca35) 2018-10-01 Liviu Chircu * [d8c5ccc7c] : dialog: Remove unused function and parameter (cherry picked from commit bc840ad7bd2dc4cc785abd0b4df8c06790e2b09e) 2018-10-01 Liviu Chircu * [f574ae9ec] : dialog: Document the callbacks (cherry picked from commit 849ca807c7792a0598d53907328044718845f282) 2018-10-01 Liviu Chircu * [51d56f529] : acc: Improve code quality (part 2) * avoid cryptic str concat macros; just use init_str() * set_dlg_value(): truncate bogus strings before realloc'ing buffer * allow any whitespace chars while parsing type/flags (why not?) * remove extraneous function parameters * remove redundant conditions * improve some error logs * rename acc_dlg_ctx_cb() -> acc_merge_contexts() * rename acc_dlg_callback() -> acc_dlg_ended() (cherry picked from commit fc48765ad3c0d72f1a39583970e440343248c69e) 2018-10-01 Liviu Chircu * [386bc61a0] : acc: Improve code quality * rename expand_legs() -> push_leg() (self-explanatory) * do not use non-paranthesized macros as functions * simplify store_acc_table() and avoid shm_realloc() leak on oom * do not pass redundant function parameters * remove redundant ACC_PUT_CTX() calls * use str_strcmp() for added readability * acc_onreply_in(): improve readability (cherry picked from commit 13c8244691db9541c92e45ab74d1e0a57cdbdf63) 2018-10-01 Liviu Chircu * [75426ed8a] : context API: Inline all getter/setter functions (cherry picked from commit d41b5da71db487410c7dbae68be100e4fe1a94ca) 2018-10-01 Razvan Crainea * [280a4dafc] : db_postgres: add timeout parameter Prevent db_postgres from getting OpenSIPS stuck trying to connect to an unreachable PostgreSQL server. Credits go to Andrew(kertor) for reporting this. Close #1443 (cherry picked from commit c7e91f5356c9888c7d9c171cb12bd27a1412922d) 2018-10-01 OpenSIPS * [b8559535d] : Rebuild documentation 2018-09-27 Liviu Chircu * [4290b2334] : topology_hiding: Fix possible startup crash How to reproduce: loadmodule "topology_hiding.so" loadmodule "dialog.so" ... without enabling "force_dialog". Alternative, temporary fix (until you update your binaries): loadmodule "dialog.so" loadmodule "topology_hiding.so" (cherry picked from commit d837021b1558da7a147197e60e2d6d61570dc978) 2018-09-27 Liviu Chircu * [bf7a5a729] : ip_addr2a(): Improve error handling Do not return a NULL pointer when attempting to print an unknown address family, rather an empty string. Reported by @danceinrain Fixes #1478 (cherry picked from commit a5a3644a4bef21f0fc042d92d4e0166bb94a9ffa) 2018-09-27 Liviu Chircu * [01151f5e7] : Fix some JSON-incompatible MI replies (cherry picked from commit c658e07b07f63e17535ecac998bf30ff02f0ad78) 2018-09-26 Liviu Chircu * [cb43020ee] : rest_client: Fix some POST/PUT corner-cases This patch addresses two rare bugs such that they may now only occur with old curl versions (pre 7.17.1, that's pre 2007). When calling rest_post() or rest_put(), assuming we're fetching the request body buffer into "req_body" via fixup_get_svalue(): 1. since req_body->s is not dup'ed and may point to a PV buf, the next SIP message may impact the currently "just launched" async transfer by overriding the value stored in the PV buffer before libcurl fully reads it 2. req_body->s is provided by a PV which does not NULL-terminate strings (e.g. $du), thus curl's strlen() may overflow or crash (cherry picked from commit c2c7b052b4b4d05abde20520098acc68f8cd3ed0) 2018-09-26 Razvan Crainea * [d764955ee] : rest_client: prevent overflow in Content-Type (cherry picked from commit c92794e1899ca5fbfc8e9ad488026cc5f344e68a) 2018-09-24 OpenSIPS * [19f01bb60] : Rebuild documentation 2018-09-20 Nick Altmann * [d7bac87b3] : RPM spec: fix scenario_callcenter.xml file 2018-09-20 Razvan Crainea * [32d3679f7] : call_center: deploy scenario file at install Deploy the scenario_callcenter.xml b2b scenario file at install. Thanks go to cleberb on GitHub for reporting this! Close #1464 (cherry picked from commit a6d681c89a583cbeec372b90ca25a8ccc09cffe0) 2018-09-20 Liviu Chircu * [7dbaa1aa3] : Change source file mode to 644 (cherry picked from commit ac91f3cda4e6b194dc8284128bf9e903df875f12) 2018-09-20 Peter Lemenkov * [25ebc3caf] : Change file mode to 644 (cherry picked from commit 029d2cf72ca792ceb874f400c432466238438fa5) 2018-09-18 Razvan Crainea * [e7003dfb0] : fix possible crash introduced in 6fcbcc8 (cherry picked from commit af98f58a4c30f19af2b2f7da99f389b9f9c252d7) 2018-09-17 Liviu Chircu * [d8e37cbb4] : sql_cacher: Fix invalid memory access Similar to commit a223c82024. Avoid returning a pointer to a freed pkg memory area. (cherry picked from commit 313a3438717f8cb790aec9703037b82a66db3f4f) 2018-09-17 Liviu Chircu * [9ad56bc53] : core: Fix poor oom handling When nearing oom, any failed branch buffer allocations could lead to a crash due to a lingering freed pointer. Thanks to Răzvan for helping catch this one! (cherry picked from commit c2f8b9807837bd8dd143a33cb555b050fb7a8d72) 2018-09-17 Liviu Chircu * [2c79c8b85] : sql_cacher: Minor optimization Optimize the number of buffer realloc operations when fetching cached values. (cherry picked from commit 5516398fc63567ec13cb443c5009ad13473ac096) 2018-09-17 Liviu Chircu * [631b05be3] : sql_cacher: Fix possible invalid memory access This patch ensures that we properly duplicate (and later free) any strings contained in SQL DB results before freeing these results and returning the strings to the calling layers. We also add the is_str_column() macro, which improves code readability. (cherry picked from commit a223c820247398bc54f38aea5f6a9461d8500980) 2018-09-17 Liviu Chircu * [f74a57d32] : sql_cacher: Improve on_demand_load() * while loop: rewrite so we reduce indentation by 1 level * remove redundant code -- "if (!it) {" condition (this also drops code indentation by 1 level! yay!) * fix pkg mem leak on NULL column or bad res type (cherry picked from commit 827cee77b566f5d304b3bfeb9bd284cb770b8914) 2018-09-17 Liviu Chircu * [7b8205e3f] : sql_cacher: Fix several memleaks insert_in_cachedb(): * fix pkg leak on failed CacheDB set * fix pkg leak when running oom load_key(): * [!] fix pkg leak on successful case (return 0) * fix two pkg leaks on failed CacheDB operation * fix pkg leak on bad table name mi_reload(): * fix pkg leak on failed CacheDB add (cherry picked from commit 449e0371e7890ab4fb355586fec2e13c3f8c3db3) 2018-09-17 Bogdan-Andrei Iancu * [113973a7b] : Rebuild DB schema 2018-09-17 Bogdan-Andrei Iancu * [03c852303] : Fix URI_LEN defintion 256 was a typo, 255 is the max len for a varchar in mysql Thanks again to Brandon Lee @palmtown Related to #1462 (cherry picked from commit 2f5e5ffa7ffc272283aba919e112140085c94279) 2018-09-17 OpenSIPS * [b8791ebd6] : Rebuild documentation 2018-09-14 Alexey Vasilyev * [1de41bc85] : Correct example in docs for t_add_cancel_reason (cherry picked from commit 224ae25a451e43a2c694aa99dbe62a9456425df2) 2018-09-14 Razvan Crainea * [ba4c2537a] : dialog: fix deadlock when freeing a cell on timer When freeing a dialog on timer, sequential destroy callbacks might try to fetch the dialog lock, resulting in a deadlock. The spotted backtrace is dialog_update_db -> destroy_dlg -> free_dlg_dlg -> destroy_dlg_callbacks_list -> unref_acc_ctx -> free_acc_ctx -> store_dlg_value Thanks go to Jonathan Hulme for spotting this and offering testing (cherry picked from commit 6fcbcc816b6d8224ed97f14cec74181c0fe6423f) 2018-09-14 Liviu Chircu * [6f03fd6a7] : opensipsctl: Loosen lockfile permissions This allows opensipsctl to be run from a non-privileged user after it is run from a privileged (root) user. Thanks to Răzvan Crainea for spotting this issue! (cherry picked from commit ca788dcba0143cc790aa28312216804ef673db30) 2018-09-14 Razvan Crainea * [87c5f96d8] : dialog: fix leak of 0-lenght frags in dlg profiles In case a dialog does not have any profiles, the previous code was leaking 0-length fragments. Thanks go to Nick Altman for reporting this. (cherry picked from commit 8c6bbd261338b01e3f49b3b8c741c85719a37c9a) 2018-09-13 Vlad Patrascu * [35e5d67b0] : rest_client: fix uninitialized warning 2018-09-13 Vlad Patrascu * [514ba0313] : db_mysql: fix uninitialized warning 2018-09-13 Vlad Patrascu * [cbff0c006] : tls_mgm: fix IPv6 support in TLS domain definition 2018-09-13 Bogdan-Andrei Iancu * [c8f94f5cc] : Regenerate DB schema 2018-09-13 Bogdan-Andrei Iancu * [6614f3a47] : Fixed len for the username column (cherry picked from commit b66851b9eab4f1d5685dea19e3c38e74405c5abc) 2018-09-13 Bogdan-Andrei Iancu * [c73a9ca3d] : Fix IPv6 related storage capacity. Extand SIP_URI from 128 to 256 to be sure that IPv6 containing URIs (especially SIP contact URIs) to fit. Closes #1462 (cherry picked from commit 6c8370be3da4b32240a4cd12fd71436ab9de78d7) 2018-09-13 Bogdan-Andrei Iancu * [beaace466] : Fix IPv6 support in lb_is_destination() and lb_count_call(). (cherry picked from commit c4505fadb1c4cd1207b489103a909d46a4acb262) 2018-09-13 Bogdan-Andrei Iancu * [ddc5d21e4] : Fix IPv6 support in ds_is_in_list(). Closes #1459 (cherry picked from commit 774c22d83eace7b7e0d37f503f8759ffffdf5f9a) 2018-09-12 Dan Pascu * [b43be4477] : Improved log message 2018-09-12 Dan Pascu * [96b0f9118] : Adjusted logging of private memory used based on its configured type 2018-09-12 Dan Pascu * [791af6f6e] : Adjust the reactor size in accordance to the type of memory being used 2018-09-12 Dan Pascu * [4bedd3aeb] : Fixed displaying the memory size 2018-09-11 Dan Pascu * [9b1af1d03] : Fixed segmenation fault caused by accessing deallocated memory 2018-09-10 OpenSIPS * [870cb2d16] : Rebuild documentation 2018-09-04 Vlad Patrascu * [e046d9495] : cachedb_cassandra: update documentation (cherry picked from commit f85724f9b229548542ccfa6b5a157ad3d7b534bd) 2018-09-04 Vlad Patrascu * [c749b1bfe] : cachedb_cassandra: check if counters table exists before using it (cherry picked from commit a81860e6050a70afcd6da18d9b75be02ebaf1af4) 2018-09-04 Vlad Patrascu * [59683463c] : cachedb_cassandra: use quoted identifiers in queries (cherry picked from commit c58945b324281a3a243e97300dffd5ca2755c26f) 2018-09-04 Vlad Patrascu * [606871f85] : cachedb_cassandra: change the separator in the URL database to '.' (cherry picked from commit 37d240643301053a0f6ba9f2558a3e8e60500556) 2018-09-04 Vlad Patrascu * [c069db079] : cachedb_cassandra: update driver Update the OpenSIPS Cassandra driver from the deprecated Thrift based implementation to the newer DataStax C/C++ driver that uses Cassandra's native transport protocol and the Cassandra Query Language. Closes #1117 (cherry picked from commit 6f873a7fb98e0a2a53e098976a83037390d13efc) 2018-09-04 Vlad Patrascu * [37c12e12e] : Fix OpenSIPS shutdown when running unit tests (cherry picked from commit 52804385100eed36f7a4398df0eec28305f3464d) 2018-09-02 OpenSIPS * [acc45d195] : Rebuild documentation 2018-08-31 Bogdan-Andrei Iancu * [a4605fc22] : Fixed raw query for getting all contact in DB_ONLY mode Following the change of the "expires" column from datetime to int (unix timestamp) - see commit 78e8bea12f023de3fd861ffc297c34b77caafe30 -, the raw query used in DB_ONLY mode to fetch all contacts from DB was not properly migrated. Reported by Adrien Martin ( @adrien-martin ) Closes #1446 2018-08-31 Bogdan Andrei IANCU * [aa1c800b6] : Merge pull request #1448 from vasilevalex/topo_hide_rfc Change topology hiding Contact header to fit RFC 3261 2018-08-31 Razvan Crainea * [7da66308e] : dialog: fix unset_dlg_profile() linkers deletion This commit fixes the following bugs introduced in commit 00cddf7: 1. when it was called, it was removing all the linkers of a dialog 2. it was not removing the actual linker it was called for, causing constant increase in size for that specific profile (and leak) 3. when temporary copying the profiles list, the values were not copied, thus they might have dissapeared when the actual cleanup was done. Many thanks to Jonathan Hulme for reporting the issue and providing testing framework for detecting the bug and testing the fix! (cherry picked from commit 1f350f4bf88d1fbb67bf30d17fd74231417a5fa2) 2018-08-31 Alexey Vasilyev * [d7cb72458] : Change topology hiding Contact header to fit RFC 3261 2018-08-26 OpenSIPS * [8b6830cdd] : Rebuild documentation 2018-08-23 Liviu Chircu * [011f7dddd] : make test: Improve usage * avoid compiling the yacc / lexer code * do not corrupt Makefile.conf if it's missing the ending newline (cherry picked from commit 2504fbd87a52a404b9c32e7b7f46110e8ef4f825) 2018-08-23 Liviu Chircu * [ab06f3959] : mid_registrar: Fix a bug which leads to empty, dangling AoRs In mirror/ct throttling modes, when the downstream element does not reply at all, we must also make sure to properly un-reference the AoR. Reported by @viperlong Fixes #1449 (cherry picked from commit 4d0fbf528042e1e9d94769ec32019a9124d59fff) 2018-08-19 OpenSIPS * [a84e02942] : Rebuild documentation 2018-08-17 Liviu Chircu * [482caf7a9] : core: Fix possible crash with some VPN clients As stated in the man page, when listing the current interfaces, getifaddrs() may return a NULL pointer for the addr->ifa_addr field. (cherry picked from commit 9e8f475e53ed7283de20d91d61e6bb8cd11a2158) 2018-08-16 Razvan Crainea * [344ee0692] : tm: fix preserving CANCEL reason for for t_relay() Thanks to Alexei Vasilyev for reporting it on the mailing list. (cherry picked from commit deb05da54efb247a472fb315974ea37a51516628) =========================== Release 2.4.2 ============================== 2018-08-14 Razvan Crainea * [63a9d0190] : Bump version to 2.4.2 2018-08-14 Bogdan-Andrei Iancu * [9b4e3b877] : Fixed freeing NULL rpl from REDIS server. Reported by @mrmeyers99 Closes #1442 (cherry picked from commit b33b7a7e71ce0b76a80c3abf430f572074869e22) 2018-08-14 Bogdan-Andrei Iancu * [f6219b732] : Fixed reporting the correct query retcode via db_virtual There are mainly 2 fixes here: - correct iteration in the list of connection when failed conns are found or detected - correct aggregation of the retcode, based on all performed queries in the list (cherry picked from commit 8369c3191ed0f355eaf8087767ea113861101a81) 2018-08-14 Liviu Chircu * [2ef4b5d66] : mid_registrar: Update documentation (cherry picked from commit daf2c6d48bcf35fdb72eeb3c7f1d9b6e281085a1) 2018-08-14 Liviu Chircu * [2b78f1746] : mid_registrar: Add the "global lookup" flag Fixes #1431 (cherry picked from commit 20b063f9bf781c569cf8fba8dad9367c7bb9f726) 2018-08-14 Liviu Chircu * [5e259756b] : mid_registrar: Fix broken AoR throttling with use_domain = 1 Enabling both usrloc's "use_domain" and mid-registrar's AoR throttling mode would cause broken advertised Contact header field URIs such as: sip:alice@atlanta.com@10.0.0.10:5060 This patch fixes this issue such that the mid-registrar advertises: sip:alice%40atlanta.com@10.0.0.10:5060 Fixes half of issue #1431 (cherry picked from commit 1d6733cb42ea1a6505486bc02266bf418b97207f) 2018-08-14 Razvan Crainea * [e4f409e2f] : msg_translator: adjust the lumps len with the useful part of the body Discard the extra bytes in the body that are not contained by the Content-Length. (cherry picked from commit ded172901d5d06436034fed9272d29adb37c2985) 2018-08-14 Razvan Crainea * [914049371] : Revert "msg: remove extra bytes from malformed bodies" This reverts commit fecb4b244c3cf84435af03db88bfd88002a69177. (cherry picked from commit ac715eec93a017ca8e42401ddf2678256d225ccf) 2018-08-14 Vlad Patrascu * [1cec6f7d1] : proto_tls: fix crash when tracing an outgoing connection This was caused by attempting to send tracing data that was not ready yet. Thanks to Razvan for reporting and help in debugging. 2018-08-14 Bogdan-Andrei Iancu * [cf88b4b26] : Fix memory leak on redis cache misses Closes #1441 Credits go to @mrmeyers99 2018-08-14 Bogdan-Andrei Iancu * [02b515d76] : Fix wrong chapter'ing in docs (cherry picked from commit 0e978c907d58a868e6c81f4685c1e46189910fc1) 2018-08-14 Liviu Chircu * [d4c065253] : dialog: Complete commit 4ba14e51cbbb Commit 4ba14e51cb did not actually change anything, as the runtime environment was also hardcoded to only write to AVPs / pseudo-vars. We now fix get_profile_size(), as well as fetch_dlg_value() such that they properly write to any writable pvar at runtime. (cherry picked from commit 005b89eed94f207047be8c7a424618b650cd3042) 2018-08-13 Vlad Patrascu * [4a76c0822] : sql_cacher: fix error message when key not found (cherry picked from commit d12c695874f0b52e5d48c427eaa5b6f0082054a4) 2018-08-13 Bogdan-Andrei Iancu * [3475c4a58] : Fix cases in db_url parameter examples (cherry picked from commit 550e8cb8a75dd193ada51fc102e4573c2be862af) 2018-08-12 OpenSIPS * [0191c73d3] : Rebuild documentation 2018-08-10 Liviu Chircu * [a6332fe63] : acc: Fix trivial crash on non-CDR accounting (cherry picked from commit f76cc0eaaad9c6ddb4efd609b9b9bac59b69b941) 2018-08-10 Liviu Chircu * [8df477dc8] : core: Properly handle pre-fork segfaults (prevent attendant from infinite looping in case an early crash occurs) Thanks to Bogdan for catching this one! (cherry picked from commit 1dd17e93b587cbb6c829b942df4d3b100713b178) 2018-08-10 Bogdan-Andrei Iancu * [c3972e1f4] : Suppressed too verbous dbg messages (cherry picked from commit ae6e9665ec8c0585c40abcb51b5ba138e5721423) 2018-08-10 Bogdan-Andrei Iancu * [abc17e9f6] : Fix crash when using an undefined db virtual set (cherry picked from commit c288a1c1ab49b3b40bbb5efa8dd629383b2e34b6) 2018-08-10 Vlad Patrascu * [e45702f5d] : sql_cacher: fix an error message (cherry picked from commit 98662b927bc67b9c9f113e853176f499cd732354) 2018-08-10 Vlad Patrascu * [29b04376e] : sql_cacher: fix db handlers for multiple caching entries 2018-08-10 Bogdan-Andrei Iancu * [a71e41a13] : Fix cases in db_urls parameter doc. (cherry picked from commit ea78949ff7f9725d4a6f278c3d646dacace2d11a) 2018-08-10 Razvan Crainea * [cf0b324ad] : dialog: fix MI profile_end_dlgs return to 200 OK Before this change the command was returning 400 OK on success (cherry picked from commit 3c7f8943aa70f6871a934e450b8e4fffe71b9ddd) 2018-08-09 Vlad Patrascu * [b4da1dcc0] : usrloc: improve docs regarding cluster syncing (cherry picked from commit d82288e8df1fdd30c8326ab202a89370349eca71) 2018-08-09 Bogdan-Andrei Iancu * [ec33af350] : Fix wrong condition in detecting the pass-thorugh body Completes/superfixes 953490775b82f2244eb3b0bcba6232d3d2af4484 2018-08-09 Razvan Crainea * [3582c6e0d] : etc/tls: remove passphrase (cherry picked from commit 7bd8f1dd77352ffde1c8c7721172816aa25149c8) 2018-08-08 Bogdan-Andrei Iancu * [953490775] : Fixed pass-through multi-part body with a single part Previously the code was trying to convert the multi-part with a single part to a uni-part body, but this was incomplet as the Content-type was not updated and the per-part headers were lost. So, a better approach is to keep it as it is (as packing). 2018-08-08 Bogdan-Andrei Iancu * [df9e5a849] : Fixed dynamic dependency on an SQL module Reported by Callum Guy 2018-08-06 Razvan Crainea * [53f40afa3] : db_mysql: re-try query in case of a server deadlock 2018-08-06 Razvan Crainea * [d45194dcd] : acc: rework ref logic for acc ctx This commit tries to fix some invalid memory accesses experienced in high traffic platforms. Credits go to 46 Labs for reporting the issue, providing logs and tests (cherry picked from commit 056d7b95dc29b961c1e41b9fe495574da8b0436d) 2018-08-05 OpenSIPS * [e88114395] : Rebuild documentation 2018-08-04 Liviu Chircu * [bb811b391] : Module doc: Fix missing section IDs (cherry picked from commit 1832dd0735d21e19d950efb2f48019b5cd13cf64) 2018-08-04 Liviu Chircu * [d24efb2b1] : Module doc: Normalize section names (cherry picked from commit b4295bc23a68d78c3ab45ea7c878e901a7d434a5) 2018-08-04 Liviu Chircu * [d79850377] : Improve documentation * tm: - t_relay() "0x02" flag - t_newtran() * acc: $acc_current_leg * registrar: $avp(attr) * dialog: match_dialog() (cherry picked from commit bc0855275ebde456eb0cfd7682774fc316a41dc8) 2018-08-04 Liviu Chircu * [ac12fc933] : Codebase improvements (cherry picked from commit 81771e7c53de6cf85b96f55fbcbd1d9591ca42a8) 2018-08-04 Liviu Chircu * [59231f41c] : Fix typos (cherry picked from commit b93a79e31a79b13fe06ab6a0b89fb3f7f20399e6) 2018-08-04 Liviu Chircu * [efba6a239] : doc/build-contrib.sh: Improve locale management (cherry picked from commit ae97cea6b5354b68659c87396b1ef852f98f115f) 2018-08-02 Liviu Chircu * [61ef877c5] : cachedb_mongodb: Fix modparam typo (cherry picked from commit deb76e340a8322aa7a1eea0d73f40e00867d1c47) 2018-08-02 Bogdan-Andrei Iancu * [9cd488ede] : Allow TEST to be preset as env variable (cherry picked from commit da50df0c8c517d8f2852db32cc7a6f3679582c6b) 2018-08-02 Bogdan-Andrei Iancu * [97061ab10] : Added rtpengine table to default table. This will automatically create the table via "opensipsdbctl create" (cherry picked from commit e3852e9373b5b0d6005111ec78fb5509f0228b8f) 2018-08-02 Liviu Chircu * [e1346ce9f] : dialog: Make get_profile_size() less restrictive Allow any writable pvar to be given for the 'size' output parameter. 2018-07-31 Vlad Patrascu * [67efdb9a8] : tm: add examples for MI commands docs (cherry picked from commit 5f17ed5edead1090007c993da2407a5e72ce7eeb) 2018-07-31 Vlad Patrascu * [0bd252c9d] : dialog: document dlg_cluster_sync MI command (cherry picked from commit 6fcda64a3ea78a5f07b9cf7db65527373b209b51) 2018-07-31 Vlad Patrascu * [2aef25189] : dialog: improve docs regarding profile replication (cherry picked from commit d00f84631cc433554282abef611509e0c81bfc94) 2018-07-31 Bogdan-Andrei Iancu * [04fe5ab6a] : Fix wrong section enclosing for functions. (cherry picked from commit 6ba2a41991d5ba67065b8d13d05c0ced929c448c) 2018-07-30 Liviu Chircu * [b1b706e51] : doc/build-contrib: Simplify external scripting (cherry picked from commit dce68e49123974ab0cc563d0e5ed528d67337a61) 2018-07-26 Bogdan Andrei IANCU * [0e23b77a6] : Merge pull request #1421 from pasanmdev/2.3 * fixed msg payload content to be string rather than binary data (cherry picked from commit fd8c0401d472f35884d70b3bd2d327799275447d) 2018-07-26 Liviu Chircu * [c81c0712b] : auth_db: Fix forced SQL DB dependency Thanks to Michael Mavroudis for discovering this bug. (cherry picked from commit e7c3733cbd5bd4abfd5991ab6d93ba86d0882dfb) 2018-07-24 OpenSIPS * [9c0e0b7e8] : Readme files regenerated 2018-07-24 OpenSIPS * [faad98c0d] : Generated and imported the per-module contri files 2018-07-24 Bogdan-Andrei Iancu * [355c5071b] : Remove the extra '\n' returned by ctime(). Reported by Kirill Galinurov. (cherry picked from commit 01f8f0867431ddb9e085f4cee460e3e748314887) 2018-07-23 Liviu Chircu * [198a9a157] : opensipsctl: Improve the "trap" command * prevent "trap" from failing if the FIFO process is deadlocked * add possibility of trapping input pids by setting TRAP_PIDS= * use the proper binary for each trapped pid * all gdb processes now run in parallel, instead of serially (cherry picked from commit 5fe1878ee5d06ce1cecc12fe64db459422c184d8) 2018-07-23 Liviu Chircu * [ebd9b3570] : systemd: Properly shut down OpenSIPS 2.4+ instances OpenSIPS 2.4 is meant to be shut down gracefully, in order to minimize any form of data corruption caused by partial processing of SIP messages. Running "killall opensips" has a good chance of deadlocking OpenSIPS for the next 45 seconds, especially if it's doing a lot of logging. This is often the case with the current systemd logic. This patch updates the opensips systemd service files so they only deliver SIGTERM to the attendant process. (cherry picked from commit 5e154cb8f9ccb5b1ac4679d8342eb9718a636cf4) 2018-07-23 Liviu Chircu * [82b14ed05] : core: Greatly reduce chance of truncated corefiles Before commit 8073d4de8ed, the SIGTERM signal delivered by the attendant process to a process who had already crashed and would be dumping its memory inside the SIGSEGV handler would stay queued and not disrupt the generation of the corefile. At worst, corefile generation would take above "shutdown_time" seconds (60), and OpenSIPS would SIGKILL its entire process group and definitively terminate. Now, OpenSIPS behavior has changed to: * attendant broadcasts a graceful IPC shutdown job * attendant gives _everyone_ a grand total of 5 seconds to finish * if not ready -> SIGKILL the entire instance This behavior is too restrictive for the average spinning disk performance. Coupled with the fact that SHM pools of 2+ GB are common nowadays AND the fact that, occasionally, corefiles come in multiples, 5 seconds is not a lot of time. This patch fixes the behavior to: * attendant broadcasts a graceful IPC shutdown job * attendant gives non-crashed processes 5 seconds to obey * if not ready -> SIGKILL any processes which are still running * perform cleanup(60 sec) (leave the core-dumping processes alone) * exit or abort cleanup (leave the core-dumping processes alone) Thanks to Bogdan for significantly directing the design of this patch (cherry picked from commit 9c5b1b9503af2e1b76ca9e8f4c5b9b187697e895) 2018-07-23 Liviu Chircu * [0d5864c24] : core: Clean up outdated SIGKILL-based shutdown code When not in "debug" mode (i.e. when opensips successfully daemonizes), the kill_all_children(SIGKILL) function will actually send SIGKILL to the entire process group ID, including its owner. In this case, all code that follows after it is _dead_ code. This includes the final cleanup() sequence, which would be desirable to run even during an emergency shutdown (e.g. OpenSIPS deadlocked, SIGKILL'ed all its children, yet managed to do a last-second DB dump of all dialogs and contacts). This patch fixes the following: * rewrite kill_all_children() to actually do what it says: "only kill the children". No need to send kill() to the pgid. * remove the alarm()+wait() logic around kill_all_children(SIGKILL). Even if opensips is not daemonized (so the SIGKILL only gets sent to each enumerated process), if, by absurd, we failed to count all processes within the for() loop of the first call, installing a signal handler for yet another kill_all_children(SIGKILL) call is pretty much useless -- we will still stay stuck in while(wait()). * remove the "now unused" sig_alarm_kill() function * improve function docs (cherry picked from commit 28e00f74ffde8ec855c27abac2d41e2d40cc5e61) 2018-07-23 Razvan Crainea * [5529dfafc] : proto_tcp/bin/hep: fix deadlock when delaying writes (cherry picked from commit 058cc22cb55dce9b890308b9f83a42a88691f2c8) 2018-07-18 Liviu Chircu * [52016c07f] : Module doc: Add an auto-generated "contributors" chapter Each module will additionally contain an auto-generated doc/contributors.xml file. To generate a contributors.xml file: * git fetch origin 'refs/replace/*:refs/replace/*' (pull the entire SER/OpenSER/OpenSIPS history tree) * make modules-contrib [modules=modules/] Follow the comments in doc/build-contrib.sh for more info. 2018-07-17 Italo Rossi * [5e9bd4294] : Parsing Call-ID before looking up for contact_id (cherry picked from commit 222125a3b3668fc618bec46dc30debaabf77fc4f) 2018-07-17 Razvan Crainea * [e1934f888] : debian: prevent opensips from starting at install It's not a good idea to start after installing opensips, because it hasn't been configured yet (cherry picked from commit b25ed33237220f52d3b02bc37945519f2caf0509) 2018-07-17 Razvan Crainea * [eb7c4f3ff] : fix several typos (cherry picked from commit 98851096b3f9d3f1059b6de38c3b64e4913194b3) 2018-07-17 Razvan Crainea * [4f2cb7121] : packaging/debian: add man page for opensips-m4cfg (cherry picked from commit 945e9143dd57eb1c437056b7fcbfacd62f633e85) 2018-07-17 Razvan Crainea * [efa16e81d] : packaging/debian: add #DEBHELPER# token to preinst (cherry picked from commit 682177a967e65bf31d629206743f725c4d725799) 2018-07-17 Vlad Patrascu * [d7a653190] : Regenerate default TLS user certificate and rootCA (cherry picked from commit 9ee39b75fe1296820d70a86a2e2343b46a01fcbc) 2018-07-17 Vlad Patrascu * [7e3254d50] : usrloc: replace deprecated 'db_mode' modparam from default script (cherry picked from commit 34ffa870183a82c803ed0bdff611ab19ebe3fe6f) 2018-07-13 Vlad Patrascu * [c34d126af] : usrloc: fix a regression bug introduced by the k/v storage replication Closes #1423 (cherry picked from commit c2a11864ebf744bdb232caf8480eafc18d3af8af) 2018-07-13 Liviu Chircu * [e9088f67c] : rest_client: Clean up extraneous code (initial TLS client cert implementation, which was not fully cleaned up) (cherry picked from commit 766cc8c907b69f26c483e71cf0873d9c60c00b07) 2018-07-13 Razvan Crainea * [c8a6dbb5e] : dialog: fix dialog_table param (cherry picked from commit b81be8ec8c43b426b3432fa6aa023128a926c053) 2018-07-13 Razvan Crainea * [adc2f7e8b] : cgrates: verify the return type Prevent opensips from crashing when using with an old verison of cgrates and not setting the compat mode (cherry picked from commit 7d07bf013b795b3da8f5d4ddbaee48ac77a6fc32) 2018-07-11 Liviu Chircu * [a4a35d36f] : shm_nt_str_dup(): Improve error handling Do not report (-1: out of memory) on NULL input strings (cherry picked from commit e4fb2866a407c9ce96442ed6aa05d8629672f7a6) 2018-07-06 Razvan Crainea * [07aa6765e] : cgrates: fix invalid memory access after release (cherry picked from commit fe18cc1243b13a55ce2adaffbcb75d2132bfbf19) 2018-07-05 Liviu Chircu * [2982f1991] : usrloc: Improve "db_mode" documentation Better explain the implications of setting this parameter. (cherry picked from commit 9ebade34c90b6dec74240ab26a3a214bac4f99b4) 2018-07-05 Razvan Crainea * [a403d99de] : usrloc: suppress unneccessary oom error (cherry picked from commit 7bc46387237b03610a0e079b397b15e7742429c1) 2018-07-05 Bogdan-Andrei Iancu * [fbbd1445b] : Fixed accepting (again) the comma char inside URI. Fixes #1385 This issue was introduced with commit the a7e724a commit, starting 2.4 (cherry picked from commit 1e74986285035e29b49017a38d95cbdf8c57b485) 2018-07-05 Razvan Crainea * [53505fcc8] : db_mysql: doc: clarifying max_db_queries meaning (cherry picked from commit 75be0c227d57fe5c96b0819ca993e6e906e3ffb2) 2018-07-04 Vlad Patrascu * [f981d0372] : dialog: fix a bug when removing a dialog with no profile links (cherry picked from commit 9e26e9e0d8f2d7bd30d7c1274d19524eec7c991b) 2018-07-04 Vlad Patrascu * [5196c4d58] : dialog: fix a bug when destroying profile linkers (cherry picked from commit 948e7da262df5e20551bd1e30d04740806092fa6) 2018-07-04 Vlad Patrascu * [5ba510c18] : dialog: refactor some names in the profile replication code (cherry picked from commit a4bc298bc515006da65257a416cef6a1305d34fd) 2018-07-04 Vlad Patrascu * [c052bb428] : dialog: fix initialization for profiles without values (cherry picked from commit f939d6a3d592ffea1e3a0098b7a43f1aa5b12413) 2018-07-04 Vlad Patrascu * [d2328489a] : dialog: fix deadlock when replicating both profiles and dialogs (cherry picked from commit 00cddf7634052f50a489e29ffea4ca5a592f7ee2) 2018-07-04 Vlad Patrascu * [407efce36] : dialog: fix counting when replicating both profiles and dialogs (cherry picked from commit cc1fe0f8b06427646383e37980db0df668772cd8) 2018-07-04 Vlad Patrascu * [f4e41259f] : AVL map: handle oom error when duplicating key in map_get() (cherry picked from commit 85de3a9f716b6b9150a98214f3673100c07ed82f) 2018-07-04 Vlad Patrascu * [6baf5c280] : dialog: handle oom error when linking dialog into profile (cherry picked from commit 4478fe15790fb28d10a63d932c07300577544e04) 2018-06-30 Liviu Chircu * [77e8c637d] : registrar: Avoid a redundant NoSQL query In federation clustering, do not uselessly load the NoSQL records during simple lookups. (cherry picked from commit f7be418bd30d2d42b44df24c84c05b316a503cbc) 2018-06-29 Bogdan-Andrei Iancu * [48674c64a] : Fixed typo in documentation. Reported by Alexey Kazantsev (cherry picked from commit 48f82e2bfd04a0bec5c6690dad34c43c199c8fdf) 2018-06-29 Vlad Patrascu * [eee4c9db2] : dialog: fix crash in profile counting The issue manifests after a dialog is deleted(and removed from the profile), when both the dialog and profile replication are enabled. (cherry picked from commit dfd6d6826467b9fc27163346ee3f7564f570c04d) 2018-06-29 Vlad Patrascu * [577fb1197] : dialog: fix deadlocks when removing dialogs from profiles The issues manifest when both the dialog and profile replication are enabled. (cherry picked from commit 014c650e97e5879a0415b3fa3002084071c10556) 2018-06-28 Bogdan-Andrei Iancu * [5f87a677f] : Fix bogus data access. Access data after the NULL test and after the lock is taken. Reported by Nick Altmann (@nikbyte) (cherry picked from commit 2300e4504f1d9282fed98de8bebd1bc1750306c1) 2018-06-28 Bogdan-Andrei Iancu * [c05768deb] : Fixed wrong return without locl release. Reported by Nick Altmann (@nikbyte) Closes #1409 (cherry picked from commit 9cc75c0ac3155f5d5c55643123e906f347e93e41) 2018-06-28 Bogdan-Andrei Iancu * [9a84bd0ff] : Fixed error message for rmrule cmd (cherry picked from commit 2ee9ba5d6f2e587d74766f0c7feab0a68e3e5e13) 2018-06-28 Bogdan-Andrei Iancu * [102098311] : Fixed wrong example The correct cmd is "rmrule", nu "rmgrule". Started from a report by @willyrgf Closes #1412 (cherry picked from commit 76e90cf571a1155753a04edeb36dbfec1cf65345) 2018-06-28 Fabian Gast * [1f27af33c] : switch / case skips the "default" statement during fall-through fixes #1371 (cherry picked from commit 0d57cdcf1f33778587898b1f646e494202a61b32) 2018-06-26 Razvan Crainea * [85428d631] : rtpengine: fix rtpengine_manage() parameters fixup Fix the way rtpengine_manage() function parses the received parameters. Make the parsing similar to rtpengine_offer(). Credits go to Carlos Oliva for reporting this. Closes #1410 (cherry picked from commit e1e407fb1dfa2aa272cb4964f482428bde8280d5) 2018-06-25 Bogdan-Andrei Iancu * [57e59cb24] : Fix checking PAI/PPI hdr with multi hdrs According to RFC, the multi value/body for PAI / PPI hdrs may be spread across multiple header instances, not necessarily merged into a single hdr. Fixes #1386 (cherry picked from commit aec863871824e1d60fc23744d5b776e3f95e4340) 2018-06-22 Vlad Patrascu * [ff10f7871] : dialog: check if replication is enabled in clustering related MI commands Fixes #1406 (cherry picked from commit a3f8a9cdf8b9bb6fdff89175d348598c7b58f293) 2018-06-22 Liviu Chircu * [d63ce2978] : dialog: Do some code maintenance * add macro for reinvite pinging detection * fix clang compile warnings (cherry picked from commit cabac7d4add383114176fd9581a01177fd20e7e8) 2018-06-22 Liviu Chircu * [b1cf4a32e] : dialog: Properly store all downstream forked legs Commit a03ed4e1a36 over-simplified the downstream leg identification, assuming that there is a 1:1 correspondence between outgoing branches and unique replies to them. This is not the case: as a proxy, we may receive multiple responses (read: "To" tags) for each individual branch we fork out. This misconception would also cause SHM to leak. We fix the above limitation by cloning a new dialog leg each time we detect downstream forking of our outgoing branches. Thanks to Bogdan for pointing out this problem (cherry picked from commit 67b29011127a53fe53c8bd19efc2373b2978f4f2) 2018-06-22 Liviu Chircu * [816cf6e07] : dialog: Refactor dlg_leg.sdp and dlg_leg.th_sent_contact These fields are only relevant for dialog pinging and they behave similarly, so their naming should reflect this. (cherry picked from commit 287ce6f545e342d9239359eb78834c9272b80e26) 2018-06-21 Vlad Patrascu * [cfc9efec6] : sip_i: fix error handling when PAI number is too long When mapping parameters to ISUP by default, a P-Asserted-Identity number longer than 15 digits would cause an infinite loop in the worker process until running out of memory. Also raised the logging level(to INFO) of some useful messages when unable to map ISUP parameters by default. Thanks to Rinor Hoxha for reporting. Closes #1390 2018-06-21 Liviu Chircu * [fc2d03d75] : mid_registrar: Properly handle empty K/V store in AoR throttling mode This state may be reached with initially replicated AoRs (so empty K/V storage) on passive nodes which become active. We handle the issue by simply forwarding the request and fixing the storage. Credits to Alex Vasilev for reporting (cherry picked from commit 1dd0e0eabdbb7b094e9fe5c0edcbe0d328e46c3d) 2018-06-21 Liviu Chircu * [70426b1db] : usrloc: Fix "DB only" mode selection Reported by Jonathan Hulme. Fixes #1403 (cherry picked from commit d6e9817a190bdbb2c47e7986f1eea9fcc89f45f3) 2018-06-21 Liviu Chircu * [b742b741f] : usrloc: Do not pretty-print the "KV-Store" MI output (cherry picked from commit 20480ee080eb07fd93279b2033221f57c74e50fe) 2018-06-21 Liviu Chircu * [9c53126d5] : usrloc: Document "mi_dump_kv_store" (cherry picked from commit fe782c210c4d19eebeeb79365d2b39fb72764757) 2018-06-21 Liviu Chircu * [7c217d5a7] : usrloc: Fix pinging with simple active/backup clusters In these types of setups, partitioning the pings across the cluster is incorrect, as the active node must send all pings. This patch adds the "shared_pinging" module parameter in order to fix the pinging behavior for these scenarios. (cherry picked from commit bafdb8b6a00f697f08f03fb73d3b1f78ed9b8eef) 2018-06-21 Liviu Chircu * [54cf22977] : mid_registrar: Do not drop registrations on empty K/V store Simply forward them and populate the values. (cherry picked from commit 78902eb60698ac0a9a5a4ae0a6cd37845687c5f4) 2018-06-21 Liviu Chircu * [2023dcbbd] : usrloc: Also binary-replicate the k/v storage This allows us to also cluster the mid-registrar (not only registrar!). (cherry picked from commit d8fe587cef17421ebbbd4cc0d4c688bcf83b3f5a) 2018-06-21 Bogdan Andrei IANCU * [0ba498098] : Merge pull request #1394 from lemenkov/improve_docs Improve docs (cherry picked from commit 7a6e93f0a77d8b1ef907603ba60bd07e4e46759b) 2018-06-20 Vlad Patrascu * [f2c06267e] : sip_i: fix country_code modparam length check Closes #1395 (cherry picked from commit da0475972cbbfd2bd4f85a4755f9691721598599) 2018-06-20 Vlad Patrascu * [04c47430d] : sip_i: add oom check when allocating optional param in PV set function Closes #1396 (cherry picked from commit ae826b9de59687409611493ba53ea03a9a81d68f) 2018-06-19 Callum Guy * [90874b85c] : revised timeout value information (cherry picked from commit b73991a90737f54eee1ac0c65c31014ca43c4667) 2018-06-19 Bogdan-Andrei Iancu * [2f7dd8320] : Fixed missing locking when checking gws Closes #1373. 2018-06-15 Liviu Chircu * [cd1cfbdd4] : module stats: Improve module name matching regex Reported by @cbsergiocf Fixes #1392 (cherry picked from commit bbcfcb334262d5d5ba12828cfca313f01a3cce82) 2018-06-15 Liviu Chircu * [06824f9a6] : sngtc docs: Fix outdated links (cherry picked from commit 14ad190473b4082e3048c957222c7d04f37c5136) 2018-06-15 Liviu Chircu * [ec1ede28b] : sngtc: Fix bad string math ^ This was only detected by clang. Also fix a compile warning. (cherry picked from commit ba3e74d6e3a78a71deb7c91fe8d84fbe00a3d8a9) 2018-06-15 Liviu Chircu * [3deb0c2f1] : sngtc: Fix compile errors Reported by @cbsergiocf Fixes #1392 (cherry picked from commit 61a5a673ff361943bb099c6553b55bf13b8c1fe3) 2018-06-15 Liviu Chircu * [f77ad26d1] : fraud_detection: Fix badly handled corner cases * do not segfault on oom (get_stats() returns NULL) * do not deadlock when failing to fetch the time * do not segfault when failing to create a dialog * do not return success on failed allocations + logic * do not leak memory on oom failures (cherry picked from commit 375e9d4f0eba9ad2197ebf5da6c6e974bc7954ea) 2018-06-14 Vlad Patrascu * [c7e912bee] : Handle oom when allocating message body in add_body_part() (cherry picked from commit 844dbcb2bc0c53e0b61554e740bff7034243eac6) 2018-06-14 Bogdan-Andrei Iancu * [5f2c1612b] : Fix adding "socket" nodes under "set" node in MI show command 2018-06-13 Liviu Chircu * [0e7918505] : cachedb_mongodb: Fix a MongoDB URI building bug When a username/password was supplied, the resulting URI would also include the collection (e.g. "/opensipsDB.dialog"), which is not supported by the more recent libmongoc releases anymore. Reported by Vladimir Kuzmenok (cherry picked from commit e4f98a6d4c830ee1f3d9b5ac5299146b005953e5) 2018-06-13 Razvan Crainea * [91b1197a7] : rtpproxy: fix adding the nortpproxy string hack to properly add the nortpproxy string at the end of the body (cherry picked from commit 79698b90d9a425e4460ea60647482348ba34cdce) 2018-06-08 Liviu Chircu * [5d34c945c] : cachedb_mongodb: Improve docs for the URL "multiple hosts" feature Suggested by @volga629 (cherry picked from commit 931fbc5e34ebbf2f6f5fd86e6903fdeaf3b148de) 2018-06-07 Liviu Chircu * [079f0dbd7] : usrloc doc: Add tutorial page references (cherry picked from commit 64172a95b0d44de469a673652a8bfd208ac6d489) 2018-06-07 Liviu Chircu * [163b9e1e5] : registrar: Fix uninitialized stack variable Reported by @sekil75 Fixes #1377 (cherry picked from commit 4deac1f08dd2fdbff1a6f945bd78d83438f521e3) 2018-06-06 Vlad Patrascu * [2da3504da] : dialog: improve docs regarding clustering (cherry picked from commit 0056d768c607b92cff0ecb4f0191160e5c394046) 2018-06-06 Liviu Chircu * [27b0a140a] : DB modules: Improve error logs on failed conversions (cherry picked from commit 0819301305df44d9c719d595bc96e7baeea4c2ca) 2018-06-04 Razvan Crainea * [72a8bc942] : proto_*: check returned events from poll Inspired from ticket #1374 (cherry picked from commit 52e54daa0ff989537d2381c905744b1b898387ad) 2018-06-04 Răzvan Crainea * [548df1b98] : Merge pull request #1374 from Vonage/bugfix/tcp_send_poll_revents Fix bug which will cause processes to get stuck in tcp send loops. (cherry picked from commit a5633eab0c7c0d20698908dad83c781e403998ac) 2018-05-30 Razvan Crainea * [ae78b129d] : acc: fix possible deadlock when evi set is faulty this error is very unlikely to trigger (cherry picked from commit b044f11ee1a45d2696c5d03ece4a524b1e9861c9) 2018-05-25 Vlad Patrascu * [2304d33f3] : clusterer: decrease risk of bogus provisioning of your own node ID Setting your own node ID is now possible in both current_info and current_id parameters. Also throw more errors on inconsistent provisioning of these parameters. (cherry picked from commit ea3745a7fd2e9ff068b7110c431948a26be068ab) 2018-05-25 Vlad Patrascu * [600748bb0] : clusterer docs: reorder module parameters (cherry picked from commit 0e96bedc9ea890c2e529ee2c6b14081488a67c06) 2018-05-25 Liviu Chircu * [9ea5ddbad] : path: Fix buffer overflow with use_path_received + IPv6 Introduced in commit b3bf15646a (cherry picked from commit 636a7420072b90c21bd3073b2c2bad6b375284ea) =========================== Release 2.4.1 ============================== 2018-05-24 Razvan Crainea * [adc93740e] : Bump version to 2.4.1 2018-05-24 Liviu Chircu * [0d75d93ed] : path: Fix leak-on-error (cherry picked from commit 7911d636171f251b18a7d735d8baa9e15474b696) 2018-05-24 Liviu Chircu * [045eea09b] : path: Fix "use_path_received" in double-Path scenarios Due to the fact that run_rr_callbacks() returns the 2nd Route (Path) header field value when previously having done protocol switching (thus having inserted two Path headers), the "use_path_received" feature of the path module would not work -- it wouldn't set the $du at all. The reason for this is that add_path_received() appends its ";received=" to inside Path #1 (the outbound path of the registration / the inbound path of future requests) when doing double-Path recording. This patch simply moves the ";received=" append operation performed by add_path_received() into Path #2 (inbound path of registration / outbound path of future requests), and adapts other code that needs it (e.g. save("location", "p1v")) to properly be able to fetch it. Reported by @futsystems Fixes #1358 (cherry picked from commit 71c7d75f66c8f0dc4ce411fd97d2dc867b39ce8d) 2018-05-24 Liviu Chircu * [0e60448cb] : path: Add escaping logic for add_path_received() Simply dumping a SIP URI as a ";received=" Path header field parameter value is problematic and leads to two kinds of issues: a. invalid SIP URIs, where the ";transport=" is specified twice: Path: b. in double Path scenarios (e.g. when switching protocols from, say, TCP -> UDP), since the ";received=" is inserted as the inbound Path header field value, this can lead to a strange "protocol conversion" effect: Path: Path: ^ notice how the inbound Path intended to advertise an UDP URI, but the add_path_received() managed to "convert" it into a TCP URI because of its inability to escape its token. nathelper is an easy first victim of this conversion, as it will attempt to send pings using the incorrect transport after reading the topmost Path (Route) header. This patch adds escaping/unescaping logic for the ";received=" feature of add_path_received() along with any code that makes use of this feature. Example resulting URI for the above example: Path: (cherry picked from commit b3bf15646affe981d4b266381d59f210e6e882fd) 2018-05-24 Bogdan-Andrei Iancu * [9a46432a0] : Fixed replication of sharing TAGS. Reported by Ognjen Seslija (sekil on IRC) Thanks to Vlad Patrascu in troubleshooting (cherry picked from commit 9059325241658c56cb759f17160c869b4e9def2b) 2018-05-24 Bogdan-Andrei Iancu * [93c2cea6c] : Fix consistency of extra/leg values in acc module. If values are set before the dialog is matched, rather than simply discarding the setings done on the extra/leg values, better migrate the changes over the acc set stored in dialog. (cherry picked from commit 60b1e7005b22eedd1ed604ffc21054e91b7f404b) 2018-05-24 Bogdan-Andrei Iancu * [bdac5e61a] : Fix memory leak in using extra accounting. If setting $acc_extra() for a sequential request, before being matched against the dialog, the values will result in a leak. Ideally, the acc_extra set in the processing context should be merged with the acc_extra fetched after dialog matching. (cherry picked from commit 19305deaa6f89d3c3030f67e68f79c69116501f2) 2018-05-24 Vlad Patrascu * [40222f493] : clusterer: several doc fixes and improvements 2018-05-24 Liviu Chircu * [6c5b6e44d] : registrar: Fix pkg leak / broken logic in remove() Also enhance its documentation (cherry picked from commit 62bf36dac2f0f90ad58b60f6fc1036934276fc9c) 2018-05-23 Liviu Chircu * [98de68dac] : clusterer: Do not log errors when broadcasting to 0 nodes Reported by Xiao Huang Fixes #1369 (cherry picked from commit c7cae9be6ad812f1a686e7529275f92194515ab1) 2018-05-23 Bogdan-Andrei Iancu * [e5f3b79cd] : Fix delete query in watchers table. The watcher's table has no sharing tags. Reported by Ognjen Seslija (sekil on IRC) (cherry picked from commit 2b28b213167dcfa132d1a3045a3a1b532874e4d9) 2018-05-22 Bogdan-Andrei Iancu * [cd3134187] : Fixed URI comparing when usernames are empty (cherry picked from commit a69c8541b08eb171f24eca55444e777a3b527509) 2018-05-22 Liviu Chircu * [15fb59f8a] : usrloc/nathelper: Improve function naming/docs (cherry picked from commit 45ea9087d74cd8db5f8d27829296ede1d8b74e09) 2018-05-22 Liviu Chircu * [21301982e] : usrloc: Make the timer cleanup routine cluster-aware Reported by Xiao Huang Fixes #1367 (cherry picked from commit fa4bf3c67fe7d8f3fcf88bcca12fa5fa09a4ebe0) 2018-05-22 Bogdan-Andrei Iancu * [4ee26e325] : A worker process wil ignore any SIGTERM if not in shutdwon sequance. (cherry picked from commit 41f3fd580b86dea700185b76f7c60ad4590e1e02) 2018-05-22 Bogdan-Andrei Iancu * [c00e9282f] : Downgrade log from INFO to DBG (cherry picked from commit f39174c6bed6f636e658dc254d7457062ddff291) 2018-05-22 Bogdan-Andrei Iancu * [602089bbc] : Avoid signal "leaking" and use KILL instead of TERM. When we want to force the termination of the unresponsive processes, better use Kill than TERM - TERM, if previosly delivered may be queued and lost. (cherry picked from commit 8073d4de8edfab88a60c869b24df0cd3e74342d6) 2018-05-21 Vlad Patrascu * [0d1580702] : mi_xmlrpc_ng: fix system memory leaks when parsing xml Closes #1359 (cherry picked from commit 06a1b186c9d8eba35e3f7bbff83f41325c60ac24) 2018-05-21 Răzvan Crainea * [13489b996] : Merge pull request #1366 from ryan-esty/2.3 added rtcp-mux-require Close #1364 (cherry picked from commit c9a7552ce3c9f0dfd9b80c242a03ce27a744cfe5) 2018-05-18 Liviu Chircu * [2020d6078] : acc: Fix $acc_extra so it accepts integer constants (cherry picked from commit 5f42814228cf52414a65bf859dffe10fb45ff94f) 2018-05-17 Bogdan-Andrei Iancu * [bcad20098] : Fixed wrong DB result free in case of error. 2018-05-17 Razvan Crainea * [c19f0f0c6] : dialog: reset locked process only if you locked it Make sure that when callbacks are run only the proces that has the callbacks locked resets the locked_by field - if someone else does it, it might run into a deadlock. Thanks go to 46Labs for reporting this! (cherry picked from commit e35595e8596e6dd0bedb0b96cadd226c52417243) 2018-05-17 Vlad Patrascu * [d2c626166] : clusterer: allow spaces in the format of "current_info" and "neighbor_info" (cherry picked from commit b10f0e3f96a2173a868b395b6267646ef7c3f13c) 2018-05-16 Liviu Chircu * [e7c4de709] : rest_client: Improve tracing robustness at startup Even if we're somehow called from startup route with a fake SIP message, deal with it and do not segfault. (cherry picked from commit 5f83153c6eac1042221e9b2bc48d11f8be148ea8) 2018-05-16 Liviu Chircu * [436c68957] : siptrace: Fix broken trace tests during startup_route (cherry picked from commit 1c07c9254d6840e4d8a10226bd196661b6a667b4) 2018-05-16 Liviu Chircu * [a8ee28c46] : transformations: Fix parsing of nested transformations We once again allow multiple levels of nested transformations, e.g.: $(var(tu){s.substr,$(var(tu){s.substr,$(var(idx){s.int}),1}{s.int}),0}) (example of three-level nesting of tranformations) (cherry picked from commit 61dec8937bd65f0848413e988b0f77cd924b362f) 2018-05-16 Liviu Chircu * [c0bf5a059] : acc: Eat leading whitespace in "extra_fields" This allows readable formatting such as: modparam("acc", "extra_fields", " db: account_id; provider_id; account_card_id; ") (cherry picked from commit f757ce4143cc7943adc872e6a7fc0bd3b3cc2a38) 2018-05-14 Razvan Crainea * [467df134f] : proto_hep: prevent memleak when using correlation when not using homer5 and adding correlation to rest and xlog queries, the correlation string was never freed, generating a memory leak. also prevent opensips from crashing when running out of pkg memory. (cherry picked from commit 8904319909cd6618d4ce06148a25937738a90a37) 2018-05-11 Liviu Chircu * [bfac3e854] : dialog: Always match dialogs using dlg_match_mode This patch changes the default behavior of match_dialog() and topology_hiding_match(), where they would both forcibly use DID_FALLBACK matching, regardless of the value of the "dlg_match_mode" modparam. Starting with 2.4, we change this behavior such that they default to simply playing along with "dlg_match_mode", which is a lot more intuitive from a script writing perspective. If need be, a specific dialog matching behavior may be enforced for certain types of traffic using the newly added optional parameters of match_dialog() and topology_hiding_match(). (cherry picked from commit 61829d66321e8c37dbfeff36a25bfb95fcead866) 2018-05-10 Liviu Chircu * [718cf732c] : dialog/topology_hiding: Update docs (cherry picked from commit 362e65d28ac6409d66d48bea4a735c1558dd6993) 2018-05-10 Liviu Chircu * [2ddb4d10c] : dialog: Fix dialog matching bugs in looping + TH scenarios This patch adds an extra control parameter to topology_hiding_match() and match_dialog() which allows the script writer to disable the current behavior of forcefully imposing the "DID_FALLBACK" dialog matching mode. In looping scenarios, performing SIP-wise dialog matching may be out of the question, as we may randomly match one of multiple dialogs with identical SIP coordinates. (cherry picked from commit deb3ee457b1f64a169b61751e6490c7049f1493e) 2018-05-10 Liviu Chircu * [44af51b1a] : dialog: Document re-INVITE pinging interval restrictions (cherry picked from commit 4b59ffc0c65dca11a043faf61eb2987555192603) 2018-05-10 Liviu Chircu * [430039fd8] : dialog: Fix re-INVITE pinging SDPs after on-hold/resume (cherry picked from commit 1d1f3d04d75b3c2a46444d7a6d57348ce85543a9) 2018-05-10 Liviu Chircu * [123255c3e] : dialog: Fix unnecessary errors on DB load Affects DB-persistent dialogs w/o reinvite pinging. This regression was introduced by commit 9521770e. (cherry picked from commit 200a5563b227fc8c231e82f3d42e3c8528358fa2) 2018-05-10 Liviu Chircu * [fd854b778] : dialog: Improve fetch_dlg_value() signature & docs (cherry picked from commit f2626d471d6c1d1b58c2d4a27eee13f96203c24f) 2018-05-10 Liviu Chircu * [7d0f6bc0e] : dialog: Fix Re-INVITE pinging after restarts The current solution is to persist the SDPs/Contacts of the caller side and the winning callee side into dialog var storage, which is restart persistent ("vars" column). Fixes #1342 (cherry picked from commit 9521770efccd385fafdb2c58ff365627e0d65fef) 2018-05-10 Liviu Chircu * [7d887fb4e] : dialog: Fix pkg memleak in commit a03ed4e1a3 The auto-generated CANCEL messages were leaking the parsed Via header. Reported by Nick Altmann (cherry picked from commit 34960b140f81adca25bf9ad84ac2bc078732421e) 2018-05-10 Liviu Chircu * [67b2bf382] : dialog: Fix regression in commit a03ed4e1a3 Commit a03ed4e1a3 may have fixed the create_dialog("Rr") scenarios, but it also broke the simpler ones, which rely on create_dialog(). Reported by Nick Altmann (cherry picked from commit b45ee74f5994ffdca12ccc8b6df0bcb33ca4c0b5) 2018-05-10 Liviu Chircu * [6fa390bde] : dialog: Clarify the new meaning of dlg_leg.sdp (cherry picked from commit bf2ae315609b1224338273a059b5f760b961b89f) 2018-05-10 Liviu Chircu * [fba65033e] : dialog: Fix Re-INVITE pinging issues with parallel forking The Re-INVITE pinging code would always leak both SDP and contact buffers when parallel forking. Moreover, depending on which branch answered the call, in some cases OpenSIPS would only Re-INVITE ping one of the parties involved, even if both "Rr" create_dialog() flags are set. This patch fixes the above issues by storing the SDPs of each forked branch into the "callee" leg array. Each call leg gets created before the INVITE branch is sent out, rather than only getting created upon matching a 200 OK reply. When matching a reply, the corresponding leg becomes 1 + the Via branch idx, which added by tm. (0, 1, 2, ...) Remaining issue: Proper handling for the multi-200 OK scenario, as we currently still overwrite the callee SDP at each 200 OK. (cherry picked from commit a03ed4e1a366807df3a89efada59df0d07f4d361) 2018-05-09 Liviu Chircu * [ea3559717] : freeswitch: Force event re-subscribes after a disconnect Credits to Ken Rice for reporting this issue (cherry picked from commit a2934c79ed80401387e0e889293ab89d106922ef) 2018-05-09 Liviu Chircu * [aa37c2caf] : freeswitch: Fix ESL handle and file descriptor leaks Thanks to Ken Rice for reporting, providing a testing environment and helping troubleshoot these bugs. (cherry picked from commit 9fe0201819653bd47f3638e8c161a946fa71b738) 2018-05-09 Bogdan-Andrei Iancu * [187f7d08e] : Fixed empty socket info in DB during reload The insert subscription code may push an empty string for the socket info, so the DB reload code must cope with this without error. Also relax the reloading sequence - ignore broken subscription records rather than stopping the entire reload and breaking the startup sequence. (cherry picked from commit ea647c59aeaea6c8abfc910a8c6bbb31e0f552eb) 2018-05-09 Liviu Chircu * [31fba7d0f] : usrloc: Fix possible crash during contact pinging This patch fixes a bug introduced in commit 02e6a641292, where the output buffer does not contain a leading "0000" marker despite the "ul.get_all_contacts()" function returning a 0 ("all contacts have been dumped, the buffer is properly formatted"). Reported by @thesipguy Credits to Răzvan Crainea for spotting the bug Fixes #1352 (cherry picked from commit 2bb11c599095fbef90706bad9e314feba80d107f) 2018-05-08 Vlad Patrascu * [4592fde0f] : xmpp: fix uninitialized warning 2018-05-08 Vlad Patrascu * [1b69af067] : sip_i docs: fix subfield value 2018-05-07 Vlad Patrascu * [1ee6c85b6] : sip_i: fix crash for numbers longer than 15 digits Mapping the Called Party number or Calling Party number for IAM by default could cause a stack smashing for numbers longer than 15 digits (E.164 limit). Fixes #1348 (cherry picked from commit 47e5c47d3bb2ad7999a14b80d6412866d90493c9) 2018-05-07 Liviu Chircu * [e0e927cae] : acc: Fix "ms_duration" computation Reported by John Quick (cherry picked from commit f2c86ed3fa19d256c1a2c5ae5b246871ccc8b312) 2018-05-02 Liviu Chircu * [ba005ae89] : registrar: Fix expires handling on 200 OK save() Silently use the default_expires, similarly to the behavior during a standard save() on a REGISTER, without throwing warnings. Credits to Norman Brandinger for providing the patch. (cherry picked from commit bbfdbaf9d69ef39160459b6f5f81e5a2e9344cdc) 2018-04-30 Razvan Crainea * [048b54559] : rtpengine: fix created missing initializer 2018-04-30 Liviu Chircu * [c9c4d3d80] : nathelper: Fix uninitialized warning 2018-04-30 Vlad Patrascu * [811e360c7] : clusterer: fix uninitialized warning (cherry picked from commit 5ad8600be1f547b303ba71c7ff270535e7b9a317) 2018-04-30 Liviu Chircu * [2f828f9e4] : Fix compile warning on older gcc (4.8.4) (cherry picked from commit 2faf78c318e19052835e01ea6bc4f1ce2d3ad07f) 2018-04-30 Razvan Crainea * [5ed57b4ed] : Update ChangeLog for 2.4 final release =========================== Release 2.4.0 ============================== 2018-04-30 Razvan Crainea * [57483fcac] : update compile flags for final release 2018-04-30 Liviu Chircu * [7bb0dba89] : usrloc: Fix uninitialized variables 2018-04-30 wuhanck * [ba99a4f32] : Use ip_addr2a. Remove unused str_ip. (cherry picked from commit c60b4b5ffd39082ec1563852912daeac42ab5f69) 2018-04-30 wuhanck * [b31656829] : Use json_object_object_get_ex. (cherry picked from commit 8490397f5de665b79f6e207b6930f0618fccaccf) 2018-04-30 Liviu Chircu * [48093886b] : core: Fix $branch(flags) manipulation It now accepts and prints a space-separated list of branch flags. Fixes #1341 (cherry picked from commit e2fd262f368928c8d71ec386c724de7025d6191a) 2018-03-28 Razvan Crainea * [6fcc108be] : Bump version to 2.4.0-beta 2018-03-28 Razvan Crainea * [eaafa8c4d] : Updates CREDITS for 2.4 2018-03-28 Liviu Chircu * [c9478d410] : registrar: Add latency-based filtering flags * "yXXXXX" lookup() flag - discard contacts beyond a certain latency * "Y" lookup() flag - sort branches by ascending latency order 2018-03-28 Liviu Chircu * [928eebc46] : usrloc: Add latency event triggering thresholds 2018-03-28 Liviu Chircu * [1d0d28874] : usrloc: Optionally include the k/v storage in MI output This helps achieve features such as #1319 without additional C code. 2018-03-28 Liviu Chircu * [e00445096] : rest_client: Update docs 2018-03-28 Liviu Chircu * [aa7bfeb07] : rest_client: Allow all functions to be called from any route 2018-03-28 Liviu Chircu * [48794722e] : rest_client: Add possibility to force TLS client certs Individual TLS client cert/key pairs may be forced for each HTTPS transfer by calling rest_init_client_tls(tls_client_domain) beforehand. The default behavior remains the same: libcurl will fully take care of client certificates when HTTPS is employed. Fixes #1260 2018-03-28 Bogdan-Andrei Iancu * [b17e0f46f] : Small adjustements to the balancer template (mainly text formating) 2018-03-28 Bogdan-Andrei Iancu * [975c852ad] : Small adjustements to the trunking template (mainly text formating) 2018-03-28 Bogdan-Andrei Iancu * [03816202f] : Regenerate the default cfg based on residential scenario 2018-03-28 Bogdan-Andrei Iancu * [65edc1d65] : Small adjustements to the residential template (mainly text formating) 2018-03-28 Bogdan-Andrei Iancu * [111871e16] : Added DB migration for the emergency table 2018-03-28 Bogdan-Andrei Iancu * [25682e29e] : Added DB migration for the fraud_detection table 2018-03-28 Bogdan-Andrei Iancu * [95d834d80] : Added DB migration for the tls_mgm table 2018-03-28 Nick Altmann * [012a90659] : rpm packaging: add new modules to changelog 2018-03-28 Razvan Crainea * [82796a5d0] : jsonrpc: remove useless function Just to make clang and travis happy 2018-03-28 Nick Altmann * [9eb19f861] : rpm packaging: support for event_jsonrpc and jsonrpc modules 2018-03-28 Razvan Crainea * [98754e716] : cgrates: deprecate $cgrret + replace with $cgr_ret 2018-03-28 Bogdan-Andrei Iancu * [1f679cd54] : Deactivate USRLOC based aliases in osipsconsol 2018-03-28 Bogdan-Andrei Iancu * [823e83bd6] : Remove opensipsctl provisioning for usrloc aliases 2018-03-28 Bogdan-Andrei Iancu * [4dd815dcd] : Dropped the "aliases" table This table was used to implement as pseudo aliasing by abusing a "location" like table. It was an old approach (prior to db_aliases), not in use anymore. 2018-03-28 Bogdan-Andrei Iancu * [7b2594119] : Updated the migration for sip_trace and clusterer tables 2018-03-28 Liviu Chircu * [c6a5c251c] : opensipsdbctl migrate: Improve wording for initial warning 2018-03-28 Razvan Crainea * [a006a48dc] : jsonrpc: fix link commands in README 2018-03-28 Razvan Crainea * [ab97c5bf9] : add new jsonrpc module Send JSON-RPC commands to a JSON-RPC server and optionally receive replies 2018-03-28 Liviu Chircu * [dd622e751] : main(): Avoid duplicate getopt() strings Suggested by Răzvan Crainea . 2018-03-28 Liviu Chircu * [13475f6c9] : usrloc/registrar: Improve documentation * add URL anchors for modparams, functions, MI commands, etc. * fix some incorrect preset strings 2018-03-28 Razvan Crainea * [b7b183620] : event_jsonrpc: consider timeout as milliseconds 2018-03-28 Razvan Crainea * [fe84e85e9] : net: expose tcp_connect_blocking with timeout 2018-03-28 Razvan Crainea * [ce80769b4] : event_jsonrpc: update README with transport proto 2018-03-28 Razvan Crainea * [8d6bf2dfd] : event_jsonrpc: remove useless shm for msg building 2018-03-28 Liviu Chircu * [b009644c4] : Merge branch 'feature/usrloc-clustering' 2018-03-28 Liviu Chircu * [522a8491b] : registrar: Add the "l" (local-only) lookup() flag 2018-03-28 Liviu Chircu * [ceaaa9495] : usrloc: Document the clustering features 2018-03-28 Liviu Chircu * [494810e60] : usrloc: Properly handle bad clutering presets on startup 2018-03-28 Liviu Chircu * [9966a002f] : usrloc: Fix NULL dereference 2018-03-28 Liviu Chircu * [a69dea972] : usrloc: Align some clustering modes to global naming This makes the modes easier to digest, as they now have similar naming with other clustered code, such as presence clusters. 2018-03-28 Liviu Chircu * [48129c321] : usrloc/registrar: Implement cachedb federation clustering The "federation-cachedb" clustering revolves around the following three metadata-related operations: - on AoR save: ensure the following NoSQL key/multi-value is present: { pk: , aor: , home_ip: }. This advertises the AoR's presence in our location to other PoPs. - on AoR lookup: fetch all values of , add as call branches of the current INVITE, on top of any existing local contact branches - on AoR remove: delete our from NoSQL, as well as the AoR from local storage. 2018-03-28 Liviu Chircu * [3976161c7] : registrar: Simplify usrloc binding at mod_init() 2018-03-28 Liviu Chircu * [2cd3f0ba3] : clusterer: Add api.get_my_sip_addr() Self-explanatory: fetch the current node's "sip_addr" column value. 2018-03-28 Liviu Chircu * [24c793c2d] : branch engine: Improve code consistency 2018-03-28 Liviu Chircu * [ce5a8e65c] : cachedb: Refactor some dict-related code Prefix all functions with "cdb_", for consistency. 2018-03-28 Liviu Chircu * [e76465017] : usrloc: Fix bad flags/cflags documentation 2018-03-28 Liviu Chircu * [e92f79a29] : usrloc: Improve clustering mode nomenclature 2018-03-28 Liviu Chircu * [5486cd024] : Minor code improvements * fix redundant write ops in get_cluster() / get_node() * zeroize the API, just in case * fix ambiguous var name * use static where needed 2018-03-28 Liviu Chircu * [76ddf7ab8] : clusterer: Add api.send_all_having() function The idea is to be able to broadcast a message within a cluster while skipping nodes which do not match a given node filter. 2018-03-28 Liviu Chircu * [4cd6a5ed2] : dialog/usrloc: Refactor clusterer deps Reuse definition from commit 9a6eba7e18cb9f 2018-03-28 Liviu Chircu * [00295831a] : usrloc: Improve some log messages 2018-03-28 Liviu Chircu * [5e45e3797] : usrloc, core-cluster: Fix timer-based contact cleanups 2018-03-28 Liviu Chircu * [509b6aef1] : usrloc, core-cachedb-only: Fix "sip_instance" updates 2018-03-28 Liviu Chircu * [154abf97c] : nathelper: Complete commit 4957cc3eff0 Properly null-terminate the array... 2018-03-28 Liviu Chircu * [d20864854] : registrar lib: Fix confusing variable name 2018-03-28 Liviu Chircu * [b7934ad82] : nathelper/usrloc: Fix shm memleak 2018-03-28 Liviu Chircu * [ff939860b] : nathelper: Add "sipping_ignore_rpl_codes" CSV modparam This is useful when an OpenSIPS ping originator node is front-ended by some other SIP entity of the platform. When contacts are unreachable, the front-end will still respond to the pings (e.g. 408 Request Timeout), which we would rather ignore and get closer to removing the offline contacts. 2018-03-28 Liviu Chircu * [02e6a6412] : usrloc/nathelper: Implement pinging/timeouts in cachedb-only mode 2018-03-28 Liviu Chircu * [aaf884b01] : str.h: Fix doc line wrapping 2018-03-28 Liviu Chircu * [8c470422c] : clusterer: Minor improvements * get_my_index(): return a 1-indexed "nr_nodes" value * get_my_index(): release "cl_list_lock" earliest possible * add useful startup logging lines 2018-03-28 Liviu Chircu * [484655a42] : cachedb: Rename some filter operators 2018-03-28 Liviu Chircu * [44794f6e9] : cachedb_mongodb: Fix memory corruption on api.update() bson_reinit() must not be called on a bson_destroy()'ed bson. 2018-03-28 Liviu Chircu * [4c98b4335] : usrloc/nathelper: Refactor code for cachedb-only pinging 2018-03-28 Liviu Chircu * [bf16d0a36] : cachedb_mongodb: Add bson debugging logs in old API 2018-03-28 Liviu Chircu * [3dba1ccfa] : registrar: Fix remove() with "*db-only" usrloc modes 2018-03-28 Liviu Chircu * [f043f5fe3] : usrloc "core-cachedb-only": Fix remaining lookup issues * fix "methods" field * avoid "NO-OP" update queries 2018-03-28 Liviu Chircu * [f05bf6d26] : usrloc: Expose struct debugging functions to upper modules 2018-03-28 Liviu Chircu * [5579f6eac] : usrloc: Do not pollute "usrloc.h" with internal vars 2018-03-28 Liviu Chircu * [e996667c0] : cachedb: Elaborate key naming restrictions 2018-03-28 Liviu Chircu * [bfe1fdc98] : usrloc core cachedb cluster: Fix some left-over issues * base64 encode all contact keys (".", for example, breaks MongoDB) * do not pkg_free() SHM strings during cleanup * add useful dict/BSON debugging lines * improve coding style 2018-03-28 Liviu Chircu * [c4de5ef9e] : clusterer: Abort startup when 'db_url' is mandatory 2018-03-28 Liviu Chircu * [e4ba61d27] : usrloc: Fix some startup issues * proper module deps for the cache URL * fix some trivial modparam bugs 2018-03-28 Liviu Chircu * [5a2d87b1d] : usrloc: Refactor all code using "db_mode" 2018-03-28 Liviu Chircu * [2134189ca] : usrloc: Implement "core cluster" urecord handling 2018-03-28 Liviu Chircu * [d3236fa3c] : cachedb_mongodb: Adapt filters to libmongoc 1.5.0+ 2018-03-28 Liviu Chircu * [37c9d7222] : cachedb: Add easy-to-use dict append primitives 2018-03-28 Liviu Chircu * [48e543c49] : usrloc & cachedb: Document and check some return codes 2018-03-28 Liviu Chircu * [d510cdc76] : usrloc: Implement the NoSQL version of get_urecord() 2018-03-28 Liviu Chircu * [9df50cb5d] : usrloc: Add support for "cache DB" URLs 2018-03-28 Liviu Chircu * [9b9c6345c] : usrloc: Refactor modparams to fit upcoming additions 2018-03-27 Bogdan-Andrei Iancu * [71ee024e5] : Fixed etag replication when the etag is re-generated during each Publish. We need to replicate both the old (received) and new (generated) etag via the cluster, so the receiving nodes can properly identity the presentity to be updated. 2018-03-27 Vlad Patrascu * [cde77b0cc] : ratelimit: allow specification of pipe limit per interval Closes #1130 2018-03-27 Razvan Crainea * [d0fc9692a] : event_jsonrpc: add readme Closes #1297 2018-03-27 Razvan Crainea * [03a75293d] : add new event_jsonrpc module 2018-03-27 Razvan Crainea * [63e789f12] : rtpengine: also add db schema 2018-03-27 Vlad Patrascu * [2d921e77e] : tm: fix clusterer capability registration 2018-03-27 Vlad Patrascu * [09ae07f99] : presence: fix clusterer capability registration 2018-03-27 Vlad Patrascu * [5f6115875] : dialog: rename "replication" tags to "sharing" tags 2018-03-27 Vlad Patrascu * [10977d86f] : dialog: document replication tag related param, MI cmd and script function 2018-03-27 Vlad Patrascu * [879c4d4c6] : clusterer: add option for capabilities to be in OK state without data sync Specify at registration time if data sync is required for a certain capability in order to be in the OK state. 2018-03-27 Vlad Patrascu * [c23a4ce84] : clusterer: add MI command that lists capabilities 2018-03-27 Vlad Patrascu * [86626f64a] : dialog: add MI command that lists replication tags 2018-03-27 Vlad Patrascu * [93724475a] : dialog: don't update DB when replication tag is backup 2018-03-27 Vlad Patrascu * [fab763321] : dialog: also set replication tag state through modparam 2018-03-27 Vlad Patrascu * [7c8495515] : dialog: suppress in-dialog pinging when replication tag is backup 2018-03-27 Vlad Patrascu * [ffb2e526b] : dialog: don't run TERMINATED and EXPIRED DLGCBs when replication tag is backup 2018-03-27 Vlad Patrascu * [9b2e917af] : dialog: don't throw error if dialog from deleted replication packet is not found 2018-03-27 Vlad Patrascu * [5319d592f] : dialog: don't replicate dialog events when tag is backup Don't send create/update/delete messages when replication tag is backup. 2018-03-27 Vlad Patrascu * [fc32d57f8] : dialog: don't report error if replication tag is not set 2018-03-27 Vlad Patrascu * [c9e68f92b] : dialog: prevent BYEs on dialog expiration when replication tag is backup 2018-03-27 Vlad Patrascu * [5fdbce418] : dialog: forbid terminating dialogs via MI when replication tag is backup 2018-03-27 Vlad Patrascu * [91b92591e] : dialog: add mechanism that allows tagging dialogs when replicating Dialogs can be labeled from the the script using the set_dlg_repl_tag() function and each tag has a state(active/backup) which can be set via the "set_repl_tag_active" MI cmd. The tags and their states are shared in the cluster and nodes automatically go to the backup state when another node is set to active. 2018-03-27 Vlad Patrascu * [db592fd07] : dialog: sync dialogs from another node at startup The node to sync the dialogs from is chosen by the clusterer module. Syncing is also possible at runtime through an MI command. 2018-03-27 Bogdan-Andrei Iancu * [edd206497] : Fix wrong naming of internal flags. Not sure why the flags used by t_relay() are named TM_T_REPLY_xxxxxx :D... Moved to TM_T_RELAY_xxxxx 2018-03-27 Bogdan-Andrei Iancu * [18bf21a2c] : Docs updated for t_relay() 2018-03-27 Bogdan-Andrei Iancu * [4747da559] : Added support for Content-Disposition: no-cancel As per RFC3841, section 9.1, the TM module may be instructed not to cancel all ongoing branches when a 2xx reply is received. It will keep the pending branches ongoing until (1) all branches will receive a final reply or (2) the transactionhits the timeout. This is work sponsored by Harris Corporation (https://www.harris.com) 2018-03-27 Bogdan-Andrei Iancu * [5bb438ad3] : Documentation updated with the latest clustering params 2018-03-27 Bogdan-Andrei Iancu * [a90396919] : Simply renamed MI functions 2018-03-26 Bogdan-Andrei Iancu * [c0762189f] : Added full data sharing across presence cluster. Data (watchers and presentites) may be are shared via the SQL DB; a new tagging mechanism adds the ownership concepts (over watchers/subscribers) to avoid multiple NOTIFY'es being trigger by all the nodes when a presentity expires. Added "federation" mode parameter to enable / disable the federation-like bahvior when comes to data sharing - federating/partioning data across nodes. 2018-03-26 Vlad Patrascu * [002ea071a] : sip_i: fix doc example for isup_msg_type PV 2018-03-26 Vlad Patrascu * [ac50be197] : dialog: add callid, from-tag, to-tag params to E_DLG_STATE_CHANGED Closes #1126 2018-03-26 Vlad Patrascu * [4c5dc148a] : dialog: accept variables for profile name in script functions Closes #1279 2018-03-23 Razvan Crainea * [faea40201] : cgrates: fix documentation section name 2018-03-23 Razvan Crainea * [53f16a088] : cgrates: add attributes parsing example 2018-03-23 Razvan Crainea * [0fab92da3] : presence: fix query column out of array 2018-03-23 Razvan Crainea * [6918e1ab2] : rtpengine: document database support 2018-03-23 Razvan Crainea * [094c850dd] : rtpengine: add database support shamelessly copy db support from rtpengine Closes #1092 2018-03-23 Razvan Crainea * [aca09b485] : rtpengine: make sure second call does not crash 2018-03-23 Bogdan-Andrei Iancu * [583a65172] : Added missing files from previous commit 2018-03-23 Bogdan-Andrei Iancu * [f7bed45a4] : Added support for sharding/partitioning cluster. A sharding clustering is a presence cluster where each node keeps its own set of watchers and presentities of an interest. Any new Published presentity is replicated to all the cluster nodes, but stored only by nodes interested in it (if there are watchers for that presentity). For initial subscriptions, there is quering mechnism inside the cluster - to try to fetch the presentity data from any other node. 2018-03-22 Razvan Crainea * [a196fb876] : cgrates: properly handle returned values 2018-03-22 Razvan Crainea * [7f89ea301] : Merge branch 'feature/cgrates-ng' 2018-03-22 Razvan Crainea * [033773e72] : cgrates: allow SessionSv1.DisconnectSession rpc 2018-03-22 Dan Pascu * [85c4e28a7] : Use consistent spacing in xml schema 2018-03-22 Razvan Crainea * [7f7ca1f8c] : cgrates: allow seting NULL to variables 2018-03-22 Dan Pascu * [a7fee1a72] : Fixed building release dependent debian packages on debian unstable/sid 2018-03-22 Dan Pascu * [960eac268] : Strip PATH from opensipsdbctl too for debian package 2018-03-22 Dan Pascu * [a55702e66] : Use consistent spacing in debian rules 2018-03-22 Dan Pascu * [de9df1c80] : Fixed typo in debian rules 2018-03-22 Razvan Crainea * [654418d9e] : cgrates: adjust auth documentation 2018-03-22 Dan Pascu * [28b4783dc] : rtpengine: Fixed compilation when PKG_MALLOC is not defined 2018-03-22 Razvan Crainea * [3c7ac2d99] : cgrates: add support for SessionSv1 accounting 2018-03-22 Razvan Crainea * [69b89c3c4] : cgrates: save reply objs for cgrates_cmd() 2018-03-21 Razvan Crainea * [51c91da19] : cgrates: MaxUsage is a float now 2018-03-21 Razvan Crainea * [6325370e8] : cgrates: document the new $cgrret(name) usage 2018-03-21 Razvan Crainea * [2bfd0a315] : cgrates: add names for the $cgrret var 2018-03-20 Bogdan-Andrei Iancu * [1e61bdc5b] : Removed bogus destroy function The data freed in destroy callback actually resides in pkg and not shm memory - this is the original bug. Now that the data is pkg, makes no sense to free it from the attendant process. 2018-03-20 Bogdan-Andrei Iancu * [08ba76be3] : Fix double CT header when a single body part is left The previous commit introduced a bug resulting in a double (identical) Content Type header when, after removing a part, you are left with a single part body. 2018-03-20 Razvan Crainea * [e49ec9512] : tm: add documentation for anycast support 2018-03-20 Razvan Crainea * [8e87181a3] : tm: add support for auto-cancel 2018-03-20 Razvan Crainea * [4c2625d26] : tm: init msg before parsing 2018-03-20 Razvan Crainea * [f86b1b31c] : tm: reset cancelled_T before searching for transaction 2018-03-20 Razvan Crainea * [ba8829f07] : tm: also replicate message index 2018-03-20 Razvan Crainea * [7621de6fa] : tm: add debugging for non-matched transaction 2018-03-20 Razvan Crainea * [6236c95fb] : bin: fix bin_extend() usage 2018-03-20 Razvan Crainea * [fc0dc0759] : tm: add incoming auto-cancel 2018-03-20 Razvan Crainea * [928531272] : tm: properly detect if transaction is local 2018-03-20 Razvan Crainea * [ce43f8982] : tm: remove TODO for replicated messages 2018-03-20 Razvan Crainea * [e38b71bdb] : receive_msg: receive custom message flags 2018-03-20 Razvan Crainea * [f59716f54] : tm: add support for ACK and CANCEL replication 2018-03-20 Razvan Crainea * [e96acb9dc] : add is_anycast() macro 2018-03-20 Razvan Crainea * [54c90dc54] : tm: add message replication support 2018-03-20 Razvan Crainea * [88b4e2db2] : tm: port cluster to new interface 2018-03-20 Razvan Crainea * [247834ac4] : net: indicate an interface is anycast IP 2018-03-20 Razvan Crainea * [fbda182e0] : [WIP] tm: add cid parameter for cluster support 2018-03-20 Razvan Crainea * [c7a06fb12] : msg: provide via_parameter from outside the message 2018-03-20 Razvan Crainea * [9a6eba7e1] : clusterer: use a single get_deps_clusterer impl 2018-03-20 Bogdan-Andrei Iancu * [4feff3ea6] : Added support for extra headers per body part. When adding a body part (directly via sipmsgops module or indirectly via sip_i module), you can specify an optional list of SIP headers (fully formated, including the header terminator) to be pushed into the part next to the Content-Type header. The specific changes: * in sipmsgops module, the add_body_part() takes a third optional parameter for extra headers to be pushed into the part; * in sip_i module, the add_isup_part() funtion takes a second optional parameter for defining a custom set of extra headers; * in sip_i_module, a new module parameter "default_part_headers" can be used to define the default set of headers to be automatically pushed into the ISUP parts. 2018-03-19 Ovidiu Sas * [730149884] : httpd: allocate http reply buffer in sys mem instead of pkg mem - buffer size no loger restricted pkg mem size 2018-03-15 Razvan Crainea * [b0aeb0aef] : [WIP] cgrates: parse values back for Auth 2018-03-15 Razvan Crainea * [4aa8568ad] : rtpengine: improve MOS stats documentation 2018-03-15 Razvan Crainea * [a2baf94fb] : rtpengine: add more RTP statistics 2018-03-15 Razvan Crainea * [439c4f8dc] : rtpengine: add support for average MOS 2018-03-15 Razvan Crainea * [fdcbb715b] : rtpengine: provide a generic way of using reply This commit returns the reply of the RTPEngine server in a JSON format, so that the script writer can extract any information from it. 2018-03-14 Liviu Chircu * [4f8eba7b8] : freeswitch_scripting: Add proper credits for the module idea 2018-03-14 Liviu Chircu * [e0fe570fe] : usrloc/nathelper: Compute and report ping latencies This patch adds a new nathelper branch flag, "sipping_latency_flag", to enable ping latency computation. Also, a new usrloc event is now available, E_UL_LATENCY_UPDATE. All contact-related usrloc events now include a new parameter, "latency", which holds the latency of the last successful ping if any, or 0 otherwise. If available, the ping latency can also be accessed via MI, using the "Ping-Latency" key of the contact data. Credits for the idea and an initial version of this patch go to Shlomi Gutman . 2018-03-14 Bogdan-Andrei Iancu * [5cd8e0ece] : Removed bogus debug log 2018-03-14 Razvan Crainea * [373c59828] : rtpengine: add transcoding documentation 2018-03-14 Razvan Crainea * [a12f6a84d] : rtpengine: fix params passing doc 2018-03-13 Bogdan-Andrei Iancu * [4c0c761ce] : Fixed update the len of the parameter strs. 2018-03-13 Razvan Crainea * [3419f9333] : [WIP] cgrates: add compat_mode parameter and $cgr_opt() 2018-03-13 Vlad Paiu * [7844aaba9] : Also flush carrier id AVPs when initiating a new routing Fixed cases where do_routing() followed by route_to_carrier() would report the wrong carrier id 2018-03-12 Liviu Chircu * [fab66fd32] : cachedb: Make tests more robust to error conditions i.e. do not segfault if the driver is bad 2018-03-12 Liviu Chircu * [3db8e8cd7] : make test: Properly append "-DUNIT_TESTS" if needed The previous logic wouldn't work with an old Makefile.conf 2018-03-12 Liviu Chircu * [dec80542e] : cachedb: Clean up redundant typedefs 2018-03-12 Liviu Chircu * [1237eabd0] : cachedb_mongodb: Fix compile warning with libmongoc 1.7 2018-03-10 Liviu Chircu * [79418dce9] : build system: Add special handling for gcc 7.2 It appears that gcc's "-dumpversion" behaves differently in 7.2 than in previous versions, due to "-dumpfullversion" being introduced. $ gcc -dumpversion 7 $ gcc -dumpfullversion 7.2.0 This breaks compilation on systems such as Xubuntu 17.10 with: Makefile.defs:930: You are using an old and unsupported gcc version (7), compile at your own risk! This backwards-incompatible change seems to have been reverted in 7.3+, though, where the full version is once again being dumped: $ gcc -dumpversion 7.3.0 $ gcc -dumpfullversion 7.3.0 2018-03-07 Razvan Crainea * [8d68f03c4] : acc: fix leak when assinging empty string to extra Many thanks to Pete Kelly for reporting and offering testing environment for this bug! 2018-03-06 Razvan Crainea * [06aa1ed8c] : ratelimit: fix documentation Properly document which routes the functions are allowed to run into. 2018-03-06 Razvan Crainea * [f2f88f1bd] : cgrates: allow cgrates_cmd() from any route 2018-03-06 Razvan Crainea * [28254a2aa] : topo_hiding: do not delete shm lumps from add_rm list These lumps can point somewhere in the middle of a shm lumps chunk, thus will result in a memory corruption error. Many thanks to Jonathan Hulme for providing testing environment! 2018-03-06 Razvan Crainea * [0c0679bd2] : httpd: make buffer a quarter of the pkg memory Exactly as it is described in the documentation. 2018-03-06 Bogdan-Andrei Iancu * [aa6132600] : Removed wrong error message. If the counter does not exist, simply print NULL, do not throw an error 2018-03-05 Liviu Chircu * [0fd818b5e] : usrloc: Fix broken DB_ONLY mode The recently introduced k/v support had not been tested with this mode yet... 2018-03-02 Bogdan-Andrei Iancu * [5b0bc1e30] : Fixed DB URL escaping. The ability to escape/encode DB URLs using %xy became a must with the auto generated user and passwords in the cloud envs. 2018-03-02 Bogdan-Andrei Iancu * [f14801795] : Added new set of load statistics for extra procs. The "load" set of stats (rt, 1m, 10m) covers now only the OpenSIPS core processes (it does not count the load for the extra processes forked by the modules). The new "load-all" set will count the load for *all* OpenSIPS procs, core or module. 2018-03-02 Bogdan-Andrei Iancu * [f06624568] : Added more flags when forking internal processes. Two new flags were added : * NO_LOAD - the process should not be counted when calculated the load * IS_EXTRA - this is an EXTRA process requests by a module (it is not an OpenSIPS core process) 2018-03-02 Liviu Chircu * [dc51ee60f] : Revert "travis: compile mongodb module" This reverts commit 9d30f94dc45a4e99f42d1fd22e8a96273e6d3c29. Since "libmongo-client" is a completely different codebase (https://github.com/algernon/libmongo-client) from the official "mongo-c-driver" project and "libmongoc" package (https://github.com/mongodb/mongo-c-driver), we have to disable it from Travis momentarily. The "libmongoc-dev" package has yet to arrive on Ubuntu 14.05, which is the current Travis build environment. 2018-03-02 Liviu Chircu * [234cf3967] : F_MALLOC: Fix "last free" line reports when debugging If -DBG_MALLOC is in use, double free operations would report the "first free" to actually be the malloc operation, which is incorrect. 2018-03-02 Liviu Chircu * [9e9221802] : F_MALLOC: Improve double free error reporting 2018-03-02 Liviu Chircu * [d98f115ec] : cachedb_mongodb: Fix clang warning 'cursor' is used uninitialized... 2018-03-02 Razvan Crainea * [9d30f94dc] : travis: compile mongodb module 2018-03-01 Vlad Patrascu * [1378b51bc] : sql_cacher: fix supported column types to include blob 2018-03-01 Liviu Chircu * [c1ebfe55e] : siptrace: Clean up duplicate code 2018-03-01 Liviu Chircu * [ccb696ecd] : ut.h: Document recently added macros 2018-03-01 Liviu Chircu * [0f65dbfec] : cache_fetch: Fix MI tree format The MI "cache_fetch" command was building a poorly formatted MI tree (viz below). We fix the command tree format in order to make the resulting data easier to digest programatically. Old MI tree format visualization: 'NULL: "out_key: [out_value]"' New MI tree format visualization: '"key": "out_key", "value": "out_value"' Reported by Hamid Elaosta. Fixes #1298 2018-03-01 Razvan Crainea * [ca34b0d12] : tm: fix README typo 2018-02-28 Vlad Patrascu * [58b923f40] : sql_cacher: all keys in cache can now be invalidated in "on demand" mode Also fix a potential mem leak and improve coding style and some log messages. 2018-02-28 Liviu Chircu * [a74de586c] : cmdline parser: Fix left behind options The "-T" and "-S" options were left behind at some point, with the added bonus of summoning a corefile when used ("opensips -S" or "opensips -T"). 2018-02-28 Liviu Chircu * [784aa1311] : Merge branch 'feature/cachedb-column-oriented-api' 2018-02-28 Liviu Chircu * [89babc55f] : cachedb: Final code refactoring * cdb_kv_t -> cdb_pair_t (more suggestive) * move all dict primitives to cachedb/cachedb_dict.[ch] * fix some coding style issues 2018-02-28 Liviu Chircu * [52dffcfcf] : cachedb_mongodb: Fix last TODOs 2018-02-28 Liviu Chircu * [38975dfac] : cachedb_mongodb: Enable multi-row updates 2018-02-28 Liviu Chircu * [d82b3ceae] : cachedb: Add unit tests for column "unset" operations 2018-02-28 Liviu Chircu * [c209ccbe0] : cachedb_mongodb: Implement the multi-key "unset" API requirement 2018-02-28 Liviu Chircu * [ce54ac89d] : cachedb: Simplify the column-oriented API Since some NoSQL backends support upsert-enabled "set" and "unset" operations on multiple key/value pairs using a single query, we can merge the "set_cols()" and "unset_cols()" functions into a single one: "update()". Current backends known to support this are MongoDB and Cassandra. Any backends which do not support the above will have to implement the update() endpoint using two queries instead of one. 2018-02-28 Bogdan-Andrei Iancu * [f1ec655b0] : Fix extra 1 byte being copied after removing param. I have no clue why that "+1" was there :-|. Makes no sense. Reported by Ben Newlin 2018-02-28 Bogdan-Andrei Iancu * [b77c1823e] : Extend the test for re-using pre-compiled regexp. A failure in compiling a regexp may lead to an inconsistent state, where the buffer is correctly populated, but the regexp pointer is NULL -> on next usage, the code will attempt to directly used (as the regexp buffer matches) the NULL pointer and crash. Reported by Ben Newlin 2018-02-28 Liviu Chircu * [b45c1bd83] : cachedb: Fix cap detection 2018-02-27 Liviu Chircu * [2944ba83b] : ut.h: Remove redundant memset() 2018-02-27 Liviu Chircu * [5ec432c7f] : cachedb_mongodb: Fix missing primary key flag on "get rows" Also do some minor clean-ups 2018-02-27 Liviu Chircu * [7045fce0b] : cachedb: Refactor and finalize the "set cols" tests 2018-02-27 Liviu Chircu * [d5a0462ec] : cachedb: Add dict debugging primitives 2018-02-27 Bogdan-Andrei Iancu * [93cc34871] : Fix dangerous \0 adding outside the str buffer. It is bogus to write a 0 outside the str buffer as (1) the buffer may be in data zone (so read-only) or (2) it may be in shm memory and an overflow may corrupt the memory manager Reported by Ben Newlin 2018-02-27 Razvan Crainea * [bdeb8ff13] : net: only start TCP workers if there are listeners Credits goes to Xaled for reporting this on mailing list 2018-02-27 Bogdan-Andrei Iancu * [c9e7db08e] : Fix displaying the usrloc domains. Dropped the "records" parameters as there is no way to count in advance how many records we may have in a dynamic shared hash table. Renamed "table" attribute into "hash_size" as this what it display :P Related to #1265 2018-02-27 Razvan Crainea * [d24e85acf] : drop DYN_BUF variable It wasn't working properly anyway 2018-02-27 Bogdan-Andrei Iancu * [e472e5286] : Update the help messge. '-D' is not "do not fork" anymore, but enbles the "debug mode" Reported in #1295 2018-02-27 Bogdan-Andrei Iancu * [78e8bea12] : Migrate the "expires" column from DATETIME to INT. Instead of keeping a DATETIME which is impacted by TZ and DST changes, use UNIX timestamp Fixes #1196. 2018-02-27 Bogdan-Andrei Iancu * [ffa51f822] : Added docs for the probing_verbose module parameter. Reported via #1280 2018-02-27 Bogdan-Andrei Iancu * [fefc33f10] : Added doc node about usage across differen top routes. Related to #1277 report 2018-02-26 Liviu Chircu * [f402f6987] : cachedb_mongodb: Implement the "SET COLS" capability 2018-02-26 Liviu Chircu * [d683ae8d5] : cachedb: Add unit tests suite for "SET COLS" capability 2018-02-26 Liviu Chircu * [816db4ff5] : cachedb_mongodb: Add useful debugging macros 2018-02-26 Liviu Chircu * [612c8d8fa] : cachedb_mongodb: Improve filter construction For single filters, avoid using the $and operator 2018-02-26 Liviu Chircu * [34dd480d0] : cachedb: Add object management primitives i.e. for "cdb_kv_t" and "cdb_dict_t" objects 2018-02-26 Liviu Chircu * [458690a87] : cachedb_mongodb: Implement the "truncate" capability 2018-02-26 Liviu Chircu * [73e4f1423] : cachedb: Add the "truncate" capability 2018-02-23 Liviu Chircu * [7c7ea7c64] : cachedb: Fix memleak 2018-02-23 Liviu Chircu * [88ff10d45] : cachedb: Refactor the multi-set/multi-unset API * add support for primary keys (e.g. to fit with MongoDB) * add support for map-level TTLs (to exploit Cassandra's powerful TTLs) 2018-02-23 Razvan Crainea * [ff86066ea] : dialog: fix previous commit warning 2018-02-23 Razvan Crainea * [552bd4e7a] : dialog: fix reinvite pinging make sure that pinging is properly engaged Credits go to Jonathan Hulme Closes #1082 2018-02-22 Liviu Chircu * [5d0839cf8] : cachedb_mongodb: Fix a filtering operator bug 2018-02-22 Liviu Chircu * [d95187a8d] : cachedb: Add unit tests for multi-filtering 2018-02-22 Liviu Chircu * [5481bc3f8] : cachedb: Add a unit testing suite for the GET_ROWS capability 2018-02-22 Liviu Chircu * [8b70ec3b9] : cachedb_mongodb: Implement the GET_ROWS capability 2018-02-22 Liviu Chircu * [acf1afd4f] : cachedb: Add a filter management API 2018-02-22 Liviu Chircu * [3efcb9b28] : cachedb: Refactor the core data abstractions 2018-02-22 Liviu Chircu * [90b1840de] : core utils: Useful additions * str_cpy() - similar to strcpy(), but works with strs * macros for working with singly linked lists 2018-02-22 Bogdan-Andrei Iancu * [6bd6d7128] : Fixed return code in del_uri_param() function. Avoid returning 0 if the param is not found, as 0 terminates the whole script execution. Reported by Ben Newlin 2018-02-21 Bogdan-Andrei Iancu * [305a570f7] : Remove any capability constraints because of the used MODE. As we are not aware of the relation (if any) between the real DB URLs from the set, it is not correct to restrict DB capabilities based on the used MODE. Like if it is Round Robin, do not do UPDATE ever. Maybe the URLs point to the nodes of the same cluster. 2018-02-21 Razvan Crainea * [baf4af90f] : rtpengine: allow specifying 15 length options 2018-02-15 Liviu Chircu * [888d5e9b3] : rest_client: Fix a string handling bug in append_hf() Issue reported by Pasan Meemaduma 2018-02-15 Liviu Chircu * [2254d0011] : F_MALLOC: Recover from double pointer free This patch makes F_MALLOC more robust in production by avoiding memory corruption in case of double free operations. Previously, the hash state would immediately get corrupted on such operations, and it would only be a matter of time before the allocator would crash in some random place with a useless backtrace resembling: \#0 0x0000000000507209 in fm_remove_free (qm=0x7f7d578d2010, size=56) at mem/f_malloc.c:200 200 *pf=n->u.nxt_free; When DBG_MALLOC is defined, F_MALLOC will now abort() on a double free, similar to QM_MALLOC. 2018-02-15 Liviu Chircu * [c77dac54f] : module deps: Improve feedback on modparam errors 2018-02-15 Liviu Chircu * [56e8eb3ea] : cachedb_mongodb: Properly return "key not found" retcode 2018-02-14 Liviu Chircu * [e9846467d] : mid_registrar: Log the Call-ID on erroneous register forking 2018-02-14 Liviu Chircu * [0a08c9e16] : cachedb: Extend the headerfiles with dict-aware prototypes 2018-02-14 Liviu Chircu * [b3ef9c189] : core: Refactor the mpath-related code into a function 2018-02-14 Liviu Chircu * [2d3c0733d] : Add a basic unit testing framework Currently, this framework only supports writing unit tests for core code, but there are plans to expand it such that module tests can be easily written as well. The chosen C unit testing framework is libtap (https://github.com/zorgnax/libtap) - very lightweight and full of goodies. In order to write a core unit test, you should write the test file under a "test/" dir which resides right next to the tested file. The build system is smart enough to link any such test files placed in random test dirs all across the core codebase. Next, you enrol your test file to be init'ed and run in test/unit_tests.c, and you're done. To run the entire unit testing suite, just do "make test". You will have to type this command twice if you haven't enabled "-DUNIT_TESTS" under Makefile.conf beforehand. 2018-02-13 Liviu Chircu * [29f4cf48d] : Travis: Be less verbose on Slack 2018-02-13 Liviu Chircu * [7337b9abd] : dialog: Provide meaningful timer function names 2018-02-13 Dan Pascu * [4039f265d] : permissions: Handle integer columns of different sizes in tables/views 2018-02-13 Razvan Crainea * [25d6396ea] : fix passing NULL values for route param 2018-02-13 Liviu Chircu * [ac2f28ffa] : Fix a famous typo 2018-02-13 Bogdan-Andrei Iancu * [46e2dfa8d] : Fix pushing pure INT values into acc extra. Convert integer values to str if the val does not advertise any STR val. 2018-02-13 Razvan Crainea * [9924969bf] : siprec: fix uninitialized warning 2018-02-12 Vlad Patrascu * [c144e5f96] : siprec: allow custom XML values for caller/callee in siprec_start_recording() Closes #1263 2018-02-12 Dan Pascu * [73fb7cdbc] : Separate memory allocation from test 2018-02-12 Dan Pascu * [6753cf2ce] : Adjusted spacing 2018-02-12 Dan Pascu * [bcd551b29] : Be consistent with spacing, comments and NULL 2018-02-09 Vlad Patrascu * [fa94b5e7d] : siprec: add t= and c= lines in the sdp body The IP is taken from a new parameter for the siprec_start_recording() script function. Closes #1262 2018-02-07 Liviu Chircu * [8345ff29f] : cachedb_mongodb: Fix possible crash in counter add/sub 2018-02-07 Razvan Crainea * [d6933ad99] : ratelimit: create pipe in a generic manner Fix pipe init by merging the pipe create in a single, common function. 2018-02-06 Vlad Patrascu * [b0a55397d] : clusterer: fix table version in db schema 2018-02-06 Razvan Crainea * [d857d4b95] : cgrates: fix using $cgr without dialog Thanks go to Artem Chalkov for reporing on GitHub Fixes #1268 2018-02-05 Ovidiu Sas * [ebbe49c50] : rtpproxy: revert commit ee2731212303eb7055b3bd165464fe44fae05e7b - add comments to better explain logic behind code 2018-02-05 Ovidiu Sas * [ee2731212] : nathelper: complete revert commit 3c39167e333a8801772f49f8561a015bfa1836f1 2018-02-05 Ovidiu Sas * [06c6fa179] : nathelper: revert commit 3c39167e333a8801772f49f8561a015bfa1836f1 - add comments to better explain logic behind code 2018-02-05 Bogdan-Andrei Iancu * [1177d975f] : Fix handling of ECONNRESET. Instead of returning -1 (error), better propagate it as an EOF. The meaning (from our perspective) is more or less the same. 2018-02-05 Bogdan-Andrei Iancu * [293d87a28] : Migrated TCP reporting to RPC dispatching. Instead of passing the reporting to the last TCP worker (ugly hack with process_no-2), simply dispatch to any available work the job of pushing the TCP report to the HEP backend. Also fixed shmem leak with IPC jobs. 2018-02-05 Bogdan-Andrei Iancu * [a2e4e73ff] : Added ipc_dispatch_rpc() similar to ipc_dispatch_job() ipc_dispatch_rpc() will run the RPC function into any idle/available process 2018-02-05 Ovidiu Sas * [55e9479b3] : rtpproxy: fix test condition for altering IP in SDP while forcing RTP 2018-02-05 Ovidiu Sas * [3c39167e3] : nathelper: fix test condition for updateing IP for fix_nated_sdp() 2018-02-03 Ovidiu Sas * [61d1a7c9d] : nathelper: update documentation for fix_nated_sdp() 2018-02-03 Ovidiu Sas * [9af01763a] : nathelper: new flag for fix_nated_sdp to allow re-writing null IPs 2018-02-02 Ovidiu Sas * [69fdc76b2] : sipmsgops: documentation updated for is_audio_on_hold() 2018-02-02 Ovidiu Sas * [8a0b08f60] : sipmsgops: is_audio_on_hold() returns hold type 1 - RFC2543 hold type (the connection IP is set to null IP) 2 - RFC3264 hold type (inactive or sendonly attr) 2018-02-02 Ovidiu Sas * [12c21547f] : parser/sdp: distinguish between RFC2543 and RFC3264 media hold type 2018-02-02 Liviu Chircu * [fc2025d93] : mid_registrar: Update documentation 2018-02-02 Liviu Chircu * [075dc9ba8] : mid_registrar: Allow REGISTER failover This patch fixes mid-registrar's callback logic to properly work when a failure_route is in use. 2018-02-02 Liviu Chircu * [664aee60d] : ut.h: Minor additions * add shm_str_sync() and shm_str_clean() * improve robustness during error states * complete refactoring started in e94d90d165 2018-02-02 Liviu Chircu * [3c916efed] : tm: Improve callback documentation 2018-02-02 Vlad Patrascu * [47aa5f7a4] : event_flatstore: return proper error message for evi_flat_rotate 2018-02-02 Vlad Patrascu * [e340e70cf] : event_flatstore: fix some locking issues 2018-02-02 Vlad Patrascu * [c4d113a92] : event_flatstore: fix possible crash when subscribing 2018-02-01 Ovidiu Sas * [61521c713] : nathelper: update documentation for fix_nated_sdp() 2018-02-01 Ovidiu Sas * [ae1316628] : nathelper: fix_nated_sdp can add a new SDP field(s) - the SDP field(s) is/are added at the end of SDP - the SDP field(s) are provided as a thrd param to fix_nated_sdp() - each SDP field must be preceeded by "\r\n" 2018-02-01 Razvan Crainea * [bd60d31d8] : cfg: align parsing errors to a single format 2018-02-01 Razvan Crainea * [adfc62b55] : cfg: fix error reporting for unenclosed scriptvars 2018-02-01 Razvan Crainea * [08bc17915] : ratelimit: replicate the current counter for SBT 2018-01-31 Liviu Chircu * [2e24c55e9] : process load: Code refactoring * move stat building code into pt_load.c * avoid using "pid" in order to refer to "process_no" 2018-01-31 Liviu Chircu * [9c0bf6bbf] : process load: Fix some minor issues * fix possibly incorrect 1m window values during very active periods * fix possible zero activity reported during very active periods 2018-01-31 Razvan Crainea * [b7862ccdd] : pvar: fix $hdr() to allow variable headers 2018-01-31 Razvan Crainea * [c71021e84] : tls_mgm: fix doc for client_domain_avp 2018-01-31 Răzvan Crainea * [a94423dbc] : Merge pull request #1269 from netaskd/patch-1 tls_client_domain_avp mismatch in readme 2018-01-30 Razvan Crainea * [6243d57ba] : dialog: fix README to reflect actual event params 2018-01-30 netaskd * [8498dc894] : tls_client_domain_avp mismatch in readme Parameter must be not "tls_client_domain_avp" but "client_domain_avp" 2018-01-30 Bogdan-Andrei Iancu * [ed12eb97c] : Fix reverse_hex2int64() prototype As the computed value is an unsigned (as data size), it cannot be returned as int as it will overflow and get converted to a negative value. This will colide with the negative error ret code -1 2018-01-30 Bogdan-Andrei Iancu * [c1d46c187] : Avoid bool test on float values Trevis reported. 2018-01-30 Bogdan-Andrei Iancu * [a61fa8646] : Explicit reset of conn ID on error if reverse_hex2int fails, be sure the conn id stays 0. 2018-01-30 Bogdan-Andrei Iancu * [095dc5730] : Fix reverse_hex2int() prototype As the computed value is an unsigned (as data size), it cannot be returned as int as it will overflow and get converted to a negative value. This will colide with the negative error ret code -1 Reported by Daniel Zanutti. 2018-01-30 Bogdan-Andrei Iancu * [065a91776] : Avoid calling clusterer_api.request_sync if no cluster configured 2018-01-29 Bogdan-Andrei Iancu * [091149b07] : Added new load support based on active/idle time. The way the internal load is calculated and reported is radically changed. Instead of providing per-interface load and only for SIP related processing, the new "load" support calculates per process the amount of time spent in any processing (outside the I/O reactor) versus total time. The time granularity is 1us. This new system covers any kind of handling (SIP, timer, async, etc) inside a process. The TCP main and timer handler will also provide load information. In the future, the extra processes (per module) may easily record their load information. Each process (and globally) reports 3 load statistics: * realtime load, computed over the last 1s * last 1 minute load * last 10 minutes load Example via "opensipsctl fifo get_statistics load:" : load:load:: 24 load:load1m:: 19 load:load10m:: 1 load:load-proc-1:: 0 load:load1m-proc-1:: 0 load:load10m-proc-1:: 0 load:load-proc-2:: 0 load:load1m-proc-2:: 0 load:load10m-proc-2:: 0 load:load-proc-3:: 0 load:load1m-proc-3:: 0 load:load10m-proc-3:: 0 load:load-proc-4:: 67 load:load1m-proc-4:: 22 load:load10m-proc-4:: 2 load:load-proc-5:: 79 load:load1m-proc-5:: 24 load:load10m-proc-5:: 2 2018-01-29 rvlad-patrascu * [0ca2f0418] : Merge branch 'feature/clustering-enhancements' Conflicts: modules/usrloc/README 2018-01-26 rvlad-patrascu * [97380d905] : clusterer: automatically choose the node to sync data from Given a provisioned "seed" node that is considered from the start to have the complete data set, every other node in the cluster synchronizes data from an eligible node (synced successfuly itself / is seed). Also, the get_my_index() API function now operates on a pool of nodes which have the complete data set. 2018-01-25 Liviu Chircu * [2fe5dc355] : usrloc: Fix an off-by-one bug 2018-01-23 Liviu Chircu * [1ec407b82] : Merge branch 'feature/usrloc-kv-contact-storage' 2018-01-23 Liviu Chircu * [f7bf26857] : usrloc: Document the new "kv_store" column 2018-01-23 Liviu Chircu * [2333d0d0c] : usrloc: Fix SHM leaks in the K/V support 2018-01-23 rvlad-patrascu * [700422325] : mangler: accept variables for the public_ip parameter of encode_contact() 2018-01-19 Liviu Chircu * [2b2e2ad6d] : usrloc: Remove bogus "const" modifiers 2018-01-19 Liviu Chircu * [d17722d0d] : mid_registrar: Allow startup with DB-enabled usrloc Also swap the ordering of some usrloc API operations - this will help keep the DB in sync at runtime more often. 2018-01-19 Liviu Chircu * [ca0fc9321] : Update DB schema 2018-01-19 Liviu Chircu * [7f1bef2f4] : usrloc: Implement DB persistency for all K/V storage This patch adds a new location table column, named "kv_store". This column will hold any custom data that modules may intend to push into usrloc contact structures. Currently, only the mid_registrar module is making use of this feature. Moreover, the implementation also includes persistency for the record-level K/V storage. This is achieved with a special key, "_urec_kvs", that will only be present in one of the contacts' K/V store. 2018-01-19 Liviu Chircu * [b674aa264] : usrloc K/V store: Add serialize/deserialize functions 2018-01-19 Liviu Chircu * [908282992] : map.h: Refactor int flags into enum map_flags 2018-01-19 Liviu Chircu * [bcae687fd] : str.h: Add a quick str initialization function 2018-01-19 Liviu Chircu * [d2527e88d] : Improve the cJSON library * add a str-based appending function * avoid defining yet another pair of malloc/free funcs * fix the resetted allocation functions from glibc to PKG 2018-01-18 Liviu Chircu * [8d3daae21] : usrloc: Fix broken contact_id generation Commit b2554c3c3a actually broke contact_id generation during replicated usrloc contact inserts. We now ensure all registrar insert_ucontact() calling code passes on a zeroed "ucontact_info_t" struct, such that new contact_ids get properly generated with every call. Reported by @sekil on IRC 2018-01-18 Liviu Chircu * [daea4348e] : mid_registrar: Fix a bad startup check 2018-01-17 Liviu Chircu * [6a86d5443] : usrloc: Simplify the callback API The opaque buffer extension for the API (commit b0241c1318) is no longer needed, as the K/V usrloc extension completely replaces it. This commit also refactors the usrloc callback types as "ul_cb_type", thus making them easier to pick up / work with. 2018-01-17 Liviu Chircu * [7f71f3ff9] : mid_registrar: Refactor contact mirroring/throttling We now make use of usrloc's newly added k/v storage functions in order to store/retrieve the module data into/from each contact. 2018-01-17 Liviu Chircu * [e94d90d16] : Refactor shm_str_resize() into shm_str_extend() This hints better at what the function actually does (i.e. it will not shrink your buffers) 2018-01-17 Liviu Chircu * [cfa7be567] : mid_registrar: Refactor the AoR throttling implementation We now make use of usrloc's newly added k/v storage functions in order to store/retrieve the module data into/from each record. 2018-01-17 Liviu Chircu * [1fc88e8ba] : usrloc: K/V store - use map_find() instead of map_get() 2018-01-17 Liviu Chircu * [b2ac38d70] : usrloc: Add generic, record-level key-value storage Allows various usrloc-dependent modules to easily store data into or to retrieve data from each usrloc record / AOR. 2018-01-17 Liviu Chircu * [597daa366] : usrloc: Add generic, contact-level key-value storage Allows various usrloc-dependent modules to easily store data into or to retrieve data from each usrloc contact. 2018-01-17 Liviu Chircu * [e5b5cfc28] : freeswitch_scripting: Add table to opensipsdbctl installer Also rebuild the DB schema. 2018-01-17 Razvan Crainea * [151c1cf0e] : rtpengine: handle POLLHUP while draining Thanks go to Pete Kelly for reporting this 2018-01-17 rvlad-patrascu * [1134b2e37] : clusterer: fix mem leak when sending BIN packets from script Reported by Gohar Ahmed in #1254 2018-01-17 Liviu Chircu * [95ab8c05f] : xlog: Fix a series of issues * properly report xlog() success/failure at script level * differentiate between xlog errors (-1) and HEP errors (-2) * do not cancel logging because of HEP errors * remove bogus error log * hint at 'xlog_buf_size' if the print string is too large 2018-01-16 Razvan Crainea * [d33253b6b] : compression: fix memory leak due to whitelists Thanks go to Nick Altmann for reporting this Closes #1252 2018-01-16 Bogdan-Andrei Iancu * [c527146cd] : Fix RURI len calculation after removing param. Reported by Denis Lemire (cherry picked from commit 50735b93508d77b4e44223450f60ae43082b14bb) 2018-01-16 Razvan Crainea * [8c5651be2] : net_tcp: remove fd from reactor before cleaning up 2018-01-12 rvlad-patrascu * [86003da2d] : drouting: reduce the two replication module params into a single one 2018-01-12 rvlad-patrascu * [bb6e4f4d6] : load_balancer: reduce the two replication module params into a single one 2018-01-12 rvlad-patrascu * [1d8fb8156] : ratelimit: reduce the two replication module params into a single one 2018-01-12 rvlad-patrascu * [71c2353a6] : usrloc: reduce the two replication module params into a single one 2018-01-12 rvlad-patrascu * [f06f3aa25] : dialog: simplify replication related module parameters Replaced the dialog and profile replication module parameters (source and destination cluster ids) with a single one for each of these capabilites. Also update and improve docs regarding replication. 2018-01-12 rvlad-patrascu * [2f7a9555a] : clusterer: always check address of received BIN messages Always check if the IP of the received BIN packets belongs to one of the nodes in the cluster. Therefore also remove the "auth_check" module parameters for the modules registered to clusterer. 2018-01-12 rvlad-patrascu * [d6ee4c9a9] : usrloc: partition NAT pinging across the cluster when replicating contacts The node determines its pinging slice by performing an AOR hash modulo current_no_cluster_nodes. 2018-01-12 rvlad-patrascu * [a24695a64] : clusterer: faster pinging restart Restart own pinging immediately, instead of on timer, when receiving a ping from a failed node. 2018-01-12 rvlad-patrascu * [5e461c668] : clusterer: advertise links as directed in topology updates Links are now considered as bidirectional in each node's internal topology representation. This fixes some routing loops and inconsistencies during the convergence of the overall cluster topology. 2018-01-12 rvlad-patrascu * [d8df84780] : clusterer: fix deadlock when receiving a BIN packet on disabled node 2018-01-12 rvlad-patrascu * [006eea599] : usrloc: sync contacts from another node in the replication cluster Contacts are synchronized at startup or through an MI command. A valid source node is established by the clusterer module. 2018-01-12 rvlad-patrascu * [00172f42e] : clusterer: fix node availability events 2018-01-12 rvlad-patrascu * [9bf5efc0e] : clusterer: load info from DB at module init 2018-01-12 rvlad-patrascu * [326421930] : clusterer: add mechanism to synchronize data for a capability Implemented through separate API functions which allow a node to: * request to sync with another node * build and send BIN packets with delimited chunks of data * iterate through data chunks from the received sync packets Also, regular BIN packets received for the given capability are buffered until syncing is complete. 2018-01-12 rvlad-patrascu * [4ec8d9ba3] : clusterer: fix wrong capabilities for some clusterer messages 2018-01-12 rvlad-patrascu * [cfa7e31a7] : clusterer: clean up some leftover code 2018-01-12 rvlad-patrascu * [5b7bec8e9] : clusterer: add capabilities Modules now register "capabilities" to clusterer. Instead of a single callback, a module now registers callbacks for each capability. Also, nodes discover the capabilities of all the other instances in the cluster. 2018-01-11 rvlad-patrascu * [71960b917] : sql_cacher: do data loading for full caching in the first child process Speed up OpenSIPS starting sequence by doing the full caching data load in the first process, after child_init is done (via RPC), instead of during module init. 2018-01-11 rvlad-patrascu * [0b06e6ee3] : sip_i: small doc fix for add_isup_part function 2018-01-11 Razvan Crainea * [672929eed] : msg: properly compute the initial body size Also initialilize the body structure in case there is no body in the message. 2018-01-11 Razvan Crainea * [5773e65b9] : protos/tcp: respect async operations order In case there is a write request, before actually writing the data on the network, check if there are any async chunks left, and make sure they are sent before any other write happens. This is necessary to make sure the order of the packets is respected, otherwise we might end up with fragments of other packets in the stream. Thanks go to Vlad Patrascu for reporting and testing this. 2018-01-11 Bogdan-Andrei Iancu * [769fb3c59] : Fix TO parsing when there is a comma inside a quoted display/value This bug was introduced during the re-factoring of the TO parser to support multple body parts - see 908b9f190bff3b356f76ce8ca75d43a2c149a412 Reported by Tito Cumpen 2018-01-11 Bogdan-Andrei Iancu * [963f05169] : Fixed parameter passing for dr_is_gw(). If partitions are not used, do a logic shift for the parameters with one position to the left to compensate the missing partition param. Reported by Jonathan Hunter 2018-01-10 Liviu Chircu * [0d1bc4423] : mid_registrar: Fix an AoR throttling bug Do not apply min/max "expires" module limitations when computing the main registrar's contact expiration value. 2018-01-10 Bogdan-Andrei Iancu * [5d1670a4a] : Repaid the IPC support in the external proc of FS module Allow a module to inform the core if its additional processes are able or not to handle IPC jobs. New process flag (for the module interface) added - PROC_FLAG_HAS_IPC. 2018-01-09 Bogdan-Andrei Iancu * [19756d46c] : Added support for graceful shutdown. Graceful shutdown is based on IPC commands sent to worker processes, rather than terminating them by SIGTERM. This will allow the workers to complete on ongoing task and to terminate in a consistent state (as locking or data consistency). TO DO: * move PKG memory dumping and memory stats to IPC/RPC (versus signals) Nice to have: * child_destroy() functions to allow modules to do per-child/process cleanup (like closing DB conns, flushing, etc) 2018-01-09 Bogdan-Andrei Iancu * [405baf884] : Fine tunning of IPC support in internal_fork() * introduced "flags" to internal_fork() for various options * added OSS_FORK_NO_IPC to prevent the creation of IPC pipes during internal_fork - to be used when creating new processes without IPC support * replaced id_of_pid() with get_process_ID_by_PID() 2018-01-09 Razvan Crainea * [cf190a955] : pike: enforce remove latency to at least sampling_time_unit + 1 This prevents UNBLOCK events from being lost. 2018-01-09 Bogdan-Andrei Iancu * [719f62053] : Removed bogus connection close at shutdown There is not DB connection closed in proc MAIN (from dailplan) as the conn is closed in mod_init() after all the DB checks. 2018-01-09 Bogdan-Andrei Iancu * [1b9541432] : Small code cleanup 2018-01-09 Bogdan-Andrei Iancu * [a4dcbfc67] : Moved data loading outside child init Instead of loading the data in child_init routine, better fire a RPC to itself to perform the load after the child_init is done. This will speed up the OpenSIPS starting sequance, as we can complete the init part and daemonize without waiting for data loading. 2018-01-09 Bogdan-Andrei Iancu * [421d67004] : Moved data loading outside child init Instead of loading the data in child_init routine, better fire a RPC to itself to perform the load after the child_init is done. This will speed up the OpenSIPS starting sequance, as we can complete the init part and daemonize without waiting for data loading. 2018-01-09 Bogdan-Andrei Iancu * [35c432467] : Moved data loading outside child init Instead of loading the data in child_init routine, better fire a RPC to itself to perform the load after the child_init is done. This will speed up the OpenSIPS starting sequance, as we can complete the init part and daemonize without waiting for data loading. 2018-01-09 Bogdan-Andrei Iancu * [431638e58] : Added support for RCP via IPC RPC allows you to request another process to run a function of yours. 2018-01-09 Razvan Crainea * [85a2f8644] : mongo: replace deprecated bulk function replace mongoc_collection_create_bulk_operation() function from 1.8.0 with the newly added mongoc_collection_create_bulk_operation_with_opts() function in 1.9.0 2018-01-09 Razvan Crainea * [a63e7b24e] : perl*: enable optimizations if FORTIFY_SOURCE is used 2018-01-09 Razvan Crainea * [3ed75a854] : jabber: complete previous commit 2018-01-09 Razvan Crainea * [4c94c946a] : jabber & xmpp: fix bogus pointer checks 2018-01-09 Razvan Crainea * [fecb4b244] : msg: remove extra bytes from malformed bodies This commit fixes an abort() generated by the message builder when a malformed message is received that has a Content-Length lower than the actual body. Thanks go to Jon Hunter for reporting this issue and offering all necessary information for debugging it. Closes #1244 2018-01-07 Liviu Chircu * [14baedfbd] : mid_registrar: Fix unsafe strdup operation 2018-01-05 Bogdan-Andrei Iancu * [824e21c96] : Expose the ATTR field for event E_UL_CONTACT_INSERT. Extract the attr event field and expose it as "attr" atribute in the EBR resume route. 2018-01-05 Bogdan-Andrei Iancu * [3fb5817be] : The E_UL_CONTACT_INSERT event exposes the attr string. 2018-01-05 Bogdan-Andrei Iancu * [c6c937d1e] : Ignore tracing types which are not recognized. Instead of exiting with error and abording the whole tracing, better simple ignore the unrecognized tracing types. 2018-01-05 Liviu Chircu * [91d7e7f4b] : rest_client: Fix a rest_post() regression bug Commit c549e6ec added an unnecessary libcurl option which caused the HTTP headers to be logged into the output body pseudo-variable alongside the request body when performing a rest_post(). This patch disables the above-mentioned libcurl option (CURLOPT_HEADER). Reported by @goharahmed on GitHub. Fixes #1247. 2018-01-05 Bogdan-Andrei Iancu * [cec2d66b7] : Fixed expantion of shm_info() for HP_MALLOC Reported by Nick Altmann Closes #1240 2018-01-05 Liviu Chircu * [aab1ec7e0] : menuconfig: Fix a PREFIX handling bug This patch fixes a bug where menuconfig corrupts the Makefile.conf PREFIX variable value by incorrectly trimming the last char in an attempt to ensure that the value has a trailing '/' char. This would happen each time the user launches menuconfig and chooses "Exit & Save All Changes". Reported by @Jeffrey2019 on GitHub. Fixes #1248. 2018-01-05 Liviu Chircu * [468060b3e] : mid_registrar: Fix possible startup segfault If you don't set commit 34d0b1bc2's modparam, you win a corefile. 2018-01-05 Liviu Chircu * [c1df32786] : acc: Simplify some startup parsing code * use str_strcmp() more often * code only runs at startup, no need for static storage * remove redundant "inline" modifiers 2018-01-04 Liviu Chircu * [99c32a3e5] : mid_registrar: Update documentation 2018-01-04 Liviu Chircu * [34d0b1bc2] : mid_registrar: Add the "extra_ct_params_pvar" modparam Allows the script writer to append additional Contact URI parameters. 2018-01-04 Liviu Chircu * [7bafce982] : mid_registrar: Improve the advertised socket logic Instead of blindly advertising the first UDP interface in the self-generated, outgoing Contact URIs, the mid_registrar is now aware of the next SIP hop and properly advertises the actual sending interface which will be used. This includes any forced send socket logic at script level. 2018-01-04 Liviu Chircu * [3acaf2e92] : mid_registrar: Fix unused variable 2018-01-04 Liviu Chircu * [86628e6d4] : mid_registrar: Fix a PKG memory leak Although the TMCB_RESPONSE_IN callback provides a reference to the initial request during reply processing, this sip_msg must not be parsed (i.e. passed to parse_headers()), otherwise we leak PKG memory, since parsing is PKG-based, while the request buffer is copied in SHM. The current workaround for mid_registrar is to immediately duplicate all contact-related data we could possibly need, should the contact successfully register on the downstream registrar. This copying takes place during request processing. Once the reply arrives, we only make use of this info in order to store the contact in usrloc, and barely even use the "req" sip_msg provided by tm. 2018-01-04 Liviu Chircu * [a2dd10a49] : Add a "struct ucontact_info" logging function 2018-01-03 rvlad-patrascu * [bf4ce8e30] : dialog: fix a clusterer module registration bug Bad cluster id provided to the clusterer module when only the accept_replicated_profiles parameter was defined without accept_replicated_dialogs. Thanks go to Nick Altmann for reporting this. Closes #1243 2018-01-03 Bogdan-Andrei Iancu * [f7216003b] : Improve docs on db_url setting 2018-01-03 Liviu Chircu * [fa558c7c2] : Fix previous commit Avoid trapping the "EXIT" pseudo-signal altogether, as it may misbehave on some shells (hangs the console or does not trap anything at all). 2018-01-03 Liviu Chircu * [4489e307b] : opensipsctl improvements * use $CHROOT_DIR/tmp instead of /var/lock - the latter may be read-only * avoid dangling osips_rply_* files on error / SIGTERM 2018-01-03 Bogdan-Andrei Iancu * [b4d74ebd5] : Fixed handling of TTL 0 in DNS answers. RFC1035 states : "Zero TTL values are interpreted to mean that the RR can only be used for the transaction in progress, and should not be cached." Reported by Marcin Luczkiewicz @ Magrathea Telecom 2018-01-03 Razvan Crainea * [596271ae1] : json: add $json_pretty and $json_compact vars Credits go to Nick Altmann for providing the idea for this and a patch. 2017-12-22 Razvan Crainea * [d2c1c7838] : rtpproxy: store returned IP:port in pvar Closes #1233 2017-12-22 Razvan Crainea * [6b2ad1fe3] : dispatcher: restore URI headers check from prev. commit 2017-12-22 Razvan Crainea * [bf1376203] : dispatcher: add comment for uri vs dst_uri 2017-12-22 Razvan Crainea * [575a1b159] : dispatcher: fix TCP and TLS destinations Before this commit, the structures used internally to store the destinations URI were not storing the URI parameters - since these were dropped, URIs that contain TCP or TLS transport would be involuntary converted to UDP. This fix also stores the provisioned parameters in the dst_uri. Closes #1227 2017-12-21 Razvan Crainea * [e845b37a5] : dialog: don't mark new dialogs as deleted 2017-12-21 Liviu Chircu * [6c62d858f] : Fix some typos 2017-12-21 Nick Altmann * [e64b8eaf8] : YUM packaging: add freeswitch_scripting module 2017-12-21 Liviu Chircu * [9a19ff96a] : cache_counter_fetch(): Fix bogus error handling (looks like a copy-paste bug) 2017-12-21 Liviu Chircu * [1f3a0a335] : cachedb core: Fix a minor mem leak 2017-12-20 Liviu Chircu * [9ddb33ea0] : Merge branch 'feature/freeswitch-extended-integration' 2017-12-20 Liviu Chircu * [f33c145a5] : freeswitch: Lower default "esl_cmd_polling_itv" to 1ms 2017-12-20 Liviu Chircu * [ece4d1ebc] : freeswitch: Document newly added modparams 2017-12-20 Liviu Chircu * [a848555e0] : freeswitch: Fixes and minor improvements * free pending replies on socket cleanup * NULL-terminate some printed strings * remove unneeded fields * fix bad socket cleanup condition * add some useful debug logs 2017-12-20 Liviu Chircu * [b3b61f0fe] : freeswitch_scripting: Add documentation 2017-12-20 Liviu Chircu * [f571ed35e] : opensipsctl: Do not synchronize different instances Suggested by Răzvan Crainea 2017-12-20 Liviu Chircu * [978a6c384] : freeswitch_scripting: Fix GCC warning 2017-12-20 Liviu Chircu * [96289ccac] : opensipsctl: Add a critical section for FIFO writes 2017-12-20 Liviu Chircu * [5e4a6648f] : freeswitch_scripting: Add DB schema files 2017-12-20 Liviu Chircu * [d014fe5c7] : freeswitch_scripting: Add DB provisioning support 2017-12-20 Liviu Chircu * [9f3c3c3be] : freeswitch_scripting: Add "fs_list" MI command 2017-12-20 Liviu Chircu * [1b4381619] : lib/csv: Add some useful parsing flags * dup the parsed strings * do all allocations in SHM 2017-12-20 Liviu Chircu * [8b6884e98] : db: Fix a minor mem leak 2017-12-20 Liviu Chircu * [0bbc79a44] : freeswitch: Implement the JSON body event parameter 2017-12-20 Liviu Chircu * [b30abf8db] : freeswitch_scripting: Implement the E_FREESWITCH event This event has three parameters: * name * sender (FreeSWITCH host) * JSON body 2017-12-20 Liviu Chircu * [cdb104cb4] : freeswitch: Add WIP dereferenced socket cleanup logic The reactor needs refactoring before this feature can work. 2017-12-20 Liviu Chircu * [5c99644aa] : freeswitch_scripting: Improve MI feedback on oom 2017-12-20 Liviu Chircu * [8b3bafa91] : freeswitch_scripting: Implement sub/unsub MI commands 2017-12-20 Liviu Chircu * [e587188ce] : freeswitch: Fix event unsubscribing 2017-12-20 Liviu Chircu * [debf94dee] : freeswitch: Further implement generic event subscribing Currently, we can subscribe for generic FS events and they get fired into "freeswitch_scripting" via the shared IPC support. Patch summary: - add FS ESL command building logic - refactor the api->evs_sub() function to take an ipc_handler_type as parameter. - drop the freeswitch_scripting API. No longer needed. - simplify data structures 2017-12-20 Liviu Chircu * [8f16df247] : Fix the shared IPC support The initial implementation was incomplete 2017-12-20 Liviu Chircu * [6be577e6a] : freeswitch_scripting: Rename fs_cli() to freeswitch_esl() Also adapt to the new interface / IPC changes. 2017-12-20 Liviu Chircu * [6b29c9c04] : freeswitch: Implement the fs_esl() API command This API call allows execution of an arbitrary FreeSWITCH ESL command on an arbitrary FS interface. It has the following flow: 1. script worker - calls freeswitch_esl(), hence api->fs_esl() - fires an IPC job to the FS connection manager - busy-waits for an SHM response (with sleep()) 2. FS connection manager - receives the IPC job, runs the ESL command - places the reponse in SHM for the worker to find 3. script worker - finds the corresponding response, stores it in the output pvar (if provided) and resumes the OpenSIPS script 2017-12-20 Liviu Chircu * [7195d197b] : Improve LM_BUG() macro This allows syntax such as: if (foo) LM_BUG(""); else bar; We also drop the deprecated report_programming_bug() macro. 2017-12-20 Liviu Chircu * [bead98be0] : freeswitch: Improve logging 2017-12-20 Liviu Chircu * [2f50509e2] : freeswitch: Fix socket updating logic 2017-12-20 Liviu Chircu * [0d50eb923] : freeswitch_scripting: Implement the fs_cli() script function 2017-12-20 Liviu Chircu * [5f112a60a] : str.h: Add some handy zero-string test macros 2017-12-20 Liviu Chircu * [cccc6e65a] : freeswitch_scripting: Implement modparam subscriptions Also remove the "func" concept from the FS subscription API. It is no longer needed, as the IPC communication between the two modules takes care of providing this handler. 2017-12-20 Liviu Chircu * [0d57d6e55] : str_list: Add a doubly linked string list structure 2017-12-20 Liviu Chircu * [073a53aed] : Add a new "freeswitch_scripting" module With a basic structure: * MI function stubs * script function stubs * (hope)fully implemented IPC interaction with "freeswitch" Patch includes some "freeswitch" refactoring to get everything working. 2017-12-20 Liviu Chircu * [6aa157695] : ipc: Do not dispatch jobs to extra timer processes 2017-12-20 Liviu Chircu * [100d72aa5] : ipc: Add job dispatching support This patch adds support to dispatch a job to a currently available TCP, UDP or timer OpenSIPS worker. We also revert the incorrect function refactoring done in commit 69142efd59f. 2017-12-20 Liviu Chircu * [51a979f57] : freeswitch: Extend API / further implement logic * implement evs_sub() / evs_unsub() * extend API with fs_cli() function * new modparam: "esl_connect_timeout" Major refactoring of data structs and extra proc flow to support the above. 2017-12-20 Liviu Chircu * [e38b1b594] : reactor.h: Improve variable naming Easier to figure out the time measuring unit 2017-12-20 Liviu Chircu * [a1c4c2a39] : ipc: Improve and document the API 2017-12-20 Liviu Chircu * [ef5f2017a] : freeswitch: Implement get_evs() / put_evs() 2017-12-20 Liviu Chircu * [3db613e83] : freeswitch: Extend API with sub/unsub functions This makes the API more logical - easier to understand and use. 2017-12-20 Liviu Chircu * [ff83a31e4] : freeswitch: Refactor API * add generic FS event subscribe/unsubscribe function stubs * new modparam: "event_heartbeat_interval" * expose "event_heartbeat_interval" in API, use wherever needed * improve naming for stats-based socket API functions * remove the callback-based support for updating stats (this never worked anyway, ds/lb would always pull data) 2017-12-20 Liviu Chircu * [580fdb0a3] : lib/osips_malloc: Inline all functions 2017-12-20 Liviu Chircu * [341292012] : Code refactoring * expose tm's "struct str_list" as a core header * get rid of "struct csv_record", swap for "struct str_list" * refactor all code dependencies 2017-12-20 Liviu Chircu * [8ad49f52d] : lib/csv: Add some header docs 2017-12-20 Liviu Chircu * [94f2bcec2] : lib/url: Add some header documentation 2017-12-20 Liviu Chircu * [2d4ecdebc] : lib/url: Improve logging and robustness 2017-12-20 Liviu Chircu * [70f8a34d6] : util: Add str2short() 2017-12-20 Liviu Chircu * [530001539] : lib: Add generic URL parsing support Very re-usable (db/db.c, cachedb/cachedb_id.c, modules/freeswitch/fs_api.c, MongoDB, etc.). Importing code can easily customize their URLs by enforcing/relaxing: scheme part, user part, pass part, ports, database and extra hosts. This patch also adds a new URL extension: parameters! Syntax: scheme://...?foo=bar,foo Refer to lib/url.h for the full spec 2017-12-20 Liviu Chircu * [d3689b031] : lib: Add basic CSV line parsing primitives 2017-12-20 Bogdan-Andrei Iancu * [30d47e658] : Fixed error message. Properly report the hdr name (PAI or PPI) when hdr fields validation fails 2017-12-20 Bogdan-Andrei Iancu * [ef89e181f] : Remove some heavy log (instroduced with the prev commit). 2017-12-20 Bogdan-Andrei Iancu * [f78926432] : Use as OBP the first PATH URI. If PATH defined, when injecting a new branch, extract the first PATH URI and use it as destination. Reported by @futsystems in #1235 Fix for problem 1. 2017-12-20 Razvan Crainea * [28385b6de] : debian: let debuild figure out mysql dependencies Reported by Nick Altmann (cherry picked from commit 5916511339e638ff301ad7556c2ef8f4cb7f36bb) (cherry picked from commit b2ce0c2edc31c63d49d8eca685ab8ee9cfeeba6e) 2017-12-19 Bogdan-Andrei Iancu * [69ef92cd9] : Fix validation for PAI, PPI and Diversion headers These headers must be parsed as multu-field headers Also for PAI and PPI we apply extra checks as per RFC3325. Close #1134 Close #1228 2017-12-19 Bogdan-Andrei Iancu * [908b9f190] : Fix hdr parsing to accept multi-value bodies. The parser for Diversion, PAI and PPI use now the parse_multi_to() in order to handle multi name-addr/addr-spec hdr bodies. 2017-12-19 Bogdan-Andrei Iancu * [a7e724a09] : Refactor generic parse_to() to accept multi-value headers. New function parse_multi_to() added to allow parsing of multi-value (comma separated) name-addr/addr-spec headers (like Diversion, PAI, PPI). Changes are backward compatible in regards to original parse_to() function. 2017-12-19 Razvan Crainea * [1b9532cb8] : reactor: replace epoll_lt and epoll_et \w epoll Remove the epoll_lt and epoll_et keyworkds and make available only epoll, which behaves as epoll lt (Level Triggered) 2017-12-19 Razvan Crainea * [9f54480df] : deprecate epoll_et and use epoll_lt instead epoll_et needs draining the socket out of data, which behaves against our balancing mechanism. (cherry picked from commit cbfef48c726bd4679f7f63df83250523101068f6) 2017-12-19 Razvan Crainea * [a25019172] : acc: fix prepared statements for non-ctx records In case one is doing a "manual" acc_db_request() in local route, where you don't have a context, there are not extra values available, thus we need to use a different prepared statement. Credits go to Pete Kelly for reporting this 2017-12-19 Razvan Crainea * [001c42cfd] : ratelimit: improve expire_time parameter doc Kudos the Ecosmob team for reporting this! 2017-12-19 Razvan Crainea * [ba7c8e8e6] : ratelimit: improve documentation on rl_check() Consider using rl_dec_count() for declined calls. Credits go to Ecosmob for reporting this. 2017-12-19 Razvan Crainea * [a6528d8eb] : ratelimit: fix slot_period documentation slot_period should be expressed in milliseconds, not milliseconds Kudos to the Ecosmob team for reporting this! 2017-12-15 rvlad-patrascu * [5923267fb] : sql_cacher: complete mem leak fix from previous commit 2017-12-15 rvlad-patrascu * [5179bc2f9] : sql_cacher: fix memory leaks when loading from SQL on demand 2017-12-15 Bogdan-Andrei Iancu * [bbae925fe] : Added new set of functions for list headers. Functions for operating on headers having in body CSV lists of tokens (like the Supported, Require, Content-Dispsition headers) : * list_hdr_has_option(hdr_name,option) * list_hdr_add_option(hdr_name,option) * list_hdr_remove_option(hdr_name,option) 2017-12-15 Bogdan-Andrei Iancu * [43cdb2f24] : Added parser for list-like body headers. This parser can be used for hdr bodies holding list of options/tokens like Supported, Require, Content-Disposition, etc. Work in progress. 2017-12-15 rvlad-patrascu * [6aef8347b] : sql_cacher: fix possible crash when loading from SQL on demand Elements from the list of queries in progress are now properly removed. 2017-12-15 Liviu Chircu * [02b114902] : mid_registrar: Never parallel fork in "mode == 1" This patch fixes a subtle bug where a "mode == 1" mid-registrar would parallel fork to a random number of contacts by walking the remaining "->next" values of the currently looked up contact. 2017-12-13 Razvan Crainea * [49bb70dd1] : dialog: fix error typo 2017-12-13 Razvan Crainea * [3596efdc0] : disable EPOLLEXCLUSIVE due to bogus behavior 2017-12-13 Razvan Crainea * [e37be3ab2] : clang: fix blacklist bitwise check warnings 2017-12-13 Razvan Crainea * [9f89deb6d] : mongodb: use json common detection 2017-12-13 Razvan Crainea * [3e71fd6f7] : json: merge json detection into a common dir re-arrange code to be able to merge json(-c) library detection into a single common directory 2017-12-13 Răzvan Crainea * [4a511e459] : Merge pull request #1231 from besser82/enhancement/json_array_del modules/json: Improve readability 2017-12-13 Björn Esser * [5220f6ae2] : modules/json: Improve readability 2017-12-12 Bogdan-Andrei Iancu * [1906423bc] : Fix README file local:group2///collection2 Cache DB URL is broken in example. (cherry picked from commit ca96dd653c520cee044f72d1ac39970e830f19ba) 2017-12-12 Bogdan-Andrei Iancu * [69e514bfa] : Fix ambuguity in cache DB URL parser. Do not accept URLs like schema:group//.. ; Correct format is schema:group://.. or schema://.. (cherry picked from commit 87025cc925f5eadc87c9ee757326d6b5b9f5df87) 2017-12-12 Razvan Crainea * [250d31168] : Merge branch 'besser82-enhancement/json-c_013' 2017-12-12 Razvan Crainea * [d3def25ca] : json: rename some variables and change C99 comment 2017-12-12 Björn Esser * [57ae84b2d] : modules/json: Properly detect json-c version and adaptions for v0.13 2017-12-08 Razvan Crainea * [5ae5daecb] : rtpproxy/rtpengine: handle error while draining 2017-12-07 Razvan Crainea * [f0fcf326c] : ip.resolve: null terminate queried string Thanks go to Nick Altman for reporting this! 2017-12-07 Razvan Crainea * [6affbec7c] : Revert "ut: fix *_strdup() functions" This reverts commit 595c91590cbbb3eed3ba789d689281c7088f0ffe. 2017-12-07 Razvan Crainea * [595c91590] : ut: fix *_strdup() functions 2017-12-07 Liviu Chircu * [ec04149f2] : Fix unhandled compile flags combination Defining DBG_TCPCON without DBG_STRUCT_HIST would lead to a broken opensips binary, that always fails to start. We now throw a compilation warning on such flag combinations and ensure the resulting binary remains correct. Reported by SamyGo 2017-12-06 Razvan Crainea * [5291aef57] : choose non-loop default ipv6 interface 2017-12-04 Liviu Chircu * [fee1ccb72] : mid_registrar: Update docs 2017-12-04 Liviu Chircu * [67c31603e] : mid_registrar: Restore "default_expires" and "max_expires" These registrar modparams were left unmaintained / ignored during development. However, they are still valid and completely separate from "outgoing_expires". The former two params control ingress expirations, while the latter one controls egress expirations. To match the newly introduced defaults, we also increase the default "outgoing_expires" from 600s to 3600s. 2017-12-04 Liviu Chircu * [7bcf03233] : mid_registrar: Fix a CSeq bug in mode == 1 Contact updates would not also update the last cseq value. This, in turn, would lead to SIP-wise incorrect self-generated de-registrations. 2017-11-29 Razvan Crainea * [98921fb69] : avoid using "flagged" ipv6 interfaces 2017-11-29 Razvan Crainea * [3fbcf18c7] : remove useless family param to add_interfaces() 2017-11-29 Razvan Crainea * [ce6469911] : use getifaddrs API to fetch listening interfaces Closes #976 2017-11-29 Razvan Crainea * [4b39b578d] : add support for '*' keyword for listeners Using this feature you can specify opensips it should listen for a specific protocol on all interfaces. The syntax is: ``` listen = udp:*:5060 ``` 2017-11-29 Razvan Crainea * [4833fb88b] : net/trans: remove useless interface detection code 2017-11-29 Razvan Crainea * [27de19168] : add interface name only if specified 2017-11-27 Razvan Crainea * [d1a4419df] : rest: suppress coverity error 2017-11-27 Razvan Crainea * [fc9021784] : dialog: check return of dialog values Fix Coverity CID #167553 2017-11-27 Razvan Crainea * [7b186a0a5] : rtpproxy: add to_tag only if provisioned Fixes Coverity CID #180091 2017-11-27 Razvan Crainea * [0956518f4] : sip_i: proper test for parse_isup_body() return Fixes Coverity CID #180094 2017-11-27 Razvan Crainea * [83059b8d8] : mid_registrar: initialize regex earlier Fixes Coverity CID #180096 2017-11-27 Razvan Crainea * [5e86ac587] : rest: fix IP copying to tracing structures Fixes Coverity CID #180100 and #180098 2017-11-27 Razvan Crainea * [7ce8078ac] : httpd: fix address check Fixes Coverity CID #180102 2017-11-27 Razvan Crainea * [5d36fe328] : siprec: fix parse_to usage Fixes Coverity CID #180103 2017-11-27 Razvan Crainea * [96d59f39e] : seas: check tainted data Fixes Coverity CID #180104 and #180101 and #180099 and #180088 2017-11-27 Razvan Crainea * [602c44d70] : pvar: fix buffer overrun Fixes Coverity CID #180105 2017-11-27 Razvan Crainea * [1a8d6d93f] : clusterer: initialize new_info earlier This prevents bogus check during error Fixes Coverity issue #180106 2017-11-27 Razvan Crainea * [d4826a562] : siprec: make sure stream exists Fixes coverity issue #180110 2017-11-24 Liviu Chircu * [f298587d6] : mid_registrar: Restore reply contact mangling The contact rework commits have rendered the restore_reply_contacts() function obsolete, thus the contact headers were propagating upstream unchanged. We now rebuild the reply contact set in all modes by using build_contacts() Thanks to Răzvan Crainea for spotting the issue 2017-11-24 Liviu Chircu * [70eea5c61] : cachedb_mongodb: Start OpenSIPS if ":port" URL part is missing Reported by Răzvan Crainea 2017-11-24 Liviu Chircu * [0124344f9] : usrloc: Fix bad comparison Also complete commit d3790e6c Reported by Răzvan Crainea Fixes Coverity CID #180087 Fixes Coverity CID #180093 2017-11-24 Liviu Chircu * [d3790e6cd] : mid_registrar: Fix an AoR throttling corner-case If the main registrar omits the Contact in the 200 OK reply, it could possibly crash the mid registrar. Reported by Răzvan Crainea. Fixes Coverity CID #180107 2017-11-23 Razvan Crainea * [5e1568660] : rtpproxy: fix rtpproxy_stats() fixup for more params Thanks go to Lt-Flash(github) for reporting and providing the fix Closes #1219 2017-11-22 Razvan Crainea * [a41cf31d3] : README: add coverity status 2017-11-21 Razvan Crainea * [63042c922] : Merge branch 'lemenkov-mariadb_unnecessary_include' 2017-11-21 Razvan Crainea * [ec0acfba5] : Merge branch 'mariadb_unnecessary_include' of https://github.com/lemenkov/opensips into lemenkov-mariadb_unnecessary_include 2017-11-21 Razvan Crainea * [c23ad230a] : couchbase: fix multiple hosts usage Closes #1216 2017-11-21 Peter Lemenkov * [087b23ab5] : Don't include directly It seems that this header shouldn't be included directly. And sometimes it may cause compilation issues (depending on MariaDB/MySQL version, compiler, etc). See build log for the example: make[1]: Entering directory '/builddir/build/BUILD/opensips-2.2.5/modules/db_mysql' Compiling row.c gcc -fPIC -DPIC -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fgnu89-inline -Wcast-align -DMOD_NAME='db_mysql' -I/usr/include/json-c -DPKG_MALLOC -DSHM_MMAP -DUSE_MCAST -DDISABLE_NAGLE -DSTATISTICS -DHAVE_RESOLV_RES -DF_MALLOC -DNAME='"opensips"' -DVERSION='"2.2.5"' -DARCH='"x86_64"' -DOS='"linux"' -DCOMPILER='"gcc 7"' -D__CPU_x86_64 -D__OS_linux -D__SMP_yes -DCFG_DIR='"/etc/opensips/"' -DUSE_FREERADIUS -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_EPOLL -DHAVE_SIGIO_RT -DHAVE_SELECT -I/usr/include -c row.c -o row.o Compiling my_con.c gcc -fPIC -DPIC -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fgnu89-inline -Wcast-align -DMOD_NAME='db_mysql' -I/usr/include/json-c -DPKG_MALLOC -DSHM_MMAP -DUSE_MCAST -DDISABLE_NAGLE -DSTATISTICS -DHAVE_RESOLV_RES -DF_MALLOC -DNAME='"opensips"' -DVERSION='"2.2.5"' -DARCH='"x86_64"' -DOS='"linux"' -DCOMPILER='"gcc 7"' -D__CPU_x86_64 -D__OS_linux -D__SMP_yes -DCFG_DIR='"/etc/opensips/"' -DUSE_FREERADIUS -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_EPOLL -DHAVE_SIGIO_RT -DHAVE_SELECT -I/usr/include -c my_con.c -o my_con.o Compiling val.c gcc -fPIC -DPIC -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fgnu89-inline -Wcast-align -DMOD_NAME='db_mysql' -I/usr/include/json-c -DPKG_MALLOC -DSHM_MMAP -DUSE_MCAST -DDISABLE_NAGLE -DSTATISTICS -DHAVE_RESOLV_RES -DF_MALLOC -DNAME='"opensips"' -DVERSION='"2.2.5"' -DARCH='"x86_64"' -DOS='"linux"' -DCOMPILER='"gcc 7"' -D__CPU_x86_64 -D__OS_linux -D__SMP_yes -DCFG_DIR='"/etc/opensips/"' -DUSE_FREERADIUS -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_EPOLL -DHAVE_SIGIO_RT -DHAVE_SELECT -I/usr/include -c val.c -o val.o In file included from my_con.c:25:0: /usr/include/mysql/mysql_version.h:3:2: warning: #warning This file should not be included by clients, include only [-Wcpp] #warning This file should not be included by clients, include only ^~~~~~~ /usr/include/mysql/mysql_version.h:5:10: fatal error: mariadb_version.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~ compilation terminated. make[1]: *** [../../Makefile.rules:25: my_con.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory '/builddir/build/BUILD/opensips-2.2.5/modules/db_mysql' make: *** [Makefile:201: modules] Error 2 See also kamailio/kamailio@c31535072a04273b52a5cbc015e7ed1423d5dc33 2017-11-21 Razvan Crainea * [56490e4e3] : couchbase: fix LIBS in Makefile 2017-11-20 Razvan Crainea * [ef82312cb] : packaging: sync debian and redhat_fedora service files Thanks to Nick Altman's suggestions 2017-11-17 Razvan Crainea * [f562251d9] : debian: add m4 support in systemctl 2017-11-17 Razvan Crainea * [f6845f26a] : debian: fix EXTRA_PATH specification 2017-11-17 Razvan Crainea * [9be7ffc06] : debian/init:remove bogus value for pathextra 2017-11-16 Liviu Chircu * [a644f1b37] : usrloc: Fix bad logical condition Reported by Răzvan Crainea. 2017-11-16 Liviu Chircu * [0498151bb] : Fix Clang warnings for excluded modules Completes commit 8bb5929d58 2017-11-15 Liviu Chircu * [8bb5929d5] : Fix Clang "unused function" warnings Also add a useful function/variable attribute, ALLOW_UNUSED. 2017-11-15 Liviu Chircu * [48cb7a789] : Merge branch 'bugfix/mid-registrar-store-contacts-as-aors' 2017-11-15 Liviu Chircu * [016da2f7f] : mid_registrar: Fix CSeq handling for De-REGISTERs Keep track of outgoing CSeq values and use this value during self-generated de-registrations, rather than using the tm's built-in default CSeq value of "13". 2017-11-15 Liviu Chircu * [7e190a8b1] : mid_registrar: Fix NAT issues in "contact" insertion mode This patch completely reworks the saving/matching logic with regards to the SIP contacts generated by the mid-registrar. It is only relevant to working modes "0" (mirror) and "1" (contact throttling). The former logic (encoding the requests's Contact as a URI parameter of the outgoing contact) was somewhat stateless, as it would forward requests to the mid-registrar's contacts directly to their actual Contact URIs (UA side). When NAT comes into play, this no longer works well. Fortunately, the user location already handles this problem. Thus, we change the mid-registrar to advertise contact IDs instead of the device's contact. As requests arrive for the contact IDs, we are easily able to look up their corresponding user location AoR, contact, along with any other useful information for NAT traversal. 2017-11-15 Liviu Chircu * [8c46ab3ca] : mid_registrar: Fix possible crash in mirror mode 2017-11-15 Liviu Chircu * [ad274fad9] : usrloc: Add urecord reference counting mechanism This mechanism is required by the mid-registrar, which needs to "reserve" contact IDs while the main registrar decides upon them. This means that a blank urecord structure must be kept alive during this process. By reference counting the blank urecord structures, we prevent them from being cleared by the timer before the outgoing registrations get a chance to receive a reply. 2017-11-15 Liviu Chircu * [7d4894943] : usrloc: Allow forced IDs during contact inserts 2017-11-15 Liviu Chircu * [15a5067b2] : usrloc: Add some useful API functions * get_ucontact_from_id() - fetch both ct and rec from an id * next_contact_id() - fetch and advance the current ct counter 2017-11-15 Liviu Chircu * [e9be01680] : Add str2int64() parsing function 2017-11-15 Liviu Chircu * [a5d633924] : Fix int2str() function signature Although implemented to be able to print 64-bit integers, int2str() downcasted all of its parameters to an "unsigned long" type, thus breaking behavior on 32-bit architectures. 2017-11-14 Liviu Chircu * [18a93c89a] : usrloc: Fix locking for contact_id-based deletion The delete_ucontact_from_id(), get_ucontact_from_id() pair of functions were masking possible code execution paths which would lead to unsafe memory access. This, in turn, would cause the ping_checker_timer() job of nathelper to occasionally crash and burn. Reported by solo@astercc.org. 2017-11-14 Liviu Chircu * [d4967201b] : usrloc API: Make get_urecord() more robust Zeroize the output pointer if record is not found. 2017-11-13 Liviu Chircu * [7585f88cc] : mod stats: Fix unhandled corner-case Do not crash on NULL pointer input. 2017-11-13 Liviu Chircu * [63c1a844b] : clang: Add "-Wall" flag 2017-11-09 Razvan Crainea * [d67fbb980] : rtpengine: do not use replace bson for delete Prevent the module for using replace-* attributes for any other operation than offer or answer. This allows you to use the rtpengine_manage() function easier. Reported by Edwin Hoff 2017-11-09 Razvan Crainea * [b9ca13a64] : db_sqlite: let the DB interface determine the capabilities This prevens the module from advertising bogus capabilities - in this case the sqlite module was saying that it has the ASYNC RAW queries support, although it didn't. Reported by Wilhelm Lundgren on list 2017-11-03 Bogdan-Andrei Iancu * [830d2b4f5] : Reduce char size to 255. Old 256 size is loo large for char and blob should be used. Reproted by @adivjoseph in the #8ce5a92 commit. 2017-11-01 Liviu Chircu * [18e95e6e9] : doc: Fix formulas for FS-driven routing Also add a useful example 2017-11-01 Razvan Crainea * [069a8f6d1] : debian: add lsb-release dependency Suggested by Nick Altmann to fix stretch and xenial build errros 2017-10-31 Razvan Crainea * [fe21351f3] : siprec: remove quotes if used 2017-10-31 Razvan Crainea * [d4fdc854f] : move all debian files in a single directory 2017-10-27 Liviu Chircu * [fbb54143e] : clusterer: Add "proto_bin" module dependency 2017-10-27 Bogdan-Andrei Iancu * [60d161d44] : Fix creating the profiles list in the dlg_list_ctx MI command The profiles are not array, but list as they have different names for the nodes.Reported by Vladimir Dubov (@vovad) Closes #1166 2017-10-27 Razvan Crainea * [19ceff23a] : sms: increase pin buffer to avoid warnings 2017-10-27 Razvan Crainea * [608433323] : debian: add libbson-dev dependency 2017-10-27 Razvan Crainea * [d19215dcb] : sst: fix MIN-SE header printing 2017-10-27 Razvan Crainea * [d0dc4ecbe] : mongodb: fix warning 2017-10-27 Razvan Crainea * [ca7164dea] : rtpproxy: fix uninitialzied warning 2017-10-27 Razvan Crainea * [ff9243c0e] : rtpengine: fix uninitialized warning 2017-10-26 Bogdan-Andrei Iancu * [97c299877] : Fixed trace URI identification for the non-SIP protos. In the e59a7399e982ef58a7a12ffb53d8aa8432f537ab commit, I broke the hash based matching logic, so tracing for non-sip (xlog, net, rest) was affected. 2017-10-26 Răzvan Crainea * [fe801ac5c] : Merge pull request #1159 from bradleyjokinen/add-cgrates-disconnect-cause cgrates: add DisconnectCause for CDRs 2017-10-25 Liviu Chircu * [3a1d80533] : mid_registrar: Add "next hop" awareness The mid_registrar must preserve the values of both $ru and $du, in order to replicate the same behavior for its De-REGISTER requests. 2017-10-25 Liviu Chircu * [fc5762694] : mid_registrar: Fix crash on missing Contact ";expires" Correctly process contact expirations on 200 OK replies in "db_mode = 1". Reported by Jim DeVito. 2017-10-24 Razvan Crainea * [ff458af3e] : travis: add slack notifications 2017-10-24 Razvan Crainea * [f53a74f5a] : db_virtual: fix previous commit 2017-10-24 Razvan Crainea * [4c7cbb7e0] : db_virtual: provide DELETE capabilities for ROUND mode 2017-10-24 Razvan Crainea * [052756097] : db: do not compute capabilities Do not compute capabilities for modules that pre-populate them. This fixes an issue where the db engine was overwriting the db capabilities of db_virtual. Thanks go to Jonathan Hulme for reporting and providing testing environment 2017-10-19 Bogdan-Andrei Iancu * [ec8d6a982] : Fix init of the cachedb related module params Init val_prefix, noval_prefix and size_prefix before general cachedb init. Credits go to @Tinet-AaronAn Closes #1203 2017-10-17 Bogdan-Andrei Iancu * [2a594ef21] : README files regenerated 2017-10-17 Bogdan-Andrei Iancu * [2f3128687] : Regenerate to cover the "shutdown_on_error" new parameter 2017-10-17 Bogdan-Andrei Iancu * [e67a055fc] : Improved explanation on the "port" parameter. The port parameter sets the default port for the protocol, affecting both listeners and sending URIs. 2017-10-17 Bogdan-Andrei Iancu * [b5094f0dc] : Fix escaping URI parameters - skip alphanumerical chars. Reported by Ben Newlin on "user" mailing list. 2017-10-16 rvlad-patrascu * [ad35e7ced] : dialog: also share module flags when replicating dialogs 2017-10-16 rvlad-patrascu * [8c8f27f60] : dialog: fix a runtime bug with DLGCB_LOADED callbacks Relying on the fact that all modules that register dialog callbacks are initialised after the dialog module (thanks to module dependencies), we can run all DLGCB_LOADED callbacks at registration time and also keep them in a list for calling them later (i.e reloading from database via MI cmd or receiving replicated dialog). This fixes a series of bugs where the DLGCB_LOADED callback is not run during, e.g. "dlg_db_sync" MI command or received replicated dialogs which do not have their callbacks installed or run. 2017-10-13 Liviu Chircu * [c0cdc66b2] : drouting docs: Clarify behavior for the gateway "type" parameter (cherry picked from commit 9cf184ec74731bf6a4709ebdfacd09b0bc171365) 2017-10-13 Bogdan-Andrei Iancu * [8ce5a92a5] : Increased the attr size for dialplan rules to 256 Also be more tolerent with long attr strings. Simply truncate them rather than spitting an error. Reported by Pete Kelly Closes #1131 2017-10-13 Liviu Chircu * [568675291] : Integer fixups rework: Complete commit f37527dcf 2017-10-13 Liviu Chircu * [5c4db4f32] : dns_cache: Avoid incorrect error logs during startup 2017-10-12 Liviu Chircu * [6f54f780d] : proto_hep: Fix pkg memory leaks 2017-10-10 Liviu Chircu * [b10b14237] : drouting: Fix verbose log line 2017-10-06 rvlad-patrascu * [aa32bf1b6] : acc: fix possbile memory leak when calling do_accounting() on CANCEL while "report_cancels" modparam not set 2017-10-05 Liviu Chircu * [a8db3e45c] : cachedb_redis: Do not abort startup if Redis is unreachable This patch add the "shutdown_on_error" modparam, allowing the script writer to control the startup behavior of OpenSIPS (ignore/abort) when Redis is unreachable. Many thanks to Bernard Buitenhuis for sponsoring this feature. 2017-10-04 rvlad-patrascu * [3f39e0eb7] : clusterer: add script function to check if an IP address belongs to the cluster nodes 2017-10-04 Razvan Crainea * [6a0cd259c] : siprec: remove passive recorder to avoid any confusion 2017-09-29 Nick Altmann * [4de5bed3b] : siprec: add rpm packaging 2017-09-29 rvlad-patrascu * [34b13a7e2] : clusterer: fix ID parameters for script message received events 2017-09-29 Razvan Crainea * [a6956c70b] : siprec: add packaging 2017-09-28 Razvan Crainea * [0de3c072f] : siprec: fix uuid lib dependency 2017-09-28 Razvan Crainea * [98cf480fb] : Revert "siprec: fix uuid lib path" This reverts commit aa2cb9a90afdfa51cfc7841a6c8d8de74281d4ab. 2017-09-28 Razvan Crainea * [aa2cb9a90] : siprec: fix uuid lib path 2017-09-28 Razvan Crainea * [08280ab0a] : siprec: add libuuid dependency 2017-09-28 Razvan Crainea * [4a17aa5f3] : siprec: add README file 2017-09-28 Razvan Crainea * [76047f177] : siprec: refactor files names 2017-09-28 Razvan Crainea * [e47b3c491] : siprec: add failover logic 2017-09-28 Razvan Crainea * [bccc92a18] : siprec: make media port configurable 2017-09-28 Razvan Crainea * [e013471c7] : siprec: remove useless functions and stats 2017-09-28 Razvan Crainea * [17741adfe] : siprec: add support for reinvites 2017-09-28 Razvan Crainea * [4c8f3abb3] : siprec: cleanup 2017-09-28 Razvan Crainea * [6e82ceb12] : siprec: make sessions restart persistent 2017-09-28 Razvan Crainea * [1b0cc0bb5] : bin: build backet from buffer 2017-09-28 Razvan Crainea * [2a460a2ab] : siprec: fix dialog reference in case of error 2017-09-28 Razvan Crainea * [d4fd99d61] : siprec: fix modules dependencies 2017-09-28 Razvan Crainea * [49aafbdbc] : siprec: add socket support 2017-09-28 Razvan Crainea * [c37878a27] : siprec: fix to checking 2017-09-28 Razvan Crainea * [6e4dda46f] : siprec: fix references 2017-09-28 Razvan Crainea * [1d3e6086b] : memory: prevent crash at shutdown 2017-09-28 Razvan Crainea * [fe98342c2] : siprec: add ref logic to prevent session from being lost 2017-09-28 Razvan Crainea * [f2c42e379] : siprec: add group support and caller/callee info 2017-09-28 Razvan Crainea * [b6f2f84ba] : modules/siprec: use rtpproxy server instead of set 2017-09-28 Razvan Crainea * [d774a30c9] : rtpproxy: use a proxy instead of a set 2017-09-28 Razvan Crainea * [2fe95dc18] : siprec: move b2b key in shm 2017-09-28 Razvan Crainea * [d36d1be6f] : siprec: add participants and uuids Finished PoC 2017-09-28 Razvan Crainea * [16f6e6b54] : utils: move base64 length compute to macros This allows us to initialize data for static variables, such as uuid 2017-09-28 Razvan Crainea * [f0d2a8734] : siprec: engage recording in initial request 2017-09-28 Razvan Crainea * [573e5d81e] : siprec: start recording for sessions 2017-09-28 Razvan Crainea * [2ad845014] : rtpproxy: fix typo in set checking 2017-09-28 Razvan Crainea * [7b5799611] : rtpproxy: provide media stream to copy 2017-09-28 Razvan Crainea * [c0959f8cd] : sdp: store each attribute in stream and session 2017-09-28 Razvan Crainea * [7876b11b9] : rtpproxy: add start_recording command 2017-09-28 Razvan Crainea * [6e68145a5] : siprec: use rtpproxy interface 2017-09-28 Razvan Crainea * [9e4d21296] : rtpproxy: add interface skeleton 2017-09-28 Razvan Crainea * [25fbf3063] : siprec: initial poc Only builds SDP from two different bodies 2017-09-28 Razvan Crainea * [c4e261aff] : msg_translator: move OSS-boundary in header 2017-09-28 Razvan Crainea * [4e3326842] : sdp: store msg body in streams and sessions 2017-09-28 Razvan Crainea * [f9a886f17] : msg_translator: add contact_builder function 2017-09-28 Razvan Crainea * [2ddffd269] : mod_fix: add fixup_free_spve functions 2017-09-28 Liviu Chircu * [b9d409a86] : drouting: Fix mispelled error log 2017-09-28 Liviu Chircu * [f37527dcf] : Rework the integer fixup functions The current integer fixup interface does not allow module developers to distinguish between "missing integer parameter" and "zero value integer parameter". This may lead to some unexpected/unintented behavior in some cases. For example, this currently causes any type "0" drouting gateway to act as the special type "-1" (global match). 2017-09-26 rvlad-patrascu * [dc3f6eafb] : clusterer: support dynamic topology discovery for nodes not provisioned in the DB. For an instance running in non-DB mode, provisioning information about the current node and other neighbours in the cluster should be defined in the script through module parameters. 2017-09-26 rvlad-patrascu * [a822b56c6] : clusterer: don't require any fields in the DB for the topology establishing mechanism 2017-09-25 Răzvan Crainea * [675164c74] : Merge pull request #1195 from etamme/master check if trace id node exists before de-reference (fix segfault) 2017-09-25 Eric Tamme * [8ba5c8aa4] : check if trace id node exists before de-reference (fix segfault) 2017-09-21 Bogdan Andrei IANCU * [bf1c6de3c] : Merge pull request #1168 from sippy/master_freebsd_fix Fix some minor build issues on FreeBSD 2017-09-21 Răzvan Crainea * [1bd368bb2] : Merge pull request #1083 from jleren/debian-sqlite-module Added SQLite module to debian packaging 2017-09-21 Răzvan Crainea * [7f3a5e97b] : Merge branch 'master' into debian-sqlite-module 2017-09-21 Bogdan Andrei IANCU * [2a64a1455] : Merge pull request #1191 from etamme/master fix memory leak in cpl-c write_to_db 2017-09-21 Razvan Crainea * [6c1a79d29] : add sqlite for jessie and wheezy Fix provided by Nick Altman 2017-09-15 Razvan Crainea * [b7f9ca331] : siptrace: allow capturing on any port reported by Eric Tamme from OnSIP 2017-09-14 Bogdan-Andrei Iancu * [0c8d59777] : Fix bogus error message (probabaly copy paste error) Credits for the fix go to Michael Mavroudis. (cherry picked from commit 9e497ea4ab03c67cb073bdf0dccef2b16bff80e2) 2017-09-13 Razvan Crainea * [99af2fc44] : proto_wss: release lock even if write fails Detected and fixed by Eric Tamme from OnSIP 2017-09-12 Razvan Crainea * [b0eb928e7] : parse_fline: fix implicit cast sign 2017-09-12 Razvan Crainea * [e113e147c] : proto_wss: write all TLS chunks under a single lock Reported by Eric Tamme from OnSIP 2017-09-08 Eric Tamme * [9ef3aacce] : add back missing return 2017-09-08 Eric Tamme * [308662a9b] : free db_hdl and res after doing a db write - memory leak 2017-09-04 Razvan Crainea * [07c3b1059] : travis: add IRC notifications 2017-08-31 Liviu Chircu * [396dca37c] : mid_registrar: Fix commit 496e2dcc Suggested by Chad Attermann Fixes #1178 Fixes #1187 Fixes #1184 2017-08-31 Liviu Chircu * [eb992099e] : freeswitch: Update the assumed heartbeat interval Assuming a 1 second heartbeat interval setting on the FS boxes (the minimum) is a good compromise between performance and near-realtime rate of update for the balancing weights. (cherry picked from commit 2778a511646dc6e90f2320985bc159476a83639a) 2017-08-31 rvlad-patrascu * [ea231c023] : siptrace: fix type for message DB column value, str instead of blob (cherry picked from commit 36f43169e238a53f7c077832f4d968ca8be38b4f) 2017-08-31 Razvan Crainea * [d8854637e] : ratelimit: fix buffer overflow when using SBT algorithm Make sure the window doesn't overflow Fixes #1176 2017-08-31 Liviu Chircu * [4b9f34d6b] : mid_registrar: Avoid some memory leaks on parsing errors Also improve mri_free(): avoid redundant checks on non-NULL fields. Suggested by Chad Attermann 2017-08-31 Liviu Chircu * [496e2dcc2] : mid_registrar: Fix a tm callback race condition Commit f522b0ef089 is incomplete, since the tm's TMCB_RESPONSE_IN callbacks are actually not mutually exclusive. We fix this by protecting the tm parameter read/overwriting with an SHM'ized rw lock. Reported by Chad Attermann 2017-08-31 Liviu Chircu * [12ab75ad9] : mid_registrar: Properly update timestamps on usrloc inserts This avoids a buggy forward of the 2nd REGISTER to the main registrar, after which behavior would correct itself anyway. Affected modes: 1 and 2. Also refactor a small code block. 2017-08-30 Liviu Chircu * [f522b0ef0] : mid_registrar: Fix mem corruption on SIP retransmissions The TMCB_RESPONSE_IN function gets called once per each retransmission, and we want to avoid this in the mid_registrar code. Since the callbacks themselves are mutually exclusive, we can get away with zeroizing our own parameter after the first run. A better way of fixing this would be to extend the tm callback API to include SIP retransmission preferences. 2017-08-30 Liviu Chircu * [ee2370071] : mid_registrar: Fix missing expiry values in mode = 2 Proper handling when forwarding REGISTER requests with missing Expires hf. 2017-08-30 Liviu Chircu * [1143419b7] : mid_registrar: Improve De-REGISTER behavior in mode = 2 Do not auto-reply to de-registrations for the last contact in AoR throttling mode, but forward them to main registrar first. Additionally, avoid auto-generating De-REGISTER messages for contacts that were deleted through a De-REGISTER to begin with (and did not expire or get deleted through the remove() script function). 2017-08-30 Liviu Chircu * [803d5d3a4] : mid_registrar: Fix un-initialized global variable 2017-08-29 Liviu Chircu * [d71cb43e8] : sipmsgops: Adapt SDP iteration code to the new format Reported by Denis Fixes #1181 2017-08-29 Razvan Crainea * [83669d2ca] : dialog: do not allow callbacks in state DELETED If these callbacks would have been registered, they will be never ran, but the free function will still be called. This breaks some modules (such as acc), which rely the function will be called. 2017-08-29 Razvan Crainea * [f1aabeaf9] : acc: prevent multiple CDRs in case of retransmissions 2017-08-25 Liviu Chircu * [b763544ad] : sipcapture: Fix uneditable "custom_fieldX" columns This allows the script writer to optionally provide data for the "custom_field1", "custom_field2" and "custom_field3" columns using sip_capture(). 2017-08-25 Liviu Chircu * [71af8fcd4] : sipcapture: Fix segfault when proto_hep is not loaded 2017-08-25 Liviu Chircu * [bcae3a0e1] : mid_registrar: Improve resilience in some corner-case scenarios * do not crash with usrloc replication (although it's not supported) * handle registrar + mid_registrar concurrently Fixes #1172 Fixes #1183 2017-08-24 Liviu Chircu * [4d028f716] : statistics: Improve the stat group parser Although we break backwards-compatibility, we actually fix the logic to be closer to what users would expect. For example, a "method:register:auth" statistic is more naturally interpreted as: { "group": "method", "stat": "register:auth" } (new behavior) rather than: { "group": "method:register", "stat": "auth" } (old behavior). 2017-08-22 Liviu Chircu * [e3be4a13d] : sipcapture: Fix primary key issues with PostgreSQL Postgres handles zero-value auto-increment columns which are part of composite primary keys differently than MySQL. Omitting the column altogether from the INSERT statements rather than setting it to zero leads to the expected behavior on both platforms (i.e. "always try to insert a unique id"). Thanks to Jennifer Hashimoto for reporting and troubleshooting 2017-08-21 Bogdan-Andrei Iancu * [4aa5fb91a] : Fixed deadlock in CANCEL handling. Reported by Maxim Sobolev 2017-08-18 Liviu Chircu * [7a5e2c7b4] : cachedb_mongodb: Avoid redundant mongoc_init() calls mongoc_init() is using pthread_once() anyway, so we might as well avoid calling it multiple times. 2017-08-18 Liviu Chircu * [7587326d3] : cachedb: Improve error reporting for bad connect strings Based on an original report+patch provided by @jalung on GitHub. 2017-08-18 Liviu Chircu * [c2a0e7e71] : registrar: Fix possible crash with remove() When using usrloc "use_domain = 1", the registrar remove() function could cause OpenSIPS to crash due to some uninitialized struct. Based on an original report+patch provided by @jalung on GitHub. 2017-08-18 Liviu Chircu * [de0e58a59] : usrloc: Fix contact matching with db_cachedb Based on an original report+patch provided by @jalung on GitHub. 2017-08-18 Liviu Chircu * [18045793a] : cachedb_mongodb: Fix several issues * fix startup crash when libmongoc is compiled with --disable-automatic-init-and-cleanup * add silent startup dependency with tls_mgm module, since both modules attempt to perform TLS initialization * add proper handling for NULL and ObjectID types * fix a bson iteration bug, causing find() to skip 1st doc * fix a bug in kvo_to_bson(), causing OpenSIPS to crash * fix compile errors on some platforms due to "str" var names Based on an original report+patch provided by @jalung on GitHub. Closes #1135 Closes #1163 2017-08-17 rvlad-patrascu * [06fa801a9] : clusterer: add new clusterer MI commands for dispatching any other MI command in a cluster. The "cluster_send_mi" command dispatches an MI command to be executed on specified node. "cluster_broadcast_mi" dispatches a command to the entire cluster and also runs it locally. 2017-08-16 Liviu Chircu * [8338fd48e] : acc: Improve documentation 2017-08-16 Liviu Chircu * [efdc829db] : Improve some logs 2017-08-16 Razvan Crainea * [1885c0d46] : event_xmlrpc: rebuild buffer for each event This prenvets crashes when multiple xmlrpc subscribers are used 2017-08-04 rvlad-patrascu * [52f651440] : Fix more references to deprecated keywords in example cfgs and READMEs. 2017-08-03 Razvan Crainea * [db5d1bddc] : cgrates: return OK as a successful result Before that it was returning 0, which was not consistent to what cgrates was expecting 2017-08-03 Bogdan-Andrei Iancu * [bb573a1f5] : Run TMCB_MSG_SENT_OUT callbacks only if the msg was successfully sent out. This fix prevents tracing SIP messages which were actually not set out (due network related issues). 2017-08-01 Bogdan-Andrei Iancu * [68419e3ba] : Fix missing handling on LAUNCH triggering in extra timer proc. 2017-08-01 Liviu Chircu * [fce1f4730] : mid_registrar: Normalize registration expiries in AoR throttling 2017-08-01 Bogdan-Andrei Iancu * [e59a7399e] : Propagate the tracing context via function param. Inside SIPtrace module propagate the tracing context as function param instead of relying on the processing context - there are cases were we have no processing context (like retransmissions). 2017-08-01 Bogdan-Andrei Iancu * [528f1cae8] : Revert 0f7e72efcd879ef0d11bf133c132140f80bc841d A following fix will address this particular problem in a more generic way 2017-07-31 Liviu Chircu * [21322d64e] : Allow memory dumps to be enabled at runtime Memory dumps and full memory logging can now also be enabled by setting "log_level = 14" and "log_level = 15", respectively, without having to restart OpenSIPS and set a proper value for "memdump" / "memlog". 2017-07-31 Liviu Chircu * [df374c635] : mid_registrar: Fix broken "Path:" URIs when using domains The module now properly handles usrloc's "use_domain = 1". 2017-07-28 rvlad-patrascu * [1812a05dd] : clusterer: Add module functions for sending generic clusterer messages at script level. Also introduce the events: E_CLUSTERER_REQ_RECEIVED and E_CLUSTERER_RPL_RECEIVED, corresponding to two types of messages, request-like and reply-like, in order to handle received messages. 2017-07-27 Bogdan Andrei IANCU * [77e678a6a] : Merge pull request #1164 from caringi/master db_mysql: fix build against MariaDB 10.2 2017-07-27 Liviu Chircu * [47af7de23] : mid_registrar: Fix some AoR throttling bugs #2 * report proper expiration time back to the UAC when the main registrar shortens the lifetime on the virtual Contact * properly handle auth'ed registrations (completes commit aa5366796) 2017-07-27 Liviu Chircu * [0831d9a3a] : mid_registrar: Code refactoring 2017-07-27 Augusto Caringi * [f5abcccca] : db_mysql: fix build against MariaDB 10.2 Fixes the following build error while building against MariaDB 10.2 library: my_con.c: In function 'db_mysql_connect': my_con.c:68:10: error: 'MYSQL {aka struct st_mysql}' has no member named 'reconnect' ptr->con->reconnect = 0; ^~ In this new version of the library the reconnect field was moved to another struct. Setting it through API seems to be a better approach. 2017-07-27 Liviu Chircu * [597695cdb] : mid_registrar: Fix some AoR throttling bugs * prevent AoR throttling lookups from using "rid" * always mangle contacts in AoR throttling, regardless of "insertion_mode". This prevents lookup issues in "Path" insertion mode with clients that are using auto-generated Contact usernames. 2017-07-27 Liviu Chircu * [450906194] : Remove some deprecated script grammar rules The following types of statements no longer have any meaning/purpose after the removal of core keywords - the script should not allow them anymore. $var(foo) = bar123; if ($var(foo) == BAR123) ... 2017-07-27 Bogdan-Andrei Iancu * [160b42410] : Avoid locking during shutdown Do not do locking when running the destroy handler, as we may get into a deadlock (if a worker process got killed while holding the lock). 2017-07-27 root * [a79647d1d] : Gracefully handling missing or malformed Contact and Expires headers in REGISTER requests. (cherry picked from commit 605098bb0697f78f3ae41eb50c8360d6ff6d6092) 2017-07-27 root * [e003d4a4f] : Gracefully handling missing or malformed Expires header in REGISTER request. (cherry picked from commit 747dcdb6f245316ff6103b4f3fe44a1014c8eb1b) 2017-07-26 Vlad Paiu * [2bfcf7dd9] : Fixed branch flags propagation to the event 2017-07-26 Liviu Chircu * [0017951f3] : mid_registrar: Add a useful startup error case 2017-07-26 Liviu Chircu * [f30217538] : rest_client: Update documentation Reported by Tito Cumpen 2017-07-26 Liviu Chircu * [071f6c7da] : Allow multi-line "pvar list" strings This directly improves avp_db_query() and cache_raw_query(), allowing the following (notice param #2): avp_db_query(" SELECT table_name, table_version FROM version", "$avp(tn), $avp(tv)"); 2017-07-25 Razvan Crainea * [91da5063d] : ratelimit: fix documentation typo 2017-07-25 Bogdan-Andrei Iancu * [f0e36896b] : Fixed wrong TLS parameters. TLS configuration parameters were moved from proto_tls to tls_mgm module. Credits to Mike Tesliuk for reporting this. 2017-07-25 Răzvan Crainea * [5a7fad1ae] : Merge pull request #1167 from sippy/mod.rtpproxy_iodebug Increase amount of debug produced by the rtpproxy module on error 2017-07-25 Maksym Sobolyev * [60c80b298] : Rename LIST_HEAD() macro into OSIPS_LIST_HEAD() to avoid collision with the BSD's sys/queue.h that declares macro with the same name. That include is pulled in by some other system includes and that breaks the build. 2017-07-25 Maksym Sobolyev * [30d27a0b8] : Add missed includes required on the *BSD systems to get struct in_addr defined. 2017-07-25 Maksym Sobolyev * [e43ba9e7e] : Increase amount of debug produced by the rtpproxy module when read() or recv() from the rtpproxy fails to also include relevant errno. This is to debug sporadic errors during the module initialization phase, such as: Jul 24 21:53:41 [21066] ERROR:rtpproxy:send_rtpp_command: can't read reply from a RTP proxy Jul 24 21:53:41 [21058] ERROR:rtpproxy:send_rtpp_command: can't read reply from a RTP proxy Jul 24 21:53:41 [21058] ERROR:rtpproxy:send_rtpp_command: proxy does not respond, disable it Jul 24 21:53:41 [21066] ERROR:rtpproxy:send_rtpp_command: proxy does not respond, disable it Jul 24 21:53:41 [21066] WARNING:rtpproxy:rtpp_test: RTP proxy went down during version query Jul 24 21:53:41 [21066] WARNING:rtpproxy:rtpp_test: support for RTP proxy has been disabled temporarily Jul 24 21:53:41 [21066] ERROR:core:tcp_start_processes: failed to send 0 status code Jul 24 21:53:41 [21067] ERROR:rtpproxy:send_rtpp_command: can't read reply from a RTP proxy Jul 24 21:53:41 [21067] ERROR:rtpproxy:send_rtpp_command: proxy does not respond, disable it Jul 24 21:53:41 [21067] WARNING:rtpproxy:rtpp_test: RTP proxy went down during version query Jul 24 21:53:41 [21067] WARNING:rtpproxy:rtpp_test: support for RTP proxy has been disabled temporarily 2017-07-24 Bogdan-Andrei Iancu * [0f7e72efc] : Add siptrace contact for in request (needed by ACK handling) 2017-07-24 Razvan Crainea * [8ba6567f2] : b2b_entities: fix b2b key memory leak 2017-07-21 Bogdan-Andrei Iancu * [6eec7f950] : Fixed missing traced SIP messages. The following SIP messages were not traced by SIP trace: * 100 trying generated by OpenSIPS * incoming ACK for negative replies * outgoing ACK to negative replies * incoming replies to CANCEL requests * incoming request retransmissions * outgoing request retransmissions * outgoing reply retransmissions The fix introduced two new TM callback to get access to the lowest level in TM message handling: * matching a SIP message to the transaction * sending a SIP message related to the transaction 2017-07-19 Liviu Chircu * [aa2b42ca6] : Debian packaging: Improve INSTALL_PREFIX logic * now also alters the install paths of configuration files * "dh_usrlocal" is now automatically overriden, if needed (i.e. if INSTALL_PREFIX begins with "/usr/local/") * the "opensips.init" script paths are now properly updated 2017-07-19 Liviu Chircu * [45a98e187] : Debian packaging: Fix source tarball name for "dev" sources 2017-07-19 Liviu Chircu * [a7eb448ed] : Debian packaging: Add a global INSTALL_PREFIX 2017-07-19 Liviu Chircu * [0e1029b1f] : exec: Improve documentation * fix incorrect AVP example * clarify the line-oriented nature of "stdout" and "stderr" 2017-07-19 Liviu Chircu * [8a1b3ef3e] : exec: Improve environment AVP typing Reported by Tito Cumpen 2017-07-17 Liviu Chircu * [15f151b96] : menuconfig template: Fix typos / improve TCP detection logic 2017-07-17 rvlad-patrascu * [eecdac348] : Update module docs for keywords removal. 2017-07-17 rvlad-patrascu * [4aa8279cc] : Remove core keywords from default configuration scripts. 2017-07-17 Bogdan-Andrei Iancu * [d1d897ebc] : Fix replicating NULL socket in contact A contact added by ul_add MI contact has a NULL contact, so take care on this during contact replication. Also, when receiving a replicated contact with NULL socket, do not discard it, but simply set NULL socket. Reported by Samusenko Andrej on user mailing list 2017-07-14 Bogdan-Andrei Iancu * [dcf591544] : Fix incorrect bug log. A missing tracing context in the SL_reply_out callback is perfectly valid - if you send from script a reply (se_send_reply) without doing any sip_trace() before. (cherry picked from commit 5a4550b23deb137db33c50fb6fcf773392d31940) 2017-07-13 Liviu Chircu * [d507a864f] : opensips.vim: Update syntax 2017-07-13 rvlad-patrascu * [815d885a1] : Merge branch 'keywords_rework' 2017-07-13 Bradley Jokinen * [56bb24175] : cgrates: add DisconnectCause for CDRs 2017-07-13 rvlad-patrascu * [9c9252c97] : Remove keywords "method", "msg:len", "proto", "max_len". 2017-07-13 rvlad-patrascu * [6d8bb3c83] : Replace "af" keyword with "$af" script variable. 2017-07-13 Liviu Chircu * [5b9f7d3d1] : struct history tracker: Add API docs 2017-07-13 Liviu Chircu * [eb22f4eb0] : struct history tracker: Optimize memory allocations Especially useful when used with QM_MALLOC. 2017-07-13 Razvan Crainea * [991b3ef4f] : drouting: fix parameters specifications for gw detection functions 2017-07-13 rvlad-patrascu * [2ca34ff01] : clusterer: prevent crash when calling module destroy function before initializing DB handler. 2017-07-12 rvlad-patrascu * [7113323c8] : Remove "src_ip", "dst_ip", "src_port" and "dst_port" keywords and allow any script variable to be compared wih IPs and netmasks. 2017-07-12 Liviu Chircu * [aa5366796] : mid_registrar: Fix authenticated registrations This applies to both throttling modes (contact and AOR). Closes #1156 2017-07-12 Razvan Crainea * [e2f9d8fc7] : acc: restore new_uri in case an error occurs on reply 2017-07-11 Liviu Chircu * [7d024fa97] : struct history: Fix mem leak 2017-07-11 Liviu Chircu * [6b612a079] : struct history: Fix the support for memory-only logging 2017-07-11 rvlad-patrascu * [d29733d61] : Second parameter of "is_myself" is now also a quoted string that should contain a pvar or port number. 2017-07-06 rvlad-patrascu * [905a18ce3] : Remove core keywords related to URIs: "uri", "from_uri" and "to_uri". 2017-07-05 Liviu Chircu * [02da97c96] : struct history tracker: Several logging improvements * fix potentially missed logs * allow logs to be matched in highly concurrent environments 2017-07-05 rvlad-patrascu * [de76c2d19] : Remove core value "myself" and offer approximately the same features via a new core function "is_myself". 2017-07-05 Liviu Chircu * [ceb6528d2] : freeswitch: Mitigate effects of the shutdown cleanup problem Since the FS conn manager process is often polling _after_ having acquired a read lock, any standard OpenSIPS shutdown while the FS module is enabled would have a high chance of deadlocking the attendant. 2017-07-04 Liviu Chircu * [4a628f411] : struct history tracker: Rework verb defining and printing Thanks to Răzvan for suggesting the sweet cpp trick 2017-07-04 Liviu Chircu * [9957ff2d9] : pua: Fix several locking & memory access bugs Several issues with publ_cback_func(): * 1 x extra lock release upon breaking "send publish" loop * N x extra lock releases inside the loop, per each failed publish * invalid memory access on "presentity" ptr after send_publish_int() 2017-07-04 Bogdan-Andrei Iancu * [e08d54e6b] : Destroy the TCP conn even if the WS link has missing data. Perform full conn destroy (in the TCP network layer) even if the WS link doesn't have (very unlikely) the proto-specific data attached. 2017-07-04 Bogdan-Andrei Iancu * [e2f872598] : Fixed memory leak on proto TLS tracing. Free the tracing data (if any) when the TLS connection is destroyed 2017-07-04 Bogdan-Andrei Iancu * [059545765] : Fix tracing race condition on SSL based connects When performing a connects (required by a write op) for a SSL enabled connection, the returning handshake make lead to a concurent read on the same connection. And the read op will try to dump the traced data aquired by the write (connect) op -> different processes, different memory chuncks To avoid such probles, the "connect" tracing will be flushed on write (a connect is always trigger by a write need) and the "accept" tracing will be flushed only on read (an accept is always followed by a read). 2017-07-04 Liviu Chircu * [e9a2dc24e] : struct history tracker: Fix some subtle locking bugs * possible memory corruption due to unsafe mem writes * deadlock on oom 2017-07-04 Liviu Chircu * [6675c6e8a] : struct history tracker: Include object name in API 2017-07-03 Liviu Chircu * [969e1b7b1] : struct history tracker: Improve log flushing behavior 2017-07-03 Bogdan-Andrei Iancu * [05ece7940] : Remove bogus auto conversion from SIP uri to TEL uri For ancient reasons, a SIP URI with user=phone was automatically converted to a TEL URI. Such conversion, automatically done, is dangerous - there is nothing in the RFC3261 stating something like this. Even more, the conversion is not complete - besides moving the username parameters to URI parameters, the domain is not stripped and the TEL not added. 2017-07-03 Bogdan-Andrei Iancu * [c4c84f1e3] : Set some default value for "already", to avoid bogus printing. Reported by Ovidiu Sas (cherry picked from commit e1497271f02966736de834c35bf5943d0fd9ef0b) 2017-06-30 Liviu Chircu * [6b68fa846] : Allow config file to be read from stdin Via the "-f -" command-line option 2017-06-30 Razvan Crainea * [2c9d86019] : clusterer: prevent crash when calling send_to after destroy (cherry picked from commit 5928e4606f21522736f42874b251452ac1e2e24e) 2017-06-30 Razvan Crainea * [802579283] : acc: fix substitutions typo 2017-06-29 Bogdan-Andrei Iancu * [b60780c50] : Downgrade severity and extra loging on epoll self healing 2017-06-29 Liviu Chircu * [5c407c64c] : exec: Improve docs for "time_to_kill" Reported by Tito Cumpen 2017-06-28 Ovidiu Sas * [5cb01c85f] : tls_mgm: fix warning: ‘port’ may be used uninitialized in this function [-Wmaybe-uninitialized] 2017-06-28 Liviu Chircu * [9e07f3f36] : cfg parser: Fix underflow with an empty mpath 2017-06-28 Bogdan-Andrei Iancu * [805c0e2f3] : Related to prev fix - dialog table has no PK 2017-06-28 Bogdan-Andrei Iancu * [0f36c9d0f] : Fix granting permissions on the PK of location table. As the PK column has a custom name "contact_id", it needs special handling when granting permissions upon PSQL DB creation. 2017-06-27 Bogdan-Andrei Iancu * [51859e045] : Do not expose the transaction when t_newtran() detects a retransmission It is much safer and consistent to avoid exposing the transaction when retransmision is detected; t_newtran() anyhow is automatically taking care of the retransmission handling, so makes no sense to expose the transaction further. 2017-06-27 Bogdan-Andrei Iancu * [0f9e65fef] : Set proper UPDATED flag upon cloning. IF the cloning is full (with the updatable part too), set the UPDATED flag too 2017-06-26 Razvan Crainea * [b1dd0cae3] : rtpproxy: allow module to specify the name of the recording This also allows rtpproxy to stream media to a remote destination. 2017-06-26 rvlad-patrascu * [37d98b00e] : All script transformations now return NULL instead of empty string for unsuccessful operation or errors. Also allow NULL as input in order to support chaining transformations. 2017-06-26 rvlad-patrascu * [71ca5691c] : tls_mgm: fix skipping invalid TLS domain definitions in the script 2017-06-23 Liviu Chircu * [6b03023d2] : TCP engine: Fix incorrect returned bytes on async writes This isn't actually as bad of a bug as it would seem. By occasionally reporting _less_ written bytes than normal, the TCP write flow may trigger some false async write requests to TCP MAIN. The connection will eventually end up in a writer which simply sends it back, as it does not contain any chunks which require writing. 2017-06-23 Liviu Chircu * [951f7e10d] : Fix a bug in is_ws() Reported by Răzvan 2017-06-22 rvlad-patrascu * [ad8fbaf99] : tls_mgm: properly start up even if there are invalid TLS domain definitions in DB 2017-06-22 Liviu Chircu * [8845fd795] : TCP engine: Fix the TCP worker duplicate connection check 2017-06-22 Liviu Chircu * [a7249f03d] : TCP engine: Fix misleading logs 2017-06-22 Bogdan-Andrei Iancu * [ade9c93d8] : Triggered fds with no fd_map are reported and removed from epoll If epoll triggers on a fd that has a cleared (removed) fd_map, remove it from epoll. 2017-06-22 Razvan Crainea * [d5fca4482] : net/tcp: do not reset conn proc_no as a writer when releasing a conn as a writer, do not reset the process owner of the conn, otherwise a reader will have to re-take it back. 2017-06-22 Chad Attermann * [e325e3eb2] : Skipping proxy ip:port append when use_domain enabled In aor-throttling mode, when usrloc use_domain is enabled the aor already includes the domain so there is no need to append the proxy ip:port to the aor in the Contact header that is relayed to the main registrar. (cherry picked from commit 4fb1581a42735483dc24658a6a7ba12d53ef20ab) 2017-06-21 Bogdan-Andrei Iancu * [34a25b733] : Do not replicate if not configured so Test if replication was set before trying to replicate the change of carrier status 2017-06-21 Bogdan-Andrei Iancu * [7249c95f9] : Fixed MI printing of tid (trace ID) URLs. Discard on-stack buffer and use formated printing for IP + port. Use MI_DUP_VALUE flag for adding the DB URL 2017-06-21 Liviu Chircu * [00d44e8bb] : regex transformation: Fix a double free bug Supplying a bad regular expression to {re.subst} would lead to a double pkg_free(). Credits to Nick Altmann for reporting / helping with troubleshooting 2017-06-21 Liviu Chircu * [8ba454be7] : Add optional TCP connection debugging code To include this code, both -DDBG_STRUCT_HIST and -DDBG_TCPCON compile flags must be defined under Makefile.conf 2017-06-21 Liviu Chircu * [3da3e8008] : tm: Remove unused/redundant tm_list_entry() macro 2017-06-21 Liviu Chircu * [f30a658c4] : Add support for generic struct troubleshooting Optionally includible via the -DDBG_STRUCT_HIST compile flag 2017-06-21 Liviu Chircu * [99181710c] : TCP engine: Fix a race condition related to con lifetime management Connections which received a read event concurrently with their expiration time could trigger an indefinitely long, CPU wasteful, rapid succession of back-forth passing of the connection object between TCP Main and a TCP worker process. The fix involves adding a TCP connection lifetime update in the TCP worker just after receiving the connection object from TCP Main (this is correct - there is some pending data, the connection is non-idle), before the expiration check is done. Thanks to Bogdan for helping with troubleshooting 2017-06-21 Liviu Chircu * [04e2d6e5f] : TCP engine: Fix ref counting bug in async writes TCP writes done by TCP workers were subject to an extra dereferencing operation, potentially leading to memory corruption due to SHM overwriting on freed tcp_connection structs. This patch eliminates the extra dereferening operation, while also taking care not to break the code for non-TCP worker writers, which will now have their passed connections dereferenced by TCP main. 2017-06-21 Chad Attermann * [8b52f1331] : Parameter "use_domain" not imported from usrloc Variable reg_use_domain is initialized to 0, but not imported from usrloc module as eluded in docs. Added import of "use_domain" parameter from usrloc module to initialize reg_use_domain (taken from registrar module). (cherry picked from commit a182a9445fcbc1679a7627bcc786c085fc304221) 2017-06-20 Razvan Crainea * [6e796ff56] : debian: add libbson-dev dependency Reported by Nick Altman 2017-06-20 Razvan Crainea * [53a4f9473] : dialplan: fix typo in previous commit 2017-06-20 Razvan Crainea * [b0258fa9d] : dialplan: proper error when no partition is defined 2017-06-19 Bogdan-Andrei Iancu * [34d98d82d] : Flag reset fixed; print flags as hexa 2017-06-19 Bogdan-Andrei Iancu * [0dfbad386] : Fix for prev+1 commit - fd=0 should be consider unset (as -1) 2017-06-19 Bogdan-Andrei Iancu * [b90094c46] : Fix prev commit - data may be null for valid fd maps (like timer jobs) 2017-06-19 Bogdan-Andrei Iancu * [ab26d0559] : Added extra code for sanity checks over reactor data 2017-06-17 Chad Attermann * [01e37f756] : Required CRLF missing in 200 OK response Addition of CRLF was mistakenly placed inside of check for Contact expires paramtere. Moved outside so that CRLF is always appended after last Contact header. (cherry picked from commit 78eaed807adf636a9448a3a0f9f0a77b4c879096) 2017-06-16 Bogdan-Andrei Iancu * [149d703c2] : Fix leak in use_next_gw() The leak occurs only when doing fallback between rules. (cherry picked from commit 911478b102576eb73e8c08989a0f6beb109821d9) 2017-06-15 rvlad-patrascu * [030bed9a8] : clusterer: start only if DB info is invalid, shutdown for other errors when loading from DB 2017-06-15 Liviu Chircu * [96ba9ed03] : exec: Fix incorrect pclose() calls on standard I/O streams Many thanks to Walter Doekes for detailing this issue (also including some minor code improvements) 2017-06-15 rvlad-patrascu * [edf519b93] : clusterer: start even if unable to load provisioning info from DB 2017-06-15 rvlad-patrascu * [24ad5dbae] : clusterer: properly init node info structures(memset to 0) 2017-06-15 Liviu Chircu * [f7a7fabcc] : core statistics: Fix a bad logical condition (regression from e90ac3e937de8) 2017-06-14 Bogdan-Andrei Iancu * [af584bc8f] : Fix memory leak in do_routing() (cherry picked from commit 3c0df80d3b5ec8dfb5e54e78cd84153266fbf0f7) (cherry picked from commit df9c76f216b190e12d2eccd57e3eb1be1196094c) 2017-06-14 rvlad-patrascu * [a043ee829] : presence: improve subs_phtable_list MI command * optionally filter listed subscriptions by "From" and "To" URIs * include Contact and first proxy from Record-Route in output 2017-06-13 Bogdan-Andrei Iancu * [4929bcee6] : Added auto-healing for reactor. If the epoll() fires a fd with a removed fd_map, better do not trigger the handler and remove the fd from epoll and fd_array 2017-06-13 Bogdan-Andrei Iancu * [0a3bfed03] : Intercept ECONNRESET and silently handle it as EOF 2017-06-13 Liviu Chircu * [df29102e9] : Do not exit startup sequences with unusable HP_MALLOC params 2017-06-13 Bogdan-Andrei Iancu * [4e7a14bd7] : Fix missing braken (introduced with previous commit) 2017-06-13 Bogdan-Andrei Iancu * [27a36a940] : Intercept ECONNRESET and silently handle it as EOF 2017-06-13 Bogdan-Andrei Iancu * [69e3576d8] : Just code identation. 2017-06-13 Bogdan-Andrei Iancu * [cf8caeb8e] : Do not log EINTR and EAGAIN as errors during UDP write. 2017-06-13 Bogdan-Andrei Iancu * [a90723d89] : Intercept ECONNRESET and silently handle it as EOF 2017-06-07 Bogdan-Andrei Iancu * [4cc5e2ed1] : Add proper listing for XML module. Not being listed with full description make the menuconfig to ignore it. (cherry picked from commit 5ecf882c65b66bae762d1b436e9329f7b29864a3) 2017-06-07 Razvan Crainea * [52b7ece21] : ratelimit: clarify limits scope for timer_interval Reported by Max Mühlbronner on mailing list 2017-06-07 Razvan Crainea * [7935ad3c8] : cgrates: switch id from long to int for backward compatibility 2017-06-07 Razvan Crainea * [8ab1deb47] : cgrates: use an integer unique id rather than string 2017-06-07 Bogdan-Andrei Iancu * [0f9ccb576] : Fixed mem leaks and bogus err logs during contact replication. Reported by sekil on IRC. 2017-06-06 Liviu Chircu * [99ebafdd7] : cachedb_mongodb: Update documentation 2017-06-06 Liviu Chircu * [53d62036f] : cachedb_mongodb: Remove unused module parameters 2017-06-06 Razvan Crainea * [402ff3411] : cgrates: add id in request Add an identifier for the requests done to cgrates. Requested by cgrates/cgrates#674 2017-06-06 Liviu Chircu * [a09dada86] : cachedb_mongodb: Fix pkg-config errors with missing libraries 2017-05-31 rvlad-patrascu * [e8160868e] : Fix assignment for $var when right operand is a binary buffer: duplicate entire buffer including zeros. 2017-05-31 rvlad-patrascu * [124c2238b] : sip_i: export script transformations that allow access to the parsed ISUP parameters and subfields. 2017-05-31 rvlad-patrascu * [254743d61] : Fix script transformations cleanup. 2017-05-31 Razvan Crainea * [9d0436eef] : dialog: don't flush in db unnecessary flag values 2017-05-31 Razvan Crainea * [8691a5da1] : rabbitmq: provide errno in case of socket error 2017-05-29 rvlad-patrascu * [b2d4fdb5e] : Fix typo in nat_traversal module exports initialization: no ',' after transformations. 2017-05-29 rvlad-patrascu * [b662d96af] : Allow modules to export script transformations. This is done by including an array of transformation classes (with parsing and evaluation functions for each class) in the module exports structure. 2017-05-25 Bogdan-Andrei Iancu * [ae1c1f32b] : Fixed examples in docs 2017-05-25 Bogdan-Andrei Iancu * [619183358] : Fix memory leak for HEPv12. Do not add formated payload or extra correlation IDs in HEP version 1 or 2 packets as they are not used and it generate a mem leak. 2017-05-22 Bogdan-Andrei Iancu * [739aac528] : Proper HEP free upon failures (cherry picked from commit eb0e47129c5e09615090cc9a41230904390c2919) 2017-05-22 Bogdan-Andrei Iancu * [3954cf532] : Proper HEP free upon failures in sip_context_trace_impl() (cherry picked from commit 1fea1d71f90df306b60932ce5a2454f6e33644d9) 2017-05-22 Bogdan-Andrei Iancu * [6b0701023] : Better reset the freed pointers. (cherry picked from commit 2b93469b135a5033e2d2eab5e58a00eafd3ce59e) 2017-05-22 Bogdan-Andrei Iancu * [fc2c7ab9a] : Free the HEP message in case of send failure too (cherry picked from commit 9bba5954cb86bc56f81887087f0dc4ff20923e74) 2017-05-22 Bogdan-Andrei Iancu * [a39471a21] : Proper free of HEP message if building fails (cherry picked from commit 84c33d1842a0ba3e14453120fe2151b3e22a4603) 2017-05-22 Bogdan-Andrei Iancu * [6a6664706] : Proper OOM handling and reporting in add_hep_payload() (cherry picked from commit 83c286573e5355688e7a77bf1c7061f1162512bb) 2017-05-22 Bogdan-Andrei Iancu * [11d062948] : Make free_hep_message() safe to partially allocated HEP messages. (cherry picked from commit 8e8988183ba0af301087a44296d99f4b5658af4d) 2017-05-17 Razvan Crainea * [494e048cd] : dialog: update documentation for triggered event Updated documentation for the event triggered when the state is changed 2017-05-17 Razvan Crainea * [070e7d471] : rtpproxy: allow multiple servers on same machine Before this fix, rtpproxy was accepting a single connection from a specific IP. This prevented multiple rtpproxy servers on the same machine (or behind the same NAT) to send timeout notifications simultaneously. Using this fix each rtpproxy provisioned can have on connection to opensips. This commit also adds some extra debugging. Reported and debugged by Flavio Goncalves. Fix #865 2017-05-16 ionutrazvanionita * [8ebf59215] : [acc extra] fix leg index when doing CDRs 2017-05-16 ionutrazvanionita * [789b9b063] : [acc] fix adding extra when doing CDRs 2017-05-16 ionutrazvanionita * [1c0914eb9] : [acc extra] fix overwriting right-operand value when setting acc extra/leg 2017-05-16 Bogdan-Andrei Iancu * [d465e6195] : Fix free space calculation. Improper computing of the available buffer space lead to false errors in writing down the dialog HASH and ID (only when using the D flag - dialog ID in contact username) (cherry picked from commit 43764b66adec9b6c4468c368fb584a7637b4bbf9) 2017-05-12 Razvan Crainea * [4bb3f1ffa] : cgrates: fix error detection for different libjson version This is a rework on interpreting the error reports in the cgrates replies. Reported by DigiDaz Fixes #1122 2017-05-12 ionutrazvanionita * [853aae1cb] : [acc] null terminate leg/extra values when storing them * problems appeared when the name of the AVP was given to radius backend which expected null terminated strings 2017-05-12 ionutrazvanionita * [d6cec5722] : [acc] don't start if extra values defined but no aaa/db url defined 2017-05-12 Razvan Crainea * [0b2f7bb81] : tls_mgm: add version and adapt to newer 1.1.0 interface 2017-05-12 Razvan Crainea * [2bf6f6237] : tls_mgm: use os_free with line and file indication 2017-05-12 Razvan Crainea * [25538b4e4] : mem: allow custom alocators to specify file 2017-05-11 Razvan Crainea * [64b897e3d] : rtpengine: remove .orig file 2017-05-11 Razvan Crainea * [17087e1b5] : rtpengine: add in-iface and out-iface params These new params can be used to specify rtpengine interface in bridge mode 2017-05-11 Liviu Chircu * [c75a7ddcd] : str2ip(): Do not reject IPs with leading '0' byte This is useful in some code areas (e.g. allowing 0.0.0.0/0 "catch-all" networks in the permissions module) 2017-05-11 Liviu Chircu * [69b14b0ae] : dialog: Fix possible crash when disabling "accept_replicated_profiles" Avoid processing received replicated profiles when "accept_replicated_profiles" is disabled. In this case, the profile handling code will be optimized and will break if attempting to run replicated profiles through it. 2017-05-11 Liviu Chircu * [2d474f003] : dialog: Fix possible crash in "profile_get_values" MI command 2017-05-11 ionutrazvanionita * [05d42b61a] : [acc] allow multiple rows extra/leg fields definition 2017-05-11 Razvan Crainea * [9798924ba] : fix $source_uri pvar when using IPv6 This fix encloses the IPv6 address in square brackets in the resulted URI Reported by Ankur Gupta on mailing list 2017-05-11 Bogdan-Andrei Iancu * [aa2f0f5f2] : Fix doc formating and improve some description 2017-05-10 Razvan Crainea * [a8294457a] : usrloc: fix event trigger when no socket is used Without this fix, opensips crashes when trying to add a contact from MI or when loading a user from DB without a socket or with an unknown socket. Reported by Cindy Leung on mailing list 2017-05-10 Razvan Crainea * [b6d7a9e27] : tls_mgm: fix uninitialized variable 2017-05-01 Ovidiu Sas * [90f16f7b7] : sliblist: complete file relocation from core to lib 2017-05-01 Ovidiu Sas * [767f2d90d] : lib: move sliblist from core to lib 2017-04-28 rvlad-patrascu * [24d48c518] : tls_mgm: db_schema: same default values for verify_cert and require_cert when taken from DB as from script 2017-04-28 rvlad-patrascu * [cc50c0912] : tls_mgm: some doc fixes and improvements * fix client domain AVP usage example * document default TLS settings for any domain when not set * fix some default values for module parameters 2017-04-28 Liviu Chircu * [abd1e655f] : Proper fix for PostgreSQL login Submitted by @volga629 2017-04-28 ionutrazvanionita * [16a1be540] : [aaa_radius] fix Makefile if pkg-config doesn't find the lib 2017-04-27 Razvan Crainea * [b9fba7c1e] : tm: fix uninitialized variable to make travis happy 2017-04-27 ionutrazvanionita * [fdfb68905] : [proto_hep] fix handling tcp requests coming in multiple chunks This commit fixes 2 bugs: 1) fixes not reading second part of a single TCP request because of bad parsed pointer update; 2) fixes major bug that was causing packets to be processed infinite times by hep callback when one message + some part of a second message came in a chunk and in the second chunk it was the second part of the second message; the tcp request structure was not updated(complete was not set to 0 after first message was processed) causing the second message to be processed an infinte amount of times into the database; 2017-04-27 Liviu Chircu * [01c9ae2f3] : mid_registrar: Fix insertion issues in mirror mode Reported by @volga629 Fixes #1094