<div dir="ltr">You might want to consider this function: <a href="http://kamailio.org/docs/modules/4.3.x/modules/dmq.html#dmq.p.multi_notify">http://kamailio.org/docs/modules/4.3.x/modules/dmq.html#dmq.p.multi_notify</a></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 22, 2015 at 10:25 AM, Asgaroth <span dir="ltr"><<a href="mailto:00asgaroth00@gmail.com" target="_blank">00asgaroth00@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">sorry, I forgot to mention, this is with Kamailio v4.3.1:<br>
<br>
# kamailio -V<br>
version: kamailio 4.3.1 (x86_64/linux) f38e67<br>
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC, DBG_F_MALLOC, 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.<br>
id: f38e67<br>
compiled on 18:15:23 Jul 20 2015 with gcc 4.4.7<br>
<br>
Thanks<div class="HOEnZb"><div class="h5"><br>
<br>
On 22/07/2015 15:22, Asgaroth wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
Hi All,<br>
<br>
I have an issue with the dmq_is_from_node() function, whereby it does not detect a node is on the bus if it has been removed from its "table" due to previously failed, i presume, ping requests.<br>
<br>
I have the following snippet in my main routing block:<br>
<br>
if(is_method("KDMQ")) {<br>
        if (dmq_is_from_node()) {<br>
            dmq_handle_message();<br>
            exit;<br>
        } else {<br>
            xlog("L_INFO", "KDMQ message recieved from node not on our bus!! ($si:$sp) Dropping.");<br>
            exit;<br>
        }<br>
    }<br>
<br>
I have the following dmq module parameters enabled for dmq:<br>
<br>
modparam("dmq", "server_address", DMQ_ADDRESS)<br>
modparam("dmq", "notification_address", "sip:<a href="http://lb.domain.com:5060" target="_blank" rel="noreferrer">lb.domain.com:5060</a>")<br>
modparam("dmq", "multi_notify", 1)<br>
modparam("dmq", "num_workers", 4)<br>
<br>
DMQ_ADDRESS is set to each of the addresses in the <a href="http://lb.domain.com" target="_blank" rel="noreferrer">lb.domain.com</a> for each local kamailio instance<br>
<br>
<a href="http://lb.domain.com" target="_blank" rel="noreferrer">lb.domain.com</a> resolves to the following addresses:<br>
    10.6.0.109<br>
    10.6.0.110<br>
    10.6.0.111<br>
<br>
If I start up the 1st instance of kamailio and do not start the other 2 within the default ping timout then I get the expected log message of dmq removing the nodes from its table, for example:<br>
<br>
kamailio[26657]: ERROR: dmq [notification_peer.c:588]: notification_resp_callback_f(): deleting server sip:<a href="http://10.6.0.111:5060" target="_blank" rel="noreferrer">10.6.0.111:5060</a> because of failed request<br>
kamailio[26657]: ERROR: dmq [notification_peer.c:588]: notification_resp_callback_f(): deleting server sip:<a href="http://10.6.0.110:5060" target="_blank" rel="noreferrer">10.6.0.110:5060</a> because of failed request<br>
<br>
However, if I then start one, or both, of the other nodes, then the KDMQ requests are dropped due to my snippet above, I presume, because dmq_is_from_node() checks its "active" table. See messages below as an example of the above snippet in action:<br>
<br>
kamailio[26656]: INFO: <script>: KDMQ message recieved from node not on our bus!! (<a href="http://10.6.0.110:5060" target="_blank" rel="noreferrer">10.6.0.110:5060</a>) Dropping.<br>
kamailio[26656]: INFO: <script>: KDMQ message recieved from node not on our bus!! (<a href="http://10.6.0.111:5060" target="_blank" rel="noreferrer">10.6.0.111:5060</a>) Dropping.<br>
<br>
Is this expected behaviour from the dmq_is_from_node() function? I would have expected it to always check the addresses resolved in the notification address, or am I using this function in a manner not intended.<br>
<br>
Any suggestions/tips would be greatly appreciated.<br>
<br>
Thanks<br>
<br>
</blockquote>
<br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank" rel="noreferrer">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</div></div></blockquote></div><br></div>