[OpenSIPS-Users] Shared 'location' table?

Chris Maciejewski chris at wima.co.uk
Thu Apr 22 19:01:19 CEST 2010


On 22 April 2010 17:58, Laszlo <laszlo at voipfreak.net> wrote:
> 2010/4/22 Chris Maciejewski <chris at wima.co.uk>
>>
>> On 22 April 2010 17:47, Laszlo <laszlo at voipfreak.net> wrote:
>> > 2010/4/22 Chris Maciejewski <chris at wima.co.uk>
>> >> On 22 April 2010 17:30, Laszlo <laszlo at voipfreak.net> wrote:
>> >> > 2010/4/22 Chris Maciejewski <chris at wima.co.uk>
>> >> >> Hi,
>> >> >>
>> >> >> I'm trying to run two opensips instances accessing one MySQL
>> >> >> database
>> >> >> using the usrloc db-only mode.
>> >> >>
>> >> >> This results in the following warning in my log files:
>> >> >>
>> >> >> "WARNING:usrloc:get_all_db_ucontacts: non-local socket
>> >> >> <udp:xxx.xxx.xxx.xxx:5060>...ignoring"
>> >> >>
>> >> >> The only discussion/solution I found was in some old openser mailing
>> >> >> list thread:
>> >> >> http://www.mail-archive.com/users@openser.org/msg05974.html
>> >> >>
>> >> >> What is the "right" way of handling the above scenario: 2x opensips
>> >> >> +
>> >> >> 1x
>> >> >> MySQL ?
>> >> >> Is mhomed=1 the correct solution?
>> >> >>
>> >> >> Thanks and best regards,
>> >> >> Chris
>> >> >>
>> >> >
>> >> > Try to set mhomed=1
>> >> >
>> >> > -Laszlo
>> >> >
>> >>
>> >> Hi, thanks for suggestion, but when I added mhomed=1 I am getting the
>> >> following error:
>> >>
>> >> WARNING:usrloc:get_all_db_ucontacts: non-local socket
>> >> <udp:xxx.xxx.xxx.xxx:5060>...ignoring
>> >> ERROR:core:get_out_socket: no socket found
>> >> ERROR:nathelper:nh_timer: can't get sending socket
>> >>
>> >> Any ideas?
>> >>
>> >
>> > usrloc is in "db only" mode?
>> >
>> > -Laszlo
>>
>> Yes, it is: modparam("usrloc", "db_mode", 3)
>>
>> Just to clarify. I am running two instances of opensips on two
>> different servers (so obviously both are bound do different public IP
>> addresses) using the same 'location' table on central MySQL server.
>>
>> Therefore in my 'location' table some entries in 'socket' column are:
>> aaa.bbb.ccc.ddd:5060
>> and others are: ppp.ttt.qqq.zzz:5060
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> ahh, then it's a problem, with NAT, there will be a conflict with the stored
> sockets.
> Let's say proxy1 inserts a record with socket "proxy1", and then proxy2 will
> read it and will try to use  socket "proxy1', that will fail (not local).
>
> -Laszlo
>

Actually I don't think NAT has anything to do here, however indeed
both proxies insert different addresses into 'socket' column and the
"other" is logging WARNING message.

Going back to my original question, does anyone can offer any advice
what is the "best practice" for my scenario?

Thanks
Chris



More information about the Users mailing list