<p>if server_address & notification_address use same ip and different port(see below),in dmq.list_nodes will have two node for one kamailio(one node for notify_server 5360 and one for dmq local 5260), question is when send REGISTER to port 5160, REGISTER will copy from port 5260 to 5360 on the same kamailio,this is not what i want.</p>
<p>dmq & dmq_usrloc cfg(<strong>different port</strong>):<br>
listen=eth0:5160<br>
listen=eth0:5260<br>
listen=eth0:5360</p>
<p>modparam("dmq", "server_address", "sip:10.6.1.200:5260")<br>
modparam("dmq", "notification_address", "sip:10.6.1.200:5360")<br>
modparam("dmq", "multi_notify", 1)<br>
modparam("dmq", "num_workers", 2)</p>
<h1>----- dmq_usrloc params -----</h1>
<p>modparam("dmq_usrloc", "enable", 1)<br>
modparam("dmq_usrloc", "sync", 1)<br>
modparam("dmq_usrloc", "batch_msg_contacts", 50)<br>
modparam("dmq_usrloc", "batch_msg_size", 500000)</p>
<p>And when I let server_address & notification_address use same IP & Port, check in function add_server_and_notify will report error("error adding notification node"),child_init will return failed.</p>
<p>So I suggest that the following changes, let server_address & notification_address can use the same IP and port:<br>
@@ -315,11 +315,15 @@ dmq_node_t* add_server_and_notify(str *paddr)<br>
for (index = 0; index < host_cnt; index++) {<br>
pstr->s = puri_list [index];<br>
pstr->len = strlen (puri_list [index]);</p>
<ul>
<li>
<pre><code>                  if (!find_dmq_node_uri(node_list, pstr)) { // check for duplicates
</code></pre>
</li>
</ul>
<ul>
<li>
<pre><code>                  if (!(pnode = find_dmq_node_uri(node_list, pstr))) { // check for duplicates
                          pnode = add_dmq_node (node_list, pstr);
                          if (pnode && !pfirst)
                                  { pfirst = pnode; }
</code></pre>
</li>
</ul>
<ul>
<li>
<pre><code>                  }
</code></pre>
</li>
</ul>
<ul>
<li>
<pre><code>                  } else {
</code></pre>
</li>
<li>
<pre><code>                        if (!pfirst) {
</code></pre>
</li>
<li>
<pre><code>                                pfirst = pnode;
</code></pre>
</li>
<li>
<pre><code>                        }
</code></pre>
</li>
<li>
<pre><code>                  }
          }
  }
</code></pre>
</li>
</ul>
<p>After Such A change,  dmq.list_nodes will only have on node for (notify_server & server_addr(local)).<br>
Is there any problem with this modification? Thanks</p>
<p>$./sbin/kamailio -v<br>
version: kamailio 5.0.1 (x86_64/linux)<br>
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES<br>
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB<br>
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1109">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36Zd6lQszuYQyAZ1u1fmFKgcgTuFgQks5r1qFqgaJpZM4NNq1H">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZdachlN1rTU2xc4O4ZyxB4Cmor3jks5r1qFqgaJpZM4NNq1H.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/kamailio/kamailio/issues/1109"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"dmq \u0026 dmq_usrloc : let server_address \u0026 notification_address use the same IP and port (#1109)"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1109"}}}</script>