[OpenSIPS-Users] Strange multiple replicated registers

Julian Santer julian.santer at rolmail.net
Tue Nov 17 17:37:02 CET 2015


Hi guys,

we have encountered the following problem.
Our UAC (Snom 760) sends 2 register for the same contact to our edge servers.
Our edge server sends the register to registrar (master). The registrar replicates the register to the registrar (slave).
The flow of first register seems ok (http://siptrace.rolbox.net/register_first.html).
The second register ends also in a 200 OK. But the register master replicates the register 9 times (http://siptrace.rolbox.net/register_second.html).

So my qeustions are:
- why the UAC send the register twice for the same contact? Also other clients like a AVM Fritzbox send the register twice.
- why the registrar master replicates the register multiple times?

IP's and domains are obfuscated.

On the edge server we do (5.6.7.8):

     $rd = "5.6.7.9";
     t_on_branch("BR_REGISTER");
     if (! t_relay("0x05"))
     {
         send_reply("500", "Internal server error - failed to relay");
         xlog("L_ERR", "Unable to relay REGISTER - LF_BASE");
     }
     xlog("L_INFO", "Routing register to registrar - LF_BASE");

On the registrars (5.6.7.9 and 5.6.7.10):

     xlog("L_INFO", "REGISTER received from $si - LF_BASE");

     if (src_ip == 5.6.7.9 || src_ip == 5.6.7.10)
     {
         if (! save("LOCATION_DB", "vmrp1"))
         {
             xlog("L_ERR", "Saving contact from master failed - LF_BASE");
             exit;
         }
         xlog("L_INFO", "Saving contact received from master - LF_BASE");
         t_on_branch("BR_DROP");
     }
     else
     {
         if(!save("LOCATION_DB", "vp1"))
         {
             xlog("L_ERR", "Saving contact from edge failed - LF_BASE");
             t_replicate("sip:REGISTRAR_SLAVE", "0x04");
             exit;
         }
         xlog("L_INFO", "Saving contact received from edge, replicate to REGISTRAR_SLAVE - LF_BASE");
         t_replicate("sip:REGISTRAR_SLAVE", "0x04");
         t_on_branch("BR_DROP");
     }

     if ($(hdr(Contact)) == null)
     {
         xlog("L_INFO", "Retrieving locations - LF_BASE");
     } else {
         xlog("L_INFO", "Registration successful - LF_BASE");
     }
     exit;

LOCATION_DB is the location table name for the registrars (2 registrars, 2 tables)
REGISTRAR_SLAVE is the domain name of the respective registrar slave.
The servers are in the same network, connected over layer 2.

Let me know if you need further informations.

Best regards,
Julian Santer
Raiffeisen OnLine




More information about the Users mailing list