Re: [SR-Users] Kamailio Cluster

2016-02-23 Thread Daniel-Constantin Mierla
On 23/02/16 05:20, Arsen Hovhanissian wrote:
> Sorry forgot to specify (in-memory) not using the DB, I feel like using the 
> DB for such a task would be such a drag on it
>
The dialog profile items replication should be possible, but full dialog
state in-memory replication would result also in actions like timeouts
(bye) and options keepalives.

Maybe you can explain more what you need to achieve and we can give
hints on if it is possible and how.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, March 7-9, 2016 - http://www.asipto.com


___
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


Re: [SR-Users] Kamailio Cluster

2016-02-22 Thread Arsen Hovhanissian

Sorry forgot to specify (in-memory) not using the DB, I feel like using the DB 
for such a task would be such a drag on it
___
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


Re: [SR-Users] Kamailio Cluster

2016-02-22 Thread Arsen Hovhanissian
Since this thread is open, I wanted to ask, is it possible to replicate dialog 
data over to multiple nodes as well?
___
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


Re: [SR-Users] Kamailio Cluster

2016-02-03 Thread Daniel Tryba
On Mon, Feb 01, 2016 at 09:17:41AM +0100, Federico Cabiddu wrote:
> a solution in this case could be making usage of Path header (
> https://tools.ietf.org/html/rfc3327).
> You have to load the path module
> http://www.kamailio.org/docs/modules/devel/modules/path.html
> and enabled its usage in registrar module
 
Be warned that any stateful firewall or NATed client will not accept the
messages from any other sipserver to that client. My solution was to use
edge/loadbalancer proxies which add the Path header using
add_path_received to store both the edge/loadbalancer ip and client
source before passing the request to the backends (using dispatcher).

Any backend will send messages based on the Path headers to the
edge/loadbalancer and that will pass it to the client to appease
statefull firewalls.



___
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


Re: [SR-Users] Kamailio Cluster

2016-02-03 Thread Daniel Tryba
On Wed, Feb 03, 2016 at 01:48:50PM +0330, Gholamreza Sabery wrote:
> Actually I think something is not clear here. Suppose I want to use two
> Kamailio servers such that a client which is registered on server A is able
> to call another client registered on server B. In this case I use DB_MODE
> 3. Both servers have access to location database but sockets are non-local
> and cleints are behind symmetric NATs.Now  only the server on which the
> client is registered and sent it's request to is able to respond(because of
> symmetric NAT). Is it possible to implement this scenario using Path header?

This is still ambigious, server B can't call the client due to nat, but
server B can call server A. The trick might be to add a Path header on
server A before save the register on server A. Or to use custom queries
to find out that the registered socket isn't local so send the invite to
the non local adress instead.

I asked similar questions:
http://lists.sip-router.org/pipermail/sr-users/2015-April/087867.html

My final solution is using a really loadbalancer with static config,
which adds Path and dispatches to individual backends. Difference is
that server B doesn't INVITE to server A but to the loadbalancer for a
client registered on server A.

___
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


Re: [SR-Users] Kamailio Cluster

2016-02-03 Thread Gholamreza Sabery
Actually I think something is not clear here. Suppose I want to use two
Kamailio servers such that a client which is registered on server A is able
to call another client registered on server B. In this case I use DB_MODE
3. Both servers have access to location database but sockets are non-local
and cleints are behind symmetric NATs.Now  only the server on which the
client is registered and sent it's request to is able to respond(because of
symmetric NAT). Is it possible to implement this scenario using Path header?

Regards

On Wed, Feb 3, 2016 at 12:55 PM, Daniel Tryba  wrote:

> On Mon, Feb 01, 2016 at 09:17:41AM +0100, Federico Cabiddu wrote:
> > a solution in this case could be making usage of Path header (
> > https://tools.ietf.org/html/rfc3327).
> > You have to load the path module
> > http://www.kamailio.org/docs/modules/devel/modules/path.html
> > and enabled its usage in registrar module
>
> Be warned that any stateful firewall or NATed client will not accept the
> messages from any other sipserver to that client. My solution was to use
> edge/loadbalancer proxies which add the Path header using
> add_path_received to store both the edge/loadbalancer ip and client
> source before passing the request to the backends (using dispatcher).
>
> Any backend will send messages based on the Path headers to the
> edge/loadbalancer and that will pass it to the client to appease
> statefull firewalls.
>
>
>
> ___
> 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
>
___
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


Re: [SR-Users] Kamailio Cluster

2016-02-03 Thread Jurijs Ivolga
Hi,

If you have following:

UA A > Kamilio 1

UA B > Kamailio 2

With path you just make sure that all calls are routed to that server where
UA initially registered.

So if UA A is calling UA B, call will go in such way: UA A=> Kamilio 1 =>
Kamailio 2 => UA B.

I hope I answered your question.

With kind regards,

2016-02-03 12:18 GMT+02:00 Gholamreza Sabery :

> Actually I think something is not clear here. Suppose I want to use two
> Kamailio servers such that a client which is registered on server A is able
> to call another client registered on server B. In this case I use DB_MODE
> 3. Both servers have access to location database but sockets are non-local
> and cleints are behind symmetric NATs.Now  only the server on which the
> client is registered and sent it's request to is able to respond(because of
> symmetric NAT). Is it possible to implement this scenario using Path header?
>
> Regards
>
> On Wed, Feb 3, 2016 at 12:55 PM, Daniel Tryba  wrote:
>
>> On Mon, Feb 01, 2016 at 09:17:41AM +0100, Federico Cabiddu wrote:
>> > a solution in this case could be making usage of Path header (
>> > https://tools.ietf.org/html/rfc3327).
>> > You have to load the path module
>> > http://www.kamailio.org/docs/modules/devel/modules/path.html
>> > and enabled its usage in registrar module
>>
>> Be warned that any stateful firewall or NATed client will not accept the
>> messages from any other sipserver to that client. My solution was to use
>> edge/loadbalancer proxies which add the Path header using
>> add_path_received to store both the edge/loadbalancer ip and client
>> source before passing the request to the backends (using dispatcher).
>>
>> Any backend will send messages based on the Path headers to the
>> edge/loadbalancer and that will pass it to the client to appease
>> statefull firewalls.
>>
>>
>>
>> ___
>> 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
>>
>
>
> ___
> 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
>
>


-- 
Jurijs
___
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


Re: [SR-Users] Kamailio Cluster

2016-02-03 Thread SamyGo
Hi,
Interesting discussion going on. Ive to ask can OP use shared location
table between different kamailio servers and use db mode 3.
All he has to do is if UA B calls UA A via Kamailio2 he just needs to find
the received socket and if it is not local Kamailio2 then route to the IP
maybe attach a custom header and relay call to Kamailio1.
Kamailio1 gets call with the custom headers sends call to route(LOCATION)
or w/e he has for lookups.

Regards,
Sammy
On Feb 3, 2016 06:19, "Daniel Tryba"  wrote:

> On Wed, Feb 03, 2016 at 01:48:50PM +0330, Gholamreza Sabery wrote:
> > Actually I think something is not clear here. Suppose I want to use two
> > Kamailio servers such that a client which is registered on server A is
> able
> > to call another client registered on server B. In this case I use DB_MODE
> > 3. Both servers have access to location database but sockets are
> non-local
> > and cleints are behind symmetric NATs.Now  only the server on which the
> > client is registered and sent it's request to is able to respond(because
> of
> > symmetric NAT). Is it possible to implement this scenario using Path
> header?
>
> This is still ambigious, server B can't call the client due to nat, but
> server B can call server A. The trick might be to add a Path header on
> server A before save the register on server A. Or to use custom queries
> to find out that the registered socket isn't local so send the invite to
> the non local adress instead.
>
> I asked similar questions:
> http://lists.sip-router.org/pipermail/sr-users/2015-April/087867.html
>
> My final solution is using a really loadbalancer with static config,
> which adds Path and dispatches to individual backends. Difference is
> that server B doesn't INVITE to server A but to the loadbalancer for a
> client registered on server A.
>
> ___
> 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
>
___
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


Re: [SR-Users] Kamailio Cluster

2016-02-01 Thread Alex Balashov

On 02/01/2016 02:59 AM, Jurijs Ivolga wrote:


I think you need to make record routing, so it will keep initial(to what
user registered) Kamailio in signaling path.


Ah, no. Record-Route is for INVITEs only. You're thinking of Path.

--
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
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


Re: [SR-Users] Kamailio Cluster

2016-02-01 Thread Federico Cabiddu
Hi,
a solution in this case could be making usage of Path header (
https://tools.ietf.org/html/rfc3327).

You have to load the path module

http://www.kamailio.org/docs/modules/devel/modules/path.html

and enabled its usage in registrar module

http://www.kamailio.org/docs/modules/devel/modules/registrar.html#registrar.p.use_path

If you plan to use REGISTER replication through t_replicate() just call
add_path() before replicating the message to the other server(s).
If you use a shared database with db_mode = 3, call msg_apply_changes (
http://www.kamailio.org/docs/modules/devel/modules/textopsx.html#textopsx.f.msg_apply_changes)
before saving the contact. In this case also be sure to set
path_check_local parametr of the registrar module (
http://www.kamailio.org/docs/modules/devel/modules/registrar.html#registrar.p.path_check_local)
to 1.

Cheers,

Federico

On Mon, Feb 1, 2016 at 9:10 AM, Jurijs Ivolga  wrote:

> Hi Alex,
>
> You are right. :)
>
> With kind regards,
>
> 2016-02-01 10:09 GMT+02:00 Alex Balashov :
>
>> On 02/01/2016 02:59 AM, Jurijs Ivolga wrote:
>>
>> I think you need to make record routing, so it will keep initial(to what
>>> user registered) Kamailio in signaling path.
>>>
>>
>> Ah, no. Record-Route is for INVITEs only. You're thinking of Path.
>>
>> --
>> Alex Balashov | Principal | Evariste Systems LLC
>> 303 Perimeter Center North, Suite 300
>> Atlanta, GA 30346
>> United States
>>
>> Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
>> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>>
>> ___
>> 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
>>
>
>
>
> --
> Jurijs
>
> ___
> 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
>
>
___
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


Re: [SR-Users] Kamailio Cluster

2016-02-01 Thread Gholamreza Sabery
Yes I want to distribute my users across multiple Kamailio servers. It
seems a good idea than you Alex I will try it!

On Mon, Feb 1, 2016 at 11:10 AM, Alex Balashov 
wrote:

> Here's a thought, though:
>
> If your goal is really for users registered on one server to be able to
> easily call users registered on another server, you probably don't care to
> replicate or share the 'location' table per se. You just want one Kamailio
> server to call the right Kamailio server to reach the user's native home.
>
> In that case, why not create a database view over a composition of the
> 'location' tables of various servers that exposes a map of AoR -> socket?
> You can then query those values with 'sqlops' yourself and forward the call
> to the correct server, which can then do a native lookup().
>
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
> 303 Perimeter Center North, Suite 300
> Atlanta, GA 30346
> United States
>
> Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> 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
>
___
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


Re: [SR-Users] Kamailio Cluster

2016-02-01 Thread Jurijs Ivolga
Hi,

I think you need to make record routing, so it will keep initial(to what
user registered) Kamailio in signaling path.

I hope it will helps.

With kind regards,

Jurijs

2016-02-01 9:33 GMT+02:00 Gholamreza Sabery :

> Thank you so much Alex. I tried REGISTER replication and DM_MODE 3. But my
> problem here is that in these scenarios Kamailio will give you a non-local
> socket error. I want to have multiple Kamailio servers so that a user that
> is registered on one server can easily call other users on another server.
>
> On Mon, Feb 1, 2016 at 10:01 AM, Alex Balashov 
> wrote:
>
>> Although, the core `dmq` module is a big help in providing a distribution
>> vehicle for messaging you do wish to replicate into a 'cluster':
>>
>>
>> http://kamailio.org/docs/modules/4.3.x/modules/dmq.html#dmq.f.dmq_t_replicate
>>
>>
>> --
>> Alex Balashov | Principal | Evariste Systems LLC
>> 303 Perimeter Center North, Suite 300
>> Atlanta, GA 30346
>> United States
>>
>> Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
>> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>>
>> ___
>> 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
>>
>
>
> ___
> 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
>
>


-- 
Jurijs
___
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


Re: [SR-Users] Kamailio Cluster

2016-02-01 Thread Jurijs Ivolga
Hi Alex,

You are right. :)

With kind regards,

2016-02-01 10:09 GMT+02:00 Alex Balashov :

> On 02/01/2016 02:59 AM, Jurijs Ivolga wrote:
>
> I think you need to make record routing, so it will keep initial(to what
>> user registered) Kamailio in signaling path.
>>
>
> Ah, no. Record-Route is for INVITEs only. You're thinking of Path.
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
> 303 Perimeter Center North, Suite 300
> Atlanta, GA 30346
> United States
>
> Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> 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
>



-- 
Jurijs
___
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


Re: [SR-Users] Kamailio Cluster

2016-02-01 Thread Gholamreza Sabery
All right. Thank you so much.

On Mon, Feb 1, 2016 at 11:47 AM, Federico Cabiddu <
federico.cabi...@gmail.com> wrote:

> Hi,
> a solution in this case could be making usage of Path header (
> https://tools.ietf.org/html/rfc3327).
>
> You have to load the path module
>
> http://www.kamailio.org/docs/modules/devel/modules/path.html
>
> and enabled its usage in registrar module
>
>
> http://www.kamailio.org/docs/modules/devel/modules/registrar.html#registrar.p.use_path
>
> If you plan to use REGISTER replication through t_replicate() just call
> add_path() before replicating the message to the other server(s).
> If you use a shared database with db_mode = 3, call msg_apply_changes (
> http://www.kamailio.org/docs/modules/devel/modules/textopsx.html#textopsx.f.msg_apply_changes)
> before saving the contact. In this case also be sure to set
> path_check_local parametr of the registrar module (
> http://www.kamailio.org/docs/modules/devel/modules/registrar.html#registrar.p.path_check_local)
> to 1.
>
> Cheers,
>
> Federico
>
> On Mon, Feb 1, 2016 at 9:10 AM, Jurijs Ivolga  wrote:
>
>> Hi Alex,
>>
>> You are right. :)
>>
>> With kind regards,
>>
>> 2016-02-01 10:09 GMT+02:00 Alex Balashov :
>>
>>> On 02/01/2016 02:59 AM, Jurijs Ivolga wrote:
>>>
>>> I think you need to make record routing, so it will keep initial(to what
 user registered) Kamailio in signaling path.

>>>
>>> Ah, no. Record-Route is for INVITEs only. You're thinking of Path.
>>>
>>> --
>>> Alex Balashov | Principal | Evariste Systems LLC
>>> 303 Perimeter Center North, Suite 300
>>> Atlanta, GA 30346
>>> United States
>>>
>>> Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
>>> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>>>
>>> ___
>>> 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
>>>
>>
>>
>>
>> --
>> Jurijs
>>
>> ___
>> 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
>>
>>
>
> ___
> 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
>
>
___
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


Re: [SR-Users] Kamailio Cluster

2016-02-01 Thread Yuriy Gorlichenko
Also one of the most siplies ways to resolve your issue is using queries at
the databases that select needed fields from db with (where
socket="").


2016-02-01 11:43 GMT+03:00 Gholamreza Sabery :

> All right. Thank you so much.
>
> On Mon, Feb 1, 2016 at 11:47 AM, Federico Cabiddu <
> federico.cabi...@gmail.com> wrote:
>
>> Hi,
>> a solution in this case could be making usage of Path header (
>> https://tools.ietf.org/html/rfc3327).
>>
>> You have to load the path module
>>
>> http://www.kamailio.org/docs/modules/devel/modules/path.html
>>
>> and enabled its usage in registrar module
>>
>>
>> http://www.kamailio.org/docs/modules/devel/modules/registrar.html#registrar.p.use_path
>>
>> If you plan to use REGISTER replication through t_replicate() just call
>> add_path() before replicating the message to the other server(s).
>> If you use a shared database with db_mode = 3, call msg_apply_changes (
>> http://www.kamailio.org/docs/modules/devel/modules/textopsx.html#textopsx.f.msg_apply_changes)
>> before saving the contact. In this case also be sure to set
>> path_check_local parametr of the registrar module (
>> http://www.kamailio.org/docs/modules/devel/modules/registrar.html#registrar.p.path_check_local)
>> to 1.
>>
>> Cheers,
>>
>> Federico
>>
>> On Mon, Feb 1, 2016 at 9:10 AM, Jurijs Ivolga 
>> wrote:
>>
>>> Hi Alex,
>>>
>>> You are right. :)
>>>
>>> With kind regards,
>>>
>>> 2016-02-01 10:09 GMT+02:00 Alex Balashov :
>>>
 On 02/01/2016 02:59 AM, Jurijs Ivolga wrote:

 I think you need to make record routing, so it will keep initial(to what
> user registered) Kamailio in signaling path.
>

 Ah, no. Record-Route is for INVITEs only. You're thinking of Path.

 --
 Alex Balashov | Principal | Evariste Systems LLC
 303 Perimeter Center North, Suite 300
 Atlanta, GA 30346
 United States

 Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
 Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

 ___
 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

>>>
>>>
>>>
>>> --
>>> Jurijs
>>>
>>> ___
>>> 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
>>>
>>>
>>
>> ___
>> 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
>>
>>
>
> ___
> 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
>
>
___
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


Re: [SR-Users] Kamailio Cluster

2016-02-01 Thread Henry Fernandes
The solution I am using is to have each Kamailio servers read 
subscriber/location data from a local database server.  Each of these local 
databases is replicated from a Master database.  We have db_mode=3 for sqlops, 
so it's always reading from the database to identify the user/phone.

-H

On 2016-01-31 1:06 AM, Gholamreza Sabery wrote:
I am trying to create a cluster of Kamailio servers. I want users that are 
registered on one server to be able to contact and call users on other servers. 
How can I implement this in Kamailio?

PS: My servers are in a private network and I do not have DNS.

___
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


Re: [SR-Users] Kamailio Cluster

2016-01-31 Thread Hossein Aghaie
hi Gholamreza Sabery
you should be implement HA on your server.you can use the
pacemaker/corosync or other software for run and configuration HA on
your server.


On 1/31/16, Gholamreza Sabery  wrote:
> I am trying to create a cluster of Kamailio servers. I want users that are
> registered on one server to be able to contact and call users on other
> servers. How can I implement this in Kamailio?
>
> PS: My servers are in a private network and I do not have DNS.
>

___
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


Re: [SR-Users] Kamailio Cluster

2016-01-31 Thread Gholamreza Sabery
Dear Hossein; I know about Corosync and Pacemaker and I implemented
something using these tools with Ansible (
https://github.com/ghrst/Kamailio-HA). But my question here is about
active-active scenarios not an active-passive one!


On Mon, Feb 1, 2016 at 2:14 AM, Hossein Aghaie 
wrote:

> hi Gholamreza Sabery
> you should be implement HA on your server.you can use the
> pacemaker/corosync or other software for run and configuration HA on
> your server.
>
>
> On 1/31/16, Gholamreza Sabery  wrote:
> > I am trying to create a cluster of Kamailio servers. I want users that
> are
> > registered on one server to be able to contact and call users on other
> > servers. How can I implement this in Kamailio?
> >
> > PS: My servers are in a private network and I do not have DNS.
> >
>
> ___
> 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
>
___
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


Re: [SR-Users] Kamailio Cluster

2016-01-31 Thread Gholamreza Sabery
Thank you so much Alex. I tried REGISTER replication and DM_MODE 3. But my
problem here is that in these scenarios Kamailio will give you a non-local
socket error. I want to have multiple Kamailio servers so that a user that
is registered on one server can easily call other users on another server.

On Mon, Feb 1, 2016 at 10:01 AM, Alex Balashov 
wrote:

> Although, the core `dmq` module is a big help in providing a distribution
> vehicle for messaging you do wish to replicate into a 'cluster':
>
>
> http://kamailio.org/docs/modules/4.3.x/modules/dmq.html#dmq.f.dmq_t_replicate
>
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
> 303 Perimeter Center North, Suite 300
> Atlanta, GA 30346
> United States
>
> Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> 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
>
___
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


Re: [SR-Users] Kamailio Cluster

2016-01-31 Thread Alex Balashov

On 02/01/2016 02:33 AM, Gholamreza Sabery wrote:


in these scenarios Kamailio will give you a non-local socket error


It's a warning, not an error. Right?

I don't remember how we solved that...

--
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
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


Re: [SR-Users] Kamailio Cluster

2016-01-31 Thread Alex Balashov

Hi Gholamreza,

Most Kamailio functionality can be used in an active-active way as long 
as there is a database persistence layer that can be shared among them:


In particular, since you asked about the registrar: you can use 
`db_mode` 3 with `usrloc` to achieve this persistence:


http://kamailio.org/docs/modules/4.3.x/modules/usrloc.html#usrloc.p.db_mode

That is to say, if multiple Kamailio instances are configured to use the 
same database with usrloc db_mode 3, then any of them can resolve any 
registration binding regardless of which actual proxy it was saved on.


That said, database-based sharing is certainly not the only approach, 
particularly to replication of registration contacts. A few others:


1) Replicate registration messages manually with t_replicate():

http://kamailio.org/docs/modules/4.3.x/modules/tm.html#tm.f.t_replicate

2) Use the `dmq` interprocess messaging bus to replicate the location 
table that way:


http://kamailio.org/docs/modules/4.3.x/modules/dmq_usrloc.html

So, it's fair to say this problem is amply solved in relation to the 
registrar functionality specifically.


If your question was more general: there is no generic Kamailio 
clustering concept that can continuously replicate all internal state 
across multiple proxy instances. In keeping with Kamailio's fairly 
low-level interior, you must choose and implement your own specific 
methodologies for this that are appropriate for the architecture and 
business rules of your applications and services.


-- Alex

--
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
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


Re: [SR-Users] Kamailio Cluster

2016-01-31 Thread Alex Balashov
Although, the core `dmq` module is a big help in providing a 
distribution vehicle for messaging you do wish to replicate into a 
'cluster':


http://kamailio.org/docs/modules/4.3.x/modules/dmq.html#dmq.f.dmq_t_replicate

--
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
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


Re: [SR-Users] Kamailio Cluster

2016-01-31 Thread Alex Balashov

Here's a thought, though:

If your goal is really for users registered on one server to be able to 
easily call users registered on another server, you probably don't care 
to replicate or share the 'location' table per se. You just want one 
Kamailio server to call the right Kamailio server to reach the user's 
native home.


In that case, why not create a database view over a composition of the 
'location' tables of various servers that exposes a map of AoR -> 
socket? You can then query those values with 'sqlops' yourself and 
forward the call to the correct server, which can then do a native lookup().


--
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
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


Re: [SR-Users] Kamailio Cluster

2016-01-31 Thread Aria Mill
I have something similar and I use the following architecture:

NGCP-A-subscribres A||sip trunk between A and B
||NGCP-B-subscribers B
||sip trunk between B and C
|NGCP-C-Subscribers C
||sip trunk between A and C
|NGCP-A-subscribres A

The only thing in my scenario is that Subscriber A can only register in NGCP A. 
...and the same is valid fo B and C
if this is something that will work for you as well email me for more details 
how to set it up!Ari.

 

On Sunday, January 31, 2016 8:06 AM, Gholamreza Sabery 
 wrote:
 

 I am trying to create a cluster of Kamailio servers. I want users that are 
registered on one server to be able to contact and call users on other servers. 
How can I implement this in Kamailio?

PS: My servers are in a private network and I do not have DNS.

___
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


   ___
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


[SR-Users] Kamailio Cluster

2016-01-30 Thread Gholamreza Sabery
I am trying to create a cluster of Kamailio servers. I want users that are
registered on one server to be able to contact and call users on other
servers. How can I implement this in Kamailio?

PS: My servers are in a private network and I do not have DNS.
___
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