I'm running kamailio 3.X with the following patch for years, works fine to me with distributed servers and replication:
diff --git a/modules_k/usrloc/udomain.c b/modules_k/usrloc/udomain.c index b52bb76..e457cc5 100644 --- a/modules_k/usrloc/udomain.c +++ b/modules_k/usrloc/udomain.c @@ -318,6 +318,7 @@ static inline ucontact_info_t* dbrow2info( db_val_t *vals, str *contact) ci.sock = grep_sock_info( &host, (unsigned short)port, proto); if (ci.sock==0) { LM_WARN("non-local socket <%s>...ignoring\n", p); + return 0; } } On Monday 08 April 2013 04:52:35 Alex Balashov wrote: > I know I'm revisiting a problem that has been discussed in multiple > threads from various angles, so I might be rightly accused of laziness > in neglecting to research them all. All the same: > > I have proxy1 and proxy2 writing to database A and database B, > respectively. Database A and database B are active-active masters, > synchronised via some replication system attached to the underlying DB > technology. > > The 'location' table is also replicated this way. We know that 'usrloc' > doesn't work so well with this: one instance of Kamailio will > periodically delete the other's contacts, even if they have a nonlocal > SIP domain. > > Is there any db_mode that can be used (other than 0/purely in-memory) to > make this work right? Or is that the essential problem that p_usrloc is > written to solve? > > Thanks, > > -- Alex _______________________________________________ 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