<p>Improved clusterer api usage for dialog and ratelimit.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>&nbsp;&nbsp;<a href='https://github.com/OpenSIPS/opensips/pull/599'>https://github.com/OpenSIPS/opensips/pull/599</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>clusterer: Added initial infrastructure</li>
  <li>clusterer: improved load_info function</li>
  <li>clusterer: added persistent mode</li>
  <li>event_virtual: created new module: event_virtual, added parse and match functions</li>
  <li>event_virtual: Added raise function</li>
  <li>event_virtual: Added free function; fixed printing of the virtual socket</li>
  <li>event_virtual: Added comments, minor changes to socket printing</li>
  <li>event_virtual: Added documentation</li>
  <li>Expose unset_dlg_profile() to Request Route.</li>
  <li>Added b64encode, b64decode, and xor string transformations</li>
  <li>proper error message when ldap tls fails to start</li>
  <li>adds better error reporting and fixes typos</li>
  <li>Fixed generated callid</li>
  <li>exposed get_domain_ucontacts; get_all_ucontacts now calls get_domain_ucontacts</li>
  <li>added record and contact labels; currently no usage</li>
  <li>fixed db/schema Makefile bug; regenerated files that were affected by this bug</li>
  <li>fix db/schmea Makefile bug V2</li>
  <li>Fixed typo in encoding the callid</li>
  <li>Also build sqlite files on all Makefile rule</li>
  <li>fix 32 bit warning</li>
  <li>More verbous logging.</li>
  <li>fix inline functions to comply with gnu11</li>
  <li>emergency -- change configuration of the module for a new table</li>
  <li>emergency -- change configuration of the module for a new table</li>
  <li>core API: Add detection for async script function usage</li>
  <li>db_mysql: Improve error handling in async mode</li>
  <li>avpops: Proper handling for async with non-async drivers</li>
  <li>config parser: Exit if no more memory available</li>
  <li>db_virtual: Do not crash if no DB URLs are defined</li>
  <li>added new proto_bin moudle</li>
  <li>add travis file</li>
  <li>Fixed crash when failing to find a send socket</li>
  <li>Set async to be disabled by default</li>
  <li>Removed async forcing code</li>
  <li>Remove obsolete BIN interface functions</li>
  <li>clusterer:Added clusterer api</li>
  <li>dialog:added clusterer api usage for replication</li>
  <li>ratelimit: removed bin_send</li>
  <li>usrloc: clusterer_api is used for replication</li>
  <li>bin_interface: changed bin_register_cb function</li>
  <li>clusterer: added register and send_to API functions</li>
  <li>dialog: use clusterer api for replication</li>
  <li>ratelimit: use clusterer api for replication</li>
  <li>usrloc: improved clusterer api usage for replication</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>A</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-0">.travis.yml</a>
    (5)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-1">Makefile.defs</a>
    (3)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-2">bin_interface.c</a>
    (173)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-3">bin_interface.h</a>
    (26)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-4">cfg.y</a>
    (31)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-5">context.h</a>
    (18)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-6">daemonize.h</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-7">db/db_insertq.h</a>
    (9)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-8">db/schema/Makefile</a>
    (6)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-9">db/schema/emergency_service_provider.xml</a>
    (98)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-10">db/schema/opensips-emergency.xml</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-11">dprint.h</a>
    (10)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-12">forward.h</a>
    (9)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-13">ip_addr.h</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-14">main.c</a>
    (11)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-15">mem/meminfo.h</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-16">modules/avpops/avpops.c</a>
    (35)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-17">modules/avpops/avpops_db.c</a>
    (22)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-18">modules/avpops/avpops_db.h</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-19">modules/avpops/avpops_impl.c</a>
    (51)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-20">modules/benchmark/benchmark.h</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-21">modules/cachedb_redis/cachedb_redis_utils.h</a>
    (2)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-22">modules/clusterer/Makefile</a>
    (8)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-23">modules/clusterer/api.h</a>
    (70)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-24">modules/clusterer/clusterer.c</a>
    (1476)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-25">modules/clusterer/clusterer.h</a>
    (86)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-26">modules/clusterer/doc/clusterer.xml</a>
    (39)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-27">modules/clusterer/doc/clusterer_admin.xml</a>
    (543)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-28">modules/compression/compression_helpers.h</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-29">modules/db_mysql/dbase.c</a>
    (32)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-30">modules/db_text/dbt_file.c</a>
    (3)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-31">modules/db_virtual/db_virtual.c</a>
    (14)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-32">modules/dialog/dialog.c</a>
    (97)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-33">modules/dialog/dlg_handlers.c</a>
    (8)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-34">modules/dialog/dlg_hash.c</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-35">modules/dialog/dlg_hash.h</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-36">modules/dialog/dlg_profile.c</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-37">modules/dialog/dlg_repl_profile.h</a>
    (32)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-38">modules/dialog/dlg_replication.c</a>
    (405)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-39">modules/dialog/dlg_replication.h</a>
    (13)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-40">modules/dialog/doc/dialog_admin.xml</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-41">modules/dispatcher/ds_fixups.h</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-42">modules/emergency/doc/emergency_admin.xml</a>
    (453)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-43">modules/emergency/emergency_methods.c</a>
    (682)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-44">modules/emergency/emergency_methods.h</a>
    (50)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-45">modules/emergency/hash.c</a>
    (46)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-46">modules/emergency/http_emergency.c</a>
    (14)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-47">modules/emergency/http_emergency.h</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-48">modules/emergency/notifier_emergency.c</a>
    (90)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-49">modules/emergency/report_emergency.c</a>
    (273)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-50">modules/emergency/report_emergency.h</a>
    (18)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-51">modules/emergency/sip_emergency.c</a>
    (44)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-52">modules/emergency/subscriber_emergency.c</a>
    (50)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-53">modules/emergency/subscriber_emergency.h</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-54">modules/emergency/xml_parser.c</a>
    (122)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-55">modules/emergency/xml_parser.h</a>
    (6)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-56">modules/event_virtual/Makefile</a>
    (8)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-57">modules/event_virtual/README</a>
    (95)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-58">modules/event_virtual/doc/event_virtual.xml</a>
    (39)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-59">modules/event_virtual/doc/event_virtual_admin.xml</a>
    (100)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-60">modules/event_virtual/event_virtual.c</a>
    (532)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-61">modules/event_virtual/event_virtual.h</a>
    (40)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-62">modules/ldap/ldap_connect.c</a>
    (28)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-63">modules/proto_bin/Makefile</a>
    (6)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-64">modules/proto_bin/README</a>
    (170)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-65">modules/proto_bin/doc/proto_bin.xml</a>
    (40)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-66">modules/proto_bin/doc/proto_bin_admin.xml</a>
    (222)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-67">modules/proto_bin/proto_bin.c</a>
    (906)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-68">modules/proto_bin/proto_bin.h</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-69">modules/proto_ws/ws.c</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-70">modules/ratelimit/ratelimit.c</a>
    (40)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-71">modules/ratelimit/ratelimit.h</a>
    (8)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-72">modules/ratelimit/ratelimit_helper.c</a>
    (383)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-73">modules/seas/ha.h</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-74">modules/seas/statistics.h</a>
    (14)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-75">modules/tm/t_funcs.h</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-76">modules/topology_hiding/topo_hiding_logic.c</a>
    (22)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-77">modules/usrloc/dlist.c</a>
    (581)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-78">modules/usrloc/dlist.h</a>
    (9)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-79">modules/usrloc/hslot.c</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-80">modules/usrloc/hslot.h</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-81">modules/usrloc/ucontact.c</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-82">modules/usrloc/ucontact.h</a>
    (3)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-83">modules/usrloc/udomain.c</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-84">modules/usrloc/ul_mod.c</a>
    (36)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-85">modules/usrloc/urecord.c</a>
    (9)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-86">modules/usrloc/urecord.h</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-87">modules/usrloc/ureplication.c</a>
    (120)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-88">modules/usrloc/ureplication.h</a>
    (12)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-89">modules/usrloc/usrloc.c</a>
    (33)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-90">modules/usrloc/usrloc.h</a>
    (33)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-91">net/net_tcp_proc.c</a>
    (8)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-92">net/proto_tcp/proto_tcp.c</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-93">net/trans.c</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-94">parser/parse_to.h</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-95">resolve.h</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-96">route.c</a>
    (48)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-97">route.h</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-98">route_struct.c</a>
    (18)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-99">route_struct.h</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-100">scripts/mysql/call_center-create.sql</a>
    (2)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-101">scripts/mysql/emergency-create.sql</a>
    (25)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-102">scripts/opensipsctl</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-103">scripts/opensipsctlrc</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-104">socket_info.c</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-105">socket_info.h</a>
    (10)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-106">transformations.c</a>
    (101)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-107">transformations.h</a>
    (3)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/599/files#diff-108">ut.h</a>
    (4)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/OpenSIPS/opensips/pull/599.patch'>https://github.com/OpenSIPS/opensips/pull/599.patch</a></li>
  <li><a href='https://github.com/OpenSIPS/opensips/pull/599.diff'>https://github.com/OpenSIPS/opensips/pull/599.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/pull/599">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOciZkQRrOZO1wy_wgDrNWTLixgucvNks5om1srgaJpZM4FqR2w.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/OpenSIPS/opensips/pull/599"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>