=========================== Release 3.0.4 ============================== 2020-11-17 Nick Altmann * [b5e06fb02] : APT repository: ubuntu 20 2020-11-17 Razvan Crainea * [fbddd8f82] : Bump version to 3.0.4 2020-11-17 Vlad Patrascu * [1f0859c3f] : dialog: fix dlg_list[_ctx] MI output when passing identifier params Reported by Mark on the mailing list. (cherry picked from commit 99479fa956b731b23db814393780f3e5fc09047e) 2020-11-16 Ovidiu Sas * [28066aa0c] : dialog: fix -Wmaybe-uninitialized compiler warning (cherry picked from commit c2cb01734c997e9a1ba348bc0e77fc44b66832f2) 2020-11-14 OpenSIPS * [437f83902] : Rebuild documentation 2020-11-13 Vlad Patrascu * [0c9b1ff28] : pua_mi: fix parameter name in pua_subscribe MI command Also improve the docs for pua_subscribe by adding an usage example and proper indexing. (cherry picked from commit 0d20cd55d1981b56795d44d02d46bd02329dad8e) 2020-11-13 Vlad Patrascu * [ad5f74eed] : tls: fix certificate matching when reusing connections The SSL_CTX pointers may not be equal for the same SSL pointer (connection) after the rework that changed the storage of the context to be per-process. The tls_domain saved in the SSL extra storage will now be used for matching the certificates instead. (cherry picked from commit 582170270c3e0e41d539108b640552ae3cb23cfd) 2020-11-12 Bogdan-Andrei Iancu * [1cd5d2be2] : [tm] fix mem leak when passing a proxy to t_relay() The actual proxy structure needs to be also freed. Reported by @Sigmast-Michael Closes #2304 2020-11-12 Bogdan-Andrei Iancu * [ef5073d9d] : [event_route] fix reseting the dummy sip msg after each usage 2020-11-11 Liviu Chircu * [979d18866] : tm: Fix transaction leakage with global onreply_route Given that the opensips.cfg execution order for replies is: 1) onreply_route (global) 2) reply_received(), i.e. "tm" module scope 2.1) onreply_route (branch) 2.2) onreply_route (transaction) ... this patch fixes some transaction leaks where if the script developer matches the current transaction within global onreply_route, e.g. with a random statement such as xlog("$T_reply_code\n"), it would cause an extra ref after a transaction matching operation would be performed yet again (??) within reply_received(), as the "tm" scope begins executing. The fix is to simply avoid transaction lookups when evaluating tm variables within the non-transactional, global SIP reply route. Credits to Bogdan-Andrei Iancu for suggesting this solution (cherry picked from commit 3a25c0b28f9bffc5e6942a7a3f5484ef903e28f6) 2020-11-11 Liviu Chircu * [e2141a3b6] : mid_registrar_save(): Fix shm memleak with no t_relay() Since mid_registrar_save() is stateful by definition, it needs the SIP transaction to properly function, so always forcing its creation if the REGISTER is about to be forwarded is not that significant of a change, if any at all. Thus, this patch fixes a SHM memleak on the following type of logic: mid_registrar_save(); # script terminates without having created the transaction, # so mid_registrar's "prepped" data does not get freed on T deletion exit; (cherry picked from commit b14a7eaff60b719c8b80af4f8bfdffe2bc7e995b) 2020-11-09 Vlad Patrascu * [110e828e3] : b2b_entities: fix restoring of DB persisted server entities Server entities restored from DB would not use the original To tag due to regenerating the timestamp part of the entity key. (cherry picked from commit dd237c001791be0b3b071d07b36057221f6ed3f6) 2020-11-09 Liviu Chircu * [6cb07a992] : dialplan: Fix MI 'dp_translate' with 3 parameters 'partition' should be last, not first. (cherry picked from commit ac01ed5e02c5a1d96e2021df9cc5feb223041dc7) 2020-11-07 OpenSIPS * [59f5030a2] : Rebuild documentation 2020-11-05 Liviu Chircu * [01d89f90c] : default opensips.cfg: Explicitly set the "xlog_level" It is easy to forget about or be completely unaware of this recently introduced setting (spring 2019), then start troubleshooting why some of your xlog() statements are not working. (cherry picked from commit 1f3e56fbfffd0ebedd3a91df4c187166f824568c) 2020-11-05 Razvan Crainea * [a6fdb6610] : dialog: update contact & SDPs for replicated updates (cherry picked from commit 52e6c425b101ce56d7eb35cb413faacbb9309f1a) 2020-11-05 Maksym Sobolyev * [5292252cd] : Use body->len as the only authoritative way to check if the provided body is empty or not. (cherry picked from commit b0997b1fb56d6f518a26b9fe32e45cb16b9a0284) (cherry picked from commit bd5a1d027b238892d798e5c3fc0d0633387192fe) 2020-11-05 Liviu Chircu * [278fd4740] : Merge pull request #2253 from sippy/master_2020 Fix a rather obscure copy-n-paste bug in the digest parser (cherry picked from commit baddd32e2fd6cb43dd8b55f8a9f494fbd506d403) (cherry picked from commit 74558d8957f57b73427d50dd7b7908f989537a12) 2020-11-05 Liviu Chircu * [3274fc2b0] : SIP digest auth: Improve handling for multiple digest challenges Before this patch, OpenSIPS would always work with the digest credentials of the 1st WWW/Proxy-Authenticate header field. While RFC 3261 does not define the behavior with multiple WWW/Proxy-Authenticate headers, in § 22.3 it is stated that: Note that if an authentication scheme that does not support realms is used in the Proxy-Authorization header field, a proxy server MUST attempt to parse all Proxy-Authorization header field values to determine whether one of them has what the proxy server considers to be valid credentials. ... so a proxy must _walk_ through unacceptable headers until it finds one with "valid" credentials. In the context of the upcoming RFC 8760, this would also mean: finding an auth header field with an MD5 digest algorithm, which is the only one currently supported. TL;DR: this patch improves the "uac", "uac_registrant" and "b2b_entities" modules so they correctly process 3 WWW-Authenticate headers with the following algorithm preference: algorithm=SHA-512-256 algorithm=SHA-256 algorithm=MD5 ... and correctly build an MD5-based response for the 3rd header field. Issue discovered during OpenSIPIt 2020 (cherry picked from commit 27d5862fb834e2c71f2fefb89a27430e30814647) SIP digest auth: Complete 27d5862fb8 The b2b_entities was not patched well, as some weird switch fallthrough-on-error behavior was introduced. (cherry picked from commit 5942d53f7aeec8eadcafd394fd1ee51ede2e5ab1) 2020-11-05 Razvan Crainea * [d81fb6c0d] : dispatcher: prevent possibl uninitialized access (cherry picked from commit 58804282fe53b25a2d18f8bed35b8f6fc8f8a1a8) 2020-11-05 Liviu Chircu * [5947badc4] : dialplan: Fix broken MI 'dp_show_partition' cmd and output 2020-11-05 Liviu Chircu * [ab32e58dd] : dialplan: Fix startup with a single, non-default partition 2020-11-04 Liviu Chircu * [0684e9837] : b2b entities/logic: Inherit `db_default_url` if possible If there is still no DB URL, simply start without DB support (just as before) (cherry picked from commit ff7b5849751d11537d989afe2b17ef35ebd2a133) (cherry picked from commit a54424be0c0ff2cd42adf6a0d748ac2a866dc319) 2020-11-04 Liviu Chircu * [914d38afe] : proto_smpp: Fix crash on startup (cherry picked from commit 990d18f79735f547ed36da58236dea9c24221493) (cherry picked from commit 6410440011d9be8de9d42d8e4d82c852c9271ac0) 2020-11-04 Liviu Chircu * [982b65857] : proto_smpp: Inherit DB URL from 'db_default_url' (cherry picked from commit 24f9e7b294903bdb439a4e681ee0950d1d0837f6) (cherry picked from commit f94e1179fce27ef1ce270f921225e79cd9e8014b) 2020-11-04 Liviu Chircu * [03bf0ae1b] : dialplan: Allow re-pointing the default partition This is useful in situations where script writers do not intend to cache the default 'dialplan' table, rather only the named partitions. Example syntax: db_default_url = "mysql://opensips:opensipsrw@127.0.0.1/opensips" ... modparam("dialplan", "partition", " pstn: table_name = dialplan_pstn") modparam("dialplan", "partition", "default: pstn") (cherry picked from commit efee3438773a83c1a05edc8b05ba45f53a83c5a6) (cherry picked from commit 4abd2617f970b2505534ee8dfd68fdd11ddcc716) 2020-11-04 Liviu Chircu * [02df9b8fd] : dispatcher docs: Update partition, db_url and table_name (cherry picked from commit 89a618be1f005d1bc80d528bc41de73fff24533a) (cherry picked from commit dd0245e98087e07fb2182ae4e21f06ce034c9b4b) 2020-11-04 Liviu Chircu * [c0b2a0ae4] : dispatcher: Integrate with 'db_default_url' * both 'db_url' and a partition DB URL will inherit their starting value from the 'db_default_url' global * add the option to point the default partition to a known one, in order to avoid unwanted loading of the default table. Example: modparam("dispatcher", "partition", "default: trunks") modparam("dispatcher", "partition", "trunks: db_url = ...") (cherry picked from commit c7d668bad5b2b41a9c9065e1539914f0629ccf64) (cherry picked from commit ba7a4e33a6e2141aa7300f4e5db268c39f5e9520) 2020-11-04 Liviu Chircu * [5c154e2ce] : dispatcher: Add useful debug log (cherry picked from commit 198687e17d13a06b0868676252292643c6d549c4) (cherry picked from commit 654f1e9ba552ab96e1b3b31b3199f5464b41bd9d) 2020-11-04 Liviu Chircu * [1f14390a4] : dispatcher: Fix a bug with the 'default' partition This commit allows the "default" partition to be populated just like the other ones: modparam("dispatcher", "partition", "default: db_url = mysql://opensips:opensipsrw@127.0.0.1/opensips_3_2; table_name = v1_dispatcher") (cherry picked from commit cc2f4a8c49402f99502a58940d2fbb51daed6e47) (cherry picked from commit 419f0119400229ac54df2b8ce1943d88c31c4b5a) 2020-11-04 Liviu Chircu * [8ad9847f0] : permissions docs: Update partition, db_url and address_table (cherry picked from commit 180674b833ef9e82cb3f97105add2ada6843ddc1) (cherry picked from commit 67c06628eae20cca4fc3e5509435b775a425d17e) 2020-11-04 Liviu Chircu * [dbd3e9eac] : dialplan docs: Update partition, db_url and table_name (cherry picked from commit 6443ad5829c15f8ae7dad8bb9f0e4f418702b1ad) (cherry picked from commit 5185859a5776b6cb6ed49938eeba80c2017c5087) 2020-11-04 Liviu Chircu * [000df2ba6] : dialplan: Integrate with 'db_default_url' * DB partitions now inherit their DB URL (if not given explicitly) from 'db_url' -> 'db_default_url' * the above is similar for the 'table_name' property (inherit from the 'address_table' modparam) * rewrite the 'partitions' parser: no more coding style limitations * backwards-compatible: at least one partition must be specified (even through simply defining a global 'db_default_url') before the module can start Part of a series of patches for #2117 (cherry picked from commit 2e8164368b31da9292f08623eac6934ef2057e22) (cherry picked from commit f061ad31d39538de59da05e8a98018cc42c4c336) 2020-11-04 Liviu Chircu * [e68004180] : dialplan MI 'dp_show_partition': Indicate client-side errors (cherry picked from commit 657a8b53f07120e3233059a79f05fa7694ebbc5d) (cherry picked from commit 9d0145df204b6fe8fc88ccd1f4191fd56ccbdf88) 2020-11-04 Liviu Chircu * [8cb604894] : permissions: Integrate with 'db_default_url' * DB partitions now inherit their DB URL (if not given explicitly) from 'db_url' -> 'db_default_url' * the above is similar for the 'table_name' property (inherit from the 'address_table' modparam) * rewrite the 'partitions' parser: no more coding style limitations * backwards-compatible: the 'db_url' is still mandatory if you are not specifying a partition definition! This is due to the fact that the module has a non-DB based usage mode Part of a series of patches for #2117 (cherry picked from commit bb57cc1c375b9325138154eb415cebc2fa971ec0) (cherry picked from commit e663ee6a905f64c1d26954fa896bbc1461001163) 2020-11-04 Liviu Chircu * [d004a6c5e] : Code quality: Use str_match() instead of !str_strcmp() Reasons behind this change: - better performance: str_strcmp() includes lots of redundant checks and performs worse than the simplistic str_match() - safer code: although by making this change we increase the chance of a segfault (if either "a" or "b" strings are NULL), the crash will immediately indicate the coding bug and will be easy to troubleshoot. By the same argument, nobody complains that memset() or strcmp() include zero NULL checks: they don't have to! - more meaningful code: logically speaking, in most cases, the programmer simply intends to _match_ two strings, rather than to order them lexicographically... (cherry picked from commit 765a84b293db8ec3da960c0ae61f725f3519bfd9) 2020-11-04 Liviu Chircu * [80327025a] : acc: Remove redundant code (cherry picked from commit fcbe480f2eeb9b0933bb5a3fb1d15379fb79c493) 2020-11-02 Liviu Chircu * [9230896a3] : registrars: Rebuild lib/reg on each build This fixes an issue where registrar would log lines resembling: INFO:mid_registrar:... due to the lib/reg/*.o files having been built beforehand with the mid_registrar source code and simply linked into the .so afterwards. This issue is fixed in 3.2+ using a different mechanism (separate build of the lib/reg/reg.a library). Reported by Vlad Paiu (cherry picked from commit 74a180d2a88546b0ae14a6a91c669ddb63b29f61) 2020-10-31 OpenSIPS * [618677da7] : Rebuild documentation 2020-10-29 Razvan Crainea * [825dff499] : topo_hiding: always allocate space for DID in user When contact could not be parsed, the new Contact's prefix was not allocating bytes in buffer for storing for the dialog ID in the user part. However, the DID was appended to the prefix without any error checks, resulting in a memory corruption. This commit always allocates spaces for storing the Dialog ID, even if the contact could not be parsed. This fixes all uses of the topology_hiding() function with the `D` flag. Thanks a lot Sergei Lavrov (@ccppprogrammer) for reporting this in ticket #2285 and for offering information for figure it out. Close #2285 (cherry picked from commit 2ea8f86813bfbf87b4b0ab61c9f3e852ce777f4c) 2020-10-28 Razvan Crainea * [fce6bcbda] : proto_smpp: escape from and to users Reported by Johan De Clercq (@johandeclercqdemocon) in #2085 (cherry picked from commit f4ef3cc45a55a66aa7d9c5602b73e962d17e6568) 2020-10-28 Razvan Crainea * [0e5cdf955] : event_rabbitmq: cleanup connection after creating the socket Reported by @ycxwoo in ticket #2230 (cherry picked from commit 87e17276a79cc01ddef9334f0bf21256a6c21606) 2020-10-24 OpenSIPS * [ebe8f4b30] : Rebuild documentation 2020-10-23 Razvan Crainea * [9e55b9625] : tracer: ignore trace_on flag for dynamic entries Thanks go to Alexey Vasilyev (@vasilevalex) for reporting this. Fixes #2240 (cherry picked from commit aba6edf241428934ca7fc0838a4b0bcc4597263f) 2020-10-21 rance * [fcbc9c80d] : Fix Memory leak in Freeswitch ESL module. (cherry picked from commit 294e8c489c22fce345450e0441dfbc5a79205d94) 2020-10-17 OpenSIPS * [e7f9592d1] : Rebuild documentation 2020-10-15 Razvan Crainea * [0c5f03fbc] : drouting: fix printing gw list for dr_number_routing Thanks go to Kirill Galinurov for reporting it on Slack (cherry picked from commit 0e5377c640296051ab46bd50820bb21b6b819223) 2020-10-13 Razvan Crainea * [8b408d547] : dialog: fix previous commit 2020-10-13 Razvan Crainea * [be134cd4e] : dialog: do not update SDP on rejected INVITE/UPDATEs Reported by @nikbyte in #2177 (cherry picked from commit d447626c253185d2e1dc13dc196d04889f630c7a) 2020-10-13 Razvan Crainea * [5d3865fa9] : packaging: fix typo in emergency module description Thank you @SB-JohnK for reporting it! Close #2263 (cherry picked from commit 25e55f10c7d690230e3e1060958d8b5f0621b540) 2020-10-13 Razvan Crainea * [c9c7fd030] : dialog: restore SDP and advertised contacts Reported by @jpyle490 on GitHub. Close #2275 (cherry picked from commit 56e941130c5f8f84e1986bc8ffb1dad6f275adc4) 2020-10-12 Razvan Crainea * [22ce2bba7] : ratelimit: fix displaying pipes in rl_list This fix solves the problem where only one pipe per hash were listed by the rl_list command, resulting in missing pipes. Reported by Alain Bieuzent on users list and Robert Moss (cherry picked from commit a66164811e1afbee0e5c80cf9106bfca61fb4f30) 2020-10-10 OpenSIPS * [93b6715da] : Rebuild documentation 2020-10-09 Liviu Chircu * [a7edbbebc] : auth: Fix doc regression in d9574358d :) Although $var() variables are awesome, some module params (e.g. the "rpid_avp") really mandate an AVP and won't settle on anything else. (cherry picked from commit 8ce9eb22e1ead5b0afeff367b01d0b510650cdc5) 2020-10-09 Liviu Chircu * [797e9b8bd] : auth: Complete the 008b5154a6 cherry-pick 2020-10-09 Maksym Sobolyev * [008b5154a] : Improve auth module examples: o Use $var(xyz) consistently. $avp's take shared resources and aren't really justified in this use case; o fix www_challenge / proxy_challenge second argument to match reality. (cherry picked from commit d9574358d1670391c2b1cbe1d7ccbe37eb4defca) 2020-10-09 Maksym Sobolyev * [62b1b5320] : Extend STR_NULL and str_init() to set a type explicitly. This allows those macros to be used elsewhere in the function body, not only in variable declaration(s), i.e.: void foobar(int baz) { str localstr; if (random() == 42) { localstr = str_init(I_STR LUCKY_STR FIN_STR); } else { localstr = str_init(I_STR UNLUCKY_STR FIN_STR); } some_api(&localstr); } (cherry picked from commit 36e0281b7309e2be39e478c96575cadf9a35260b) 2020-10-08 Liviu Chircu * [1b65ba3db] : emergency: Remove bogus curl_global_cleanup() at runtime Suggested by Walter Doekes (@wdoekes) (cherry picked from commit f91c13af1fa9ee55071bd99b249902360c8def65) 2020-10-08 Zero King * [da9da2c9d] : emergency: fix memory leak on error (cherry picked from commit 18f9f7873330b7e5d7c1e31828062d80a6268402) 2020-10-07 Liviu Chircu * [dd8db643c] : usrloc is_contact_registered(): Add useful debug logs (cherry picked from commit 64c3724faa3b90918bda4c95ee716d487a3f0f1f) 2020-10-06 Bogdan Andrei IANCU * [d8bb90261] : Merge pull request #2272 from flaviogoncalves/flavio Fix in the residential script. Does not make sense to send a plus cha… (cherry picked from commit 903c24c0d211183da40de80d75a552c1be61130c) 2020-10-03 OpenSIPS * [0e5deb36c] : Rebuild documentation 2020-10-01 Vlad Patrascu * [12f2b899e] : cachedb_local: fix processing of replication and sync packets Fixes #2092 (cherry picked from commit 466f96eeb024706a2e0fc467608e552b6b01316f) 2020-10-01 Vlad Patrascu * [8bac4e2fd] : cachedb_local: fix an ERR log when syncing from cluster (cherry picked from commit 3a05dc1de32e7403cde3e65de2d0ca9ce2513900) 2020-09-29 Razvan Crainea * [e0d8d73d2] : sipcapture: fix overlapping function name the build_dummy_msg() function being used without the static identifier causes confusion for some compilers. An example is the AL2 compiler, which instead of using the module's implementation, it uses the core's one, hence resulting in broken behavior. Credit goes to @ghmj2417 (GitHub) for reporting this in ticket #2255 Close #2255 (cherry picked from commit 7ba72d434aee3db949c351a46970122f41a7c50a) 2020-09-28 Maksym Sobolyev * [406d57910] : o Don't assume bash lives in /bin; o fix arguments ordering while calling head to work correctly on non-GNU systems. (cherry picked from commit b0612c10fe610a76499e9d8170ad392f63d4396f) 2020-09-26 OpenSIPS * [720d8e278] : Rebuild documentation 2020-09-25 Eric Green * [5a51bd694] : sqlite - fix upsert in db_insert_update (cherry picked from commit 6f71f3f065fa78a65ee021931207aded5903c909) 2020-09-23 Liviu Chircu * [359e8e737] : gflags: Allow functions to be called from any route Reported by Jeff Pyle (cherry picked from commit eb5a900622e93f4c10213affb9602dcde16cf69c) 2020-09-19 OpenSIPS * [7c5511a39] : Rebuild documentation 2020-09-15 Bogdan-Andrei Iancu * [411f45660] : [load_balancer] Fix wrong param name on MI lb_resize Correct the name of the MI lb_resize command parameter used for the new capacity of the destination Credits go to @zhanghaiming Closes #2246 2020-09-15 Bogdan-Andrei Iancu * [4192f7806] : [core] missing file from e1347ebe4 (cherry picked from commit 72e4b9d4f85ed5f8a745811fd47f6a2d02a6a993) 2020-09-15 Bogdan-Andrei Iancu * [f6e258e89] : [core] fix limited support for transport vals in PATH The transport of the received parameter was limited to TPC/TLS/SCTP (no WS or WSS) (cherry picked from commit e1347ebe47984492f5a7d383ef00559ce41da8be) 2020-09-15 Bogdan-Andrei Iancu * [a520f718e] : [core] fix building path hdr for IPv6 IPv6 addresses in path received parameter are not enclosed in brackes Credits go to @hafkensite / Jasper Hafkenscheid Closes #2247 (cherry picked from commit 58bead88852993877237984e32d4da47f01a7ba9) 2020-09-12 OpenSIPS * [bc1a0ce08] : Rebuild documentation 2020-09-10 Vlad Patrascu * [a53f3bd68] : cJSON lib: fix double free in case of string parsing error Fixes #1977 2020-09-08 Bogdan Andrei IANCU * [1c03d29fb] : Merge pull request #2244 from vasilevalex/cfg_parse Reset config errors counter on every config parsing (cherry picked from commit 926d7c71564d71c6eec207a811ab0ee68f860499) 2020-09-08 Ovidiu Sas * [0eebc8746] : dialog: fix/reformat some logs (cherry picked from commit 2efaeee24c69841e9776e360960bc8d644081ff9) 2020-09-07 Liviu Chircu * [66b77c84f] : nathelper: Do not crash on bad ping reply Credits to Alexey Vasilyev for the report! Fixes #2242 (cherry picked from commit fb34cbc51405d7928dac0768be4ad912f1bb0bed) 2020-09-05 OpenSIPS * [fdce9f01d] : Rebuild documentation 2020-09-04 Zero King * [7818cc5f3] : rtpengine: fix single-bit field type (cherry picked from commit 9c4f6c1c7f7ac88e19ff78b5169c33b17b1d8d38) 2020-09-04 Liviu Chircu * [a544c7967] : List new / missing contributors (cherry picked from commit ef7a6801c483ece3ea8ab07275fcec7aa051a3f8) 2020-09-03 Liviu Chircu * [000c6507e] : load_balancer: Fix AB/BA deadlock in lb_start() Assuming we have resources A, B, before this patch we would have the following lock grab order on the corresponding resource locks: (see lb_data.c +743): lb_start(): A, B lb_next(): B, A This patch fixes this type of deadlock by inverting the resource AVP elements, such that both functions grab the array locks identically: lb_start(): A, B lb_next(): A, B (cherry picked from commit f4d5d31e9217b6c270f693d847fd714f019f2bb1) 2020-09-02 Zero King * [98f4c5e34] : Accept single \r as EOH in multipart This completes commit 3ec9d1b25430715f2b800c455c8518104a243f49. (cherry picked from commit f5d1b55aa213e448f2716751227234e073277855) 2020-09-02 Walter Doekes * [d3d160bab] : usrloc: Update doxygen comment about packing get_all_ucontacts (cherry picked from commit fc1c3ec32fa285e90cea457096f557e1088b1031) 2020-09-02 Walter Doekes * [da488403c] : Fix next_hop crash (seen in nathelper nh_timer) due to reading reused mem Problem: - get_domain_db_ucontacts (through get_domain_ucontacts) was handing out (next_hop) pointers to memory that was unused. This resulted in a crash when this memory was reused before the invalid pointer was reused. Relevant issues and commits: - #1652 [OpenSIPS crashes since of child that serves rtpproxy] - e162f5f10 [fix 1652: usrloc: make next_hop point within the shared buffer] - #1710 [nathelper next_hop off by one for usrloc path] - 0300eb1d5 [fix 1710 / revert 1652: usrloc: fix next hop compute for ...] That is: e162f5f10 fixes this exact problem in get_domain_db_ucontacts, in get_domain_mem_ucontacts and in get_domain_cdb_ucontacts (cdb_pack_ping_data). But in 0300eb1d5 it is reverted for only get_domain_db_ucontacts. This fix: - Rewrites the fix for get_domain_db_ucontacts and get_domain_cdb_ucontacts, making it less fragile/bug-prone. - Adds comments about fragility to get_domain_mem_ucontacts - Fixed unaligned memcpy that might affect non-intel CPUs: `((struct proxy_l *)cp)->name.s = next_hop_host` Bug reported and fix tested by Jasper Hafkenscheid @hafkensite (VoIPGRID). (cherry picked from commit 5a6b3abe41a2eaed961a530675f6441a692e8640) 2020-09-02 Bogdan-Andrei Iancu * [d6f3424d1] : [permissions] Fixed mem leak on pattern field Closes #2197 2020-08-29 OpenSIPS * [f0b35e038] : Rebuild documentation 2020-08-27 Fabian Gast * [deeaca099] : Fix command in documentation for clusterer_list_cap (cherry picked from commit 7a0f5991de5387b2496b1229f949353b568ad10c) 2020-08-27 Liviu Chircu * [fcb7a20c7] : rtpengine: Fix docs for `extra_id_pv` Suggested by Nick Altmann (cherry picked from commit 968063d9f3d652e94c2895d9dee46b7843c875b5) 2020-08-26 Razvan Crainea * [f391c2752] : rtpengine: fix order of specified interface flags When both 'external' and 'internal' flags were specified, 'internal' was always assigned as iniface, and 'external' as outiface. This commit makes sure that the order they are specified in is respected. (cherry picked from commit 68f8f9d5c7f43af0a6fb914883ad700a93048835) 2020-08-26 Razvan Crainea * [4ec1d2658] : dialog: parse contact in separate structure This avoids concurrent access to the contact header's parsed structure in request messages saved in shm - addresses ticket #2095 (cherry picked from commit df68e3b191a4bc3565d9bc7bc3f6275d41921e88) 2020-08-22 OpenSIPS * [a5ecdfe93] : Rebuild documentation 2020-08-20 Liviu Chircu * [12fc0e96f] : tls_mgm: Avoid creating a shared DB conn at mod_init() Many thanks to Adrien Martin (@adrien-martin) for the immense help in reporting, troubleshooting and helping close this one out. Fixes #2161 (cherry picked from commit 2c008cd9225dc9a60df2fbf2e37d032ce6f27db0) 2020-08-18 Liviu Chircu * [7ee0bf40d] : Rework previous commit Although the protocols listed in the @proto array "seem" to be initialized, they are still missing some essential data, which is only later provided by trans_load(), during the startup phase. (cherry picked from commit 7f5480ceb7d2b13b4aa2ed1e90f741e11b8c4876) 2020-08-18 Liviu Chircu * [fd78021f3] : hep_udp listener: Fix "use_children" regression Commit 899f65c8f4 introduced a regression where "use_children" would be ignored for the HEP UDP protocol, possibly leading to extra forked workers after an OpenSIPS upgrade, failed restarts due to exceeded MySQL max connections, etc. (cherry picked from commit 2801fae6f88bd6b4c958b76ecb96c7cd7ba80d72) 2020-08-18 Razvan Crainea * [b1b1e2b1d] : rtpengine: handle PRACK for answer Thanks go to @nikbyte for the report. Close #2208 (cherry picked from commit 1f9b433fd68889c3e692e249d54ea8dbb2d576d3) 2020-08-18 Liviu Chircu * [3e9c351d5] : fraud_detection: Fix a bug causing negative CC/CPM Following a reset of the statistics for a (user, dialed_number) pair, skip any pending subtraction operations scheduled during a previous interval (e.g. a dialog which started during fraud detection interval A and ended in interval B should not decrement CC anymore if it has already been reset to 0 in the meantime during a more recent check_fraud() call). Many thanks to Inderjeet Sharma (@inderjeetsharma) for reporting and helping track down this bug. Fixes #2079 (cherry picked from commit 4f414366ee0fcc52fa2d18c59be0c5d753047934) 2020-08-08 OpenSIPS * [e0f455b3c] : Rebuild documentation 2020-08-07 Vlad Patrascu * [3d26747cc] : tls_mgm: fix crashes with db_text and null string values Closes #2192 2020-08-06 Bogdan-Andrei Iancu * [a69377484] : Supply a processing context to error route. When the error is triggered outside the context of another route, be sure it also have a processing context Closes #2187 (cherry picked from commit d17d0ed6cd36dd358c9260eb091ef2002198737d) 2020-08-04 Liviu Chircu * [e2e989ddb] : drouting: Do not start with NULL DB connections Force all DB connection objects to be created right from the start, otherwise strange, hard to diagnose errors may _occasionally_ pop up during runtime: ERROR:core:db_use_table: invalid parameter value (nil), 0x7ff31329a108 ERROR:drouting:dr_state_flusher: cannot select table "dr_gateways" ... or: INFO:drouting:dr_reload_cmd: dr_reload MI command received! CRITICAL:core:db_table_version: invalid parameter value ERROR:core:db_check_table_version: querying version for table dr_gateways CRITICAL:drouting:dr_reload_data_head: failed to load routing info CRITICAL:drouting:dr_reload_cmd: Failed to load data head (cherry picked from commit 8a9a396d4d1a7025a1fe93d564f1ebe5150961b4) 2020-08-03 Liviu Chircu * [9ca2370c9] : fraud_detection: Fix misleading 'show_fraud_stats' docs * the 'fraud_profile' MI command parameter is both invalid and not at all required by the current code * document the "stale statistics" limitation of this function (cherry picked from commit 4dba112130651ca6013c7ebc931fc744b3776774) 2020-08-03 Liviu Chircu * [7fdf3d488] : fraud_detection: Improve accuracy for 'concurrent calls' Avoid using the DLGCB_FAILED callback, since it has no protection against the "408 Request Timeout / 200 OK" race condition, and simply use DLGCB_DESTROY in order to decrement the concurrent calls counter. This fixes a bug where a "408 Timeout / 200 OK" call would cause a concurrent calls value of 4294967295, due to an extra decrement. Fixes #2079 (cherry picked from commit 2404b96c87982387071cea63f5fc42d9169d8798) 2020-08-03 Razvan Crainea * [62196f205] : presence: reset delete prepare statement when delete not performed 2020-08-03 Razvan Crainea * [9461b379c] : rtpproxy: ignore unknown payload type media streams Thanks go to @wangduanduan for reporting and providing troubleshoot info (cherry picked from commit a682789d58bc175ac3780e1ddae0b8b9eee9a32f) 2020-08-01 OpenSIPS * [9f2db9902] : Rebuild documentation 2020-07-30 Liviu Chircu * [dcfe3baa7] : fraud_detection: Add the possibility to disable stats A (0) value for any of the fraud detection thresholds now means: "ignore this threshold", instead of: "raise an event on each call for this threshold?!". Although (0) values could, in theory, have been useful for event generation testing purposes before this patch, this is a small price to pay in order to gain the ability to disable a stat. Developers can now add 1 more CPS and still keep testing with a new (1) value :) Although the DB schema changes slightly, due to the added "DEFAULT 0", it is fully backwards-compatible with the previous one, except fraud_detection row INSERTs will now be more quiet, generating no more warnings from the backend (e.g. "Column does not have a default value..." -> but still defaults to 0, thanks to non-strict mode, leading to strange warnings from the module). Fixes #890 (cherry picked from commit 214f105ae52593bd53aef83f4426e1bbb0a09666) 2020-07-30 Liviu Chircu * [9a4c66eae] : userblacklist: Be compatible with db_cachedb over MongoDB Issue reported by Ryan Embgrets (cherry picked from commit f9fd982beec461cf15bd3001df744066e42af625) 2020-07-25 OpenSIPS * [d73cf5228] : Rebuild documentation 2020-07-21 Liviu Chircu * [67867ba83] : ut.h: Fix str_casematch() implementation Since str's have a known length, we should not stop the iteration at '\0'. (cherry picked from commit 7d0df27a40d9bd0207637ec08e5deb662c45bbf6) (cherry picked from commit 4b29d8dc30065c2d92f686e870f9bfc771dd4954) 2020-07-21 Vlad Patrascu * [67b33d13e] : rabbitmq: fix crash in case of bad parameter for rmq_publish Fixes Coverity CID #199894 (cherry picked from commit e7ba585438ff0f62feef5c0f6285adee1ace325c) 2020-07-21 Vlad Patrascu * [927a33a3b] : lua: remove an useless null check Fixes Coverity CID # 199899 (cherry picked from commit 1319c4722ed9119e2dbedd4497598c1059a44342) 2020-07-21 Vlad Patrascu * [7fcc1613d] : rabbitmq_consumer: suppress coverity warning Fixes Coverity CID #199947 (cherry picked from commit dca4868a04b050fa54ea94a4e3a3bf0915b951ed) 2020-07-21 Vlad Patrascu * [0b1bf24f9] : tm: fix bad string in the MI output of t_uac_dlg Fixes Coverity CID #199965, #199943 (cherry picked from commit 9bac91d5583ba8d640ca26d940e0d4e10f847a28) 2020-07-21 Vlad Patrascu * [33910e050] : tls_mgm: set the TLS session id context with the proper length Fixes Coverity CID #207904 (cherry picked from commit 4a18ce89c89b4f9831ff748bfa75e2aa5db1b303) 2020-07-21 Vlad Patrascu * [15619d270] : event_flatstore: prevent NULL deref in case of bogus param Fixes Coverity CID #207918 (cherry picked from commit 596c572da62169d453fface97d13ec557d200561) 2020-07-21 Vlad Patrascu * [2223876de] : tls_mgm: fix uninitialized variable Fixes Coverity CID #199976 (cherry picked from commit 44abb30bbebcb701bd4b351b68b1a8e919d07abe) 2020-07-21 Razvan Crainea * [9b7a9b192] : tm: use msg_flags to indicate message is replicated (cherry picked from commit 804c9a0492940fe779e3dd1d4b4fe9f8cba57cf4) 2020-07-21 Razvan Crainea * [4f603912e] : rtpengine: fix late negociation detection of rtpengine_manage() When a reply is received, do not look into the request if it has body, since that could lead to headers parsing in pkg - that might leak. Thanks go to @bogdan-iancu for spotting the issue (cherry picked from commit 06f7297065f079ebd4201055079a02e69dde2cc5) 2020-07-21 Razvan Crainea * [89b79ce0f] : rtpengine: fix offer vs answer detection for replies When late negociation is not used, rtpengine_manage() should send an answer command, not an offer one. (cherry picked from commit d0641318ff238b01506e18bd4aa7422fb3cfeab7) 2020-07-20 Razvan Crainea * [4f17d052e] : pua_dialoginfo: always parse callid Fixes coverity CID #199930 2020-07-20 Razvan Crainea * [df0043964] : pua_xmpp: release memory in case of error Fixes Coverity CID #199967 2020-07-20 Razvan Crainea * [3e24de754] : rls: release memory in case of error Fixes Coverity CID #199983 2020-07-20 Razvan Crainea * [4428e0784] : db: merge db_is_neq_type() in db_ut Fix coverity CID #40717, #40718, #40719, #40720, #40721, #40722 2020-07-20 Razvan Crainea * [c8e8203ea] : fix more switch fall through Coverity CID #199932, #199927, #164020, #164013, #150486, #58380, #58379, #58375, #58374, #40705, #40700, #40701 2020-07-20 Razvan Crainea * [3251e7682] : db_text: complete coverity CID #200093 2020-07-20 Razvan Crainea * [f6bc3c1e5] : proto_tls: make sure we have destination to connect to Fixes Coverity CID #58361 2020-07-20 Razvan Crainea * [85f32e9de] : proto_wss: add fall through indication Fixes Coverity CID #58373 2020-07-20 Razvan Crainea * [e1463378f] : proto_hep: remove useless NULL check Fixes Coverity CID #163991 2020-07-20 Razvan Crainea * [518b78bd1] : proto_smpp: prevent NULL deref in case of bogus input Fixes coverity CID #199973 and #199931 2020-07-20 Razvan Crainea * [e64627f2a] : proto_smpp: skip entries with bad IP Fixes Coverity CID #200075 2020-07-20 Razvan Crainea * [dc489bf6e] : proto_ws: make sure we have destination to connect to Fixes Coverity CID #58340 2020-07-20 Razvan Crainea * [84f51c038] : fix coverity detected false positives CID #40557, #211391 2020-07-20 Razvan Crainea * [d15e5e668] : proto_smpp: smpp_bind_transceiver_resp_t system id Reported by Coverity CID #199918 2020-07-20 Razvan Crainea * [563e3600e] : db_text: fix no-op code fixes Coverity CID #200004 2020-07-20 Razvan Crainea * [42f020494] : tm: cleanup replicated cancel msg Fixes Coverity CID #200031 2020-07-20 Razvan Crainea * [6602950d2] : parse_to: add fallthrough comments/indications for coverity CID #200094 2020-07-20 Razvan Crainea * [4b9cad5a7] : qos: fix getting SDP 2020-07-20 Razvan Crainea * [056e18654] : mi_html: fix improper free on error Fixes Coverity CID #200040 2020-07-20 Razvan Crainea * [b2bbb61ed] : db_text: prevent buffer overflow Fixes Coverity CID #200093 2020-07-20 Razvan Crainea * [6948c092d] : tracer: make sure vars are initialized Fixes Coverity CID #200098 2020-07-20 Razvan Crainea * [de31a7ace] : evi: annotate evi_param_set_int to fix Coverity Fixes several Coverity alarms 2020-07-20 Razvan Crainea * [16764690a] : prevent leak in case of oom Fixes Coverity #211383 2020-07-20 Bogdan-Andrei Iancu * [b4bf546fa] : [load_balancer] Spelling over log messages (cherry picked from commit 3b6d0de16d68815b571cebca6bf4c9124f59f06b) 2020-07-20 Bogdan-Andrei Iancu * [e68b9a24b] : [presence] fix ugly copy-paste error in MI output Reported by coverity CID 200057 (cherry picked from commit d4abd53b202eeb5d0cd932fb6fa59e0074f3848e) 2020-07-20 Bogdan-Andrei Iancu * [75ec8229e] : [nathelper] Proper testing upon extracting hash value Be sure it is valid hexa and it it within the correct range. The lack of these tests may open the gate for some nasty exploits. Reported by coverity CID 199958 (cherry picked from commit b1d796344aa674e25fc4408bda5d336bce2bc605) 2020-07-20 Bogdan-Andrei Iancu * [a1a57ccd4] : [nathelper] Fix bad test on resolving flag name get_flag_id_by_name() may also return other negative codes than -1 Reported by coverity CID 200026, 200005, 199906 (cherry picked from commit 249b80741ddbb0952c7f737af2a7c2473f05eacf) 2020-07-20 Bogdan-Andrei Iancu * [bfdf7468c] : [drouting] removed useless code Makes no sense to select the table at db_con init time, as various queries (from various modules) may set and use different tables. Related to coverity report CID 58405 (cherry picked from commit ab7d4430941263d20acd1f45bbbbf09c80a5040f) 2020-07-20 Bogdan-Andrei Iancu * [fa32e61c6] : [pua_dialoginfo] Fix bad test on resolving flag name get_flag_id_by_name() may also return other negative codes than -1 Reported by coverity CID 207914 (cherry picked from commit f3530c10adc1d2a5b01340a9823f84db61c98e72) 2020-07-20 Bogdan-Andrei Iancu * [1d9460405] : [core] proper checking on return code for getsockname() Reported by coverity CID 200064 (cherry picked from commit c489f462d236fddb883e64a6cde7b04929a76191) 2020-07-20 Bogdan-Andrei Iancu * [9409de005] : [registrar] Proper init of delete_nh_he variable The logic may end up to free_hostent(delete_nh_he) without actually using the delete_nh_he, leading to freeing so random pointers. Reported by coverity CID 199942 (cherry picked from commit 3b20c9db07ea88bd84609676f2657011588b8b41) 2020-07-18 OpenSIPS * [b2e7a8201] : Rebuild documentation 2020-07-18 Vlad Patrascu * [a971b643f] : dialog: don't allow RE-INVITE and OPTIONS pinging at the same time Enabling both RE-INVITE and OPTIONS pinging for the same endpoint causes issues with the CSEQ value in: * ACK (incremented value compared to the corresponding INVITE) * INVITE and OPTIONS (decreasing values between the requests), in case races occur between computing the new CSEQ values and sending the messages. (cherry picked from commit 182ceb0ca6126251ca9e872844925c3bf60b1c90) 2020-07-17 Liviu Chircu * [96134848a] : tracer: Fix possible crash on NULL context CID #200069 (cherry picked from commit 1b4fcc06af59e479547d348935300949f0dfb70d) 2020-07-17 Liviu Chircu * [5e92aea4b] : rest_client: Mask Coverity false positive It is fine to push a stack pointer into libcurl during a sync transfer, since the control flow never leaves the original function before it is completely done with the library. CID #200078 (cherry picked from commit 374fde456c1f713a3cea29c90ccfb3d3d4de8ede) 2020-07-17 Liviu Chircu * [b6468a095] : tracer: Fix unchecked return codes CID #200092, #200088 (cherry picked from commit 82dfe4c408e614750c819e0a566a7312b96ec02a) 2020-07-17 Liviu Chircu * [11205ebef] : db_text: Complete 65b18091 (cherry picked from commit 673cf7f9eb3e5bd3a8da805483885e049bddc873) 2020-07-17 Liviu Chircu * [dd7023ad8] : proto_udp: Supress Coverity false positive CID #200029 (cherry picked from commit 33a0d617d4bc485e66a975d075cafb79a125de6d) 2020-07-17 Liviu Chircu * [a2ae1349a] : mi_datagram: Minor improvements * always NULL-terminate the read buffer (CID #200029). Doesn't fix any known bug, just a good practice * avoid redundant memset(65535) on each read * improve startup error log (cherry picked from commit 0eee2119991270bd23a6279e6b1a825586f2d227) 2020-07-17 Liviu Chircu * [5ff4861e8] : exec: Always NULL-terminate the read buffer CID #200052 (cherry picked from commit 0230f9c9032bd01661c6c7c197965528507e3f2c) 2020-07-17 Liviu Chircu * [2a8008ac6] : drouting: Always NULL-terminate the GW buffer While this doesn't immediately fix any bug, it should make Coverity happy. CID #200062 (cherry picked from commit df2ce6d826587f1130c5928b0815bd10ed2957f1) 2020-07-17 Liviu Chircu * [0108f2e7c] : mpath: Fix possible buffer underrun Also attempt to mask the false positive in CID #200070. CID #211377 (cherry picked from commit 7f244f17a54833c6bb3f9ea58aa4afd855774ce1) 2020-07-17 Razvan Crainea * [4f3ed1239] : sanitize mpath length Fix Coverity #199897 (cherry picked from commit 587316afc6032142c96077e3efac8029d7fa8355) 2020-07-17 Liviu Chircu * [85464ef2a] : mid_registrar: Add paranoid safety check This extra check doesn't fix anything right now, but at least it makes Coverity happy. CID #200020 (cherry picked from commit 2e60b50228a80c1e9629e43670a8cbcc5f71839c) 2020-07-17 Liviu Chircu * [42b71cf85] : usrloc: Remove unnecessary NULL check CID #200086 (cherry picked from commit f305fa88f9341f37eb95bf88980e974723b57e94) 2020-07-17 Liviu Chircu * [c34e15660] : mid_registrar: Remove unnecessary check CID #199954 (cherry picked from commit 7a638403ee648ba629fd1f6f4a17bdea091da16d) 2020-07-17 Liviu Chircu * [b497af006] : statistics macros: Avoid unsigned integer comparisons against 0 CID #199900, #199913, #199923, #199934, #199941, #199964, #199998, #200032, #200049, #200074, #200096. (cherry picked from commit 39fc05ec0ff2122dd79ec5582ac020c999c11c30) 2020-07-17 Liviu Chircu * [18c81be67] : HP_MALLOC status logging: Fix incorrect bitwise shift CID #200101 (cherry picked from commit fcdd224a5c8638a28e3be10e4028c27aa404a637) 2020-07-17 Liviu Chircu * [2aa619c00] : freeswitch: Fix a rare memleak CID #164007 (cherry picked from commit 2a9824cdc955eb783e08f88906b70d337dbdebe9) 2020-07-17 Liviu Chircu * [96428bcf3] : usrloc: Fix unitialized variable CID #199971 (cherry picked from commit 5f03b8556bf241336795ba8ca517c982d732dd4a) 2020-07-17 Liviu Chircu * [ffce99694] : preprocessor: Fix memleak on preprocessing failure Fixes CID #200047 (cherry picked from commit 36a361d63cc77141314acd84551a5340b2c3db42) 2020-07-17 Liviu Chircu * [df197a285] : mid_registrar: Fix uninitialized variable Although the severity is low, this code path could be triggered by a bogus downstream registrar which returns a 200 OK without the Contact advertised by the mid-registrar in its REGISTER request. Fixes CID #200051 (cherry picked from commit a4684d54f1d32088936a345afa36cb66bbf53727) 2020-07-17 Liviu Chircu * [882e04cd9] : stop_expire_timer(): Fix uninitialized memory access The severity is low, however, since uninitialized integer math is still safe (from a stability PoV), with the resulting value being ignored anyway. Fixes CID #199911, #199922, #199926, #199966, #199987, #199990, #200085, #200054. (cherry picked from commit c6682f208c6da5ce1517737e52835aafc5b3f2fa) 2020-07-17 Liviu Chircu * [8b9307f2e] : db_text: Fix Coverity warning (bad 'switch' fallthrough) Thanks to Răzvan Crainea for the help! (cherry picked from commit 6b56ca5fa1163bc290a4c01f554e07cae860fa8c) 2020-07-15 Bogdan-Andrei Iancu * [cad6ab066] : [pua_dialoginfo] Fix condition on empty "callee" string (cherry picked from commit e001abe34b2405ef31d7d3c616e18cc3551e5764) 2020-07-15 Vlad Patrascu * [855b2d5d5] : xml: properly handle oom when extending $xml result buffer Fixes Coverity CID #200068 (cherry picked from commit 3112b5942636ad281783a5ba0ec13992e0c78693) 2020-07-15 Liviu Chircu * [6b8b9e3b7] : pua: Fix some list management bugs; Improve code * do not use strncmp() to compare "str" structs, since it may lead to false positives (e.g. strncmp("foobar", "foo", 3) == 0). Use str_match() or str_strcmp() instead. * do not read memory after pkg_free() (severity: low, since it's PKG memory, so reading "invalid" heap memory works anyway...) * simplify list_pop() and list_free() code (cherry picked from commit 5df8b636a15a799b5f1ab7a58ebe1c208ce49d2d) 2020-07-11 OpenSIPS * [873fdd047] : Rebuild documentation 2020-07-09 Vlad Patrascu * [4af721586] : db_mysql: fix crashes when loading module along with tls_mgm (cherry picked from commit 9459f5d3acb5efa9a4a0e5c8d60c18733062bc04) 2020-07-06 Liviu Chircu * [3b0d2d154] : MI JSON-RPC commands: Fix incorrect examples Many thanks to Adrian Fretwell for the report! (cherry picked from commit b4293384f76c5e50732eb2f1bf164efa1b83389a) 2020-07-06 Peter Lemenkov * [d2d09737f] : rtpengine: Remove unused defines (cherry picked from commit 463e815cfa1835f1ef97f9b8f16a943fce0b8762) 2020-07-04 OpenSIPS * [070f8a5e4] : Rebuild documentation 2020-07-02 Liviu Chircu * [0b609f031] : clusterer: Fix some startup corner-cases (crashes) The first extra check fixes a crash in 'db_mode = 0', if only 'neighbor_node_info' is given, so cl->current_node will be NULL. The second extra check prevents: (gdb) bt full 0 check_seed_flag (cl_list=) at node_info.c:307 1 load_db_info (dr_dbf=dr_dbf@entry=0x7f2e65996300 , db_hdl=, db_table=db_table@entry=0x7f2e65993370 , cl_list=) at node_info.c:485 2 mod_init () at clusterer_mod.c:408 Fixes #2086 2020-07-01 Liviu Chircu * [61e523ae3] : cluster sync logging: Fix incomplete "if" condition Reported by William Jin (cherry picked from commit 892c2ee4776b18e3345d0d7bfd8353dd33442487) =========================== Release 3.0.3 ============================== 2020-06-30 Bogdan-Andrei Iancu * [10b3e3bc9] : Fixed potentially un-init dlg variable Thanks to Trevis for its report :) (cherry picked from commit 9de8dd193c1b948aff7d4cb6cff67a3816473ee6) 2020-06-30 Bogdan-Andrei Iancu * [c1824eb92] : Fixed uac_auth() on sequential requests in dialogs were uac_auth() was already used The fix solves the conflict between the changes over the cseq value coming from (1) dialog module, trying to increment the cseq to compensate the cseq change during INVITE auth and (2) the uac module incrementing the cseq again because of auth'ing a sequential request. The solution was to first indetify such case in uac_auth() and to use a larger delete lump (when replacing the cseq) in uac_auth(). Such a larger/wider delete lump will invalidate the lump added by the dialog module. This is a follow up on #1969 Credits to Ben Newlin for reporting and assisting with the testing (cherry picked from commit 994ab68ffccc28a8cb0cd03bc586570ad8bc5dba) 2020-06-29 Vlad Patrascu * [44f11b6a3] : cachedb_cassandra: fix unsupported protocol version errors This commit prevents the Cassandra driver with version >= 2.15 from throwing errors while trying to negociate the appropriate protocol version. Closes #2145 (cherry picked from commit d60830f49c9c0ac6c161b56cddbc2572c04d3c66) 2020-06-29 Ovidiu Sas * [1cc82cb84] : rtpproxy: improve error logs: print # iovec buffers along errno/strerror on writev failure (cherry picked from commit f4ba69bc6708e94faeefe8d008f48c0a80d66eb8) 2020-06-29 Ovidiu Sas * [0d796121e] : rtpproxy: fix writev error 22:Invalid argument - align code with rtpengine implementation for systems with no IOV_MAX defined (cherry picked from commit 565e25ba9b967bb5442d62f2ef5791c51787f078) 2020-06-29 Liviu Chircu * [911ab3383] : mid_registrar: Be compatible with gcc 4.x ... it seems named initializers were not supported back then. This commit also makes the initialization more human-friendly by using the "10" value (UL_EXPIRED_TIME) instead of the opaque "0" value -- the end result is the same. Thanks to Nick Altmann and Răzvan Crainea for their help! (cherry picked from commit 84bea49d7e4392a23526790d135fbff816081ec3) 2020-06-27 OpenSIPS * [bb5146e33] : Rebuild documentation 2020-06-27 Ovidiu Sas * [f69bca5b7] : rtpengine: fix writev error 22:Invalid argument - this fix is based on a similar fix implemented in the rtpproxy module - if the # of iovec buffes is to high, concatenate last buffers and reduce the # of buffers (cherry picked from commit eda6ec3b6260db52a8420d3a9f0cc2f82273af0f) 2020-06-27 Ovidiu Sas * [384d521d1] : rtpengine: improve error logs: print # iovec buffers along errno/strerror on writev failure (cherry picked from commit bd099afa394a8033f6d988f355ff0923592c8c0b) 2020-06-27 Ovidiu Sas * [680ddf69a] : rtpengine: use proper buffer iovec count when calling writev to send commands to rtpengine daemon - this went undetected for a long time probably because the last buffer had a zero iov_len ... (cherry picked from commit b1bf482df43320cae37207bf7975215785e825ab) 2020-06-27 Liviu Chircu * [f3dbcf1ab] : Merge pull request #2152 from ar45/fix_2138 Fixes #2138 - mid_reg_save() 2020-06-25 Liviu Chircu * [0952c1922] : rr: Fix ordering issues with add_rr_param() and create_dialog() Commits bd1719dcf and c263182ee4d introduced regressions for record_route() and record_route_preset(), respectively, which caused add_rr_param() to not work anymore in the following sequence of function calls: create_dialog() with a "dlg_match_mode" != DID_NONE record_route() or record_route_preset() add_rr_param() # would not do anything, simply acting as a NOP The reason is that the "fake" lump chain which was meant to hold all add_rr_param() operations prior to an eventual record_route() call would no longer be masked after the record_route() and would continue to accumulate data from subsequent add_rr_param() calls. Since it was meant to be a "fake" chain from the beginning (maybe the user doesn't call record_route() at all!), the data would simply be lost. Many thanks to John Quick for the accurate report and instructions on how to reproduce the issue! (cherry picked from commit e3ca95ecd0b3f33b7f42f3a7eda4a6e686cb241d) 2020-06-25 Liviu Chircu * [85811282d] : TLS: Refresh expired default certificates ... and also extend their lifetime from 1 year -> 10 years (cherry picked from commit 96517d4860e0a7d744f38ce496b92a5565c96574) 2020-06-25 Liviu Chircu * [55ebe7b72] : Fix various typos, phrases & small issues; Update contribs (cherry picked from commit 86f6e0c3038025bfc53243a27cb0fe76869c324e) 2020-06-25 Bogdan-Andrei Iancu * [775462db0] : Fix wrong inheriting of Contact-Length hdr. When moving from multi part to single part, do not inherite the Ct-len hdr of the part. Fixes #1990 (cherry picked from commit 7dd1151341b8229cd30e335b246e56938551f6bd) 2020-06-25 Bogdan-Andrei Iancu * [68afb702d] : Proper detection/skipping of EOH in multipart. Do not assume a len of 2 (not even checking the content). OpenSIPS accepts (for hdrs) a single \n or \r as EOH (cherry picked from commit 3ec9d1b25430715f2b800c455c8518104a243f49) 2020-06-24 Bogdan-Andrei Iancu * [fbc4f793f] : Fix test of recognizing SCTP as UDP-based protocol ...and allow per-socket/listener definition of number of workers/processes Closes #2125 (cherry picked from commit 749685c7ab6e7baa6562f9803bc52f2fc89ea82b) 2020-06-24 Aron Podrigal * [6ee166455] : Fixes #2138 - mid_reg_save() mid_registrar_save() not forwarding REGISTER in aor throttling mode after unregister when in write-back mode. 2020-06-24 Liviu Chircu * [e98b2356d] : dialog API: Clarify documentation for DLGCB_FAILED The DLGCB_FAILED callback is subject to the "200 OK" vs. "408 timeout" SIP race condition during dialog establishment and developers should use it with extra caution :) (cherry picked from commit 1f2c8c4854f9494ff7b712be3dc1eba87cba57f7) 2020-06-24 Bogdan-Andrei Iancu * [67af9fe2e] : Delete expired subscription only with active tags In clustering setup, the DB rutine handling subsscription should delete from DB and run the del handler only if the subscription has an active sharing tag. Fixes #1848 (cherry picked from commit 929ab4d43c0ad1878d60d3ef27f2a71f905b80f0) 2020-06-24 Bogdan-Andrei Iancu * [f6a8ae9f7] : Delete expired subscription only with active tags In clustering setup, the DB rutine handling subsscription should delete from DB and run the del handler only if the subscription has an active sharing tag. Fixes #1848 (cherry picked from commit 929ab4d43c0ad1878d60d3ef27f2a71f905b80f0) 2020-06-24 Bogdan-Andrei Iancu * [1de63fd09] : Fix wrong type of lumps. As the eoh (Enf Of Header) is determined during the on-demand parsing, the add_lump() may wrongly lable a lump as "header" or "body" (as the add_lump() may be used before the parsing reached the EOH). So, better identify all headers asap, so the add_lump() will properly work all the time. This will not add any overhead, as in 99.9999% of the case, due the functions used in cfg, anyhow you end up parsing the whole message. Fixes #2144 This is a 100% safe fix, there are 0 chances for side effects. (cherry picked from commit 23e098f0ec465b376eccfee587ce2f648331ccbc) 2020-06-23 Razvan Crainea * [2161bae43] : acc: fix no name tags in extra lists Before this commit, extra_fields that were having spaces after the last tag (such as: `last; ` would generate an extra field with no tag. This commit fixes this case. (cherry picked from commit a69e6ada6f57989e7a3af940e75d3b99ca8bced3) 2020-06-23 Razvan Crainea * [9f7b0a4dd] : siprec: send BYE for sessions not established When a SIPREC session was started on a 183 reply, but the session was not stopped, a BYE to the SIPREC server should be sent to close the session. Thanks go to Krunal Patel for reporting this and offering the fix. Close #2136 (cherry picked from commit b4cd132731f8e2fc0a949ea52b22952879b345ca) 2020-06-23 Razvan Crainea * [de98752e8] : cgrates: properly parse multiple jsons in buffer When CGRateS has issues multiple SessionSv1.GetActiveSessionIDs requests to OpenSIPS in parallel, some of them get merged in a single buffer - thus we need to treat this case by advancing the json buffer properly. Credits go to @vtzan for reporting this and for offering detailed explanations in ticket #2103. (cherry picked from commit d105f2007bae37dde077feab9c804900d9ea0f7a) 2020-06-22 Bogdan-Andrei Iancu * [3a8f6f137] : The main process (attendant) is no longer running the child_init() The main proc must stay free of any db connections, so it can later fork and child_init() other procs (due auto_scaling). For the modules which were keeping a DB conn open in main proc for later usage, during module destroy, the new approach is to open the conn, on the spot, in the destroy handler. Related to #2003 (cherry-pick from 7b62f2453bd226ec08b4f229017fa953d3876681) 2020-06-22 Vlad Patrascu * [8d63f3a52] : rest_client: complete fix in commit b977c1b Related to #2115 (cherry picked from commit 31104219475b94b864c126f42f1e5abba8e41148) 2020-06-20 OpenSIPS * [e58539e25] : Rebuild documentation 2020-06-17 Vlad Patrascu * [b977c1ba8] : rest_client: fix crash when loading module along with tls_mgm Closes #2115 (cherry picked from commit f4227fa77a22e3439718fb9fe4b8077ea6fc659a) 2020-06-16 Razvan Crainea * [40b83c9f3] : dialog: clarify usage scope of $DLG_dir Reported by @imdrpn in #2132 (cherry picked from commit 896be267dba83b2e45d4b246a37c2de1dde5d6d1) 2020-06-16 Razvan Crainea * [93e74149a] : drouting: fix mi commands examples when names are required Credits go to @kertor for reporting this Close #2141 (cherry picked from commit 84211d8266607e5bf0269f10881f967d452fe9b7) 2020-06-16 Razvan Crainea * [8d0079260] : dialog: check advertised contract against peer's leg Full credits go to @dioris-moreno for reporting this and providing a fix in ticket #2108 (cherry picked from commit a41a859f4c6f78d899b8b79ad49e150ad9d54145) 2020-06-16 Razvan Crainea * [70b68733f] : net/tcp: mark connections as being added in reactor This way we can "remember" to remove them from the reactor when the connection times out. Full credits go to @vitalikvoip for reporting, troubleshooting and fixing this problem. Close #2134 (cherry picked from commit 3e862f0e34ab9fa7065e6132935ab7c429c730bb) 2020-06-16 Razvan Crainea * [6bae525ca] : proto_wss: proper cleanup wss connection in case of tls error When TLS domain is not found, or the SSL context cannot be created, make sure the connection does not keep an hanging `proto_data` that will be later double-freed by the cleanup routine. Credits go to Jonathan Hulme (@digipigeon) for reporting this. Close #2123 2020-06-13 OpenSIPS * [ac23e00c1] : Rebuild documentation 2020-06-13 Vlad Patrascu * [3836391a0] : cachedb_mongodb: complete fix in commit a3e8727 for openssl < 1.1.0 (cherry picked from commit 9f454463e42f2148990bd5f307eeff0acecb18bb) 2020-06-12 Vlad Patrascu * [a3e87277f] : cachedb_mongodb: fix crashes when loading module along with tls_mgm Loading the cachedb_mongodb module causes the openssl library to be initialized in the pre-daemon process, by the mongoc library's constuctor, before tls_mgm gets the chance to do its own initialization in the attendant process. This commit overwrites the openssl functions used by the mongoc library in order to actually skip the initialization and leave it to tls_mgm. Related to #2091 2020-06-12 Vlad Patrascu * [c6ac01258] : tls_mgm: fix a cleanup crash when failing to create a SSL_CTX 2020-06-11 Bogdan-Andrei Iancu * [003358036] : Fixed 3 x htons(), reducing to one :) (cherry picked from commit 1856155a6c2093efae7448fce80371e97eedd42a) 2020-06-11 Bogdan-Andrei Iancu * [d754f3b66] : Fix the src/dest info for the HEP "log" packages This fixes the way the logs are displayed in the call flow of Homer (cherry picked from commit 98c39776965527a4d91c25755239369029a5e023) 2020-06-11 Bogdan-Andrei Iancu * [314e28761] : Fixed the HEP type for the logs Credits go to @bibace Closes #2137 (cherry picked from commit 7b36e441a6314fbd54745d8084aa5cfe88c341d7) 2020-06-09 Bogdan-Andrei Iancu * [ddc744955] : Fix crash in tracing xlogs from routes without SIP msg (cherry picked from commit b0a63d96ca16a26b3b4a623484ff2359d5533811) 2020-06-05 Liviu Chircu * [64960c612] : Module dependencies: Improve debug log text Suggested by Mark Farmer (cherry picked from commit 128c545677bfa7a8bdfd27b4d4ac399937df7bc2) 2020-05-30 OpenSIPS * [e0f59a519] : Rebuild documentation 2020-05-30 Liviu Chircu * [ea13cc505] : db_perlvdb: Fix incorrect integer downcast Credits to Aaron Meriwether for spotting the bug and suggesting the fix Fixes #1952 (cherry picked from commit 3e83412d50b0d8dd5b8a0f7498fb8b66e96ef353) 2020-05-28 Nick Altmann * [25baf4fbd] : RPM spec: don't build cachedb_mongodb for centos-8 because of removed libzstd, fix perl build deps 2020-05-27 Bogdan-Andrei Iancu * [58bae4ad1] : Fix building json when multiple callees are in dialog Credits go to @fedkis Closes #2120 (cherry picked from commit 1d09175b2b890c62b58715f2ec6572e06663f42c) 2020-05-26 Vlad Patrascu * [0e02e4afe] : dialog: fix CSEQ in ACKs for retransmitted replies of local re-INVITEs Closes #2106 (cherry picked from commit da3923e9c8c46cd103bfa8bc00cfe3290d20b21d) 2020-05-26 Vlad Patrascu * [1c3dedd61] : dialog: always build the ACK with full Route set for re-INVITE ACKs for re-INVITEs sent with the "dlg_send_sequential" MI command would not have a full Route set as they were generated by TM instead of the dialog module itself. (cherry picked from commit eefd55e98ee85051ea4f0417624e082595756247) 2020-05-26 Bogdan-Andrei Iancu * [4b6ebb080] : EXpire the WAIT type subscriptions also (produced by async wait_for_event()) Credits go to @liviuchircu Closes #2054 (cherry picked from commit fe9bfd9c9e17d9ec069b9b98010a151800d30d83) 2020-05-26 Bogdan-Andrei Iancu * [a43ee8d78] : Skip the disabled GWs when using route_to_gw() Closes #2072 (cherry picked from commit d0d05907099add7666e31820b4b9ecd2d4c85e7e) 2020-05-23 OpenSIPS * [c08f0c839] : Rebuild documentation 2020-05-23 OpenSIPS * [a5c7d2ca1] : Rebuild documentation 2020-05-17 OpenSIPS * [288a155ac] : Rebuild documentation 2020-05-13 Liviu Chircu * [c9e61269f] : dispatcher: Fix missing "tmb" definition (cherry picked from commit afbf2871a144466a16534db8c86d7d0377077e17) Fixes #2110 2020-05-13 Liviu Chircu * [aa483ef2b] : [mid-]registrar: Add a helpful startup error log (cherry picked from commit 1485b382adf02e0fd7791ae91613b83f0f620e05) 2020-05-11 Walter Doekes * [46ee34b30] : proto_hep: Fix HEPv3 IPv6 destination contents (send DST not SRC addr) (cherry picked from commit 7667483bbfb43017ccdfc8929ffe91a37c10c71f) 2020-05-11 Liviu Chircu * [b3f95b7bf] : make: Prepare for upcoming gcc 10 (use -fno-common) Per https://gcc.gnu.org/gcc-10/porting_to.html#common, -fno-common will become a default in gcc 10, so variables defined within .h files will no longer be allowed! Thanks to Peter Lemenkov for the suggestion! (cherry picked from commit b864b2915551fc25509a54eaf30df0cedbe1643f) 2020-05-11 Peter Lemenkov * [eb249d816] : rtpengine: Remove unused struct fields These two fields were copied directly from rtpproxy module but never used by this module. (cherry picked from commit fd8262cee78a67e1dcca7f487f919239d0f13f33) 2020-05-11 Peter Lemenkov * [298b09011] : Fix building with gcc 10 GCC 10 started to use -no-common by default. Here is an official explanation: * https://gcc.gnu.org/gcc-10/porting_to.html#common We have to mark all the declarations of global variables with extern keyword and put the definitions into a proper file. (cherry picked from commit 7b59ee14e95ea3500dd8c3368b081404b9731c9b) 2020-05-11 Peter Lemenkov * [4dcaf5fc3] : Add missing typedef keyword Without this keyword these struct definitions are considered by GCC as a variable definition. This was catched because there is a more strict check about these variable definitions since GCC 10: * https://gcc.gnu.org/gcc-10/porting_to.html#common (cherry picked from commit 242903711399ccb4eafeac614129424ffddb0e1b) 2020-05-03 OpenSIPS * [20754ac34] : Rebuild documentation 2020-04-28 Liviu Chircu * [20ffc6c8c] : drouting: Fix segfault during dr API reloads (fraud_detection) (cherry picked from commit 362f8ffa49f2a1070ac16f5021a81871f568f4af) 2020-04-27 Liviu Chircu * [f66d69a12] : fraud_detection: Fix badly solved merge conflict 2020-04-27 Liviu Chircu * [8b870af97] : fraud_detection: Avoid random str_strcmp() error logs (cherry picked from commit e1767c80d3a7852285797bca853e879a39fad18d) 2020-04-26 OpenSIPS * [26bcfb77e] : Rebuild documentation 2020-04-22 Liviu Chircu * [eabdd2d10] : async statement: Improve error log when tm is missing (cherry picked from commit afb721ed164206855130202cf5b0ff4c83bf2394) 2020-04-22 Liviu Chircu * [948a48fdf] : rest_client: Disable "Expect: 100-continue" by default Although the "100 Continue" flow sometimes saves bandwidth when the server replies with an error response, it also has some drawbacks: * extra roundtrips, adding latency and complicating the async handling * the client body upload and server body download must be performed within the same curl_multi_perform() loop, during the async resume callback, limiting the amount of parallelism that can be obtained when compared to the simple flow From now on, the "100 Continue" flow for POST/PUT requests with bodies larger than 1024 bytes is disabled by default. Developers may enable it using a new, backwards-compatible, "enable_expect_100" module parameter. Fixes #2081 2020-04-20 Bogdan Andrei IANCU * [5f9afd357] : Merge pull request #2037 from l2dy/tracer tracer: fix null pointer dereference (cherry picked from commit d59715ec3614c5c9d5afb40aa17704d86fca6021) 2020-04-19 OpenSIPS * [550f77302] : Rebuild documentation 2020-04-17 Vlad Patrascu * [ec9d7fc4b] : xml: allow access to nodes with undefined namespace prefixes Related to #1988 (cherry picked from commit 17b44ea1f2270be8e59b893ab70b3aac8d5a3826) 2020-04-16 Vlad Patrascu * [ae403f0e4] : Properly check script functions parameter types with the -c option Also, do not omit from syntax checking functions that are part of IF statement experssions. Closes #1993 (cherry picked from commit 22cbb4e71a792d8b2ae38b987ce46739d761b790) 2020-04-16 Liviu Chircu * [99b285081] : proto2a(): Do not segfault on PROTO_NONE (0) (cherry picked from commit 54064b4614d42164b49105b43f9a5dc1ce308a92) 2020-04-16 Bogdan-Andrei Iancu * [980bd163b] : [exec] improve docs on exec async + launch Related to #2049 (cherry picked from commit bb7afdc2dc4363f24d8e28e00ab337c7c174d1e5) 2020-04-16 Bogdan-Andrei Iancu * [f94af1ec0] : Removed extra space (cherry picked from commit b47d7a617cd8384f2929655f497f3b52c554028d) 2020-04-16 Bogdan-Andrei Iancu * [938ff2b08] : Merge branch 'master' of https://github.com/robdyck/opensips into robdyck-master (cherry picked from commit 4558e7af66240a2e359a1ffbeee114bad3b4f71d) 2020-04-14 Bogdan Andrei IANCU * [0bc4e92b8] : Merge pull request #2074 from besser82/topic/besser82/json_c_014_so_5 Add support for upcoming json-c 0.14.0. (cherry picked from commit fe24824e042486575daa01e20df2c8380b9e0b07) 2020-04-13 Bogdan-Andrei Iancu * [8af80a40b] : Improve canceling of transactions doing only t_wait_for_new_branches(). If a transaction has no real signalling branch, but only doing t_wait_for_new_branches(), upon caller cancel inject a 487 reply on the phony/waiting branch in order to terminate the transaction on the spot. The provious behavior was to wait (even after the cancel) for the phony/waiting branch timeout (fr_inv_timeout) and to generate an 408 timeout. Now, there is no useless waiting and a proper 487 is generated. 2020-04-13 Bogdan-Andrei Iancu * [7221b984d] : Fix un-released transaction upon t_wait_for_new_branches + cancel. If t_wait_for_new_branches() is used and no real signaling branch is added, the caller canceling must not be ignored upon branch selection. The injected 408 timeout on the phony branch must be considered, leading the transaction termination. Thanks to Chris Maciejewski for reporting and providing troubleshooting info. Also thanks to Razvan Crainea ( @razvancrainea ) for investigating and reproducing the problem. 2020-04-13 Liviu Chircu * [4d61b934d] : Fix compilation warnings with -DUSE_FUTEX It seems that whenever "time.h" is included without first enabling _GNU_SOURCE, including "unistd.h" afterwards will leave the "syscall" function undeclared, regardless whether _GNU_SOURCE is defined or not. ../../parser/../mem/../futex_lock.h: In function ‘get_lock’: ../../parser/../mem/../futex_lock.h:78:31: warning: implicit declaration of function ‘syscall’; did you mean ‘sysconf’? [-Wimplicit-function-declaration] #define futex_wait(lock, val) syscall(SYS_futex, lock, FUTEX_WAIT, val, 0, 0, 0) ^ ../../parser/../mem/../futex_lock.h:268:4: note: in expansion of macro ‘futex_wait’ futex_wait(lock, 2); ^~~~~~~~~~ (cherry picked from commit fa4e4fa70085db9da4dc72f856e0648341b0f5a6) 2020-04-05 OpenSIPS * [d89d0ec2d] : Rebuild documentation 2020-04-03 Zero King * [7140c22bf] : dialog: fix possible overflow (cherry picked from commit 2132b1246d0490a7b22af7471065c92f83d9927f) 2020-04-03 Zero King * [341c86976] : tm: type cast before shift to avoid overflow (cherry picked from commit eeaab52550fce37e3d2713308603e1531cc2e23e) 2020-04-03 Zero King * [39a3a06fd] : db_virtual: check NULL before log (cherry picked from commit bbbe695ea8d64efe8a6152ed69aca88896d7a3dc) 2020-04-03 Zero King * [b428f119f] : rtpengine: check NULL before assignment (cherry picked from commit f33f1d839102a24342a91f15a6902c05ee90ea45) 2020-04-03 Zero King * [bcd723680] : exec: fix NULL check after malloc hf->next_other should be checked instead. (cherry picked from commit 8d7e2f310d7f43535dea1dff6b6889df02d95c02) 2020-04-03 Zero King * [9c2660c68] : Add missing NULL check (cherry picked from commit 7edd729e40d962d014f5caa9f1ec024543e93bc6) 2020-04-03 Zero King * [4467d246b] : Fix potential out-of-bounds access of sroutes->request (cherry picked from commit b6e5d0127254e78ffe735185eef26ae06293552b) 2020-04-03 Zero King * [a4da730c1] : exec: fix potential use of uninitialized pointer (cherry picked from commit 9da92ced576d18e5487cf5dfa584ee638c170520) 2020-04-03 Zero King * [8a6d458ec] : osp: actually fix potential use of uninitialized pointer If OSPPTransactionNew() failed, callids[0] is still uninitialized. (cherry picked from commit c8a99ad3d1dea71ddaa73ed4cac42f4c56b49a38) 2020-04-03 Liviu Chircu * [6e97055c8] : HP_MALLOC: Aggregate SHM statistic updates It is better to update the stats with a diff of the attached/detached/split/merged fragment changes. Updating the stats in a "step by step" manner has the side-effect of creating temporarily bogus values. (i.e. negative "used" and/or "real_used") 2020-04-03 Liviu Chircu * [b62b9766a] : HP_MALLOC: Add "re-scanning" logic Given that HP_MALLOC has fine-grained locking, if the big fragment shifts down from hash bucket N to bucket N-1 due to another process performing the allocation, we may actually "lose" it during our own scan, since bucket N-1 was empty and we're now waiting for bucket N to unlock. When it does unlock, it will also be empty. As a solution: retry the scan up to N times, as long as it's feasible! 2020-04-03 Liviu Chircu * [d5e8801eb] : HP_MALLOC: Fix computation of PKG stats 2020-04-03 Liviu Chircu * [1983e0cf5] : HP_MALLOC: Dramatically reduce memory fragmentation For HP_MALLOC to offer optimal parallel allocation performance, it needs the memory to be fragmented: the more available chunks, the better its performance. However, there needs to be some coalescing as well, otherwise variable-length allocations past the 10K range will quickly deplete (fragment) even SHM pools of 10+ GB. This patch adds the following heuristics to HP_MALLOC and HP_MALLOC_DBG: * shm_malloc(): only split a fragment if the resulting chunk is at least MIN_SPLIT_SIZE bytes (default 256 for PKG, 4096 for SHM) * shm_free(): try to coalesce the next fragment (enough to fix all fragmentation issues) Many thanks to 46Labs for supporting this work! 2020-03-31 Ovidiu Sas * [f907c5695] : trace: improve documentation for mi trace command (cherry picked from commit 1897599fd8a57e306b256d04882e3a57beb9ca58) 2020-03-29 OpenSIPS * [a68ee54f6] : Rebuild documentation 2020-03-25 Vlad Patrascu * [7e623b302] : dialog: fix a replicated profiles counting issue The incorrect profile counting was caused by a race between the processing of the replicated dialog create/update packets. While processing the create packet, the lock was released before linking the dialog into a profile and setting the sharing tag. As such, the process that handled the update packet could insert the dialog into a profile itself, but with an improper sharing tag. Thanks to 46Labs for reporting and help with troubleshooting this! 2020-03-24 Liviu Chircu * [9dd89f792] : acc: Improve oom handling Do not populate bogus str values (e.g. {NULL, 3}) when out of SHM and setting $acc_extra. (cherry picked from commit 86ef10af2cbaad475dd92d41be64873af40e716e) 2020-03-22 OpenSIPS * [23ed124f7] : Rebuild documentation 2020-03-20 Razvan Crainea * [4ae72cae6] : tls_mgm: enforce at least TLSv1 when SSLv2.3 is used Starting with Debian 10 (buster), the OpenSSL library is compiled with TLSv1.2 as the minimum TLS version. Therefore, when specifying SSLv2.3, basically only TLSv1.2 and TLSv1.3 can be used. This commit sets the minimum version to TLSv1, since SSLv2.3 will soon be deprecated. Thanks go to @telematico for reporting this issue Close #1986 (cherry picked from commit 5d6b98e6452574d2926c7f74aadc7abcea149b79) 2020-03-19 Bogdan-Andrei Iancu * [3e17ffce5] : Avoid reusage of global ret code. This will override the ret code of the actual action, returning a 0 value -> script gets stopped. Fixes #2049 (cherry picked from commit 90c025cfb613fc1db48044f10af4a9756f554778) 2020-03-19 Razvan Crainea * [5d4c83642] : dialog: do not update topo hiding advertised contact This commit fixes a bug introduced by commit 7b7a9fc2bf, that was updating the contact *after* topology hiding has replaced it. This bug would be triggered when a re-INVITE/UPDATE was triggered on a call that had topology hiding enabled - in these scenarios OpenSIPS would re-learn the contact advertised by topology hiding, that is OpenSIPS itself, resulting in looped sequential requests. (cherry picked from commit 5ec398183ee58ddbdcdda454b30ac9247b491783) 2020-03-16 Zero King * [9578c7fef] : auth: return -1 on error in auth_get_ha1() (cherry picked from commit 96fcb5f9fd95796e11ec00a8246426d6dfe11a58) 2020-03-16 Zero King * [72a3f08a9] : Revert "auth: fix error check" This reverts commit b7772a087e4bf5c57fa4655d9fd53e074ca4247e. (cherry picked from commit d8ec4f3b05f2c4b21fe3363b3e146c1811ccf870) 2020-03-16 Liviu Chircu * [ee64cf8ed] : proto_help: Fix broken doc build (cherry picked from commit b9a6292e9de47c02a9e5ae1dcc540c888f90be8a) 2020-03-13 Razvan Crainea * [f53fdfd25] : parser/content: handle \r for Accept folding lines When receiving a heeader with folding lines, we also need to skip '\r' when parsing the new lines. This way we can accept headers such as: Accept: application/sdp, application/isup, multipart/mixed, application/dtmf, application/dtmf-relay Thanks go to 46Labs for reporting this (cherry picked from commit f7efd44c9e796e941452d2c173bac6aec4342bb3) 2020-03-13 Zero King * [0d8f8eb60] : pua: fix bitmask check (cherry picked from commit cd7dec8af8f71fa1024b69fb66e8f02ef3d43278) 2020-03-12 Zero King * [081b65402] : b2b_logic: fix checking potentially uninitialized pointer (cherry picked from commit fefd32149a97cdd2ad1b1ea0f19a4eeaa0809375) 2020-03-12 Zero King * [451fe1968] : osp: fix use of uninitialized pointer (cherry picked from commit fc5b59ea3eeeabac4e0a28302b5d0b0d1b5f507d) 2020-03-12 Zero King * [222a80153] : msilo: fix excessive check (cherry picked from commit 71b6088d888af32609b7dad87f0e250580c6c7ff) 2020-03-12 Zero King * [d3ba9c451] : xsnprintf.c: fix excessive expression (cherry picked from commit 99d35618a22daa7bed3d426cdb9db7eb87d507df) 2020-03-12 Zero King * [c27a528b4] : dialplan: fix null printf (cherry picked from commit b04d537723f5254476fc5011ef5458ff865d2563) 2020-03-12 Zero King * [f2279731c] : auth: fix error check auth_get_ha1() returns 1 on error. (cherry picked from commit b7772a087e4bf5c57fa4655d9fd53e074ca4247e) 2020-03-12 Zero King * [2e9c06510] : stats: fix loop variable (cherry picked from commit a71272d7a1012df2f465b927690fefb9d76ed3de) 2020-03-12 Zero King * [b1eb427bd] : usrloc: fix malloc size (cherry picked from commit eecb094adfda7381fa67c6bc10316879d37fabdb) 2020-03-12 Zero King * [6e761eb4a] : osp: fix NULL pointer dereference (cherry picked from commit 4fbb4529ac943c3d18ab8819299a28f3c58f5746) 2020-03-12 Zero King * [7ce495f5f] : dialplan: fix insert error condition (cherry picked from commit 67b1f6445aa2db1d5df6b76a0436a0c17054be4e) 2020-03-12 Zero King * [c293ef700] : osp: remove unused variable (cherry picked from commit 6e062e6c6a5d88c2c4c75e5eb596d71c900ed3de) 2020-03-12 Zero King * [32aca4ca2] : presence_xml: fix typo in NULL check (cherry picked from commit 7bc6526a6107cf551044468db3c855fc3af2a925) 2020-03-12 Zero King * [e7a31e824] : pua_dialoginfo: fix typo in NULL check (cherry picked from commit 64f2710f81c2faf656d70ed1130591c0397a12a4) 2020-03-12 Zero King * [318b81015] : osp: fix errorcode in log (cherry picked from commit 73b6ba0a8a2dc56ce2f5090fadc4692f5510365c) 2020-03-12 Zero King * [576a20f71] : compression: remove redundant check (cherry picked from commit 921080e75cf3ef1c30acbf05f712cd86d923437f) 2020-03-12 Zero King * [a824550a5] : mi_xmlrpc_ng: check return value of mi_xmlrpc_get_param (cherry picked from commit b7a715cf126b7d092448c98eaabbcbb24743ab8d) 2020-03-12 Zero King * [e4e22735b] : ldap: fix letter check (cherry picked from commit 601091dad5e518ad2c6a224d3d35e5bcad304ab8) 2020-03-12 Zero King * [bdf0916f9] : msg_translator: fix indentation (cherry picked from commit d13318eac5238c540d651da4d60a907fbcfe8ea8) 2020-03-12 Zero King * [58fe89381] : osp: remove obsolete callback type check TMCB_ON_FAILURE_RO was removed but the corresponding debug check is kept, overriding TMCB_ON_FAILURE. See commit 2adbeacd3c7055f949048e793fa193119f3a6873. (cherry picked from commit b3dc69206329e5ac8e98d3343c274ebd8cd85fb7) 2020-03-12 Zero King * [1fb3efda6] : tracer: fix pointer null check (cherry picked from commit afecf7ce4a87157894dad333a3ef29056408404a) 2020-03-12 Zero King * [053d70c0b] : osp: fix pointer null check (cherry picked from commit 5f1068c146460d795e6d7b24ceaea1883fd72215) 2020-03-11 Zero King * [38afc3357] : Fix homepage URLs (cherry picked from commit 94406117a406c3d98df5c71cdfa8fdcb301101ad) 2020-03-11 Jasper Hafkenscheid * [fbe674b8a] : Fixed titles of some code examples in nathelper docs. (cherry picked from commit cea688535fc7dc355ac78dc57613f3686f1c85fe) 2020-03-10 Liviu Chircu * [bd990edfd] : Complete previous commit (0105ab4397e) (cherry picked from commit 9056759bb9c6eb8d59ceb4c0028653968098b5d4) 2020-03-10 Liviu Chircu * [88288a398] : db_mysql/avpops: Properly return DOUBLE/DECIMAL values This patch fixes avp_db_query() calls which fetch data from DOUBLE columns in MySQL, which would otherwise return some strange errors. Many thanks to Calvin Ellison and Brett Nemeroff for the report and helping come up with the final fix! (cherry picked from commit 0105ab4397efded8d5a3009d09de20d122aaa9f0) 2020-03-10 Zero King * [7cb7b5707] : mi_fifo: fix NULL pointer dereference (cherry picked from commit afb8ab95b55c3a1173207dfc76f7769e6270b778) 2020-03-10 Zero King * [9fb59d1e6] : Fix malloc error handling (cherry picked from commit c58df362b57727995fd629d80060f2628e338310) 2020-03-10 Zero King * [5d94d005e] : sipcapture: remove duplicate assignment (cherry picked from commit 53ff949b8cdf9d32a94f0974bdd331881e939054) 2020-03-10 Liviu Chircu * [4ccf6078e] : registrar: Fix segfault within debug log Many thanks to Robert Dyck for the report! (cherry picked from commit a2edd0d179204ac708304fc1d870db8dfadf2be5) 2020-03-09 Zero King * [2895e05d3] : usrloc: fix typos (cherry picked from commit 8dcf840ce00c57df85fa17327687b86b9b6660cb) 2020-03-09 Zero King * [472cf2128] : Remove dead code (cherry picked from commit 64daab83292a569cbab3cba216925fa27b9801bd) 2020-03-09 Zero King * [1751a6ace] : Fix time comparison ?: has lower precedence than +. (cherry picked from commit 0720c5e2b24223b53933b2e18482e2960d4fa381) 2020-03-06 Vlad Patrascu * [424e247d6] : rabbitmq_consumer: fix a bug in "connection_id" modparam parsing Closes #1987 (cherry picked from commit 832ef451e894cfb277486fe08b392f930017aaf5) 2020-03-05 Razvan Crainea * [bb943d89b] : proto_hep: clarify homer5_on parameter doc Thanks go to Shaun for reporting this on the mailing list (cherry picked from commit 194398342ebee54cde9a642c0a7e5eb1ce8ca2df) 2020-03-04 Razvan Crainea * [a8973b6d5] : rtpengine: handle scenario where callid/from/to tags are missing Instead of fetching the call coordinates at the beginning of the function, try to see if it was custom provided in flags. Thanks go to Rob Moore for spotting this (cherry picked from commit 89b740394a9e84c3695886cdbee7a7e8ea6f758f) 2020-03-04 Razvan Crainea * [f67c43d70] : tm: fix t_reply_with_body doc - cannot be run from failure_route (cherry picked from commit eae2a86eed9ee52605ca110467b8a40ee82bff00) 2020-03-04 Razvan Crainea * [b583aef53] : Revert "tm: Allow t_reply_with_body() from failure route" This reverts commit b3da92d6b3ecf281976ad8a5e262cfb1aadf30ad. (cherry picked from commit f360070095a77cb311f8ef188ef79da6885f9c70) 2020-03-03 Bogdan-Andrei Iancu * [7d75f49a2] : [usrloc] Fixed the name of the table param in ul_add MI cmd 2020-03-02 Liviu Chircu * [259dc1f82] : tm: Allow t_reply_with_body() from failure route This now also matches the docs, similarly to t_reply(). Credits to Nick Altmann (cherry picked from commit b3da92d6b3ecf281976ad8a5e262cfb1aadf30ad) 2020-03-01 OpenSIPS * [2ca0e98bf] : Rebuild documentation 2020-02-27 Liviu Chircu * [ef08be028] : cachedb_mongodb: Fix memory leak in cache_raw_query() Thanks to @ycxwoo for spotting this issue! Fixes #1985 (cherry picked from commit e818ac259362fd5627d9234e8afb1e7ba3462783) 2020-02-27 Liviu Chircu * [217a6892d] : cachedb_mongodb: Fix possible off-by-one error (cherry picked from commit b0d65e9af1146c2764b43f4038922f0c7f9ec27b) 2020-02-27 Liviu Chircu * [b4fac39b5] : mid_registrar: Remove copy-pasted docs Closes #1984 2020-02-26 Liviu Chircu * [b9511b91f] : dialog: Fix some locking corner-cases * Re-INVITE pinging: synchronize writers and readers for the dlg->legs->adv_contact string, as well as the entire dlg->legs struct. Example subtle race conditions: 1. setting $DLG_timeout after t_relay() (read op) vs. concurrently processing a 200 OK (write op) 2. calling MI "dlg_push_var" after t_relay() (read op) vs. concurrently processing a 200 OK (write op) 3. in parallel forking, dlg_onreq_out() (read op) vs. concurrently processing 200 OK for prev. branch (write op) * DB load: to be 100% accurate, do not use ref_unsafe(), as we don't hold the lock -- use the safe version instead! (cherry picked from commit 0dc968169a8d61cb6f9dea6143edb6dcf738e0d6) 2020-02-24 Razvan Crainea * [3b2e5de99] : rtpengine: always learn process local pid Always learn the local process pid, even though there are no rtpengine sockets loaded from either script or database - they might appear later after an MI reload. Reported in sipwise/rtpengine#935 by @MarcoHierl (cherry picked from commit da636430df1335c2c2c59a1c053ff85ee21ef003) 2020-02-23 OpenSIPS * [4662b65d3] : Rebuild documentation 2020-02-20 Razvan Crainea * [152269b52] : siprec: reflect media_ip in o=line Close #1979 (cherry picked from commit f1a2979b5be7f17300e35d984624167820f1c11b) 2020-02-19 Razvan Crainea * [a7f801389] : b2b_entities: don't try to insert in db nonprintable param The b2b_entities module expects that the parameter provided during entity registrations to be a string. It stores this string in the database. However, there are cases where modules (such as siprec) force their parameter to be a pointer to a structure, therefore the string becomes non-printable. This breaks certain entities insertion in the database. This commit prevents the module from inserting a key that's not printable. In the case of siprec this is not a problem, since the module does not rely on the value that's stored in the parameter for restart - it rebuilds the value anyway. This is a temorary fix - ideally, the parameter should be able to be serialized before written in the database; although this is not possible now, it will be possible starting with 3.1. Hence this temporary fix. (cherry picked from commit 0bd7fbe7d5568f45ffbde7dd5a669fce2993b30f) 2020-02-19 Dan Pascu * [7db2f0a1d] : Fixed crashes and memory leaks due to improper memory cleanup (cherry picked from commit d8c15f8a318640c75fedb0d76bc3829210f8c1fb) 2020-02-19 Dan Pascu * [0b36baa8d] : Fixed log message (cherry picked from commit 9c6931bff2df8fb29d45ff986bad310bdfb95438) 2020-02-19 Dan Pascu * [acd20ae2d] : Fixed crash caused by invalid memory free (fixes #1974) (cherry picked from commit 4432711762e8882583e376991d8e11f0297d4820) 2020-02-19 Razvan Crainea * [ff997d76e] : siprec: start recording as soon as we have 2-way audio Engage recording even for 180/183 provisional replies, not only for 200. Reported by @MikhailKalashnikov in ticket #1970 (cherry picked from commit d9245d223e7bea5edc9705a6e8b511ee769c1086) 2020-02-19 Liviu Chircu * [a8370f86e] : tm + subscribers: Fix possible SHM leaks around tmb.t_req_within The severity is medium, however, as these leaks would only occur once the SHM pool is near depletion. (cherry picked from commit 80bd901aa247287a5d6d2e4f8fcba27f97a0d524) 2020-02-18 Bogdan-Andrei Iancu * [ffb0577c4] : Removed testing related line 2020-02-18 Bogdan-Andrei Iancu * [ba6957279] : updated to 3.0 2020-02-18 Bogdan-Andrei Iancu * [66984aba3] : Fix computing the cseq for a branch. Instead of assuming a +1 increment (to the cseq from request), better copy the cseq from the received reply. Thanks to @razvancrainea for the brainstorming. (cherry picked from commit b7b22d6e3f54711d64ecd4731a40bfa55211e9d6) 2020-02-18 Bogdan-Andrei Iancu * [a39552e5e] : In UAS replies, preserve the CSEQ from the UAS request Instead of computing the cseq for the forwarded replied, better use the cseq value from the original requests (like restoring). Thanks to @razvancrainea for the brainstorming on the issue. Fixes #1969 (cherry picked from commit 0200c0e1424c1a2b993cd3545507f2ccaf6c573a) 2020-02-17 Liviu Chircu * [31b6ae5d8] : $param variable: Improve behavior on error * hint that named params are only allowed within event_route * throw an error on accessing $param(name) from a route() call without parameters (i.e. avoid doing a quick-exit, be consistent). This will help users when migrating to 3.x, since fetch_event_params() used to work within a simple route. * skip the redundant "params_no == 0" check, since params is always NULL when "params_no == 0". Even without this idea, the index check below will also catch this corner-case. Thanks to Vlad Paiu for bringing this issue to attention! (cherry picked from commit 675a10e2fb5115f1c210dd032c3ac120dee82e22) 2020-02-16 OpenSIPS * [7b5d6546a] : Rebuild documentation 2020-02-09 OpenSIPS * [9106ec5e5] : Rebuild documentation 2020-02-07 Razvan Crainea * [3f3f496cf] : core: fix string2hex returned length Reported by @johandeclercqdemocon in Ticket #1957 (cherry picked from commit 01e0ff99f4f80cf7dc9e0d8ec45362810b624c5b) 2020-02-06 Razvan Crainea * [59e1e9085] : net: call initialize proto function for all connections This code fixes proto ws and wss, by calling the `conn_init` function even for connections that are not sent back to main. Reported by @suharik71 in #1956 (cherry picked from commit 6c9c6efa8e668ad361e7a75b645951dc2c86e8b2) 2020-02-05 Liviu Chircu * [0e25e055b] : drouting: Fix missing MI recipe array terminations (cherry picked from commit da22c0807db97c7b23050b7b56f3a1b5fd6c99cb) 2020-02-04 Razvan Crainea * [540d1a498] : hp_malloc: run check_double_free() under lock (cherry picked from commit 41714f134943f76adb1dae43d8a3c9365924352e) 2020-02-04 Razvan Crainea * [9e23dffc3] : hp_malloc: populate DBG info for hp_free* (cherry picked from commit 410c664c953f409b2c8143b1d46cc7fc28deac63) 2020-02-04 Liviu Chircu * [1e3350c80] : HP_MALLOC: Fix a shm_realloc() concurrency issue On a fragment shrink operation, we must also grab the lock on the resulting fragment before inserting it (this cannot be an _unsafe operation!) Many thanks to 46Labs and Răzvan Crainea for helping troubleshoot this (cherry picked from commit ff7ba6e2dd05fbc4989561d7a4582cb11cbb01ba) 2020-02-03 Vlad Patrascu * [d3efbd533] : b2b_entities: fix several missing keys in b2be_list MI output (cherry picked from commit 7b4a54d78f9d9da816947f02a00fa72a2956c4c8) 2020-02-02 OpenSIPS * [ed67a089b] : Rebuild documentation 2020-02-02 Razvan Crainea * [778bc7b87] : tls: fix the length of masker key (cherry picked from commit df3f537d70f64ecd0de0881e6fb39b75c50a16bc) 2020-01-30 Razvan Crainea * [1463eb1e2] : tls: make sure crypto rand functions are reentrant Reported by @fgast in #1953 (cherry picked from commit af5ba52055af860723fe554e9069d4c9142f82af) 2020-01-30 Fabian Gast * [7349dffce] : fixes #1954 - change return value if we can not add crl files (cherry picked from commit 7a84935b5cd2c4f2f2d21c3c9d978999f1697dd5) 2020-01-29 Razvan Crainea * [43d479221] : preproc: fix possible leak when errors trigger Fix Coverity #199907 (cherry picked from commit 1534d26e4fda7ad614b07fd2914bf663a60e42d5) 2020-01-29 Razvan Crainea * [674363701] : async: fix small typo when printing fixup errors Fix Coverity #199935 (cherry picked from commit cae397c89f47646a1f379279aebf994248fb64ad) 2020-01-29 Razvan Crainea * [cbd86bf85] : reload: fix possible FILE * leak when error Fixes Coverity #199978 (cherry picked from commit 3b1b9d7d09da0fc33c901e0542b2dd9b4d66001a) 2020-01-29 Razvan Crainea * [52376f8cf] : auto_scale: prevent possible overflow in auto_scale detection Fix Coverity #200080 (cherry picked from commit 52f071ed1dccff5453f49ed37baa6ae86183e373) 2020-01-29 Razvan Crainea * [9e216d39d] : pt: fix possible (yet highly unprobable) division by 0 Fixed Coverity #200087, #200079, #200002, #200015 (cherry picked from commit 009e8efc3ba39d1c441181f209cbbfa25d057be3) 2020-01-29 Razvan Crainea * [f525231d4] : transormation: properly check str2ipv6 transformation Fix Coverity #200023 2020-01-29 Razvan Crainea * [496cfdc0b] : stats: initialize found to 0 Fix Coverity #207916 (cherry picked from commit 1b8a9acb90b83efe47e3abbcebb0f23585c7a661) 2020-01-29 Razvan Crainea * [fc5534928] : script: fix route index overrun Fix Coverity #207926 (cherry picked from commit 784423afd1265358c9f193b7163277386dd903f3) =========================== Release 3.0.2 ============================== 2020-01-28 Razvan Crainea * [dc1dc52c2] : Bump version to 3.0.2 2020-01-28 Vlad Patrascu * [97abae617] : perl: improve docs regarding the return value of perl_exec() (cherry picked from commit 286ab285de555d631a45846a14f7daa1001ac84b) 2020-01-28 Razvan Crainea * [2189cf819] : dialog: update contact only after routes have been run (cherry picked from commit 7b7a9fc2bfd739b80b893c1b5ee829b1c3cef251) 2020-01-28 Vlad Patrascu * [05845465b] : perl: fix script halting caused by perl_exec_simple() Fixes #1951 (cherry picked from commit c4652e179adc5177e56a28655c95e7d79c4335a0) 2020-01-28 Liviu Chircu * [ecec7ce25] : auth_aaa: Fix missing static struct termination line Fixes #1922 (cherry picked from commit 57952748603c8a90cb97fd29e973a0f4c63ba09c) 2020-01-28 Bogdan-Andrei Iancu * [dfaa654ac] : Fix db backend init for trace_id's Do not perform DB queries during cfg parsing, but only at mod_init stage, as some DB backends (like db_text) may not be initialized before mod_init. Closes #1947 (cherry picked from commit b4fce7b66d8478c6b3dc5684f2533140b88dc078) 2020-01-27 Bogdan Andrei IANCU * [a55e444b3] : Merge pull request #1949 from fgast/perl_newline Add missing newline (cherry picked from commit 7e16079fc94700327162a86ff0367731975d484f) 2020-01-26 OpenSIPS * [e265f02b2] : Rebuild documentation 2020-01-23 Liviu Chircu * [6de87ba5c] : uac: Fix regression in de7606dfb2 In restore_mode == auto, the To/From URI restoration for upstream sequential requests was affected, as < and > were now always removed when restoring the header back to the upstream side. Credits to Vitalii Aleksandrov for the report & debugging data (cherry picked from commit c2e0603331a5b1c977c727d8806cda51a0ddf666) 2020-01-23 Liviu Chircu * [53296244b] : uac: Fix possible crash in display name fixup Some variables, such as $dlg_val, return {NULL, 0} strings instead of {"", 0} (e.g. $var), causing the dereference op to crash. 2020-01-22 Liviu Chircu * [1d8d5d4fb] : HP_MALLOC statistics: Fix an int vs. long casting bug (cherry picked from commit ac7de673a8c8ac3b0aaf2c9eb5d5a49657502328) 2020-01-22 Liviu Chircu * [2b5e187eb] : cJSON library: Improve precision for myfloor() Fixes a bug where large MI tree integers would get printed as: { "shmem:total_size": 2.147484e+09, ... } ... due to lack of precision. (cherry picked from commit abbb728f6b52bb3dd633ab3644709badf80986fe) 2020-01-22 Liviu Chircu * [8c1ce88a1] : HP_MALLOC: Do not attempt mem warming with non-HP allocator (cherry picked from commit 4afb6fa4aae94b11354890ef9891bc62d6c22439) 2020-01-22 Liviu Chircu * [fa631623a] : uac: Force URI enclosing for sequential requests This is a continuation of commit a75b2369b15972c, where we do the same thing for sequential requests as well, avoiding any ambiguous resulting headers, such as: ACK To: "Alice" sip:sipp;p1=yes@10.0.0.10:5060;p2=yes;tag=abcde ... which we now disambiguate as follows: ACK To: "Alice" ;tag=abcde Sponsored by 46Labs (cherry picked from commit b2191bb695859a10188757662dc77708a41ada73) 2020-01-21 Vlad Patrascu * [9ecd5e42a] : event_flatstore: handle oom errors on pkg allocations (cherry picked from commit a4e94de60252d70635707ede5b7d6795430380d8) 2020-01-21 Liviu Chircu * [070f8b7c5] : sipmsgops: Fix docs for sipmsg_validate() (cherry picked from commit d618825234078bc25917cfb74e53bbbeb33b2fc8) 2020-01-20 Vlad Patrascu * [38052e0fc] : event_flatstore: improve handling of multiple subscriptions for the same file Use the same internal shm struct corresponding to a file for each evi subscription for that file. This fixes an issue with the 'evi_flat_rotate' MI command not properly "rotating" multiple subscriptions to the new file. Besides, a file is now opened only once regardless of how many subscribtions there are for the same file. Also, do not reuse an old 'evi_reply_sock' structure for a new subscription for the same file (if the file corresponding to an old subscription was not yet closed by all processes). This led to incorrect expire times for new subscriptions. Fixes #1933 (cherry picked from commit a2f4f80fdf34ec18eb1b6499d512609085115e72) 2020-01-20 Liviu Chircu * [1c4fa53f2] : {ip.matches} transformation: Fix pkg memory leak Many thanks to Callum Guy for providing helpful data on this bug! 2020-01-19 OpenSIPS * [7560ac179] : Rebuild documentation 2020-01-17 Liviu Chircu * [3117b855b] : menuconfig: Fix syntax issues Fixes #1940 2020-01-17 Liviu Chircu * [eab86f1d6] : RPM mem: Fix bad ifdef blocks Fixes compilation with: #-DF_MALLOC -DQ_MALLOC -DHP_MALLOC (cherry picked from commit 96f2ad150ec2f0e3e44824e71868988326ac40ed) 2020-01-17 Liviu Chircu * [be564b5b6] : Fix compiler warning mem/rpm_mem.h: In function 'rpm_status': mem/rpm_mem.h:308:6: warning: the address of 'qm_status' will always evaluate as 'true' [-Waddress] if (!RPM_STATUS || !rpm_block) Credits to Bogdan for the catch! (cherry picked from commit 8d7db1522ae1eb979fcbb88699be9cbcf37238ec) 2020-01-17 Liviu Chircu * [028183b8f] : Fix improperly initialized str modparams Fixes #1427 (cherry picked from commit 7abd824a33b198d9adc844e62e475918e366db8c) 2020-01-17 Liviu Chircu * [4e3d09bd0] : ratelimit MI rl_list: Improve handling for non-existing pipes Fixes #1863 (cherry picked from commit b0aa68e8468a35d5cfbf9820c7e7cf566ac19c49) 2020-01-17 Razvan Crainea * [88624ba2a] : proto_smpp: fix utf8 for [0x7f,0xff] chars Thanks go to @johandeclercqdemocon for reporting this in ticket #1935 (cherry picked from commit 0838b2de27c50ee7eb7824b239119526c0ecbffe) 2020-01-16 Razvan Crainea * [615500f58] : tls_mgm: remove SSLv2 and SSLv3 from documentation (cherry picked from commit 7261f1271af843577969910123025fc18449532d) 2020-01-16 Razvan Crainea * [5ec2fec11] : exec: fix assinging int val to environment values (cherry picked from commit c37badde03bd0467c0194d16626d7b98f1fb6a06) 2020-01-16 Razvan Crainea * [bfec12218] : tls: protect openssl rand functions with lock 2020-01-16 Razvan Crainea * [435062c3b] : net: initialize connection extra data in workers 2020-01-16 Razvan Crainea * [53d35eb74] : tls_mgm: create tls domain per process 2020-01-16 Razvan Crainea * [b73cf852d] : tls_mgm: use the new threadid interface for ssl 1.x.x 2020-01-15 Liviu Chircu * [4207abc58] : cachedb_mongodb SQL adapter: Dup all string columns The strings provided by bson_iter_utf8() and bson_iter_binary() are ephemeral. We must duplicate them as soon as possible, to prevent invalid memory pointers within the result set as multiple rows get processed. Fixes #1903 (cherry picked from commit 50992ba690d2eca0f0751676f510097e68175034) 2020-01-15 Razvan Crainea * [38db49b13] : cfgutils: fix check_time_rec() leak 1. The timerec should be allocated in pkg memory, there's no reason why it should be shared 2. After checking the timerec, the function needs to release the memory 2020-01-14 Liviu Chircu * [13523638d] : MI mem_rpm_dump: Do not crash if RPM mem is disabled (cherry picked from commit b5a533f4e34fe36fddea5de98fcef0010c49704e) 2020-01-14 Liviu Chircu * [ef46f6e9f] : HP_MALLOC memory warming: Also work with HP_MALLOC_DBG (cherry picked from commit 0617b35e9377dbfe590504d44b66b7fd24c487f0) 2020-01-14 Liviu Chircu * [9bd6b979c] : HP_MALLOC: Fix the memory warming feature As some initial SHM allocations are done, the large chunk of memory tends to move towards the end of the list, so we must properly locate it before we are able to chop it up. Fixes #1638 (cherry picked from commit 368e3699e60365c09902ceb26ba0251be9864a85) 2020-01-14 Bogdan-Andrei Iancu * [9f6e75bd3] : Proper inheriting of advertised address/port during dns based failover. As the DNS based failover has to create a new branch as a perfect copy of the failed branch (as branch attributes), use the per-UAC advertised address and ports rather than the the per-MSG values. (cherry picked from commit 0390ec9dce7eab7da6bb6b952ef4766698a1a967) 2020-01-14 Bogdan-Andrei Iancu * [fd15c1c7b] : Proper inheriting of branch attributes during DNS-based failover. When creating a fake request based on an existing UAC entity, use the DST_URI and PATH_VEC specific to that UAC entity and not the per-message values. This will correctly preserve the DST_URI and PATH_VEC during a DNS based failover, where the new branch must be a perfect copy of the original failed branch. (cherry picked from commit 09473b34d94014f3279a3ff53e593bc7d9ba0a41) 2020-01-14 Razvan Crainea * [ce4da0292] : proto_smpp: don't move to next char if escape is not recognized 2020-01-14 Razvan Crainea * [2e2143f00] : proto_smpp: convert GSM7 to UTF-8 for incoming SM Thanks to @johandeclercqdemocon for reporting this in #1935 (cherry picked from commit 417ac1185809d80315548ba5a4d5dd75c61ce93a) 2020-01-14 Razvan Crainea * [5006ab270] : proto_smpp: fix several memory leaks headers, body and payload was not properly released after sending a SMPP message (cherry picked from commit d81eaf9d093e6cf321a9d37f5e22740e85d5df91) 2020-01-14 Bogdan-Andrei Iancu * [5ca1979c4] : Fix inheriting branch specific attributes while forking via failure route. The path vector and Q value are per-branch values and they must not be inherited while creating new branches from failure route. Closes #1887 (cherry picked from commit 4d8d9ca902475a9eaaa759c3d4c75f8ae4ba348e) 2020-01-14 Vlad Patrascu * [a3354e0b7] : sql_cacher: fix a 'cache_table' modparam parsing bug Fixes #1900 (cherry picked from commit 49d01575cf7c05e7b73e751965dc546a3785743f) 2020-01-13 Razvan Crainea * [6246ea601] : tls: use is_peer_verified for both TLS and WSS Close #1765 (cherry picked from commit 4e5ac0d3094552ebaa76d183b74c9d0356f30547) 2020-01-13 Vlad Patrascu * [979bfdd2a] : dialog: fix double decrement issue with cachedb shared profiles If dialog replication is enabled and a dialog expires, the cachedb counter will now only be decremented if the sharing tag is active. Fixes #1937 (cherry picked from commit 19bbf8ca08638d938c32ebf467207357dcb95425) 2020-01-13 Liviu Chircu * [9d669e1d9] : usrloc: Disambiguate ul_flush / ul_sync docs (cherry picked from commit 3a2e07380323ac5f84536d57cdcb69cda98f1fc0) 2020-01-12 OpenSIPS * [1a3a302b3] : Rebuild documentation 2020-01-10 Razvan Crainea * [ad36a4f3f] : menuconfig: more verbose output in case of error Close #1242 (cherry picked from commit 014f5d2773a6b86f027bf7aa893078de8079d155) 2020-01-10 Bogdan-Andrei Iancu * [0260c9b32] : Improve/clean logging on expire notifications Credits go to @wdoekes / Walter Doekes Related to #1722 (cherry picked from commit f12a53907d9829a949a9ca62a5a6d0e63695d2e9) 2020-01-10 Bogdan-Andrei Iancu * [8f3e58938] : Proper handling of subscription session overlapping 1) be sure we send back a 500 reply in all error cases 2) detect the cases of subscription session overlapping (see #1722) Similar to 4918544248c495b1099a54326f97a82df97bbe76 (cherry picked from commit 6e36b661823c823e42b15bfad0a26a9667be94cd) 2020-01-10 Bogdan-Andrei Iancu * [b4facfbec] : Proper error handling in handle_subscribe 1) be sure we send back a 500 reply in all error cases 2) detect the cases of subscription session overlapping (see #1722) This is based on ec1889638a9d43280ba1362f6108a175efd4a854, with the update of the generation of the To-tag before the subscription check/reply (cherry picked from commit 4918544248c495b1099a54326f97a82df97bbe76) 2020-01-10 Bogdan-Andrei Iancu * [666e811eb] : Refactor signaling, sl & tm APIs to add gen_totag() This is a new function to generate the To-tag (which is msg specific and computed in a deterministic way) whitout actually sending a reply. First stage of a fix for #1722 2020-01-08 Bogdan-Andrei Iancu * [a9d07b55f] : Fix overflow when using large number of GW per rule Instead of fix-size internal buffer, user self-scaling buffers for handling/sorting the destinations/gateways in rules and carriers. Fixes #1910 (cherry picked from commit e5991e1af5ca6eeb92940334da0a1cc31993ea7d) 2020-01-08 Liviu Chircu * [806c0331b] : permissions: Fix typo in MI "subnet_dump" Fixes #1901 (cherry picked from commit 19c27394131be722a6519e8d206cc62c015fdd84) 2020-01-08 Liviu Chircu * [86b0c941b] : mid_registrar: Add request retransmission detection Instead of leaking shared memory on scripts which do not properly call t_check_trans() beforehand, mid_registrar_save() will now act as a t_check_trans() call and perform a default processing of the retransmission. Fixes #1907 (cherry picked from commit 2a4290d66b29e82da6ac13eae0da62df58d1a6ce) 2020-01-08 Vlad Patrascu * [84d45ed2a] : dialog: fix a crash when receiving an unknown replicated profile Reported by SamyGo on the mailing list. (cherry picked from commit 89bbb67e349acb172949beda1f80b07ec1dc9d3b) 2020-01-08 Razvan Crainea * [094a4dbe5] : proto_ws: decline Sec-WebSocket-Key keys that are not 24 bytes In case the key is not 24 bytes, the some internal buffers might be overwritten, resulting in malformed/bad Sec-WebSocket-Accept generation. And since the RFC requires the key to be random 16-bytes-base64 encoding, the length should always be 24 bytes. Thanks go to @hafkensite for reporting it on GitHub and to @wdoekes for profiving the fix. Close #1928 (cherry picked from commit 6f24b26205d11a3500f86113cf74f7f7f4ec95e8) 2020-01-08 Liviu Chircu * [04f2b049b] : Status pipe reporting: Do not log errno on success ... as this may cause bogus debug logs, such as "Bad file descriptor" on 100% successful operations. (cherry picked from commit 6862850851c0597e70c79926d2266e43eef97dd4) 2020-01-08 Liviu Chircu * [9434c5b43] : Timer process counting: Drop obsolete code The timer counting and timer status code reporting logic was reworked in caabbe53229bde (from N timer processes to 1+1, later 1+1+1), so the "init_timer_no" shared integer logic is no longer needed. (cherry picked from commit ed905d1a36fd0d7fb5b6461433f00c53e69c87cd) 2020-01-07 Razvan Crainea * [8225988aa] : fix partition recursive call when wildcard is used 2020-01-07 Razvan Crainea * [848165520] : Revert "dialog: fix partition recursive call when wildcard is used" This reverts commit 689a4d1c17f8d11c07f34b6fe5614fcff253df11. 2020-01-07 Razvan Crainea * [689a4d1c1] : dialog: fix partition recursive call when wildcard is used 2020-01-07 Liviu Chircu * [404090eae] : cachedb_redis: Improve reconnect logging * lower failed query log severity from ERROR -> INFO * make sure to log query recovery after a reconnect (cherry picked from commit ac153f449f6fcc978148ff8b6c8c940ec0776423) 2020-01-07 Bogdan-Andrei Iancu * [b89ced7c5] : Document the limitations of the FEEDBACK alg Closes #1915. (cherry picked from commit 5fb57167b1b2b7734542205e4019277f1ffe5013) 2020-01-05 OpenSIPS * [9a8bf14ee] : Rebuild documentation 2020-01-05 Nick Altmann * [119a4f963] : RPM spec: fix rhel8 condition 2020-01-04 Bogdan-Andrei Iancu * [46350aca2] : Improve docs on loose_route() and strict versus loose routing (cherry picked from commit 682e96d24949356e60a371c4e5b95b5833703bef) 2020-01-04 Nick Altmann * [42289c4d5] : RPM spec: support for rhel8 2020-01-04 Bogdan-Andrei Iancu * [d253f2e08] : Fix missing `my_bool` for mysql version higher than 80000 (cherry picked from commit c28876540fe447063db349932a36b655f5fe00f1) 2020-01-04 Bogdan-Andrei Iancu * [b46eea807] : Fix flags for event backend to avoid conflicts with event_flatstore (cherry picked from commit 638160496d0863bf506c01c714812f2ea5206767) 2020-01-03 Nick Altmann * [8dc763d5a] : RPM packaging: disable python module for fedora >= 31 2019-12-29 OpenSIPS * [9cd08175c] : Rebuild documentation 2019-12-27 Bogdan-Andrei Iancu * [81dbe5037] : Fix detection of current partition in multi-partitions scenario Fixes #1927 2019-12-23 Bogdan-Andrei Iancu * [073131cc1] : Fix locking when flushing state to DB Indeed there was no data locking when the flushing the destination's state to DB. Closes #1911 (cherry picked from commit 43c7d916d8a807d00021818f1a120284cb08b50f) 2019-12-22 OpenSIPS * [bb546616a] : Rebuild documentation 2019-12-19 Bogdan-Andrei Iancu * [4d37bf23d] : Fix wrong HTTP path to online module docs 2019-12-18 Răzvan Crainea * [220ccf9e1] : Merge pull request #1918 from Ozzyboshi/master Wrong log message (params in wrong order) 2019-12-16 Razvan Crainea * [dab2934a1] : topology_hiding: prevent module for engaging twice Prevent the module from engaging TH callbacks twice, in case topology_hiding() was called twice; however, do append the new flags to the dialog module flags. (cherry picked from commit 5843679566327c2df3b93e74bf3a1c7914f6530b) 2019-12-08 OpenSIPS * [200e0c14f] : Rebuild documentation 2019-12-06 Liviu Chircu * [93970954f] : dialplan: Fix misleading 'dp_reload' docs and logs (cherry picked from commit 984468f848a92e8cd8f8075a741c41f69289c2c7) 2019-12-05 Bogdan-Andrei Iancu * [fc728f0c5] : Fix re-indexing of reloaded routes Fixes #1899 2019-12-03 Vlad Paiu * [ef33057a2] : Fixed long select queries reporting 0 rows instead of ERROR if mysql_store_result throws an empty result set, first check mysql_errno and if that is ok, only then assume the result set is empty 2019-12-01 OpenSIPS * [4bc74a1a6] : Rebuild documentation 2019-11-27 Liviu Chircu * [4c8f7ccd6] : benchmark: Fix 'bm_poll_results' MI command Reported by Nick Altmann (cherry picked from commit 6bd19fcc96b9a05c46b4c9bf319b500ed93a735e) 2019-11-26 Razvan Crainea * [bbb721159] : b2b_entities: remove bogus content length check (cherry picked from commit b411063f172868a1e058f24d21cff40f7b881518) 2019-11-26 Liviu Chircu * [e3d7b5992] : mid_registrar: Fix mishandled corner-cases * avoid extraneous "udomain unlock" operations on some error cases (cherry picked from commit b3bdf7ce29dfe359b041ee0e59472a872bff1268) 2019-11-26 Liviu Chircu * [6896bcdc3] : gflags: Fix crash introduced with function porting Reported by Nick Altmann Fixes #1906 2019-11-26 Razvan Crainea * [643df9a06] : registrant: document password format in db schema The format of the password is actually driven by the format of the `credential` parameter in the uac_auth module. Closes #1817 (cherry picked from commit fe844ad49bc5eaada0b1edf318b3f9327149bdc1) 2019-11-26 Alessio Garzi * [d80037096] : Memory leak fix for mongodb module-reply not freed (cherry picked from commit 4e0d8ffd2c5d1f1a110fb503567f664dbe889544) 2019-11-26 Razvan Crainea * [1d7ffe4e2] : dialog: build the ACK with full route set for re-INVITE When the dialog module was sending re-INVITEs, the ACK to those re-INVITEs was generated by the TM, thus was lacking a valid Route set. This commit prevents the TM from generating the ACK, having the dialog module sending it, with the learned Route set. Thanks go to 46Labs for reporting and testing this! (cherry picked from commit c914f15001a9d5d3afa659d26a2f22ad76ce4632) 2019-11-24 OpenSIPS * [9cd189f27] : Rebuild documentation 2019-11-22 Liviu Chircu * [10c89c3d3] : usrloc: Fix incomplete docs on 'cluster_mode' Thanks go to Bogdan for the catch! (cherry picked from commit e9e6f40427385b72638b45e3a3e8b72b9fd9b294) 2019-11-22 Razvan Crainea * [5fe4ae963] : rest_client: initialize cURL library in mod_init() This fix prevents crashes generated by rest_client trying to initialize the SSL library from multiple processes in parallel, without any locking mechanism on the internal shared objects. Many thanks to Clif Jones and Ben Newlin for reporting and providing plentora of logs and configurations that replicate this issue. Without their help I couldn't have figured this out. Close #1771 (cherry picked from commit 4286bb57f671afd0002fcb5c345da55946f647bd) 2019-11-22 Liviu Chircu * [e98b07cf1] : pua_usrloc: Do not crash during usrloc sync ... on the backup box, due to `current_processing_context` being NULL. Thanks to Pete Kelly for reporting and testing! (cherry picked from commit be5c5e50b9bb7b4d97bbf0a0b248b92c52cf2675) 2019-11-21 Liviu Chircu * [f002c0c91] : permissions: Fix 'subnet_dump' MI command Reported by Ovidiu Sas (cherry picked from commit b72d0fe1c6d17d7d797c226885c7c45d544b8a73) 2019-11-21 Vlad Patrascu * [a892207d5] : mi: cache_fetch: return an error response if value not found Closes: #1894 (cherry picked from commit 2528d81bcac9aa31e34fa0432303d5910929fe56) 2019-11-20 Razvan Crainea * [30f52558c] : dialog: improve $DLG_dir docs (cherry picked from commit e2e2c8a922892c49a040301cb4e07e52ac5cc625) 2019-11-19 Vlad Patrascu * [a2041139e] : rtpengine: fix 'teardown' MI command (cherry picked from commit f25e89ea9f1e6008c3ba865c2b9e7f4d3f73a010) 2019-11-19 Vlad Patrascu * [2051c3044] : dialog: improve API terminate_dlg() to also identify dialog by callid (cherry picked from commit b5896f4a76c33a03b5a818060ec7463205237938) 2019-11-19 Razvan Crainea * [09835924a] : dialog: properly free resources from previous commit Completes commit bef6f542b (cherry picked from commit 1c7a4e76c07522319f2a810f26be8b5bbd6664ca) 2019-11-19 Razvan Crainea * [8e876e4a6] : dialog: fix dlg_end_dlg local_route execution Before this commit, when running any flavor of `dlg_end_dlg` from an external process (not a SIP worker), the command that was generating the BYE messages (tm's `t_request_within`) was dispatching the job to a SIP worker, using IPC dispatch. This means that the BYE messages were created in a different process than the initial one, thus not exposing a proper context in `local_route`, but a dangling one, whichever was not properly cleaned up after a request was processed. This resulted in bogus data, such as inexisting `$DLG_dir` output, or even worse, whatever broken values were leftover in the dangling context. This commit fixes this issue by dispatching every `dlg_end_dlg` job to a SIP worker, thus creating and populating the dialog context properly. This command affects any function that can be run through MI, or from an external process such as: * MI dlg_end_dlg * MI profile_end_dlgs * RTPProxy/RTPengine timeout notifications Credits go to Darpan Patel for reporting this issue on GitHub Fix #1896 (cherry picked from commit bef6f542bdf58c094f7e6a89abee03038977b3f8) 2019-11-18 Bogdan-Andrei Iancu * [561086c3d] : Removed useless SQL condition The contact_id is an unique ID of the contact, so using the callid (as part of the query key) is redundant and useless (probabaly a leftover from the code re-factoring when the contact_id concept was introduced) (cherry picked from commit 312cad88869c84d98307b800975ba41b5e5b65d5) 2019-11-18 Bogdan-Andrei Iancu * [3396f5b38] : Fixed handling of signed numbers as script route params (cherry picked from commit 76dfead300f75fd3f193b5fb1bd53d4bc498b2c0) 2019-11-17 OpenSIPS * [a825b9be9] : Rebuild documentation 2019-11-13 Liviu Chircu * [0c216f543] : Makefile: Re-order deps to fix parallel `make install` `make -j install` is now fully functional Fixes #892 (cherry picked from commit 486f0685167cf5be3866e8da9b4b6e199663a68d) 2019-11-13 Liviu Chircu * [1fbe9a66c] : mid_registrar: Fix possible crash on shutdown Since the TMCB_TRANS_DELETED callback _may get called after_ the module destroy() phase, the udomain_t structure attached to the callback must not be accessed anymore if OpenSIPS is shutting down, as the usrloc module may have already freed most of its data structures. Fixes #1641 2019-11-13 Bogdan-Andrei Iancu * [84cb1c157] : Proper free and reset of dummy SIP msg after running HEP route (cherry picked from commit 501c893894b0a71b1649786de9f5fb1f133a8239) 2019-11-13 Bogdan-Andrei Iancu * [63eef5fc1] : Avoid mem leak when running the check trace route for TCP. Do proper free of the summy SIP msg after each run. (cherry picked from commit cff73d685996ddd9a1543c4040de02b9c43fb7b5) 2019-11-13 Bogdan-Andrei Iancu * [69fe2d848] : Proper dummy sip msg cleanup after running startup route (cherry picked from commit 2c1999bc8c5eb64c59a0d300ff860bdda65e639d) 2019-11-13 Bogdan-Andrei Iancu * [d877afe10] : Proper reset of the sip_msg struct after each run of timer route. Some cleanup of the free_sip_msg() function. This function is suppose to only free the attached content of a SIP msg, but without doing any kind of reset of the subfields. Closes #1878 (cherry picked from commit b3dc0f7065bcf53392446fbc253dd24bb99d6bc8) 2019-11-13 Liviu Chircu * [beb72cb21] : struct hist API: Add rotating log list support The struct hist debugging support now also offers rotating logging lists with capped sizes. Whenever the "flush" condition occurs, the new sh_list_flush() function can be invoked in order to dump the currently held logs to disk. Inspired by #1580 (cherry picked from commit 1fa98a977d532931d3834b52e47d4598e9fab2ad) 2019-11-13 Bogdan-Andrei Iancu * [43f7c6b50] : Fix crash of list_hdr_add_option() on an empty body hdr Reported by Elliot Journeaux. (cherry picked from commit f1857c8b3e84b3888f624446c046a5f59d8fd5c1) 2019-11-12 Liviu Chircu * [e12d49d56] : build-contrib.sh: Add new contributors (cherry picked from commit b01fea26391538e152f6eddca148a49a82038d15) 2019-11-12 Liviu Chircu * [1348c9d6e] : clusterer: Improve doc for 'seed_fallback_interval' (cherry picked from commit 152e0f97cc69451e5834503c0fe172f1dca8b493) 2019-11-12 Liviu Chircu * [68eefbf39] : clusterer API: Refactor the "require_sync" parameter Rename to "startup_sync", which better reflects its actual behavior. (cherry picked from commit a8b85870374fae038770919f5593e30a16949b78) 2019-11-12 Liviu Chircu * [9b28a8f92] : Fix various typos & minor doc/code shortcomings (cherry picked from commit b7db8e6753c67767a1ec50f2ec44ef5c99eafc6a) 2019-11-12 Liviu Chircu * [52e25208e] : dispatcher: Clean up obsolete code (cherry picked from commit ca097f48903eb8cedac92dada8adf6aee966487f) 2019-11-12 Liviu Chircu * [69866af46] : dispatcher: Fix the "round robin" algorithm ds_select_dst() must not get called multiple times on a given set, as some destinations may get skipped in the process. Fixes #1889 (cherry picked from commit 3d2e337423eb21f0eed5a8bbcec683d5694184cc) 2019-11-11 Vlad Patrascu * [ef238e524] : perl: fix memory leaks when calling script functions from perl (cherry picked from commit 3726b8a4f6fbb89f86099b0cc83f15ee3953a4ed) 2019-11-11 Vlad Patrascu * [670dc326e] : python: fix crash when calling python_exec() with 1 parameter (cherry picked from commit 42d14d1ce43a4df240348bf14cca4ee1a18f8f2c) 2019-11-11 Vlad Patrascu * [14290e0ae] : python: fix memory leaks when calling script functions from python (cherry picked from commit 4038d7870c96de06815c36098eefc3bfc694f424) 2019-11-11 Liviu Chircu * [706e798d5] : launch() statement: Fix an AVP list management bug Whenever a launch() operation gets executed inline (thanks to some favorable conditions), two things must happen: * no AVP from the message execution context should leak into the report route execution context * the AVPs from the message execution context must be restored after running the report route. They _must not_ be destroyed, as message processing will continue afterwards! Many thanks to Alexey Vasilyev for some valuable troubleshooting info Fixes #1580 (cherry picked from commit 4a639db5b110de5da03e23607f0d74549a0e6087) 2019-11-11 Vlad Patrascu * [78497a867] : lua: fix memory leaks when calling script functions from lua Fixes #1835 (cherry picked from commit c24b90358a3db26a8540b7c90409ce5a01c2a039) 2019-11-11 Razvan Crainea * [2fc1db6a5] : siprec: fix unref mechanism Fix unref mechanism to prevent it from unlocking an already freed session (cherry picked from commit be8596544e84f8115c28826810ee342d35105963) 2019-11-11 Bogdan-Andrei Iancu * [8df8aa13d] : Fix printing of bind_address for first CALLEE leg If there was no reply yet on the given leg, the bind_address is NULL, so take care when printing it Closes #1890 2019-11-11 Razvan Crainea * [b0813c11e] : ratelimit: allow traffic if NETWORKING stat not updated Adresses issue #1882 reportd by Ben Newlin (cherry picked from commit af6be0a44f1dc24326f3a7d251c95f31495dbb61) 2019-11-11 Razvan Crainea * [a086123ff] : proto_smpp: make sure fields do not overlap SMPP C-Octet String is defined as a limited number of characters, followed by a NULL terminator. This means that a SMPP field consisting of maximum N characters, can only have N-1 useful data + 1 NULL terminator. However, in real life, some operators require 9 length passwords, which result in 10 chars password fields, which conflicts with the SMPP specification. Check this thread for more information (yeah, I know it's old, but it is still relevant): https://devel.kannel.narkive.com/iyzAKxzC/smpp-maximum-password-length This commit "breaks" a bit the SMPP 3.4 specs, allowing data to have N characters _without_ the NULL termination, resulting in N+1 fields tops (i.e. the password field can have 9 chars + '\0' = 10 chars). Although this is not 100% correct, this makes our module more flexible, because if you don't need 9-long passwords, it will be just fine. So the specs are broken *only* if the provider requires it. This commit also fixes a bug (described in ticket #1867), where OpenSIPS was not storing a NULL termination for certain strings in their internal storage, resulted in strings concatenated together in resulted messages. (cherry picked from commit 14e15150dde76087b7fd0e275a38512cefab7cb7) 2019-11-10 OpenSIPS * [ec840cf9d] : Rebuild documentation 2019-11-08 Alexey Vasilyev * [08ffa7251] : Use word64encoding for $TH_callee_callid like in PR #1448 (cherry picked from commit 3c74e41f7b9ea6c541b3baafef357ce901132885) 2019-11-08 Vlad Patrascu * [f241ca3ed] : tls_mgm docs: remove references to obsolete default domain concept (cherry picked from commit 72d33eb5ff548ed2cb7331972e20d689e788e304) 2019-11-08 Liviu Chircu * [fe601798e] : mid_registrar: Remove Path when forwarding REGISTERs Regardless of its working mode, the mid-registrar always rewrites the Contact header to point to itself, so it stays in the path of future calls. Consequently, when relaying REGISTERs, it MUST no longer include the Path header(s) built by the upstream elements, as this will break call routing. (cherry picked from commit a97ca66a21df52967b799239a63acf9ba041332b) 2019-11-08 Liviu Chircu * [1c237ca53] : usrloc: Avoid locking issues on shutdown At mod_destroy, there is no need to lock the hash anymore. (same reason as the one behind 160b42410) (cherry picked from commit b0ac52b2fe0bf331556fa278fd535720b40fb0c1) 2019-11-08 Liviu Chircu * [215fce82e] : registrar: Fix a rare "max_contacts" bug When registering 2+ contacts in a single REGISTER, on an AoR with at least 1 registered contact, the "max_contacts" feature would not work properly anymore. (cherry picked from commit 7ff8b476fd19e25bb98b52c30c303a8bd6ba44b8) 2019-11-08 Vlad Patrascu * [893d94a1a] : dialog: make 2nd parameter of get_dialogs_by_profile() optional (cherry picked from commit f17e4f4c34aa10685cb67e9c04a547794894ecef) 2019-11-08 Bogdan-Andrei Iancu * [d91454a3a] : Expose sharing_tag while listing subscriptions Helper for #1848 2019-11-07 Bogdan-Andrei Iancu * [436dd69da] : Access the route's array after the IPC dispatch. The array with the script routes is not available in all procs, so, if the event is triggered from a non-scripting proc (like MI), the array will be empty. As a fix, use the array (get the action list based on route ID) only via IPC dispatching, when we know for sure that we are in a process with the valid array of routes. Fixes #1877 2019-11-07 Bogdan-Andrei Iancu * [56652971b] : Check for RAW_QUERY support if DB_ONLY Fix for initial problem on #1877 (cherry picked from commit f8e4072b9c59c88d8cd63da6e3dfda491de4e49a) 2019-11-07 Bogdan-Andrei Iancu * [da229faea] : Proper unlock on RADIUS AVP failure DO not forget to release the ACC data lock if the operation of adding new RADIUS AVP fails. Reported by Richard Revels Closes #1864 (cherry picked from commit 1ed25cc505fda8c07e7dccf1642770b43f183a46) 2019-11-06 Vlad Patrascu * [3d2bd5318] : tls_mgm docs: add missing CRL related modparams Also improve the description of the 'ca_dir' modparam. (cherry picked from commit 9d76d4ea92e40e774cddfe4307d0437005090697) 2019-11-06 Vlad Patrascu * [cc5d9a6d9] : acc docs: add 'ms_duration' param for E_ACC_CDR event (cherry picked from commit 40923a75ad239f93c4f3c2e15bddff9f2ea29882) 2019-11-05 Vlad Patrascu * [e5c0df918] : Fix MI response structure for 'uptime' command Fixes #1884 (cherry picked from commit 6d90a700a0cd56c4dc765f6f7369bb795f1d00c1) 2019-11-03 OpenSIPS * [5fccc90bc] : Rebuild documentation 2019-11-01 Razvan Crainea * [d64a21dd7] : ratelimit: make rl_feedback_limit extern Make sure `rl_feedback_limit` is properly alocated for the entire module, not only for the current object. Fixes the crash reported by Ben Newlin. Close #1882 (cherry picked from commit 8f26f5aa501dfad69e50c2bedcd4325afe7b1508) 2019-11-01 Razvan Crainea * [d0b5d8366] : net: handle CONN_ERROR2 on main (cherry picked from commit 4ffbeee5d6addde9548bb1bc102fe327cb546754) 2019-10-29 Vlad Patrascu * [40aba8e29] : sql_cacher: fix concurrent use of $sql_cached_value For example, this fixes issues when calling a script function with multiple $sql_cached_value params as PV specs. The function would get the same static buffer that would be progressively extended and overwritten. (cherry picked from commit cefc071606b52aefffa2967adf8b5846878c3296) 2019-10-27 OpenSIPS * [552cbbcef] : Rebuild documentation 2019-10-26 Liviu Chircu * [587141aeb] : Merge pull request #1874 from applerom/3.0 Update dispatcher_admin.xml 2019-10-26 Roman Sevko * [c7c4e8862] : Update dispatcher_admin.xml Fix unsupported in version 3.0 flag "s" in the example for ds_select_dst (opensips 3.0 is not working with it). 2019-10-20 OpenSIPS * [bc3a861b0] : Rebuild documentation 2019-10-18 Vlad Patrascu * [652f74c17] : Return proper MI response for reset_statistics on success (cherry picked from commit d8e221b72a23227ee91e2730c2d08aefbe33e66c) 2019-10-17 Liviu Chircu * [8f6188e5c] : struct hist API: Fix possible crashes; Improve API Commit a74fff149a introduced a race condition on this logic: lock_get(&sh->shlist->wlock); sh_unref_unsafe(sh); lock_release(&sh->shlist->wlock); , where "sh" must no longer be read following the unref operation. This commit fixes this issue, along with: * fix crash with -DSTRUCT_HIST but no -DDBG_TCPCON * speed optimizations: eliminate memset() operations (not needed) * make sh_push() more flexible (extra ref counts from outside) * code: hide structs, so importing struct_hist.h doesn't conflict with mysql.h's own "struct list_head" (cherry picked from commit 0db946724e9eaa364f54425f8664d96529e848a1) 2019-10-16 Liviu Chircu * [7345e9ee8] : assert() statement: Fix crash on startup The asserted expression must be ran through the fixup logic before it can be fully usable. For example, this fixes: assert($var(x) =~ "X", "test-op-match-1"); (cherry picked from commit cf117186ae389672a5d4e48538e81ed2b7de4fd6) 2019-10-15 Liviu Chircu * [6da0ba427] : usrloc docs: Fix misleading info on timer behavior (cherry picked from commit 755defe07c743407be61326c5e3a568e26ffce86) 2019-10-15 Razvan Crainea * [6d5eebbd5] : dispatcher: fix do_routing() max_res bug Commit b5557bdcb introduced a bug that was limiting the failover set to 0. This commit reverts the maximum results limit to 1000, as it was before the commit. Reported by Jonathan Hulme on Slack (cherry picked from commit 34fa4b7398369d71b11154dd10f1f06f10f666c4) 2019-10-13 OpenSIPS * [27d66a69b] : Rebuild documentation 2019-10-10 Răzvan Crainea * [e721124af] : Merge pull request #1852 from maxika-a/patch-1 [BUG] SipCapture Module #1851 2019-10-09 Maxim Azhnakin <18321241+maxika-a at users.noreply.github dot com> * [d9b54337c] : [BUG] SipCapture Module #1851 fix errors 2019-10-09 Razvan Crainea * [18035f400] : ratelimit: don't add json object if map is empty An object map was added for each hash entry, even though there were no pipes in that hash, resulting in a huge list of empty hashes [{},{} ...] This fix does not add an object in the resulted array if the map is empty. (cherry picked from commit a37642ab6db917c9ed8317cbccbbff1dc6433b3b) 2019-10-09 Razvan Crainea * [bfc7f1248] : mathops: allow math operations from any route Reported by Nick Altmann, close #1850 (cherry picked from commit e4c629c80c56e42eae82cff6e5c87f57f02661c2) 2019-10-08 Razvan Crainea * [af75339f7] : siprec: fix deserialization of siprec session (cherry picked from commit 59ce4d28443316ccea882181ff4f009c6870c6ec) 2019-10-07 Bogdan-Andrei Iancu * [383fe2a56] : [cfgutils] Downgrade polluting INFO log to DBG (cherry picked from commit 304314ff9ee9ff5ea0f4cfae263e45ed851b79b1) 2019-10-07 Razvan Crainea * [5fa793660] : Makefile: remove DEBIAN_VERSION Thanks go to Ken Rice for pointing this out! (cherry picked from commit d9435208b5dd41990bb51efe5254cc83504e7899) 2019-10-07 Razvan Crainea * [6a91ed026] : dialog: fix dlg_send_sequential mode parsing & doc Reported by Giovanni Maruzzelli, close #1844 (cherry picked from commit 409346a33a6a2fcf822eee897d63165106da68f4) 2019-10-06 OpenSIPS * [dbdee137b] : Rebuild documentation 2019-10-04 Liviu Chircu * [2f19c6dda] : Module deps: Fix a corner-case leading to a crash When setting a dependency-inducing modparam multiple times (e.g. avpops db_url) while having loaded no further dependency-inducing modules, OpenSIPS would crash on startup. Thanks to Xiao Huang for the report and fix Fixes #1843 (cherry picked from commit 9c49b09c1888c29208475e5d7d5827eea3a964cf) 2019-10-02 Razvan Crainea * [b04ffc28d] : Makefile.json: change json library based on include if we are going to include json-c header, than we shall use the json-c library, instead of json (cherry picked from commit 0d981b8f8b3466368cae2849f7912f3148ab7e4c) =========================== 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