[OpenSIPS-Users] Strange multiple replicated registers

Julian Santer julian.santer at rolmail.net
Thu Nov 19 10:08:56 CET 2015


Hi Bogdan,

thank you for the answer.
We didn't send a reply because we used save("LOCATION_DB", "vmrp1").
We removed now the "r" flag, so the reply is sent and now we don't have retransmissions.
So this issue is solved.

But why we get here 2 complete REGISTERs from the client?
I know that we need 2 REGISTERs because of authentication. But the clients sends 2 complete REGISTERs.
I should try to explain the behaviour a little bit better.


SNOM 760                                           EDGE                                               REGISTRAR MASTER 
    REGISTRAR SLAVE    <Call><PFrame><Time>

|                                                  |                                                  | 
    |
|                                                  |                                                  |                                                  |
| F1 REGISTER                                      |                                                  |                                                  |
|>------------------------------------------------>|                                                  | 
    |                  1 PF:1   15:08:15.7530
|                                                  |                                                  |                                                  |
|                                    Trying 100 F2 |                                                  |                                                  |
|<------------------------------------------------<|                                                  | 
    |                  1 PF:2   15:08:15.7537
|                                                  |                                                  |                                                  |
|                              Unauthorized 401 F3 |                                                  |                                                  |
|<------------------------------------------------<|                                                  | 
    |                  1 PF:3   15:08:15.7539
|                                                  |                                                  |                                                  |
| F4 REGISTER                                      |                                                  |                                                  |
|>------------------------------------------------>|                                                  | 
    |                  1 PF:4   15:08:15.7820
|                                                  |                                                  |                                                  |
|                                    Trying 100 F5 |                                                  |                                                  |
|<------------------------------------------------<|                                                  | 
    |                  1 PF:5   15:08:15.7822
|                                                  |                                                  |                                                  |
|                                                  | F6 REGISTER                                      |                                                  |
|                                                  |>------------------------------------------------>| 
    |                  1 PF:6   15:08:15.7864
|                                                  |                                                  |                                                  |
|                                                  |                                        OK 200 F7 |                                                  |
|                                                  |<------------------------------------------------<| 
    |                  1 PF:7   15:08:15.7871
|                                                  |                                                  |                                                  |
|                                        OK 200 F8 |                                                  |                                                  |
|<------------------------------------------------<|                                                  | 
    |                  1 PF:8   15:08:15.7876
|                                                  |                                                  |                                                  |
|                                                  |                                                  | F9 REGISTER                                      |
|                                                  | 
|>------------------------------------------------>|                  1 PF:9   15:08:15.7889
|                                                  |                                                  |                                                  |
| F10 REGISTER                                     |                                                  |                                                  |
|>------------------------------------------------>|                                                  | 
    |                  1 PF:10  15:08:15.8249
|                                                  |                                                  |                                                  |
|                                   Trying 100 F11 |                                                  |                                                  |
|<------------------------------------------------<|                                                  | 
    |                  1 PF:11  15:08:15.8250
|                                                  |                                                  |                                                  |
|                             Unauthorized 401 F12 |                                                  |                                                  |
|<------------------------------------------------<|                                                  | 
    |                  1 PF:12  15:08:15.8251
|                                                  |                                                  |                                                  |
| F13 REGISTER                                     |                                                  |                                                  |
|>------------------------------------------------>|                                                  | 
    |                  1 PF:13  15:08:15.8437
|                                                  |                                                  |                                                  |
|                                   Trying 100 F14 |                                                  |                                                  |
|<------------------------------------------------<|                                                  | 
    |                  1 PF:14  15:08:15.8438
|                                                  |                                                  |                                                  |
|                                                  | F15 REGISTER                                     |                                                  |
|                                                  |>------------------------------------------------>| 
    |                  1 PF:15  15:08:15.8454
|                                                  |                                                  |                                                  |
|                                                  |                                       OK 200 F16 |                                                  |
|                                                  |<------------------------------------------------<| 
    |                  1 PF:16  15:08:15.8462
|                                                  |                                                  |                                                  |
|                                       OK 200 F17 |                                                  |                                                  |
|<------------------------------------------------<|                                                  | 
    |                  1 PF:17  15:08:15.8467
|                                                  |                                                  |                                                  |
|                                                  |                                                  | F18 REGISTER                                     |
|                                                  | 
|>------------------------------------------------>|                  1 PF:18  15:08:15.8482
|                                                  |                                                  |                                                  |
|                                                  |                                                  | F19 REGISTER                                     |
|                                                  | 
|>------------------------------------------------>|                  1 PF:19  15:08:16.2952
|                                                  |                                                  |                                                  |
|                                                  |                                                  | F20 REGISTER                                     |
|                                                  | 
|>------------------------------------------------>|                  1 PF:20  15:08:16.2953
|                                                  |                                                  |                                                  |
|                                                  |                                                  | F21 REGISTER                                     |
|                                                  | 
|>------------------------------------------------>|                  1 PF:21  15:08:17.2966
|                                                  |                                                  |                                                  |
|                                                  |                                                  | F22 REGISTER                                     |
|                                                  | 
|>------------------------------------------------>|                  1 PF:22  15:08:17.2967
|                                                  |                                                  |                                                  |
|                                                  |                                                  | F23 REGISTER                                     |
|                                                  | 
|>------------------------------------------------>|                  1 PF:23  15:08:19.2994
|                                                  |                                                  |                                                  |
|                                                  |                                                  | F24 REGISTER                                     |
|                                                  | 
|>------------------------------------------------>|                  1 PF:24  15:08:19.2995
|                                                  |                                                  |                                                  |
|                                                  |                                                  | F25 REGISTER                                     |
|                                                  | 
|>------------------------------------------------>|                  1 PF:25  15:08:23.4061
|                                                  |                                                  |                                                  |
|                                                  |                                                  | F26 REGISTER                                     |
|                                                  | 
|>------------------------------------------------>|                  1 PF:26  15:08:23.4061

==================================================================================================================================================================================================


Kind regards,
Julian Santer
Raiffeisen OnLine


Am 18.11.2015 um 23:25 schrieb Bogdan-Andrei Iancu:
> Hi Julian,
>
> There are 2 REGISTERs because of authentication - first is without credentials, the second has credentials (as a reaction of the auth challenge from
> the first REGISTER)
>
> In the second trace, the additional REGISTERs from master to slave are SIP transmissions (the t_replicate() acts as a t_relay(), so it does
> retransmissions until it gets a reply back) - I see not SIP reply from the slave back to master
>
> Best regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
>
> On 17.11.2015 18:37, Julian Santer wrote:
>> 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
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
>





More information about the Users mailing list