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