=========================== Release 3.0.1 ============================== 2019-10-01 Razvan Crainea * [71a15b475] : Bump version to 3.0.1 2019-10-01 Vlad Patrascu * [8096c731c] : event_virtual: improve the behaviour of the FAILOVER policy A previously failed subscriber is now skipped for further notifications for a configurable interval (via the new "failover_timeout" modparam). This is useful when the actual event backend blocks for a considerable amount of time when rasing the event. This commit greatly decreases the overall amount of time OpeSIPS processes remain stuck when a subscriber is unresponsive. Related to #1836 (cherry picked from commit 4dde71c13aaf5860472273c81bed7fec44e48723) 2019-10-01 Vlad Patrascu * [de4f7a847] : event_rabbitmq: don't block indefinitely on connect The connection timeout is configurable via a new module parameter. Related to #1836 (cherry picked from commit fec5b51a0b4980b519904308b6297cd17d3b0ba6) 2019-10-01 Razvan Crainea * [468394f5e] : tls_mgm: don't run ATEXIT openssl callbacks for 1.1.1b The NO_ATEXIT flag was added in openssl 1.1.1b, not 1.1.1 Credits go to Nick Altmann for reporting this (cherry picked from commit d2e6874f3e8c7919cf5efb68c7a2eb80ebec636f) 2019-10-01 Razvan Crainea * [b6d1ce765] : rtpengine: enhance symmetric documentation Close #1841 (cherry picked from commit 5d177ba9fd9a3234e21188e3964fc1083cc81f3f) 2019-10-01 Razvan Crainea * [6f96a3e7d] : tls_mgm: don't run atexit callbacks at shutdown prevent OpenSIPS from crashing during shutdown due to bogus atexit() `OPENSSL_cleanup()` routine, that is ran after the SHM memory is destroyed, thus crashing during shm memory release. (cherry picked from commit 3d30217a8d86696e69c0e6ca2005a723401d1e90) 2019-09-30 Liviu Chircu * [0877fac68] : dialog: Fix unsafe profile list iteration The dialog->profile_links list _must always_ be walked after first grabbing the dialog's lock, regardless of the current ref count. Failing to do so may lead to invalid memory access, as the list elements may get freed from other processes. Many thanks to 46Labs for supporting this fix (cherry picked from commit 5613922793b2b332354da30ab54b4e56f276bbda) 2019-09-30 Liviu Chircu * [e75ebb8b8] : dialog: Fix possible deadlocks with pinging + HA The OPTIONS pinging + replicated dialog creation routines were sufferring from a possible AB/BA deadlock, as they were both attempting to grab the dialog and the ping timer list locks, but in differring order. Many thanks to 46Labs for supporting this fix 2019-09-30 Razvan Crainea * [5e1f96a91] : tm: dup in pkg the faked msg headers before this commit, the faked reqests were having the headers fields stored in shm_mem and shared with the tm request uas. Thus, during concurrent accesses to one of the headers' `parsed` field, the first process would have parsed the field in pkg memory, and the second process would have found that header already parsed. However, it couldn't read the other's process memory, resulting in an invalid access. Moving the headers in a private area for the faked request solves this issue, as each process will have its own `parsed` field in pkg memory. Credits go to Rizwan Syed and Jonathan Hulme from Connex CS for reporting and supporting the testing and fixing of this issue. This issue has also been reported in ticket #1808 (cherry picked from commit a48aeca2d29f0ae04f3393ddb32bcf70b2be2795) 2019-09-30 Dan Pascu * [43499d5b8] : Removed leftover code after pthread overwrite fix (cherry picked from commit 3febdf5ded03992be39b38b4c3bb97bc2bb47c27) 2019-09-30 Dan Pascu * [47a6c412b] : Fixed overwriting pthread locking functions (cherry picked from commit 92d7188b2a6ad805df10c63bf716c02f90c444ab) 2019-09-30 Liviu Chircu * [6dbf27add] : Transformations: Fix a series of buffer overrun bugs This patch adds several buffers, on two layers, such that the following operations are no longer broken (i.e. leading to buffer overruns and incorrect results): * putting together any kind of transformation chain without the risk of reading and writing into the same transformation buffer * passing multiple transformation-enabled variables with arbitrary chaining lengths to a script function without the risk of any two of them making use of the same buffer Many thanks to Răzvan Crainea for some timely tips! Fixes #1572 (cherry picked from commit 25c7c5994b382d376ffbdb62b5a4b7474870de7f) 2019-09-30 Liviu Chircu * [fec584795] : cfg language: Fix binary string comparisons When dealing with binary strings (e.g. the ones produced by {ip.pton}), some of the string comparison operators were broken, such as: !=, >=, >, <= and <. Completes dee8a6a375 (cherry picked from commit 1aac6c20ad6368dcda3cb1ab2ff2e52904627f14) 2019-09-29 OpenSIPS * [3b81c53f9] : Rebuild documentation 2019-09-28 Liviu Chircu * [3165b8834] : pi_http: Fix undefined 'PROC_BIN' reference (cherry picked from commit c7013403fe9dd58c5883b328bcbbbb4e21731481) 2019-09-27 Bogdan-Andrei Iancu * [938f71818] : Remove old, unused reference to PROC_BIN (cherry picked from commit 838349d5827d05c8c5430d53ca125f49600967a8) 2019-09-27 Bogdan-Andrei Iancu * [2f3a93e74] : [droutoing] fix typo in comment (cherry picked from commit d5be677e7db08f5c5fd86bb251b8975ec5fb11ab) 2019-09-27 Bogdan-Andrei Iancu * [83c0b005e] : [uac] force enclosing of the newly added URI As the new URI may contain URI params, to be sure we are not mixing them with hdr params, we enclose the new URI (if not already). Closes #1741 (cherry picked from commit 146bcee04f4c66bf78254dd985bf651f888396c1) 2019-09-27 Bogdan-Andrei Iancu * [9fa9615d1] : Loop and wait for multiple terminted processes. If you have a bunch of exec() calls (translated into a bunch of additional processes created), upon their termiantion OpenSIPS will get a cascade of SIGCHLD signals - as the kernel does not guarantee the delivery of the signals (like mergining similar multiple signal triggers), we will not have a 1-to-1 between terminated processes and received signals. So, let's do our best and upon a single SIGCHLD we will try to "catch" as many terminated processes as possible/available. Closes #1773 (cherry picked from commit 57f3619ffb848a9dce51668cd22ed964b5bcc8f2) 2019-09-27 Vlad Patrascu * [698f13216] : clusterer: select the proper send socket for multiple bin listeners Fixes #1671 (cherry picked from commit e5e249b4d646ea838060f3835190042cde85db90) 2019-09-27 Liviu Chircu * [873e7f986] : dialog: Optimize link_dlg_profile() Reduce the number of pointer de-reference operations performed, be it under lock or not (from 8-9 de-references down to just 1). (cherry picked from commit 329ba6031792cea0fd92cfd0ef28804c447266c6) 2019-09-27 Liviu Chircu * [61b23a50c] : dialog: Various small code/performance improvements * remove redundant "is_replicated" function parameter * speed up profile hash computation (size is always 2^N, see new_dlg_profile() -> we can do bit AND) * shorten cookie-cutter code with add_last() and str_cpy() * fix over-complicated if condition * do not leak PKG memory on some error case * remove useless comment (cherry picked from commit 20a962a23879d66007bd5fdcbf1e314c5181d1cc) 2019-09-27 Bogdan-Andrei Iancu * [19a85c69b] : Build listen_id and phostport tokens all the time. During script reload we avoid "interpreting" (during script reparsing) the tokens which are not related to the routing blocks (as we do now want to re-load the global params or the mod params). Still, the listen_id and phostport tokens are used both from routing blocks (force_send_socket() and set_advertise()) and from the global parameters. As when they are parsed we have no clue what they will later expand to, better build the all the time the corresponding structures and eventually free them later if the grammar reduces to tokens related to global params. Closes #1839 2019-09-26 Liviu Chircu * [abf4ac9b0] : dialog: Fix a very rare race condition A dlg->h_id with value 0 is perfectly possible, see link_dlg_unsafe(): dlg->h_id = d_entry->next_id++; It should not be treated as some special case. (cherry picked from commit d4be27178f7cb5bc09eb45b331e4cc4a61261444) 2019-09-26 Liviu Chircu * [7d75d6fea] : dialog: Fix unsafe profile linker handling Once a profile linker is attached to dlg->profile_links, it _must not_ be touched anymore, as it can be freed at any moment (e.g. within a simultaneous processing of dialog CREATE + DELETE bin packets). Many thanks to 46Labs for uncovering this bug and for supporting the fix (cherry picked from commit ddbff50033fb8701ec3a0bdc189be75a44558639) 2019-09-26 Vlad Patrascu * [2c312871d] : acc: fix bad event parameter values for evi accounting All dialog specific accounting fields were incorectly pushed as event parameters for E_ACC_EVENT and E_ACC_MISSED_EVENT. This would result in bogus values, possibly set by previous triggerings of E_ACC_CDR_EVENT. This commit also fixes a type conversion bug causing the 'setuptime' and 'created' parameters of E_ACC_MISSED_EVENT to be improperly set. Closes #1786 (cherry picked from commit b0760cd10122ef879eec325a2b4ce564e73ec03e) 2019-09-25 Liviu Chircu * [a565d2ed7] : usrloc: Fix some incorrect startup checks On some misconfigured scripts (e.g. DB usrloc + db_url modparam, but without any SQL DB module loaded), the module would report some strange errors, instead of the more intuitive: WARNING:core:solve_module_dependencies: module usrloc depends on an sqldb module due to modparam working_mode_preset, but none was loaded! ERROR:core:main: failed to solve module dependencies Thanks to Vlad Pătrașcu for the catch! (cherry picked from commit 0b55ca32e74ec5d9b488de3226ba7ffe1d387764) 2019-09-23 Liviu Chircu * [661ae58bb] : fraud_detection DB schema: Fix missing default values (cherry picked from commit fda854eeedeb52c63121d2e99573d8f47525b844) 2019-09-23 Liviu Chircu * [4fc72beff] : fraud_detection: Various small improvements * refactor unreadable/unmaintainable code * fix bad hash sizes, leading to unused buckets * improve some key errors reported to the users (cherry picked from commit 4a0558b2710b45e93c1ea2b1e60c794b0969a708) 2019-09-23 Liviu Chircu * [7b0fefc3e] : fraud_detection: Fix a seq calls computation bug The sequential calls of a user should be counted using the dialed numbers, NOT the matched fraud rule prefixes (which are almost always shorter). Reported by Benjamin Pasquet from OpenIP (cherry picked from commit 749fbef8875051d58e998ea0338bcbba12e28b1d) 2019-09-23 Liviu Chircu * [676289827] : fraud_detection: Fix a dangling SHM access bug This patch fixes a race condition where a fraud_detection reload could free the global SHM "threshold" objects which are still being referenced N times (once for each ongoing dialog -- callback is invoked on termination). The solution is to simply store the integer values of the thresholds into the callback data, and avoid storing any SHM pointers which have no lifetime guarantees. (cherry picked from commit 04704dc05e48e1773252d0e038db89e2183ccb64) 2019-09-23 Liviu Chircu * [8276fdd95] : fraud_detection: Fix incomplete locking logic The get_item() function results were insufficiently guarded, such that the SIP workers may concurrently perform insert operations on the same map object, possibly leading to shm corruption. Fixes #1389 (cherry picked from commit ccdc8d2d1bd3adba3a91c669443c22c4bfa82894) 2019-09-23 Liviu Chircu * [2e11a65ee] : Revert "fraud_detection: Fix hash-level locking issues" This reverts commit 32ec7a291db3a9ac8865a439b04874a9e1798e8e. (cherry picked from commit e7fa2d18584883178a03773031d3432d632e6bd8) 2019-09-23 Bogdan-Andrei Iancu * [3c18dbfc1] : [acc] added loose dependency to dialog module We need to be sure that dialog module is init before acc (if dialog is loaded), to prevent any crashes when acc registers the DLGCB_LOADED callback in dialog (the registraion of the callback will try to run the callback on any pre-existing dialogs, so the hash table for the dialogs must be created/init). It is a loose dependency as it does not require the dialog module to be loaded. But if loaded, it must be init before ACC module. Fixes #1833 2019-09-22 OpenSIPS * [571112e37] : Rebuild documentation 2019-09-20 Liviu Chircu * [bde48dff4] : sql_cacher: Fix a series of memcmp() bugs This patch fixes a series of string comparison bugs, which would have lead to either false positives or invalid memory access. Credits to Răzvan Crainea for the report (cherry picked from commit abf3e32f944976e5f16e712cc0d10e01e73816ff) 2019-09-20 Bogdan-Andrei Iancu * [11824b813] : Fixed calling receive_msg() from non-worker process As starting 3.0 only the worker processes have access to the config script, the packages recevied via the raw sockets (in a module process) needs to be handled in the proper worker-processes via an RPC call. Closes #1813 (cherry picked from commit 20f14c03697026bab5835dfdd1b1b70bbebf30c8) 2019-09-20 Bogdan-Andrei Iancu * [3ada30919] : Fix missing alias ports in TCP conn description The alias ports of a TCP connections are essential information when debugging issues related to the TCP conn re-usages. (cherry picked from commit 4001b468184a2182745c09beb475667ba8ce8890) 2019-09-19 Razvan Crainea * [afdc63cda] : seas: add preinit stub Complete previous commit 2019-09-19 Razvan Crainea * [aa17d85b3] : Rename the mod_exports dependencies function to preinit Commit b29931e4f added a new function in `mod_exports`, sadly named `dependency` function. This created a confusion with the existing dependency mechanism. This commit changes renames the newly added function to `preinit`. Kudos to Liviu Chircu and Vlad Patrascu for arguing about this. (cherry picked from commit fed5bade4ee435a0431efbb224ba21291c708467) 2019-09-19 Bogdan-Andrei Iancu * [93c36c8c4] : [drouting] fix solving the script route upon load Do not lookup the name of the route at DB load (as we do not have the proper structure), but do it at runtime. Closes #1824 (cherry picked from commit 3812dea3eb7b3e460128a3c08dcc4d1640aa43d3) 2019-09-19 Razvan Crainea * [fd2f00701] : acc: store ctx in dialog when starting accounting (cherry picked from commit a105be21ba27d9e796e6a158b30278777c656ca8) 2019-09-19 Razvan Crainea * [e0832778f] : acc: register DLGCB_LOADED callback in mod init Move the registration from the dependencies function, because at that point the dialog module does not have anything loaded. (cherry picked from commit 68a764c06785c5fdf7904920cbc7ae0aedcf817b) 2019-09-19 Razvan Crainea * [684a49343] : acc: always try to load dialog module In case the `cdr` flag is used as variable, we can not figure out during startup parsing whether the dialog module should be loaded or not. Therefore we always try to load the dialog module, and in case we can't and the `cdr` flag is used, we trigger a warning. (cherry picked from commit f54e3fd767a6906df260f810baf62cdd04b2e42a) 2019-09-19 Liviu Chircu * [335129822] : acc: Fix segmentation fault on startup Reported by Dan Pascu (cherry picked from commit af1e442551b9d1c949ce879cc72f870a95f011ab) 2019-09-19 Razvan Crainea * [c5ec947e6] : acc: use the dependencies function to register dlg ctx This is a temporary fix, until we figure out a way of registering the dlg ctx index only if cdr is used. (cherry picked from commit 3aa5596c5584141f0256959f18b606c256a48092) 2019-09-19 Razvan Crainea * [36b37f620] : add dependencies function in module_exports Add a new function in module_exports that is run to determine what kind of dependencies (of other modules) a module has. This function is ran before running the initialization phase of the module. (cherry picked from commit b29931e4fb1ae528fd896d68038cf5ad4395c4cf) 2019-09-19 Bogdan-Andrei Iancu * [f9bc3ce41] : [b2b_logic] Do not try to re-evaluate the script params. The script parameters (provided from script level) are already evaluated (from the variable perspective), so there is no need to do it again. Closes #1819 2019-09-18 Liviu Chircu * [b64ea1760] : usrloc: Be more strict with bad modparams Do not attempt to auto-fix invalid modparam values and throw a warning, because some users may skip reading the logs on a "succesful" startup! (cherry picked from commit e5dad693a3c6ba74c8de1b69e479a449dfe0669e) 2019-09-16 Razvan Crainea * [77b2b6f84] : smpp: fix payload when sending SM/DM response Error reported by Johan De Clercq over GitHub/mail. Related to #1807 (cherry picked from commit 72982c2ca6dfb9d14eefe4c1ca1cd34b35ce7dfd) 2019-09-15 OpenSIPS * [742ef66de] : Rebuild documentation 2019-09-12 Liviu Chircu * [8d5586085] : dialog: Fix broken Re-INVITE pinging timeouts Commit 0d026b9 introduced a regression where the Re-INVITE pinging timeouts would not work anymore. Fixes #1797 (cherry picked from commit 295f4ba92daad93aefb09b01067e903ff7a77562) 2019-09-12 Liviu Chircu * [1092bf48a] : federated usrloc + Cassandra: Fix metadata deletion Due to the fact that the key/value cachedb API often uses hardcoded key names in each backend implementation (e.g. "opensipskey"), usrloc AoR metadata delete operations were not working with Cassandra, as usrloc asks the API to delete the "id" key. (cherry picked from commit 8862524164a30acd1a3840059474e85800f0efe3) 2019-09-11 Liviu Chircu * [cda6f4c24] : usrloc: Undo removed condition in da1dac8f Credits to Vlad Pătrașcu for the catch! (cherry picked from commit c21c0944d899968835df0cffb88dc7c6636070d3) 2019-09-11 Liviu Chircu * [22a3b3394] : usrloc: Fix a replicated AoR label matching bug This patch makes it so the AoR label gets included in the "AoR created" replication packets and mirrored in the receiver instance. This prevents a series of bugs where the usrloc API fails to match a contact by its contact ID, e.g.: * nathelper being unable to delete dead TCP/TLS contacts after a restart + usrloc cluster sync * mid-registrar (mode 1) being unable to look up a contact by contact ID after a restart + usrloc cluster sync Reported by @vasilevalex Fixes #1492 (cherry picked from commit da1dac8f41b199dae0028546bd1e547e8ddef922) 2019-09-11 Razvan Crainea * [f2d8f708f] : obsolete/seas: revert bug introduced in commit fa0bcd201a Many thanks to Walter Doekes (wdoekes on GitHub) for reporting this in ticket #1828 (cherry picked from commit fc73c9fb26ff5f6af316cd47f00e670900acff1b) 2019-09-10 Liviu Chircu * [4eba01917] : mid_registrar: Improve throttling performance (modes 0 and 1) This patch fixes a bug with UACs that send expiration values which are _beyond_ the configured "outgoing_expires" value. In this case, the throttling logic would only keep absorbing REGISTERs up to "outgoing_expires" seconds, and would disregard the actual value returned by the main registrar. (cherry picked from commit ad9ff9a27eab2b56d7ce617d03f03024ad55b3fe) 2019-09-09 Liviu Chircu * [9ab24947b] : mid_registrar: Fix unsafe aor->contacts access In modes 0 and 1, the aor->contacts list was accessed in an unsafe manner, as the AoR lock would be relinquished too early. This could lead to a crash in rare cases. (cherry picked from commit 66f99833fbddd7c4ca12b7616356a59647e8b592) 2019-09-09 Aron Podrigal * [9d52f6ff8] : Fix #1804 - mid_registrar_save() should save new contact from register following an unregister. When using `sql_mode` is set to `SQL_WRITE_BACK` and `rr_persist` is `RRP_LOAD_FROM_SQL` contacts are not immediately deleted from memory, contacts are marked `expires = UL_EXPIRED_TIME`. So when a `REGISTER` request is received following an UNREGISTER, do not return the previous contact marked for deletion. Returning the previous contact record, could have potentially lead to a crash, if opensips would free the contact record while mid_registrar would retreive that using `get_ucontact()`. (cherry picked from commit 98636d41de9ee631e838df348c9ea2a0735cd1c2) 2019-09-09 Razvan Crainea * [cba3c0ad0] : perl: silence uninitialized RETVAL warning (cherry picked from commit 91210a9feee19f19d1c2f5ef5cae44e40283885d) 2019-09-09 Razvan Crainea * [26d87b1ec] : travis: replace libradiusclient-ng-dev libradcli-dev (cherry picked from commit d8beff877b8094798581589cd374466e7b26a6c1) 2019-09-09 Maksym Sobolyev * [c9b8e723b] : Avoid compilation warnings. (cherry picked from commit 6452be40cc3c2c168eef261710885e06f5741371) 2019-09-09 Liviu Chircu * [88102423e] : sipcapture: Run child_init() during startup This allows, among others, sending HTTP requests from the script, as the rest_client module needs to initialize its state before it can be used. Reported by @hydrosine Fixes #1818 (cherry picked from commit 2db8c1715f209f9ec3d55405a8bfaf7cbda6a7ea) 2019-09-08 OpenSIPS * [1df04b1f9] : Rebuild documentation 2019-09-03 Liviu Chircu * [86d83c2b5] : textops: Fix bad subst_body() example (cherry picked from commit 25f9070ab7509a8ab186b69a1a7ee2d5aeb896bc) 2019-09-02 Liviu Chircu * [3e6314d74] : cfg script: Remove max line length limitation to 4096 bytes (cherry picked from commit a970602b72a8fc0293a7aa2ea78070eaeb1406c5) 2019-09-02 Liviu Chircu * [94db9f1a8] : path: Do not omit ";received=" when merging Path headers If "enable_double_path" is on and the inbound and outbound sockets match, the second Path header would not be added anymore (good!), thus skipping the ";received=" parameter completely (bad!). The above behavior is actually a regression, introduced in 71c7d75f66c Many thanks to Pete Kelly and Bogdan Iancu for spotting the problem! (cherry picked from commit 8070dac142fc6506429314371f04372b5ce4a5b6) 2019-09-01 OpenSIPS * [66a210284] : Rebuild documentation 2019-08-29 Vlad Paiu * [a869c814b] : RFC 5389 : "Defined a generic padding mechanism that changes the interpretation of the length attribute. This would, in theory, break backwards compatibility" Skip the new padding, also skip non-mandatory attributes (cherry picked from commit d26b998000022e9417c0894535edf7b0ba6772f0) 2019-08-28 Vlad Patrascu * [412958396] : dialog: do not replicate 0 profile counter under lock 2019-08-26 Liviu Chircu * [fd46af53b] : dialog: Add optional ref troubleshooting support (cherry picked from commit 21e33d0ae1afdd409c9c707132e263c74fe4ee95) 2019-08-26 Liviu Chircu * [a74fff149] : struct hist debugging: Enhance the API * add the possibility to disable auto-logging. Previously, each debugged entity would periodically dump logs to disk as it accumulated logs. Disabling auto logging is especially useful when troubleshooting code in high-throughput environments. * sh_log() is now a macro, which will additionally print the FILE / FUNC / LINE of the calling code, offering more troubleshooting insights and reducing the amount of code written * simplify sh_unref(), the 2nd parameter was unnecessary (cherry picked from commit deb03fe86a8d0134526c86e62183cb80887b09c9) 2019-08-26 Dan Pascu * [bac954d9c] : Fixed segmentation fault caused by illegal memory access (cherry picked from commit a769a6cfe2bf395e33fd2912d3b8bd279afe42ea) 2019-08-25 OpenSIPS * [9a3bac4d6] : Rebuild documentation 2019-08-23 Dan Pascu * [f6e628d40] : Fixed potential illegal memory access to freed structure (cherry picked from commit 21348b39c4bd93163c347f810fb99396783c821c) 2019-08-22 Vlad Patrascu * [ea3e9ed39] : dialog: discard a replicated update for a deleted dialog A race between the processing of a dialog update and delete replication packets can lead to an incorrect dialog state and bogus unrefs. (cherry picked from commit c0697b9ad7269d84dbac63162879a903cc6b1ac4) 2019-08-22 Bogdan-Andrei Iancu * [c45ee49e3] : [registrar] fixed type s/stirng/string/g 2019-08-22 Bogdan-Andrei Iancu * [7ce84c42a] : [registrar] Fix wrong doc on is_contact_registered() (cherry picked from commit a3d422e4e9812696279f39a5df62fc76dc81fea5) 2019-08-21 Bogdan-Andrei Iancu * [37529fa1b] : [tm] fixed regression on cancelling empty branches upon timeout While adding support for Content-Disposition: no-cancel (see 4747da559f4df161441be8373488dee9fd16c282), a regression was made, allowing TM to send out cancel (upon internal 408 timeout) to branches with no incoming replies. Only this cancelling scenaio was affected (internal 408 timeout). The cancelling upon 200OK or incoming cancel were not affected. Thanks to Richard Revels for spotting and reporting this. (cherry picked from commit f1a6d0d8e46c4aff9f203f2eb7e85a2b1e40cf92) 2019-08-21 Vlad Patrascu * [f06d7d372] : clusterer: fix possible crash when sending a bin packet This commit fixes a crash caused by a race condition when computing the next hop for a destination before sending a bin packet. The actual 'next_hop' field from the 'node_info_t' struct may be changed by another process after getting the return code from the 'get_next_hop_2()' function. (cherry picked from commit 5386bb7a48cc62b7930788471b82756a6e2aea3d) 2019-08-18 OpenSIPS * [4cc9dbe26] : Rebuild documentation 2019-08-17 Liviu Chircu * [8e4c1b846] : registrar: Fix a ";received=" Path parsing bug with save("v") Commit 71c7d75 introduced a parsing bug causing the ";received=" info to not get stored into usrloc, as well as the NAT flag. If we're saving these contacts with save("v") instead of save("p1v"), we cannot route to them anymore (the latter version fully stores the Path, so the front-end LB is still able to route back to the devices). Credits to John Burke for the accurate report Fixes #1809 (cherry picked from commit 45dd0e5600506c140cc7bbc1485f6c567c43e27e) 2019-08-14 Bogdan-Andrei Iancu * [69c12ff9e] : [proto_hep] Fix mem leaks upon errors. If resolving the destination fails, do not forget to free the so far allocated memory. Closes #1782 (cherry picked from commit 11d7dcc28d9a4ae9351e12c5a5d1f9a2da2d7279) 2019-08-14 Alessio Garzi * [2e1a686fb] : Indentation fix 2 on urecord One line was missing tab indentation (cherry picked from commit 61efba2e5a18481e4b92acd860aa7ae88db04164) 2019-08-14 Alessio Garzi * [1c488bc65] : Better indentation on switch case inside urecord Just indentation fixes (cherry picked from commit 5d1678a37618d697c7c9a6346c0846d01404a142) 2019-08-14 Alessio Garzi * [2fc9d2886] : matching_mode honored in cachedbs Function cdb_add_ct_update ignores matching modes set on opensips.cfg, this result in an unexpected behaviour if the user sets matching_mode=0 since multiple records with same contact (but different callid) are stored in the cache database. This fix checks, before getting the base64 hash, if matching mode is contact only, if yes, the callid string is not included in the resulted base64 hash. If matching mode is CONTACT_CALLID, this function behaves like before, and the hash is calcuated using contact:callid. (cherry picked from commit db7eca79a181ceb3406463aad7ab56162247104d) 2019-08-14 Vlad Patrascu * [4b0ab4880] : clusterer: fix crash when loading null string columns from DB The bug was introduced in commit: 66ae3ac (cherry picked from commit e8255c83a655e8e6e8fb8136344599155da01e65) 2019-08-14 Razvan Crainea * [f023a5f39] : dialog: fix double lock get on replication update When a replicated packet was received due to a timeout update, the dialog was refferenced with the lock already acquired, resulting in a deadlock. This fix refferences the dialog in an "unsafe" way, without trying to acquire the lock, since it is already acquired. (cherry picked from commit 6b0da180ab8ee33ac0eb784127e7738b90b4517e) 2019-08-12 Liviu Chircu * [5bbebf682] : dialog: Fix two referencing issues * an unsafe referencing bug, introduced in 65a9f51f1ee. As long as the dialog is not locked, we _must not_ call ref_dlg_unsafe(). This unsafe increment operation could lead to occasionally missing references, possibly even a crash. * a long-standing bug, where read_dialog_profiles() is invoked on replicated create/update events with a dialog that has no extra reference, so it could very well be a lingering/freed pointer. Under the right conditions, this too could lead to a crash. (cherry picked from commit 0e85dd69f9d9ead1363e2afe8f6b4f0d3293f4db) 2019-08-11 OpenSIPS * [cce3fffe6] : Rebuild documentation 2019-08-09 Vlad Patrascu * [f1e28a5bf] : clusterer: fix bad parsing of node specification modparams Multiple string properties in 'my_node_info' and 'neighbor_node_info' modparams would not be parsed correctly. Fixes #1775 (cherry picked from commit c26bea063ec7e86c6552857180eba06861d6ad50) 2019-08-09 Bogdan-Andrei Iancu * [db555781e] : [urloc] fix reading int val in modparam function Fixes #1790 (cherry picked from commit f1c9f606a189b6ae7eef9e61ae672709a3d795a9) 2019-08-07 Liviu Chircu * [b4e4de3b5] : CSV parser: Relax the RFC 4180 implementation Do not implement RFC 4180 down to the letter (e.g. double-quotes are ONLY allowed within a field if they are escaped using another double-quote). Rather, only follow this rule if a field _begins_ with a quote. This helps maintain backwards-compatibility with the previous OpenSIPS CSV parser, and is also desirable in many situations (e.g. parsing a WWW-Authenticate header). Fix #1794 (cherry picked from commit 4072d9e54e631b20e71d3abc181d1f329084c95b) 2019-08-04 OpenSIPS * [518aca4d4] : Rebuild documentation 2019-08-01 Bogdan-Andrei Iancu * [478291e2e] : [sql_cacher] Proper handling of empty tables if there are no records in the table (after a reload on a fully cached table), do not consider it an error and (even more important) take care and do the version change on the keys (to remove the old values). Closes #1784 Credits go to @clifjones for the patch (cherry picked from commit 9198eccbd2dc1d147d7c1ccf8696dbb80b5935ee) 2019-08-01 Liviu Chircu * [f589f6c80] : clusterer: Log all major sync stages at INFO level Motivation: these logs are not spammy at all, yet very useful/reassuring to see in production after issuing data sync commands. (cherry picked from commit 8e391c2f80d9c76dc9369ed20701469a5b2c5740) 2019-08-01 Bogdan-Andrei Iancu * [9c4ce867b] : Fixed the stats for counting transaction based on the final reply code The fix consist of counting only ONCE each transaction (for the xxx_transaction statistics), disregarding its retransmissions, multiple 200OK replies or final code override (like 200 after a negative reply). Closes #1636 Many thanks to @bcnewlin for his testing and validation of the fix. (cherry picked from commit 68bedfee4fbf3f99b92249b8d8887921d8d80c2f) 2019-08-01 Liviu Chircu * [452dc6388] : compression: Do not strip "a=rtpmap" lines with types 96-97 According to the IANA RTP payload types register, the dynamic payload types (custom-defined, for which the "a=rtpmap" lines are mandatory and cannot be stripped) begin at 96, not at 98. Reported by JP Hindin (cherry picked from commit f4015c8543e67540166f802f34c6ebf8c7d14c14) 2019-07-31 Liviu Chircu * [7cf0ab30f] : dialog profiles: Fix deadlock during startup This updates commit b26d59e30c2c, which introduced a deadlock while loading dialogs from DB which also contain profiles. (cherry picked from commit 57cf12dfa75a27a25f6c1dd50daa0cbb662e2ef0) 2019-07-31 Liviu Chircu * [6094ab19f] : acc, alias_db, auth_db: Align docs to latest changes (cherry picked from commit a8fe40dcb8f39fa968e8b8c51b31ba8168f81310) 2019-07-31 Liviu Chircu * [931a7a1f5] : dialog sync: Fix some subtle backup box restart bugs In an HA setup, following a restart of the backup box, there would be: * an extra ref for dialogs loaded from DB but not confirmed through sync, leading to a few hanging state 5 dialogs (added in 51b5ec3b) * too little 'active_dlgs' stat decrements during the above corner-cases, since update_dlg_stats() ignores state 5 dialogs (cherry picked from commit 509e18113be5f217e6f421c97d2545239d996729) 2019-07-30 Liviu Chircu * [9072fe151] : cachedb_local: Fix compile error 2019-07-30 Liviu Chircu * [ba7516e92] : dialog: Fix broken re-INVITE pinging after failover The mandatory re-INVITE pinging data (SDP1, SDP2, ct1, ct2) was not included in the BIN replication packets, so the pinging would stop working once we'd failover to the backup box, in an active/backup HA scenario. (cherry picked from commit 65a9f51f1ee43e500d6fbe34c3a0e07722bd75b2) 2019-07-30 Liviu Chircu * [ddcdab724] : dialog sync: Fix ref miscount during post-sync cleanup The hash reference must only be decremented a single time during the lifetime of a dialog. Given that multiple pieces of code may attempt to delete a dialog concurrently (e.g. a BIN "delete" packet and the post-sync cleanup routine), the only way to guarantee a single decrement of the hash ref is by using the dialog state machine transition. Iff we're the ones to transition from ACK -> DELETED, we can (and MUST) also decrement the hash reference. (cherry picked from commit 51b5ec3bac182104781a5e12287a217053170432) 2019-07-30 Liviu Chircu * [a46800501] : dialog: Decrement dialog stats during post-sync cleanup After a sync completes, it proceeds to clean up all dialogs loaded from DB which did not match the data received via sync. However, make sure to also decrement the 'active' / 'early' dialog stats on each delete! (cherry picked from commit f88c41064c9d895e52c6a8dac62867246da3b253) 2019-07-30 Liviu Chircu * [a6345cc2d] : dialog: Fix data reload race conditions on startup Since loading the data on child_init(), the load_dialog_info_from_db() routines and rcv_cluster_event() routines could run in parallel, without any synchronization on the dialog table, which could lead to duplicate dialogs in the hash. (cherry picked from commit aa93d0fbf369078f1c0e85fc10314fe7799aeca0) 2019-07-30 Liviu Chircu * [765c521e4] : dialog sync: Do not include early or ended dialogs (cherry picked from commit b8bde2f014e5b427c8517493a7ada16923d0928c) 2019-07-30 Liviu Chircu * [82b87044e] : dialog replication: Revert the sync packet alignment code ... since now it is unnecessary, thanks to the sync layer enhancements. (cherry picked from commit e33565342065298eeb542a73503f84402cc1076d) 2019-07-30 Liviu Chircu * [57bbad55c] : dialog replication: Prevent crashes due to differing packet versions Commits 58dc435cb563 and 852e629e4700 changed the format of the dialog binary data packets. This would cause an immediate crash during a rolling upgrade, since upon upgrading and restarting the backup node, it would sync from or receive packets from a primary node running the older version, with the previous data format. This patch makes it so dialog packets which do not meet the expected version are simply discarded, rather than being left to cause a crash. 2019-07-30 Liviu Chircu * [60bac3c3a] : clusterer: Enhance the versioning of sync packets This commit adds an additional "version" field for the sync packets, which are more complex than the other ones. Since they contain serialization logic from two different layers (clusterer + data module), they should also contain two version fields, to allow each module to discard data coming from an OpenSIPS donor node running on a differing binary version. (cherry picked from commit a20a0acb5d9e8ef75d4cf2bb081ed1d5d259a3dd) 2019-07-30 Liviu Chircu * [31352d982] : clusterer: Make the data sync interface more robust This patch improves the data sync interface so that during a sync, modules are no longer forced to micro-manage the data packets they are receiving from the interface. They can now freely abort the processing of a sync chunk at any time, without disrupting the processing of the entire sync packet (composed of many more of such data chunks). Additionally, since the sync packet format has changed (an extra integer is needed for each chunk in order to allow the "skip" mechanism), the sync packet version is now bumped from 1 -> 2, in order to prevent any compatibility issues with OpenSIPS nodes without this patch. (cherry picked from commit 0b3ad435be73d7ef49c511d2b70039c39a883135) 2019-07-28 OpenSIPS * [9e951c904] : Rebuild documentation 2019-07-27 Liviu Chircu * [04eaa15da] : cfg preprocessor: Fix a dirty buffer management bug One of those pesky bugs, caused by not knowing your snprintf's well... This strange, seemingly inexplicable bug only manifested whenever a series of config file lines + preprocessor tokens formed a multiple of 4096 bytes, the amount by which the preprocessor buffer gets extended with each reallocation. With such config files, the snprintf() would truncate the last byte of the config file line adding up to N*4096 bytes (usually a '\n'), and put a '\0' instead, after which the preprocessing continued normally. However, it seems Yacc isn't too happy when you feed it with a buffer which includes '\0' characters, as this will cause it to barf some binary data to stdout, somewhat ruining the logfile. (cherry picked from commit bf968d01679a48b9ff79f4edb9abf2743d3586b1) 2019-07-25 Vlad Patrascu * [ca0ea3f7f] : dialog: fix memory leak in unset_dlg_profile() 2019-07-24 Liviu Chircu * [dc34a8399] : usrloc shutdown: Destroy the CDB conn _after_ cleanup This fixes a possible crash on shutdown whenever a contact expires during the shutdown and needs to be flushed. Credits to @bogdan-iancu for the accurate report (cherry picked from commit 94bbbebbcf99843baa5b6d60e699a466c9adc3d2) 2019-07-23 Razvan Crainea * [a69707a0f] : pt: expose number of processes at mod_init Add a function that exposes the number of processes at mod_init(). Even if this is not entirely accurate (some processes might remove their external processes during mod_init), it's the best chance we can get to count the number of pipes we need to create for modules that use synchronous communication. This fix solves event_* sync processing. Thanks go to Rizwan Syed for reporting this, close #1768 (cherry picked from commit 139bb4c0c65e8ec5a7c870c3fc9f35fcf2c24b87) 2019-07-23 Razvan Crainea * [52540b7d1] : evi: fix subscribers list mi cmd (cherry picked from commit 73cc6ec8da931ce919d89a351de8a556d5952789) 2019-07-22 Liviu Chircu * [d7d74d62c] : cachedb_mongodb: Add support for TIMESTAMP and BINARY types (cherry picked from commit aafbb85ce6ce6d46c2cc25770e52cc012c4d4ac1) This fixes some warnings when doing cache_raw_query() UPDATE operations: WARNING:cachedb_mongodb:bson_to_json_generic: Unsupported type 17 for key clusterTime - skipping WARNING:cachedb_mongodb:bson_to_json_generic: Unsupported type 5 for key hash - skipping 2019-07-21 OpenSIPS * [f65583044] : Rebuild documentation 2019-07-18 Razvan Crainea * [5533417f7] : tm: check branches that should be cancelled under lock This fix avoids race condition between a CANCEL message and replies that are coming in the same time. Thanks go to Tommy Brecher for reprting this and offering extensive logs to debug the issue in ticket #1759. Credits for the fix are shared with Bogdan Iancu for the brainstoring. (cherry picked from commit 6e39385233543ee9583469c55d3d3d1738917fb7) 2019-07-17 Vlad Patrascu * [9bbf35b5f] : sip_i: allow add_isup_part() in request and failure routes Reported by Sagar Malam on the mailing list. (cherry picked from commit 2f5be7bb2ea733069c6f5cb6722cd972b17b31c5) 2019-07-17 Razvan Crainea * [f5c8c0755] : smpp: make sure we re-fetch the connection after rebinding Reported by volga629 in ticket #1728 (cherry picked from commit 91be787f16414c208f64cd71d43d7e4fcb4bb987) 2019-07-14 OpenSIPS * [3f9473432] : Rebuild documentation 2019-07-12 Vlad Patrascu * [1de370ebf] : sql_cacher: don't query the SQL DB under lock when reloading Previously, retrieving any key from the cache during a reload would blocked until the SQL DB query completed. Suggested by Ben Newlin in #1760 (cherry picked from commit 642271cf43ae005e81125bc98fcabc6700e46aca) 2019-07-12 Liviu Chircu * [eceef3ec2] : 'include_file' statement: Re-introduce relative file paths During the preprocessor migration, it seems the support for relative file paths was lost. This commit re-introduces all the lost features: * allow relative-path imports, e.g. include_file "cgrates.cfg". These file paths are considered to be relative to the .cfg file that is importing them * prioritize any relative-path imports found in the startup directory (Note: this is different from the "-w" working directory!) * detect infinite "include_file" loops Many thanks to Jonathan Hulme for discovering and reporting this issue! (cherry picked from commit ecea9b07445d6125607cd086efc34b1dc9938669) 2019-07-12 Bogdan-Andrei Iancu * [3194727fa] : [load-balancer] Link Resource under each Destination node Fixes how the output of the "lb_list" MI command is structured. (cherry picked from commit 72f06a574427cd5627cf8b16780f4d622d7e0c3d) 2019-07-12 Bogdan-Andrei Iancu * [7b03d615d] : [rtpengine] Fixed wrong test when building MI output (cherry picked from commit 303ff59c91f26affa070ccadc503c52fca527368) 2019-07-12 Bogdan-Andrei Iancu * [71808a50c] : [rtpproxy] Fixed wrong test when building MI output (cherry picked from commit dc6ac9e47b5825718204b08de8b90a60384598d2) 2019-07-12 Razvan Crainea * [72cfdd908] : dialog: run loaded callback for dialogs loaded from db Fixes a bug introduced in commit 8c8f27f that was relying on the fact that dialogs were loaded from db *before* registering the loaded callback, due to the dependencies mechanism. Thus the loaded callback was ran on the spot, when the it was registered. However, this is not entirely correct, since there are modules (such as acc module) that do not have dialog dependencies, but still register LOADED dialogs - in these cases, if dialog was loaded (in script) after the module itself, the callback was never run. This behavior was amplified by commit 3ddae43, which was basically never loading the dialogs before registering the callback, thus the loaded callbacks were never ran. The purpose of this commit is to fix this issue, reported in #1754 Thanks go to Liviu Chircu for reporting the issue and providing the fix (cherry picked from commit 6638b06f3ffa1fbc8d19f0532879e2c6c77a76d0) 2019-07-11 Vlad Patrascu * [df7a4e77c] : sql_cacher: properly increment relod version on timer reloads Reported by Ben Newlin in #1760 (cherry picked from commit f6232b068e0e4d423747299be2f69ee011004733) 2019-07-11 Vlad Patrascu * [fddfe9f25] : sql_cacher: fix a memory leak in case of a failed SQL query Reported by Ben Newlin in #1760 (cherry picked from commit aa38fb1fba6b51c6e27e4d8f87ae10c032700282) 2019-07-11 Vlad Patrascu * [ef29dcedc] : sql_cacher: fix several possible deadlocks in case of errors Reported by Ben Newlin in #1760 (cherry picked from commit dea97be92d71514da6705e53a5265564902fc21f) 2019-07-11 Bogdan-Andrei Iancu * [c203ddec1] : Fix wrong test 2019-07-11 Liviu Chircu * [26d18c5ce] : rest_client: Let libcurl use the system malloc functions The fact that libcurl spawns a thread in order to perform each transfer is well known. Also known was the fact that by instructing libcurl to use the pkg_*alloc() functions, an OpenSIPS worker must synchronize with the libcurl thread before they can both manipulate the PKG pool. Commit 900f6c996c697b was an attempt to solve this, however the fix DOES NOT hold, as it was implemented in that commit (the curl thread is aware of the thread lock while the original process ignores it...). The only way we can make libcurl use the opensips pkg mem allocation functions is by changing pkg_malloc() itself to also grab a thread lock. And this is already too much, as it would unnecessarily slow down the pkg allocator, while the benefits are minimal anyway: what do we stand to gain if libcurl uses our mem pool? Close to nothing. We just let libcurl use the system memory manager (along with as much memory as it wants) and we're done with this issue for good. Fixes #1546 (cherry picked from commit 3b2586d64828e89525ae050897c8bd62a9c9ce92) 2019-07-11 Liviu Chircu * [99dd4faee] : rest_client: Make async(rest_put()) do a PUT, not a POST (cherry picked from commit 04a56fbd7d51b7aee5ff8a838b1e2a83094c1c92) 2019-07-11 Bogdan-Andrei Iancu * [04808b208] : Fix leak due bad free of temporary parsed RR hdr Free the list (of RR body) starting from the original RR body, not from the iterator value (which will be NULL all the time) (cherry picked from commit 2c7449091ef1920ae4d9030061c0992c27dfdb2b) 2019-07-10 Bogdan-Andrei Iancu * [861b49112] : Fix wrong internal mapping for "add_path_received" The mix probably happened durring the upgrade of the module interface. Fixes #1739 2019-07-09 Vlad Patrascu * [8802e41e9] : clusterer: fix doc example for cluster_send_rpl() (cherry picked from commit ccf3c20da7ae4e8874f6b700fcb2185e522417ae) 2019-07-09 Vlad Patrascu * [93daea580] : tls_mgm: improve docs for the verify_cert and require_cert modparams (cherry picked from commit d15c80e49c71a62a3df995cd2d5a747b7c75fc02) 2019-07-09 Liviu Chircu * [de41131c5] : cachedb_local: Fix missing array terminator Fixes #1757 (cherry picked from commit f418c2a15483de6908a273817b7b3cae33e71301) 2019-07-08 Vlad Patrascu * [d80949d46] : clusterer: improve the seed node mechanism The "seed" node will now revert to a "synced" state after a configurable interval instead of directly form startup. Closes #1591 (cherry picked from commit 66969bfcd214388c53005928505124367a9255d4) 2019-07-08 Dan Pascu * [5e117c1c4] : Renamed refreshWatchers to refresh_watchers in documentation (cherry picked from commit 0cdaff16717aacd543de1b46e62b690d03832945) 2019-07-08 Dan Pascu * [7f0556104] : Properly set the SI_IS_LO flag on interfaces specified using IPs/hostnames (cherry picked from commit 36b4be98794bfac120c345f70db3ad8a94a8ffef) 2019-07-08 Dan Pascu * [378db3128] : Fixed variable name in function call (cherry picked from commit 61debb3891462e15bd62223cc5bdb776c172b207) 2019-07-07 OpenSIPS * [d5434d0dc] : Rebuild documentation 2019-07-06 Dan Pascu * [58e469b71] : rls: Cleanup spacing (cherry picked from commit be0d3b7bb3b2e956b783623df417f48582aadc5a) 2019-07-06 Dan Pascu * [11afeaf72] : rls: Report the actual code that was used in reply (cherry picked from commit a72132832f0835d815fdc9488d80df684eb2dbde) 2019-07-06 Dan Pascu * [1fa5a067a] : rls: Fixed memory leak in rls_handle_subscribe (cherry picked from commit 5692501f8ce3eda41872e4d5996d701bc804408e) 2019-07-05 Razvan Crainea * [52b4e7827] : proto_smpp: make sure to properly reconnect session Addresses ticket #1728 (cherry picked from commit 18f8714f2ca9d8d4e4192279de2464e6245481aa) 2019-07-05 Dan Pascu * [b0caa06c0] : Fixed indentation (cherry picked from commit eec488d82116963d7b326f372f2d99f8b37d8ff8) 2019-07-05 Razvan Crainea * [a17f35ead] : proto_smsc: rebind connection when lost Thanks go to Slava Bendersky for reporting this in ticket #1728 (cherry picked from commit 31b2c83533d7631506a80ffdfb6b09226c83e8d3) 2019-07-05 Razvan Crainea * [2790130c8] : proto_smpp: add unbind handler Thanks go to Slava Bendersky for reporting this in ticket #1728 (cherry picked from commit ab063d32e10c2c0a81319ace5bb724a085bb3f85) 2019-07-05 Liviu Chircu * [0ae84a0e4] : cachedb_local: Improve 'cache_collections' parser The 'cache_collections' modparam parser is now fully tolerant to any kind of whitespace present in the string. Fixes #1424 (cherry picked from commit ca81c501f7fcaca32fae6235b2489933f2efefd3) 2019-07-05 Liviu Chircu * [a9249c489] : {csv.} transformation: Use the lib/csv.h parser Fixes #1220 Closes #1416 (cherry picked from commit 394f57a8da54de0161eafee643e7def4db2d74ed) 2019-07-05 Liviu Chircu * [674b6767c] : lib/csv.h: Full unit test coverage (cherry picked from commit 769ddedf3990028f8650d436798f9a52e1d8883b) 2019-07-05 Liviu Chircu * [cae8264a7] : lib/csv.h: Add an RFC 4180 CSV parser * also invert the CSV_SIMPLE flag into CSV_RFC_4180 * adjust all calling code to use the new set of parsing flags (cherry picked from commit 477d0f67861a6f494902846a574507d9087e87b4) 2019-07-04 Liviu Chircu * [2e3db36ef] : dialog: Fix broken stats after a restart+reload * the "active_dialogs" and "early_dialogs" stats were broken along with the data reloading move to child_init() * the global helper counters, "active_dlgs_cnt" and "early_dlgs_cnt" are no longer needed (cherry picked from commit aa2f534e18dc0830a160bb90d4cc3a116386953d) 2019-07-04 Bogdan-Andrei Iancu * [df0591ea3] : [pua_dialoginfo] fix docs for nopublish_flag (cherry picked from commit d949a7a7be402ae9505483322cde27a54f25d163) 2019-07-04 Razvan Crainea * [2024061e9] : dialog: fix broken error check in load_dlg_db (cherry picked from commit c29a0d09eefc6aec34b838028a7ae5d328ff18b3) 2019-07-04 Vlad Patrascu * [108676221] : bin interface: lower level of irrelevant log message to DBG (cherry picked from commit 668fcbd8c085cac0afa714353d61f825b74afd31) 2019-07-04 Bogdan-Andrei Iancu * [857d766f5] : Fixed missing error reporting. (cherry picked from commit 18c7aad4accbc4801fdea443747227274eb11bc3) 2019-07-04 Bogdan-Andrei Iancu * [db57a992c] : [pua_dialoginfo] Fixed nopublish_flag modparam It seems the parameter (a msg flag) was not migrated to string format. Also the actual test of the flag got lost somewhere during the rework (cherry picked from commit 8076cdbdfb18f07d8fbbabbc6eda506345c806dd) 2019-07-04 Dan Pascu * [661b712d4] : rls: Normalized some spacing (use TABs to indent) (cherry picked from commit 39afa59111605119e2a625e1f694337ad6d36c51) 2019-07-04 Dan Pascu * [aac5abe43] : presence: Removed unnecessary goto (cherry picked from commit d4a33111e286aa0edb509800ae6a69739cf058ae) 2019-07-04 Dan Pascu * [11e949e92] : presence: Normalized spacing in a few places (cherry picked from commit 23abe46bc9eb59eaeb4319f68556e360f527d828) 2019-07-04 Razvan Crainea * [82dd2632e] : cgrates: allow setting NULL variables Close #1750 Thanks go to Vasilios Tzanoudakis for reporting this! (cherry picked from commit 44afc4a159517568007bda25418c80a82e501363) 2019-07-04 Dan Pascu * [7feafb75d] : Fixed test for socket str length (cherry picked from commit 720cf839b4e6277e73b82a3ad5f324b3722b3876) 2019-07-04 Dan Pascu * [5b3a15ae1] : Compacted declaration (cherry picked from commit fa135cf493c88341848f98d71a36d07187db16d8) 2019-07-04 Dan Pascu * [f1d3b5cff] : Fixed comment (cherry picked from commit 1f8f12c4152d278018abc26669097931b3d0550b) 2019-07-03 Nick Altmann * [263f5da85] : Merge pull request #1751 from razvancrainea/master redhat_fedora: specify cfg_target when installing Thanks Razvan Crainea for patch 2019-07-03 Razvan Crainea * [4656508c4] : sql_cacher: nr_columns limitation is 64, not 8 Fix limitation when the number of columns was wrongfuly limited to 8, instead of 64, preventing loading more than 8 columns Thanks go to Bogdan Iancu for spotting this and suggesting the fix (cherry picked from commit b07a82d62e500c3b28016842100f0c0210fb1a96) 2019-07-03 Razvan Crainea * [b9f0265a0] : dialog: load dialogs on child init (cherry picked from commit 3ddae43445cd6f3e3f6d4e9480f1e8c35801d008) 2019-07-03 Razvan Crainea * [68fe59598] : mem/rpm: fix double close Reported by Coverity CID #199936 (cherry picked from commit a9b238fcbe1c41337f0b46af855b78cbfc08f335) 2019-07-03 Razvan Crainea * [253d14614] : mem/hp: remove useless debugging (cherry picked from commit 9db6556a7fb1221ffa061fde0bef0a65d5e89c27) 2019-07-03 Razvan Crainea * [d14a4ac09] : fix stats decremented with unsigned values Reported by Coverity CID #200104, #200030, #200096, #200091, #200090, #200074, #200073, #200049, #200039, #200035, #200032, #200009, #200003, #199998, #199996, #199991, #199988, #199986, #199985, #199982, #199977, #199970, #199964, #199963, #199960, #199952, #199948, #199945, #199941, #199938, #199934, #199923, #199920 #199913, #199900, #199896 (cherry picked from commit 0d31e6bd038ae6cfed130e421bb5afbcaa8b5f15) 2019-07-03 Razvan Crainea * [065c92442] : acc: fix leak generated by dialog replicated update (cherry picked from commit d8c03f325993e59242f156de01dffa60cc8324b4) 2019-07-02 Bogdan-Andrei Iancu * [2bad502a8] : Fixed missing reset of current transaction holder The missing reset could lead to wrong access to old transactions when running more than one notification route, one after each other. Credits for reporting and helping with testing go to Ivailo Dobrev (cherry picked from commit 88b84e90145b7582be85793b47b7d0456b98831d) 2019-06-30 OpenSIPS * [ee3bd41d9] : Rebuild documentation 2019-06-28 Dan Pascu * [31b555495] : tls_mgm: Streamlined reporting of certificate verification errors (cherry picked from commit b367b7c5db91851b90ae8e5ec13a92ca0c850d16) 2019-06-28 Dan Pascu * [921cd8fcf] : Fixed handling depth issue for certificate chains that are too long (cherry picked from commit fa2ceb52b5b2513bedf16df6eaedec7cb1e34755) 2019-06-28 Bogdan Andrei IANCU * [3243df3cc] : Merge pull request #1738 from varghesepaul/2.4 Do not simply link the buffered lumps, but better clone them -> this … (cherry picked from commit 08d869bf819d77f5cd18c9eb33330c0afd6d86ec) 2019-06-28 Bogdan-Andrei Iancu * [63a3c58b2] : [b2b_entitites] Fix crash on empty To display name. As the To display name may be empty and the DB does not enforce a not NULL, better be ready to read a NULL. This happens when using db_cachedb + cachedb_mongodb as backend Closes #1606 (cherry picked from commit 68aaa20113dcbb12c3123108fbe2cbc11f5e7b82) 2019-06-27 Dan Pascu * [5f318db59] : tls_mgm: Fixed bug where client domains where missing in tls_list MI output (cherry picked from commit b105886f65b434602ecabac5a4c06de0cce7f4b9) 2019-06-27 Dan Pascu * [60339f208] : tls_mgm: Fixed bug where domain filters were shown under ip address filters (cherry picked from commit 7f226176422c660eb4359171a350161186082d22) 2019-06-27 Liviu Chircu * [4e62b009d] : rest_client: Document the TCP connection reusage behavior (cherry picked from commit 71d40f9198f83b6f310dcd9e9c5dc11a0b085a3b) 2019-06-26 Bogdan Andrei IANCU * [14cd21560] : Merge pull request #1744 from rrb3942/nofork_daemon_error Only report status if in forking daemon mode (cherry picked from commit a4dfbf5a9aa9b3ea9d256ceb34620e2e6411a3ae) 2019-06-26 Razvan Crainea * [a857ef101] : tm: add cid to messages generated by OpenSIPS Add cid for CANCEL messages. Thanks go to Andrey Faizullaev from 46Labs 2019-06-25 Vlad Patrascu * [dc53d72c6] : sql_cacher: fix crashes when failing to validate db connections Fixes: #1734 (cherry picked from commit 82c446d2922fca59942e8b7835516486d8771fb4) 2019-06-25 Razvan Crainea * [86a1400f6] : net: handle new WRITE_ASYNC2 in main as well (cherry picked from commit d27a802f7b681fae3ebba0d643d7aa5f623b84b7) 2019-06-24 Vlad Patrascu * [8464df4d5] : event_virtual: improve docs regarding the failover policy Closes #1510 (cherry picked from commit f682abe5308d631ce58337fba45cd3108bad1425) 2019-06-23 OpenSIPS * [759fa548b] : Rebuild documentation 2019-06-21 Bogdan-Andrei Iancu * [10d048223] : [registrar] Fixed bogus testing of optional parameter (cherry picked from commit 81db9c5ef358f77db0a470a0a90a1165d3b113ec) 2019-06-21 Bogdan-Andrei Iancu * [6d45008fe] : [registrar] Fixed bogus testing of optional paramter Reported by Johan de Clercq (cherry picked from commit 4f1c82dfac052204ceeaa68c2d2c0fd00089c3b9) 2019-06-21 Liviu Chircu * [65b1dcff1] : DB URL parser: Avoid double free on missing URL DB On URLs such as: mysql://opensips:opensipsrw@master.naudb.service.consul ... the DB URL parser would perform a double free within the error handling code. Reported by Kirill Galinurov (cherry picked from commit cba99632f18259f8e194246678793fa6e1723c3f) 2019-06-21 Liviu Chircu * [7e6101e3a] : Script: Allow signed integers as module func params This fixes a regression where the behavior of some OpenSIPS 2.4 module functions was restricted in 3.0, e.g. is_from_gw(): In 2.4: is_from_gw("-1", "n", "$var(gw_attr)") # starts OK In 3.0 (without this patch): is_from_gw(-1, "n", $var(gw_attr)) # would fail to start (cherry picked from commit 0a8cf7402a559619203d981de41d91b24e2b06ee) 2019-06-21 Liviu Chircu * [dfdb07bed] : Script: Fix binary string comparisons Addresses the following: $var(ip_1_s) = "[2001:6c8:5e00:1::249]"; $var(ip_1_b) = $(var(ip_1_s){ip.pton}); # Save binary IP to variable $var(ip_2_s) = "[2001:6c8:5e00:1::24a]"; $var(ip_2_b) = $(var(ip_2_s){ip.pton}); # Save binary IP to variable if ($var(ip_1_b) == $var(ip_2_b)) { xlog("Variable saved Binary addresses are EQUAL"); } else { xlog("Variable saved Binary addresses are DIFFERENT"); } Correct result: DIFFERENT. Maybe this should be a unit test somehow. Reported by @vasilevalex Related to #1568 (cherry picked from commit dee8a6a37577a5aa1c1621ba66acebfe7f47e3f4) 2019-06-21 Vlad Patrascu * [f4a7a8e36] : dialog: fix processing of sync packets containing known dialogs (cherry picked from commit e85aa14b9d8539800765feec34f97bdc7df3441b) 2019-06-20 Razvan Crainea * [bfd80ccde] : acc: update dialog vars on DLGCB_PROCESS_VARS callback Make sure all variables are updated when a replicated dlg UPDATE packet is received (cherry picked from commit 8eb71e89743ca878b13326b99eca87c1ace88b61) 2019-06-20 Razvan Crainea * [5d11bfbad] : dialog: add DLGCB_PROCESS_VARS callback This callback shall be called every time a replicated packet that includes dialog variables is received. (cherry picked from commit b3e3eec97c108d357e2be5d58f5fc80edaa2dd90) 2019-06-20 Razvan Crainea * [cd6d8b209] : acc: move ctx in dlg ctx, instead of dlg val (cherry picked from commit efc8d6cc2a6057b86685911b725a22bd82766b92) 2019-06-20 Razvan Crainea * [12ed69de5] : dialog: fix ctx funcs prototype load (cherry picked from commit 31ce92b40b652e6d579188b26d7cc21f6566dd86) 2019-06-20 Razvan Crainea * [42890a5b0] : dialog: add ctx functions (cherry picked from commit 4feaca2b00a86639fd0b973155a8e9f0dfe79845) 2019-06-20 Razvan Crainea * [38c59a907] : dialog: add context (cherry picked from commit 0b3ca526c75ecdb993c3e0ca8a006c7da8a4e9e9) 2019-06-16 OpenSIPS * [6bc11602b] : Rebuild documentation 2019-06-13 Bogdan-Andrei Iancu * [64f01aed4] : Fix missing pointer. Follow up of bcefb6a753a618bed011e3be49a1d1a59ee816a6 remarked by @liviuchircu (cherry picked from commit b24be3c4db7ec94966f70ead72c7440374da8455) 2019-06-13 Bogdan-Andrei Iancu * [b03abccd0] : More fixes on wrong cast for fixup result Credits go to @atrips Related to #1730 (cherry picked from commit bcefb6a753a618bed011e3be49a1d1a59ee816a6) 2019-06-13 Bogdan-Andrei Iancu * [377df2272] : Fix wrong cast for fixup result Similar to 2ffe55139290aa3ca3c23a7696ce8541799748e4 Closes #1730 2019-06-13 Bogdan-Andrei Iancu * [2ffe55139] : Fix wrong cast for fixup result Fix for #1730 2019-06-12 Liviu Chircu * [85b79918b] : dispatcher: Swap ds_mark_dst() parameters [BACKWARDS-INCOMPATIBLE] In 3.0, ds_mark_dst() had its parameters swapped by mistake, without any real benefit in doing so, both breaking backwards-compatibility and also leading to uglier script, such as: ds_mark_dst(, "p"); This commit simply reverts the function to its previous behavior, addressing both issues above. Hopefully, I don't upset too many people who migrated to 3.0 during this month following the stable release. (cherry picked from commit 11884b2375a97ad9d7b0cef7322ad73d2d6bbff8) 2019-06-12 Liviu Chircu * [813ebc937] : dispatcher: Fix modparam typo (ds_probing_threshhold) The old version is still kept for backwards-compatibility. (cherry picked from commit 36a09ee7ab876d96bab5df0a09d7a5f1c9e33c99) 2019-06-11 Bogdan-Andrei Iancu * [905c7f7c1] : Fix ds_next_xxx() when missing partition param. Flag CMD_PARAM_FIX_NULL is missing Fixes #1731 2019-06-11 Bogdan-Andrei Iancu * [1f206b7c1] : Accept BIGINT also for table version (cherry picked from commit dafa8f6a50958e1c6905621cceb2457f94163cc5) 2019-06-11 Bogdan-Andrei Iancu * [4b0b2a760] : Fix FILE stream usage after freeing its buffer. Instead of returning the cfg FILE stream, better directly return the buffer used to build the FILE stream, as anyhow we need a cfg buffer after all (cherry picked from commit c51a329affffb588da1cd0b43c95ddf9263ea2d3) 2019-06-11 Dan Pascu * [3fe9191bf] : [call_control] Refactored code (cherry picked from commit 3ae087af7c3f64377ca6f356e88e0f9542e04951) 2019-06-11 Dan Pascu * [97fd2ea99] : Send the dialog id instead of h_entry and h_id to mediaproxy (cherry picked from commit 3840e3f9838f8ffccdc6164ecde58eda3a8151b4) 2019-06-11 Dan Pascu * [41cb9de72] : Send the dialog id instead of h_entry and h_id to the call control app (cherry picked from commit 9a305b6767e0c0cffcfe352c6194d16f5bdc7a76) 2019-06-11 Dan Pascu * [24239452f] : Removed unused structure (cherry picked from commit 81130bdd719e1bcd27239b2b2f09e7e69d1b4901) 2019-06-11 Dan Pascu * [8329b1402] : Use the appropriate format modifier to avoid type casting (cherry picked from commit edc6057a4447ddd82c979c3dccbc456c0e3ca1d6) 2019-06-11 Dan Pascu * [168a2201e] : Calculate the dialog id as an unsigned value to avoid truncation (cherry picked from commit a38c191e01281a92f249e2c647c8dad03139f392) 2019-06-10 Liviu Chircu * [bde862509] : mathops: Allow negative operands in math_rpn() (cherry picked from commit c0fe97a0e9b980327033e4bdf667106e51462288) 2019-06-10 Liviu Chircu * [9e8f69a03] : usrloc: Fix missing KV-Store in ul_dump output (cherry picked from commit 72838f24de37c11c3e9241ba12f46a98220856eb) 2019-06-10 Razvan Crainea * [54a71c20f] : sipcapture: fix load_hep module finding Reported by atrips (on GitHub), close #1727 (cherry picked from commit e2d4c5b7aa39b23e181068c0cbb8287237b79c25) 2019-06-10 Razvan Crainea * [f1f7d9271] : proto_hep: fix off by one comparison (cherry picked from commit 4703d29da294433968547adf54b1ea0585b94359) 2019-06-10 Razvan Crainea * [d2f1fd059] : smpp: at least one listener is mandatory for this module Thanks go to Slava Bendersky (volga629 on GitHub) for reporting this Close #1723 (cherry picked from commit bb072f6fdc59517ec891ea14b8c7a92245dc6164) 2019-06-09 OpenSIPS * [e56ced852] : Rebuild documentation 2019-06-07 Razvan Crainea * [4f386c41b] : rtpengine: fix start recording fixup 2019-06-05 Liviu Chircu * [bda3afd89] : Fix build on ARM architectures Compiling mod_fix.c In file included from mem/../lock_alloc.h:55:0, from mem/../locking.h:66, from mem/../statistics.h:155, from mem/hp_malloc.h:29, from mem/common.h:46, from mem/mem.h:37, from mod_fix.c:25: mem/../mem/shm_mem.h: In function ‘shm_threshold_check’: mem/../mem/shm_mem.h:250:5: error: ‘shm_block’ undeclared Fixes #1725 (cherry picked from commit 8d43873f42e6901e83a0cb5c1cae42bce7d0a886) 2019-06-05 Vlad Patrascu * [eaf3702b2] : clusterer: complete fix in commit 69aaa19 (cherry picked from commit 033ef1c00cbf1acd40e2f12f2ad144437b1b113c) 2019-06-04 Vlad Patrascu * [42cdc5feb] : 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 * [aad0d244a] : Remove old 'uri' module from packaging specs (cherry picked from commit 9f722979e1162cd82fbe6769fa91bfb4f0d64cd3) 2019-06-04 Bogdan-Andrei Iancu * [5e749c28d] : Removed obsolete file 2019-06-03 Bogdan-Andrei Iancu * [80a2bbd58] : Revert "Fixed missing len duplication" This reverts commit 764969a0eb06e4ec743ef6302e559a8ab0e80434. Further investigation is needed here (cherry picked from commit 7f2e7297037ea08bc6730e48e7c6214267eab99c) 2019-06-03 Bogdan-Andrei Iancu * [6e2b94c7a] : Fixed missing len duplication (cherry picked from commit 764969a0eb06e4ec743ef6302e559a8ab0e80434) 2019-06-03 Liviu Chircu * [720c9aba5] : httpd: Do not crash on empty-body POSTs (cherry picked from commit 69e5c8dbfd0b3f23339c1802f150dfd6fe737239) 2019-06-03 Razvan Crainea * [8c9704f6c] : 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 * [eac357184] : 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 * [c8845deaf] : 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 * [661e785fb] : Rebuild documentation 2019-05-31 Razvan Crainea * [45815de17] : 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 * [319b1ba22] : 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) 2019-05-31 Liviu Chircu * [9abf9fcf2] : 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) 2019-05-30 Dan Pascu * [705b49de7] : Renamed refreshWatchers MI command to refresh_watchers This was the only MI command that used camel-case notation. The refreshWatchers command is still available as an alias, for backwards compatibility, but it is considered deprecated and it will be removed in a future version. (cherry picked from commit 53fd3cb669cc69db9b333526c72bb27d78be2010) =========================== Release 3.0.0 ============================== 2019-05-29 Razvan Crainea * [48ed54354] : Makefiles: remove beta & debugging 2019-05-29 Liviu Chircu * [a2d6b1835] : Fix various documentation typos or shortcomings (cherry picked from commit 59f8505d3597c2848ca05f64879d97a8748997ea) 2019-05-29 Razvan Crainea * [2f63be9ea] : cgrates: fix resuming function for cgrates_cmd() Reported by Vasilios Tzanoudakis #1713 (cherry picked from commit 80ec779e004fd69f343a56deab18c98c1e3079f3) 2019-05-29 Razvan Crainea * [2fd249ccc] : 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 * [279ef5562] : More removal for opensipsunix hacks will always hunt you back :P (cherry picked from commit b14e87109fcb4a2c7bc395182a6457fcae372e7d) 2019-05-29 Bogdan-Andrei Iancu * [1ca1a6b6a] : [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 * [9fa666c5e] : rest_client: Fix string truncation compiler warnings Reported by Dan Pascu (cherry picked from commit a64d411d92a55b9348f9a3cfe98e08afbf4a6ec0) 2019-05-29 Bogdan-Andrei Iancu * [72c13cde6] : Dropped outdated & useless 'opensipsunix' (cherry picked from commit de3e16698ef28b4e382695990bbd3916a712a8ac) 2019-05-29 Bogdan-Andrei Iancu * [92f403e47] : Purging references to fifo_relay (cherry picked from commit 606f7b38a930a7556946740e429a241cbbc27c4b) 2019-05-29 Bogdan-Andrei Iancu * [a2f10ed58] : Dropped outdate & useless fifo relay (in php) (cherry picked from commit 56c04d386908b7cc16df3b6bdf4369d72e0ae4cc) 2019-05-29 Liviu Chircu * [23462ab3b] : 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 * [a589e10a0] : [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 * [7b8cea765] : [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 * [3f7a47104] : 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 * [629ac23a5] : rtpproxy: fix ipv6 handling of timeout socket Reported by Dan Pascu on mailing list (cherry picked from commit 3e2aed097518ca37862638d6dd7fe2b4ee3e583a) 2019-05-29 Razvan Crainea * [4c2c0483f] : rr: fix uninitialized warning (cherry picked from commit 566d8d4b1a6f2c7dc650c54e744440d5d05721c2) 2019-05-29 Vlad Patrascu * [3335de50e] : tls_mgm: fix a bug when matching the tls domain When matching a tls connection with a tls domain, use a null terminated sip domain filter string for fnmatch(). (cherry picked from commit 313b3fd5f29f3f124be9f8d630d8680f3c571273) 2019-05-29 Vlad Patrascu * [9d3e8197a] : clusterer: fix MI commands that dispatch other commands in cluster Adapt 'cluster_send_mi' and 'cluster_broadcast_mi' commands to the new MI interface. (cherry picked from commit 802ee8c79ac7e62e50346783250385c8a13dc128) 2019-05-29 Bogdan-Andrei Iancu * [2a8679089] : 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) 2019-05-29 Liviu Chircu * [9ca1e9c1d] : Remove various deprecated parameters * no longer accept deprecated flag modparams with integer values * tm: remove deprecated "fr_timer" and "fr_inv_timer" modparams (cherry picked from commit 382f6e3af688190eaa96f0fea82a7a0200749042) 2019-05-29 Alexey Vasilyev * [023eb2dc5] : Load chain of certificates and all CA certificates from DB (cherry picked from commit ad159240835932e5ea53dc5df914df44f1414e6a) 2019-05-29 Razvan Crainea * [ff3588c5b] : tls_mgm: make unused functions inline (cherry picked from commit b1b6f814e5589dc1a52b5486f05a017666fba1cd) 2019-05-28 Bogdan Andrei IANCU * [75282ba87] : 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 * [b59484aa4] : Merge pull request #1207 from dronord/ora_fetch fix and optimize oracle fetch (cherry picked from commit f7e45ba6e02cb1b130d5eef4285aadf879e948f8) 2019-05-28 Bogdan Andrei IANCU * [5c3c32d8d] : Merge pull request #1701 from vitalikvoip/2.4_fix_tcpchild_busy_counter Fix TCP connections load balancing to use all TCP workers evenly (cherry picked from commit 55d95ecae41274fbeafed9b39a6251cbb0aa47b1) 2019-05-28 Bogdan Andrei IANCU * [79c61aab2] : Merge pull request #1239 from dronord/ora_integer Oracle NUMBER not NUM in application (cherry picked from commit a6c9376e7514bb0e7c4a7061057d1a59a2e421c1) 2019-05-28 Bogdan-Andrei Iancu * [e81b92112] : [proto_tls] Added missing xreflabel in docs (cherry picked from commit 236d46619b4a021c8b4f98d35b0429e16337b48f) 2019-05-28 Bogdan-Andrei Iancu * [e72440cb1] : Added proto function for extra conn matching. A TCP-based protocol may export an API function for performing extra checks when comes to matching and re-using existing connections. For now the SSL using modules (TLS & WSS) are using the function to perform SSL cert matching, to avoid re-using connections with wrong SSL certificate. Fixes #1651 (cherry picked from commit e41465513c01a61b3ed33ad4eb71f91585a391a4) 2019-05-28 Razvan Crainea * [bde5d0b43] : packaging/debian: revert version to 3.0 Credits go to Ovidiu Sas for reporting this 2019-05-28 Ralf Zerres * [4b2a87e06] : osp: Fix module compilation - missing header (route_struct.h) - typo in array definition cmds[] (cherry picked from commit 30f57419493528f1856a571ccd1f8a3d8a74dc7c) 2019-05-28 Ralf Zerres * [daf597810] : doxygen: update config handling - comment out obeolete tags (as of doxygen v1.8.15) - update element list (include new objects, remove obsolete objects) - align in alphabetic order (decending) (cherry picked from commit 6f577a9a910e2aab15830c2abefcd95f2be04a88) 2019-05-28 Ralf Zerres * [9d61b8096] : packaging: supporting arch-linux - PKGBUILD.git: install package from github branch "master" Split packages for opensips (core,parser), modules and documentation - Makefile.conf.template: adopt and customize for linux environment - systemd: include service and tmpfiles - opensips.install: run script after package is installed on target system 2019-05-28 Razvan Crainea * [5af04ed61] : 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 * [32f56f7bf] : pi_http: fix LONGBLOB specification (cherry picked from commit d3fa736c0fef59a5da069220efba0eacdfeaf467) 2019-05-28 Razvan Crainea * [719dcea49] : 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 Liviu Chircu * [466fcc493] : usrloc: Never leave 'pinging_mode' uninitialized When omitting 'working_mode_preset', the 'pinging_mode' would remain uninitialized, possibly leading to future crashes in the contact pinging routine. Thanks to Răzvan Crainea for catching this! (cherry picked from commit 3919f0a8e67092221faa800928ffada80585e688) 2019-05-28 Dan Pascu * [f646ebe96] : More fixes for MI implementation errors (cherry picked from commit 0d3794f1b53d58461a385fc0f879fdf157e93f38) 2019-05-28 Vlad Patrascu * [c5032edca] : python, lua, perl: fix calling of module functions with regex params (cherry picked from commit c6a66430209582f23ad91869b24f05bb499cc118) 2019-05-28 Vlad Patrascu * [97a0f803d] : perl: fix calling of script module functions from perl code (cherry picked from commit f55b453a87020da226887109a4851cde857a57a0) 2019-05-28 Vlad Patrascu * [69be37c51] : lua: fix calling of script module functions from lua code (cherry picked from commit 4b43ab5245435395b3c21457dd72f00e0771c023) 2019-05-28 Vlad Patrascu * [f9640640b] : lua: fix function param buffers size in lua_exec() (cherry picked from commit 0cd1b9f1aae68d983c4e4297cabfa59567252f61) 2019-05-28 Vlad Patrascu * [6c35381cf] : python: fix calling of script module functions from python (cherry picked from commit 385d7c36c10d4c59b905d07ec69e803b054cabc4) 2019-05-28 Dan Pascu * [237a9eda9] : Fixed MI address_dump function (cherry picked from commit 51719c77e00881bcc707225e1d3cc3297ecc2a04) 2019-05-28 Razvan Crainea * [a9e0a9619] : 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-28 Dan Pascu * [f908c7953] : Fixed travis error (cherry picked from commit 394409a05d4193e064fc707b9df3a0155f0dd9c2) 2019-05-28 Dan Pascu * [e6ccb1cb0] : Use the size_t modifier to avoid an unnecessary cast (cherry picked from commit 8f49a55c03ea8a2340f56124567bbe610906df9d) 2019-05-28 Dan Pascu * [36c7507c8] : Fixed a few more warnings on 64 bit platforms (cherry picked from commit dfc4a8fa949b911b577ad8c03a37b4c56dee19ff) 2019-05-28 Dan Pascu * [557e7b7a0] : Fixed some compilation warnings (cherry picked from commit 66f0f60564445daed92f887d361888e048f2b060) 2019-05-28 Bogdan-Andrei Iancu * [18ecc3ab5] : Fixed compile error with SHM_EXTRA_STATS. Variable mismatch introduced with commit 24b0735076c20464f22047201674f78d184d72ee0 (cherry picked from commit 04be3350b315dc0e368369a7d0ad8933b73e3f07) 2019-05-28 Bogdan-Andrei Iancu * [f125a64c8] : Fixed handling of unset socket parameter. (cherry picked from commit a8a1c077c66350c7f4e9a9348642cab6ce43ae7a) 2019-05-28 Bogdan-Andrei Iancu * [46f4634ec] : Revert "tm: Fix crash in t_uac_dlg (uninitialized stack var)" This reverts commit f87c1857d55600ef6271a3de67709c3d92927af8. 2019-05-28 Bogdan-Andrei Iancu * [088ffa1ed] : Store in TCP conns the real ephemeral port and not the listening port Related to #1692 (cherry picked from commit 929c854b084cdbf9c6cf8e253f9fa60fcdec3c18) 2019-05-28 Bogdan-Andrei Iancu * [d3aa606ff] : 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-05-28 Bogdan-Andrei Iancu * [0bb6fb8a2] : 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-05-28 Dan Pascu * [d7c9445c8] : Be consistent with comments, spacing and NULL values (cherry picked from commit 74ff59dc07907a02f542d211fe311ed45fd9f770) 2019-05-27 Liviu Chircu * [f5a371ba3] : tm: Refactor code to use bulk shm operations (cherry picked from commit 216bf4df007b2b2fbba43d9a292cad1982691c35) 2019-05-27 Liviu Chircu * [6490dcce7] : shared memory: Add support for bulk operations This patch adds the following functions: * shm_malloc_bulk() * shm_free_bulk() Their purpose is to minimize contention, in situations where the developer needs to perform lots of consecutive shared memory operations. In this case, their usage is as follows: shm_lock(); shm_malloc_bulk(); shm_malloc_bulk(); ... shm_free_bulk(...); shm_malloc_bulk(); shm_free_bulk(...); ... shm_unlock(); (cherry picked from commit 3a921cc3744408bea05fc49a85da8e337df6d2d3) 2019-05-27 Liviu Chircu * [a433b47fb] : shared memory: Fix unsafe shm_free() when debugging When HP_MALLOC was included in the build, the F_MALLOC_DBG and Q_MALLOC_DBG allocators were broken, since their shm_free() operation was purely lockless and could corrupt the memory at any time. (cherry picked from commit 24b0735076c20464f22047201674f78d184d72e0) 2019-05-27 Liviu Chircu * [7f05359ce] : rpm memory: Fix rpm_free() locking * fix "shm_unlock()" copy-paste error * the ifdefs are unnecessary, as the rpm_lock/unlock macros do exactly that (cherry picked from commit 4bd078f11be38534a32aa66e65c931dbd386c607) 2019-05-27 Liviu Chircu * [0efb9acaf] : shm: Remove unused/deprecated functions (cherry picked from commit 6ecd6bfbb2c50ac1c2a78e160e80709b9deb7063) 2019-05-27 Razvan Crainea * [5ff0afeea] : 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) 2019-05-27 Razvan Crainea * [53e0c68d9] : add function that is ran after loading a module (cherry picked from commit c6fb6c96093ff2e81dda5746755594a64b5764ee) 2019-05-27 Dan Pascu * [15259fa5c] : Return statistics as numbers (cherry picked from commit 59ba0f7aab24b83816264a143f0c339a054400a6) 2019-05-26 OpenSIPS * [b3d7313b0] : Rebuild documentation 2019-05-24 Liviu Chircu * [1b56b753c] : opensips -h: Update the help message with the 3.0 additions (cherry picked from commit 1dae7c50fc336f98aee61ac54c7721d022c47711) 2019-05-24 Liviu Chircu * [ba6614da3] : core: Add new parameter ('pv_print_buf_size') This setting will be useful in case large bodies of text need to be expanded during a pseudo-variable format printing. For example: avp_db_query("SELECT $var(columns) FROM $var(table)", $avp(result)); ^ before this commit, the output of this format was capped at 1024 bytes Closes #1659 (cherry picked from commit a977a1c3426c0fbd6bdc2d5f60aff9461c465360) 2019-05-24 Liviu Chircu * [e83a116c1] : packaging: Allow specifying custom options with Debian systemd 2019-05-24 Nick Altmann * [aca078bd4] : Fix packaging (remove opensipsdbctl manpage) 2019-05-23 Liviu Chircu * [560c6b629] : tm doc: Fix broken t_uac_dlg example (cherry picked from commit d39f07d656e27412fb1db46f9629dab19efc0e41) 2019-05-23 Liviu Chircu * [1ca989b1a] : tm t_uac_dlg: Un-escape CRLF input from the "headers" param (cherry picked from commit 869a78eefd266263e610b74e1d28162561a3265c) 2019-05-23 Liviu Chircu * [f87c1857d] : tm: Fix crash in t_uac_dlg (uninitialized stack var) (cherry picked from commit 061b7584d3b132eddb74472050ea20cc8ed0478c) 2019-05-23 Razvan Crainea * [860ff3886] : 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 * [82a6dda98] : 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 * [2037ef398] : Better naming of attributes in tcp_list_conns output Replace Source/Destination with Remote/Local, to be easier to understand (cherry picked from commit dbdf02fc1be0fe62ad4a7863447d4a1493322e4e) 2019-05-23 Bogdan-Andrei Iancu * [c7e7c7c34] : 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 Liviu Chircu * [a6ddb2394] : Drop support for opensipsctl/opensipsdbctl These tools have been superseeded by the Python3-based opensips-cli. (cherry picked from commit 8a7abc05195fb4a29d5439871d7691c090c60d32) 2019-05-23 Liviu Chircu * [67ea21036] : Add 2.4 -> 3.0 MySQL DB migration scripts (cherry picked from commit fec5c1dc29817a3065d56678137348cf44e64c17) 2019-05-23 Bogdan-Andrei Iancu * [3b42db86b] : 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-23 Razvan Crainea * [d8d271fe6] : rtpproxy: invalidate buffer when malformed data is received Reported by gcuppers(GitHub) Close #1657 (cherry picked from commit cbd2e48e94a1842de7547b8f4218267e08798e2c) 2019-05-23 Razvan Crainea * [74d852e6f] : tracer: always try to load HEP protocol, if available (cherry picked from commit 739853968f1ac66f887f4f5318480f52267b9ebc) 2019-05-22 Liviu Chircu * [454d58da7] : str_strcmp: Silence noisy log (cherry picked from commit 2af6cef247ac20d41d67d48dc9fc98c8aa3f917f) 2019-05-22 Liviu Chircu * [1abc7804e] : dialog: Fix some buffer management bugs (cherry picked from commit fa651ce5942756400cec12da4b05428e3bede879) 2019-05-22 Vlad Patrascu * [8a6a7543a] : 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 Bogdan-Andrei Iancu * [55d650ba6] : Fix the returning if local route does not exist while doing RPC (cherry picked from commit 2ba271c6d07f8001dbcc468d8fe7aab6ca84b2e5) 2019-05-22 Bogdan-Andrei Iancu * [7acc72a0e] : Revert "dialog: send dlg command using rpc" This reverts commit ef9de0173f66727488e75d11e341d6b90b8fcf9a. This is not necessary as the RPC for local route is now done internally by t_uac() (cherry picked from commit c61278bf0ea09523aee95923cbbcc6d9fcdf9530) 2019-05-22 Bogdan-Andrei Iancu * [a3f56bed1] : Reverted d13f3eb61764a9246542f37b72482f2b27a0aaf2 Running local route via RPC is now supported intenally by t_uac() (cherry picked from commit 620fe1025b64d641b899cd8f309852dada7e35f0) 2019-05-22 Bogdan-Andrei Iancu * [5d73a60ce] : Re-implement t_uac() to do RPC if local_route cannot be locally run IF triggered from MI or non-SIP processes, the t_uac() cannot run local route (as such procs do not have the script anymore). Instead of various fixes in different parts of code / modules, let's address the problem internally in t_uac() - if needed and script is not available, run local route via RPC (while doing busy waiting) (cherry picked from commit 234a93e49c3b8e6264b65d48b3d622d126e42900) 2019-05-22 Bogdan-Andrei Iancu * [146a2501a] : Fixed some optional params for t_uac_dlg Side effect of the previos reverting (cherry picked from commit b7b9151178caf8c9776b824832034d1e13cdde21) 2019-05-22 Bogdan-Andrei Iancu * [2091c4cf5] : Revert the commits for RPC-zing the t_uac_dlg Reverted commits: 7df5d5e9ccd639a9f6035e64dadbc1e6b8a71758 8883a7c6caac5b4bed228381e2d64f53d7364b81 d0a043e89b2cdde1131a336964c0ade079269b4c The RPC-zing will be added internally to t_uac() function, transparent for the code using it. (cherry picked from commit e3a1b7c9bc899e6cf75cd3dd42f541d84eb505f5) 2019-05-22 Razvan Crainea * [17509ea47] : 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-22 Razvan Crainea * [3c605a81c] : mi: remove id from shm response This fixes asynchronous commands that store the id in the response as system allocated, but after that they are released as shm. This bug was afecting the mi_http fifo backend. (cherry picked from commit bb5b0c9e8b22f1cfbfdb3654a34eabbe76677a05) 2019-05-22 Liviu Chircu * [ff72d0c2e] : dialog: Do not replicate CSeq changes w/o a cluster (cherry picked from commit 65ae04c892d2869be4a56049adcea70666e97dc8) 2019-05-22 Bogdan-Andrei Iancu * [bd1719dcf] : Fix usage of buffered RR lumps Do not simply link the buffered lumps, but better clone them -> this will avoid a mixage of lump types (shm versus pkg) when using async() Fix for #1683 (cherry picked from commit 4bca4792d6543dfde5f472b158878942223625e8) 2019-05-21 Bogdan Andrei IANCU * [8825e5760] : Merge pull request #1699 from taozhiying/patch-1 LB will always to one dst when use lb_next (cherry picked from commit 2dd76a784450be9f85a18237c54a0b9fe945100b) 2019-05-21 Razvan Crainea * [07672d438] : 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 * [945386683] : dialog: duplicate out SDP when cloning a leg also, make sure the src_leg is used *after* enlarging the dialog legs, otherwise it might remain dangling (cherry picked from commit 46877f2ac16981177dd18ca0ea031efaf89bc8ac) 2019-05-21 Razvan Crainea * [0ab94bc2c] : 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 * [d57895f50] : Fixed bogus "return" in LOAD computing macro This affected only the 1 minute statistic. (cherry picked from commit af4d8479d3e2902019a9d209690362075c9120d9) 2019-05-21 Razvan Crainea * [4c3e39092] : dialog: unref dialog after updating cseq (cherry picked from commit 1c80acf868683f352f4ecf565fc160553e3a23ba) 2019-05-21 Bogdan-Andrei Iancu * [4e29ce925] : 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 Vlad Patrascu * [1fba583fe] : clusterer: add mising optional param flag for cluster_check_addr() Closes #1693 (cherry picked from commit 27507331d9bc895c8bbb36f0becfe12ad5c5cf69) 2019-05-20 Liviu Chircu * [2c7c202c9] : 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 * [631e31521] : 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 Razvan Crainea * [f672fe3f3] : clusterer: make sharing tag output array (cherry picked from commit 9d48ebc569b968fc855e1cd5c6fc53cd68c84369) 2019-05-20 Vlad Patrascu * [f8ff9e5ab] : 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 * [3c8e94552] : 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 * [9b47639e3] : Rebuild documentation 2019-05-17 Liviu Chircu * [3a5aec2e9] : 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 Vlad Patrascu * [91a6b190b] : clusterer: docs: fix outdated output examples for mi commands (cherry picked from commit 9842085494666558bf06cf55dab0717ad0b8139e) 2019-05-16 Bogdan-Andrei Iancu * [5ab0df974] : Un-butcher the custom reason string for 100 SIP reply Closes #1670 (cherry picked from commit bf130c524ec02e882c2da709b5c36b5d44719051) 2019-05-16 Bogdan-Andrei Iancu * [9fc4173ea] : 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 Bogdan-Andrei Iancu * [c78bdc47c] : Fix setting var to NULL on each iteration Closes #1697 Credits go to @razvancrainea (cherry picked from commit 20be5febe28229311c48102d9d4a189aec734c63) 2019-05-16 Razvan Crainea * [0f3b019f8] : dialog: initialize dst_leg before getting dlg (cherry picked from commit fb20eed07c5451c84a30230095d18baa38652b45) 2019-05-16 Razvan Crainea * [054fc3ef1] : dialog: add replication for cseq updates (cherry picked from commit 130e70421274c1e8ec716604372bc974d978556b) 2019-05-15 Bogdan-Andrei Iancu * [5561528a2] : Fix bogus offsetting in BIN package (cherry picked from commit 9703aa8c1309c5496060abadb6c7924b00c56c8e) 2019-05-15 Bogdan-Andrei Iancu * [675f56ef1] : Fix missing arming of re-invite pinging for replicated dialogs (cherry picked from commit 8014056434f92d99ac559a050f576f413f76ab2b) 2019-05-15 Razvan Crainea * [4545c04bb] : dialog: fix bogus operation introduced in previous commit Thanks go to travis and clang for spotting it :) (cherry picked from commit 63a8cf3f690cbbbb0bcdbd010479111c52ebc024) 2019-05-15 Razvan Crainea * [3c1a0695c] : dialog: add contact on second leg of challenge (cherry picked from commit c7b46c88d9ce7339776826a2c11990ac37b05466) 2019-05-15 Vlad Patrascu * [cac793685] : clusterer: fix output of clusterer_list_topology mi command (cherry picked from commit 1144de0ef6832efe7fadc077cf08bddedff4bdb3) 2019-05-15 Razvan Crainea * [44bcc967b] : dialog: update inbound body on request and replies (cherry picked from commit 40a1e5ababdacf77eb31ca7c29ec8323c1e8b503) 2019-05-15 Vlad Patrascu * [d0a204bf4] : dialog: do not accept replicated counters for local profiles (cherry picked from commit c5638e9bb58d6db6b428c3cd65502513b28817a5) 2019-05-15 Razvan Crainea * [e0c5bbb45] : dialog: provide content type for MI generated sequentials (cherry picked from commit ba7186fdbd3751fd8def486273da952688a741ec) 2019-05-15 Razvan Crainea * [89b4fc62d] : dialog: send dlg command using rpc (cherry picked from commit ef9de0173f66727488e75d11e341d6b90b8fcf9a) 2019-05-15 Razvan Crainea * [2d8c7fc06] : dialog: advertise proper contact when generating sequential (cherry picked from commit 37cf3c13b5a8f1bf3430aab761075a50b865668a) 2019-05-15 Bogdan-Andrei Iancu * [ebd512a62] : Fixed updating replicating advertised contact In a TH scenario, during the dialog replication, the advertised contact may change, if the interface/socket has a different name than on the original server (due tagging, advertising, etc) (cherry picked from commit c5d60c815096f67b9750c44390260343e7a792eb) 2019-05-15 Bogdan-Andrei Iancu * [7bb2fcc8b] : Fixed testing wrong flags for TH status (cherry picked from commit 80479f53d9d3c4da9019b85718bbfedd7fc091b7) 2019-05-15 Bogdan-Andrei Iancu * [852e629e4] : Fixed missing replication for the adv_contact This affected clustering scenarios where dialog module is used with Topo-Hiding and re-Invite pinging - the contact of the re-INVITE pings will be wrong on the nodes receiving the replicated dialog (cherry picked from commit 58343d45ac450f8bb15a6dbfa9da164ff944424b) 2019-05-15 Bogdan-Andrei Iancu * [8c67f2b95] : Add adv_contact ONLY if it is a local contact Extract the outgoing contact and store it as adv_contact ONLY is a self-point contact resulted from Topo Hiding. (cherry picked from commit bab898eb3a5bb2dc2dc0e28c2fa9e82cd63d1e6b) 2019-05-14 Vlad Patrascu * [48e5293fe] : 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 * [b90eb0da9] : tracer: use a valid info when tracing messages This commit prevents a crash when tracing a message without having a dialog or transaction created. Thanks go to Konrad Malewski (gitkoyot on GitHub) for reporting this! Close #1695 (cherry picked from commit 58a1e1bb43fbf4b500cacc3dd595fd7b28cd1922) 2019-05-14 Dan Pascu * [bbd5c7de2] : Fixed list_statistics MI command (cherry picked from commit 1e14844dde59d5b0dd2cee1a0b8c16735a4672df) 2019-05-13 Vlad Paiu * [455066ffa] : Fixed send_smpp_message breaking script It now returns a proper return code, as per the doc 2019-05-13 Vlad Paiu * [3bb6a07a0] : Fixed t_uac_dlg body sending 2019-05-13 Ovidiu Sas * [2c6fd8fff] : 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 * [0d032378c] : 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 * [ec24d6f2e] : Rebuild documentation 2019-05-12 Razvan Crainea * [cbfeb9687] : dbtext: use python2 explicit shebang This is needed for Fedora 30. Reported by Nick Altmann (cherry picked from commit ce7df8ac697cab164cf027f2cb7ef1784a08029f) 2019-05-10 Vlad Paiu * [ea01bba7a] : Fixed crash in case there's no SMPP connection 2019-05-10 Vlad Paiu * [7b23c14cf] : Add rabbitmq_consumer to the list of default excluded compilation 2019-05-09 Razvan Crainea * [178929791] : 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 * [ae0b4c90c] : dialog: extend the fix in commit 3abb14d to profiles without value (cherry picked from commit 3d081c88f4515ac0ed5424f43e6b5304b095ab85) 2019-05-08 Vlad Patrascu * [4eded22ef] : Complete the fix in commit: 3abb14d (cherry picked from commit 0256fadcc11f91781113980b867599e844acfe8b) 2019-05-08 Vlad Patrascu * [2d89ab24e] : 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 Vlad Patrascu * [7c2417d60] : textops: fix subst() functions fixups when using the '$' character (cherry picked from commit 6816fa91db9be1c07c1317184b379227292331bf) 2019-05-07 Vlad Patrascu * [2b7846b65] : Never pv-expand regex type function parameters (cherry picked from commit 52d1ac41fb5b34174576f0e6509c3289304a165f) 2019-05-07 Vlad Patrascu * [bff242eb1] : Fix the CMD_PARAM_NO_EXPAND parameter flag The fixup of parameters flagged wih CMD_PARAM_NO_EXPAND would fail if the string contained a '$' character not followed by a valid variable. (cherry picked from commit 307e8c8ad6ce9bd263a122c9e0a8164cf59a131e) 2019-05-07 Liviu Chircu * [016134408] : Preprocessor: Proper fix for the issue behind f1fb2bd339 The actual issue was related to the fact that most stream-oriented GNU tools (cat, sed, m4, etc.) work by managing a continuous flow of reads from the input source and writes to the output one, until the input file ending is reached. This technique allows large amounts of data to be transformed without requiring any intermediary, equally large buffers. This patch creates the matching write/read looping logic into OpenSIPS, as it both feeds these preprocessing tools with the config file input, and consumes their output, unlocking them to process more bytes. Thanks to Răzvan Crainea for spotting the problem! (cherry picked from commit 206af742fbb4119304f110037dd8c97e8439d688) 2019-05-06 Vlad Patrascu * [363ecea3c] : opensipsdbctl: fix tracer module name in EXTRA_MODULES var (cherry picked from commit 9014550fa36fab440950a16ca137be7b3f88e89e) 2019-05-06 Liviu Chircu * [c8347ec14] : Fix build on CentOS 6.x Reported by Nick Altmann (cherry picked from commit f06f948ded2c197db314e6c8a4413bc58013cfce) 2019-05-05 OpenSIPS * [2e7b25e56] : Rebuild documentation 2019-05-03 Fabian Gast * [50352c247] : Remove quotes breaking default config (cherry picked from commit 9f2b776b2895494bb029667d0adf6a109290fd83) 2019-05-03 Vlad Patrascu * [462a3395e] : dispatcher: fix replication of the probing state (cherry picked from commit 27b899be021d0059bb30142ce475c7540cd1c8c1) 2019-05-03 Vlad Patrascu * [f0f6cd7ba] : statistics: fix crash in update_stat(), reset_stat() (cherry picked from commit 89127cc95a007cf7fe6560f8202d23a18052d1b6) 2019-05-02 Dan Pascu * [656bf6956] : Revert "tracer: always load the trace api" This reverts commit 779130478937fe92fcac145205dc4039c1126772 which forced one to load proto_hep and define at least 1 listener for it even when HEP was not used, in order to have the tracer module load. (cherry picked from commit 08cff3486e8ad9e7f4fc52cdb202c3201a3435ae) 2019-05-02 Dan Pascu * [b6d6fc913] : Fixed error in handling fcntl's output (which is an int) (cherry picked from commit 216dc40a0339d9e821de0b05c56f3f7cd1da7531) 2019-05-02 Liviu Chircu * [95c853998] : preprocessor: Improve handling for large input files Reported by Vasilios Tzanoudakis (cherry picked from commit f1fb2bd3395738dc3ec1711c7c512e3a361b4ccd) 2019-05-01 Liviu Chircu * [89535e02d] : preprocessor: Fix off-by-one buffer overflows Reported by Dan Pascu (cherry picked from commit 03de04f29f26d012beee65d4432dbfbeff265b00) 2019-05-01 Dan Pascu * [3efc8bd4c] : sipmsgops: Fixed is_present_hf for non-standard headers (cherry picked from commit 0e1d4f3416ebc5f55ee44c315e93d15a0cbe5cc1) 2019-05-01 Dan Pascu * [857f034ad] : aaa_radius: Added back aaa_bind_api to the command interface (cherry picked from commit cadac89b47f886d55ec98a301a9d276a75dc3782) 2019-05-01 Razvan Crainea * [93c3942aa] : tracer: always load the trace api (cherry picked from commit 779130478937fe92fcac145205dc4039c1126772) 2019-05-01 Nick Altmann * [3ff6d0480] : DEB packaging: remove m4 support 2019-05-01 Nick Altmann * [dc20f8b51] : RPM packaging: remove m4 support 2019-04-30 Dan Pascu * [b8921cfcf] : group: Fixed buffer overflow caused by missing end structure marker (cherry picked from commit 67a1a0218dc85a24a5690e3b3fd7004b2c880405) 2019-04-30 Dan Pascu * [2a7a69fa6] : Allow specifying auto scaling profile with udp_workers (cherry picked from commit 04175e5728b3ab2586502627f54aaab2db440999) 2019-04-30 Dan Pascu * [52e51c548] : Fixed typos (cherry picked from commit 80ce8f9888a243266073ae11ffaeeb984aca4d4c) 2019-04-29 Razvan Crainea * [a115114a0] : dialog: update SDP under lock (cherry picked from commit 57e4d59133cdcebfce2ecb1267d26c549089fcd0) 2019-04-28 OpenSIPS * [d5ec3b9d0] : Rebuild documentation 2019-04-26 Razvan Crainea * [f8d59ef8d] : tm: proper return code for replicated CANCEL Thanks go to 46Labs for reporting this (cherry picked from commit 5c7dd8ab8ea7fe378204d33dafe14434412404b5) 2019-04-26 Razvan Crainea * [c571f60ca] : tm: fix CANCEL replication when CANCEL is malformed Thanks fo to 46Labs for reporting this (cherry picked from commit 9f050c95f66ff44fd657a7266ce4acaad572e5c6) 2019-04-25 Bogdan-Andrei Iancu * [c51b1b8ba] : Fix wrong quoting on integer parameter (cherry picked from commit d5b13700648b47283d1b46c7bd7ddc12f37c3ddc) 2019-04-25 Vlad Patrascu * [4e5cb3903] : Remove leftover commented code in several modules (cherry picked from commit 03e18087b209d79a258403380c3d963402bf3cd2) 2019-04-25 Vlad Patrascu * [e9ea1faed] : Align docs to latest changes in module functions parameters (cherry picked from commit e456ddd81a7064203c82723b87868b6005866765) 2019-04-25 Vlad Patrascu * [9642dce0d] : proto hep: fix parameters in correlate() cmd export (cherry picked from commit 26ab860aae248c483a47ad9a711909f667b38e86) 2019-04-24 Liviu Chircu * [c73b0d2c4] : TCP: Fix confusing log on connect timeout (cherry picked from commit b7af3d764118218e88e59aa56d4da8c1de7a4d21) 2019-04-24 Walter Doekes * [21dae83c2] : Fix mantainer-clean -> maintainer-clean typo (cherry picked from commit 884f6305313dfdd6846b5c21c175a060c2fd263d) 2019-04-24 Walter Doekes * [8f7f8f38c] : 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 commit 94c50b7811e1af69ef1400c531b0b6196e3ffb39) 2019-04-24 Bogdan-Andrei Iancu * [88b0b8854] : Fixed counting of extra UDP procs when UDP is not used Reported by Konrad Malewski (cherry picked from commit 388ab01b51191c0b5832228ea3450b088b592b52) 2019-04-24 Liviu Chircu * [9c470cba6] : cachedb URLs: Complete commit 887f9f0e032 * do not parse "schema://host:port/" as "" database (keep it NULL) (otherwise, this breaks Redis) * do not treat similar URLs with differing options as the same URL * pkg_free() the options chunks at shutdown Reported by Ryan Bullock Fixes #1677 (cherry picked from commit f1c5a7ea3c1c441262580de768197d53e6ddb9dc) 2019-04-23 Vlad Patrascu * [f5cf2a397] : rtpproxy: fix parameter types for rtpproxy_stream2uac/uas() (cherry picked from commit 5bb4e9c8f1a4e4616f5855402d8d82b05c7cfb13) 2019-04-23 Vlad Patrascu * [20fbdd23e] : rtpengine: fix parameter type for rtpengine_start_recording() (cherry picked from commit db0a391e125cddfa7b12c7adda3b2d5400c39514) 2019-04-23 Razvan Crainea * [f7eef61cd] : tracer: complete fix for previous crash (cherry picked from commit daaf39059ccec3b9a11b520c199e8e39ad4cbe75) 2019-04-23 Vlad Patrascu * [bfdb931cb] : b2b_logic: fix first parameter fixup for b2b_init_request() Thanks to Konrad Malewski for reporting (cherry picked from commit f0dae11019d1753400fb28b3190fe9045e9db470) 2019-04-23 Liviu Chircu * [13bab4876] : 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 * [e11625552] : 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 Liviu Chircu * [169074167] : group: Align docs to latest changes (cherry picked from commit a22c37e81512476c2d55c43d5ff1df413f85b6b6) 2019-04-23 Razvan Crainea * [610d95811] : tracer: prevent crash when tracing context is not created (cherry picked from commit b80478b80dc75f7ffdf20e848a0fb4ba2cc82a1b) 2019-04-23 Bogdan-Andrei Iancu * [39cc3f96d] : Updated copyright years 2019-04-23 Bogdan-Andrei Iancu * [e70a5755c] : Fixed copy paste error in DB schema section name (cherry picked from commit c15abd769101eb517bedc9a9c544574af975b53f) 2019-04-23 Bogdan-Andrei Iancu * [cfa7e3f06] : Removed empty DB schema section Related to #1672 (cherry picked from commit 116860e458a717123ff48e77af12fb34723cf2f3) 2019-04-23 Vlad Patrascu * [5d96b65ab] : ratelimit: fix parameter type for rl_check() (cherry picked from commit 07b476b05abec76f48494c467d3de48f891b2a13) 2019-04-22 Liviu Chircu * [dfea2609e] : avpops, exec: Align docs to latest changes exec: also remove some deprecated (and unused code) (cherry picked from commit 085dbc18e2eaf14051c6ea67428891a13d9ec1ba) 2019-04-22 Dan Pascu * [1d408c970] : enum: Reworded description in documentation (cherry picked from commit 09edd15c9754757915132e4905dbd56f069f64ba) 2019-04-22 Liviu Chircu * [f0b2a7c68] : enum: Move the "number" optional parameter last This preserves the backwards-compatibility of enum_query(). Additionally, "number" is the least used of the optional paramters, so it makes more sense for it to go last. Suggested by Dan Pascu (cherry picked from commit a1da98cb1b045f9078a04531c1547f2ad82f650d) 2019-04-22 Liviu Chircu * [f3aa797f4] : cfgutils, json: Align docs to latest changes (cherry picked from commit 687b3e4c3e6d80e1668386cec082eb54be7fa7d5) 2019-04-22 Dan Pascu * [c37677756] : Changed log message from info to debug (cherry picked from commit b35cf35859efdab4bd6a542c919b3512f9f0944a) 2019-04-21 OpenSIPS * [9b7327efb] : Rebuild documentation 2019-04-20 Liviu Chircu * [88e949940] : lexer: Fix multi-line string parsing Multi-line strings were broken by the generic preprocessing support, as both double and single quoted strings have their own lexing rules, which take precedence over the "consume preprocessor tokens" lexer rule. Reported by Dan Pascu (cherry picked from commit 4b33da67ffd0f1a5b2507939ee0cf440e9ba00f9) 2019-04-19 Liviu Chircu * [6374b066c] : cachedb_mongodb: Allow specifying URL options This patch allows script writers to append essential connect string options near the end of a cachedb_mongodb URL, such as: * ?replSet=mongo-set-1 * ?readConcernLevel=local Consult the MongoDB connect string docs for a full listing of available URL options. Reported by Vasilios Tzanoudakis Fixes #1656 (cherry picked from commit 887f9f0e032da4bf092540cb92369a6daee90ffa) 2019-04-19 Vlad Patrascu * [ce8b709ea] : usrloc: update docs regarding supported NoSQL databases (cherry picked from commit 32d3163d9bb3a98497c1671bbb7ffc0f034b69fb) 2019-04-19 Razvan Crainea * [04ed88af8] : mem: trigger error when setting pkg allocator with sys malloc (cherry picked from commit 3b83d36c9fd47c13d862dbd866b921dc14b669c3) 2019-04-19 Razvan Crainea * [b277ddf0b] : tracer: fix module to allow multiple trace instances (cherry picked from commit 3b196a9da41b85c3872b21336c2aea8d3dc3a2ec) 2019-04-19 Dan Pascu * [bacc49563] : Fixed some typos (cherry picked from commit 67374892acbccc79758f22499e9ce32c68d7b258) 2019-04-19 Nick Altmann * [b8ed4fac6] : RPM: add rabbitmq_consumer module 2019-04-19 Nick Altmann * [f66702312] : RPM spec: fix bogus date 2019-04-18 Liviu Chircu * [e77eebb16] : emergency docs: Fix misclosed section (cherry picked from commit dd16f66fa658a4c7882900d6eba6ca19d6a9cb18) 2019-04-18 Liviu Chircu * [fa256ab5d] : enum: Significant cleanup * merge enum_pv_query() into enum_query() * fix potential segfaults in all functions (due to param migration) * bring the docs up-to-date (cherry picked from commit 3e21553e7d458b6ccc86662516761bff9af70ba0) 2019-04-18 Vlad Patrascu * [e0a27c6e9] : load_balancer: fix parameter type in lb_start() command export (cherry picked from commit f5875b575ed2166898232be9e1105b8e9267f3b5) 2019-04-18 Dan Pascu * [b3cc53dff] : Fixed segfault when updating stats in _stop_expire_timer (cherry picked from commit 24c5d82989fe77eba57f01f9fd2d84acc7223bac) 2019-04-18 Razvan Crainea * [9b6a3c313] : dialog: add documentation for dlg_send_sequential (cherry picked from commit 63984dedcd0b97c9ee385052ea9c9238df776cde) 2019-04-18 Dan Pascu * [4213fe263] : enum: Fixed function name (cherry picked from commit 3a6ad9a08f225a05b28427df647fb618e98b354d) 2019-04-18 Liviu Chircu * [4e418033a] : mem: Fix typos (cherry picked from commit 531a7225eba0ed3a5509d9e9e48106baaaf5789d) 2019-04-18 Razvan Crainea * [2b4d551dc] : mem: allow func_mem usage for system malloc too Reported by Dan Pascu on Devel user list (cherry picked from commit e82dbdeff1dc2b3d47fc9ce9d72c291d57b42f95) 2019-04-18 Liviu Chircu * [830200282] : dialog: Fix uninitialized variable This patch prevents broadcast_profiles() from sometimes starting off by broadcasting an empty packet (should it read a large, positive integer off the stack garbage), then proceeding normally. Reported by Bogdan-Andrei Iancu (cherry picked from commit 8e42ffaa42a4a486affe9e4d61b48733747ca58e) 2019-04-18 Liviu Chircu * [08dfb8d29] : usrloc: Fix a bug in MI "ul_dump" output structure When the code was ported to the new MI interface, the AoR KV-Store ended up being moved to the wrong place, effectively crashing on 0 contacts. (cherry picked from commit 6929c4ad5ad909e2055dd9a50458a5a1ac4d4fb5) 2019-04-17 Dan Pascu * [b911c070c] : Moved rabbitmq_consumer module to the opensips-rabbitmq-modules debian package (cherry picked from commit f2c9ed67602a03022961474b1184a1ab2f51829f) 2019-04-17 Vlad Patrascu * [4128ca881] : Fix bad modparam names and doc examples caused by mi modules rename (cherry picked from commit 4af34c03e75a6c48c9784bd002024ccaf23bf7e3) 2019-04-17 Dan Pascu * [9d90c75f1] : Compacted structure initialization (cherry picked from commit 2ede3c099bcdb05b28ea932e3d590bca70c6d109) 2019-04-17 Dan Pascu * [eae85a46d] : Debian priority Extra was replaced by Optional (cherry picked from commit f9e2a42847ceb3b9548eb2f112760b0dd1889bde) 2019-04-17 Dan Pascu * [45b7cf23e] : Removed unnecessary line continuation (cherry picked from commit 57f16c969abe1a37dc73c9058e3bf0070e163815) 2019-04-17 Razvan Crainea * [911a4cd42] : fix packaging for 3.0 Thanks go to Dan Pascu for reporting this 2019-04-17 Dan Pascu * [1d3b54d29] : Removed opensips-console debian package from control file 2019-04-17 Dan Pascu * [65bffaf0c] : Updated documentation with new function signatures (cherry picked from commit b569899ccad11f6b803ad117054dfcbb38d8d871) 2019-04-17 Dan Pascu * [75b4ff2ce] : Compacted structure (cherry picked from commit 16855cfd9c214d68348b71c94c0bd503979cfe02) 2019-04-17 Dan Pascu * [aa651c7af] : Be consistent with comment format (cherry picked from commit 2f18c51aa93e3691416c543408df9f790773c5f7) 2019-04-17 Dan Pascu * [112ff1228] : Updated copyright (cherry picked from commit 60477618b3b81aee0f6a9bc660e0fdd19017d6a0) 2019-04-17 Dan Pascu * [c4a9424a5] : Removed commented out code (cherry picked from commit dd6ec9e4f330d41b2501ca00037e71aec621076c) 2019-04-17 Dan Pascu * [8a8e384f4] : Fixed signatures for system memory allocator functions (cherry picked from commit 539ee1544679d14991a4407541db592f428d2b47) 2019-04-17 Liviu Chircu * [a28edab24] : tracer: Fix doc build (cherry picked from commit 0b592f7febe34d5b28994a0a3d024027a081eb1c) 2019-04-16 Razvan Crainea * [67c51accb] : add ChangeLog for 3.0 2019-05-29 Razvan Crainea * [48ed54354] : Makefiles: remove beta & debugging 2019-05-29 Liviu Chircu * [a2d6b1835] : Fix various documentation typos or shortcomings (cherry picked from commit 59f8505d3597c2848ca05f64879d97a8748997ea) 2019-05-29 Razvan Crainea * [2f63be9ea] : cgrates: fix resuming function for cgrates_cmd() Reported by Vasilios Tzanoudakis #1713 (cherry picked from commit 80ec779e004fd69f343a56deab18c98c1e3079f3) 2019-05-29 Razvan Crainea * [2fd249ccc] : 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 * [279ef5562] : More removal for opensipsunix hacks will always hunt you back :P (cherry picked from commit b14e87109fcb4a2c7bc395182a6457fcae372e7d) 2019-05-29 Bogdan-Andrei Iancu * [1ca1a6b6a] : [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 * [9fa666c5e] : rest_client: Fix string truncation compiler warnings Reported by Dan Pascu (cherry picked from commit a64d411d92a55b9348f9a3cfe98e08afbf4a6ec0) 2019-05-29 Bogdan-Andrei Iancu * [72c13cde6] : Dropped outdated & useless 'opensipsunix' (cherry picked from commit de3e16698ef28b4e382695990bbd3916a712a8ac) 2019-05-29 Bogdan-Andrei Iancu * [92f403e47] : Purging references to fifo_relay (cherry picked from commit 606f7b38a930a7556946740e429a241cbbc27c4b) 2019-05-29 Bogdan-Andrei Iancu * [a2f10ed58] : Dropped outdate & useless fifo relay (in php) (cherry picked from commit 56c04d386908b7cc16df3b6bdf4369d72e0ae4cc) 2019-05-29 Liviu Chircu * [23462ab3b] : 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 * [a589e10a0] : [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 * [7b8cea765] : [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 * [3f7a47104] : 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 * [629ac23a5] : rtpproxy: fix ipv6 handling of timeout socket Reported by Dan Pascu on mailing list (cherry picked from commit 3e2aed097518ca37862638d6dd7fe2b4ee3e583a) 2019-05-29 Razvan Crainea * [4c2c0483f] : rr: fix uninitialized warning (cherry picked from commit 566d8d4b1a6f2c7dc650c54e744440d5d05721c2) 2019-05-29 Vlad Patrascu * [3335de50e] : tls_mgm: fix a bug when matching the tls domain When matching a tls connection with a tls domain, use a null terminated sip domain filter string for fnmatch(). (cherry picked from commit 313b3fd5f29f3f124be9f8d630d8680f3c571273) 2019-05-29 Vlad Patrascu * [9d3e8197a] : clusterer: fix MI commands that dispatch other commands in cluster Adapt 'cluster_send_mi' and 'cluster_broadcast_mi' commands to the new MI interface. (cherry picked from commit 802ee8c79ac7e62e50346783250385c8a13dc128) 2019-05-29 Bogdan-Andrei Iancu * [2a8679089] : 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) 2019-05-29 Liviu Chircu * [9ca1e9c1d] : Remove various deprecated parameters * no longer accept deprecated flag modparams with integer values * tm: remove deprecated "fr_timer" and "fr_inv_timer" modparams (cherry picked from commit 382f6e3af688190eaa96f0fea82a7a0200749042) 2019-05-29 Alexey Vasilyev * [023eb2dc5] : Load chain of certificates and all CA certificates from DB (cherry picked from commit ad159240835932e5ea53dc5df914df44f1414e6a) 2019-05-29 Razvan Crainea * [ff3588c5b] : tls_mgm: make unused functions inline (cherry picked from commit b1b6f814e5589dc1a52b5486f05a017666fba1cd) 2019-05-28 Bogdan Andrei IANCU * [75282ba87] : 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 * [b59484aa4] : Merge pull request #1207 from dronord/ora_fetch fix and optimize oracle fetch (cherry picked from commit f7e45ba6e02cb1b130d5eef4285aadf879e948f8) 2019-05-28 Bogdan Andrei IANCU * [5c3c32d8d] : Merge pull request #1701 from vitalikvoip/2.4_fix_tcpchild_busy_counter Fix TCP connections load balancing to use all TCP workers evenly (cherry picked from commit 55d95ecae41274fbeafed9b39a6251cbb0aa47b1) 2019-05-28 Bogdan Andrei IANCU * [79c61aab2] : Merge pull request #1239 from dronord/ora_integer Oracle NUMBER not NUM in application (cherry picked from commit a6c9376e7514bb0e7c4a7061057d1a59a2e421c1) 2019-05-28 Bogdan-Andrei Iancu * [e81b92112] : [proto_tls] Added missing xreflabel in docs (cherry picked from commit 236d46619b4a021c8b4f98d35b0429e16337b48f) 2019-05-28 Bogdan-Andrei Iancu * [e72440cb1] : Added proto function for extra conn matching. A TCP-based protocol may export an API function for performing extra checks when comes to matching and re-using existing connections. For now the SSL using modules (TLS & WSS) are using the function to perform SSL cert matching, to avoid re-using connections with wrong SSL certificate. Fixes #1651 (cherry picked from commit e41465513c01a61b3ed33ad4eb71f91585a391a4) 2019-05-28 Razvan Crainea * [bde5d0b43] : packaging/debian: revert version to 3.0 Credits go to Ovidiu Sas for reporting this 2019-05-28 Ralf Zerres * [4b2a87e06] : osp: Fix module compilation - missing header (route_struct.h) - typo in array definition cmds[] (cherry picked from commit 30f57419493528f1856a571ccd1f8a3d8a74dc7c) 2019-05-28 Ralf Zerres * [daf597810] : doxygen: update config handling - comment out obeolete tags (as of doxygen v1.8.15) - update element list (include new objects, remove obsolete objects) - align in alphabetic order (decending) (cherry picked from commit 6f577a9a910e2aab15830c2abefcd95f2be04a88) 2019-05-28 Ralf Zerres * [9d61b8096] : packaging: supporting arch-linux - PKGBUILD.git: install package from github branch "master" Split packages for opensips (core,parser), modules and documentation - Makefile.conf.template: adopt and customize for linux environment - systemd: include service and tmpfiles - opensips.install: run script after package is installed on target system 2019-05-28 Razvan Crainea * [5af04ed61] : 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 * [32f56f7bf] : pi_http: fix LONGBLOB specification (cherry picked from commit d3fa736c0fef59a5da069220efba0eacdfeaf467) 2019-05-28 Razvan Crainea * [719dcea49] : 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 Liviu Chircu * [466fcc493] : usrloc: Never leave 'pinging_mode' uninitialized When omitting 'working_mode_preset', the 'pinging_mode' would remain uninitialized, possibly leading to future crashes in the contact pinging routine. Thanks to Răzvan Crainea for catching this! (cherry picked from commit 3919f0a8e67092221faa800928ffada80585e688) 2019-05-28 Dan Pascu * [f646ebe96] : More fixes for MI implementation errors (cherry picked from commit 0d3794f1b53d58461a385fc0f879fdf157e93f38) 2019-05-28 Vlad Patrascu * [c5032edca] : python, lua, perl: fix calling of module functions with regex params (cherry picked from commit c6a66430209582f23ad91869b24f05bb499cc118) 2019-05-28 Vlad Patrascu * [97a0f803d] : perl: fix calling of script module functions from perl code (cherry picked from commit f55b453a87020da226887109a4851cde857a57a0) 2019-05-28 Vlad Patrascu * [69be37c51] : lua: fix calling of script module functions from lua code (cherry picked from commit 4b43ab5245435395b3c21457dd72f00e0771c023) 2019-05-28 Vlad Patrascu * [f9640640b] : lua: fix function param buffers size in lua_exec() (cherry picked from commit 0cd1b9f1aae68d983c4e4297cabfa59567252f61) 2019-05-28 Vlad Patrascu * [6c35381cf] : python: fix calling of script module functions from python (cherry picked from commit 385d7c36c10d4c59b905d07ec69e803b054cabc4) 2019-05-28 Dan Pascu * [237a9eda9] : Fixed MI address_dump function (cherry picked from commit 51719c77e00881bcc707225e1d3cc3297ecc2a04) 2019-05-28 Razvan Crainea * [a9e0a9619] : 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-28 Dan Pascu * [f908c7953] : Fixed travis error (cherry picked from commit 394409a05d4193e064fc707b9df3a0155f0dd9c2) 2019-05-28 Dan Pascu * [e6ccb1cb0] : Use the size_t modifier to avoid an unnecessary cast (cherry picked from commit 8f49a55c03ea8a2340f56124567bbe610906df9d) 2019-05-28 Dan Pascu * [36c7507c8] : Fixed a few more warnings on 64 bit platforms (cherry picked from commit dfc4a8fa949b911b577ad8c03a37b4c56dee19ff) 2019-05-28 Dan Pascu * [557e7b7a0] : Fixed some compilation warnings (cherry picked from commit 66f0f60564445daed92f887d361888e048f2b060) 2019-05-28 Bogdan-Andrei Iancu * [18ecc3ab5] : Fixed compile error with SHM_EXTRA_STATS. Variable mismatch introduced with commit 24b0735076c20464f22047201674f78d184d72ee0 (cherry picked from commit 04be3350b315dc0e368369a7d0ad8933b73e3f07) 2019-05-28 Bogdan-Andrei Iancu * [f125a64c8] : Fixed handling of unset socket parameter. (cherry picked from commit a8a1c077c66350c7f4e9a9348642cab6ce43ae7a) 2019-05-28 Bogdan-Andrei Iancu * [46f4634ec] : Revert "tm: Fix crash in t_uac_dlg (uninitialized stack var)" This reverts commit f87c1857d55600ef6271a3de67709c3d92927af8. 2019-05-28 Bogdan-Andrei Iancu * [088ffa1ed] : Store in TCP conns the real ephemeral port and not the listening port Related to #1692 (cherry picked from commit 929c854b084cdbf9c6cf8e253f9fa60fcdec3c18) 2019-05-28 Bogdan-Andrei Iancu * [d3aa606ff] : 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-05-28 Bogdan-Andrei Iancu * [0bb6fb8a2] : 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-05-28 Dan Pascu * [d7c9445c8] : Be consistent with comments, spacing and NULL values (cherry picked from commit 74ff59dc07907a02f542d211fe311ed45fd9f770) 2019-05-27 Liviu Chircu * [f5a371ba3] : tm: Refactor code to use bulk shm operations (cherry picked from commit 216bf4df007b2b2fbba43d9a292cad1982691c35) 2019-05-27 Liviu Chircu * [6490dcce7] : shared memory: Add support for bulk operations This patch adds the following functions: * shm_malloc_bulk() * shm_free_bulk() Their purpose is to minimize contention, in situations where the developer needs to perform lots of consecutive shared memory operations. In this case, their usage is as follows: shm_lock(); shm_malloc_bulk(); shm_malloc_bulk(); ... shm_free_bulk(...); shm_malloc_bulk(); shm_free_bulk(...); ... shm_unlock(); (cherry picked from commit 3a921cc3744408bea05fc49a85da8e337df6d2d3) 2019-05-27 Liviu Chircu * [a433b47fb] : shared memory: Fix unsafe shm_free() when debugging When HP_MALLOC was included in the build, the F_MALLOC_DBG and Q_MALLOC_DBG allocators were broken, since their shm_free() operation was purely lockless and could corrupt the memory at any time. (cherry picked from commit 24b0735076c20464f22047201674f78d184d72e0) 2019-05-27 Liviu Chircu * [7f05359ce] : rpm memory: Fix rpm_free() locking * fix "shm_unlock()" copy-paste error * the ifdefs are unnecessary, as the rpm_lock/unlock macros do exactly that (cherry picked from commit 4bd078f11be38534a32aa66e65c931dbd386c607) 2019-05-27 Liviu Chircu * [0efb9acaf] : shm: Remove unused/deprecated functions (cherry picked from commit 6ecd6bfbb2c50ac1c2a78e160e80709b9deb7063) 2019-05-27 Razvan Crainea * [5ff0afeea] : 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) 2019-05-27 Razvan Crainea * [53e0c68d9] : add function that is ran after loading a module (cherry picked from commit c6fb6c96093ff2e81dda5746755594a64b5764ee) 2019-05-27 Dan Pascu * [15259fa5c] : Return statistics as numbers (cherry picked from commit 59ba0f7aab24b83816264a143f0c339a054400a6) 2019-05-26 OpenSIPS * [b3d7313b0] : Rebuild documentation 2019-05-24 Liviu Chircu * [1b56b753c] : opensips -h: Update the help message with the 3.0 additions (cherry picked from commit 1dae7c50fc336f98aee61ac54c7721d022c47711) 2019-05-24 Liviu Chircu * [ba6614da3] : core: Add new parameter ('pv_print_buf_size') This setting will be useful in case large bodies of text need to be expanded during a pseudo-variable format printing. For example: avp_db_query("SELECT $var(columns) FROM $var(table)", $avp(result)); ^ before this commit, the output of this format was capped at 1024 bytes Closes #1659 (cherry picked from commit a977a1c3426c0fbd6bdc2d5f60aff9461c465360) 2019-05-24 Liviu Chircu * [e83a116c1] : packaging: Allow specifying custom options with Debian systemd 2019-05-24 Nick Altmann * [aca078bd4] : Fix packaging (remove opensipsdbctl manpage) 2019-05-23 Liviu Chircu * [560c6b629] : tm doc: Fix broken t_uac_dlg example (cherry picked from commit d39f07d656e27412fb1db46f9629dab19efc0e41) 2019-05-23 Liviu Chircu * [1ca989b1a] : tm t_uac_dlg: Un-escape CRLF input from the "headers" param (cherry picked from commit 869a78eefd266263e610b74e1d28162561a3265c) 2019-05-23 Liviu Chircu * [f87c1857d] : tm: Fix crash in t_uac_dlg (uninitialized stack var) (cherry picked from commit 061b7584d3b132eddb74472050ea20cc8ed0478c) 2019-05-23 Razvan Crainea * [860ff3886] : 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 * [82a6dda98] : 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 * [2037ef398] : Better naming of attributes in tcp_list_conns output Replace Source/Destination with Remote/Local, to be easier to understand (cherry picked from commit dbdf02fc1be0fe62ad4a7863447d4a1493322e4e) 2019-05-23 Bogdan-Andrei Iancu * [c7e7c7c34] : 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 Liviu Chircu * [a6ddb2394] : Drop support for opensipsctl/opensipsdbctl These tools have been superseeded by the Python3-based opensips-cli. (cherry picked from commit 8a7abc05195fb4a29d5439871d7691c090c60d32) 2019-05-23 Liviu Chircu * [67ea21036] : Add 2.4 -> 3.0 MySQL DB migration scripts (cherry picked from commit fec5c1dc29817a3065d56678137348cf44e64c17) 2019-05-23 Bogdan-Andrei Iancu * [3b42db86b] : 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-23 Razvan Crainea * [d8d271fe6] : rtpproxy: invalidate buffer when malformed data is received Reported by gcuppers(GitHub) Close #1657 (cherry picked from commit cbd2e48e94a1842de7547b8f4218267e08798e2c) 2019-05-23 Razvan Crainea * [74d852e6f] : tracer: always try to load HEP protocol, if available (cherry picked from commit 739853968f1ac66f887f4f5318480f52267b9ebc) 2019-05-22 Liviu Chircu * [454d58da7] : str_strcmp: Silence noisy log (cherry picked from commit 2af6cef247ac20d41d67d48dc9fc98c8aa3f917f) 2019-05-22 Liviu Chircu * [1abc7804e] : dialog: Fix some buffer management bugs (cherry picked from commit fa651ce5942756400cec12da4b05428e3bede879) 2019-05-22 Vlad Patrascu * [8a6a7543a] : 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 Bogdan-Andrei Iancu * [55d650ba6] : Fix the returning if local route does not exist while doing RPC (cherry picked from commit 2ba271c6d07f8001dbcc468d8fe7aab6ca84b2e5) 2019-05-22 Bogdan-Andrei Iancu * [7acc72a0e] : Revert "dialog: send dlg command using rpc" This reverts commit ef9de0173f66727488e75d11e341d6b90b8fcf9a. This is not necessary as the RPC for local route is now done internally by t_uac() (cherry picked from commit c61278bf0ea09523aee95923cbbcc6d9fcdf9530) 2019-05-22 Bogdan-Andrei Iancu * [a3f56bed1] : Reverted d13f3eb61764a9246542f37b72482f2b27a0aaf2 Running local route via RPC is now supported intenally by t_uac() (cherry picked from commit 620fe1025b64d641b899cd8f309852dada7e35f0) 2019-05-22 Bogdan-Andrei Iancu * [5d73a60ce] : Re-implement t_uac() to do RPC if local_route cannot be locally run IF triggered from MI or non-SIP processes, the t_uac() cannot run local route (as such procs do not have the script anymore). Instead of various fixes in different parts of code / modules, let's address the problem internally in t_uac() - if needed and script is not available, run local route via RPC (while doing busy waiting) (cherry picked from commit 234a93e49c3b8e6264b65d48b3d622d126e42900) 2019-05-22 Bogdan-Andrei Iancu * [146a2501a] : Fixed some optional params for t_uac_dlg Side effect of the previos reverting (cherry picked from commit b7b9151178caf8c9776b824832034d1e13cdde21) 2019-05-22 Bogdan-Andrei Iancu * [2091c4cf5] : Revert the commits for RPC-zing the t_uac_dlg Reverted commits: 7df5d5e9ccd639a9f6035e64dadbc1e6b8a71758 8883a7c6caac5b4bed228381e2d64f53d7364b81 d0a043e89b2cdde1131a336964c0ade079269b4c The RPC-zing will be added internally to t_uac() function, transparent for the code using it. (cherry picked from commit e3a1b7c9bc899e6cf75cd3dd42f541d84eb505f5) 2019-05-22 Razvan Crainea * [17509ea47] : 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-22 Razvan Crainea * [3c605a81c] : mi: remove id from shm response This fixes asynchronous commands that store the id in the response as system allocated, but after that they are released as shm. This bug was afecting the mi_http fifo backend. (cherry picked from commit bb5b0c9e8b22f1cfbfdb3654a34eabbe76677a05) 2019-05-22 Liviu Chircu * [ff72d0c2e] : dialog: Do not replicate CSeq changes w/o a cluster (cherry picked from commit 65ae04c892d2869be4a56049adcea70666e97dc8) 2019-05-22 Bogdan-Andrei Iancu * [bd1719dcf] : Fix usage of buffered RR lumps Do not simply link the buffered lumps, but better clone them -> this will avoid a mixage of lump types (shm versus pkg) when using async() Fix for #1683 (cherry picked from commit 4bca4792d6543dfde5f472b158878942223625e8) 2019-05-21 Bogdan Andrei IANCU * [8825e5760] : Merge pull request #1699 from taozhiying/patch-1 LB will always to one dst when use lb_next (cherry picked from commit 2dd76a784450be9f85a18237c54a0b9fe945100b) 2019-05-21 Razvan Crainea * [07672d438] : 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 * [945386683] : dialog: duplicate out SDP when cloning a leg also, make sure the src_leg is used *after* enlarging the dialog legs, otherwise it might remain dangling (cherry picked from commit 46877f2ac16981177dd18ca0ea031efaf89bc8ac) 2019-05-21 Razvan Crainea * [0ab94bc2c] : 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 * [d57895f50] : Fixed bogus "return" in LOAD computing macro This affected only the 1 minute statistic. (cherry picked from commit af4d8479d3e2902019a9d209690362075c9120d9) 2019-05-21 Razvan Crainea * [4c3e39092] : dialog: unref dialog after updating cseq (cherry picked from commit 1c80acf868683f352f4ecf565fc160553e3a23ba) 2019-05-21 Bogdan-Andrei Iancu * [4e29ce925] : 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 Vlad Patrascu * [1fba583fe] : clusterer: add mising optional param flag for cluster_check_addr() Closes #1693 (cherry picked from commit 27507331d9bc895c8bbb36f0becfe12ad5c5cf69) 2019-05-20 Liviu Chircu * [2c7c202c9] : 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 * [631e31521] : 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 Razvan Crainea * [f672fe3f3] : clusterer: make sharing tag output array (cherry picked from commit 9d48ebc569b968fc855e1cd5c6fc53cd68c84369) 2019-05-20 Vlad Patrascu * [f8ff9e5ab] : 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 * [3c8e94552] : 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 * [9b47639e3] : Rebuild documentation 2019-05-17 Liviu Chircu * [3a5aec2e9] : 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 Vlad Patrascu * [91a6b190b] : clusterer: docs: fix outdated output examples for mi commands (cherry picked from commit 9842085494666558bf06cf55dab0717ad0b8139e) 2019-05-16 Bogdan-Andrei Iancu * [5ab0df974] : Un-butcher the custom reason string for 100 SIP reply Closes #1670 (cherry picked from commit bf130c524ec02e882c2da709b5c36b5d44719051) 2019-05-16 Bogdan-Andrei Iancu * [9fc4173ea] : 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 Bogdan-Andrei Iancu * [c78bdc47c] : Fix setting var to NULL on each iteration Closes #1697 Credits go to @razvancrainea (cherry picked from commit 20be5febe28229311c48102d9d4a189aec734c63) 2019-05-16 Razvan Crainea * [0f3b019f8] : dialog: initialize dst_leg before getting dlg (cherry picked from commit fb20eed07c5451c84a30230095d18baa38652b45) 2019-05-16 Razvan Crainea * [054fc3ef1] : dialog: add replication for cseq updates (cherry picked from commit 130e70421274c1e8ec716604372bc974d978556b) 2019-05-15 Bogdan-Andrei Iancu * [5561528a2] : Fix bogus offsetting in BIN package (cherry picked from commit 9703aa8c1309c5496060abadb6c7924b00c56c8e) 2019-05-15 Bogdan-Andrei Iancu * [675f56ef1] : Fix missing arming of re-invite pinging for replicated dialogs (cherry picked from commit 8014056434f92d99ac559a050f576f413f76ab2b) 2019-05-15 Razvan Crainea * [4545c04bb] : dialog: fix bogus operation introduced in previous commit Thanks go to travis and clang for spotting it :) (cherry picked from commit 63a8cf3f690cbbbb0bcdbd010479111c52ebc024) 2019-05-15 Razvan Crainea * [3c1a0695c] : dialog: add contact on second leg of challenge (cherry picked from commit c7b46c88d9ce7339776826a2c11990ac37b05466) 2019-05-15 Vlad Patrascu * [cac793685] : clusterer: fix output of clusterer_list_topology mi command (cherry picked from commit 1144de0ef6832efe7fadc077cf08bddedff4bdb3) 2019-05-15 Razvan Crainea * [44bcc967b] : dialog: update inbound body on request and replies (cherry picked from commit 40a1e5ababdacf77eb31ca7c29ec8323c1e8b503) 2019-05-15 Vlad Patrascu * [d0a204bf4] : dialog: do not accept replicated counters for local profiles (cherry picked from commit c5638e9bb58d6db6b428c3cd65502513b28817a5) 2019-05-15 Razvan Crainea * [e0c5bbb45] : dialog: provide content type for MI generated sequentials (cherry picked from commit ba7186fdbd3751fd8def486273da952688a741ec) 2019-05-15 Razvan Crainea * [89b4fc62d] : dialog: send dlg command using rpc (cherry picked from commit ef9de0173f66727488e75d11e341d6b90b8fcf9a) 2019-05-15 Razvan Crainea * [2d8c7fc06] : dialog: advertise proper contact when generating sequential (cherry picked from commit 37cf3c13b5a8f1bf3430aab761075a50b865668a) 2019-05-15 Bogdan-Andrei Iancu * [ebd512a62] : Fixed updating replicating advertised contact In a TH scenario, during the dialog replication, the advertised contact may change, if the interface/socket has a different name than on the original server (due tagging, advertising, etc) (cherry picked from commit c5d60c815096f67b9750c44390260343e7a792eb) 2019-05-15 Bogdan-Andrei Iancu * [7bb2fcc8b] : Fixed testing wrong flags for TH status (cherry picked from commit 80479f53d9d3c4da9019b85718bbfedd7fc091b7) 2019-05-15 Bogdan-Andrei Iancu * [852e629e4] : Fixed missing replication for the adv_contact This affected clustering scenarios where dialog module is used with Topo-Hiding and re-Invite pinging - the contact of the re-INVITE pings will be wrong on the nodes receiving the replicated dialog (cherry picked from commit 58343d45ac450f8bb15a6dbfa9da164ff944424b) 2019-05-15 Bogdan-Andrei Iancu * [8c67f2b95] : Add adv_contact ONLY if it is a local contact Extract the outgoing contact and store it as adv_contact ONLY is a self-point contact resulted from Topo Hiding. (cherry picked from commit bab898eb3a5bb2dc2dc0e28c2fa9e82cd63d1e6b) 2019-05-14 Vlad Patrascu * [48e5293fe] : 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 * [b90eb0da9] : tracer: use a valid info when tracing messages This commit prevents a crash when tracing a message without having a dialog or transaction created. Thanks go to Konrad Malewski (gitkoyot on GitHub) for reporting this! Close #1695 (cherry picked from commit 58a1e1bb43fbf4b500cacc3dd595fd7b28cd1922) 2019-05-14 Dan Pascu * [bbd5c7de2] : Fixed list_statistics MI command (cherry picked from commit 1e14844dde59d5b0dd2cee1a0b8c16735a4672df) 2019-05-13 Vlad Paiu * [455066ffa] : Fixed send_smpp_message breaking script It now returns a proper return code, as per the doc 2019-05-13 Vlad Paiu * [3bb6a07a0] : Fixed t_uac_dlg body sending 2019-05-13 Ovidiu Sas * [2c6fd8fff] : 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 * [0d032378c] : 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 * [ec24d6f2e] : Rebuild documentation 2019-05-12 Razvan Crainea * [cbfeb9687] : dbtext: use python2 explicit shebang This is needed for Fedora 30. Reported by Nick Altmann (cherry picked from commit ce7df8ac697cab164cf027f2cb7ef1784a08029f) 2019-05-10 Vlad Paiu * [ea01bba7a] : Fixed crash in case there's no SMPP connection 2019-05-10 Vlad Paiu * [7b23c14cf] : Add rabbitmq_consumer to the list of default excluded compilation 2019-05-09 Razvan Crainea * [178929791] : 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 * [ae0b4c90c] : dialog: extend the fix in commit 3abb14d to profiles without value (cherry picked from commit 3d081c88f4515ac0ed5424f43e6b5304b095ab85) 2019-05-08 Vlad Patrascu * [4eded22ef] : Complete the fix in commit: 3abb14d (cherry picked from commit 0256fadcc11f91781113980b867599e844acfe8b) 2019-05-08 Vlad Patrascu * [2d89ab24e] : 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 Vlad Patrascu * [7c2417d60] : textops: fix subst() functions fixups when using the '$' character (cherry picked from commit 6816fa91db9be1c07c1317184b379227292331bf) 2019-05-07 Vlad Patrascu * [2b7846b65] : Never pv-expand regex type function parameters (cherry picked from commit 52d1ac41fb5b34174576f0e6509c3289304a165f) 2019-05-07 Vlad Patrascu * [bff242eb1] : Fix the CMD_PARAM_NO_EXPAND parameter flag The fixup of parameters flagged wih CMD_PARAM_NO_EXPAND would fail if the string contained a '$' character not followed by a valid variable. (cherry picked from commit 307e8c8ad6ce9bd263a122c9e0a8164cf59a131e) 2019-05-07 Liviu Chircu * [016134408] : Preprocessor: Proper fix for the issue behind f1fb2bd339 The actual issue was related to the fact that most stream-oriented GNU tools (cat, sed, m4, etc.) work by managing a continuous flow of reads from the input source and writes to the output one, until the input file ending is reached. This technique allows large amounts of data to be transformed without requiring any intermediary, equally large buffers. This patch creates the matching write/read looping logic into OpenSIPS, as it both feeds these preprocessing tools with the config file input, and consumes their output, unlocking them to process more bytes. Thanks to Răzvan Crainea for spotting the problem! (cherry picked from commit 206af742fbb4119304f110037dd8c97e8439d688) 2019-05-06 Vlad Patrascu * [363ecea3c] : opensipsdbctl: fix tracer module name in EXTRA_MODULES var (cherry picked from commit 9014550fa36fab440950a16ca137be7b3f88e89e) 2019-05-06 Liviu Chircu * [c8347ec14] : Fix build on CentOS 6.x Reported by Nick Altmann (cherry picked from commit f06f948ded2c197db314e6c8a4413bc58013cfce) 2019-05-05 OpenSIPS * [2e7b25e56] : Rebuild documentation 2019-05-03 Fabian Gast * [50352c247] : Remove quotes breaking default config (cherry picked from commit 9f2b776b2895494bb029667d0adf6a109290fd83) 2019-05-03 Vlad Patrascu * [462a3395e] : dispatcher: fix replication of the probing state (cherry picked from commit 27b899be021d0059bb30142ce475c7540cd1c8c1) 2019-05-03 Vlad Patrascu * [f0f6cd7ba] : statistics: fix crash in update_stat(), reset_stat() (cherry picked from commit 89127cc95a007cf7fe6560f8202d23a18052d1b6) 2019-05-02 Dan Pascu * [656bf6956] : Revert "tracer: always load the trace api" This reverts commit 779130478937fe92fcac145205dc4039c1126772 which forced one to load proto_hep and define at least 1 listener for it even when HEP was not used, in order to have the tracer module load. (cherry picked from commit 08cff3486e8ad9e7f4fc52cdb202c3201a3435ae) 2019-05-02 Dan Pascu * [b6d6fc913] : Fixed error in handling fcntl's output (which is an int) (cherry picked from commit 216dc40a0339d9e821de0b05c56f3f7cd1da7531) 2019-05-02 Liviu Chircu * [95c853998] : preprocessor: Improve handling for large input files Reported by Vasilios Tzanoudakis (cherry picked from commit f1fb2bd3395738dc3ec1711c7c512e3a361b4ccd) 2019-05-01 Liviu Chircu * [89535e02d] : preprocessor: Fix off-by-one buffer overflows Reported by Dan Pascu (cherry picked from commit 03de04f29f26d012beee65d4432dbfbeff265b00) 2019-05-01 Dan Pascu * [3efc8bd4c] : sipmsgops: Fixed is_present_hf for non-standard headers (cherry picked from commit 0e1d4f3416ebc5f55ee44c315e93d15a0cbe5cc1) 2019-05-01 Dan Pascu * [857f034ad] : aaa_radius: Added back aaa_bind_api to the command interface (cherry picked from commit cadac89b47f886d55ec98a301a9d276a75dc3782) 2019-05-01 Razvan Crainea * [93c3942aa] : tracer: always load the trace api (cherry picked from commit 779130478937fe92fcac145205dc4039c1126772) 2019-05-01 Nick Altmann * [3ff6d0480] : DEB packaging: remove m4 support 2019-05-01 Nick Altmann * [dc20f8b51] : RPM packaging: remove m4 support 2019-04-30 Dan Pascu * [b8921cfcf] : group: Fixed buffer overflow caused by missing end structure marker (cherry picked from commit 67a1a0218dc85a24a5690e3b3fd7004b2c880405) 2019-04-30 Dan Pascu * [2a7a69fa6] : Allow specifying auto scaling profile with udp_workers (cherry picked from commit 04175e5728b3ab2586502627f54aaab2db440999) 2019-04-30 Dan Pascu * [52e51c548] : Fixed typos (cherry picked from commit 80ce8f9888a243266073ae11ffaeeb984aca4d4c) 2019-04-29 Razvan Crainea * [a115114a0] : dialog: update SDP under lock (cherry picked from commit 57e4d59133cdcebfce2ecb1267d26c549089fcd0) 2019-04-28 OpenSIPS * [d5ec3b9d0] : Rebuild documentation 2019-04-26 Razvan Crainea * [f8d59ef8d] : tm: proper return code for replicated CANCEL Thanks go to 46Labs for reporting this (cherry picked from commit 5c7dd8ab8ea7fe378204d33dafe14434412404b5) 2019-04-26 Razvan Crainea * [c571f60ca] : tm: fix CANCEL replication when CANCEL is malformed Thanks fo to 46Labs for reporting this (cherry picked from commit 9f050c95f66ff44fd657a7266ce4acaad572e5c6) 2019-04-25 Bogdan-Andrei Iancu * [c51b1b8ba] : Fix wrong quoting on integer parameter (cherry picked from commit d5b13700648b47283d1b46c7bd7ddc12f37c3ddc) 2019-04-25 Vlad Patrascu * [4e5cb3903] : Remove leftover commented code in several modules (cherry picked from commit 03e18087b209d79a258403380c3d963402bf3cd2) 2019-04-25 Vlad Patrascu * [e9ea1faed] : Align docs to latest changes in module functions parameters (cherry picked from commit e456ddd81a7064203c82723b87868b6005866765) 2019-04-25 Vlad Patrascu * [9642dce0d] : proto hep: fix parameters in correlate() cmd export (cherry picked from commit 26ab860aae248c483a47ad9a711909f667b38e86) 2019-04-24 Liviu Chircu * [c73b0d2c4] : TCP: Fix confusing log on connect timeout (cherry picked from commit b7af3d764118218e88e59aa56d4da8c1de7a4d21) 2019-04-24 Walter Doekes * [21dae83c2] : Fix mantainer-clean -> maintainer-clean typo (cherry picked from commit 884f6305313dfdd6846b5c21c175a060c2fd263d) 2019-04-24 Walter Doekes * [8f7f8f38c] : 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 commit 94c50b7811e1af69ef1400c531b0b6196e3ffb39) 2019-04-24 Bogdan-Andrei Iancu * [88b0b8854] : Fixed counting of extra UDP procs when UDP is not used Reported by Konrad Malewski (cherry picked from commit 388ab01b51191c0b5832228ea3450b088b592b52) 2019-04-24 Liviu Chircu * [9c470cba6] : cachedb URLs: Complete commit 887f9f0e032 * do not parse "schema://host:port/" as "" database (keep it NULL) (otherwise, this breaks Redis) * do not treat similar URLs with differing options as the same URL * pkg_free() the options chunks at shutdown Reported by Ryan Bullock Fixes #1677 (cherry picked from commit f1c5a7ea3c1c441262580de768197d53e6ddb9dc) 2019-04-23 Vlad Patrascu * [f5cf2a397] : rtpproxy: fix parameter types for rtpproxy_stream2uac/uas() (cherry picked from commit 5bb4e9c8f1a4e4616f5855402d8d82b05c7cfb13) 2019-04-23 Vlad Patrascu * [20fbdd23e] : rtpengine: fix parameter type for rtpengine_start_recording() (cherry picked from commit db0a391e125cddfa7b12c7adda3b2d5400c39514) 2019-04-23 Razvan Crainea * [f7eef61cd] : tracer: complete fix for previous crash (cherry picked from commit daaf39059ccec3b9a11b520c199e8e39ad4cbe75) 2019-04-23 Vlad Patrascu * [bfdb931cb] : b2b_logic: fix first parameter fixup for b2b_init_request() Thanks to Konrad Malewski for reporting (cherry picked from commit f0dae11019d1753400fb28b3190fe9045e9db470) 2019-04-23 Liviu Chircu * [13bab4876] : 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 * [e11625552] : 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 Liviu Chircu * [169074167] : group: Align docs to latest changes (cherry picked from commit a22c37e81512476c2d55c43d5ff1df413f85b6b6) 2019-04-23 Razvan Crainea * [610d95811] : tracer: prevent crash when tracing context is not created (cherry picked from commit b80478b80dc75f7ffdf20e848a0fb4ba2cc82a1b) 2019-04-23 Bogdan-Andrei Iancu * [39cc3f96d] : Updated copyright years 2019-04-23 Bogdan-Andrei Iancu * [e70a5755c] : Fixed copy paste error in DB schema section name (cherry picked from commit c15abd769101eb517bedc9a9c544574af975b53f) 2019-04-23 Bogdan-Andrei Iancu * [cfa7e3f06] : Removed empty DB schema section Related to #1672 (cherry picked from commit 116860e458a717123ff48e77af12fb34723cf2f3) 2019-04-23 Vlad Patrascu * [5d96b65ab] : ratelimit: fix parameter type for rl_check() (cherry picked from commit 07b476b05abec76f48494c467d3de48f891b2a13) 2019-04-22 Liviu Chircu * [dfea2609e] : avpops, exec: Align docs to latest changes exec: also remove some deprecated (and unused code) (cherry picked from commit 085dbc18e2eaf14051c6ea67428891a13d9ec1ba) 2019-04-22 Dan Pascu * [1d408c970] : enum: Reworded description in documentation (cherry picked from commit 09edd15c9754757915132e4905dbd56f069f64ba) 2019-04-22 Liviu Chircu * [f0b2a7c68] : enum: Move the "number" optional parameter last This preserves the backwards-compatibility of enum_query(). Additionally, "number" is the least used of the optional paramters, so it makes more sense for it to go last. Suggested by Dan Pascu (cherry picked from commit a1da98cb1b045f9078a04531c1547f2ad82f650d) 2019-04-22 Liviu Chircu * [f3aa797f4] : cfgutils, json: Align docs to latest changes (cherry picked from commit 687b3e4c3e6d80e1668386cec082eb54be7fa7d5) 2019-04-22 Dan Pascu * [c37677756] : Changed log message from info to debug (cherry picked from commit b35cf35859efdab4bd6a542c919b3512f9f0944a) 2019-04-21 OpenSIPS * [9b7327efb] : Rebuild documentation 2019-04-20 Liviu Chircu * [88e949940] : lexer: Fix multi-line string parsing Multi-line strings were broken by the generic preprocessing support, as both double and single quoted strings have their own lexing rules, which take precedence over the "consume preprocessor tokens" lexer rule. Reported by Dan Pascu (cherry picked from commit 4b33da67ffd0f1a5b2507939ee0cf440e9ba00f9) 2019-04-19 Liviu Chircu * [6374b066c] : cachedb_mongodb: Allow specifying URL options This patch allows script writers to append essential connect string options near the end of a cachedb_mongodb URL, such as: * ?replSet=mongo-set-1 * ?readConcernLevel=local Consult the MongoDB connect string docs for a full listing of available URL options. Reported by Vasilios Tzanoudakis Fixes #1656 (cherry picked from commit 887f9f0e032da4bf092540cb92369a6daee90ffa) 2019-04-19 Vlad Patrascu * [ce8b709ea] : usrloc: update docs regarding supported NoSQL databases (cherry picked from commit 32d3163d9bb3a98497c1671bbb7ffc0f034b69fb) 2019-04-19 Razvan Crainea * [04ed88af8] : mem: trigger error when setting pkg allocator with sys malloc (cherry picked from commit 3b83d36c9fd47c13d862dbd866b921dc14b669c3) 2019-04-19 Razvan Crainea * [b277ddf0b] : tracer: fix module to allow multiple trace instances (cherry picked from commit 3b196a9da41b85c3872b21336c2aea8d3dc3a2ec) 2019-04-19 Dan Pascu * [bacc49563] : Fixed some typos (cherry picked from commit 67374892acbccc79758f22499e9ce32c68d7b258) 2019-04-19 Nick Altmann * [b8ed4fac6] : RPM: add rabbitmq_consumer module 2019-04-19 Nick Altmann * [f66702312] : RPM spec: fix bogus date 2019-04-18 Liviu Chircu * [e77eebb16] : emergency docs: Fix misclosed section (cherry picked from commit dd16f66fa658a4c7882900d6eba6ca19d6a9cb18) 2019-04-18 Liviu Chircu * [fa256ab5d] : enum: Significant cleanup * merge enum_pv_query() into enum_query() * fix potential segfaults in all functions (due to param migration) * bring the docs up-to-date (cherry picked from commit 3e21553e7d458b6ccc86662516761bff9af70ba0) 2019-04-18 Vlad Patrascu * [e0a27c6e9] : load_balancer: fix parameter type in lb_start() command export (cherry picked from commit f5875b575ed2166898232be9e1105b8e9267f3b5) 2019-04-18 Dan Pascu * [b3cc53dff] : Fixed segfault when updating stats in _stop_expire_timer (cherry picked from commit 24c5d82989fe77eba57f01f9fd2d84acc7223bac) 2019-04-18 Razvan Crainea * [9b6a3c313] : dialog: add documentation for dlg_send_sequential (cherry picked from commit 63984dedcd0b97c9ee385052ea9c9238df776cde) 2019-04-18 Dan Pascu * [4213fe263] : enum: Fixed function name (cherry picked from commit 3a6ad9a08f225a05b28427df647fb618e98b354d) 2019-04-18 Liviu Chircu * [4e418033a] : mem: Fix typos (cherry picked from commit 531a7225eba0ed3a5509d9e9e48106baaaf5789d) 2019-04-18 Razvan Crainea * [2b4d551dc] : mem: allow func_mem usage for system malloc too Reported by Dan Pascu on Devel user list (cherry picked from commit e82dbdeff1dc2b3d47fc9ce9d72c291d57b42f95) 2019-04-18 Liviu Chircu * [830200282] : dialog: Fix uninitialized variable This patch prevents broadcast_profiles() from sometimes starting off by broadcasting an empty packet (should it read a large, positive integer off the stack garbage), then proceeding normally. Reported by Bogdan-Andrei Iancu (cherry picked from commit 8e42ffaa42a4a486affe9e4d61b48733747ca58e) 2019-04-18 Liviu Chircu * [08dfb8d29] : usrloc: Fix a bug in MI "ul_dump" output structure When the code was ported to the new MI interface, the AoR KV-Store ended up being moved to the wrong place, effectively crashing on 0 contacts. (cherry picked from commit 6929c4ad5ad909e2055dd9a50458a5a1ac4d4fb5) 2019-04-17 Dan Pascu * [b911c070c] : Moved rabbitmq_consumer module to the opensips-rabbitmq-modules debian package (cherry picked from commit f2c9ed67602a03022961474b1184a1ab2f51829f) 2019-04-17 Vlad Patrascu * [4128ca881] : Fix bad modparam names and doc examples caused by mi modules rename (cherry picked from commit 4af34c03e75a6c48c9784bd002024ccaf23bf7e3) 2019-04-17 Dan Pascu * [9d90c75f1] : Compacted structure initialization (cherry picked from commit 2ede3c099bcdb05b28ea932e3d590bca70c6d109) 2019-04-17 Dan Pascu * [eae85a46d] : Debian priority Extra was replaced by Optional (cherry picked from commit f9e2a42847ceb3b9548eb2f112760b0dd1889bde) 2019-04-17 Dan Pascu * [45b7cf23e] : Removed unnecessary line continuation (cherry picked from commit 57f16c969abe1a37dc73c9058e3bf0070e163815) 2019-04-17 Razvan Crainea * [911a4cd42] : fix packaging for 3.0 Thanks go to Dan Pascu for reporting this 2019-04-17 Dan Pascu * [1d3b54d29] : Removed opensips-console debian package from control file 2019-04-17 Dan Pascu * [65bffaf0c] : Updated documentation with new function signatures (cherry picked from commit b569899ccad11f6b803ad117054dfcbb38d8d871) 2019-04-17 Dan Pascu * [75b4ff2ce] : Compacted structure (cherry picked from commit 16855cfd9c214d68348b71c94c0bd503979cfe02) 2019-04-17 Dan Pascu * [aa651c7af] : Be consistent with comment format (cherry picked from commit 2f18c51aa93e3691416c543408df9f790773c5f7) 2019-04-17 Dan Pascu * [112ff1228] : Updated copyright (cherry picked from commit 60477618b3b81aee0f6a9bc660e0fdd19017d6a0) 2019-04-17 Dan Pascu * [c4a9424a5] : Removed commented out code (cherry picked from commit dd6ec9e4f330d41b2501ca00037e71aec621076c) 2019-04-17 Dan Pascu * [8a8e384f4] : Fixed signatures for system memory allocator functions (cherry picked from commit 539ee1544679d14991a4407541db592f428d2b47) 2019-04-17 Liviu Chircu * [a28edab24] : tracer: Fix doc build (cherry picked from commit 0b592f7febe34d5b28994a0a3d024027a081eb1c) 2019-04-16 Razvan Crainea * [67c51accb] : add ChangeLog for 3.0 2019-04-16 Razvan Crainea * [bee8add01] : scripts/opensipsdbctl.mysql: migrate tls_mgm table 2019-04-16 Razvan Crainea * [6337f34b3] : Bump version to 3.1 2019-04-16 Razvan Crainea * [1dba53e39] : bump version to 3.0 2019-04-16 Razvan Crainea * [56f26ef6b] : drop credits file 2019-04-16 Razvan Crainea * [3b8e258d7] : opensipsctl: remove fifo and unixsock support most of this functionality has been already moved in the new opensips-cli tool 2019-04-16 Razvan Crainea * [456fb4ca8] : remove osipsconsole 2019-04-16 Bogdan-Andrei Iancu * [2e284aa69] : Migrated sample scripts to 3.0 syntax 2019-04-16 Vlad Patrascu * [401d55c85] : rabbitmq_consumer: fix missing field in module exports 2019-04-16 Vlad Patrascu * [8d5ce8eb0] : New module: rabbitmq_consumer 2019-04-16 Bogdan-Andrei Iancu * [6a31b9d87] : Rename reload_script to reload_routes 2019-04-16 Razvan Crainea * [46d44ef70] : compression: fix couple of warnings 2019-04-16 Razvan Crainea * [2c7c4a88f] : perl: WIP: suppress errors while compiling perl 2019-04-16 Razvan Crainea * [9e2c279a7] : fix harmless warnings 2019-04-16 Razvan Crainea * [cf1530b94] : tracer: document trace_start and trace_stop commands 2019-04-16 Liviu Chircu * [3091d63e6] : dispatcher docs: Fix bad example 2019-04-16 Razvan Crainea * [3cc74443a] : rename siptrace module to tracer 2019-04-16 Razvan Crainea * [c09937c74] : siptrace: add referencing for dynamic tids 2019-04-16 Razvan Crainea * [7639f635a] : siptrace: hook filters for dynamic tids 2019-04-16 Razvan Crainea * [e82ddf7ac] : siptrace: add support to create dynamic tids add sip_trace_start and sip_trace_stop MI commands that can be used to dynamically create tids, with certain filters that will be automatically applied to new message/dialogs. 2019-04-16 Razvan Crainea * [98a138c35] : proto_hep: suppress error when hepid not found 2019-04-16 Razvan Crainea * [72d47bcd8] : siptrace: fix mi exit on error 2019-04-16 Bogdan-Andrei Iancu * [26b25746e] : Fix missing "bind_presence" in module export 2019-04-16 Bogdan-Andrei Iancu * [b3b809fb3] : [uac] update docs for uac_replace_xxxx() 2019-04-16 Bogdan Iancu * [bbe424532] : [uac] Fix param order and double free 2019-04-16 Bogdan Iancu * [ea62ec206] : Fix preservation for the values of func params. Some function may change the params (holders) during runtime, so it is better to provide a safety mechanism here. Simply copy the str/int into a temporaty holder for each function execution 2019-04-16 Bogdan-Andrei Iancu * [4c43cc86c] : Fixed bogus export syntax for t_relay() Side effect of 7023ec8f1d174a05bacb460025761668202dde1b 2019-04-16 Bogdan Iancu * [f267ba99d] : [tm] Fix wrong order for t_relay() params. Related to 7023ec8. 2019-04-16 Bogdan Iancu * [da03d4108] : [mi_fifo] Fix bogus test on traced MI cmd. 2019-04-16 Razvan Crainea * [430dbdf7a] : cfg: init entire socket_id memory 2019-04-16 Bogdan Iancu * [01ee65c9d] : Fixed unwanted change of the str received as parameter 2019-04-16 Liviu Chircu * [0530f204f] : Merge pull request #1667 from fgast/fix-tm-doc fix t_new_request documentation 2019-04-16 Liviu Chircu * [01b3dac67] : dispatcher: Update documentation 2019-04-16 Bogdan-Andrei Iancu * [38114fb2b] : Fix crash when gw type was missing in is_from_gw() 2019-04-16 Bogdan-Andrei Iancu * [7023ec8f1] : Fix order of params in t_relay() 2019-04-16 Bogdan-Andrei Iancu * [b6a887bd1] : Fix param order for sip_trace() 2019-04-16 Razvan Crainea * [9ad63f5a8] : event_route: populate the params head when running event route 2019-04-16 Razvan Crainea * [11ab3138f] : event_route: completely remove event_route_handler 2019-04-16 Bogdan-Andrei Iancu * [11b7c37ce] : Fix type for the first param of is_domain_local() 2019-04-16 Bogdan-Andrei Iancu * [d8c031f76] : Fix missing "bind_presence" in module export 2019-04-16 Bogdan-Andrei Iancu * [2ab60774d] : Fix wrong function export in module interface 2019-04-16 Bogdan-Andrei Iancu * [87d49d055] : Fix typo in bind_auth() exporting 2019-04-16 Bogdan-Andrei Iancu * [c796979f1] : Fix copy'paste err in prev commit :D 2019-04-16 Fabian Gast * [c6853e86d] : fix t_new_request documentation 2019-04-16 Bogdan-Andrei Iancu * [b82a8806d] : Fix missing load_dlg in mod export 2019-04-16 Bogdan-Andrei Iancu * [b0d90dba6] : Fixed abusive strlen on NULL params in mod_init 2019-04-16 Bogdan-Andrei Iancu * [6b9ef88ec] : Fix crash if flat_prefix is not set 2019-04-16 Bogdan-Andrei Iancu * [c32656a25] : Fixed forcing the "sender_uri" param as mandatory 2019-04-16 Razvan Crainea * [d972aada3] : perl: fix find_cmd_export_t usage 2019-04-16 Bogdan-Andrei Iancu * [8883a7c6c] : Fixed optional socket handling in t_uac_dlg 2019-04-15 Bogdan-Andrei Iancu * [5867fe062] : Merge branch 'script_reload' 2019-04-15 Liviu Chircu * [9af63ec57] : Merge branch 'func_params' 2019-04-15 Liviu Chircu * [b5557bdcb] : dispatcher: Migrate to new module function interface 2019-04-15 Bogdan-Andrei Iancu * [d13f3eb61] : Migrate dlg_end_dlg MI command to RPC dispatching Avoid running TM function that may trigger local route in the MI processes 2019-04-15 Bogdan-Andrei Iancu * [d0a043e89] : Migrate t_uac_dlg MI command to RPC dispatching Avoid running TM function that may trigger local route in the MI processes 2019-04-15 Bogdan-Andrei Iancu * [53fe64dcc] : Take care of re-indexing routes after reload We need to preserve the index of the routes (by name) as the onreply/failure/branch/route[]/events are referred by index from transactions or code. 2019-04-15 Razvan Crainea * [2fd7713d1] : mi: fix recursive call in get_array_int param 2019-04-15 Razvan Crainea * [3863766bf] : dialog: add dlg_send_sequential MI command This new command can be used to send sequential messages within an OpenSIPS dialog. It is highly flexible, allowing the trigger to send different SIP methods, bodies, etc. Common use cases are: - re-advertise contact after a failover - trigger rtpproxy/rtpengine re-negociation 2019-04-15 Razvan Crainea * [13bceaf64] : 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. 2019-04-15 Razvan Crainea * [0d026b9f1] : dialog: merge duplicated reply handling in a func 2019-04-15 Razvan Crainea * [58dc435cb] : dialog: always persist SDP for both in and out 2019-04-15 Razvan Crainea * [d05a72630] : mi: fix async commands for mi modules 2019-04-15 Razvan Crainea * [2563484fe] : mi: add functions to clone request's id 2019-04-15 Razvan Crainea * [33b3349cb] : mi: add a new set of commands to try to fetch params 2019-04-15 Razvan Crainea * [5a125a5e3] : dialog: always check if cseq should be updated 2019-04-14 OpenSIPS * [eb1a662c8] : Rebuild documentation 2019-04-12 Bogdan-Andrei Iancu * [c9705fdc1] : Trigger event_routes via RPC in worker processes. First revert commit e3d37f4933af94483b7b2d2f0d5b08fe3b43b93e ("added in script sync/async suport for event_route"), drop the global async/sync mod param and then migrate the async support (via dedicated process) to the RPC support 2019-04-12 Vlad Patrascu * [0cb0c395d] : registrar, mid_registrar: allow only static strings for 'domain' params 2019-04-12 Vlad Patrascu * [2251fae0a] : function params interface: add flag that forces use of static strings 2019-04-12 Bogdan-Andrei Iancu * [03bf9ac5e] : Send reload only to procs needing script 2019-04-12 Bogdan-Andrei Iancu * [92eea0f74] : Fix potential creation of new udomain at runtime During a cfg reload, we cannot create new udomains (as per script functions), so better decline it. 2019-04-12 Bogdan-Andrei Iancu * [2527a0815] : More validation checks upon reload if the xxx_save() is used with sharing tags, be sure it is enabled in usrloc 2019-04-12 Bogdan-Andrei Iancu * [1d7cd37ec] : Add new process flag OSS_PROC_NEEDS_SCRIPT If a process does not need the script, free it. This is a way to force a policy about what modules are expected to run the script or not - it will help during the script reload. 2019-04-12 Bogdan-Andrei Iancu * [ff98be947] : Fixed fixup 2019-04-12 Liviu Chircu * [fb3ef7cb0] : avpops: Fix avp_db_query() optional params 2019-04-12 Liviu Chircu * [c556e33b3] : Merge branch 'feature/self-diagnosis' 2019-04-12 Liviu Chircu * [6e33e7cc1] : OPS-9: Enhance the support for diagnosing slow SIP processing 2019-04-12 Liviu Chircu * [94d3d3190] : OPS-9: Add support for NoSQL query diagnosis 2019-04-12 Liviu Chircu * [07f45f293] : OPS-9: Add support for slow SQL query diagnosis 2019-04-12 Liviu Chircu * [b0fd15009] : OPS-9: Add a generic query timing wrapper 2019-04-12 Liviu Chircu * [29e31d8e6] : Coding style: Fix inconsistent verbs and whitespace 2019-04-12 Liviu Chircu * [42697dc64] : OPS-9 (Self Diagnosis): Complete support for DNS diagnosis * also time the DNS A record lookups in addition to NAPTR and SRV * export some relevant DNS-related statistics 2019-04-12 Bogdan-Andrei Iancu * [aca85454f] : Better logging 2019-04-12 Bogdan-Andrei Iancu * [9c8fecd13] : Added reload validation functions. If the module initialize in different ways, depending on what functions are used in script, during a cfg reload, we need to re-check if the original module initialization is compatible with what functions are used in the new script. 2019-04-12 Bogdan-Andrei Iancu * [4a85d5b46] : Run cfg validation (by modules) at cfg reload 2019-04-12 Bogdan-Andrei Iancu * [1896689df] : Added new function to module export struct A new optional function to allow the module to validate (if needed) a reloaded script. 2019-04-11 Nick Altmann * [d677db38d] : RPM: Package names and layout were changed similar to debian packaging 2019-04-11 Bogdan-Andrei Iancu * [26db23088] : Add async-draing during reload for TCP/UDP/timer reactors 2019-04-11 Bogdan-Andrei Iancu * [09d02482e] : Prevent a new reload while not fully switched to latest cfg 2019-04-11 Bogdan-Andrei Iancu * [05798d860] : Add support for keeping old/prev cfg after reload In order to properly handle the ongoing async ops, we need to keep the prev cfg until all the ongoing async ops are done and corresponding FDs removed from reactor 2019-04-11 Bogdan-Andrei Iancu * [db5fe244b] : Add application flags in the reactor fd map The new app flags allow the code using a reactor to mark and check the existing fds, without interfering with the reactor internals 2019-04-10 Bogdan-Andrei Iancu * [df9d35c32] : drouting: Port to new mod-function interface 2019-04-10 Razvan Crainea * [a3a4010fc] : drop second param in find_export() usage 2019-04-10 Razvan Crainea * [abf873911] : fix several modules script functions specifications 2019-04-10 Razvan Crainea * [7cf11de18] : fix harmless warnings in several modules 2019-04-09 Vlad Patrascu * [72f0bf5f3] : Fix function parameter passing when fixup doesn't change the pointer 2019-04-09 Razvan Crainea * [0085fd50b] : event_route: drop the fetch_event_params() function This function has been replaced in the favor of the $param(name) variable 2019-04-09 Razvan Crainea * [eae60a1ad] : core: add route_params interface This interface can be used to populate the $params() pvar 2019-04-09 Razvan Crainea * [2d056455e] : dialog: fix create_dialog() without params 2019-04-09 Razvan Crainea * [d2c493ff5] : compression: adhere to new functions interface 2019-04-09 Razvan Crainea * [c12200984] : mod_fix: reset gparam for NULL parameters 2019-04-08 Bogdan-Andrei Iancu * [a7b3e7ecc] : Fix passing INT parameters 2019-04-08 Bogdan-Andrei Iancu * [5774079e7] : Added missing include 2019-04-08 Bogdan-Andrei Iancu * [95f2e2796] : Fix how INT param is recived by function 2019-04-08 Vlad Patrascu * [fb0f64050] : db_unixodbc: align functions export to new format 2019-04-08 Vlad Patrascu * [9ff31a5d5] : db_sqlite: align functions export to new format 2019-04-08 Vlad Patrascu * [ec42ed6b9] : db_postgres: align functions export to new format 2019-04-08 Bogdan-Andrei Iancu * [ce3f3b7aa] : Align the node names of t_uac_dlg MI with 2.4 2019-04-08 Vlad Patrascu * [ee7b28be3] : db_perlvdb: align functions export to new format 2019-04-08 Vlad Patrascu * [33e6b8534] : db_oracle: align functions export to new format 2019-04-08 Vlad Patrascu * [c076f1091] : db_http: align functions export to new format 2019-04-08 Vlad Patrascu * [e74602970] : db_berkeley: align functions export to new format 2019-04-08 Vlad Patrascu * [b632d5ef4] : Fix return of false positives by is_script_func_used() 2019-04-08 Vlad Patrascu * [7b594ffda] : db_flatstore: align functions export to new format 2019-04-08 Vlad Patrascu * [1c778dfe1] : msilo: don't use old fixup functions for modparams 2019-04-07 OpenSIPS * [c123ba84c] : Rebuild documentation 2019-04-05 Liviu Chircu * [977aeaaf6] : sipmsgops: Update docs 2019-04-05 Liviu Chircu * [a150b432b] : sipmsgops: Port to new module interface 2019-04-04 Razvan Crainea * [2e1a26676] : mod_fix: fill elems structure for params NULL fixup 2019-04-04 Razvan Crainea * [fa6155362] : prevent fixup free from overwriting function's ret 2019-04-04 Liviu Chircu * [6c0a795f1] : avpops: Clean up unused global query printing buffer 2019-04-04 Liviu Chircu * [9a8ca5631] : avpops: Port to new module function interface 2019-04-04 Liviu Chircu * [7f50517c8] : module interface: New func param flag: CMD_PARAM_NO_EXPAND This is a temporary solution, just to help speed up the porting of all avpops functions (avpops needs major rework anyway -- no time for that now). NOT to be re-used in the future, as we want a uniform behavior for all string function parameters. 2019-04-04 Liviu Chircu * [9398b61f9] : sipcapture: Update HEP3 link 2019-04-04 Liviu Chircu * [dd4724b95] : sipcapture: Port to new function interface 2019-04-04 Liviu Chircu * [a597ff5ba] : db_mysql: Port to new function interface 2019-04-04 Liviu Chircu * [e814737e6] : uac_redirect: Migrate to new module interface 2019-04-04 Vlad Patrascu * [fb46520e2] : cpl_c: fix number of parameters for tm api call 2019-04-04 Vlad Patrascu * [46ffa6163] : mid_registrar: fix bad usage of function parameter 2019-04-04 Vlad Patrascu * [3f28b487a] : uac_auth: align functions export to new format 2019-04-04 Vlad Patrascu * [ff7dd859f] : db_cachedb: align functions export to new format 2019-04-04 Vlad Patrascu * [b619652ef] : proto_bin: align functions export to new format 2019-04-04 Vlad Patrascu * [db062d322] : topology_hiding: fix compile warning 2019-04-04 Vlad Patrascu * [9eed241a5] : uac_registrant: remove unused functions export 2019-04-04 Vlad Patrascu * [b76496c2f] : seas: port script functions to new param interface 2019-04-04 Vlad Patrascu * [0f8877091] : cfgutils: properly get the value of the parameter of usleep() 2019-04-04 Vlad Patrascu * [4e11a1480] : auth: remove unused variable 2019-04-04 Vlad Patrascu * [cc1e4acfe] : auth_db: fix bad cast to gparam struct 2019-04-04 Vlad Patrascu * [b742b4ab6] : compression: fix wrong parameters for find_export() call 2019-04-04 Vlad Patrascu * [0b4885633] : freeswitch: align functions export to new format 2019-04-04 Vlad Patrascu * [c1eabba6f] : b2b_entities: align functions export to new format 2019-04-04 Vlad Patrascu * [ae1c6fa5b] : db_virtual: align functions export to new format 2019-04-04 Vlad Patrascu * [4dfe05bb4] : qos: fix wrong parameters for find_export() call 2019-04-04 Vlad Patrascu * [861702e45] : qos: align functions export to new format 2019-04-04 Vlad Patrascu * [f10a466ca] : httpd: align functions export to new format 2019-04-04 Vlad Patrascu * [189ec8c10] : httpd: fix wrong parameters for find_export() call 2019-04-04 Vlad Patrascu * [81148c826] : dbtext: align functions export to new format 2019-04-04 Vlad Patrascu * [ce3a075d7] : script_helper: fix parameter type for dialog flag parsing macro 2019-04-04 Vlad Patrascu * [2ad0f744c] : script_helper: fix number of parameters for some tm api calls 2019-04-04 Vlad Patrascu * [31b95d2a1] : script_helper: remove unused functions export 2019-04-04 Vlad Patrascu * [9f7f61644] : cgrates: remove unused error label 2019-04-04 Vlad Patrascu * [8a6ab7cd7] : dialog: fix compile warning 2019-04-04 Vlad Patrascu * [e8ad4350b] : usrloc: align functions export to new format 2019-04-04 Vlad Patrascu * [87911a316] : rr: port script functions to new param interface 2019-04-04 Vlad Patrascu * [ae1923bc8] : proto_ws: align functions export to new format 2019-04-04 Vlad Patrascu * [19e3869d0] : presence_xcapdiff: fix wrong parameters for find_export() calls 2019-04-04 Vlad Patrascu * [6f530cd73] : presence_xcapdiff: remove unused functions export 2019-04-04 Vlad Patrascu * [11ab64cb3] : proto_wss: align functions export to new format 2019-04-04 Vlad Patrascu * [a610e8ae3] : xmpp: port script functions to new param interface 2019-04-04 Vlad Patrascu * [5520b3a6f] : usrloc: fix wrong parameters for find_export() call 2019-04-04 Vlad Patrascu * [d80446a88] : userblacklist: port script functions to new param interface 2019-04-04 Vlad Patrascu * [47b01bd7b] : uac_auth: port script functions to new param interface 2019-04-04 Vlad Patrascu * [2fc7fac29] : uac: port script functions to new param interface 2019-04-04 Vlad Patrascu * [b1833c2d7] : topology_hiding: port script functions to new param interface 2019-04-04 Vlad Patrascu * [ab5751904] : tm: port script functions to new param interface 2019-04-04 Vlad Patrascu * [348c68204] : tls_mgm: port script functions to new param interface 2019-04-04 Vlad Patrascu * [aff8d7505] : textops: port script functions to new param interface 2019-04-04 Vlad Patrascu * [32b49dce9] : statistics: port script functions to new param interface 2019-04-04 Vlad Patrascu * [c4d1a43ab] : sst: port script functions to new param interface 2019-04-04 Vlad Patrascu * [2e0dd80c1] : speeddial: port script functions to new param interface 2019-04-04 Vlad Patrascu * [f518c333a] : sngtc: port script functions to new param interface 2019-04-04 Vlad Patrascu * [8bb94e041] : sms: port script functions to new param interface 2019-04-04 Vlad Patrascu * [bfa918316] : sl: port script functions to new param interface 2019-04-04 Vlad Patrascu * [8cec469f6] : siptrace: port script functions to new param interface 2019-04-04 Vlad Patrascu * [669c473c1] : siprec: port script functions to new param interface 2019-04-04 Vlad Patrascu * [b808014a4] : sip_i: port script functions to new param interface 2019-04-04 Vlad Patrascu * [af0a5aefc] : signaling: port script functions to new param interface 2019-04-04 Vlad Patrascu * [593bbb00b] : rtpproxy: port script functions to new param interface 2019-04-04 Vlad Patrascu * [9fb2c36c9] : rtpengine: port script functions to new param interface 2019-04-04 Vlad Patrascu * [ccfac89f2] : rr: fix wrong parameters for find_export() call 2019-04-04 Vlad Patrascu * [b8a19cd95] : rls: port script functions to new param interface 2019-04-04 Vlad Patrascu * [94127927f] : rest_client: port script functions to new param interface 2019-04-04 Vlad Patrascu * [329a30dbd] : registrar: port script functions to new param interface 2019-04-04 Vlad Patrascu * [544bb380e] : regex: port script functions to new param interface 2019-04-04 Vlad Patrascu * [46aab80e2] : ratelimit: port script functions to new param interface 2019-04-04 Vlad Patrascu * [64a8d754f] : rabbitmq: port script functions to new param interface 2019-04-04 Vlad Patrascu * [302058d8d] : python: port script functions to new param interface 2019-04-04 Vlad Patrascu * [0bfc70e1d] : pua_xmpp: port script functions to new param interface 2019-04-04 Vlad Patrascu * [59a9c970a] : pua_usrloc: port script functions to new param interface 2019-04-04 Vlad Patrascu * [93079f93f] : pua_dialoginfo: port script functions to new param interface 2019-04-04 Vlad Patrascu * [43ab8fbe7] : pua_bla: port script functions to new param interface 2019-04-04 Vlad Patrascu * [593476831] : pua: port script functions to new param interface 2019-04-04 Vlad Patrascu * [7bd63b728] : proto_smpp: port script functions to new param interface 2019-04-04 Vlad Patrascu * [ae762c37d] : proto_hep: port script functions to new param interface 2019-04-04 Vlad Patrascu * [da3f1052a] : presence_callinfo: port script functions to new param interface 2019-04-04 Vlad Patrascu * [4824d926b] : persence: port script functions to new param interface 2019-04-04 Vlad Patrascu * [1567c75b2] : pike: port script functions to new param interface 2019-04-04 Vlad Patrascu * [57a952ec7] : perl: port script functions to new param interface 2019-04-04 Vlad Patrascu * [e899d9a7f] : peering: port script functions to new param interface 2019-04-04 Vlad Patrascu * [9000221c0] : path: port script functions to new param interface 2019-04-04 Vlad Patrascu * [b91ed2efb] : osp: port script functions to new param interface 2019-04-04 Vlad Patrascu * [776bcc772] : options: port script functions to new param interface 2019-04-04 Vlad Patrascu * [881d27a9a] : nathelper: port script functions to new param interface 2019-04-04 Vlad Patrascu * [510bc8597] : nat_traversal: port script functions to new param interface 2019-04-04 Vlad Patrascu * [156994b61] : msilo: port script functions to new param interface 2019-04-04 Vlad Patrascu * [61136c9b9] : mmgeoip: port script functions to new param interface 2019-04-04 Vlad Patrascu * [135486e8a] : mid_registrar: port script functions to new param interface 2019-04-04 Vlad Patrascu * [487429bb0] : mediaproxy: port script functions to new param interface 2019-04-04 Vlad Patrascu * [732f40b8d] : maxfwd: port script functions to new param interface 2019-04-04 Vlad Patrascu * [afaa0a4af] : mathops: port script functions to new param interface 2019-04-04 Vlad Patrascu * [61dd0fc39] : mangler: port script functions to new param interface 2019-04-04 Vlad Patrascu * [b188f5a67] : lua: port script functions to new param interface 2019-04-04 Vlad Patrascu * [11634d58a] : load_balancer: port script functions to new param interface 2019-04-04 Vlad Patrascu * [4137c5a09] : ldap: port script functions to new param interface 2019-04-04 Vlad Patrascu * [2aa794490] : jsonrpc: port script functions to new param interface 2019-04-04 Vlad Patrascu * [1d936ef3b] : json: port script functions to new param interface 2019-04-04 Vlad Patrascu * [5db7694b0] : jabber: port script functions to new param interface 2019-04-04 Vlad Patrascu * [a6e24b92a] : imc: port script functions to new param interface 2019-04-04 Vlad Patrascu * [503040608] : identity: port script functions to new param interface 2019-04-04 Vlad Patrascu * [cc63a16a9] : h350: port script functions to new param interface 2019-04-04 Vlad Patrascu * [863f93bf7] : group: port script functions to new param interface 2019-04-04 Vlad Patrascu * [36459a4de] : gflags: port script functions to new param interface 2019-04-04 Vlad Patrascu * [66d2bcc2d] : freeswitch_scripting: port script functions to new param interface 2019-04-04 Vlad Patrascu * [0944fda11] : fraud_detection: port script functions to new param interface 2019-04-04 Vlad Patrascu * [c053a4b9c] : exec: port script functions to new param interface 2019-04-04 Vlad Patrascu * [8fc748031] : event_routing: port script functions to new param interface 2019-04-04 Vlad Patrascu * [d83a51f80] : enum: port script functions to new param interface 2019-04-04 Vlad Patrascu * [1651f4391] : domainpolicy: port script functions to new param interface 2019-04-04 Vlad Patrascu * [d0467c0ce] : domain: port script functions to new param interface 2019-04-04 Vlad Patrascu * [bf661ca97] : diversion: port script functions to new param interface 2019-04-04 Vlad Patrascu * [44b55a68b] : dialog: port script functions to new param interface 2019-04-04 Vlad Patrascu * [bea31433c] : cpl_c: port script functions to new param interface 2019-04-04 Vlad Patrascu * [bbc252318] : clusterer: port script functions to new param interface 2019-04-04 Vlad Patrascu * [e0d1ee438] : cgrates: port script functions to new param interface 2019-04-04 Vlad Patrascu * [27072bb0b] : cfgutils: port script functions to new param interface 2019-04-04 Vlad Patrascu * [32a0338d4] : carrierroute: port script functions to new param interface 2019-04-04 Vlad Patrascu * [d221a2081] : call_control: port script functions to new param interface 2019-04-04 Vlad Patrascu * [d2afcb80b] : call_center: port script functions to new param interface 2019-04-04 Vlad Patrascu * [0f6e62ef1] : cachedb_local: port script functions to new param interface 2019-04-04 Vlad Patrascu * [67516951b] : benchmark: port script functions to new param interface 2019-04-04 Vlad Patrascu * [cea553b69] : b2b_sca: port script functions to new param interface 2019-04-04 Vlad Patrascu * [ada84e527] : b2b_logic: port script functions to new param interface 2019-04-04 Vlad Patrascu * [96141cb80] : auth_db: port script functions to new param interface 2019-04-04 Vlad Patrascu * [4d42b2382] : auth_aaa: port script functions to new param interface 2019-04-04 Vlad Patrascu * [66d2fa0fd] : auth: port script functions to new param interface 2019-04-04 Vlad Patrascu * [0b27e248e] : alias_db: port script functions to new param interface 2019-04-04 Vlad Patrascu * [304c92f09] : acc: port script functions to new param interface 2019-04-04 Vlad Patrascu * [fd0ef7c59] : aaa_radius: port script functions to new param interface 2019-04-04 Vlad Patrascu * [f1c074abf] : cJSON lib: add a variant for cJSON_AddStrToObject() that takes a str name 2019-04-04 Vlad Patrascu * [a3f63530e] : trace api: change param type to str for add_extra_correlation_f 2019-04-04 Liviu Chircu * [4bbfb0cb1] : dialplan: Remove unused functions 2019-04-04 Vlad Patrascu * [574f744cc] : Allow fixups to be run for omitted optional parameters 2019-04-04 Vlad Patrascu * [7533df19d] : Support up to 8 parameters for script functions 2019-04-04 Vlad Patrascu * [7f84a8e47] : Fix size of parameters array in cmd export 2019-04-04 Vlad Patrascu * [cb56b7a75] : Run custom fixups for variable parameters at startup 2019-04-04 Bogdan-Andrei Iancu * [a0ca1f238] : [dialplan] Use flag to force lookup of default partision it is missing as param 2019-04-04 Bogdan-Andrei Iancu * [32ce1fbc6] : [permission] Fixed partition fixup function 2019-04-04 Bogdan-Andrei Iancu * [7cb32e88f] : [permissions] migrated to new func's param interface. Partition is no longer part of the same param as the group, but an optional last parameter. allow_routing/register(allow,deny) dropped as they were broken - keeping only the allow_routing/register(basename) should do it. 2019-04-04 Bogdan-Andrei Iancu * [8dadeb5b0] : Migrated to new function param interface. In script and MI function dp_translate, the partition is now a separate optional param (from the dpid). Also, the script dp_translate() has the input string and output variable split in two different paramters. 2019-04-04 Vlad Patrascu * [fce0b2971] : Move function parameter fixup code to mod_fix.c 2019-04-04 Vlad Patrascu * [b38b0c69e] : Support regex fixups for script functions parameters 2019-04-04 Vlad Patrascu * [321aaad20] : Fix evaluation of variables in function parameters 2019-04-04 Vlad Patrascu * [c006227d2] : Rework interface for script functions parameters * basic parameter fixup (type validation and variables evaluation) is now transparently done by the core for all script functions * pass variables and integers to functions without quotes 2019-04-04 Bogdan-Andrei Iancu * [65af0b5c8] : Fix missing script "fixing" in processes (after reload) 2019-04-04 Bogdan-Andrei Iancu * [13056d8f0] : Small fixes. 2019-04-03 Bogdan-Andrei Iancu * [a8340376c] : Added RPC based mechanism to reload in processes 2019-04-03 Razvan Crainea * [3bce368ce] : mem: add rpm cli param for selecting allocator 2019-04-03 Bogdan-Andrei Iancu * [5ad04ac4d] : 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. (cherry picked from commit e1004f864587a37a1e5630d1181fa323ba51df14) 2019-04-03 Bogdan-Andrei Iancu * [953fbfb7f] : 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. (cherry picked from commit 2b6b000305f0957e2e020bdfa9be869795cc41dd) 2019-04-02 Bogdan-Andrei Iancu * [4d1581031] : 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. (cherry picked from commit 79a9daf659468cdfebbd6a4f95de1dd2b3f69409) 2019-04-02 Liviu Chircu * [414d69d9b] : Do not omit the attendant process in MI "ps" Completes 39febee49e2f8e 2019-04-02 Dan Pascu * [0b90e0009] : Decode JSON with python for consistent ordering and no extra dependencies 2019-04-02 Razvan Crainea * [68a297821] : mem: fix a couple of *_func definitions for INLINE allocator 2019-04-02 Liviu Chircu * [8e61c9542] : HP_MALLOC: Make HP_MALLOC_FAST_STATS great again To reiterate the idea behind HP_MALLOC_FAST_STATS: * core problem: atomic SHM stat counters are nice, but they do include locking! * with this flag, there are almost no stat computations at runtime (allocs, frees, reallocs will only +/- the numbers of fragments) * every time user asks for, say, shmem:real_used_size, the stat will be fully re-computed, at most once every second. 2019-04-02 Liviu Chircu * [8b19dab59] : Fix HP_MALLOC statistics with multi allocators With multiple allocators, the SHM stats table will declare a bunch of function-based statistics. While this works fine for F_MALLOC and Q_MALLOC, HP_MALLOC requires atomic counter statistics, due to its parallel processing nature. So, for HP_MALLOC, we now re-declare its stats during the init phase to be atomic counters instead of functions -- not the most elegant solution, but it's quick and not by far dirty. Thanks to Razvan Crainea for the report! <3 2019-04-02 Liviu Chircu * [976431ec9] : dynamic allocators: Add some useful startup hints 2019-04-02 Liviu Chircu * [dac6ef8a9] : Update contributors file 2019-04-01 Bogdan-Andrei Iancu * [39febee49] : Force OSS_PROC_IS_RUNNING when setting proc attrs. As setting the process attrs is a self doing action, it is safe to force also the OSS_PROC_IS_RUNNING flag -> the process is running. This fixes the missing OSS_PROC_IS_RUNNING flag for attendant process. Reported by @liviuchircu 2019-03-31 OpenSIPS * [d845b22f4] : Rebuild documentation 2019-03-29 Razvan Crainea * [e162f5f10] : 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 2019-03-29 Liviu Chircu * [b16e9d3ed] : mi_fifo: Do not crash if client dies (e.g. on a ^C keypress) 2019-03-29 Razvan Crainea * [38d73399f] : rpm: fix statistics name and crash when not used 2019-03-29 Liviu Chircu * [9328335f5] : Normalize free(NULL) logging across all allocators Many thanks to Ryan Bullock for reporting! Fixes #1646 2019-03-28 Liviu Chircu * [3b382563c] : Makefile.defs: Auto-fix the "no allocator" edge case 2019-03-28 Razvan Crainea * [f89b020f0] : drouting: add support for persistent storage 2019-03-28 Razvan Crainea * [d1d319d9c] : map: rework persistent storage 2019-03-28 Razvan Crainea * [a45544ed1] : Revert "map: add support for persistent storage" This reverts commit 0e6333d0fc36b934b6ca1978facc4bb8e49c9365. 2019-03-28 Razvan Crainea * [d1fbd99e6] : map: add support for persistent storage 2019-03-28 Razvan Crainea * [27d355f57] : mem: fix pkg_malloc_func 2019-03-28 Razvan Crainea * [abb33165b] : mem: fix gen_rpm_* signatures complete previous commit 2019-03-28 Razvan Crainea * [7f84a9be3] : mem: make functions signatures consistent 2019-03-28 Razvan Crainea * [6e05a4d3a] : mem: provide functions for alloc "macros" 2019-03-28 Razvan Crainea * [c2a2033d6] : mem: fix hp_block warning 2019-03-28 Razvan Crainea * [b6a8ec322] : drouting: remove useless free_rt_data() all param 2019-03-28 Razvan Crainea * [8792c5b83] : drouting: cleanup module 2019-03-28 Razvan Crainea * [c6eb2335b] : mem: fix magic warning 2019-03-28 Razvan Crainea * [a5393b6b2] : mem: add rpm statistics 2019-03-28 Razvan Crainea * [2ed7d0c06] : mem: add flexible key-value restart persistent storage 2019-03-28 Razvan Crainea * [c7cca6be8] : mem: add support for HP malloc for restart persistency 2019-03-28 Razvan Crainea * [a426d7dfd] : mem: add support for persistent memory storage 2019-03-28 Razvan Crainea * [0846b2bd8] : fix harmless compile warnings 2019-03-28 Razvan Crainea * [a1c1172ad] : shmem: make shm_getmem() receive fixed address Using this commit mmap() and can receive a specific address that indicates where a mapping should be done 2019-03-26 Liviu Chircu * [3c4918887] : Merge pull request #1645 from goharahmed/master Fixed bug where any addr get positive match in config if cluster_id i… 2019-03-26 Gohar Ahmed * [b8cf9336d] : 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() 2019-03-26 Bogdan Andrei IANCU * [b931ffe57] : Merge pull request #1643 from rrb3942/postgresql_bulk_fix db_postgres: Fix errors on bulk insert after delete/update 2019-03-26 Bogdan-Andrei Iancu * [44394e322] : 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 (cherry picked from commit bf25311d92f412f8e735ce6919c0689ff117d4a0) 2019-03-26 Răzvan Crainea * [c0e12b420] : Merge pull request #1644 from SB-JohnK/patch-1 Correct spelling of 'typically' from 'tipically' 2019-03-25 John Kiniston * [f99eeee21] : Correct spelling of 'typically' from 'tipically' 2019-03-25 Ryan Bullock * [d1ef89600] : Fix errors on bulk insert after delete/update 2019-03-24 OpenSIPS * [c6ee8265b] : Rebuild documentation 2019-03-22 Dan Pascu * [be8d3a8f0] : deb packaging: add mi_html module 2019-03-22 Liviu Chircu * [e5fd28efa] : 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! 2019-03-22 Ovidiu Sas * [f575d1fe1] : uac_registrant: when transitioning a shtag to backup state, move shtag-ed records to NOT_REGISTERED_STATE state 2019-03-20 Liviu Chircu * [2af3aa1c4] : F_MALLOC: Remove unused "sanity checking" logic Users who want extra sanity checks can just restart OpenSIPS using the Q_MALLOC or Q_MALLOC_DBG allocators. 2019-03-20 Liviu Chircu * [0fd7b9ff9] : mem/common.h: Relocate inline allocator detection code ... to a more logical place, before including allocator header files. 2019-03-20 Bogdan-Andrei Iancu * [94674e52e] : Make preproc options runtime persistent. 2019-03-20 Bogdan-Andrei Iancu * [811a78ffc] : Remember the startup wdir for later reload usage. As cfg file (and other files provided via cli params) may be relative to the startup working dir, we need to remember this dir and switch to it when doing a cfg reload. 2019-03-20 Liviu Chircu * [d4f023e8d] : 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. 2019-03-20 Liviu Chircu * [da20233c6] : mem debugging: Use the proper "status" functions 2019-03-19 Bogdan-Andrei Iancu * [cc7a8fd02] : Added a "reload_script" simple MI function. For the moment, this MI function simply triggeres (in parallel to the existing script), the parsing of the new cfg, the fixing and validation and its freeing. 2019-03-19 Bogdan-Andrei Iancu * [430b94d44] : Rework the approach on handling multiple scripts. As we do this per proc, we do not actually parser_sroutes and sroutes, it is safe to change the sroute while parsing the new script. 2019-03-19 Liviu Chircu * [158f98e93] : 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 2019-03-19 Bogdan-Andrei Iancu * [586857bc9] : More re-structuring around the script routes. Separate script routes data from parsing versus interpreter - this will allow to load/parse/fix a new script while running with another script. The parser may ignore (dry run) the non-routing part of the script (like global params, module related stuff) and parse and load ONLY the script routes. 2019-03-19 Bogdan-Andrei Iancu * [f7dc0a474] : Removed useless wraper function 2019-03-19 Liviu Chircu * [a2a305fc2] : clusterer: Fix missing lock_release() calls 2019-03-19 Răzvan Crainea * [5b0beac7c] : Create issue templates 2019-03-18 Ovidiu Sas * [59669b27d] : uac_registrant: doc: fix escaping 2019-03-18 Ovidiu Sas * [b46346f12] : uac_registrant: fix copy/paste error 2019-03-18 Ovidiu Sas * [c41c690a5] : uac_registrant: doc updates 2019-03-18 Ovidiu Sas * [f95014d07] : uac_registrant: force single registration for records with reg-id and +sip.instance params 2019-03-18 Liviu Chircu * [4a22a7ba9] : shared memory: Drop shm_resize() It has the same purpose and uses the same parameters as shm_realloc()... 2019-03-18 Liviu Chircu * [bc74237c1] : Fix compile warning 2019-03-18 Liviu Chircu * [67026770d] : HP_MALLOC: Update copyrights 2019-03-18 Liviu Chircu * [8a668851e] : PKG mem: Clean up header file * normalize #ifdef coding style * remove redundant "no allocator" warnings (mem/common.h does this) 2019-03-17 OpenSIPS * [e7a283993] : Rebuild documentation 2019-03-15 Liviu Chircu * [fbecd4397] : Add new compile flag: CC_O0 (zero compiler optimizations) The idea is to decouple DBG_MALLOC from also completely disabling compiler optimizations. Maybe someone wants to deploy a debugging build to production that doesn't run like a wheelbarrow. 2019-03-15 Liviu Chircu * [1f821b1ac] : Merge branch 'feature/selectable-allocator' 2019-03-15 Liviu Chircu * [d2f780cb8] : OPS-6: Allocator codebase - fix coding style * "type *name" * "type *(func)" * fix "qm" -> "fm" copy-paste leftover * consistent func source strings in q_malloc.c 2019-03-15 Bogdan-Andrei Iancu * [8d0f3b821] : Free also the var specs allocated from script parser 2019-03-15 Liviu Chircu * [9349a061a] : OPS-6: Add new "allocator" cmdline options (-a, -k, -s) Description: * -a, sets the global allocator * -k, sets the PKG allocator, overrides -a * -s, sets the SHM allocator, overrides -a The maximally supported set of string values for each of these options: * F_MALLOC * F_MALLOC_DBG * Q_MALLOC * Q_MALLOC_DBG * HP_MALLOC * HP_MALLOC_DBG (case-insensitive matching) Now, depending whether OpenSIPS was compiled in a more optimized manner, with less allocators, some of these values MAY not be available, case in which appropriate error logs will be printed at startup. 2019-03-15 Liviu Chircu * [8b054a173] : OPS-6: Refactor QM_MALLOC into Q_MALLOC 2019-03-15 Bogdan-Andrei Iancu * [d84cbbdaf] : Added support to free the scripting routes. NOTE: things related to fixups or attached var specs are not yet freed. 2019-03-15 Liviu Chircu * [243fcee7a] : OPS-6: HP_MALLOC - don't always allocate the stats lock This lock is only required when HP_MALLOC_FAST_STATS is enabled, which gives lockless mem stats, but with come at a price of reduced precision. 2019-03-15 Liviu Chircu * [572f0df73] : OPS-6: HP_MALLOC / F_MALLOC - remove redundant logic There is no need for a separate frag->is_free field, as this task is already achieved by the optimally managed frag->prev field in both allocators. 2019-03-15 Bogdan-Andrei Iancu * [cb12ef1f2] : Pack all the types of routes in a single structure 2019-03-15 Liviu Chircu * [4adb1bb50] : OPS-6: Better organize some SHM_EXTRA_STATS code 2019-03-15 Liviu Chircu * [c7d02c0a7] : OPS-6: Add a memory manager printing function 2019-03-15 Liviu Chircu * [41ad6727f] : OPS-6: Fix shutdown issues with multi-allocators The "(fm|qm|hp)_status()" functions also require "_dbg" versions 2019-03-15 Liviu Chircu * [a6a0d812f] : OPS-6: Fix additional incompatibilities * fix broken inlined F_MALLOC * fix missing symbols when inlining allocators 2019-03-14 Liviu Chircu * [6d7b8ec71] : OPS-6: Fix some subtle bugs * QM_MALLOC + HP_MALLOC with no DBG_MALLOC failed with QM_MALLOC because of incorrectly shared "ROUNDTO" constant between .h files * bad copy-pasted functions, leading to linker errors * undefined NULL symbol 2019-03-14 Liviu Chircu * [23fea2f8c] : OPS-6: Update Makefile.conf.template comments 2019-03-14 Liviu Chircu * [c202cfc2a] : OPS-6: SHM_EXTRA_STATS is once again functional 2019-03-14 Liviu Chircu * [7a1cf1d92] : OPS-6: Drop USE_SHM_MEM support This compile flag has never had a useful application, yet it has constantly required careful attending / maintenance. 2019-03-14 Liviu Chircu * [a58f76c0d] : OPS-6: All 3 allocators may now compile together With or without -DDBG_MALLOC 2019-03-14 Bogdan-Andrei Iancu * [ad60d1f7c] : Fix pres/subs listing via new MI 2019-03-14 Liviu Chircu * [9e842178d] : 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 2019-03-13 Liviu Chircu * [9002881a6] : OPS-6: F_MALLOC and HP_MALLOC may now compile together 2019-03-13 Liviu Chircu * [e4e9e6941] : OPS-6: F_MALLOC and QM_MALLOC may now compile together 2019-03-13 Bogdan-Andrei Iancu * [320e4126b] : Add transformation {ip.matches,ip/masklen} 2019-03-13 Liviu Chircu * [5e6cf56ff] : OPS-6: HP_MALLOC is once again functional 2019-03-13 Liviu Chircu * [67ed0ccba] : OPS-6: Fix some F_MALLOC issues * fix missing #ifdef * fix badly migrated #ifdef 2019-03-13 Liviu Chircu * [af1f01342] : OPS-6: QM_MALLOC is once again functional 2019-03-13 Liviu Chircu * [c8804d280] : OPS-6: Major allocator rework - F_MALLOC is functional The purpose of this rework is to be able to do the following: * be able to compile an inlined allocator (same performance as now, same binary footprint) * be able to compile an inlined, dbg allocator (same dbg performance as now, same larger binary footprint) * be able to compile multiple allocators (a bit slower, somewhat flexible, larger+ binary footprint) * be able to compile multiple, dbg allocators (even slower, most flexible: 3 allocators + 3 dbg allocators, larger++ binary footprint) This commit creates the framework for the above. QM_MALLOC and HP_MALLOC are currently completely broken, but F_MALLOC inlining is working well, with or w/o DBG_MALLOC. 2019-03-13 OpenSIPS * [78afd259e] : Rebuild documentation 2019-03-13 Razvan Crainea * [7b48e4ec9] : replace opensipsctl snippets with opensips-cli This is just a rough update of all examples that contained opensipsctl, but should cover most of the cases. However, if there are any broken examples, they should be reported properly. Note that since opensipsctl was not yet removed, modules are still deploying opensipsctl-related files. These will be sorted out when opensipsctl and osipsconsole will be completely dropped 2019-03-13 Bogdan Andrei IANCU * [18a4b9024] : Merge pull request #1635 from rrb3942/compact_session_expires Add Session-Expires header to compact_form_hdrs 2019-03-13 Bogdan-Andrei Iancu * [37aea0c97] : Fixed false-positive triggering on bogus error test. Check for parsing error on the proper structure. Fix some bogus DBG logs 2019-03-12 Ryan Bullock * [2001e3fcb] : Add Session-Expires header to compact_form_hdrs 2019-03-12 Bogdan-Andrei Iancu * [0c80bcaf6] : Fix useless/bogus pointer reset Related to previos commit 2019-03-12 Razvan Crainea * [0b5c28e39] : net/udp: fix `ps` Type output 2019-03-12 Bogdan-Andrei Iancu * [c0902697f] : Avoid warnings when duplicates found in blacklists. (cherry picked from commit 11aebdeb90cdcf850505cf3042f2591f80df018b) 2019-03-12 Bogdan-Andrei Iancu * [71120b601] : Small fix in test during blacklist name parsing Related to d11ba50413b53e2c0dafa091de98b6bb8bd5b972 2019-03-12 Bogdan-Andrei Iancu * [d11ba5041] : Fix building blacklist's name when using partitions Do not include the partition name in the name of the blacklist 2019-03-12 Bogdan-Andrei Iancu * [427affcf4] : 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). 2019-03-12 Bogdan-Andrei Iancu * [7896f9af2] : Improve docs on "define_blacklist" param (cherry picked from commit 2c7ebe6de1f45f531b566db28a76953bdfb779e2) 2019-03-12 Bogdan Andrei IANCU * [18e007397] : Merge pull request #1634 from rrb3942/tr_s_reverse New String Transformation: s.reverse 2019-03-12 Bogdan-Andrei Iancu * [00a3ab348] : 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 2019-03-11 Ryan Bullock * [912880f08] : Tab to spaces 2019-03-11 Ryan Bullock * [db53a8cb4] : Add s.reverse Transformation 2019-03-11 Liviu Chircu * [ea959e19a] : OPS-6 (Selectable Allocator): Clean up VQ_MALLOC This allocator is both unmaintained and non-functional for several years now. 2019-03-11 Bogdan-Andrei Iancu * [2b670e334] : Fix small bugs related to xlog_level addition 2019-03-11 Bogdan-Andrei Iancu * [0b465a386] : Fixed $log_level for returning negative values Use signed function to covert from int to str, as log_leve may be negative (-1==ERR). 2019-03-11 Bogdan-Andrei Iancu * [cded19c5d] : Improve log 2019-03-10 OpenSIPS * [f1a164402] : Rebuild documentation 2019-03-08 Bogdan-Andrei Iancu * [42d8f2cea] : Added "xlog_level" MI cmd Used to change during runtime the xlog level (globally) 2019-03-08 Bogdan-Andrei Iancu * [9d98ffae3] : Refurbish $xlog_level to set/get the per proc xlog_level 2019-03-08 Bogdan-Andrei Iancu * [87893b6df] : Added "xlog_level" global parameter This acts as log_level, but for the logs generated via xlog. This gives you separately control the verbosity level for the xlog() calls. Added possibility to globally change the xlog_level during runtime (to be hooked later into an MI function) or to change the value per process (to be hooked later to the $xlog_level variable) 2019-03-08 Bogdan-Andrei Iancu * [b2640e64a] : Renamed xlog_default_level to xlog_print_level 2019-03-08 Liviu Chircu * [aa276bff0] : registrar: Clarify the 'm' lookup() flag 2019-03-08 Razvan Crainea * [a256fdf91] : mi: indicate integer error 2019-03-07 Razvan Crainea * [e6f181e26] : b2b_entities: don't unref UNDEFINED tm Close #1629 2019-03-07 Razvan Crainea * [dc422ea66] : enhance which to say what parameters can be used 2019-03-07 Liviu Chircu * [d8ad6551c] : mid_registrar: Fix unnecessary error log Thanks to @StellaTeam for the report! Fixes #1620 2019-03-07 Liviu Chircu * [5c8937316] : 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 2019-03-07 Bogdan-Andrei Iancu * [2550609ab] : 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 (cherry picked from commit 732038b6decf0809f52ef39ed97d7f025dca416e) 2019-03-06 Liviu Chircu * [1e14a83cb] : clusterer: Fix missing lock_release() 2019-03-06 Liviu Chircu * [00345fffc] : Fix bad datatype in previous commit 2019-03-06 Liviu Chircu * [f5525cd41] : Preprocessor: Detect/Report edge case with no output Credits to Ovidiu Sas for helping troubleshoot this issue! 2019-03-06 Razvan Crainea * [9c4bb36bc] : 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! 2019-03-06 Răzvan Crainea * [873bd820c] : Merge pull request #1594 from vasilevalex/validate_ipv6 Allow IPv6 address in hostname 2019-03-05 Vlad Patrascu * [48023acfe] : clusterer: 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 lock ops (start/stop read/write). 2019-03-05 Bogdan-Andrei Iancu * [60024ad92] : Remove some extensive logging (needed only for dev) 2019-03-05 Bogdan-Andrei Iancu * [732e3d615] : Fix cps counting for the SBT algorithm Credits shared with @razvancrainea for sorting out the issue and reworking the alg implementation. 2019-03-05 Bogdan-Andrei Iancu * [d7224382b] : Fix the parsing of $rl_count name 2019-03-03 OpenSIPS * [ce0125cd7] : Rebuild documentation 2019-03-01 Liviu Chircu * [0b9c7bf0f] : Config Parser: Do not free filename buffers ... as they are referenced all over the place by the (struct action *) elements of the action tree. Kudos to Vlad Patrascu for catching this one! 2019-03-01 Razvan Crainea * [fdefec49d] : dialog: replicate profiles outside lock 2019-03-01 Liviu Chircu * [b2c7ab2c7] : Improve reporting for config file parsing errors * print, if possible, two lines above the line which errored * highlight the incorrect syntax / tokens / etc. * print, if possible, two lines below the line which errored 2019-02-28 Liviu Chircu * [d948aa037] : 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 2019-02-27 Di-Shi Sun * [317597776] : Updated OSP Toolkit project repository. 2019-02-26 Bogdan-Andrei Iancu * [3ed54196a] : Added new tcp_no_new_conn_rplflag to control TCP conns While tcp_no_new_conn_bflag controls the opening of TCP conns on the UAC branches side of the transaction, the new tcp_no_new_conn_rplflag does the some kind of controling but on the UAS side of transaction (sending back the replies) 2019-02-26 Bogdan-Andrei Iancu * [d3a0aaa5e] : Proper/additional check of tcp_no_new_conn_bflag Check the tcp_no_new_conn_bflag (to avoid opening TCP conns) when: * sending a cancel to an invite (which was marked) * sending a negative ACK to an invite (which was marked) * sending an local UAC request (marked via local route) 2019-02-26 Razvan Crainea * [738905d2f] : dialog: prevent bin buffer double release 2019-02-25 Liviu Chircu * [9c2300c71] : Lexer: Properly match EOF preprocessor tokens 2019-02-24 OpenSIPS * [9bf229c37] : Rebuild documentation 2019-02-22 Liviu Chircu * [fd9c65072] : Merge branch 'feature/pluggable-preprocessor' 2019-02-22 Liviu Chircu * [3162d5045] : DEV-1: Exec the preprocessor cmdline; Feed output to Yacc 2019-02-22 Liviu Chircu * [134424dea] : DEV-1: Digest the pp tokens within lexer, not parser! Using the lexer to consume the preprocessor tokens makes life so much easier, as otherwise the complexity of the scripting language grammer would skyrocket. Example problem which is avoided by this: if ( condition ) { $var(x) = 5; } Although the coding style is horrible, this is still valid script syntax, but, all of a sudden, the grammar must be extended in order to support random tokens on any possible line of this "if" statement. Nope, not going there. Just use the lexer to eat the tokens and be done with the problem! 2019-02-22 Liviu Chircu * [55e874ff3] : DEV-1: Avoid printing the include trace multiple times 2019-02-22 Liviu Chircu * [46491c764] : DEV-1: Various fixes * avoid unnecessary strdup operation * do not close file streams multiple times * fix buffer size for final config file * remove unused lexer tokens 2019-02-21 Liviu Chircu * [5405515f1] : DEV-1: Display a file inclusion backtrace on syntax errors 2019-02-21 Liviu Chircu * [9f251028a] : DEV-1: Clear deprecated "stacked Yacc buffers" logic 2019-02-21 Liviu Chircu * [3050f7c57] : DEV-1: Hook the newly added logic into lexer/parser 2019-02-21 Liviu Chircu * [e83904d75] : DEV-1: Implement config file flattening + adnotations The main idea is to be able to feed the preprocessor with a contiguous stream of input. The consequence of doing this is that we must pre-resolve all "include_file" statements by creating one large cfg file, in a process called "flattening". Example of flattening + adnotation: ------ cfg/opensips-3.0-preproc-1.cfg ------ log_level = 4 log_stderror = yes include_file "cfg/opensips-3.0-preproc-2.cfg" loadmodule "tm.so" include_file "cfg/opensips-3.0-preproc-4.cfg" loadmodule "dialog.so" ------ cfg/opensips-3.0-preproc-2.cfg ------ listen = udp:*:5060 include_file "cfg/opensips-3.0-preproc-3.cfg" ------ cfg/opensips-3.0-preproc-3.cfg ------ mpath = "modules/" loadmodule "proto_udp.so" ------ cfg/opensips-3.0-preproc-4.cfg ------ loadmodule "usrloc.so" These four files with nested includes will be flattened into this beast: --------------------------------------------------- __OSSPP_FILEBEGIN__ "cfg/opensips-3.0-preproc-1.cfg" __OSSPP_LINE__ 1 log_level = 4 __OSSPP_LINE__ 2 log_stderror = yes __OSSPP_LINE__ 3 __OSSPP_LINE__ 4 __OSSPP_FILEBEGIN__ "cfg/opensips-3.0-preproc-2.cfg" __OSSPP_LINE__ 1 listen = udp:*:5060 __OSSPP_LINE__ 2 __OSSPP_FILEBEGIN__ "cfg/opensips-3.0-preproc-3.cfg" __OSSPP_LINE__ 1 mpath = "modules/" __OSSPP_LINE__ 2 loadmodule "proto_udp.so" __OSSPP_FILEEND__ __OSSPP_FILEEND__ __OSSPP_LINE__ 5 loadmodule "tm.so" __OSSPP_LINE__ 6 __OSSPP_FILEBEGIN__ "cfg/opensips-3.0-preproc-4.cfg" __OSSPP_LINE__ 1 loadmodule "usrloc.so" __OSSPP_FILEEND__ __OSSPP_LINE__ 7 loadmodule "dialog.so" __OSSPP_FILEEND__ --------------------------------------------------- 2019-02-21 Liviu Chircu * [d6780db16] : DEV-1 (Pluggable Preprocessor): Prepare code layout * add/document new "-p" (preprocessor) cmdline option * hook the new "-p" option into the parsing code * re-organize cfg file managing code into a separate file 2019-02-20 Liviu Chircu * [ec89b7866] : 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 2019-02-19 Razvan Crainea * [16ac41b26] : listeners: restore listening on any interface if interface's name is missing, it indicates that the listener should listen on all available interfaces. 2019-02-17 OpenSIPS * [907d81270] : Rebuild documentation 2019-02-15 Razvan Crainea * [16ab6a8de] : rtpproxy: allow socket to have an advertised address 2019-02-15 Razvan Crainea * [a7a65d395] : siprec: fix socket enforce 2019-02-13 Bogdan-Andrei Iancu * [6a6da348b] : Fix data type mismatch. Reported by Travis 2019-02-13 Bogdan Andrei IANCU * [0578fbd3c] : Merge pull request #1600 from rrb3942/http_db_expect Disable Expect: 100-continue behavior for large posts 2019-02-13 Ryan Bullock * [8361bd562] : Add module documentation for disable_expect parameter 2019-02-13 Bogdan-Andrei Iancu * [ebf165dca] : Merge branch 'master' of github.com:OpenSIPS/opensips 2019-02-13 Bogdan-Andrei Iancu * [1f167bf73] : Merge branch 'dynamic-fork' 2019-02-13 Bogdan-Andrei Iancu * [e785bb948] : Added E_CORE_PROC_AUTO_SCALE event This is fired upon dynamic adjustments on workers (fork or terminate) 2019-02-13 Bogdan-Andrei Iancu * [47a444edc] : Fix dynamic mapping of pipes to worker processes 2019-02-13 Bogdan-Andrei Iancu * [493c0dff8] : Align the module to the new process management 2019-02-13 Bogdan-Andrei Iancu * [7f7b64da1] : Fix outdated comment 2019-02-12 Ryan Bullock * [10242c307] : Add disable_expect flag to control Expect behvaior. Default is off 2019-02-12 Bogdan-Andrei Iancu * [c03e798c8] : Fix comment 2019-02-12 Bogdan-Andrei Iancu * [299e768f7] : Added configurable number of timer procs to start with. Added "timer_workers = N [use_auto_scaling_profile xxxxx]" Dropped "auto_scaling_timer_profile" Added dynamic counting for the timer processes 2019-02-12 Bogdan-Andrei Iancu * [848f5ea99] : Added full TCP auto-scaling 2019-02-12 Bogdan-Andrei Iancu * [1ad431ef4] : Fix computing extra procs. Consider the case when starting with a higher value than the max in the profile 2019-02-12 Razvan Crainea * [6b1632f57] : Makefile.defs: evaluage CC_EXTRA_OPTS later, after CFLAGS are set 2019-02-12 Bogdan-Andrei Iancu * [d07865e82] : Removed unused TCP related field in process table 2019-02-12 Bogdan-Andrei Iancu * [7acce9e16] : Fixed multiple terminates on the same process. Mark the process to avoid counting it for other terminations. A process may continue to run after receiving the terminate RPC (due draining procedure), so it will continue to exist as running in the process table. Use the OSS_PROC_TO_TERMINATE flag to avoid this (note that the flag is set and tested only by the attendent process). 2019-02-12 Liviu Chircu * [b830a2f32] : mid_registrar: Improve ';ctid= not found' error logs 2019-02-12 Bogdan-Andrei Iancu * [bd4c57b30] : Fix optional profile setting on interface 2019-02-12 Bogdan-Andrei Iancu * [4ad9bb8cc] : Added support for forking new TCP workers 2019-02-12 Bogdan-Andrei Iancu * [f81772512] : Use multiple states for a TCP process 2019-02-12 Bogdan-Andrei Iancu * [91aa645a2] : Fixed bogus log 2019-02-12 Bogdan-Andrei Iancu * [cd9222e48] : TCP auto-scaling - support for dynamic tcp_workers table 2019-02-12 Bogdan-Andrei Iancu * [d0d27b848] : Fix re-usage of UDP<>TCP-Main comm sockets 2019-02-12 Bogdan-Andrei Iancu * [c3328d7f6] : [dialplan] Added defaults for several columns 2019-02-11 Răzvan Crainea * [9f6b15e28] : Merge pull request #1601 from rrb3942/rtpproxy_socket_clipping Don't clip notify socket to older rtpproxies when using unix sockets 2019-02-11 Vlad Patrascu * [9a63a8aa1] : dialog: improve efficiency of retrieving sharing tag state The dialog sharing tag name is now stored in the dialog structure instead of a dialog value, which is only used for persisting and replicating the tag. 2019-02-10 OpenSIPS * [7a3d55c8e] : Rebuild documentation 2019-02-08 Razvan Crainea * [ed4e862db] : 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. 2019-02-08 Razvan Crainea * [939213d66] : fix grammar for listener Credits go to Pete Kelly for reporting this 2019-02-07 Bogdan-Andrei Iancu * [37863f33c] : Added load:processes_number statistics 2019-02-07 Bogdan-Andrei Iancu * [ea86e0049] : Fixed comment (c'n'p error??) 2019-02-07 Bogdan-Andrei Iancu * [13e4c0eaf] : Make it more readable 2019-02-07 Bogdan-Andrei Iancu * [bafd8a159] : Revert testing LM_WARN to LM_DBG 2019-02-07 Bogdan-Andrei Iancu * [b17bbd5b9] : Added configuration for timers auto scaling New auto_scaling_timer_profile core param to define the auto-scaling profile to govern the timer processes. 2019-02-07 Bogdan-Andrei Iancu * [6084544b0] : Added validation for the defined auto-scaling profiles 2019-02-07 Bogdan-Andrei Iancu * [6d005dbe3] : Use the auto_scaling_cycle for triggering the auto scale 2019-02-07 Bogdan-Andrei Iancu * [8e16b5910] : Use the auto-scaling profiles to controll the auto-scaling 2019-02-07 Vlad Patrascu * [e123d0192] : 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 (cherry picked from commit 765dba5c4f647286a0f361f7d191fe24e48445f1) 2019-02-07 Bogdan-Andrei Iancu * [949a8ed01] : Move auto-scaling code into separate files 2019-02-07 Bogdan-Andrei Iancu * [946e0b045] : Added grammar for auto-scaling provisioning via profiles Still need to "connect" the grammar to the inner guts, work in progress 2019-02-07 Vlad Paiu * [39f205cd9] : Fixed crash in case new connection cannot be opened 2019-02-06 Bogdan-Andrei Iancu * [5bcb69fac] : Added auto-scaling for extra timer processes 2019-02-06 Bogdan-Andrei Iancu * [e2032c76a] : Add down-scaling support for the auto-scaling 2019-02-06 Bogdan-Andrei Iancu * [f583b7ab9] : Fix ql_force_process_disconnect() Deal with the case when the list is empty (not init) 2019-02-06 Bogdan-Andrei Iancu * [de812572a] : Added ipc_handle_all_pending_jobs() A new function to consume (in a non blocking way) all the pending ipc jobs on the pipe. 2019-02-06 Bogdan-Andrei Iancu * [b57b0aed5] : Add new macro reactor_is_empty() Needed for graceful process termination 2019-02-06 Bogdan-Andrei Iancu * [7ea8f60f2] : Add new function ql_force_process_disconnect() This disconnects all the existing DB conns mapped on a given process, from all the queues. To be used when doing gracefull process termination. 2019-02-06 Bogdan-Andrei Iancu * [33ed33775] : Revert LM_WARN to LM_DBG 2019-02-06 Bogdan-Andrei Iancu * [64ec5abf6] : Fix reporting the status via pipes 2019-02-06 Bogdan-Andrei Iancu * [49ce02dc5] : Align to the status-pipe functions 2019-02-06 Bogdan-Andrei Iancu * [dd004b275] : Take out the closing of write-end from the wait_status_code() Allow re-usage of wait_status_code() on the same pipe 2019-02-06 Bogdan-Andrei Iancu * [a2ce6159b] : Proper env init for the dynamic forking. As usleep() may be intrerupted by signals, use the time based safe-guard to be sure we have 1 second between the auto-scaling checks Re-init the status-code pipe to be able to collect the status of the newly forked procs. 2019-02-06 Bogdan-Andrei Iancu * [b3c13362e] : Extend the status-pipe support. Expose more functions. Allow to re-create the status-pipe - we need this for the managing the status of the dynamically forked procs 2019-02-05 Vlad Patrascu * [c8907aa3d] : dialog: also include sdp body when replicating dialogs 2019-02-05 Bogdan-Andrei Iancu * [4199925af] : Fixed passing min/max per interface 2019-02-05 Bogdan-Andrei Iancu * [b0760eba2] : Fixed over/undeflow due signed/unsigned differences 2019-02-05 Bogdan-Andrei Iancu * [bc9b9f92b] : Fixed over/undeflow due signed/unsigned differences Introduced with the last commit f8b7e9c (cherry picked from commit 945c2eccfccd7af945e1797bafca682486481c52) 2019-02-05 Bogdan-Andrei Iancu * [ed9843e60] : Proper handling of per-proc stats during forking/ripping. Attach all load & pkmem stats to the process slot, so we can hide and unhide them when the process is fork or terminated. 2019-02-05 Vlad Patrascu * [08fc04f3b] : mi: add empty string with add_mi_string() if value is null 2019-02-05 Vlad Patrascu * [003108a64] : mi: fix printing of double values in the json output 2019-02-05 Vlad Patrascu * [30d9880c2] : usrloc: fix several issues in 'ul_dump' * properly dump all details when 'brief' parameter is missing * fix 'ContactID' overflow in JSON output * fix some null error checks when creating mi items 2019-02-05 Bogdan-Andrei Iancu * [3524c003d] : Added "hidden" flag to statistics. Such a hidden statistic will not be foundable (by search) and not printed (via MI commands) 2019-02-05 Bogdan-Andrei Iancu * [8437b3c44] : Fix typing error in prev commit bf2e51c 2019-02-05 Razvan Crainea * [c12e25b28] : mi: consider empty params as no param 2019-02-05 Bogdan-Andrei Iancu * [7ee40b38b] : Migrate to counted_max_processes Drop counted_processes and it becamed irrelevant. 2019-02-05 Bogdan-Andrei Iancu * [3354d8780] : 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) 2019-02-05 Bogdan-Andrei Iancu * [bf2e51cfb] : Fixed calculating the ovrall load stats Correlate the summed used processing time with the number of summed processes, not total processes. 2019-02-05 Bogdan-Andrei Iancu * [5a46380f2] : Fix handling of failed dynamic forking. Reset the process slot if the newly forked process failed -> the slot will be reused for another future fork. 2019-02-05 Vlad Patrascu * [98496642b] : clusterer: fix parsing of clusterer_shtag_set_active's parameter 2019-02-05 Bogdan-Andrei Iancu * [fb1e8611a] : The internal_fork() returns the process internal ID, not the PID. This is a much simpler way to reference processes. 2019-02-05 Razvan Crainea * [74597481a] : dialplan: make sure DB is not initialized twice Close #1610 2019-02-05 Bogdan-Andrei Iancu * [9f7b98762] : Change the way how a slot is allocated for a new process Instead of a simple incremental idx, search the table for the first free (proc not running) slot. This will be needed to cope with dynamic process ripping. 2019-02-05 Bogdan-Andrei Iancu * [2bc25b84d] : Rename all flags related to process management 2019-02-05 Bogdan-Andrei Iancu * [cfda59853] : Proper handling for dynamic fork failure 2019-02-04 Bogdan-Andrei Iancu * [51f8725d0] : Avoid ripping process if resulting load is too high Redistribute the load of the existing N processes over N-1 processes and be sure the that the new resulting load is not higher than the HIGH load threshold (to force a scale back up) 2019-02-04 Ovidiu Sas * [1d900ef0c] : mi_html: prettify json output - closes #1608 2019-02-04 Ovidiu Sas * [0aac972e9] : mi_html: update interface description to reflect new module name 2019-02-04 Bogdan-Andrei Iancu * [6eb1ebe89] : Added dynamic forking for UDP proc groups. Still to deal with some fork-failure conditions. Just scaling up (forking) is supported for now Testing to follow 2019-02-04 Bogdan-Andrei Iancu * [ad6ac63e3] : Added monitor&test&trigger support for proc auto-scaling The main process is responsible for monitoring the load of the proc groups and to decide when a process has to be forked or ripped. 2019-02-04 Bogdan-Andrei Iancu * [389606d47] : Pre-allocate inter-process fd for all processes Pre-allocate (and separatelt store in holders) the fds for IPC and TCP inter-proc communication. These fds are copied into the right process's vars only when the process is actually created. 2019-02-04 Bogdan-Andrei Iancu * [86a6be767] : Enhance the counting of processing in OpenSIPS Count how many processes will be created at startup and also what is the maximum number of processes opensips may create at runtime (to pre-allocate the max size table of processes and inter-proc communication resources) 2019-02-04 Razvan Crainea * [6baa3aa78] : fix a couple of lgtm issues 2019-02-03 OpenSIPS * [02a608c85] : Rebuild documentation 2019-02-03 Bogdan-Andrei Iancu * [d13e7a781] : Small rework of the processes groups Better use types to tag the processes. When creating a proc group, push also the min/max for procs auto-scaling 2019-02-03 Bogdan-Andrei Iancu * [30a42d7c9] : Added concept of groups for processes A processes may optionally be part of a group. Different parts of OpenSIPS code may register callbacks to a group of processes, to fork new processes, for example. 2019-02-03 Bogdan-Andrei Iancu * [181a274ed] : Replace the concept of 'child' with 'worker' 'children' replaced with 'udp_workers' 'tcp_children' replaced with 'tcp_workers' 'use_childern' replaced with 'use_workers' Internal structures updated to the new terminology 2019-02-03 Bogdan-Andrei Iancu * [12969e61e] : removed unused old tokens from cfg grammar 2019-02-03 Nick Altmann * [3efb3b809] : rpm packaging: add mi_html module 2019-02-02 Bogdan-Andrei Iancu * [3e5eae0fc] : Added MIN and MAX number of workers per listener Grammar allows the definition and push the values all the way to the socket_info structure. Re-work the handling of listener to make it more friendly to large number of options/parameter per listener 2019-02-02 Bogdan-Andrei Iancu * [4a17a8288] : 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. 2019-02-02 Bogdan Andrei IANCU * [8d9976502] : Fixed wrong sizeof() in mk_listen_param 2019-02-02 Bogdan-Andrei Iancu * [b371f1aed] : Moved counted_processes variable into shm 2019-02-02 Nick Altmann * [1cefc5105] : deb packaging: remove mi_json module 2019-02-02 Nick Altmann * [0c4a6ff03] : rpm packaging: remove mi_json module 2019-02-01 Liviu Chircu * [13d77ed4b] : freeswitch_scripting: Remove dead code 2019-02-01 Liviu Chircu * [fd35cfd40] : freeswitch_scripting: Fix startup crash with no modparams Thanks to Bogdan for catching this one 2019-02-01 Vlad Patrascu * [7aed4c179] : clusterer: fix description of 'state' column in db schema Closes #1595 2019-02-01 Liviu Chircu * [d81b3d481] : doc/build-contrib.sh: Properly handle the 3.0 renames The 3.0 module renames are: * mi_http -> mi_html * mi_json -> mi_http This completes commit ca50f4ae7bc57. 2019-01-31 Vlad Patrascu * [ec467869b] : Merge branch 'master' of github.com:OpenSIPS/opensips 2019-01-31 Vlad Patrascu * [ab3516b44] : Merge branch 'mi_rework' 2019-01-31 Bogdan-Andrei Iancu * [5a56d90a9] : Added support for tagging listening interfaces A listerner may have a TAG defined - this TAG can be used for searching for the listener 2019-01-31 Bogdan-Andrei Iancu * [2457c138d] : Some code cleanup. Remove unused old function Make static new_sock_info() as it is only locally used. 2019-01-31 Razvan Crainea * [d6adae157] : cfg: add interface tagging 2019-01-31 Razvan Crainea * [d5f2f69fa] : cfg: rework listen parameters specifications 2019-01-31 Bogdan-Andrei Iancu * [bcf0ab687] : Added function prototype for setting a socket alias. (work in progress) 2019-01-30 Vlad Patrascu * [7fe50a4cc] : ratelimit: avoid incorrect unlock on error in 'rl_list' MI command 2019-01-30 Vlad Patrascu * [2b57fa5ed] : pi_http: fix parameter type for httpd access callback 2019-01-30 Vlad Patrascu * [412feb07f] : db_virtual: fix output of 'db_get' MI command 2019-01-30 Vlad Patrascu * [ec2472cb1] : lua: remove old leftover MI commands export 2019-01-30 Vlad Patrascu * [2c365775d] : perl: port MI commands to jsonrpc 2019-01-30 Vlad Patrascu * [0b9f10d66] : lua: port MI commands to jsonrpc 2019-01-30 Vlad Patrascu * [e40efadea] : compression: remove useless variable 2019-01-30 Vlad Patrascu * [ec20123e0] : b2b_entities: port MI commands to jsonrpc 2019-01-30 Vlad Patrascu * [aeffaa85f] : presence: port MI commands to jsonrpc 2019-01-30 Vlad Patrascu * [d709d59a3] : sst: port dialog mi context callback to jsonrpc 2019-01-30 Vlad Patrascu * [e5a8687ed] : qos: port dialog mi context callback to jsonrpc 2019-01-30 Vlad Patrascu * [e6881b621] : clusterer: fix possible bad sharing tags states after broken links This patch fixes cases where an inconsistent state of active on multiple nodes may occur for a tag after a transition from backup, if a node fails to send the notification to other nodes due to broken links. 2019-01-30 Liviu Chircu * [94d2f0594] : Avoid errors on "$rU = ;" statements 2019-01-29 Vlad Patrascu * [ad8d40c3b] : clusterer: complete previous fix 2019-01-29 Vlad Patrascu * [a3d5a7984] : clusterer: fix crash introduced in previous commit Also do not reset the capabailities states after running 'clusterer_reload'. 2019-01-29 Vlad Patrascu * [0dc0ee543] : clusterer: fix loss of capabilities when doing clusterer_reload 2019-01-28 Ryan Bullock * [9ceda019c] : Don't clip notify socket to older rtpproxies when using unix sockets 2019-01-28 Ryan Bullock * [1d3dfdeb7] : Disable Expect: 100-continue behavior for large posts 2019-01-28 Ovidiu Sas * [2edf188d3] : uac_registrant: allow clustered registrations only from clustered nodes 2019-01-28 Bogdan-Andrei Iancu * [e0e3b96fa] : Improved db docs on uac registrant table 2019-01-28 Bogdan-Andrei Iancu * [76903e1d2] : Added fucntions to load/unload the context of another dlg. For script, using the callid, you can load the context of that call (and later unload it). By loading the ctx, you can access dlg vals, profiles, acc related to that dialog. Docs are still missing :P 2019-01-27 OpenSIPS * [2e2b72443] : Rebuild documentation 2019-01-25 Vlad Patrascu * [ee52ad760] : cgrates: remove useless variable 2019-01-25 Vlad Patrascu * [5a1b7e9e6] : usrloc: remove unused variable 2019-01-25 Bogdan-Andrei Iancu * [4e2a312c8] : Fixed un-init fields in callback params. Better do a generic memset rather than relying on per-field init. 2019-01-24 Razvan Crainea * [7159ab4a0] : smpp: add db_url to documentation 2019-01-24 Alexey Vasilyev * [e1c48c2f9] : Allow IPv6 address in hostname 2019-01-24 Nick Altmann * [d2201adf7] : rpm packaging: add new proto_smpp module 2019-01-23 Vlad Patrascu * [1dd264f82] : mi_html: adhere to the new JSON-RPC mechanism 2019-01-23 Liviu Chircu * [f9a4874f6] : avpops: Make an empty avp_print() more obvious 2019-01-23 Liviu Chircu * [0c5724624] : get_avp_val(): Remove unnecessary assignment 2019-01-23 Razvan Crainea * [cea0e9807] : smpp: re-assign refactoring to Victor 2019-01-23 Razvan Crainea * [db4ccba78] : smpp: add contributors file to readme 2019-01-23 Razvan Crainea * [7392a7aec] : smpp: add final documentation 2019-01-23 Razvan Crainea * [a777fe94b] : smpp: add unique key 2019-01-23 Razvan Crainea * [5b70bb5b9] : smpp: add default values for fields 2019-01-23 Razvan Crainea * [c1b73cdc8] : smpp: add initial documentation for the module 2019-01-23 Razvan Crainea * [029d9a93a] : smpp: rework TCP connections 2019-01-23 Razvan Crainea * [f79ae9a4e] : smpp: add db schmea 2019-01-23 Razvan Crainea * [336808f98] : smpp: indicate smsc to smpp_send_message() 2019-01-23 Razvan Crainea * [a14bf5098] : smpp: add configurable smpp_send_timeout 2019-01-23 Razvan Crainea * [87d5a8bad] : smpp: add better sessions management 2019-01-23 Razvan Crainea * [dcd0b9b0c] : smpp: make db columns cusomizable 2019-01-23 Razvan Crainea * [10073f82e] : smpp: implement max msg 2019-01-23 Razvan Crainea * [963587e0f] : proto_smpp: add name in column 2019-01-23 Razvan Crainea * [09b422661] : proto_smpp: refactor code in multiple files 2019-01-23 Razvan Crainea * [f7846ef3b] : proto_smpp: arrange licence 2019-01-23 Razvan Crainea * [4ce1ddc34] : proto_smpp: remove unused code 2019-01-23 Victor Ciurel * [0e8dbc5bf] : Add more configurabilit via database 2019-01-23 Victor Ciurel * [68066b529] : Too complicated to split up: SMSC functionality for OpenSIPS, more bind and enquire_link tweaks, temporary debug code, unify bind*, and submit/deliver 2019-01-23 Victor Ciurel * [294297f45] : Add support structures for bind response commands 2019-01-23 Victor Ciurel * [644512a80] : Add outbind info, ton and npi in session structures 2019-01-23 Victor Ciurel * [1e716828f] : Better support for submit_sm and deliver_sm in structures 2019-01-23 Victor Ciurel * [69c4b3782] : Add optional parameters structure support 2019-01-23 Victor Ciurel * [8922fb6c7] : Devine better session types 2019-01-23 Victor Ciurel * [0582bb1bf] : Define better sessions states 2019-01-23 Victor Ciurel * [e68273b20] : Forward messages to SIP using tm api 2019-01-23 Victor Ciurel * [8951d4fbd] : Forgot return 0 2019-01-23 Victor Ciurel * [f0b5774fb] : Start binding sessions at child init 2019-01-23 Victor Ciurel * [f0e178797] : Start using enquire_link messages 2019-01-23 Victor Ciurel * [c7264f4fb] : Add basic support for enquire_link 2019-01-23 Victor Ciurel * [041a12ed7] : Change global sessions for flexibility 2019-01-23 Victor Ciurel * [15002f856] : Use database values instead of hardcoded session values 2019-01-23 Victor Ciurel * [4becb7330] : Add database functions 2019-01-23 Victor Ciurel * [6dda82061] : Stop binding when sending a SIP->SMPP message 2019-01-23 Victor Ciurel * [5a6d3ee9b] : Fix some logs 2019-01-23 Victor Ciurel * [4b3daa684] : Fix some spacings 2019-01-23 Victor Ciurel * [a1dd9124f] : Initial commit (basic communication) 2019-01-23 Liviu Chircu * [9569c2c8e] : doc/build-contrib.sh: Add new contributors 2019-01-23 Liviu Chircu * [00504b1a8] : clusterer: Do not segfault on failed OpenSIPS startup 2019-01-23 Liviu Chircu * [32ec7a291] : fraud_detection: Fix hash-level locking issues This patch prevent some rare occassions when, due to too-loose locking, fraud_detection could run into either: * SHM memory leaks * incorrectly processed counters (corrupt stats) 2019-01-23 Liviu Chircu * [b491999b2] : Fix poorly managed route param recursion level on an error state 2019-01-22 Vlad Patrascu * [7338e6941] : mi: fix crash if parameter name is empty 2019-01-22 Vlad Patrascu * [37ec8d44c] : mi_xmlrpc_ng: adapt module to the new MI api 2019-01-22 Ovidiu Sas * [b2485daba] : scripts: update db scripts related to registrant table 2019-01-22 Ovidiu Sas * [32df966f1] : db/schema: update registrant table description 2019-01-22 Ovidiu Sas * [7de4b0afc] : uac_registrant: fix cluster_shtag init for registrant internal record 2019-01-20 OpenSIPS * [6794a665b] : Rebuild documentation 2019-01-18 Bogdan-Andrei Iancu * [6250ee3fd] : Fixed un-init 'display' field 2019-01-18 Liviu Chircu * [d47b51604] : registrar: Fix incomplete commit d2a958dca Many thanks to @fedorna for catching this one! Fixes #1588 2019-01-18 Liviu Chircu * [948089ab0] : usrloc: Match default setting to the docs 2019-01-18 Liviu Chircu * [afa4f044d] : Merge branch 'feature/usrloc-sharing-tags' 2019-01-18 Liviu Chircu * [54393970c] : usrloc: Properly parse the 'pinging_mode' values 2019-01-18 Liviu Chircu * [bfb3e6cf4] : usrloc: Avoid an unwanted error on a bad runtime preset 2019-01-18 Bogdan-Andrei Iancu * [bece05130] : Added restart persistency for dialoginfo data. 2019-01-18 Liviu Chircu * [e06f0bf5f] : usrloc: Replicate the K/V store on contact inserts 2019-01-18 Liviu Chircu * [b66de01e7] : nathelper: Fix segfault while interpreting the branch value (cherry picked from commit 81f6ac78649d17372d6183a97403514281c537e0) 2019-01-18 Liviu Chircu * [81f6ac786] : nathelper: Fix segfault while interpreting the branch value 2019-01-17 Ovidiu Sas * [b12ad62f0] : scripts: remove uri_db table 2019-01-17 Liviu Chircu * [4c80e34f4] : mid_registrar: Document the newly added parameter 2019-01-17 Liviu Chircu * [b7aa35a48] : mid_registrar: Add optional "ownership_tag" save() parameter 2019-01-17 Liviu Chircu * [1e2caeb9a] : registrar: Document "ownership_tag" 2019-01-17 Liviu Chircu * [8c763ad66] : registrar: Add an optional "ownership_tag" parameter to save() 2019-01-17 Liviu Chircu * [04bd0ac39] : usrloc: Implement the "ownership" pinging mode 2019-01-17 Liviu Chircu * [8a159d0ae] : usrloc: Add the "shtag" parameter to E_UL_CONTACT events 2019-01-17 Liviu Chircu * [4870fa635] : usrloc: Make shtags persistent on restart + replication 2019-01-17 Liviu Chircu * [8837dad66] : usrloc: Add/Document the 'pinging_mode' modparam Replaces 'shared_pinging', which is now deprecated. 2019-01-17 Bogdan Andrei IANCU * [53ffcdd64] : Merge pull request #1587 from ar45/fix_error Removed extra invalid line 2019-01-17 Razvan Crainea * [4c29eedc3] : 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 2019-01-17 Aron Podrigal * [60b4b7923] : Removed extra invalid line Extra line was added by 4f6dd0654cbb9 2019-01-16 Liviu Chircu * [354547835] : usrloc: Add optional sharing tags for the insert/update API 2019-01-16 Liviu Chircu * [5331dcaad] : usrloc: Fix a rare key reallocation bug 2019-01-16 Liviu Chircu * [e149ee489] : usrloc: Refactor clustering file structure 2019-01-15 Ovidiu Sas * [fecf154f4] : scripts: update scripts for uri table (uri->auth_db) 2019-01-15 Ovidiu Sas * [10fd6e2b8] : db/schema: fix Makefile for oracle clean option 2019-01-15 Vlad Patrascu * [725b8ef02] : mi_datagram: adhere to the new JSON-RPC mechanism 2019-01-15 Vlad Patrascu * [9fbcbce84] : pua_mi: port MI commands to jsonrpc 2019-01-13 OpenSIPS * [d1c0c228d] : Rebuild documentation 2019-01-11 Bogdan-Andrei Iancu * [4f6dd0654] : Fixes related to the forking support Testing in progress 2019-01-11 Bogdan-Andrei Iancu * [d8ec4b7f3] : [pua_dialoginfo] Added per-branch entity support Using the newly added dialoginfo_set_branch_callee(callee) function in Branch Route, you can set a per-branch enity value for publishing. 2019-01-10 Bogdan-Andrei Iancu * [b995d6b9a] : Added parallel and serial forking support Each branch (destination at transaction level) creates a different dialog-info session. This opens the gates for parallel and serial forking scenarios with BLF. Next step - set different callers (peers) for each branch. TODO: implement the storing into DB and restoring from DB during restarts 2019-01-10 Vlad Patrascu * [21ceb1f92] : clusterer: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [41b7587a5] : freeswitch_scripting: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [c944d2fb7] : rtpproxy: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [39179df17] : rtpengine: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [625bb6ed4] : usrloc: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [e5faa4ac1] : dialplan: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [f38c1f984] : permissions: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [636871ae2] : gflags: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [7c9941682] : benchmark: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [68455de9d] : load_balancer: port MI commands to jsonrpc api 2019-01-10 Vlad Patrascu * [9938b5b24] : imc: port MI commands to jsonrpc api 2019-01-10 Vlad Patrascu * [68816772a] : drouting: port MI commands to jsonrpc api 2019-01-10 Vlad Patrascu * [031b0879b] : dispatcher: port MI commands to jsonrpc api 2019-01-10 Vlad Patrascu * [3a7e14f24] : tm: port MI commands to jsonrpc api 2019-01-10 Vlad Patrascu * [6a3b362f7] : b2b_sca: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [a40d3544a] : cfgutils: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [d9c890d33] : regex: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [6c3258f0f] : userblacklist: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [a2b4cfda2] : rls: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [ea5296f5d] : xcap_client: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [3c3fac8fd] : domain: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [dc5d586e3] : fraud_detection: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [62b279927] : ratelimit: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [ffe3c07d4] : pike: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [7cd36f980] : sql_cacher: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [7a298387a] : pi_http: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [536b7e5a5] : event_flatstore: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [4c112b465] : cachedb_local: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [5ee87a84c] : db_virtual: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [3b67f8016] : db_text: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [7bcf10bad] : db_flatstore: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [641898514] : db_berkeley: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [e8d213f5b] : tls_mgm: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [4acbc9ba8] : siptrace: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [c072c78e5] : sipcapture: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [16b2f58bd] : proto tls/ws/wss: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [57efe171b] : cpl_c: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [6bfa81b50] : carrierroute: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [eb8c94d5f] : mi api: allow floats and wider integers in the json response This commit changes the add_mi_int()/init_mi_result_int() functions to add_mi_number()/init_mi_result_number() which now take a double parameter instead of an int. 2019-01-10 Vlad Patrascu * [ca5fa4bec] : uac_registrant: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [389904836] : nathelper: port MI commands to jsonrpc 2019-01-10 Vlad Patrascu * [011a58d2f] : Fix several issues with subscribers_list MI command * fix command recipes array init * fix bogus null pointer error check * fix json output structure 2019-01-10 Vlad Patrascu * [84418a203] : dialog: fix initialization of MI command exports array 2019-01-10 Vlad Patrascu * [5d14501cc] : call_center: port MI commands to jsonrpc api 2019-01-10 Vlad Patrascu * [ce62ca261] : b2b_logic: port MI commands to jsonrpc api 2019-01-10 Vlad Patrascu * [af75f4873] : dialog: port MI commands to jsonrpc api 2019-01-10 Vlad Patrascu * [fe8fcb026] : mi api: simplify init_mi_error(); add init_mi_error_extra() 2019-01-10 Bogdan-Andrei Iancu * [aaa6b6867] : Fixed delays in timer reset and negative ACks due callbacks. Move the TMCB_MSG_MATCHED_IN and TMCB_MSG_MATCHED_IN callbaks triggering after reseting the retansmission and final response timers and after auto-firing the ACK for negative replies. We do not want any delays on this actions due long processing in the callbacks (some are used by siptracing, so there might be some delay due networking) 2019-01-10 Razvan Crainea * [3c573f01e] : mi_fifo: do not skip command in case of invalid Thanks go to Vlad Patrascu for reporting it 2019-01-10 Bogdan-Andrei Iancu * [de513e56b] : Fixed un-init variable, thanks to Travis 2019-01-10 Razvan Crainea * [1e0349ff2] : tm/cluster: don't send replies for transactions not found 2019-01-10 Razvan Crainea * [baabbfbe4] : opensipsctl: rework fifo to use the JSON-RPC temporary change to only run plain MI commands 2019-01-10 Razvan Crainea * [1b6521299] : mi_fifo: update docs according to JSONRPC change 2019-01-10 Razvan Crainea * [c748145b2] : mi_fifo: adhere mi_fifo to the new JSONRPC mechanism TODO: handle async responses 2019-01-10 Razvan Crainea * [79b47326b] : mi: add print_mi_response_flush function This function can be used to print the jsorpc response in a limited size buffer. 2019-01-10 Razvan Crainea * [2f8a72533] : cJSON: add cJSON_PrintFlushed function This function can be used to flush the json tree built 2019-01-10 Bogdan-Andrei Iancu * [53c5388ca] : Major rework to store all data as param callback. Avoid computing and re-computing same data each time when an event is to tiggerer. Try to do as much processing as possible in the very beginning, and simplify the ops later. 2019-01-09 Bogdan-Andrei Iancu * [fad1c374e] : Same cleanup and re-organizing The dialog ID is composed of call-id and an extra number -> prepare the groud for per-branch dialog-info sessions. Register into TM module so we can have access to the incoming replies also (so we can publish the correct callee status, if multiple dialog-info sessions) Pass the flags as parameters of the callback, instead of dlg_vals - much simpler. Removed useless memset (are done by parse_to() function) Work in progress for adding serial & parallel forking support in pua_dialoginfo 2019-01-09 Bogdan-Andrei Iancu * [ee508ad0c] : [lecithin commit] adding forgotten files Part of dcb6ed37c93e9cf3ef111cca783498882880a702 2019-01-09 Razvan Crainea * [29457ddce] : clusterer: fix ternary operator precedence Reported by Travis compiling with clang 2019-01-09 Ovidiu Sas * [7829916b8] : httpd: Handle Content-Type: text/html and enhance some err logs 2019-01-08 Bogdan-Andrei Iancu * [dcb6ed37c] : Added clustering support (work in progress) Each registation may have a sharing tag mapped. The actual registration will be performed only by the node (in the cluster) having that sharing tag as active. The module will listen for all the changes of the sharing tag status, to see when the local node becomes active for one of its own tags -> if so, it must fire out all the registrations marked with that tag. Still to be done: the unregister all and register when becoming active. 2019-01-08 Razvan Crainea * [a481483f9] : cgrates: provide originhost if used in Init 2019-01-08 Razvan Crainea * [ae28a561f] : cgrates: don't add listeners in external processes Credits go to Teofil Voivozeanu (GitHub TeoV) for reporting this. 2019-01-08 Razvan Crainea * [69a5728f3] : cgrates: add support for fetching sessions Closes #1405 Credits go to Teofil Voivozeanu (GitHub TeoV) for providing info and testing support 2019-01-08 Bogdan-Andrei Iancu * [0613266e2] : Fixed condition on active sharing tag 2019-01-08 Razvan Crainea * [b819ecdbd] : mi_http: fix module's name 2019-01-08 Bogdan-Andrei Iancu * [5cc63c721] : Extend the sharing tags support Rename shtag_set() to shtag_activate() as only an ACTIVE state is allowed to be set. Added support for sharing tags callbacks - the callback may be used to be triggered upon the change in state of a sharing tag. 2019-01-08 Razvan Crainea * [2fab4802c] : cgrates: make sure cdrs are generated on the spot for expired 2019-01-08 Razvan Crainea * [a924482ad] : mi/core: add "all" token to version command When using this parameter, opensips also returns the git/svn revision. 2019-01-07 Liviu Chircu * [6449d4510] : b2b_logic: Fix doc build 2019-01-05 Bogdan-Andrei Iancu * [45fa0deca] : Fixed serveral XML errors 2019-01-05 Bogdan-Andrei Iancu * [463f7329f] : Improve the docs on the new $cluster.sh_tag() var 2019-01-05 Bogdan-Andrei Iancu * [d40350504] : Added $cluster.sh_tag() script variables These are read/write variables for managing the sharing tags from script level Ex: $cluster.sh_tag(vip/3) 2019-01-04 Bogdan-Andrei Iancu * [b3e0f6cc9] : [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 2019-01-04 Bogdan-Andrei Iancu * [ccaa136e6] : [MI] Even the 'kill' cmd should return a valid reply 2019-01-04 Bogdan-Andrei Iancu * [c1cfba880] : [mi_xmlrpc_ng] Fix methodResponse XMLRPC formating The 'struct' tag must be enclosed in a 'value' tag. Fixes #1499 2019-01-04 Liviu Chircu * [0062ef084] : mid_registrar: Fix incorrect error log 2019-01-04 Bogdan-Andrei Iancu * [61fd24f04] : Fix typo in docs 2019-01-04 Bogdan-Andrei Iancu * [a03c2e8c6] : [nat_traversal] Added clustering support Only the nodes owning the active tag will be able to do the pinging to the contacts. 2019-01-04 Bogdan-Andrei Iancu * [14c3570dd] : [nathelper] Added clustering support Only the nodes owning the active tag will be able to do the pinging to the contacts. 2019-01-03 Bogdan-Andrei Iancu * [6c2816663] : Added async support for the postgres queries. async statement can be used now for queries via the Postgres backend 2019-01-03 Bogdan-Andrei Iancu * [2e1e1e983] : [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 2018-12-22 Razvan * [effaf925c] : cgrates: don't serialize dlg vals for deleted dlgs 2018-12-21 Razvan Crainea * [d87766364] : 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 2018-12-21 Bogdan Andrei IANCU * [a188dac0f] : Merge pull request #1554 from fgast/cachedb-local-cluster add clusterer replication capabilty to cachedb_local 2018-12-20 Fabian Gast * [8815a88c7] : Add missing include 2018-12-20 Fabian Gast * [8d654f4b9] : Update PR #1554 as requested. 2018-12-20 Fabian Gast * [d6532f900] : add clusterer replication capabilty to cachedb_local 2018-12-20 Razvan Crainea * [7dd023c25] : dialog: do not replicate update messages on early This suppresses some errors generated by incomplete replicate messages (missing callee socket, tags, etc.) 2018-12-20 Bogdan-Andrei Iancu * [16820244e] : Code cleanup and re-arranging 2018-12-19 Bogdan-Andrei Iancu * [1b82dfebe] : Code cleanup and re-arranging 2018-12-19 Bogdan-Andrei Iancu * [71a29b4a5] : Added clustering support. Added cluster replication for changes in the status of the destination; Added sharing tags (via the clusterer module) in order to control: 1) which node is responsible for probing destination 2) which node is allowed to broadcast changes of the destinatio status Related to #1532 2018-12-19 Vlad Patrascu * [30e4edbb5] : dialog: use clusterer module's global sharing tags Drop the dialog module's private implementation of the sharing tags mechanism in favor of the global one exposed through the clusterer module api. 2018-12-19 Vlad Patrascu * [8074ef416] : clusterer: improve locking in shtag_get_all_active() Aquire lock for reading instead of switchable reading as switching to write never happens. 2018-12-19 Vlad Patrascu * [c87e2391e] : clusterer: export sharing tags state values in module api 2018-12-19 Bogdan-Andrei Iancu * [1df3551db] : remove define from .h as not to be shared 2018-12-19 Bogdan-Andrei Iancu * [1e35f066d] : Enhanced the clustering support. Added sharing tags (via the clusterer module) in order to control: 1) which node is responsible for probing destination 2) which node is allowed to broadcast changes of the destinatio status Related to #1532 2018-12-19 Bogdan-Andrei Iancu * [e35e3bd00] : Small fixes in docs 2018-12-19 Bogdan-Andrei Iancu * [95a1f0364] : Fixed mis-used old variable. Related to the transition to global sharing tag in clusterer 2018-12-19 Bogdan Andrei IANCU * [d600b4b0c] : Merge pull request #1539 from fgast/notify_on_event-timeout-var add $var() support for timeout to notify_on_event & wait_for_event 2018-12-19 Fabian Gast * [1bcca8a37] : Update PR#1539 as requested 2018-12-18 Liviu Chircu * [4b697f375] : Fix more bad "method ==" examples Completes 8370a8d7 2018-12-18 Bogdan-Andrei Iancu * [8370a8d7f] : Fix example in module docs. The 'method' keyword is obsolete and replaced with is_method() Reported by VozToVoice Net. 2018-12-18 Bogdan-Andrei Iancu * [e0e495831] : Enhanced the clustering support. Added sharing tags (via the clusterer module) in order to control: 1) which node is responsible for probing the gateways 2) which node is allowed to broadcast changes of the gw/carrier status Related to #1532 2018-12-18 Bogdan-Andrei Iancu * [24ebbbe42] : 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. 2018-12-18 Liviu Chircu * [d2a958dca] : registrar / mid_registrar: Fix lookup() with a custom AoR Thanks to Antonis Psaras (@apsaras) for reporting! Fixes #1571 2018-12-18 Vlad Patrascu * [88ef12170] : mmgeoip: fix gcc compile warning 2018-12-18 Vlad Patrascu * [4272fcee0] : mmgeoip: update driver to support GeoIP2 Closes #1362 2018-12-17 Razvan Crainea * [ae10e1aab] : cgrates: serialize variables in a different var This prevents ongoing sessions from being overwritten by the serialized value. 2018-12-17 Razvan Crainea * [57f142bde] : 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. 2018-12-15 Bogdan-Andrei Iancu * [59d06289f] : Migrate sharing tags to the global ones offered by clusterer module 2018-12-14 Bogdan-Andrei Iancu * [d313b0a6f] : Added global suppor for sharing tags. The sharing tags (used by cluster-enabled modules to share the actions over same data entity across the whole cluster) are now managed by the clusterer module. The dialog and presence modules will drop their own private implementation. New module parameter: * sharing_tag -> tag_name/cluster_is = active/backup New MI functions: * clusterer_list_shtags - lists all know sharing tags and their status * clusterer_shtag_set_active - force a tag to become active on this node 2018-12-14 Vlad Patrascu * [babf6faa8] : clusterer: fix memory leak in cluster_send/broadcast_mi MI commands 2018-12-14 Vlad Patrascu * [18bb0b8dd] : clusterer: fix multiple triggerings for node state changed events 2018-12-13 Razvan Crainea * [b84e25988] : db_id: init ipv6_flag to 0 Without initializing this flag, db_urls were no longer parsed properly. 2018-12-13 Razvan Crainea * [624317765] : 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 2018-12-11 Liviu Chircu * [5c0d8a4df] : dispatcher: Remove unnecessary flag error checks 2018-12-11 Bogdan Andrei IANCU * [bd76bd64a] : Merge pull request #1558 from vasilevalex/cachedb_url_ipv6 Cachedb and db correct parsing URL with ipv6 address 2018-12-11 Bogdan-Andrei Iancu * [a791460db] : Extra compiling fix Related to b90a34c54bf747958544c66502f406cc4b935fb6 2018-12-11 Liviu Chircu * [c4641af18] : seas: Fix compile error (cherry picked from commit 416a87122fbfb09605e327103a64bf0b578ddf16) 2018-12-11 Bogdan-Andrei Iancu * [1076bbbac] : Fixed compile warning (include file missing) Related to b90a34c54bf747958544c66502f406cc4b935fb6 (cherry picked from commit c4578e1503baf921d2a1ca813999b83538b79673) 2018-12-11 Liviu Chircu * [e54470ea6] : dialog: Fix compile errors (cherry picked from commit 99f306a5d63e4826fe82891355e15d54da71842b) 2018-12-11 Bogdan-Andrei Iancu * [f71ddc272] : Remove circular include. Reported by Peter Lemenkov (@lemenkov) Addresses #1562 (cherry picked from commit b90a34c54bf747958544c66502f406cc4b935fb6) 2018-12-11 Razvan Crainea * [eeb6b5bd3] : drouting: enforce gwid format check Make sure the gwid of a gateway complies with a specific format, otherwise it will not be able to be used in a gwlist, either in carrier or in a rule. 2018-12-10 Alexey Vasilyev * [bfbfa83ba] : db: correct parsing ipv6 address for host 2018-12-10 Alexey Vasilyev * [084ab2c38] : cachedb: correct parsing ipv6 address for host 2018-12-07 Razvan Crainea * [489589c03] : event_flatstore: add param to suppress event's name 2018-12-03 Bogdan-Andrei Iancu * [588bb6450] : 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. (cherry picked from commit 5f1ec371b00b0bf8e16e37b94b010517572e88e5) 2018-12-03 Liviu Chircu * [52e3ada3a] : 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. 2018-12-03 Razvan Crainea * [84bf5f3b0] : event_jsonrpc: fix yet busy flag value This time the flag was overlapping with event_flatstore one. More details in #1533 2018-11-29 Dan Pascu * [0fb0849ad] : Fixed segfault when resource list document is not found 2018-11-28 Razvan Crainea * [0d8197478] : mongodb: remove deprecated is_error() in json-c 0.13 2018-11-27 Razvan Crainea * [e7fa92cc2] : rtpengine: fix checking "cached" stats Credits go to Nick Altman for reporting this in ticket #1500 2018-11-27 Razvan Crainea * [be3b60366] : 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! 2018-11-27 Bogdan Andrei IANCU * [756542757] : Merge pull request #1549 from vasilevalex/tls_mgmt_ipv6 Correct parsing IPv6 address 2018-11-27 Bogdan-Andrei Iancu * [2fa7389b9] : Improve docs A bit more details on handling GRUU. Thanks to Robert Dyck for contributing on this. 2018-11-27 Alexey Vasilyev * [7b2a296da] : Correct parsing IPv6 address 2018-11-26 Liviu Chircu * [3f698a26c] : Logging: Fix missing '\n' endings 2018-11-26 Liviu Chircu * [20f13a53d] : 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 2018-11-26 Razvan Crainea * [25fb33ee7] : b2b_logic: use late negociation for last ACK using MI bridge 2018-11-26 Bogdan-Andrei Iancu * [0ccda2e24] : 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 2018-11-26 Razvan Crainea * [3659b848f] : b2b: make the dialog matching logic more relaxed When bridging an entity, instead of matching the B2B dialog only by B2B key (which is basically impossible to find out unless you run b2b_list), from now on one can also use the `B2B.entity.key;from_tag;to_tag`. 2018-11-26 Razvan Crainea * [abe988a2d] : tm: fix avp add error check 2018-11-26 Liviu Chircu * [770ff565f] : acc/dialog: Drop redundant operations 2018-11-25 OpenSIPS * [2b0ce6e36] : Rebuild documentation 2018-11-22 Bogdan Andrei IANCU * [340adcdfb] : Merge pull request #1543 from ar45/fix_1537 Fixed what was missed out in 6bc2a94 2018-11-22 Liviu Chircu * [9cd25a74e] : acc: Fix previous commit Optimize storage space -- don't store entire buffer, rather only the useful part of it... 2018-11-22 Liviu Chircu * [d75644994] : 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 * [3462e8906] : Fixed what was missed out in 6bc2a94 refs #1537 2018-11-22 Bogdan-Andrei Iancu * [2a96e2052] : 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 (cherry picked from commit 95bf163ae951fe145c4735682f8949dc1626abb0) 2018-11-22 Bogdan-Andrei Iancu * [6bc2a94c8] : 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 2018-11-22 Razvan Crainea * [ca643dee0] : 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! 2018-11-22 Razvan Crainea * [d72f85d9f] : b2b_logic: fix doc useless phrase 2018-11-20 Fabian Gast * [d6222f8fb] : add $var() support for timeout to notify_on_event & wait_for_event 2018-11-19 Liviu Chircu * [6eb14f6a3] : 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. 2018-11-19 Vlad Paiu * [b0bf92707] : Fixed dr_number_routing crash with empty partition 2018-11-19 Liviu Chircu * [15e7b23cc] : Merge pull request #1534 from fgast/new-iana-url sipmsgops: Fix changed URL in documentation 2018-11-19 Fabian Gast * [97dbc56a4] : Fix changed iana url 2018-11-18 OpenSIPS * [b89bf4bb8] : Rebuild documentation 2018-11-16 Liviu Chircu * [2196fbc96] : tm: Improve code readability 2018-11-16 Liviu Chircu * [853755f11] : 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. 2018-11-16 Liviu Chircu * [f18be86a5] : tm: Drop redundant function parameter 2018-11-15 Razvan Crainea * [8bbc18588] : event_jsonrpc: use an unique flag for declaring events 2018-11-14 Liviu Chircu * [8f73149b2] : rest_client: Fix swapped parameters Affected functions: async rest_post() and async rest_put(). Reported by Ben Newlin. 2018-11-14 Razvan Crainea * [2bee3c6df] : rtpengine: reconnect socket in case of bad fds 2018-11-13 Bogdan-Andrei Iancu * [42934c424] : Fix annoying bogus error log 2018-11-12 Liviu Chircu * [ae32d8e48] : dialog: Fix outdated warning 2018-11-11 OpenSIPS * [02ca3eb8b] : Rebuild documentation 2018-11-11 Liviu Chircu * [6ae80c867] : build-contrib.sh: Update mod_renames Do not rename the modules before actually merging "mi_rework"... 2018-11-11 Liviu Chircu * [ca50f4ae7] : build-contrib.sh: Prepare for upcoming module renames This patch extends the "mod_renames" array logic to allow specifying modules renamed to older module names (name repurposing) while properly keeping track of their histories. 2018-11-10 Liviu Chircu * [03c910bdf] : 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 2018-11-09 Vlad Patrascu * [3b1c13a74] : sql_cacher: small doc improvement regarding delimiter parameters 2018-11-09 Razvan Crainea * [8c8d3b632] : tls_mgm: a bit of cleanup of the tls methods removed *_cli and *_srv methods, since nobody uses them 2018-11-08 Razvan Crainea * [c5d6c0872] : tls_mgm: fix tls_method for openssl >= 1.1.0 Reported by netaskd(GitHub) in #1517 2018-11-08 Bogdan-Andrei Iancu * [9a3b280b7] : 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. (cherry picked from commit a9eba1f38f1cdf70c7b58f145fea7c030aa7ef4d) 2018-11-08 Razvan Crainea * [54ca97b50] : 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. 2018-11-05 Liviu Chircu * [41fd98ea2] : 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 2018-11-05 Liviu Chircu * [3650af33b] : usrloc: Fix possible crash in federation mode 2018-11-05 Liviu Chircu * [5dee6cd8e] : opensipsctl trap: Be quiet if opensips is not running 2018-11-05 Liviu Chircu * [2bf9d2452] : rtpengine: Fix doc build 2018-11-02 Vlad Patrascu * [3642e3f9e] : 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. 2018-11-02 Razvan Crainea * [37c56cf39] : dialog: enhance LOADED and EXPIRED callbacs docs 2018-11-02 Bogdan Andrei IANCU * [38a1c8bf2] : Merge pull request #1521 from fgast/fix-clusterer-doc fix quotes in clusterer documentation 2018-11-02 Vlad Patrascu * [f511f1c73] : dialog: do not unnecessarily fetch sharing tag state 2018-11-02 Vlad Patrascu * [596c39d90] : 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. 2018-11-02 Fabian Gast * [af8c95bfa] : fix quotes in clusterer documentation 2018-11-01 Razvan Crainea * [7c13f2e7d] : 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. 2018-11-01 Bogdan-Andrei Iancu * [e4868acfb] : Improve login whne get_out_socket() fails. If no listener is found, print the outbound IP picked by OS and the destination IP. 2018-11-01 Bogdan-Andrei Iancu * [94b557f93] : 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. (cherry picked from commit e3dca71eed1a5e7607bc58dff1ff8cf9ed4f8dc0) 2018-11-01 Liviu Chircu * [9094b5515] : HP_MALLOC: Recover from double pointer free Similar idea to commit 2254d00115. Related to #1518. 2018-10-31 Razvan Crainea * [df898b08b] : rtpengine: proper handler when body is not returned 2018-10-31 Razvan Crainea * [dca22b048] : stun: prevent buffer overflow on error 2018-10-31 Nick Altmann * [af868bc86] : RPM spec: remove uri module 2018-10-30 Razvan Crainea * [a27797d04] : rtpengine: provide raw body to rtpengine_*() 2018-10-30 Razvan Crainea * [8178669d9] : trans/sdp: add sdp.stream 2018-10-30 Razvan Crainea * [e7d6c7202] : trans/sdp: rename stream-del enum 2018-10-30 Bogdan-Andrei Iancu * [4eab5bc1d] : Remove URI module (was split over other modules) 2018-10-30 Bogdan-Andrei Iancu * [a04bf76bb] : Simple formating 2018-10-30 Bogdan-Andrei Iancu * [c144be691] : Import aaa_does_uri_exist() & aaa_does_uri_user_exist() from URI module 2018-10-30 Razvan Crainea * [922d89244] : trans/sdp: add stream-delete transformation Use this transformation to delete a stream based on its index or its media type 2018-10-30 Razvan Crainea * [b8e3f61a7] : trans/sdp: fix detection of first line 2018-10-30 Razvan Crainea * [8e936b6c7] : menuconfig: add stdio header 2018-10-29 Liviu Chircu * [20082b28f] : 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 2018-10-29 Bogdan-Andrei Iancu * [1ac9010f4] : 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 2018-10-28 OpenSIPS * [b0c16f7fb] : Rebuild documentation 2018-10-27 Liviu Chircu * [6126c2039] : rest_client: Fix warnings with clang 5.0 2018-10-27 Liviu Chircu * [c41c3bf4e] : rest_client docs: Avoid duplicate XML 2018-10-27 Liviu Chircu * [59da2616a] : rest_client: Update documentation 2018-10-27 Liviu Chircu * [04e2ef3d0] : 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 2018-10-27 Liviu Chircu * [fe5e1b8da] : rest_client: Plug pkg leak on failed async transfers 2018-10-27 Liviu Chircu * [10d9b42c2] : rest_client: Refactor duplicate code 2018-10-27 Liviu Chircu * [a2a8dc78d] : rest_client: Repair poor timeout settings at startup 2018-10-26 Bogdan-Andrei Iancu * [8890a1e62] : 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 (cherry picked from commit 5fa431eb2b95fa7e275c9323a0c139bd3d929050) 2018-10-26 Razvan Crainea * [c20181fa3] : 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. 2018-10-26 Razvan Crainea * [63f0ad718] : bin: fix invalid memory access Inspired from a3a260d7d45868382d00ee366e00000e7badd36a 2018-10-26 Razvan Crainea * [bf74fccad] : proto_hep: reset msg attempts when request is completed 2018-10-26 Razvan Crainea * [6a4bf36ca] : net: reset msg attempts every time a msg is fully processed 2018-10-26 Bogdan-Andrei Iancu * [40c73fc1b] : Fixed wrong error messages. Reported by Nick Altmann 2018-10-25 Vlad Patrascu * [8634f6bec] : Rename 'mi_json' module to 'mi_http' 2018-10-25 Vlad Patrascu * [e99b5f73e] : Rename 'mi_http' module to 'mi_html' 2018-10-25 Vlad Patrascu * [32eeeb940] : mi_json: adapt module to be only a http transport for jsonrpc 2018-10-25 Razvan Crainea * [97dda5bb7] : tm: t_check_trans() return -2 for end-to-end ACKs Using this return code we can detect end-to-end ACKs in script. 2018-10-24 Vlad Patrascu * [52aa14b4f] : mi core: several fixes and improvements * fix error code check when printing mi error response * add some error logs in handle_mi_request() * add option to print mi response in compact form * fix bogus null pointer checks in several core mi command handlers 2018-10-24 Vlad Patrascu * [ca263251c] : httpd: improve the way POST data is retrieved The "upload_data" parameter of the access callback now properly points to the body of the POST request for "application/json" and "text/xml" content types. 2018-10-24 Vlad Patrascu * [f6408470d] : httpd: improve performance by using MHD_run_from_select() By using MHD_run_from_select() instead of MHD_run() we avoid the redundant internal call to select() from MHD_run(). 2018-10-23 Liviu Chircu * [8c4ac521b] : 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 2018-10-22 Vlad Patrascu * [168b1c17b] : httpd: port httpd_list_root_path MI command to the new jsonrpc API 2018-10-22 Razvan Crainea * [36e6c87f0] : rtp*: add errno in error output 2018-10-22 Razvan Crainea * [bd86da3db] : debian: add python module 2018-10-22 Razvan Crainea * [4032ef0ed] : dialog: release bin packet on prof replicate error If the profile cannot be replicated, release the bin packet to prevent pkg memory leak. 2018-10-22 OpenSIPS * [c40f83bde] : Rebuild documentation 2018-10-19 Liviu Chircu * [dc0dbe4ec] : clusterer: Speed up match_node() Empty string conversion was already done when the node was loaded, we can skip the length check. 2018-10-19 Vlad Patrascu * [979603f6d] : Add pkg null terminated strdup function 2018-10-19 Liviu Chircu * [0cf846a1e] : 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. 2018-10-17 Bogdan-Andrei Iancu * [bbb8c97d8] : Merge branch 'nikbyte-flexible-subst' 2018-10-17 Bogdan-Andrei Iancu * [d776fde26] : Fixes and tuning for the substr patch Do not allow negative offset underflow - this was the original behavior Tune checks and ops to translate negative indexes and offsets. 2018-10-17 Bogdan-Andrei Iancu * [6b37dab8b] : Merge branch 'flexible-subst' of https://github.com/nikbyte/opensips into nikbyte-flexible-subst 2018-10-16 Vlad Patrascu * [9dd860d2f] : mi core api: improve handling of invalid request 2018-10-16 Bogdan-Andrei Iancu * [3f04700e3] : Improve docs Add external reference to the advanced ACC tutorial 2018-10-16 Vlad Patrascu * [67fe0b5f8] : mi core api: use preallocated buffer for printing the response 2018-10-16 Dan Pascu * [61cdd1521] : Fixed memory leaks when freeing socket_info 2018-10-16 Dan Pascu * [a3a260d7d] : Fixed illegal memory access after being freed 2018-10-16 Liviu Chircu * [b14f1435e] : siptrace/script_helper: Fix crashes with missing headers Thanks to Ben Newlin and Jon Abrams for spotting this issue! 2018-10-16 Nick Altmann * [db0588c15] : Flexible s.substr transformation {s.substr,offset,length} Return substring starting at offset having size of 'length'. If offset is negative, then it is counted from the end of the value, -1 being the last char. In case of positive value, 0 is first char. Length can be positive or negative. In case length is negative, it is counted from the end of the value, 0 means last character. Example: $var(x) = "abcdefghijk"; $(var(x){s.substr,3,4}) = "defg" $(var(x){s.substr,1,0}) = "bcdefghijk" $(var(x){s.substr,2,-2}) = "cdbcdefghi" $(var(x){s.substr,-5,-3}) = "gh" $(var(x){s.substr,-5,0}) = "ghijk" $(var(x){s.substr,-100,0}) = "abcdefghijk" $(var(x){s.substr,2,100}) = "cdefghijk" $(var(x){s.substr,100,5}) = "" 2018-10-15 Liviu Chircu * [b8b33e9a4] : db_postgres: Fix doc build 2018-10-15 Vlad Patrascu * [27e76f34c] : mi core api: do not lookup command in handle_mi_request() 2018-10-15 Vlad Patrascu * [105bc274f] : mi core api: improve request parsing code * move jsonrpc request object validation to parse_mi_request() * add function that retrieves MI command name * also fix incorrect error in mi tracing when request has no params 2018-10-15 Liviu Chircu * [681155e4b] : dialog: Fix a decrement bug with shared profiles Thanks to Vlad Pătrașcu for helping troubleshoot this one! 2018-10-11 Razvan Crainea * [741c6f346] : 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 2018-10-10 Vlad Patrascu * [617b05598] : clusterer: fix a bug when initializing an exported event 2018-10-10 Bogdan Andrei IANCU * [28f771788] : Merge pull request #1493 from vasilevalex/mi_drouting_probe Added MI function to enable/disable gateways probing in drouting module 2018-10-10 Razvan Crainea * [2401a0cd1] : shared tags: report them as active/backup, not 1/0 2018-10-10 Razvan Crainea * [00f6d2314] : dialog: improve error report on sockets mismatch Report socket that was not found during dialog replication. 2018-10-10 Alexey Vasilyev * [05ca54a37] : Added MI function to enable/disable gw probing in drouting module 2018-10-09 Vlad Patrascu * [dfa727713] : 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. 2018-10-09 Vlad Patrascu * [0391c0433] : json: support iteration over $json The new features are: * iteration over $json object keys eg. 'for ($var(k) in $(json(foo.keys)[*]))' * iteration over $json object values eg. 'for ($var(v) in $(json(foo.values)[*]))' or 'for ($var(v) in $(json(foo)[*]))' * iteration over $json array values eg. 'for ($var(v) in $(json(foo)[*]))' Closes #1458 2018-10-09 Bogdan Andrei IANCU * [94a3ede1e] : Merge pull request #1485 from vasilevalex/drouting_sock Drouting module probing socket parameter 2018-10-06 Bogdan Andrei IANCU * [fcbfed302] : Merge pull request #1465 from xcorail/master Add LGTM code quality badges 2018-10-05 Bogdan-Andrei Iancu * [1e59fad68] : Removed references to removed global variables. 2018-10-05 Bogdan-Andrei Iancu * [b75996382] : Remove usage of deprecated URI module. Reported by @liviuchircu 2018-10-05 Bogdan-Andrei Iancu * [cf69712ae] : Updated the script samples to reflect the URI module changes. 2018-10-04 Razvan Crainea * [9b4548286] : async: remove local_fd to simplify logic 2018-10-03 Bogdan-Andrei Iancu * [1c5a24a8f] : One more old dangling DB variable fixed 2018-10-03 Bogdan-Andrei Iancu * [79b13201e] : Fix old dangling variable for DB conn. A leftover of 036ff18abcd1703317210a33a32667d9e1a3ea01 2018-10-03 Vlad Patrascu * [5b06340c3] : Also support positional parameters for MI commands 2018-10-03 Liviu Chircu * [2b264d0b8] : async/launch: Prevent unnecessary pointer ref/deref There is no need to provide a fd _reference_ to any of the async API functions -- everyone just ignores this detail. So we simplify the API and make the code faster for now. 2018-10-03 Liviu Chircu * [640263ded] : str_strstr(): Fix unnecessary error log 2018-10-03 Bogdan-Andrei Iancu * [76cf8f451] : Fix error logs in terms of missing newline or formating 2018-10-03 Bogdan-Andrei Iancu * [a9cd32d75] : 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 2018-10-03 Bogdan-Andrei Iancu * [2b4ed273e] : Migrated docs to reflect functionality migration from URI to AUTH_DB module. Related to 036ff18abcd1703317210a33a32667d9e1a3ea01 2018-10-03 Razvan Crainea * [dfd795fea] : pvars: fix incorrect mathching for "" strings Before this fix, opensips was reporting `"" !~ "[123]"` as `false`, which is incorrect. On the other side, `"" =~ "[123]"` is reported on `false` too, but this is correct. This commit makes the NULL and 0-lenght strings matching more consistent. Kudos to Liviu Chircu for brainstorming this issue. 2018-10-03 Razvan Crainea * [ac549a0d5] : async: fix fd leaking and invalid memory overwrite when calling `reactor_del_reader(*fd, ...)`, the `*fd` will become -1. The reason is because `fd` points to a `io_wait_h->fd_no`, that will get changed to `-1` at the end of the function. Hence the actual `*fd` value will be lost, and `close(*fd)` is a no-op, resulting in original fd leaking. Moreover, when assigning `*fd` a new value, we will be overwriting the `io_wait_h->fd_no` in the reactor, resulting in undefined behavior. This commit stores the actual value of `*fd` in a local variable and uses it throught the function, making sure the `io_wait_h->fd_no` is not overwritten and the `close()` function is called on the proper fd. Many thangs to Eric Tamme (lirakis) on IRC for reporting this. 2018-10-03 Bogdan-Andrei Iancu * [c4fa801b4] : URI tabled moved from URI to AUTH_DB module 2018-10-03 Bogdan-Andrei Iancu * [036ff18ab] : Migrate all auth DB related function from URI to AUTH_DB module 2018-10-02 Vlad Patrascu * [6887e1191] : Update Copyrights for MI files 2018-10-02 Vlad Patrascu * [1a27bbdf1] : Port MI core to JSON-RPC Implement the JSON-RPC handling and interface required for the MI transport modules as well as port the core MI functions to the new API. 2018-10-02 Bogdan-Andrei Iancu * [32cba1d75] : 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. 2018-10-02 Bogdan-Andrei Iancu * [1cacae7f0] : Do not print error if the tm API is not available (cherry picked from commit 1d9fa68fffe2387fc7dd7aafebd57a32cbdb1d44) 2018-10-02 Bogdan-Andrei Iancu * [d432ddb1d] : 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) (cherry picked from commit c0fd2f810402a2964d43268f70a68c3f6665cbe5) 2018-10-02 Liviu Chircu * [a1b1f3808] : dispatcher: Do not start without any partitions 2018-10-02 Razvan Crainea * [3fef51da7] : compression: fix memory in mc_compact() The function was not releasing the parsed bodies for known headers Reported by Jock McKechnie on mailing list 2018-10-01 Di-Shi Sun * [5684037da] : 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 * [cfc025988] : Fix compile error on the Travis environment 2018-10-01 Liviu Chircu * [f24351189] : 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!) 2018-10-01 Liviu Chircu * [e4747712b] : acc: Inherit db_default_url if db_url is not set 2018-10-01 Liviu Chircu * [1bca75345] : acc: Improve some byte-manipulation macros We make them both more efficient and more human-friendly. NOTICE: Do NOT backport this commit!! (it's actually backwards-incompatible -- if you reload acc data from DB using the new code, opensips will likely crash, since the two "length" bytes are stored MSB-LSB now, as opposed to LSB-MSB before) 2018-10-01 Liviu Chircu * [55ef67f94] : lib: Add log_backtrace() - a stack printing function Turn on -DEXTRA_DEBUG in Makefile.conf in order to enable it 2018-10-01 Liviu Chircu * [bc840ad7b] : dialog: Remove unused function and parameter 2018-10-01 Liviu Chircu * [849ca807c] : dialog: Document the callbacks 2018-10-01 Liviu Chircu * [fc48765ad] : 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() 2018-10-01 Liviu Chircu * [1c60e0e49] : acc: Fix constant-sized pkg leak on startup 2018-10-01 Liviu Chircu * [13c824469] : 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 2018-10-01 Liviu Chircu * [d41b5da71] : context API: Inline all getter/setter functions 2018-10-01 Bogdan Andrei IANCU * [ede41a41d] : Merge pull request #1475 from lemenkov/remove_outdated_changelog Remove outdated and misleading ChangeLog 2018-10-01 Razvan Crainea * [7bd5ca124] : db_postgres: add missing header file 2018-10-01 Razvan Crainea * [c7e91f535] : 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 2018-10-01 OpenSIPS * [d3ced09e6] : Rebuild documentation 2018-09-28 Bogdan-Andrei Iancu * [ef3871f2d] : Removed bloated history as gitlog does a much better jb 2018-09-28 Bogdan-Andrei Iancu * [807be9be6] : Updated docs to reflect the moved function. 2018-09-28 Bogdan-Andrei Iancu * [e345a59ed] : Move all URI related file to sipmsgops module All function limited to performing tests or changes over the SIP msg (ruri, tags, etc) are move into sipmsgops module. The is_user function becomes obsolete (translates into `$au==$var(user)` test) 2018-09-28 Razvan Crainea * [13c6bbbf7] : 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 2018-09-27 Bogdan-Andrei Iancu * [55bc15b1e] : Avoid ERR log if RR api cannot be loaded. Able to deal with optional loading of the RR module Related to commit 3c4bbbf2ff2c8bc4de818d74f0e9ac99d945d3c8 2018-09-27 Bogdan-Andrei Iancu * [3c4bbbf2f] : Fix forced dependency on RR module * loading of the RR module is optional * change the default matching mode to Dialog-ID Fallback Fixes #1468 2018-09-27 Liviu Chircu * [d837021b1] : 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" 2018-09-27 Liviu Chircu * [a5a3644a4] : 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 2018-09-27 Liviu Chircu * [c658e07b0] : Fix some JSON-incompatible MI replies 2018-09-26 Liviu Chircu * [c2c7b052b] : 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 2018-09-26 Razvan Crainea * [c92794e18] : rest_client: prevent overflow in Content-Type 2018-09-25 Razvan Crainea * [0f74e3366] : db_mysql: JSON is supported only by mysql MariaDB does not support JSON, so we should only add JSON for MySQL. Thanks go to Nick Altmann for reporting this. 2018-09-24 Peter Lemenkov * [e6d826cfc] : Remove outdated and misleading ChangeLog These ChangeLog entries are incomplete and outdated. We shouldn't keep it. If someone is interested in specific changes then it's better to use git for that. 2018-09-24 Vlad Paiu * [e6c2e453e] : Treat MySQL JSON datatype as STRING 2018-09-24 OpenSIPS * [971af9066] : Rebuild documentation 2018-09-20 Nick Altmann * [2ba75b423] : RPM spec: fix scenario_callcenter.xml file 2018-09-20 Razvan Crainea * [a6d681c89] : 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 2018-09-20 Liviu Chircu * [ac91f3cda] : Change source file mode to 644 2018-09-20 Liviu Chircu * [3d22f2e37] : Merge pull request #1470 from lemenkov/proper_file_mode Change source file mode to 644 2018-09-20 Peter Lemenkov * [029d2cf72] : Change file mode to 644 2018-09-18 Vlad Patrascu * [33ba3a9af] : clusterer: add an event signaling a change in node availability 2018-09-18 Vlad Patrascu * [4f584757a] : MI: add API for building a JSON-RPC Response from MI handlers This is the first commit from an overall rework aiming to port the MI Interface to the JSON-RPC protocol. As a consequence, the MI implementation modules will only act as transports while the MI core will be responsible for encoding the data. 2018-09-18 Razvan Crainea * [af98f58a4] : fix possible crash introduced in 6fcbcc8 2018-09-18 Vlad Paiu * [828bdec33] : Added attrs to dr_number_routing's output 2018-09-17 Liviu Chircu * [3c608ec70] : core: Fix HP_MALLOC compile errors Broken by bb302c561e0 2018-09-17 Liviu Chircu * [313a34387] : sql_cacher: Fix invalid memory access Similar to commit a223c82024. Avoid returning a pointer to a freed pkg memory area. 2018-09-17 Liviu Chircu * [c2f8b9807] : 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! 2018-09-17 Bogdan-Andrei Iancu * [0a124c86e] : Rebuild DB schema 2018-09-17 Bogdan-Andrei Iancu * [2f5e5ffa7] : 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 2018-09-17 OpenSIPS * [76e71918b] : Rebuild documentation 2018-09-14 Bogdan Andrei IANCU * [e17284368] : Merge pull request #1463 from vasilevalex/tm_reason_doc Correct example in docs for t_add_cancel_reason 2018-09-14 Liviu Chircu * [5516398fc] : sql_cacher: Minor optimization Optimize the number of buffer realloc operations when fetching cached values. 2018-09-14 Liviu Chircu * [a223c8202] : 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. 2018-09-14 Liviu Chircu * [827cee77b] : 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 2018-09-14 Liviu Chircu * [449e0371e] : 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 2018-09-14 Razvan Crainea * [6fcbcc816] : 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 2018-09-14 Xavier RENE-CORAIL * [0e3594286] : Add LGTM.com code quality badges 2018-09-14 Liviu Chircu * [ca788dcba] : 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! 2018-09-14 Razvan Crainea * [8c6bbd261] : 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. 2018-09-13 Vlad Patrascu * [180593aae] : tls_mgm: fix IPv6 support for 'match_ip_address' modparam Closes #1461 2018-09-13 Bogdan-Andrei Iancu * [42574b9da] : Regenerate DB schema 2018-09-13 Bogdan-Andrei Iancu * [b66851b9e] : Fixed len for the username column 2018-09-13 Bogdan-Andrei Iancu * [6c8370be3] : 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 2018-09-13 Alexey Vasilyev * [224ae25a4] : Correct example in docs for t_add_cancel_reason 2018-09-13 Bogdan-Andrei Iancu * [c4505fadb] : Fix IPv6 support in lb_is_destination() and lb_count_call(). 2018-09-13 Bogdan-Andrei Iancu * [774c22d83] : Fix IPv6 support in ds_is_in_list(). Closes #1459 2018-09-12 Dan Pascu * [7c4894b97] : Improved log message 2018-09-12 Dan Pascu * [0536259a9] : Adjusted logging of private memory used based on its configured type 2018-09-12 Dan Pascu * [d8368b8ac] : Adjust the reactor size in accordance to the type of memory being used 2018-09-12 Dan Pascu * [3026cc9be] : Fixed displaying the memory size 2018-09-11 Vlad Patrascu * [3aa6108fe] : tls_mgm: fix parsing of '*' value for match_ip_address modparam 2018-09-11 Dan Pascu * [afdbe584e] : Fixed segmenation fault caused by accessing deallocated memory 2018-09-10 OpenSIPS * [52d73ccdb] : Rebuild documentation 2018-09-08 Vlad Paiu * [9f37f88b4] : Don't fetch cluster state twice 2018-09-08 Vlad Paiu * [4d8d5bf33] : Reflect dlg val changes via MI dlg_push_var will also update DB backend and all clustering nodes 2018-09-07 Vlad Patrascu * [fb37d4bbb] : cachedb_cassandra: fix an error cleanup when building query statement 2018-09-07 Vlad Patrascu * [670632e6b] : cachedb_cassandra: fix error check when setting a map key 2018-09-07 Liviu Chircu * [6553a2cab] : usrloc: Improve cachedb-only behavior Properly handle all "contacts: null" edge cases. These are triggered by Cassandra, and not by MongoDB, since Cassandra has no "empty dictionary" concept). 2018-09-07 Vlad Patrascu * [42d47e496] : cachedb_cassandra: support different value types for map keys 2018-09-05 Vlad Patrascu * [8b306307a] : tls_mgm: fix docs for tls_method parameter 2018-09-04 Vlad Patrascu * [f85724f9b] : cachedb_cassandra: update documentation 2018-09-04 Vlad Patrascu * [a81860e60] : cachedb_cassandra: check if counters table exists before using it 2018-09-04 Vlad Patrascu * [c58945b32] : cachedb_cassandra: use quoted identifiers in queries 2018-09-04 Vlad Patrascu * [37d240643] : cachedb_cassandra: change the separator in the URL database to '.' 2018-09-04 Vlad Patrascu * [74bd07c72] : cachedb: adapt tests to support cassandra column oriented ops 2018-09-04 Vlad Patrascu * [8dfd224fa] : cachedb_cassandra: implement truncate API function 2018-09-04 Vlad Patrascu * [d41d3253f] : cachedb_cassandra: implement column-oriented API functions 2018-09-02 OpenSIPS * [2745a877d] : Rebuild documentation 2018-08-31 Bogdan-Andrei Iancu * [90a0fd122] : 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 (cherry picked from commit a4605fc222cd154d42e8929f8885365508fcfb95) 2018-08-31 Bogdan-Andrei Iancu * [2767632dc] : Fix evaluating variables upon errors. Instead of returning an error code to the upper function, it is better (for consistency reasons) to return success and a NULL evaluated value. Related to #1452 2018-08-31 Bogdan Andrei IANCU * [6b61189a5] : Merge pull request #1448 from vasilevalex/topo_hide_rfc Change topology hiding Contact header to fit RFC 3261 (cherry picked from commit aa1c800b649cb6833513284550e4c25b2aeed9ee) 2018-08-31 Razvan Crainea * [1f350f4bf] : 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! 2018-08-29 Vlad Paiu * [a5f4955c3] : Added E flag to create_dialog() When passing the E flag, OpenSIPS will terminate dialogs that experience 200OK and CANCEL races - according to the RFC the UAs should address the race, but in real life the UAs leave the call hanging, which lead to bogus CDRs. The call termination is controlled via the new race_condition_timeout param 2018-08-26 OpenSIPS * [1038f0ca7] : Rebuild documentation 2018-08-23 Liviu Chircu * [2504fbd87] : make test: Improve usage * avoid compiling the yacc / lexer code * do not corrupt Makefile.conf if it's missing the ending newline 2018-08-23 Liviu Chircu * [4d0fbf528] : 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 2018-08-20 Vlad Patrascu * [6f873a7fb] : 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 2018-08-20 Vlad Patrascu * [528043851] : Fix OpenSIPS shutdown when running unit tests 2018-08-19 OpenSIPS * [82104694c] : Rebuild documentation 2018-08-17 Liviu Chircu * [9e8f475e5] : 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. 2018-08-16 Razvan Crainea * [deb05da54] : tm: fix preserving CANCEL reason for for t_relay() Thanks to Alexei Vasilyev for reporting it on the mailing list. 2018-08-14 Bogdan-Andrei Iancu * [b33b7a7e7] : Fixed freeing NULL rpl from REDIS server. Reported by @mrmeyers99 Closes #1442 2018-08-14 Liviu Chircu * [daf2c6d48] : mid_registrar: Update documentation 2018-08-14 Liviu Chircu * [20b063f9b] : mid_registrar: Add the "global lookup" flag Fixes #1431 2018-08-14 Liviu Chircu * [1d6733cb4] : 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 2018-08-14 Bogdan-Andrei Iancu * [8369c3191] : 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 2018-08-14 Vlad Patrascu * [9ab114d70] : 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. (cherry picked from commit fabe43e1ad8e6f974c9177cb6676d1a386120e45) 2018-08-14 Razvan Crainea * [ded172901] : 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. 2018-08-14 Razvan Crainea * [ac715eec9] : Revert "msg: remove extra bytes from malformed bodies" This reverts commit fecb4b244c3cf84435af03db88bfd88002a69177. 2018-08-14 Bogdan-Andrei Iancu * [56f0ab53d] : Fix memory leak on redis cache misses Closes #1441 Credits go to @mrmeyers99 (cherry picked from commit cf88b4b261a434f9c39e0254440175549db2f8c9) 2018-08-14 Bogdan-Andrei Iancu * [0e978c907] : Fix wrong chapter'ing in docs 2018-08-14 Liviu Chircu * [005b89eed] : 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. 2018-08-13 Vlad Patrascu * [562ff3995] : sql_cacher: fix error message when key not found 2018-08-13 Bogdan-Andrei Iancu * [550e8cb8a] : Fix cases in db_url parameter examples 2018-08-12 OpenSIPS * [e02e31455] : Rebuild documentation 2018-08-10 Liviu Chircu * [f76cc0eaa] : acc: Fix trivial crash on non-CDR accounting 2018-08-10 Liviu Chircu * [1dd17e93b] : core: Properly handle pre-fork segfaults (prevent attendant from infinite looping in case an early crash occurs) Thanks to Bogdan for catching this one! 2018-08-10 Bogdan-Andrei Iancu * [ae6e9665e] : Suppressed too verbous dbg messages 2018-08-10 Bogdan-Andrei Iancu * [c288a1c1a] : Fix crash when using an undefined db virtual set 2018-08-10 Vlad Patrascu * [98662b927] : sql_cacher: fix an error message 2018-08-10 Vlad Patrascu * [de7722482] : sql_cacher: fix db handlers for multiple caching entries (cherry picked from commit 29b04376ea57875c8918815696b599821a8e5a64) 2018-08-10 Bogdan-Andrei Iancu * [ea78949ff] : Fix cases in db_urls parameter doc. 2018-08-10 Vlad Paiu * [434ae61f5] : Fixed mem leak on DLG cluster replication & profile_end_dlgs usage 2018-08-10 Vlad Paiu * [70674ca85] : Fixed mem leak & changed profile_end_dlgs behaviour Unref the dialog even if it failed to terminate. Also, iterate across all profile dialogs & try to terminate them all, even if an error occurs for a particular dlg 2018-08-10 Razvan Crainea * [3c7f8943a] : dialog: fix MI profile_end_dlgs return to 200 OK Before this change the command was returning 400 OK on success 2018-08-09 Vlad Patrascu * [d82288e8d] : usrloc: improve docs regarding cluster syncing 2018-08-09 Vlad Patrascu * [273d26411] : tls_mgm: fix modparam doc examples 2018-08-09 Bogdan-Andrei Iancu * [d72e2257f] : Fix wrong condition in detecting the pass-thorugh body Completes/superfixes 953490775b82f2244eb3b0bcba6232d3d2af4484 (cherry picked from commit ec33af3504c0ffdba8d238ea1c1365b5ffe43b0f) 2018-08-09 Razvan Crainea * [7bd8f1dd7] : etc/tls: remove passphrase 2018-08-08 Bogdan-Andrei Iancu * [ba68f28d3] : 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). (cherry picked from commit 953490775b82f2244eb3b0bcba6232d3d2af4484) 2018-08-08 Bogdan-Andrei Iancu * [dabf416c0] : Fixed dynamic dependency on an SQL module Reported by Callum Guy (cherry picked from commit df9e5a849fd03afef02c024bc5af40f14c53adc2) 2018-08-06 Razvan Crainea * [056d7b95d] : 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 2018-08-06 Razvan Crainea * [baa1d2bab] : db_mysql: re-try query in case of a server deadlock 2018-08-05 Liviu Chircu * [89796e360] : db_flatstore: Handle missing base directory or permissions 2018-08-05 OpenSIPS * [78e6e2a04] : Rebuild documentation 2018-08-04 Liviu Chircu * [1832dd073] : Module doc: Fix missing section IDs 2018-08-04 Liviu Chircu * [b4295bc23] : Module doc: Normalize section names 2018-08-04 Liviu Chircu * [bc0855275] : Improve documentation * tm: - t_relay() "0x02" flag - t_newtran() * acc: $acc_current_leg * registrar: $avp(attr) * dialog: match_dialog() 2018-08-04 Liviu Chircu * [81771e7c5] : Codebase improvements 2018-08-04 Liviu Chircu * [b93a79e31] : Fix typos 2018-08-03 Liviu Chircu * [ae97cea6b] : doc/build-contrib.sh: Improve locale management 2018-08-02 Liviu Chircu * [deb76e340] : cachedb_mongodb: Fix modparam typo 2018-08-02 Bogdan-Andrei Iancu * [da50df0c8] : Allow TEST to be preset as env variable 2018-08-02 Bogdan-Andrei Iancu * [e3852e937] : Added rtpengine table to default table. This will automatically create the table via "opensipsdbctl create" 2018-08-02 Liviu Chircu * [4ba14e51c] : dialog: Make get_profile_size() less restrictive Allow any writable pvar to be given for the 'size' output parameter. 2018-07-31 Vlad Patrascu * [5f17ed5ed] : tm: add examples for MI commands docs 2018-07-31 Vlad Patrascu * [6fcda64a3] : dialog: document dlg_cluster_sync MI command 2018-07-31 Vlad Patrascu * [d00f84631] : dialog: improve docs regarding profile replication 2018-07-31 OpenSIPS * [f82bb97c4] : Rebuild documentation 2018-07-31 Liviu Chircu * [12a545972] : uri: Allow formatted input for add/del URI params 2018-07-31 Bogdan-Andrei Iancu * [6ba2a4199] : Fix wrong section enclosing for functions. 2018-07-29 Vlad Paiu * [1931eb0b1] : Updated - get_dialog_info to support fetching multiple linked dialogs Added - dlg_push_var MI command for pushing DLG vals from the outside - $DLG_json and $DLG_ctx_json pvars for fetching ALL info about the current dialog - get_dialogs_by_val and get_dialogs_by_profile for fetching $DLG_ctx_json variables from dialogs matched either by a dialog val or by a dialog profile 2018-07-26 Bogdan Andrei IANCU * [c171b7bbc] : 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 * [e7c3733cb] : auth_db: Fix forced SQL DB dependency Thanks to Michael Mavroudis for discovering this bug. 2018-07-24 Bogdan-Andrei Iancu * [01f8f0867] : Remove the extra '\n' returned by ctime(). Reported by Kirill Galinurov. 2018-07-23 Vlad Patrascu * [ef94c6b41] : rest_client: relase TLS domain after preparing next request 2018-07-23 Vlad Patrascu * [82f7b303e] : db_mysql: fix parsing of the "tls_domain" URL parameter 2018-07-23 Liviu Chircu * [dce68e491] : doc/build-contrib: Simplify external scripting 2018-07-23 Bogdan Andrei IANCU * [57c226e29] : Merge pull request #1376 from liviuchircu/master opensipsctl: Improve the "trap" command 2018-07-23 Bogdan Andrei IANCU * [78a9ba6f1] : Merge pull request #1380 from liviuchircu/bugfix/fix-corefile-generation Bugfix/fix corefile generation 2018-07-23 Razvan Crainea * [058cc22cb] : proto_tcp/bin/hep: fix deadlock when delaying writes 2018-07-19 Vlad Patrascu * [cdfd5958a] : db_mysql: support different TLS domains per connection This is done by adding the "tls_domain=dom_name" parameter to the db_url of each module. 2018-07-19 Vlad Patrascu * [9ad807116] : tls_mgm: fix ref counting when looking up client domain by name 2018-07-19 Vlad Patrascu * [96fa37679] : tls_mgm: fix deadlock when looking up client domain by name 2018-07-17 Liviu Chircu * [6152a4b07] : Merge pull request #1430 from italorossi/master mid_registrar: Fix segfault due to null callid 2018-07-17 Italo Rossi * [222125a3b] : Parsing Call-ID before looking up for contact_id 2018-07-17 Vlad Patrascu * [9ee39b75f] : Regenerate default TLS user certificate and rootCA 2018-07-17 Razvan Crainea * [b25ed3323] : 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 2018-07-17 Razvan Crainea * [98851096b] : fix several typos 2018-07-17 Razvan Crainea * [945e9143d] : packaging/debian: add man page for opensips-m4cfg 2018-07-17 Razvan Crainea * [682177a96] : packaging/debian: add #DEBHELPER# token to preinst 2018-07-17 Razvan Crainea * [6f0393641] : packaging/debian: prepare changelog for 3.0 2018-07-17 Vlad Patrascu * [7be3d97cb] : tls_mgm: fix DB table version check 2018-07-17 Vlad Patrascu * [34ffa8701] : usrloc: replace deprecated 'db_mode' modparam from default script 2018-07-13 Vlad Patrascu * [a4d2b08f7] : tls_mgm: improve TLS domains matching TLS domain matching is now described using 2 new modparams/DB fileds: "match_ip_address" and "match_sip_domain". A new AVP is introduced that sets the SIP domain to use as a maching filter for client domains. For server domains, the hostname in the Servername extension is matched against the SIP domains defined in match_sip_domain. Also fix ref counting issues for DB-loaded TLS domains. 2018-07-13 Vlad Patrascu * [1ff08ca48] : tls_mgm: support SNI for tls server domains Support TLS Server Name Indication in order to present the proper certificate when hosting multiple domains on the same IP. If the hostname that the client attempts to connect to is supplied, that hostname is then matched against the name of the defined virtual TLS domains. The certificate and settings of that domain are further used for the TLS handshake with the client. 2018-07-13 Vlad Patrascu * [c2a11864e] : usrloc: fix a regression bug introduced by the k/v storage replication Closes #1423 2018-07-13 Liviu Chircu * [766cc8c90] : rest_client: Clean up extraneous code (initial TLS client cert implementation, which was not fully cleaned up) 2018-07-13 Razvan Crainea * [b81be8ec8] : dialog: fix dialog_table param 2018-07-13 Razvan Crainea * [7d07bf013] : cgrates: verify the return type Prevent opensips from crashing when using with an old verison of cgrates and not setting the compat mode 2018-07-11 Liviu Chircu * [e4fb2866a] : shm_nt_str_dup(): Improve error handling Do not report (-1: out of memory) on NULL input strings 2018-07-06 Razvan Crainea * [fe18cc124] : cgrates: fix invalid memory access after release 2018-07-05 Liviu Chircu * [9ebade34c] : usrloc: Improve "db_mode" documentation Better explain the implications of setting this parameter. 2018-07-05 Bogdan-Andrei Iancu * [d68a773e9] : Allow $branch to be set in the context of a reply too 2018-07-05 Razvan Crainea * [7bc463872] : usrloc: suppress unneccessary oom error 2018-07-05 Razvan Crainea * [75be0c227] : db_mysql: doc: clarifying max_db_queries meaning 2018-07-04 Vlad Patrascu * [9e26e9e0d] : dialog: fix a bug when removing a dialog with no profile links 2018-07-04 Vlad Patrascu * [948e7da26] : dialog: fix a bug when destroying profile linkers 2018-07-04 Vlad Patrascu * [a4bc298bc] : dialog: refactor some names in the profile replication code 2018-07-04 Vlad Patrascu * [f939d6a3d] : dialog: fix initialization for profiles without values 2018-07-04 Vlad Patrascu * [00cddf763] : dialog: fix deadlock when replicating both profiles and dialogs 2018-07-04 Vlad Patrascu * [cc1fe0f8b] : dialog: fix counting when replicating both profiles and dialogs 2018-07-04 Vlad Patrascu * [85de3a9f7] : AVL map: handle oom error when duplicating key in map_get() 2018-07-04 Vlad Patrascu * [4478fe157] : dialog: handle oom error when linking dialog into profile 2018-07-04 Liviu Chircu * [5e154cb8f] : 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. 2018-07-04 Liviu Chircu * [9c5b1b950] : 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 2018-07-03 Liviu Chircu * [28e00f74f] : 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 2018-07-03 Liviu Chircu * [5fe1878ee] : 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 2018-06-29 Liviu Chircu * [f7be418bd] : registrar: Avoid a redundant NoSQL query In federation clustering, do not uselessly load the NoSQL records during simple lookups. 2018-06-29 Liviu Chircu * [53b900224] : build-contrib.sh: Properly ignore merge commits The docs stated this feature already. However, "git show" wouldn't oblige. Luckily, "git log" does. 2018-06-29 Bogdan-Andrei Iancu * [48f82e2bf] : Fixed typo in documentation. Reported by Alexey Kazantsev 2018-06-29 Bogdan-Andrei Iancu * [a1ef325f0] : Expaded docs for route_to_carrier 2018-06-29 Bogdan-Andrei Iancu * [a2d0d4f92] : Extended route_to_carrier() to route to a list of carriers. Similar to route_to_gw(), route_carrier() may now accept a list of carriers to route to (instead of a single carrier id). Closes #1404 2018-06-29 Vlad Patrascu * [dfd6d6826] : 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. 2018-06-29 Vlad Patrascu * [014c650e9] : dialog: fix deadlocks when removing dialogs from profiles The issues manifest when both the dialog and profile replication are enabled. 2018-06-28 Bogdan-Andrei Iancu * [2300e4504] : Fix bogus data access. Access data after the NULL test and after the lock is taken. Reported by Nick Altmann (@nikbyte) 2018-06-28 Bogdan-Andrei Iancu * [e24b04447] : Document the 'B' option for lookup() 2018-06-28 Bogdan-Andrei Iancu * [00526d005] : Allow t_inject_branches("msg") to be used from onreply route. In the context of the SIP reply, t_inject_branches() may be used to push as dynamic branches the destinations collected (via the dset) from the reply (like when the reply is a 3xx). This is part of the larger work to add support for dynamic following of the 3xx replies during a parallel forking attempt. Instead of waiting for the whole transaction to end (all branches), if a branch gets a 3xx reply, the redirect contact will be followed on spot by dynamically creating new branch (even if the transaction is not yet completed). This is work sponsored by the Harris Corporation (https://www.harris.com) 2018-06-28 Bogdan-Andrei Iancu * [5f9893658] : Allow $branch() to be read from the context of a reply. Even if a reply has no RURI, a SIP reply may have dset (additional branches). This is part of the larger work to add support for dynamic following of the 3xx replies during a parallel forking attempt. Instead of waiting for the whole transaction to end (all branches), if a branch gets a 3xx reply, the redirect contact will be followed on spot by dynamically creating new branch (even if the transaction is not yet completed). This is work sponsored by the Harris Corporation (https://www.harris.com) 2018-06-28 Bogdan-Andrei Iancu * [a9f467137] : Added the "B" option to the lookup() function. The B flag will prevent the lookup to upload any contact to RURI. All the found contacts will be uploaded as branches (in the dset). This is part of the larger work to add support for dynamic following of the 3xx replies during a parallel forking attempt. Instead of waiting for the whole transaction to end (all branches), if a branch gets a 3xx reply, the redirect contact will be followed on spot by dynamically creating new branch (even if the transaction is not yet completed). This is work sponsored by the Harris Corporation (https://www.harris.com) 2018-06-28 Bogdan-Andrei Iancu * [209419a21] : Added new function move_branch_to_ruri(). This move a branch (give by index) from the dset into the RURI & co. This is part of the larger work to add support for dynamic following of the 3xx replies during a parallel forking attempt. Instead of waiting for the whole transaction to end (all branches), if a branch gets a 3xx reply, the redirect contact will be followed on spot by dynamically creating new branch (even if the transaction is not yet completed). This is work sponsored by the Harris Corporation (https://www.harris.com) 2018-06-28 Bogdan-Andrei Iancu * [9cc75c0ac] : Fixed wrong return without locl release. Reported by Nick Altmann (@nikbyte) Closes #1409 2018-06-28 Bogdan-Andrei Iancu * [2ee9ba5d6] : Fixed error message for rmrule cmd 2018-06-28 Bogdan-Andrei Iancu * [76e90cf57] : Fixed wrong example The correct cmd is "rmrule", nu "rmgrule". Started from a report by @willyrgf Closes #1412 2018-06-28 Liviu Chircu * [9664ad768] : Merge pull request #1414 from fgast/opensips-1371 switch / case skips the "default" statement during fall-through 2018-06-28 Fabian Gast * [0d57cdcf1] : switch / case skips the "default" statement during fall-through fixes #1371 2018-06-26 Razvan Crainea * [e1e407fb1] : 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 2018-06-22 Vlad Patrascu * [a3f8a9cdf] : dialog: check if replication is enabled in clustering related MI commands Fixes #1406 2018-06-22 Liviu Chircu * [cabac7d4a] : dialog: Do some code maintenance * add macro for reinvite pinging detection * fix clang compile warnings 2018-06-22 Liviu Chircu * [67b290111] : 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 2018-06-22 Liviu Chircu * [287ce6f54] : 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. 2018-06-21 Vlad Patrascu * [2f21be1b0] : 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 (cherry picked from commit cfc9efec63322beac3f2f760f7a94f345893c174) 2018-06-21 Liviu Chircu * [1dd0e0eab] : 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 2018-06-21 Liviu Chircu * [d6e9817a1] : usrloc: Fix "DB only" mode selection Reported by Jonathan Hulme. Fixes #1403 2018-06-21 Bogdan Andrei IANCU * [7a6e93f0a] : Merge pull request #1394 from lemenkov/improve_docs Improve docs 2018-06-20 Liviu Chircu * [20480ee08] : usrloc: Do not pretty-print the "KV-Store" MI output 2018-06-20 Liviu Chircu * [fe782c210] : usrloc: Document "mi_dump_kv_store" 2018-06-20 Liviu Chircu * [bafdb8b6a] : 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. 2018-06-20 Liviu Chircu * [78902eb60] : mid_registrar: Do not drop registrations on empty K/V store Simply forward them and populate the values. 2018-06-20 Liviu Chircu * [d8fe587ce] : usrloc: Also binary-replicate the k/v storage This allows us to also cluster the mid-registrar (not only registrar!). 2018-06-20 Vlad Patrascu * [da0475972] : sip_i: fix country_code modparam length check Closes #1395 2018-06-20 Vlad Patrascu * [ae826b9de] : sip_i: add oom check when allocating optional param in PV set function Closes #1396 2018-06-19 Bogdan-Andrei Iancu * [aec863871] : 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 2018-06-19 Liviu Chircu * [fd8cf517a] : Merge pull request #1397 from spacetourist/master tls_mgm: Revise timeout value information 2018-06-19 Callum Guy * [b73991a90] : revised timeout value information 2018-06-19 Bogdan-Andrei Iancu * [1e7498628] : Fixed accepting (again) the comma char inside URI. Fixes #1385 This issue was introduced with commit the a7e724a commit, starting 2.4 2018-06-19 OpenSIPS * [136aff843] : Rebuild documentation 2018-06-19 Liviu Chircu * [347ad7937] : build-contrib.sh: Several improvements * add a "documentation contributors" chapter * fix author activity interval computation for renamed modules * merge some copy-pasted code * fix a typo 2018-06-19 Liviu Chircu * [33075d6a4] : build-contrib.sh: Add cleanup logic on SIGINT / SIGTERM 2018-06-19 Liviu Chircu * [029f927b6] : build-contrib.sh: Final tweaks * add history tracking logic for module renames * only show top 10 committers / last active committers (the rest are displayed as CSV) * last batch of manually fixed commit authorships 2018-06-19 Liviu Chircu * [ea6e1dd75] : build-contrib.sh: Fix more corner cases * ensure backwards compatibility with git 2.7.4 (where "--find-renames" is not implicit to "git show") * if all stat columns are equal, sort contributors alphabetically 2018-06-19 Liviu Chircu * [828f27e36] : build-contrib.sh: Treat contributors.xml as auto-generated 2018-06-19 Liviu Chircu * [6987844d0] : build-contrib.sh: Fix minor issues * fix a mktemp bug, leading to lingering files * properly exit during paralell build: wait for all pids 2018-06-19 Liviu Chircu * [8ff04f645] : build-contrib.sh: Improve logic Fix bad regex, ignore ESL code, add extra debug prints, improve generated XML, pack commit aggregation code, add parallel build. 2018-06-19 Bogdan-Andrei Iancu * [d0da6bf73] : Fixed missing locking when checking gws Closes #1373. (cherry picked from commit 2f7dd83206b6b26c2588bfd44e663197a5cd2593) 2018-06-15 Liviu Chircu * [bbcfcb334] : module stats: Improve module name matching regex Reported by @cbsergiocf Fixes #1392 2018-06-15 Liviu Chircu * [14ad19047] : sngtc docs: Fix outdated links 2018-06-15 Liviu Chircu * [ba3e74d6e] : sngtc: Fix bad string math ^ This was only detected by clang. Also fix a compile warning. 2018-06-15 Liviu Chircu * [61a5a673f] : sngtc: Fix compile errors Reported by @cbsergiocf Fixes #1392 2018-06-15 Liviu Chircu * [375e9d4f0] : 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 2018-06-15 Peter Lemenkov * [3ffd0ca3b] : Use UTF-8 for AUTHORS 2018-06-15 Peter Lemenkov * [a68fb5432] : Switch all docs to UTF-8 explicitly 2018-06-14 Vlad Patrascu * [844dbcb2b] : Handle oom when allocating message body in add_body_part() 2018-06-14 Bogdan-Andrei Iancu * [53ba89c09] : Fix adding "socket" nodes under "set" node in MI show command (cherry picked from commit 5f2c1612b852fc08dbc8e58146a8b37c23188aad) 2018-06-13 Liviu Chircu * [e4f98a6d4] : 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 2018-06-13 Razvan Crainea * [79698b90d] : rtpproxy: fix adding the nortpproxy string hack to properly add the nortpproxy string at the end of the body 2018-06-13 Razvan Crainea * [0bb8cf902] : Revert "body_lumps: apply lumps until the very end of body" This reverts commit 043c4bfce7a7c0d67a535323648fe62882a836d2. 2018-06-13 Razvan Crainea * [043c4bfce] : body_lumps: apply lumps until the very end of body when calculating and applying the body lumps, we need to check until the end of the body, otherwise we cannot add lumps at the end of the body 2018-06-13 Razvan Crainea * [bb302c561] : hp_malloc: don't add unused fields in hp_frag_lnk if HP_MALLOC_FAST_STATS is not defined, we no don't use no and total_no at all, so we shouldn't add them in the struct 2018-06-13 Razvan Crainea * [75c9c1ba1] : msg_translator: fix error typo 2018-06-12 Liviu Chircu * [1b640d6ee] : 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-06-08 Liviu Chircu * [931fbc5e3] : cachedb_mongodb: Improve docs for the URL "multiple hosts" feature Suggested by @volga629 2018-06-07 Liviu Chircu * [64172a95b] : usrloc doc: Add tutorial page references 2018-06-07 Liviu Chircu * [4deac1f08] : registrar: Fix uninitialized stack variable Reported by @sekil75 Fixes #1377 2018-06-06 Liviu Chircu * [5a56ab4b4] : core: Improve code of the "timer ticker" functions * fix confusing error log. The current code produced: WARNING:core:timer_ticker: timer task already scheduled for 5201330 ms (now 5653910 ms), it may overlap.. , while a more accurate error log would have been: WARNING:core:timer_ticker: timer task already scheduled 452580 ms ago (now 5653910 ms), delaying execution ^ ^ | | must be a diff skip? delay? push? * reduce code nesting level by 1 2018-06-06 Vlad Patrascu * [0056d768c] : dialog: improve docs regarding clustering 2018-06-06 Liviu Chircu * [94f5df245] : rest_client: Add the "curl_http_version" modparam Allows the script writer to enforce a specific HTTP version for all requests. 2018-06-06 Liviu Chircu * [081930130] : DB modules: Improve error logs on failed conversions 2018-06-05 Vlad Patrascu * [68a389499] : Improve MI commands documentation Improve examples and descriptions for commands and their parameters. 2018-06-05 Vlad Patrascu * [721416ce0] : Module doc: align MI commands FIFO examples to same format 2018-06-04 Razvan Crainea * [52e54daa0] : proto_*: check returned events from poll Inspired from ticket #1374 2018-06-04 Răzvan Crainea * [a5633eab0] : Merge pull request #1374 from Vonage/bugfix/tcp_send_poll_revents Fix bug which will cause processes to get stuck in tcp send loops. 2018-06-02 Matt Krokosz * [3a0b34228] : Fix bug which will cause processes to get stuck in tcp send loops. 2018-05-30 Razvan Crainea * [b044f11ee] : acc: fix possible deadlock when evi set is faulty this error is very unlikely to trigger 2018-05-29 Vlad Patrascu * [b7a2765e3] : clusterer: rename node specification module parameters "current_id", "current_info" and "neigbor_info" parameters are renamed to "my_node_id", "my_node_info" and "neighbor_node_info". 2018-05-25 Vlad Patrascu * [ea3745a7f] : 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. 2018-05-25 Vlad Patrascu * [0e96bedc9] : clusterer docs: reorder module parameters 2018-05-25 Liviu Chircu * [636a74200] : path: Fix buffer overflow with use_path_received + IPv6 Introduced in commit b3bf15646a 2018-05-24 Bogdan-Andrei Iancu * [905932524] : Fixed replication of sharing TAGS. Reported by Ognjen Seslija (sekil on IRC) Thanks to Vlad Patrascu in troubleshooting 2018-05-24 Liviu Chircu * [7911d6361] : path: Fix leak-on-error 2018-05-24 Liviu Chircu * [71c7d75f6] : 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 2018-05-24 Liviu Chircu * [b3bf15646] : 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: 2018-05-24 Bogdan-Andrei Iancu * [60b1e7005] : 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. 2018-05-24 Vlad Patrascu * [72289e2cb] : clusterer: several doc fixes and improvements 2018-05-23 Bogdan-Andrei Iancu * [19305deaa] : 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. 2018-05-23 Liviu Chircu * [65647b547] : registrar: Add "+sip_instance" filtering for remove() 2018-05-23 Liviu Chircu * [62bf36dac] : registrar: Fix pkg leak / broken logic in remove() Also enhance its documentation 2018-05-23 Liviu Chircu * [c7cae9be6] : clusterer: Do not log errors when broadcasting to 0 nodes Reported by Xiao Huang Fixes #1369 2018-05-23 Bogdan-Andrei Iancu * [2b28b2131] : Fix delete query in watchers table. The watcher's table has no sharing tags. Reported by Ognjen Seslija (sekil on IRC) 2018-05-22 Bogdan-Andrei Iancu * [a69c8541b] : Fixed URI comparing when usernames are empty 2018-05-22 Liviu Chircu * [45ea9087d] : usrloc/nathelper: Improve function naming/docs 2018-05-22 Liviu Chircu * [fa4bf3c67] : usrloc: Make the timer cleanup routine cluster-aware Reported by Xiao Huang Fixes #1367 2018-05-22 Bogdan-Andrei Iancu * [ad825e4ee] : Replaced signal based inter proc communication for PKG stats with RPC/IPC The old signal (SIGUSR2) based inter process triggering of the PKG memory statistics is replaced with RPC/IPC triggering. Note: processes without a reactor (and no RPC/IPC) will not be able to provide pkg statistics. 2018-05-22 Bogdan-Andrei Iancu * [4e4f5ba07] : Use MI cmds (versus signals) to trgger mem dumps. The olg approach of triggering memory dumps by sending signals to the processes is replaced with MI commands triggering combinated with RPC/IPC. New MI commands exposed: * mem_pkg_dump pid [log_level] * mem_shm_dump [log_level] 2018-05-21 Vlad Patrascu * [dab6f7a2f] : mi_xmlrpc_ng: fix system memory leaks when parsing xml Closes #1359 (cherry picked from commit 06a1b186c9d8eba35e3f7bbff83f41325c60ac24) 2018-05-21 Razvan Crainea * [7bcbcdc49] : tm: use global common get_callid() 2018-05-21 Razvan Crainea * [b44cdb511] : refactor get_callid in a single place 2018-05-21 Răzvan Crainea * [804218d16] : Merge pull request #1366 from ryan-esty/2.3 added rtcp-mux-require Close #1364 (cherry picked from commit c9a7552ce3c9f0dfd9b80c242a03ce27a744cfe5) (cherry picked from commit 13489b996c8025a982d0ca42fdf68ebc4d169f57) 2018-05-18 Bogdan-Andrei Iancu * [41f3fd580] : A worker process wil ignore any SIGTERM if not in shutdwon sequance. 2018-05-18 Bogdan-Andrei Iancu * [f39174c6b] : Downgrade log from INFO to DBG 2018-05-18 Bogdan-Andrei Iancu * [8073d4de8] : 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. 2018-05-18 Liviu Chircu * [5f4281422] : acc: Fix $acc_extra so it accepts integer constants 2018-05-17 Bogdan-Andrei Iancu * [8ab55259f] : Fixed wrong DB result free in case of error. (cherry picked from commit bcad20098f92587ef465e3c634bd362ae3908522) 2018-05-17 Razvan Crainea * [bd6044042] : dialog: do not force profiles and vars dump Now that we have a special flag to force pushing vars and profiles in the database (db_flush_vals_profiles), we don't need to force them every time we make a query. 2018-05-17 Razvan Crainea * [e35595e85] : 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! 2018-05-17 Vlad Patrascu * [b10f0e3f9] : clusterer: allow spaces in the format of "current_info" and "neighbor_info" 2018-05-16 Liviu Chircu * [5f83153c6] : 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. 2018-05-16 Liviu Chircu * [1c07c9254] : siptrace: Fix broken trace tests during startup_route 2018-05-16 Liviu Chircu * [61dec8937] : 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) 2018-05-15 Vlad Patrascu * [94b0244ab] : Add a new pvar: $hdr_name that returns the name of SIP header 2018-05-14 Liviu Chircu * [f757ce414] : 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; ") 2018-05-14 Razvan Crainea * [890431990] : 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. 2018-05-11 Razvan Crainea * [a20b3d052] : rtpproxy: allow more relaxed lookup 2018-05-11 Liviu Chircu * [61829d663] : 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(). 2018-05-11 Razvan Crainea * [0da2449be] : rtpproxy: add flag to prevent RTPProxy change body This is useful when you only want to engage RTPProxy in a ringing state, but then allow the call go though. Close #1349 2018-05-10 Liviu Chircu * [362e65d28] : dialog/topology_hiding: Update docs 2018-05-10 Liviu Chircu * [deb3ee457] : 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. 2018-05-09 Liviu Chircu * [a2934c79e] : freeswitch: Force event re-subscribes after a disconnect Credits to Ken Rice for reporting this issue 2018-05-09 Liviu Chircu * [9fe020181] : freeswitch: Fix ESL handle and file descriptor leaks Thanks to Ken Rice for reporting, providing a testing environment and helping troubleshoot these bugs. 2018-05-09 Bogdan-Andrei Iancu * [ea647c59a] : 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. 2018-05-09 Liviu Chircu * [2bb11c599] : 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 2018-05-09 Liviu Chircu * [4b59ffc0c] : dialog: Document re-INVITE pinging interval restrictions 2018-05-09 Liviu Chircu * [1d1f3d04d] : dialog: Fix re-INVITE pinging SDPs after on-hold/resume 2018-05-08 Vlad Patrascu * [3414292fa] : xmpp: fix uninitialized warning 2018-05-08 Vlad Patrascu * [0fcee0b4a] : sip_i docs: fix subfield value 2018-05-07 Vlad Patrascu * [47e5c47d3] : 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 2018-05-07 Liviu Chircu * [f2c86ed3f] : acc: Fix "ms_duration" computation Reported by John Quick 2018-05-02 Liviu Chircu * [bbfdbaf9d] : 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. 2018-04-30 Razvan Crainea * [1e09f50c6] : rtpengine: fix created missing initializer (cherry picked from commit 048b54559c4c71737c745685b79ab848777f0c32) 2018-04-30 Liviu Chircu * [889f1bf8b] : nathelper: Fix uninitialized warning (cherry picked from commit c9c4d3d8023afa5b64c98445916da4c39540e8f6) 2018-04-30 Vlad Patrascu * [5ad8600be] : clusterer: fix uninitialized warning 2018-04-30 Liviu Chircu * [2faf78c31] : Fix compile warning on older gcc (4.8.4) 2018-04-30 Liviu Chircu * [2ecc1cbfe] : usrloc: Fix uninitialized variables (cherry picked from commit 7bb0dba89c42a8c64e38908fccf4d4db1d5247cc) 2018-04-30 Liviu Chircu * [e2fd262f3] : core: Fix $branch(flags) manipulation It now accepts and prints a space-separated list of branch flags. Fixes #1341 2018-04-29 rvlad-patrascu * [a029ba7b2] : Fix MI cluster sync when node is seed 2018-04-28 Liviu Chircu * [a9781e05c] : usrloc: Document ul_cluster_sync 2018-04-28 Liviu Chircu * [d4816025f] : usrloc: Add "contact merge" behavior for ul_cluster_sync Do not insert duplicate contacts when the user hits MI "ul_cluster_sync" multiple times. 2018-04-28 Liviu Chircu * [4bbe287ee] : presence: Properly set the sharing tag state 2018-04-27 Liviu Chircu * [7e09045cd] : usrloc: Fix SQL restart persistency when clustering Thanks to Vlad for helping with the fix! 2018-04-27 Bogdan-Andrei Iancu * [3f1b1a970] : Disable prepared statements for select query. Some weird behavior was noted here, so better let's disable it until further investigations. (cherry picked from commit a207f5071d989a30219b645138a5871bc993ce3a) 2018-04-27 Liviu Chircu * [3c8aefb3a] : usrloc: Fix possible crash in MI ul_cluster_sync 2018-04-27 Bogdan-Andrei Iancu * [e3a7776b7] : Disabled noisy debug logs. 2018-04-27 Bogdan-Andrei Iancu * [33fe471ea] : Fix arming alarm signal on shutdown Arm the alarm signal also when all the procs terminated smooth. 2018-04-26 Razvan Crainea * [ba938dc6e] : cgrates: don't divide MaxUsage for postpaid Do not divde MaxUsage 0 and -1 values with 10000000 when postpaid is used, otherwise we will get invalid values and the session is immediately closed. Thanks to TeoV (Teofil Voivozeanu) and DanB (Dan Bogos) for reporting and testing 2018-04-26 Razvan Crainea * [ecb29ab2d] : dialog: remove debugging CRIT message 2018-04-25 Vlad Patrascu * [4b5943330] : clusterer: increase the limit for the number of clusters and nodes 2018-04-25 Vlad Patrascu * [1010f2b30] : dialog: fix profile counting when replicating both profiles and dialogs A replicated dialog was also counted as local for a replicated profile on each node in the dialog replication cluster affecting both the returned profile size and the broadcasted counter. The issue is fixed by using the sharing tags mechanism and only count a dialog in a replicated profile if it is marked as active. 2018-04-25 Vlad Patrascu * [5cf6b40db] : clusterer: suppress DBG logs when sending pings and replies 2018-04-25 Vlad Patrascu * [5dd381a11] : clusterer: warn if there is no seed node defined in a cluster 2018-04-25 Vlad Patrascu * [19ee6879b] : clusterer: throw error when receiving message from own node id 2018-04-25 Vlad Patrascu * [1e7b8836d] : clusterer: extend the "cluster_check_addr" function. Add new parameter that allows selecting the address of the node to compare against: the BIN listener or the provisioned SIP address. 2018-04-25 Vlad Patrascu * [ca84d6c85] : clusterer: fix learning capabilities when restarting a node This issue occurs when a node that has all the links with its neighbors established is restarted and boots up faster than the next ping from another node in the cluster. That node does not detect the failed link and never sends the capabilities information itself to the restarted node. The solution is to require a reply to an initial capabilities update sent when a node establishes a link. 2018-04-25 Vlad Patrascu * [f1bd44939] : clusterer: fix possbile locking issues with capabilities list 2018-04-25 Bogdan-Andrei Iancu * [b1fdb899b] : Fix handling of negative replies in EBR scenarios. If t_wait_for_new_branches(): * stop any waiting when cancel is received from UAC * keep doing waiting even if a negative reply was received on the real branches; maybe more branches are to be injected. The bugs fixed: * if there was at least one callee when routing the call, if the call was rejected by caller, the transaction terminates without waiting for any more branches * if there was no callee when routing the call, but added later via injection, the transaction did not terminate on spot upon cancel from caller, but waiting for timeout. Closes #1237 Closes #1128 2018-04-24 Razvan Crainea * [903393275] : tls_mgm: prevent openssl 1.1.0 from multiple free Register our own onexit() function after the library initializes to make sure that we forcefully exit before openssl does any crappy cleaning. Close #1121 2018-04-24 Liviu Chircu * [200a5563b] : dialog: Fix unnecessary errors on DB load Affects DB-persistent dialogs w/o reinvite pinging. This regression was introduced by commit 9521770e. 2018-04-24 Bogdan-Andrei Iancu * [53a8c42f5] : Fixes related to latency and remove on timeout pinging. * store the contact flags into ping_cell, in order to trigger proper actions upon reply / timeout * generate latency events only if the latency flag is set * generate latency events on ping timeout too (with 30 mins value) * do not track/report ping failures if latency is on, but remove on timeout is not set. 2018-04-24 Liviu Chircu * [827db9d3f] : mid_registrar: Fix the request/reply matching logic The previous logic assumed a new request could not be possible without having received a reply for the previous one. This is incorrect, as REGISTER timeout + failure route forwarding is quite a common scenario. Fixes #1285 2018-04-24 Bogdan-Andrei Iancu * [8532f9ed5] : Fix memory leak when ping-failed contacts unregister. As for the contacts with failed ping we keep the ping_cell into hash (in order to count the failures), we need a second timer list to be sure that the ping_cellis actually removed from hash as some point. Without this second list, as the ping_cell exists only in hash, if the contact is unregistered, it will never be removed. 2018-04-24 Liviu Chircu * [f2626d471] : dialog: Improve fetch_dlg_value() signature & docs 2018-04-24 Liviu Chircu * [9521770ef] : 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 2018-04-23 Razvan Crainea * [c5d8b6ed8] : acc: properly restore created after a restart Credits go to Nick Altman for reporting this Close #1344 2018-04-23 Bogdan-Andrei Iancu * [537b1ae86] : Fixed cloning of parsed_uri and parsed_uri_ok. Translate the parsed_uri pointers after setting the new new_uri buffer. Also take care and properly update the parsed_uri_ok flag. Reported by @ankurgupta001 - many thanks for the testing. Credits also to Razvan Crainea (@razvancrainea) for troubleshooting. Closes #1300 (cherry picked from commit 4a78508bbfc4c4f888399d8bf47b8c0a658ef9c3) 2018-04-23 Liviu Chircu * [34960b140] : dialog: Fix pkg memleak in commit a03ed4e1a3 The auto-generated CANCEL messages were leaking the parsed Via header. Reported by Nick Altmann 2018-04-21 Liviu Chircu * [09feafae6] : osp: Fix build and format truncation warning on gcc 7.2+ 2018-04-20 Bogdan-Andrei Iancu * [6f91f2985] : README udpated 2018-04-20 Bogdan-Andrei Iancu * [13d805b55] : Docs updated with missing sharing_tag param for handle_subscribe() 2018-04-20 Bogdan-Andrei Iancu * [6d02840bb] : Fix creation of IPC pipes. Credits go to Gohar Ahmed for identifying, reproducing and providing a testbed Fixes #1254 2018-04-20 Razvan Crainea * [07ea9b686] : dlg: suppress info for updating contact 2018-04-20 Razvan Crainea * [a5ee8aa1d] : ratelimit: fix count dec and reset for SBT algo also fix counter var for SBT algo 2018-04-20 Liviu Chircu * [b45ee74f5] : 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 2018-04-20 Razvan Crainea * [62424b670] : siptrace: fix memory leak when tracing transaction 2018-04-19 Razvan Crainea * [bbbc01c31] : rtpengine: provide from tag, to tag and callid Adapted from hdikme/kamailio@e69579bca5b0e08187481f228e621ece0d1b79d5 Close #1339 2018-04-19 Liviu Chircu * [581ca5c8c] : fraud_detection: Complete commit 904e66b8 Reported by Denis 2018-04-19 Liviu Chircu * [bf2ae3156] : dialog: Clarify the new meaning of dlg_leg.sdp 2018-04-19 Liviu Chircu * [a03ed4e1a] : 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. 2018-04-19 Liviu Chircu * [4ab1de258] : Merge pull request #1345 from wuhanck/master Fix compile issues in Ubuntu 18.04 / gcc 7.3.0 2018-04-19 Razvan Crainea * [125a1dc53] : dialog: update contact on re-INVITEs and UPDATEs Closes ticket #964 2018-04-19 Razvan Crainea * [c28fecf70] : permissions: remove not init variable 2018-04-19 Bogdan-Andrei Iancu * [08bc8a3c6] : README updated 2018-04-19 Bogdan-Andrei Iancu * [7cd9b0f8e] : Improve example on mcontact_avp usage 2018-04-19 Razvan Crainea * [e99f2619c] : bump devel version to 3.0.0 2018-04-19 wuhanck * [194753720] : Merge branch 'master' of https://github.com/opensips/opensips 2018-04-19 wuhanck * [c60b4b5ff] : Use ip_addr2a. Remove unused str_ip. 2018-04-19 wuhanck * [8490397f5] : Use json_object_object_get_ex. 2018-04-19 Bogdan-Andrei Iancu * [7326ded2d] : updated README file 2018-04-19 Bogdan-Andrei Iancu * [eb50b9b15] : Fix function get_local_contact() to add transport to have consistency over b2b and presence module, fix the get_local_contact() to also add the transport indication in the URI it builds. This will simplify the code in presence (as we do not have to add the transport param later, from several parts of the code) and also fixes the b2b code where the transport was not added at all in the URIs. Credits go to @arttemk for identifing the problem and suggesting the fix. Fix for #1275 2018-04-19 Bogdan-Andrei Iancu * [9cd3057b0] : Added global variable for opensips state. By knowing the opensips state (like starting, running or terminating), we can avoid bogus critical logs when shutting down the TCP layer. Fixes #1343 2018-04-19 Liviu Chircu * [a1332cbbd] : ctl tools: Fix errors in verbose mode 2018-04-19 Bogdan-Andrei Iancu * [97d656831] : Fixed bogus error message 2018-04-18 Razvan Crainea * [2a2027a6e] : dialog: always check if create dialog was called on initial INVITE 2018-04-18 Liviu Chircu * [57615b234] : usrloc: Fix regression in 'single-instance' mode 2018-04-18 Razvan Crainea * [e73bda6fb] : rtpengine: add loop-protect README 2018-04-17 Liviu Chircu * [1968810bd] : Fix typos 2018-04-17 Liviu Chircu * [6ba77b12c] : usrloc: Fix cluster capability registration 2018-04-17 Liviu Chircu * [5f817446d] : usrloc: Improve get_domain_mem_ucontacts() There is no need to query clusterer.get_my_index() for every contact, the info can be fetched before the entire iteration. Also improve debug logging. 2018-04-17 Liviu Chircu * [2a5a67c79] : usrloc federation: Fix contact pinging 2018-04-17 Liviu Chircu * [58d668528] : clusterer: Fix possible crash in topology learning 2018-04-17 Liviu Chircu * [763d4405c] : usrloc federation: Fix metadata cleanups 2018-04-17 Liviu Chircu * [479b3850c] : registrar: Fix a lookup() bug 2018-04-17 Liviu Chircu * [2f3d7f8a9] : registrar lookup(): Refactor the "l" flag In federation clustering, it makes more sense to do an explicit global ("g") AoR lookup, rather doing it implicitly and optionally cancelling it with the former "l" flag. 2018-04-17 Liviu Chircu * [b723bd9e2] : Move struct socket_info in socket_info.h 2018-04-17 Liviu Chircu * [a0373e52c] : presence: Fix build with -DDBG_LOCK 2018-04-17 Liviu Chircu * [f357c8599] : memory manager: Improve hash debugging output 2018-04-16 Liviu Chircu * [f2a682a47] : usrloc federation: Fix global urecord lookups Only fetch AoR metadata (NoSQL lookup) on a specific, new API call (api.get_global_urecord(), rather than performing it on every api.get_urecord() call. 2018-04-16 Liviu Chircu * [62f15baba] : usrloc federation: Replicate data only locally 2018-04-16 Liviu Chircu * [8a17634f8] : clusterer: Refactor broadcast_msg_having() Merge common code into a single function. 2018-04-16 Liviu Chircu * [fb5d55aae] : clusterer: Add sync source filtering In some cases, we only want to sync from specific donor nodes. The federated user location topology is an example where this feature is useful. 2018-04-16 Bogdan-Andrei Iancu * [ee7db82ae] : Fix CRIT logs back to DBG. 2018-04-16 Bogdan-Andrei Iancu * [ec52613da] : Fix dialog unref for local BYEs. Instead of unref-ing the dialog when a final reply is received for the local BYE, better wait until the BYE transaction is destroyed. IF not, we will end up with a dangling dailog pointer in the BYE transaction. Fix for #1330 where a local BYE retransmission in combination with TH ends up acessing the dangling dialog pointer. Many thanks to Nick Altmann for the support in investigating this issue. 2018-04-16 Bogdan-Andrei Iancu * [d8ef9f126] : Fix branch cancelation after a t_reply() Be sure and call which_cancel() only when cancel_uac() is also called, otherwise the cancelling markers may prevent further canceling acttions on the transaction Credits go to Stepan Pologov @sisoftrg Fix for #1337 2018-04-16 Razvan Crainea * [dcb35022b] : dialog: fix dialog timeout when loading from db Prevent the module from adding the ticks jiffies twice to the dialog timeout. 2018-04-13 Vlad Patrascu * [0784c38b1] : dialog: drop inactive DB loaded dialogs when syncing from cluster is done Dialogs loaded from the database at startup are dropped and also deleted from the DB once the sync from cluster is complete. This is valid for dialogs that are not reconfirmed as being active in the meantime (SIP updates, received in sync data). 2018-04-13 Vlad Patrascu * [d11aa92bb] : dialog: fix DB operations to be performed by all nodes in the cluster In the context of dialog replication and with the new feature of synchronization at startup, there is no longer the need for the DB backend to be shared between the nodes in the cluster. Each node can still have a local dialog table but only for restart persistency as a failsafe for the binary replication. 2018-04-13 Vlad Patrascu * [bcc3d8c0f] : dialog: call values/profiles write callbacks before replicating dialogs Rename DLGCB_DB_WRITE_VP to DLGCB_WRITE_VP since it should also be triggered when replicating a created dialog. This allow modules to properly save context information in the dialog which can then be visibile on all instances where the dialog is replicated. This fixes issues with received replicated dialogs in acc, cgrates and siprec modules. 2018-04-13 Liviu Chircu * [4c07fe9ba] : registrar: Clean up the lookup() code This patch also slightly refactors the "FL_EXTRA_HOP" contacts of usrloc (specific to federation clustering), such that they belong to a separate field (urecord_t.remote_aors) rather than being simply appended to urecord_t.contacts. 2018-04-13 Liviu Chircu * [b4991d076] : opensipsctl: Fix dispatcher SQL inserts (2.3+ schema) Fixes #1338 2018-04-12 Bogdan-Andrei Iancu * [5df9679c0] : Fix bogus delete on undefined AVPs. Reported by John Quick. 2018-04-12 Liviu Chircu * [7f1407baa] : OpenSIPS ViM syntax: Allow "." in pvar names Reported by John Quick 2018-04-11 Liviu Chircu * [0ff609d6d] : clusterer: Fix custom DB table / column names 2018-04-11 Razvan Crainea * [9de48658d] : acc: prevent crash when drop_accounting() is used Reported by Tito Cumpen and Pete Kelly Lots of thanks go to Pete Kelly for providing testing environment and extended details about the issue 2018-04-06 Bogdan-Andrei Iancu * [dc6fa00e6] : Fix is_ip_registered() to use IP-wise matching. Instead of doing string comp, better convert to ip_addr both IPs and do the comp as ip_addrs. This fixes the comp for IPv6, as IPv6 does not have a unique string representation. 2018-04-06 Bogdan-Andrei Iancu * [2865bf4be] : README regenerated 2018-04-06 Bogdan-Andrei Iancu * [d4f83db42] : Updated description of the mask_col. Reported by Pasan Meemaduma Part of #1336 2018-04-06 Bogdan-Andrei Iancu * [4c8b3488d] : updated description of make field (according to ipv6) 2018-04-05 Bogdan-Andrei Iancu * [a69f6de76] : Fixed checking IP addr against host/name Instead of coverting an IP addr to string and to string matching, it is more sane to try to covert the host/name to IP addr (anyhow in 99% it will be an IP as it is taken from VIA hdr). The old string matching fails for IPv6 as the string representation of an IPv6 is not unique (like for IPv4) - you may have compact format for IPv6. Reported by Pasan Meemaduma 2018-04-05 Bogdan-Andrei Iancu * [86d3b84de] : Fixed proper handling of IPv6 net masks Reported by Pasan Meemaduma. Fixes #1336 2018-04-05 Liviu Chircu * [904e66b83] : fraud_detection: Fix a couple of limitations * reset the "sequential calls" stats similarly to the other ones * change the time evaluation from "UTC-based" to "localtime-based". * add a new modparam ("use_utc_time") to control the above behavior Reported by Denis via mailing list. 2018-04-05 Bogdan-Andrei Iancu * [19a869148] : Force case insensitive matching via fnmatch remove_hf(,'g') uses fnmatch with FNM_CASEFOLD if available (as it is a GNU extension) Closes #1333 Reported by Nick Altmann 2018-04-05 Liviu Chircu * [b8843dfad] : Module documentation update * complete nathelper doc * uniform "Exported Pseudo-Variables" section across all code * fix display pseudo-variable display labels * fill in missing MI command anchors * fill in missing pseudo-var anchors 2018-04-04 Liviu Chircu * [bf690f7dd] : Fix syntax errors 2018-04-04 Bogdan-Andrei Iancu * [8a46fbf53] : Fixed the default tracing mode. It should stay disabled if no HEP detination was set for that MI backend. Use the -1 marker as disabled as the 0 values is actually a valid one. Reported by Ben Newlin 2018-04-04 Liviu Chircu * [e2c46e544] : nathelper: Document latest additions 2018-04-04 Liviu Chircu * [61741aef4] : usrloc: Document the latest additions 2018-04-04 Liviu Chircu * [a4a72dff0] : usrloc: Correct E_UL_LATENCY_UPDATE behavior with latencies 2018-04-04 Bogdan-Andrei Iancu * [ba2840639] : Support '-' in the URI part of the HEP ID definition 2018-04-04 Liviu Chircu * [d82c6306f] : Module doc: Add anchors for all Events, MI cmds, PVs and Transformations The conventions for these are: * id = "event_" + * id = "mi_" + * id = "pv_" + * id = "tran_" + * xreflabel = 2018-04-04 Liviu Chircu * [1fce9a71a] : Module doc: Add anchors for all Exported Functions The convention for function documentation is: * id = "func_" + * id = "afunc_" + (async func) * xreflabel = 2018-04-04 Liviu Chircu * [b006154d1] : Module doc: Add anchors for Intro and Modparam sections The convention for modparams is: * id = "param_" + * xreflabel = 2018-04-04 Bogdan-Andrei Iancu * [bb6b21029] : Fix IPv6 support for check[_source]_address functions Try to parse the string IP as both IPv4 and IPv6. Closes #1334 2018-04-04 Bogdan-Andrei Iancu * [0070cbb13] : Fix output of bm_poll_results using mi_json. Missing ARRAY flag in a node with a list on nodes without names. Reported by Nick Altmann Fixes #1332 2018-04-03 Liviu Chircu * [6a99685f3] : Fix typos 2018-04-03 Bogdan-Andrei Iancu * [7a821af65] : Fixed wrong triggering of post script callbacks. If the async() statement translates into a sync/inline operation as triggered from a non request route, do not trigger the post script callbacks. Fix for #1312 2018-04-02 Liviu Chircu * [bc4e6cb06] : mid_registrar: Add option of appending IDs as URI params Fixes #1318 2018-04-02 Liviu Chircu * [3ead207ef] : mid_registrar: Clean up code / documentation * drop auto-insertion by Path (it's Contact-only now) (reason: it cannot work without also adding Contact info, so why use it in the first place?) * update documentation * prepare modparams / documentation for upcoming tweaks - rename insertion_mode -> contact_id_insertion - rename contact_match_param -> contact_id_param 2018-04-02 Liviu Chircu * [5bc0c8fbb] : exec: Clarify "time_to_kill" behavior Reported by John Quick. 2018-04-02 Bogdan-Andrei Iancu * [304d15549] : Fix multiple int2str coversion in function parameters While evaluating the parameters of the module funtions (which can be up to 6) some of them can internally use pvar evaluation with conversion from int to str. Shortly, multiple int2str may be before in a row. To avoid data overlapping, the int2str uses now a set of 7 rotating buffers (instead of a single one). 2018-04-02 Liviu Chircu * [bc079be03] : opensipsdbctl: Fix PostgreSQL index errors Reported by @volga629. Fixes #1328. 2018-04-02 Liviu Chircu * [42bfe01d7] : opensipsdbctl: Add default prompt answers 2018-04-02 Liviu Chircu * [aa24702e9] : opensipsdbctl: Fix coding style for table listings 2018-03-30 Vlad Patrascu * [54c0b666c] : sip_i: add missing doc for "country_code" modparam 2018-03-30 Liviu Chircu * [dbc1fedf0] : tm: Fix invalid memory access on $T_id reads Reported by Stepan Pologov. Fixes #1326 2018-03-30 Bogdan-Andrei Iancu * [5740fff64] : Fix typo in command name This is the correct fix for #1305 2018-03-30 Vlad Patrascu * [744942cc2] : sip_i: fix support for redirection related ISUP parameters Add missing parameters: Original called number, Redirecting number and Redirection information. Closes: #1323 2018-03-30 Bogdan Andrei IANCU * [2168cfa36] : Merge pull request #1322 from nikbyte/master Allow ds_select_dst and ds_select_domain in branch route 2018-03-30 Liviu Chircu * [cc2d3be31] : perl: Fix build 2018-03-29 Liviu Chircu * [6af768f68] : registrar: Fix ping latency-based contact sorting serialize_branches() was designed to always sort branches in descending "q" value order. This patch adds an optional serialize_branches() parameter which disables this behavior. 2018-03-29 Liviu Chircu * [0d494e5e6] : registrar: Fix bad condition 2018-03-29 Nick Altmann * [091a14e4a] : Allow ds_select_dst and ds_select_domain in branch route 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-03-28 Jon Leren Schøpzinsky * [e6ef00ee4] : Added SQLite module to debian packaging