<div dir="ltr">Hi,<div><br></div><div>Can you send the output of "kamcmd dmq.list_nodes" (mask IP addresses if needed)?</div><div><br></div><div>I will try to replicate your scenario and come back with a solution shortly.</div><div><br></div><div>By the way, your dmq "notification_address" parameter looks slightly odd (although I don't know what you're doing with DNS) - it should simply point to one other node in the cluster, so that on startup it can request information about any other nodes from this one. Also, in the block which calls dmq_handle_message(), you should exit straight away after.</div><div><br></div><div>One final note, you should really listen on a separate port for dmq purposes (e.g. 5080) and restrict access to it at firewall level. You can then check in config that the message was received on this port, like:</div><div><br></div><div><div>        if (method == "KDMQ" && $Rp == 5080) {</div><div>               dmq_handle_message();</div><div>               exit;</div><div>        }</div></div><div><br></div><div><br></div><div>Regards,<br></div><div><br></div><div>Charles</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On 2 February 2015 at 10:52, Leonardo Arena <span dir="ltr"><<a href="mailto:rnalrd@gmail.com" target="_blank">rnalrd@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi all,<br>
I have three Registrar-only proxies DMQ interconnected [1]. I'm<br>
attempting to use a client to register to one of them and replicate<br>
REGISTRAR message to the other two.<br>
<br>
* What it works:<br>
- Clients registration to proxy1<br>
- Proxy1 replication of REGISTRAR message to proxy2<br>
<br>
* What does not work:<br>
- Proxy replication of REGISTRAR message to proxy3<br>
<br>
* Error message of proxy1:<br>
ERROR: tm [t_fwd.c:1770]: t_forward_nonack(): ERROR: t_forward_nonack:<br>
no branches for forwarding<br>
ERROR: dmq [dmq_funcs.c:410]: cfg_dmq_t_replicate(): error calling<br>
t_replicate<br>
<br>
append_branch() did't help me and a search on the ML either.<br>
<br>
What am I doing wrong?<br>
<br>
Thanks!<br>
<br>
- leonardo<br>
<br>
<br>
[1]<br>
<br>
#--------------------------------------------------------<br>
# Global Definitions<br>
#--------------------------------------------------------<br>
debug      =   2<br>
fork      =   yes<br>
log_stderror   =   no<br>
# listen      =   0.0.0.0<br>
port      =   5060<br>
children   =   4<br>
<br>
dns      =   no<br>
rev_dns      =   no<br>
use_dns_failover =    on<br>
dns_srv_lb   =   yes<br>
#dns_try_naptr    =    no<br>
<br>
<br>
mpath      =   "/usr/lib/kamailio/modules_k/:/usr/lib/kamailio/modules/"<br>
<br>
#--------------------------------------------------------<br>
# Modules<br>
#--------------------------------------------------------<br>
<br>
loadmodule   "tm.so"<br>
loadmodule   "sl.so"<br>
loadmodule   "tmx.so"<br>
loadmodule   "maxfwd.so"<br>
loadmodule   "usrloc.so"<br>
loadmodule   "registrar.so"<br>
loadmodule   "pv.so"<br>
loadmodule   "xlog.so"<br>
loadmodule   "ctl.so"<br>
#loadmodule   "db_text.so"<br>
loadmodule   "db_sqlite.so"<br>
loadmodule   "auth.so"<br>
loadmodule   "auth_db.so"<br>
loadmodule   "memcached.so"<br>
loadmodule   "dmq.so"<br>
loadmodule   "corex.so"<br>
<br>
#--------------------------------------------------------<br>
# Module Configuration<br>
#--------------------------------------------------------<br>
<br>
modparam ( "usrloc", "db_mode", 0 )<br>
modparam ( "usrloc", "use_domain", 1 )<br>
modparam ( "usrloc", "hash_size", 20 )<br>
#modparam ( "ctl", "binrpc_max_body_size", 10000 )<br>
#modparam ( "ctl", "binrpc_struct_max_body_size", 200 )<br>
#default<br>
#modparam ( "db_text", "db_mode", 0 )<br>
modparam ( "auth", "use_domain", 1 )<br>
#modparam ( "auth_db", "db_url", "text:///etc/kamailio/dbtext/" )<br>
modparam ( "auth_db", "db_url", "sqlite:///etc/kamailio/kamailiodb" )<br>
modparam ( "auth_db", "use_domain", 1 )<br>
#use plaintext passwords for testing<br>
modparam ( "auth_db", "calculate_ha1", 1 )<br>
modparam ( "auth_db", "version_table", 0 )<br>
modparam ( "auth_db", "password_column", "password" )<br>
modparam ( "auth_db", "load_credentials", "$avp(s:username)=username;<br>
$avp(s:domain)=domain;$avp(s:password)=password" )<br>
<br>
modparam( "memcached", "servers", "localhost:11211" )<br>
<br>
modparam( "dmq", "server_address", "sip:<a href="http://10.0.0.1:5060" target="_blank">10.0.0.1:5060</a>" )<br>
modparam( "dmq", "notification_address", "sip:<a href="http://dmq.my.domain.net" target="_blank">dmq.my.domain.net</a>" )<br>
#modparam( "dmq", "num_threads", 4 )<br>
# modparam( "dmq", "ping_interval", 60 )<br>
<br>
#--------------------------------------------------------<br>
# Main Route Block<br>
#--------------------------------------------------------<br>
<br>
include_file "kamailio-errors.cfg"<br>
<br>
route<br>
  {<br>
   # Uncomment next line if you  want to see<br>
   # each incoming message<br>
   xlog( "L_INFO", "$rm: $fu -> $ru" );<br>
<br>
   if (!mf_process_maxfwd_header("20")) {<br>
      route(ERROR_TOO_MANY_HOPS);<br>
   }<br>
<br>
   if (msg:len > 4096) {<br>
      route(ERROR_MESSAGE_OVERFLOW);<br>
   }<br>
<br>
   if ($rm == "REGISTER" ) {<br>
      if ( dmq_is_from_node() ) {<br>
         xlog( "L_INFO", "REGISTER from node" );<br>
         route(REGISTER);<br>
         exit;<br>
      }<br>
      else {<br>
         # if we don't have credentials in cache authenticate against DB<br>
         if ( $mct($tU@$td) == $null ) {<br>
            if (!www_authenticate("$td", "subscriber")) {<br>
               www_challenge("$td", "1");<br>
               exit;<br>
            }<br>
            else {<br>
               route(REGISTER);<br>
               xlog( "L_INFO", "Authenticated user $tU for domain $td<br>
against DB" );<br>
               # store credentials into cache<br>
               $mct($avp(s:username)@$avp(s:domain)) = $avp(s:password);<br>
               exit;<br>
            }<br>
<br>
         }<br>
         # credentials are in cache, authenticate against it<br>
         else {<br>
            if (!pv_www_authenticate("$td", "$mct($tU@$td)", "0")) { #<br>
turn last param to "1" if using ha1 passwords<br>
               # keep a counter of authentication attempts<br>
               # if above 1 user is denied auth from cache so we discard<br>
the cache and force auth from DB at next attempt<br>
               if ( $mct(count_$tU@$td) ) == $null {<br>
                  $mct(count_$tU@$td) = 1;<br>
               }<br>
               else {<br>
                  $mct(count_$tU@$td) = $null;<br>
                  $mct($tU@$td) = $null;<br>
                  xlog( "L_INFO", "Authentication count limit for user<br>
$tU for domain $td against cache reached. Cache discarded" );<br>
               }<br>
               www_challenge("$td", "1");<br>
               exit;<br>
            }<br>
            else {<br>
               route(REGISTER);<br>
               $mct( count_$tU@$td ) = $null;<br>
               xlog( "L_INFO", "Authenticated user $tU for domain $td<br>
against cache" );<br>
               exit;<br>
            }<br>
         }<br>
      }<br>
   }<br>
<br>
        if ( $rm == "KDMQ" ) {<br>
                dmq_handle_message();<br>
        }<br>
<br>
        route(ERROR_INVALID_METHOD);<br>
<br>
}<br>
<br>
route[REGISTER] {<br>
   if (!save("location")) {<br>
      sl_reply_error();<br>
   }<br>
   else {<br>
      append_branch();<br>
      dmq_t_replicate();<br>
   }<br>
}<br>
<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">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br><div><br></div>
</div></div>

<br>
<font face="Helvetica, Arial, sans-serif"><font size="2"><span style="font-size:10pt"><a href="http://www.sipcentric.com/" title="blocked::http://www.sipcentric.com/" target="_blank">www.sipcentric.com</a><br>
            <br>
            Follow us on twitter <a href="http://twitter.com/sipcentric" title="blocked::http://twitter.com/sipcentric" target="_blank">@sipcentric</a><br>
            <br>
            <font color="gray">Sipcentric Ltd.
                Company registered in England & Wales no. 7365592.</font> <font color="gray">Registered
                office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, Birmingham Science Park, Birmingham B7 4BB.</font></span></font></font>