You might want to consider this function: http://kamailio.org/docs/modules/4.3.x/modules/dmq.html#dmq.p.multi_notify
On Wed, Jul 22, 2015 at 10:25 AM, Asgaroth <00asgaroth00@gmail.com> wrote:
sorry, I forgot to mention, this is with Kamailio v4.3.1:
# kamailio -V
version: kamailio 4.3.1 (x86_64/linux) f38e67
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
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: f38e67
compiled on 18:15:23 Jul 20 2015 with gcc 4.4.7
Thanks
On 22/07/2015 15:22, Asgaroth wrote:
Hi All,
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.
I have the following snippet in my main routing block:
if(is_method("KDMQ")) {
if (dmq_is_from_node()) {
dmq_handle_message();
exit;
} else {
xlog("L_INFO", "KDMQ message recieved from node not on our bus!! ($si:$sp) Dropping.");
exit;
}
}
I have the following dmq module parameters enabled for dmq:
modparam("dmq", "server_address", DMQ_ADDRESS)
modparam("dmq", "notification_address", "sip:lb.domain.com:5060")
modparam("dmq", "multi_notify", 1)
modparam("dmq", "num_workers", 4)
DMQ_ADDRESS is set to each of the addresses in the lb.domain.com for each local kamailio instance
lb.domain.com resolves to the following addresses:
10.6.0.109
10.6.0.110
10.6.0.111
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:
kamailio[26657]: ERROR: dmq [notification_peer.c:588]: notification_resp_callback_f(): deleting server sip:10.6.0.111:5060 because of failed request
kamailio[26657]: ERROR: dmq [notification_peer.c:588]: notification_resp_callback_f(): deleting server sip:10.6.0.110:5060 because of failed request
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:
kamailio[26656]: INFO: <script>: KDMQ message recieved from node not on our bus!! (10.6.0.110:5060) Dropping.
kamailio[26656]: INFO: <script>: KDMQ message recieved from node not on our bus!! (10.6.0.111:5060) Dropping.
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.
Any suggestions/tips would be greatly appreciated.
Thanks
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users