Hi Andrew,

Andrew Yager wrote:
> Hi,
>
> We are running opensips 1.5.2-notls, and have usrloc working well in  
> theory.
>
> We are trying to set up replication to a second opensips server, with  
> one of two methods:
>
> * DB Replication only (usrloc db_mode 3) OR
> * t_replicate (with usrloc db_mode 2)
>
> We are running into issues with this. When we set usrloc db_mode to 3,  
> nothing is written to the database. 
any errors ? can you confirm that the REGISTER is received and processed 
by opensips ? (and also that the REGISTER has valid contacts to upload) ?
> In addition, opensipsctl ul show  
> lists no registrations.
>   
in db_mode 3 (no cache), "ul show" does not work as it prints the cache 
content :)
> When we set usrloc db_mode to 2, things appear to be randomly written.  
> For instance, this host has six peers which registered against it at  
> present. There are currently only 4 of the six peers in the location  
> table in MySQL.
>   
note that db_mode is periodically updating the DB (timer based) and not 
in real time - only the cache contains real time data.
> Also, I am starting to think that you can't get t_replicate to work  
> when REGISTER methods require auth, as the necessary exchange of  
> digest tokens can not take place. Perhaps I need to move the order of  
> the operations, and only radius authorize if it not a replicated  
> request?
>   
that is the wise approach - whatever is replicated between the servers 
does not required auth.

Regards,
Bogdan
> Relevant snippets from config are below, any help will be appreciated.
>
> Thanks,
> Andrew
>
> ---
>
> modparam("usrloc", "db_mode",   2)
> modparam("usrloc", "db_url",
>          "mysql://opensips:<password>@localhost/opensips_1_5")
>
> modparam("alias_db|auth_db|usrloc|uri_db", "use_domain", 1)
>
> if (is_method("REGISTER")) {
>      # authenticate the REGISTER requests (uncomment to enable auth)
>       if (!radius_www_authorize("")) {
>           www_challenge("", "0");
>           exit;
>       }
>
>       if (!check_to())
>       {
>           sl_send_reply("403","Forbidden auth ID");
>           exit;
>       }
>
>       if ( !(src_ip=="PEER_IP" && src_port==5060) ) {
>           # Register is for me
>           if (!save("location")) {
>                   sl_reply_error();
>                   exit;
>           }
>           t_replicate("sip: PEER_IP:5060"); # send to the other sip server
>       } else {
>               # it's a replicated REGISTER
>               # set the flag for retrieving sock_info from header
>               # save contact, but only in cache
>               save("location","0x01");
>       };
>       exit;
> };
>
> --
> Andrew Yager, Managing Director   (MACS BCompSc MCP)
> Real World Technology Solutions Pty Ltd, your IT department
> ph: 1300 798 718 or (02) 9037 0500
> fax: (02) 9037 0591 mob: 0405 152 568
> http://www.rwts.com.au/ or http://www.stonebridgecomputing.com.au/
>
>
> _______________________________________________
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>   


_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to