Shared 'location' table?

classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

Shared 'location' table?

Chris Maciejewski
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@.../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

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Shared 'location' table?

Laszlo


2010/4/22 Chris Maciejewski <[hidden email]>
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@.../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

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Try to set mhomed=1

-Laszlo

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Shared 'location' table?

Chris Maciejewski
On 22 April 2010 17:30, Laszlo <[hidden email]> wrote:

> 2010/4/22 Chris Maciejewski <[hidden email]>
>>
>> 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@.../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?

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Shared 'location' table?

Laszlo


2010/4/22 Chris Maciejewski <[hidden email]>
On 22 April 2010 17:30, Laszlo <[hidden email]> wrote:
> 2010/4/22 Chris Maciejewski <[hidden email]>
>>
>> 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@.../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?

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

usrloc is in "db only" mode?

-Laszlo


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Shared 'location' table?

Chris Maciejewski
On 22 April 2010 17:47, Laszlo <[hidden email]> wrote:

> 2010/4/22 Chris Maciejewski <[hidden email]>
>> On 22 April 2010 17:30, Laszlo <[hidden email]> wrote:
>> > 2010/4/22 Chris Maciejewski <[hidden email]>
>> >> 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@.../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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Shared 'location' table?

Laszlo


2010/4/22 Chris Maciejewski <[hidden email]>
On 22 April 2010 17:47, Laszlo <[hidden email]> wrote:
> 2010/4/22 Chris Maciejewski <[hidden email]>
>> On 22 April 2010 17:30, Laszlo <[hidden email]> wrote:
>> > 2010/4/22 Chris Maciejewski <[hidden email]>
>> >> 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@.../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
[hidden email]
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


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Shared 'location' table?

Bogdan-Andrei Iancu
In reply to this post by Chris Maciejewski
Hi Chris,

running 2 opensips with different IPs ? because opensips saves in
location table its own socket (where the REGISTER was received), and if
the other server will try to use it, it will not recognize this socket
(as it is a different IP).

Before going further, note that multiple opensips  sharing  the same
location table has some flows (due how SIP works) - like if you are
using multiple interfaces, of different port ; also NAT traversal will
not work.

In the end, if you do not have NAT and using a single interface, you can
simply ignore those warnings.

Regards,
Bogdan

Chris Maciejewski wrote:

> On 22 April 2010 17:47, Laszlo <[hidden email]> wrote:
>  
>> 2010/4/22 Chris Maciejewski <[hidden email]>
>>    
>>> On 22 April 2010 17:30, Laszlo <[hidden email]> wrote:
>>>      
>>>> 2010/4/22 Chris Maciejewski <[hidden email]>
>>>>        
>>>>> 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@.../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
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>  


--
Bogdan-Andrei Iancu
www.voice-system.ro


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Shared 'location' table?

Chris Maciejewski
In reply to this post by Laszlo
On 22 April 2010 17:58, Laszlo <[hidden email]> wrote:

> 2010/4/22 Chris Maciejewski <[hidden email]>
>>
>> On 22 April 2010 17:47, Laszlo <[hidden email]> wrote:
>> > 2010/4/22 Chris Maciejewski <[hidden email]>
>> >> On 22 April 2010 17:30, Laszlo <[hidden email]> wrote:
>> >> > 2010/4/22 Chris Maciejewski <[hidden email]>
>> >> >> 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@.../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
>> [hidden email]
>> 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

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Shared 'location' table?

Chris Maciejewski
In reply to this post by Bogdan-Andrei Iancu
On 22 April 2010 18:00, Bogdan-Andrei Iancu <[hidden email]> wrote:

> Hi Chris,
>
> running 2 opensips with different IPs ? because opensips saves in
> location table its own socket (where the REGISTER was received), and if
> the other server will try to use it, it will not recognize this socket
> (as it is a different IP).
>
> Before going further, note that multiple opensips  sharing  the same
> location table has some flows (due how SIP works) - like if you are
> using multiple interfaces, of different port ; also NAT traversal will
> not work.
>
> In the end, if you do not have NAT and using a single interface, you can
> simply ignore those warnings.
>
> Regards,
> Bogdan
>

Hi Bogdan,

Thanks for clarification. I am aware due to NAT traversal etc.
multiple SIP registrar servers sharing the same location table will
not work.

I was just worried this WARNINGs might have some negative impact, but
in that case I will just ignore them.

Regards,
Chris

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Shared 'location' table?

Bogdan-Andrei Iancu
Chris Maciejewski wrote:

> On 22 April 2010 18:00, Bogdan-Andrei Iancu <[hidden email]> wrote:
>  
>> Hi Chris,
>>
>> running 2 opensips with different IPs ? because opensips saves in
>> location table its own socket (where the REGISTER was received), and if
>> the other server will try to use it, it will not recognize this socket
>> (as it is a different IP).
>>
>> Before going further, note that multiple opensips  sharing  the same
>> location table has some flows (due how SIP works) - like if you are
>> using multiple interfaces, of different port ; also NAT traversal will
>> not work.
>>
>> In the end, if you do not have NAT and using a single interface, you can
>> simply ignore those warnings.
>>
>> Regards,
>> Bogdan
>>
>>    
>
> Hi Bogdan,
>
> Thanks for clarification. I am aware due to NAT traversal etc.
> multiple SIP registrar servers sharing the same location table will
> not work.
>
> I was just worried this WARNINGs might have some negative impact, but
> in that case I will just ignore them.
>  
If opensips finds a non-local socket in a usrloc records, it will fire
the warning and use one of its own sockets for dealing with that contact.

Regards,
Bogdan

--
Bogdan-Andrei Iancu
www.voice-system.ro


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Shared 'location' table?

Chris Maciejewski
On 22 April 2010 18:11, Bogdan-Andrei Iancu <[hidden email]> wrote:

> Chris Maciejewski wrote:
>> On 22 April 2010 18:00, Bogdan-Andrei Iancu <[hidden email]> wrote:
>>
>>> Hi Chris,
>>>
>>> running 2 opensips with different IPs ? because opensips saves in
>>> location table its own socket (where the REGISTER was received), and if
>>> the other server will try to use it, it will not recognize this socket
>>> (as it is a different IP).
>>>
>>> Before going further, note that multiple opensips  sharing  the same
>>> location table has some flows (due how SIP works) - like if you are
>>> using multiple interfaces, of different port ; also NAT traversal will
>>> not work.
>>>
>>> In the end, if you do not have NAT and using a single interface, you can
>>> simply ignore those warnings.
>>>
>>> Regards,
>>> Bogdan
>>>
>>>
>>
>> Hi Bogdan,
>>
>> Thanks for clarification. I am aware due to NAT traversal etc.
>> multiple SIP registrar servers sharing the same location table will
>> not work.
>>
>> I was just worried this WARNINGs might have some negative impact, but
>> in that case I will just ignore them.
>>
> If opensips finds a non-local socket in a usrloc records, it will fire
> the warning and use one of its own sockets for dealing with that contact.
>
> Regards,
> Bogdan
>

Ah, I see now.

When UA1 registered at Proxy1 only, Nathelper OPTIONs are sent from
both Proxy1 and Proxy2. This is not what I wanted :(

Is there any way to make Proxy2 completely ignore UA1?

Regards,
Chris

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Shared 'location' table?

Brett Nemeroff
Just a quick question here.. can some of this be taken care of with a
t_replicate for the register?

Just a thought..
-Brett


On Thu, Apr 22, 2010 at 12:36 PM, Chris Maciejewski <[hidden email]> wrote:

> On 22 April 2010 18:11, Bogdan-Andrei Iancu <[hidden email]> wrote:
>> Chris Maciejewski wrote:
>>> On 22 April 2010 18:00, Bogdan-Andrei Iancu <[hidden email]> wrote:
>>>
>>>> Hi Chris,
>>>>
>>>> running 2 opensips with different IPs ? because opensips saves in
>>>> location table its own socket (where the REGISTER was received), and if
>>>> the other server will try to use it, it will not recognize this socket
>>>> (as it is a different IP).
>>>>
>>>> Before going further, note that multiple opensips  sharing  the same
>>>> location table has some flows (due how SIP works) - like if you are
>>>> using multiple interfaces, of different port ; also NAT traversal will
>>>> not work.
>>>>
>>>> In the end, if you do not have NAT and using a single interface, you can
>>>> simply ignore those warnings.
>>>>
>>>> Regards,
>>>> Bogdan
>>>>
>>>>
>>>
>>> Hi Bogdan,
>>>
>>> Thanks for clarification. I am aware due to NAT traversal etc.
>>> multiple SIP registrar servers sharing the same location table will
>>> not work.
>>>
>>> I was just worried this WARNINGs might have some negative impact, but
>>> in that case I will just ignore them.
>>>
>> If opensips finds a non-local socket in a usrloc records, it will fire
>> the warning and use one of its own sockets for dealing with that contact.
>>
>> Regards,
>> Bogdan
>>
>
> Ah, I see now.
>
> When UA1 registered at Proxy1 only, Nathelper OPTIONs are sent from
> both Proxy1 and Proxy2. This is not what I wanted :(
>
> Is there any way to make Proxy2 completely ignore UA1?
>
> Regards,
> Chris
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Shared 'location' table?

Chris Maciejewski
Hi,

I made a diagram showing what I am trying to achieve:

http://wima.co.uk/2x_opensips.pdf

Is this possible at all?
Can we make two OpenSIPs share the same 'location' table, yet each
dealing only with it's "own" contacts?

Regards,
Chris


On 22 April 2010 18:47, Brett Nemeroff <[hidden email]> wrote:

> Just a quick question here.. can some of this be taken care of with a
> t_replicate for the register?
>
> Just a thought..
> -Brett
>
>
> On Thu, Apr 22, 2010 at 12:36 PM, Chris Maciejewski <[hidden email]> wrote:
>> On 22 April 2010 18:11, Bogdan-Andrei Iancu <[hidden email]> wrote:
>>> Chris Maciejewski wrote:
>>>> On 22 April 2010 18:00, Bogdan-Andrei Iancu <[hidden email]> wrote:
>>>>
>>>>> Hi Chris,
>>>>>
>>>>> running 2 opensips with different IPs ? because opensips saves in
>>>>> location table its own socket (where the REGISTER was received), and if
>>>>> the other server will try to use it, it will not recognize this socket
>>>>> (as it is a different IP).
>>>>>
>>>>> Before going further, note that multiple opensips  sharing  the same
>>>>> location table has some flows (due how SIP works) - like if you are
>>>>> using multiple interfaces, of different port ; also NAT traversal will
>>>>> not work.
>>>>>
>>>>> In the end, if you do not have NAT and using a single interface, you can
>>>>> simply ignore those warnings.
>>>>>
>>>>> Regards,
>>>>> Bogdan
>>>>>
>>>>>
>>>>
>>>> Hi Bogdan,
>>>>
>>>> Thanks for clarification. I am aware due to NAT traversal etc.
>>>> multiple SIP registrar servers sharing the same location table will
>>>> not work.
>>>>
>>>> I was just worried this WARNINGs might have some negative impact, but
>>>> in that case I will just ignore them.
>>>>
>>> If opensips finds a non-local socket in a usrloc records, it will fire
>>> the warning and use one of its own sockets for dealing with that contact.
>>>
>>> Regards,
>>> Bogdan
>>>
>>
>> Ah, I see now.
>>
>> When UA1 registered at Proxy1 only, Nathelper OPTIONs are sent from
>> both Proxy1 and Proxy2. This is not what I wanted :(
>>
>> Is there any way to make Proxy2 completely ignore UA1?
>>
>> Regards,
>> Chris
>>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Shared 'location' table?

Laszlo


2010/4/22 Chris Maciejewski <[hidden email]>
Hi,

I made a diagram showing what I am trying to achieve:

http://wima.co.uk/2x_opensips.pdf

Is this possible at all?
Can we make two OpenSIPs share the same 'location' table, yet each
dealing only with it's "own" contacts?

Regards,
Chris


On 22 April 2010 18:47, Brett Nemeroff <[hidden email]> wrote:
> Just a quick question here.. can some of this be taken care of with a
> t_replicate for the register?
>
> Just a thought..
> -Brett
>
>
> On Thu, Apr 22, 2010 at 12:36 PM, Chris Maciejewski <[hidden email]> wrote:
>> On 22 April 2010 18:11, Bogdan-Andrei Iancu <[hidden email]> wrote:
>>> Chris Maciejewski wrote:
>>>> On 22 April 2010 18:00, Bogdan-Andrei Iancu <[hidden email]> wrote:
>>>>
>>>>> Hi Chris,
>>>>>
>>>>> running 2 opensips with different IPs ? because opensips saves in
>>>>> location table its own socket (where the REGISTER was received), and if
>>>>> the other server will try to use it, it will not recognize this socket
>>>>> (as it is a different IP).
>>>>>
>>>>> Before going further, note that multiple opensips  sharing  the same
>>>>> location table has some flows (due how SIP works) - like if you are
>>>>> using multiple interfaces, of different port ; also NAT traversal will
>>>>> not work.
>>>>>
>>>>> In the end, if you do not have NAT and using a single interface, you can
>>>>> simply ignore those warnings.
>>>>>
>>>>> Regards,
>>>>> Bogdan
>>>>>
>>>>>
>>>>
>>>> Hi Bogdan,
>>>>
>>>> Thanks for clarification. I am aware due to NAT traversal etc.
>>>> multiple SIP registrar servers sharing the same location table will
>>>> not work.
>>>>
>>>> I was just worried this WARNINGs might have some negative impact, but
>>>> in that case I will just ignore them.
>>>>
>>> If opensips finds a non-local socket in a usrloc records, it will fire
>>> the warning and use one of its own sockets for dealing with that contact.
>>>
>>> Regards,
>>> Bogdan
>>>
>>
>> Ah, I see now.
>>
>> When UA1 registered at Proxy1 only, Nathelper OPTIONs are sent from
>> both Proxy1 and Proxy2. This is not what I wanted :(
>>
>> Is there any way to make Proxy2 completely ignore UA1?
>>
>> Regards,
>> Chris
>>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

http://lists.opensips.org/pipermail/users/2008-November/001729.html

It can be a starting point.

-Laszlo



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Shared 'location' table?

Chris Maciejewski
On 22 April 2010 19:52, Laszlo <[hidden email]> wrote:

> 2010/4/22 Chris Maciejewski <[hidden email]>
>>
>> Hi,
>>
>> I made a diagram showing what I am trying to achieve:
>>
>> http://wima.co.uk/2x_opensips.pdf
>>
>> Is this possible at all?
>> Can we make two OpenSIPs share the same 'location' table, yet each
>> dealing only with it's "own" contacts?
>>
>> Regards,
>> Chris
>>
>>
>> On 22 April 2010 18:47, Brett Nemeroff <[hidden email]> wrote:
>> > Just a quick question here.. can some of this be taken care of with a
>> > t_replicate for the register?
>> >
>> > Just a thought..
>> > -Brett
>> >
>> >
>> > On Thu, Apr 22, 2010 at 12:36 PM, Chris Maciejewski <[hidden email]>
>> > wrote:
>> >> On 22 April 2010 18:11, Bogdan-Andrei Iancu <[hidden email]>
>> >> wrote:
>> >>> Chris Maciejewski wrote:
>> >>>> On 22 April 2010 18:00, Bogdan-Andrei Iancu <[hidden email]>
>> >>>> wrote:
>> >>>>
>> >>>>> Hi Chris,
>> >>>>>
>> >>>>> running 2 opensips with different IPs ? because opensips saves in
>> >>>>> location table its own socket (where the REGISTER was received), and
>> >>>>> if
>> >>>>> the other server will try to use it, it will not recognize this
>> >>>>> socket
>> >>>>> (as it is a different IP).
>> >>>>>
>> >>>>> Before going further, note that multiple opensips  sharing  the same
>> >>>>> location table has some flows (due how SIP works) - like if you are
>> >>>>> using multiple interfaces, of different port ; also NAT traversal
>> >>>>> will
>> >>>>> not work.
>> >>>>>
>> >>>>> In the end, if you do not have NAT and using a single interface, you
>> >>>>> can
>> >>>>> simply ignore those warnings.
>> >>>>>
>> >>>>> Regards,
>> >>>>> Bogdan
>> >>>>>
>> >>>>>
>> >>>>
>> >>>> Hi Bogdan,
>> >>>>
>> >>>> Thanks for clarification. I am aware due to NAT traversal etc.
>> >>>> multiple SIP registrar servers sharing the same location table will
>> >>>> not work.
>> >>>>
>> >>>> I was just worried this WARNINGs might have some negative impact, but
>> >>>> in that case I will just ignore them.
>> >>>>
>> >>> If opensips finds a non-local socket in a usrloc records, it will fire
>> >>> the warning and use one of its own sockets for dealing with that
>> >>> contact.
>> >>>
>> >>> Regards,
>> >>> Bogdan
>> >>>
>> >>
>> >> Ah, I see now.
>> >>
>> >> When UA1 registered at Proxy1 only, Nathelper OPTIONs are sent from
>> >> both Proxy1 and Proxy2. This is not what I wanted :(
>> >>
>> >> Is there any way to make Proxy2 completely ignore UA1?
>> >>
>> >> Regards,
>> >> Chris
>> >>
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> http://lists.opensips.org/pipermail/users/2008-November/001729.html
>
> It can be a starting point.
>
> -Laszlo
>

Hi Laszlo, thanks for the link, but it seems to me it describes
slightly different scenario (when REGISTER is replicated to another
Opensips instance). I would like each of my opensips servers to have
it's own registered contacts in a common 'location' table. As
presented in my diagram above.

Regards,
Chris

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Shared 'location' table?

rajnikant vanza
In reply to this post by Chris Maciejewski
Hi Chris,

You want to try for 2 opensips + 1 MySQL database.

As per my knowledge u can write listen = "0.0.0.0" ipaddress in both opensip.crf file and try it.

I have configured for 2 kamailio + 1 MySQL database scenaris and its work successful.

I hope, u can resolve this problem.


--
Best Regards,

Rajnikant Vanza



On Thu, Apr 22, 2010 at 9:52 PM, Chris Maciejewski <[hidden email]> wrote:
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@.../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

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Shared 'location' table?

Iñaki Baz Castillo
2010/4/23 RAJNIKANT VANZA <[hidden email]>:
> Hi Chris,
>
> You want to try for 2 opensips + 1 MySQL database.
>
> As per my knowledge u can write listen = "0.0.0.0" ipaddress in both
> opensip.crf file and try it.
>
> I have configured for 2 kamailio + 1 MySQL database scenaris and its work
> successful.

This will not solve the problem, as OpenSIPS-1 still will write its
*own* address (different than OpenSIPS-2's address) in "socket"
column.

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Shared 'location' table?

Chris Maciejewski
On 24 April 2010 00:14, Iñaki Baz Castillo <[hidden email]> wrote:

> 2010/4/23 RAJNIKANT VANZA <[hidden email]>:
>> Hi Chris,
>>
>> You want to try for 2 opensips + 1 MySQL database.
>>
>> As per my knowledge u can write listen = "0.0.0.0" ipaddress in both
>> opensip.crf file and try it.
>>
>> I have configured for 2 kamailio + 1 MySQL database scenaris and its work
>> successful.
>
> This will not solve the problem, as OpenSIPS-1 still will write its
> *own* address (different than OpenSIPS-2's address) in "socket"
> column.
>

Actually I want both OpenSIPs1/2 to write its own address in "socket"
column, but also what I want is OpenSIPs1 to ignore all records but
it's *own", and OpenSIPs2 to ignore all records but it's *own*.

It seems to me at the moment userloc module runs the following query
to fetch contacts:

"select received, contact, socket, cflags, path from location where
expires > '2010-04-24 11:04:15' and cflags & 0 = 0 and id % 30 = 4"

and what would solve my problem is to append ' WHERE socket IN
('udp:my_addres1:5060','udp:my_address2:5060')

so the query would look like:

"select received, contact, socket, cflags, path from location where
expires > '2010-04-24 11:04:15' and cflags & 0 = 0 and id % 30 = 4 and
socket IN ('udp:my_addres1:5060','udp:my_address2:5060')"

It this possible at all?

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Shared 'location' table?

Bogdan-Andrei Iancu
In reply to this post by Chris Maciejewski
Hi Chris,

A quick one - with such a configuration, the NAT traversal will not work
(due the restriction on destination of the NAT pinhole) - so why pinging
them ?....

I can make a small patch to you to set nathelper for pinging only if the
record socket is local, if not, no pinging - this may solve the pinging
problem, but overall, it will make no difference I guess.

Regards,
Bogdan

Chris Maciejewski wrote:

> Hi,
>
> I made a diagram showing what I am trying to achieve:
>
> http://wima.co.uk/2x_opensips.pdf
>
> Is this possible at all?
> Can we make two OpenSIPs share the same 'location' table, yet each
> dealing only with it's "own" contacts?
>
> Regards,
> Chris
>
>
> On 22 April 2010 18:47, Brett Nemeroff <[hidden email]> wrote:
>  
>> Just a quick question here.. can some of this be taken care of with a
>> t_replicate for the register?
>>
>> Just a thought..
>> -Brett
>>
>>
>> On Thu, Apr 22, 2010 at 12:36 PM, Chris Maciejewski <[hidden email]> wrote:
>>    
>>> On 22 April 2010 18:11, Bogdan-Andrei Iancu <[hidden email]> wrote:
>>>      
>>>> Chris Maciejewski wrote:
>>>>        
>>>>> On 22 April 2010 18:00, Bogdan-Andrei Iancu <[hidden email]> wrote:
>>>>>
>>>>>          
>>>>>> Hi Chris,
>>>>>>
>>>>>> running 2 opensips with different IPs ? because opensips saves in
>>>>>> location table its own socket (where the REGISTER was received), and if
>>>>>> the other server will try to use it, it will not recognize this socket
>>>>>> (as it is a different IP).
>>>>>>
>>>>>> Before going further, note that multiple opensips  sharing  the same
>>>>>> location table has some flows (due how SIP works) - like if you are
>>>>>> using multiple interfaces, of different port ; also NAT traversal will
>>>>>> not work.
>>>>>>
>>>>>> In the end, if you do not have NAT and using a single interface, you can
>>>>>> simply ignore those warnings.
>>>>>>
>>>>>> Regards,
>>>>>> Bogdan
>>>>>>
>>>>>>
>>>>>>            
>>>>> Hi Bogdan,
>>>>>
>>>>> Thanks for clarification. I am aware due to NAT traversal etc.
>>>>> multiple SIP registrar servers sharing the same location table will
>>>>> not work.
>>>>>
>>>>> I was just worried this WARNINGs might have some negative impact, but
>>>>> in that case I will just ignore them.
>>>>>
>>>>>          
>>>> If opensips finds a non-local socket in a usrloc records, it will fire
>>>> the warning and use one of its own sockets for dealing with that contact.
>>>>
>>>> Regards,
>>>> Bogdan
>>>>
>>>>        
>>> Ah, I see now.
>>>
>>> When UA1 registered at Proxy1 only, Nathelper OPTIONs are sent from
>>> both Proxy1 and Proxy2. This is not what I wanted :(
>>>
>>> Is there any way to make Proxy2 completely ignore UA1?
>>>
>>> Regards,
>>> Chris
>>>
>>>      
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>  


--
Bogdan-Andrei Iancu
www.voice-system.ro


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Shared 'location' table?

Chris Maciejewski
Hi Bogdan,

I am aware each opensips instance can only ping it's *own* contacts.
What I wanted to achieve is to avoid OpenSIPs1 pinging UA2, as shown
in my diagram:

http://wima.co.uk/2x_opensips.pdf

I have now solved my problem in the following way:

Opensips 1: modparam("usrloc", "db_url", "userloc1")
Opensips 2: modparam("usrloc", "db_url", "userloc2")

Web server: "web_db" with the following MySQL View:

CREATE VIEW sip_location AS
(SELECT location.username, location.contact, location.user_agent,
location.last_modified, location.expires, location.socket,
location.methods FROM userloc1.location)
UNION
(SELECT location.username, location.contact, location.user_agent,
location.last_modified, location.expires, location.socket,
location.methods FROM userloc2.location);

and now my web application can run the following query to get all contacts:

"SELECT * FROM sip_location"

So no need for a custom path (but thanks a lot for your offer to write one).

Best regards,
Chris

On 26 April 2010 11:29, Bogdan-Andrei Iancu <[hidden email]> wrote:

> Hi Chris,
>
> A quick one - with such a configuration, the NAT traversal will not work
> (due the restriction on destination of the NAT pinhole) - so why pinging
> them ?....
>
> I can make a small patch to you to set nathelper for pinging only if the
> record socket is local, if not, no pinging - this may solve the pinging
> problem, but overall, it will make no difference I guess.
>
> Regards,
> Bogdan
>
> Chris Maciejewski wrote:
>> Hi,
>>
>> I made a diagram showing what I am trying to achieve:
>>
>> http://wima.co.uk/2x_opensips.pdf
>>
>> Is this possible at all?
>> Can we make two OpenSIPs share the same 'location' table, yet each
>> dealing only with it's "own" contacts?
>>
>> Regards,
>> Chris
>>
>>
>> On 22 April 2010 18:47, Brett Nemeroff <[hidden email]> wrote:
>>
>>> Just a quick question here.. can some of this be taken care of with a
>>> t_replicate for the register?
>>>
>>> Just a thought..
>>> -Brett
>>>
>>>
>>> On Thu, Apr 22, 2010 at 12:36 PM, Chris Maciejewski <[hidden email]> wrote:
>>>
>>>> On 22 April 2010 18:11, Bogdan-Andrei Iancu <[hidden email]> wrote:
>>>>
>>>>> Chris Maciejewski wrote:
>>>>>
>>>>>> On 22 April 2010 18:00, Bogdan-Andrei Iancu <[hidden email]> wrote:
>>>>>>
>>>>>>
>>>>>>> Hi Chris,
>>>>>>>
>>>>>>> running 2 opensips with different IPs ? because opensips saves in
>>>>>>> location table its own socket (where the REGISTER was received), and if
>>>>>>> the other server will try to use it, it will not recognize this socket
>>>>>>> (as it is a different IP).
>>>>>>>
>>>>>>> Before going further, note that multiple opensips  sharing  the same
>>>>>>> location table has some flows (due how SIP works) - like if you are
>>>>>>> using multiple interfaces, of different port ; also NAT traversal will
>>>>>>> not work.
>>>>>>>
>>>>>>> In the end, if you do not have NAT and using a single interface, you can
>>>>>>> simply ignore those warnings.
>>>>>>>
>>>>>>> Regards,
>>>>>>> Bogdan
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> Hi Bogdan,
>>>>>>
>>>>>> Thanks for clarification. I am aware due to NAT traversal etc.
>>>>>> multiple SIP registrar servers sharing the same location table will
>>>>>> not work.
>>>>>>
>>>>>> I was just worried this WARNINGs might have some negative impact, but
>>>>>> in that case I will just ignore them.
>>>>>>
>>>>>>
>>>>> If opensips finds a non-local socket in a usrloc records, it will fire
>>>>> the warning and use one of its own sockets for dealing with that contact.
>>>>>
>>>>> Regards,
>>>>> Bogdan
>>>>>
>>>>>
>>>> Ah, I see now.
>>>>
>>>> When UA1 registered at Proxy1 only, Nathelper OPTIONs are sent from
>>>> both Proxy1 and Proxy2. This is not what I wanted :(
>>>>
>>>> Is there any way to make Proxy2 completely ignore UA1?
>>>>
>>>> Regards,
>>>> Chris
>>>>
>>>>
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
>
> --
> Bogdan-Andrei Iancu
> www.voice-system.ro
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users