Module: kamailio Branch: master Commit: 72343f379a6ac64d967e4cb43135a73fa758ffe5 URL: https://github.com/kamailio/kamailio/commit/72343f379a6ac64d967e4cb43135a73fa758ffe5
Author: Stefan Mititelu <[email protected]> Committer: Daniel-Constantin Mierla <[email protected]> Date: 2026-05-11T21:34:53+02:00 dmq_usrloc: add new modparam dmq_peer_id --- Modified: src/modules/dmq_usrloc/dmq_usrloc.c Modified: src/modules/dmq_usrloc/doc/dmq_usrloc_admin.xml Modified: src/modules/dmq_usrloc/usrloc_sync.c --- Diff: https://github.com/kamailio/kamailio/commit/72343f379a6ac64d967e4cb43135a73fa758ffe5.diff Patch: https://github.com/kamailio/kamailio/commit/72343f379a6ac64d967e4cb43135a73fa758ffe5.patch --- diff --git a/src/modules/dmq_usrloc/dmq_usrloc.c b/src/modules/dmq_usrloc/dmq_usrloc.c index a568d3d3148..ecce17528a8 100644 --- a/src/modules/dmq_usrloc/dmq_usrloc.c +++ b/src/modules/dmq_usrloc/dmq_usrloc.c @@ -43,6 +43,7 @@ int _dmq_usrloc_batch_msg_contacts = 1; int _dmq_usrloc_batch_msg_size = 60000; int _dmq_usrloc_batch_usleep = 0; str _dmq_usrloc_domain = str_init("location"); +str _dmq_usrloc_peer_id = str_init("usrloc"); int _dmq_usrloc_delete = 1; int _dmq_usrloc_delete_expired = 0; @@ -63,6 +64,7 @@ static param_export_t params[] = { {"usrloc_domain", PARAM_STR, &_dmq_usrloc_domain}, {"usrloc_delete", PARAM_INT, &_dmq_usrloc_delete}, {"usrloc_delete_expired", PARAM_INT, &_dmq_usrloc_delete_expired}, + {"dmq_peer_id", PARAM_STR, &_dmq_usrloc_peer_id}, {0, 0, 0} }; diff --git a/src/modules/dmq_usrloc/doc/dmq_usrloc_admin.xml b/src/modules/dmq_usrloc/doc/dmq_usrloc_admin.xml index 5d6727b5c83..39a68553d82 100644 --- a/src/modules/dmq_usrloc/doc/dmq_usrloc_admin.xml +++ b/src/modules/dmq_usrloc/doc/dmq_usrloc_admin.xml @@ -365,6 +365,27 @@ modparam("dmq_usrloc", "usrloc_delete", 0) ... modparam("dmq_usrloc", "usrloc_delete_expired", 1) ... +</programlisting> + </example> + </section> + <section id="usrloc_dmq.p.dmq_peer_id"> + <title><varname>dmq_peer_id</varname> (string)</title> + <para> + The DMQ peer identifier for usrloc replication. This allows + customizing the peer name used in DMQ communication, which can be useful + to avoid compatibility conflicts, and for a better partitioning. + </para> + <para> + <emphasis> + Default value is <quote>usrloc</quote>. + </emphasis> + </para> + <example> + <title>Set <varname>dmq_peer_id</varname> parameter</title> + <programlisting format="linespecific"> +... +modparam("dmq_usrloc", "dmq_peer_id", "usrloc_6.1.1") +... </programlisting> </example> </section> diff --git a/src/modules/dmq_usrloc/usrloc_sync.c b/src/modules/dmq_usrloc/usrloc_sync.c index 9bcaf2cdf48..839b474d3f6 100644 --- a/src/modules/dmq_usrloc/usrloc_sync.c +++ b/src/modules/dmq_usrloc/usrloc_sync.c @@ -65,6 +65,7 @@ extern int _dmq_usrloc_batch_msg_size; extern int _dmq_usrloc_batch_size; extern int _dmq_usrloc_batch_usleep; extern str _dmq_usrloc_domain; +extern str _dmq_usrloc_peer_id; extern int _dmq_usrloc_delete; extern int _dmq_usrloc_delete_expired; @@ -336,10 +337,8 @@ int usrloc_dmq_initialize() } not_peer.callback = usrloc_dmq_handle_msg; not_peer.init_callback = usrloc_dmq_request_sync; - not_peer.description.s = "usrloc"; - not_peer.description.len = 6; - not_peer.peer_id.s = "usrloc"; - not_peer.peer_id.len = 6; + not_peer.peer_id = _dmq_usrloc_peer_id; + not_peer.description = _dmq_usrloc_peer_id; usrloc_dmq_peer = usrloc_dmqb.register_dmq_peer(¬_peer); if(!usrloc_dmq_peer) { LM_ERR("error in register_dmq_peer\n"); _______________________________________________ Kamailio - Development Mailing List -- [email protected] To unsubscribe send an email to [email protected] Important: keep the mailing list in the recipients, do not reply only to the sender!
