Re: [SR-Users] dmq_usrloc writes to database on other nodes too

2021-10-17 Thread Maarten Ureel
True, but I am running our stuff on ECS as containers, so they are all the same.

I'll got with the approach of setting to "in memory" and writing to database 
with custom code, thanks.


Van: Henning Westerholt 
Verzonden: zondag 17 oktober 2021 18:56
Aan: Maarten Ureel ; Kamailio (SER) - Users Mailing List 

Onderwerp: RE: dmq_usrloc writes to database on other nodes too

Hello,

I see. Another idea - you could configure the different servers individually 
regarding the DB writing, e.g. use it only on one server. This would make 
operation obviously different, so it depends on your architecture.

Cheers,

Henning

--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://gilawa.com<https://gilawa.com/>

From: Maarten Ureel mailto:maar...@youreal.eu>>
Sent: Sunday, October 17, 2021 6:10 PM
To: Henning Westerholt mailto:h...@skalatan.de>>; Kamailio 
(SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>
Subject: RE: dmq_usrloc writes to database on other nodes too

Hi Henning

I'm aware of that setting, but we rely on the database for some diagnostic 
tools etc.

So my idea now is to set it to memory-only, and write to database myself upon 
registration, I was just wondering if there was any more "built-in" way.



Van: Henning Westerholt mailto:h...@skalatan.de>>
Verzonden: zondag 17 oktober 2021 13:16
Aan: Kamailio (SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>
CC: Maarten Ureel mailto:maar...@youreal.eu>>
Onderwerp: RE: dmq_usrloc writes to database on other nodes too

Hello,

already tried to configure the usrloc/registrar modules in memory-only mode?

https://www.kamailio.org/docs/modules/5.5.x/modules/usrloc.html#usrloc.p.db_mode

Cheers,

Henning

--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://gilawa.com<https://gilawa.com/>

From: sr-users 
mailto:sr-users-boun...@lists.kamailio.org>>
 On Behalf Of Maarten Ureel
Sent: Friday, October 15, 2021 10:38 AM
To: sr-users@lists.kamailio.org<mailto:sr-users@lists.kamailio.org>
Subject: [SR-Users] dmq_usrloc writes to database on other nodes too

I have the idea that if you enable dmq_usrloc, the other nodes that receive the 
usrloc info, also try to write to database.
We see this by a lot of errors indicating the index violation on postgres.

What is the easiest way to tell Kamailio that it does not need to store the 
usrloc in database if the data came through a DMQ message?

Currently I have in my config:
# DMQ processing
if(is_method("KDMQ") && $Rp == 5090) {
dmq_handle_message();
}


I have understood that no further processing happens then. So is my assumption 
correct that my other handling of REGISTER will not be used then?

As in, can you handle this in code that it will only store the register 
information in memory? Like this?

# Registration handling
route[REGISTRAR] {
# If coming from DMQ, don't save to database
if(dmq_is_from_node()) {
save("location", "0x01")
}
}
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc writes to database on other nodes too

2021-10-17 Thread Maarten Ureel
Hi Henning

I'm aware of that setting, but we rely on the database for some diagnostic 
tools etc.

So my idea now is to set it to memory-only, and write to database myself upon 
registration, I was just wondering if there was any more "built-in" way.



Van: Henning Westerholt 
Verzonden: zondag 17 oktober 2021 13:16
Aan: Kamailio (SER) - Users Mailing List 
CC: Maarten Ureel 
Onderwerp: RE: dmq_usrloc writes to database on other nodes too

Hello,

already tried to configure the usrloc/registrar modules in memory-only mode?

https://www.kamailio.org/docs/modules/5.5.x/modules/usrloc.html#usrloc.p.db_mode

Cheers,

Henning

--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://gilawa.com<https://gilawa.com/>

From: sr-users 
mailto:sr-users-boun...@lists.kamailio.org>>
 On Behalf Of Maarten Ureel
Sent: Friday, October 15, 2021 10:38 AM
To: sr-users@lists.kamailio.org<mailto:sr-users@lists.kamailio.org>
Subject: [SR-Users] dmq_usrloc writes to database on other nodes too

I have the idea that if you enable dmq_usrloc, the other nodes that receive the 
usrloc info, also try to write to database.
We see this by a lot of errors indicating the index violation on postgres.

What is the easiest way to tell Kamailio that it does not need to store the 
usrloc in database if the data came through a DMQ message?

Currently I have in my config:
# DMQ processing
if(is_method("KDMQ") && $Rp == 5090) {
dmq_handle_message();
}


I have understood that no further processing happens then. So is my assumption 
correct that my other handling of REGISTER will not be used then?

As in, can you handle this in code that it will only store the register 
information in memory? Like this?

# Registration handling
route[REGISTRAR] {
# If coming from DMQ, don't save to database
if(dmq_is_from_node()) {
save("location", "0x01")
}
}
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc writes to database on other nodes too

2021-10-17 Thread Henning Westerholt
Hello,

I see. Another idea - you could configure the different servers individually 
regarding the DB writing, e.g. use it only on one server. This would make 
operation obviously different, so it depends on your architecture.

Cheers,

Henning

--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://gilawa.com<https://gilawa.com/>

From: Maarten Ureel 
Sent: Sunday, October 17, 2021 6:10 PM
To: Henning Westerholt ; Kamailio (SER) - Users Mailing List 

Subject: RE: dmq_usrloc writes to database on other nodes too

Hi Henning

I'm aware of that setting, but we rely on the database for some diagnostic 
tools etc.

So my idea now is to set it to memory-only, and write to database myself upon 
registration, I was just wondering if there was any more "built-in" way.



Van: Henning Westerholt mailto:h...@skalatan.de>>
Verzonden: zondag 17 oktober 2021 13:16
Aan: Kamailio (SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>
CC: Maarten Ureel mailto:maar...@youreal.eu>>
Onderwerp: RE: dmq_usrloc writes to database on other nodes too

Hello,

already tried to configure the usrloc/registrar modules in memory-only mode?

https://www.kamailio.org/docs/modules/5.5.x/modules/usrloc.html#usrloc.p.db_mode

Cheers,

Henning

--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://gilawa.com<https://gilawa.com/>

From: sr-users 
mailto:sr-users-boun...@lists.kamailio.org>>
 On Behalf Of Maarten Ureel
Sent: Friday, October 15, 2021 10:38 AM
To: sr-users@lists.kamailio.org<mailto:sr-users@lists.kamailio.org>
Subject: [SR-Users] dmq_usrloc writes to database on other nodes too

I have the idea that if you enable dmq_usrloc, the other nodes that receive the 
usrloc info, also try to write to database.
We see this by a lot of errors indicating the index violation on postgres.

What is the easiest way to tell Kamailio that it does not need to store the 
usrloc in database if the data came through a DMQ message?

Currently I have in my config:
# DMQ processing
if(is_method("KDMQ") && $Rp == 5090) {
dmq_handle_message();
}


I have understood that no further processing happens then. So is my assumption 
correct that my other handling of REGISTER will not be used then?

As in, can you handle this in code that it will only store the register 
information in memory? Like this?

# Registration handling
route[REGISTRAR] {
# If coming from DMQ, don't save to database
if(dmq_is_from_node()) {
save("location", "0x01")
}
}
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc writes to database on other nodes too

2021-10-17 Thread Henning Westerholt
Hello,

already tried to configure the usrloc/registrar modules in memory-only mode?

https://www.kamailio.org/docs/modules/5.5.x/modules/usrloc.html#usrloc.p.db_mode

Cheers,

Henning

--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://gilawa.com<https://gilawa.com/>

From: sr-users  On Behalf Of Maarten Ureel
Sent: Friday, October 15, 2021 10:38 AM
To: sr-users@lists.kamailio.org
Subject: [SR-Users] dmq_usrloc writes to database on other nodes too

I have the idea that if you enable dmq_usrloc, the other nodes that receive the 
usrloc info, also try to write to database.
We see this by a lot of errors indicating the index violation on postgres.

What is the easiest way to tell Kamailio that it does not need to store the 
usrloc in database if the data came through a DMQ message?

Currently I have in my config:
# DMQ processing
if(is_method("KDMQ") && $Rp == 5090) {
dmq_handle_message();
}


I have understood that no further processing happens then. So is my assumption 
correct that my other handling of REGISTER will not be used then?

As in, can you handle this in code that it will only store the register 
information in memory? Like this?

# Registration handling
route[REGISTRAR] {
# If coming from DMQ, don't save to database
if(dmq_is_from_node()) {
save("location", "0x01")
}
}
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] dmq_usrloc writes to database on other nodes too

2021-10-15 Thread Maarten Ureel
I have the idea that if you enable dmq_usrloc, the other nodes that receive the 
usrloc info, also try to write to database.
We see this by a lot of errors indicating the index violation on postgres.

What is the easiest way to tell Kamailio that it does not need to store the 
usrloc in database if the data came through a DMQ message?

Currently I have in my config:
# DMQ processing
if(is_method("KDMQ") && $Rp == 5090) {
dmq_handle_message();
}


I have understood that no further processing happens then. So is my assumption 
correct that my other handling of REGISTER will not be used then?

As in, can you handle this in code that it will only store the register 
information in memory? Like this?

# Registration handling
route[REGISTRAR] {
# If coming from DMQ, don't save to database
if(dmq_is_from_node()) {
save("location", "0x01")
}
}
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DMQ_USRLOC module and calls

2021-07-13 Thread Social Boh

Hello Alex,

thank you for your answer... now I understand a little bit more.

Thank you

Reagrds

---
I'm SoCIaL, MayBe

El 13/07/2021 a las 3:40 p. m., Alex Balashov escribió:
No, you don’t need to, but it is a vastly superior replication 
mechanism to database replication. It was created in order to get 
around some of the common technical and architectural limitations of 
the database replication pattern.


—
Sent from mobile, with due apologies for brevity and errors.


On Jul 13, 2021, at 4:37 PM, Social Boh  wrote:



Hello,

 in an active/stanby kamailio setup with keepalived I'm using 
Database replication primary/primary so I don't need DMQ_USRLOC


I'm testing just now and when active kamailio go down, I can make 
calls between extensions without connection problems with the stanby 
kamailio.


So my question is: where I "NEED" to use DMQ_USRLOC?

Regards

---
I'm SoCIaL, MayBe
El 13/07/2021 a las 9:48 a. m., Barry Flanagan escribió:

On 13/07/2021 15:41, Social Boh wrote:

Hello,

If I have to use path protocol or other routing logic to share 
REGISTER between the Two Kamailio so I can call From USERA on 
KamailioA to USERB on KamailioB, I think I don't need to still use 
DMQ_USRLOC module.


Can you offer a practical use of this module, please?



For example, if you had an active/standby kamailio setup with a 
floating IP managed by e.g. Keepalived then when a failover event 
occurs, the usrloc is up to date and the failover is completely 
transparent.


Hope this helps

-Barry Flanagan



Thank you

Regards

---
I'm SoCIaL, MayBe

El 13/07/2021 a las 9:01 a. m., Alex Balashov escribió:
To replicate knowledge of the registration contact bindings 
automatically.


It doesn’t provide magic routing to reach them. It just shares the 
knowledge. :-)


—
Sent from mobile, with due apologies for brevity and errors.


On Jul 13, 2021, at 9:46 AM, Social Boh  wrote:

If I have to use Path or other solution, which is the main idea 
behind the DMQ_USRLOC module?


Regards

---
I'm SoCIaL, MayBe


El 13/07/2021 a las 8:36 a. m., Alex Balashov escribió:
Yes, you need the Path module and special logic for lateral 
routing of requests received from A and transiting through a 
Path hop of B.


—
Sent from mobile, with due apologies for brevity and errors.

On Jul 13, 2021, at 8:47 AM, Social Boh  
wrote:

Hello,

I'm testing DMQ_USRLOC modulo between two Kamailio servers (A) 
and (B)


The two servers share the same domain and using Amazon Route53 
to distributes 50% requests each Server.


The problem is when I try to make a call from user A 
(registered on kamailio A) and the user B (registered on 
Kamailio B).


The call follow this flow:

User A --> KamailioA --> UserB

go directly to userB because KamailioA know, via DMQ_USRLOC IP 
and port of UserB. With some Softphone the call work with audio 
without problem; with other Softphone USERB never answer the 
INVITE sends from Kamailio. Is it possible use this flow?


USER A --> KamailioA --> KamailioB --> User B

to resolve this kind of problem or is there other available 
option?


Thank you

--
---
I'm SoCIaL, MayBe


__
Kamailio - Users Mailing List - Non Commercial Discussions
* sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not 
reply only to the sender!

Edit mailing list options or unsubscribe:
* https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

__
Kamailio - Users Mailing List - Non Commercial Discussions
   * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply 
only to the sender!

Edit mailing list options or unsubscribe:
   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

__
Kamailio - Users Mailing List - Non Commercial Discussions
   * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply 
only to the sender!

Edit mailing list options or unsubscribe:
   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


__
Kamailio - Users Mailing List - Non Commercial Discussions
 * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply 
only to the sender!

Edit mailing list options or unsubscribe:
 * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users



__
Kamailio - Users Mailing List - Non Commercial Discussions
 * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only 
to the sender!

Edit mailing list options or unsubscribe:
 * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


__
Kamailio - Users Mailing List - Non Commercial Discussions
   * 

Re: [SR-Users] DMQ_USRLOC module and calls

2021-07-13 Thread Alex Balashov
No, you don’t need to, but it is a vastly superior replication mechanism to 
database replication. It was created in order to get around some of the common 
technical and architectural limitations of the database replication pattern.

—
Sent from mobile, with due apologies for brevity and errors.

> On Jul 13, 2021, at 4:37 PM, Social Boh  wrote:
> 
> 
> Hello,
> 
>  in an active/stanby kamailio setup with keepalived I'm using Database 
> replication primary/primary so I don't need DMQ_USRLOC
> 
> I'm testing just now and when active kamailio go down, I can make calls 
> between extensions without connection problems with the stanby kamailio.
> 
> So my question is: where I "NEED" to use DMQ_USRLOC?
> 
> Regards
> 
> ---
> I'm SoCIaL, MayBe
> El 13/07/2021 a las 9:48 a. m., Barry Flanagan escribió:
>> On 13/07/2021 15:41, Social Boh wrote: 
>>> Hello, 
>>> 
>>> If I have to use path protocol or other routing logic to share REGISTER 
>>> between the Two Kamailio so I can call From USERA on KamailioA to USERB on 
>>> KamailioB, I think I don't need to still use DMQ_USRLOC module. 
>>> 
>>> Can you offer a practical use of this module, please? 
>> 
>> 
>> For example, if you had an active/standby kamailio setup with a floating IP 
>> managed by e.g. Keepalived then when a failover event occurs, the usrloc is 
>> up to date and the failover is completely transparent. 
>> 
>> Hope this helps 
>> 
>> -Barry Flanagan 
>> 
>>> 
>>> Thank you 
>>> 
>>> Regards 
>>> 
>>> --- 
>>> I'm SoCIaL, MayBe 
>>> 
 El 13/07/2021 a las 9:01 a. m., Alex Balashov escribió: 
 To replicate knowledge of the registration contact bindings automatically. 
 
 It doesn’t provide magic routing to reach them. It just shares the 
 knowledge. :-) 
 
 — 
 Sent from mobile, with due apologies for brevity and errors. 
 
> On Jul 13, 2021, at 9:46 AM, Social Boh  wrote: 
> 
> If I have to use Path or other solution, which is the main idea behind 
> the DMQ_USRLOC module? 
> 
> Regards 
> 
> --- 
> I'm SoCIaL, MayBe 
> 
>> El 13/07/2021 a las 8:36 a. m., Alex Balashov escribió: 
>> Yes, you need the Path module and special logic for lateral routing of 
>> requests received from A and transiting through a Path hop of B. 
>> 
>> — 
>> Sent from mobile, with due apologies for brevity and errors. 
>> 
 On Jul 13, 2021, at 8:47 AM, Social Boh  wrote: 
>>> Hello, 
>>> 
>>> I'm testing DMQ_USRLOC modulo between two Kamailio servers (A) and (B) 
>>> 
>>> The two servers share the same domain and using Amazon Route53 to 
>>> distributes 50% requests each Server. 
>>> 
>>> The problem is when I try to make a call from user A (registered on 
>>> kamailio A) and the user B (registered on Kamailio B). 
>>> 
>>> The call follow this flow: 
>>> 
>>> User A --> KamailioA --> UserB 
>>> 
>>> go directly to userB because KamailioA know, via DMQ_USRLOC IP and port 
>>> of UserB. With some Softphone the call work with audio without problem; 
>>> with other Softphone USERB never answer the INVITE sends from Kamailio. 
>>> Is it possible use this flow? 
>>> 
>>> USER A --> KamailioA --> KamailioB --> User B 
>>> 
>>> to resolve this kind of problem or is there other available option? 
>>> 
>>> Thank you 
>>> 
>>> -- 
>>> --- 
>>> I'm SoCIaL, MayBe 
>>> 
>>> 
>>> __ 
>>> Kamailio - Users Mailing List - Non Commercial Discussions 
>>> * sr-users@lists.kamailio.org 
>>> Important: keep the mailing list in the recipients, do not reply only 
>>> to the sender! 
>>> Edit mailing list options or unsubscribe:
>>> * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users 
>> __ 
>> Kamailio - Users Mailing List - Non Commercial Discussions 
>>* sr-users@lists.kamailio.org 
>> Important: keep the mailing list in the recipients, do not reply only to 
>> the sender! 
>> Edit mailing list options or unsubscribe: 
>>* https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users 
 __ 
 Kamailio - Users Mailing List - Non Commercial Discussions 
* sr-users@lists.kamailio.org 
 Important: keep the mailing list in the recipients, do not reply only to 
 the sender! 
 Edit mailing list options or unsubscribe: 
* https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users 
>>> 
>>> __ 
>>> Kamailio - Users Mailing List - Non Commercial Discussions 
>>>  * sr-users@lists.kamailio.org 
>>> Important: keep the mailing list in the recipients, do not reply only to 
>>> the sender!
>>> Edit mailing list options or unsubscribe: 
>>>  * 

Re: [SR-Users] DMQ_USRLOC module and calls

2021-07-13 Thread Social Boh

Hello,

 in an active/stanby kamailio setup with keepalived I'm using Database 
replication primary/primary so I don't need DMQ_USRLOC


I'm testing just now and when active kamailio go down, I can make calls 
between extensions without connection problems with the stanby kamailio.


So my question is: where I "NEED" to use DMQ_USRLOC?

Regards

---
I'm SoCIaL, MayBe

El 13/07/2021 a las 9:48 a. m., Barry Flanagan escribió:

On 13/07/2021 15:41, Social Boh wrote:

Hello,

If I have to use path protocol or other routing logic to share 
REGISTER between the Two Kamailio so I can call From USERA on 
KamailioA to USERB on KamailioB, I think I don't need to still use 
DMQ_USRLOC module.


Can you offer a practical use of this module, please?



For example, if you had an active/standby kamailio setup with a 
floating IP managed by e.g. Keepalived then when a failover event 
occurs, the usrloc is up to date and the failover is completely 
transparent.


Hope this helps

-Barry Flanagan



Thank you

Regards

---
I'm SoCIaL, MayBe

El 13/07/2021 a las 9:01 a. m., Alex Balashov escribió:
To replicate knowledge of the registration contact bindings 
automatically.


It doesn’t provide magic routing to reach them. It just shares the 
knowledge. :-)


—
Sent from mobile, with due apologies for brevity and errors.


On Jul 13, 2021, at 9:46 AM, Social Boh  wrote:

If I have to use Path or other solution, which is the main idea 
behind the DMQ_USRLOC module?


Regards

---
I'm SoCIaL, MayBe


El 13/07/2021 a las 8:36 a. m., Alex Balashov escribió:
Yes, you need the Path module and special logic for lateral 
routing of requests received from A and transiting through a Path 
hop of B.


—
Sent from mobile, with due apologies for brevity and errors.


On Jul 13, 2021, at 8:47 AM, Social Boh  wrote:

Hello,

I'm testing DMQ_USRLOC modulo between two Kamailio servers (A) 
and (B)


The two servers share the same domain and using Amazon Route53 to 
distributes 50% requests each Server.


The problem is when I try to make a call from user A (registered 
on kamailio A) and the user B (registered on Kamailio B).


The call follow this flow:

User A --> KamailioA --> UserB

go directly to userB because KamailioA know, via DMQ_USRLOC IP 
and port of UserB. With some Softphone the call work with audio 
without problem; with other Softphone USERB never answer the 
INVITE sends from Kamailio. Is it possible use this flow?


USER A --> KamailioA --> KamailioB --> User B

to resolve this kind of problem or is there other available option?

Thank you

--
---
I'm SoCIaL, MayBe


__
Kamailio - Users Mailing List - Non Commercial Discussions
* sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply 
only to the sender!

Edit mailing list options or unsubscribe:
* https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

__
Kamailio - Users Mailing List - Non Commercial Discussions
   * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply 
only to the sender!

Edit mailing list options or unsubscribe:
   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

__
Kamailio - Users Mailing List - Non Commercial Discussions
   * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply 
only to the sender!

Edit mailing list options or unsubscribe:
   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


__
Kamailio - Users Mailing List - Non Commercial Discussions
 * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only 
to the sender!

Edit mailing list options or unsubscribe:
 * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DMQ_USRLOC module and calls

2021-07-13 Thread E. Schmidbauer
I usually put an "edge" proxy (another set of kamailio instances) in front
of sip registrars. the edge proxies add the path header, this allows your
sip registrars to remain "connectionless" to the UAC.
This allows an INVITE to be sent to the UAC from any sip registrar in your
cluster, the user location data will have a "path" value which tells which
edge proxy to use when trying to reach the UAC.

On Tue, Jul 13, 2021 at 11:32 AM Alex Balashov 
wrote:

> On 7/13/21 11:26 AM, Social Boh wrote:
>
> > Sorry,
> >
> > I explained myself wrong. I know how using PATH and what PATH do.
>
> Your question was:
>
> "Is it possible use this flow?
>
> USER A --> KamailioA --> KamailioB --> User B
>
> to resolve this kind of problem or is there other available option?"
>
>
> And Path is the answer.
>
> -- Alex
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DMQ_USRLOC module and calls

2021-07-13 Thread Alex Balashov

On 7/13/21 11:26 AM, Social Boh wrote:


Sorry,

I explained myself wrong. I know how using PATH and what PATH do.


Your question was:

"Is it possible use this flow?

USER A --> KamailioA --> KamailioB --> User B

to resolve this kind of problem or is there other available option?"


And Path is the answer.

-- Alex

--
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

__
Kamailio - Users Mailing List - Non Commercial Discussions
 * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
 * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DMQ_USRLOC module and calls

2021-07-13 Thread Social Boh

Sorry,

I explained myself wrong. I know how using PATH and what PATH do.

Thank you

Regards

---
I'm SoCIaL, MayBe

El 13/07/2021 a las 10:02 a. m., Alex Balashov escribió:

Path doesn’t share registrations. It just allows routing from B back through A 
in order to reach the endpoint, rather than trying to reach the endpoint 
directly. It’s just a header that says “when contacting this registrant, 
hop/detour through the original registrant”.

But, Path doesn’t do anything else. So, if you want registrar B to know that 
the registrant is registered anywhere at all — A or B — and the Contact/URI at 
which to reach it (whether directly or through a Path hop), you need some means 
of replicating the registration database. dmq_usrloc provides this aspect.

Path and dmq_usrloc do entirely different things, of different degrees of 
significance to the overall process. The “heavy” part is done by 
usrloc/dmq_usrloc.

—
Sent from mobile, with due apologies for brevity and errors.


On Jul 13, 2021, at 10:43 AM, Social Boh  wrote:

Hello,

If I have to use path protocol or other routing logic to share REGISTER between 
the Two Kamailio so I can call From USERA on KamailioA to USERB on KamailioB, I 
think I don't need to still use DMQ_USRLOC module.

Can you offer a practical use of this module, please?

Thank you

Regards

---
I'm SoCIaL, MayBe


El 13/07/2021 a las 9:01 a. m., Alex Balashov escribió:
To replicate knowledge of the registration contact bindings automatically.

It doesn’t provide magic routing to reach them. It just shares the knowledge. 
:-)

—
Sent from mobile, with due apologies for brevity and errors.


On Jul 13, 2021, at 9:46 AM, Social Boh  wrote:

If I have to use Path or other solution, which is the main idea behind the 
DMQ_USRLOC module?

Regards

---
I'm SoCIaL, MayBe


El 13/07/2021 a las 8:36 a. m., Alex Balashov escribió:
Yes, you need the Path module and special logic for lateral routing of requests 
received from A and transiting through a Path hop of B.

—
Sent from mobile, with due apologies for brevity and errors.


On Jul 13, 2021, at 8:47 AM, Social Boh  wrote:

Hello,

I'm testing DMQ_USRLOC modulo between two Kamailio servers (A) and (B)

The two servers share the same domain and using Amazon Route53 to distributes 
50% requests each Server.

The problem is when I try to make a call from user A (registered on kamailio A) 
and the user B (registered on Kamailio B).

The call follow this flow:

User A --> KamailioA --> UserB

go directly to userB because KamailioA know, via DMQ_USRLOC IP and port of 
UserB. With some Softphone the call work with audio without problem; with other 
Softphone USERB never answer the INVITE sends from Kamailio. Is it possible use 
this flow?

USER A --> KamailioA --> KamailioB --> User B

to resolve this kind of problem or is there other available option?

Thank you

--
---
I'm SoCIaL, MayBe


__
Kamailio - Users Mailing List - Non Commercial Discussions
* sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
* https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

__
Kamailio - Users Mailing List - Non Commercial Discussions
   * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

__
Kamailio - Users Mailing List - Non Commercial Discussions
   * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

__
Kamailio - Users Mailing List - Non Commercial Discussions
* sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
* https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

__
Kamailio - Users Mailing List - Non Commercial Discussions
   * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DMQ_USRLOC module and calls

2021-07-13 Thread Social Boh

Thank you Barry,

I'll try.

Regards

---
I'm SoCIaL, MayBe

El 13/07/2021 a las 9:48 a. m., Barry Flanagan escribió:

On 13/07/2021 15:41, Social Boh wrote:

Hello,

If I have to use path protocol or other routing logic to share 
REGISTER between the Two Kamailio so I can call From USERA on 
KamailioA to USERB on KamailioB, I think I don't need to still use 
DMQ_USRLOC module.


Can you offer a practical use of this module, please?



For example, if you had an active/standby kamailio setup with a 
floating IP managed by e.g. Keepalived then when a failover event 
occurs, the usrloc is up to date and the failover is completely 
transparent.


Hope this helps

-Barry Flanagan



Thank you

Regards

---
I'm SoCIaL, MayBe

El 13/07/2021 a las 9:01 a. m., Alex Balashov escribió:
To replicate knowledge of the registration contact bindings 
automatically.


It doesn’t provide magic routing to reach them. It just shares the 
knowledge. :-)


—
Sent from mobile, with due apologies for brevity and errors.


On Jul 13, 2021, at 9:46 AM, Social Boh  wrote:

If I have to use Path or other solution, which is the main idea 
behind the DMQ_USRLOC module?


Regards

---
I'm SoCIaL, MayBe


El 13/07/2021 a las 8:36 a. m., Alex Balashov escribió:
Yes, you need the Path module and special logic for lateral 
routing of requests received from A and transiting through a Path 
hop of B.


—
Sent from mobile, with due apologies for brevity and errors.


On Jul 13, 2021, at 8:47 AM, Social Boh  wrote:

Hello,

I'm testing DMQ_USRLOC modulo between two Kamailio servers (A) 
and (B)


The two servers share the same domain and using Amazon Route53 to 
distributes 50% requests each Server.


The problem is when I try to make a call from user A (registered 
on kamailio A) and the user B (registered on Kamailio B).


The call follow this flow:

User A --> KamailioA --> UserB

go directly to userB because KamailioA know, via DMQ_USRLOC IP 
and port of UserB. With some Softphone the call work with audio 
without problem; with other Softphone USERB never answer the 
INVITE sends from Kamailio. Is it possible use this flow?


USER A --> KamailioA --> KamailioB --> User B

to resolve this kind of problem or is there other available option?

Thank you

--
---
I'm SoCIaL, MayBe


__
Kamailio - Users Mailing List - Non Commercial Discussions
* sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply 
only to the sender!

Edit mailing list options or unsubscribe:
* https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

__
Kamailio - Users Mailing List - Non Commercial Discussions
   * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply 
only to the sender!

Edit mailing list options or unsubscribe:
   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

__
Kamailio - Users Mailing List - Non Commercial Discussions
   * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply 
only to the sender!

Edit mailing list options or unsubscribe:
   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


__
Kamailio - Users Mailing List - Non Commercial Discussions
 * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only 
to the sender!

Edit mailing list options or unsubscribe:
 * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DMQ_USRLOC module and calls

2021-07-13 Thread Alex Balashov
Path doesn’t share registrations. It just allows routing from B back through A 
in order to reach the endpoint, rather than trying to reach the endpoint 
directly. It’s just a header that says “when contacting this registrant, 
hop/detour through the original registrant”.

But, Path doesn’t do anything else. So, if you want registrar B to know that 
the registrant is registered anywhere at all — A or B — and the Contact/URI at 
which to reach it (whether directly or through a Path hop), you need some means 
of replicating the registration database. dmq_usrloc provides this aspect.

Path and dmq_usrloc do entirely different things, of different degrees of 
significance to the overall process. The “heavy” part is done by 
usrloc/dmq_usrloc.

—
Sent from mobile, with due apologies for brevity and errors.

> On Jul 13, 2021, at 10:43 AM, Social Boh  wrote:
> 
> Hello,
> 
> If I have to use path protocol or other routing logic to share REGISTER 
> between the Two Kamailio so I can call From USERA on KamailioA to USERB on 
> KamailioB, I think I don't need to still use DMQ_USRLOC module.
> 
> Can you offer a practical use of this module, please?
> 
> Thank you
> 
> Regards
> 
> ---
> I'm SoCIaL, MayBe
> 
>> El 13/07/2021 a las 9:01 a. m., Alex Balashov escribió:
>> To replicate knowledge of the registration contact bindings automatically.
>> 
>> It doesn’t provide magic routing to reach them. It just shares the 
>> knowledge. :-)
>> 
>> —
>> Sent from mobile, with due apologies for brevity and errors.
>> 
 On Jul 13, 2021, at 9:46 AM, Social Boh  wrote:
>>> 
>>> If I have to use Path or other solution, which is the main idea behind the 
>>> DMQ_USRLOC module?
>>> 
>>> Regards
>>> 
>>> ---
>>> I'm SoCIaL, MayBe
>>> 
 El 13/07/2021 a las 8:36 a. m., Alex Balashov escribió:
 Yes, you need the Path module and special logic for lateral routing of 
 requests received from A and transiting through a Path hop of B.
 
 —
 Sent from mobile, with due apologies for brevity and errors.
 
>> On Jul 13, 2021, at 8:47 AM, Social Boh  wrote:
> Hello,
> 
> I'm testing DMQ_USRLOC modulo between two Kamailio servers (A) and (B)
> 
> The two servers share the same domain and using Amazon Route53 to 
> distributes 50% requests each Server.
> 
> The problem is when I try to make a call from user A (registered on 
> kamailio A) and the user B (registered on Kamailio B).
> 
> The call follow this flow:
> 
> User A --> KamailioA --> UserB
> 
> go directly to userB because KamailioA know, via DMQ_USRLOC IP and port 
> of UserB. With some Softphone the call work with audio without problem; 
> with other Softphone USERB never answer the INVITE sends from Kamailio. 
> Is it possible use this flow?
> 
> USER A --> KamailioA --> KamailioB --> User B
> 
> to resolve this kind of problem or is there other available option?
> 
> Thank you
> 
> -- 
> ---
> I'm SoCIaL, MayBe
> 
> 
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to 
> the sender!
> Edit mailing list options or unsubscribe:
> * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
 __
 Kamailio - Users Mailing List - Non Commercial Discussions
   * sr-users@lists.kamailio.org
 Important: keep the mailing list in the recipients, do not reply only to 
 the sender!
 Edit mailing list options or unsubscribe:
   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>> __
>> Kamailio - Users Mailing List - Non Commercial Discussions
>>   * sr-users@lists.kamailio.org
>> Important: keep the mailing list in the recipients, do not reply only to the 
>> sender!
>> Edit mailing list options or unsubscribe:
>>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> 
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the 
> sender!
> Edit mailing list options or unsubscribe:
> * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DMQ_USRLOC module and calls

2021-07-13 Thread Barry Flanagan

On 13/07/2021 15:41, Social Boh wrote:

Hello,

If I have to use path protocol or other routing logic to share 
REGISTER between the Two Kamailio so I can call From USERA on 
KamailioA to USERB on KamailioB, I think I don't need to still use 
DMQ_USRLOC module.


Can you offer a practical use of this module, please?



For example, if you had an active/standby kamailio setup with a floating 
IP managed by e.g. Keepalived then when a failover event occurs, the 
usrloc is up to date and the failover is completely transparent.


Hope this helps

-Barry Flanagan



Thank you

Regards

---
I'm SoCIaL, MayBe

El 13/07/2021 a las 9:01 a. m., Alex Balashov escribió:
To replicate knowledge of the registration contact bindings 
automatically.


It doesn’t provide magic routing to reach them. It just shares the 
knowledge. :-)


—
Sent from mobile, with due apologies for brevity and errors.


On Jul 13, 2021, at 9:46 AM, Social Boh  wrote:

If I have to use Path or other solution, which is the main idea 
behind the DMQ_USRLOC module?


Regards

---
I'm SoCIaL, MayBe


El 13/07/2021 a las 8:36 a. m., Alex Balashov escribió:
Yes, you need the Path module and special logic for lateral routing 
of requests received from A and transiting through a Path hop of B.


—
Sent from mobile, with due apologies for brevity and errors.


On Jul 13, 2021, at 8:47 AM, Social Boh  wrote:

Hello,

I'm testing DMQ_USRLOC modulo between two Kamailio servers (A) and 
(B)


The two servers share the same domain and using Amazon Route53 to 
distributes 50% requests each Server.


The problem is when I try to make a call from user A (registered 
on kamailio A) and the user B (registered on Kamailio B).


The call follow this flow:

User A --> KamailioA --> UserB

go directly to userB because KamailioA know, via DMQ_USRLOC IP and 
port of UserB. With some Softphone the call work with audio 
without problem; with other Softphone USERB never answer the 
INVITE sends from Kamailio. Is it possible use this flow?


USER A --> KamailioA --> KamailioB --> User B

to resolve this kind of problem or is there other available option?

Thank you

--
---
I'm SoCIaL, MayBe


__
Kamailio - Users Mailing List - Non Commercial Discussions
* sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply 
only to the sender!

Edit mailing list options or unsubscribe:
* https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

__
Kamailio - Users Mailing List - Non Commercial Discussions
   * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply 
only to the sender!

Edit mailing list options or unsubscribe:
   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

__
Kamailio - Users Mailing List - Non Commercial Discussions
   * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only 
to the sender!

Edit mailing list options or unsubscribe:
   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


__
Kamailio - Users Mailing List - Non Commercial Discussions
 * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only 
to the sender!

Edit mailing list options or unsubscribe:
 * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


--
-Barry



OpenPGP_0xB1C81B216B50A825.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DMQ_USRLOC module and calls

2021-07-13 Thread Social Boh

Hello,

If I have to use path protocol or other routing logic to share REGISTER 
between the Two Kamailio so I can call From USERA on KamailioA to USERB 
on KamailioB, I think I don't need to still use DMQ_USRLOC module.


Can you offer a practical use of this module, please?

Thank you

Regards

---
I'm SoCIaL, MayBe

El 13/07/2021 a las 9:01 a. m., Alex Balashov escribió:

To replicate knowledge of the registration contact bindings automatically.

It doesn’t provide magic routing to reach them. It just shares the knowledge. 
:-)

—
Sent from mobile, with due apologies for brevity and errors.


On Jul 13, 2021, at 9:46 AM, Social Boh  wrote:

If I have to use Path or other solution, which is the main idea behind the 
DMQ_USRLOC module?

Regards

---
I'm SoCIaL, MayBe


El 13/07/2021 a las 8:36 a. m., Alex Balashov escribió:
Yes, you need the Path module and special logic for lateral routing of requests 
received from A and transiting through a Path hop of B.

—
Sent from mobile, with due apologies for brevity and errors.


On Jul 13, 2021, at 8:47 AM, Social Boh  wrote:

Hello,

I'm testing DMQ_USRLOC modulo between two Kamailio servers (A) and (B)

The two servers share the same domain and using Amazon Route53 to distributes 
50% requests each Server.

The problem is when I try to make a call from user A (registered on kamailio A) 
and the user B (registered on Kamailio B).

The call follow this flow:

User A --> KamailioA --> UserB

go directly to userB because KamailioA know, via DMQ_USRLOC IP and port of 
UserB. With some Softphone the call work with audio without problem; with other 
Softphone USERB never answer the INVITE sends from Kamailio. Is it possible use 
this flow?

USER A --> KamailioA --> KamailioB --> User B

to resolve this kind of problem or is there other available option?

Thank you

--
---
I'm SoCIaL, MayBe


__
Kamailio - Users Mailing List - Non Commercial Discussions
* sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
* https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

__
Kamailio - Users Mailing List - Non Commercial Discussions
   * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

__
Kamailio - Users Mailing List - Non Commercial Discussions
   * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


__
Kamailio - Users Mailing List - Non Commercial Discussions
 * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
 * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DMQ_USRLOC module and calls

2021-07-13 Thread Alex Balashov
To replicate knowledge of the registration contact bindings automatically. 

It doesn’t provide magic routing to reach them. It just shares the knowledge. 
:-)

—
Sent from mobile, with due apologies for brevity and errors.

> On Jul 13, 2021, at 9:46 AM, Social Boh  wrote:
> 
> If I have to use Path or other solution, which is the main idea behind the 
> DMQ_USRLOC module?
> 
> Regards
> 
> ---
> I'm SoCIaL, MayBe
> 
>> El 13/07/2021 a las 8:36 a. m., Alex Balashov escribió:
>> Yes, you need the Path module and special logic for lateral routing of 
>> requests received from A and transiting through a Path hop of B.
>> 
>> —
>> Sent from mobile, with due apologies for brevity and errors.
>> 
 On Jul 13, 2021, at 8:47 AM, Social Boh  wrote:
>>> 
>>> Hello,
>>> 
>>> I'm testing DMQ_USRLOC modulo between two Kamailio servers (A) and (B)
>>> 
>>> The two servers share the same domain and using Amazon Route53 to 
>>> distributes 50% requests each Server.
>>> 
>>> The problem is when I try to make a call from user A (registered on 
>>> kamailio A) and the user B (registered on Kamailio B).
>>> 
>>> The call follow this flow:
>>> 
>>> User A --> KamailioA --> UserB
>>> 
>>> go directly to userB because KamailioA know, via DMQ_USRLOC IP and port of 
>>> UserB. With some Softphone the call work with audio without problem; with 
>>> other Softphone USERB never answer the INVITE sends from Kamailio. Is it 
>>> possible use this flow?
>>> 
>>> USER A --> KamailioA --> KamailioB --> User B
>>> 
>>> to resolve this kind of problem or is there other available option?
>>> 
>>> Thank you
>>> 
>>> -- 
>>> ---
>>> I'm SoCIaL, MayBe
>>> 
>>> 
>>> __
>>> Kamailio - Users Mailing List - Non Commercial Discussions
>>> * sr-users@lists.kamailio.org
>>> Important: keep the mailing list in the recipients, do not reply only to 
>>> the sender!
>>> Edit mailing list options or unsubscribe:
>>> * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>> __
>> Kamailio - Users Mailing List - Non Commercial Discussions
>>   * sr-users@lists.kamailio.org
>> Important: keep the mailing list in the recipients, do not reply only to the 
>> sender!
>> Edit mailing list options or unsubscribe:
>>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DMQ_USRLOC module and calls

2021-07-13 Thread Social Boh
If I have to use Path or other solution, which is the main idea behind 
the DMQ_USRLOC module?


Regards

---
I'm SoCIaL, MayBe

El 13/07/2021 a las 8:36 a. m., Alex Balashov escribió:

Yes, you need the Path module and special logic for lateral routing of requests 
received from A and transiting through a Path hop of B.

—
Sent from mobile, with due apologies for brevity and errors.


On Jul 13, 2021, at 8:47 AM, Social Boh  wrote:

Hello,

I'm testing DMQ_USRLOC modulo between two Kamailio servers (A) and (B)

The two servers share the same domain and using Amazon Route53 to distributes 
50% requests each Server.

The problem is when I try to make a call from user A (registered on kamailio A) 
and the user B (registered on Kamailio B).

The call follow this flow:

User A --> KamailioA --> UserB

go directly to userB because KamailioA know, via DMQ_USRLOC IP and port of 
UserB. With some Softphone the call work with audio without problem; with other 
Softphone USERB never answer the INVITE sends from Kamailio. Is it possible use 
this flow?

USER A --> KamailioA --> KamailioB --> User B

to resolve this kind of problem or is there other available option?

Thank you

--
---
I'm SoCIaL, MayBe


__
Kamailio - Users Mailing List - Non Commercial Discussions
* sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
* https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

__
Kamailio - Users Mailing List - Non Commercial Discussions
   * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


__
Kamailio - Users Mailing List - Non Commercial Discussions
 * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
 * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DMQ_USRLOC module and calls

2021-07-13 Thread Social Boh

Thank you Olle to take time to answer my question.

So the solution is send the INVITE from the same Kamailio where the 
device registered.


The question now is: How Can I do that taking advantage of DMQ_USRLOC 
module?


Thank you

Regards

---
I'm SoCIaL, MayBe

El 13/07/2021 a las 8:04 a. m., Olle E. Johansson escribió:



On 13 Jul 2021, at 14:46, Social Boh  wrote:

Hello,

I'm testing DMQ_USRLOC modulo between two Kamailio servers (A) and (B)

The two servers share the same domain and using Amazon Route53 to distributes 
50% requests each Server.

The problem is when I try to make a call from user A (registered on kamailio A) 
and the user B (registered on Kamailio B).

The call follow this flow:

User A --> KamailioA --> UserB

go directly to userB because KamailioA know, via DMQ_USRLOC IP and port of 
UserB. With some Softphone the call work with audio without problem; with other 
Softphone USERB never answer the INVITE sends from Kamailio. Is it possible use 
this flow?

USER A --> KamailioA --> KamailioB --> User B

to resolve this kind of problem or is there other available option?

If the softphone is behind NAT it has a relation to one IP address in the NAT. 
You need to send the INVITE from that IP and no other IP in order to reach the 
device. Even without NAT, many devices just don’t respond to messages from 
unknown IP addresses.

/O
__
Kamailio - Users Mailing List - Non Commercial Discussions
   * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


__
Kamailio - Users Mailing List - Non Commercial Discussions
 * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
 * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DMQ_USRLOC module and calls

2021-07-13 Thread Alex Balashov
Yes, you need the Path module and special logic for lateral routing of requests 
received from A and transiting through a Path hop of B.

—
Sent from mobile, with due apologies for brevity and errors.

> On Jul 13, 2021, at 8:47 AM, Social Boh  wrote:
> 
> Hello,
> 
> I'm testing DMQ_USRLOC modulo between two Kamailio servers (A) and (B)
> 
> The two servers share the same domain and using Amazon Route53 to distributes 
> 50% requests each Server.
> 
> The problem is when I try to make a call from user A (registered on kamailio 
> A) and the user B (registered on Kamailio B).
> 
> The call follow this flow:
> 
> User A --> KamailioA --> UserB
> 
> go directly to userB because KamailioA know, via DMQ_USRLOC IP and port of 
> UserB. With some Softphone the call work with audio without problem; with 
> other Softphone USERB never answer the INVITE sends from Kamailio. Is it 
> possible use this flow?
> 
> USER A --> KamailioA --> KamailioB --> User B
> 
> to resolve this kind of problem or is there other available option?
> 
> Thank you
> 
> -- 
> ---
> I'm SoCIaL, MayBe
> 
> 
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the 
> sender!
> Edit mailing list options or unsubscribe:
> * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DMQ_USRLOC module and calls

2021-07-13 Thread Olle E. Johansson


> On 13 Jul 2021, at 14:46, Social Boh  wrote:
> 
> Hello,
> 
> I'm testing DMQ_USRLOC modulo between two Kamailio servers (A) and (B)
> 
> The two servers share the same domain and using Amazon Route53 to distributes 
> 50% requests each Server.
> 
> The problem is when I try to make a call from user A (registered on kamailio 
> A) and the user B (registered on Kamailio B).
> 
> The call follow this flow:
> 
> User A --> KamailioA --> UserB
> 
> go directly to userB because KamailioA know, via DMQ_USRLOC IP and port of 
> UserB. With some Softphone the call work with audio without problem; with 
> other Softphone USERB never answer the INVITE sends from Kamailio. Is it 
> possible use this flow?
> 
> USER A --> KamailioA --> KamailioB --> User B
> 
> to resolve this kind of problem or is there other available option?

If the softphone is behind NAT it has a relation to one IP address in the NAT. 
You need to send the INVITE from that IP and no other IP in order to reach the 
device. Even without NAT, many devices just don’t respond to messages from 
unknown IP addresses.

/O
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] DMQ_USRLOC module and calls

2021-07-13 Thread Social Boh

Hello,

I'm testing DMQ_USRLOC modulo between two Kamailio servers (A) and (B)

The two servers share the same domain and using Amazon Route53 to 
distributes 50% requests each Server.


The problem is when I try to make a call from user A (registered on 
kamailio A) and the user B (registered on Kamailio B).


The call follow this flow:

User A --> KamailioA --> UserB

go directly to userB because KamailioA know, via DMQ_USRLOC IP and port 
of UserB. With some Softphone the call work with audio without problem; 
with other Softphone USERB never answer the INVITE sends from Kamailio. 
Is it possible use this flow?


USER A --> KamailioA --> KamailioB --> User B

to resolve this kind of problem or is there other available option?

Thank you

--
---
I'm SoCIaL, MayBe


__
Kamailio - Users Mailing List - Non Commercial Discussions
 * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
 * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DMQ_USRLOC

2019-04-23 Thread Gholamreza Sabery
Point taken.

Thanks a lot for your replies. :)

On Tue, Apr 23, 2019 at 10:18 PM John Petrini  wrote:

> Another great feature of dmq_usrloc is that you can run it on a alternate
> port. This offers a few nice benefits:
>
>
>- You separate the noise of replication traffic from regular SIP
>signalling
>- It makes troubleshooting easier
>- Replication traffic hits a separate port and therefore separate UDP
>queue for your production traffic
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DMQ_USRLOC

2019-04-23 Thread John Petrini
Another great feature of dmq_usrloc is that you can run it on a alternate
port. This offers a few nice benefits:


   - You separate the noise of replication traffic from regular SIP
   signalling
   - It makes troubleshooting easier
   - Replication traffic hits a separate port and therefore separate UDP
   queue for your production traffic
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DMQ_USRLOC

2019-04-23 Thread Alex Balashov
On Tue, Apr 23, 2019 at 09:52:38PM +0430, Gholamreza Sabery wrote:

> the module will, by itself, handle Path-related operations. 

I don't think that claim was ever made. DMQ is, like many things in
Kamailio, just a flexible building block. In fact, it has to be, because
one cannot presume from a dmq_usrloc perspective that every user would
want to handle reachability of endpoints the same way; some endpoints
will accept incoming calls from places other than the ones they
registered to, or there may be network topology-based reasons for doing
otherwise, etc.

dmq_usrloc isn't guilty of any fraudulent or negligent misrepresentation
about what it really is. :-)

-- Alex

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DMQ_USRLOC

2019-04-23 Thread Julien Chavanton
Hi, I have used t_replicate a lot in the past, it is a great strait forward
solution in general.

With DMQ_USERLOC, when you restart a node, it will retrieve all the
contacts from the other nodes.
You could try to do that by using a USRLOC DB backend, but I believe you
will may end up facing other limitations and introducing another SPOF.
I found that DMQ_USRLOC, is working great to ensure you quickly recover a
clean state on every node.

Reusing the features provided by other modules seems like a great option to
me because we are more users using the same code/logic in the end.
I even like modules that tare exposing small API to other modules, because
they are more likely to be use by more users/devs.

I hope you will find the best solution for your needs
Regards
Julien


On Tue, Apr 23, 2019 at 10:24 AM Gholamreza Sabery 
wrote:

> Dear Charles,
>
> I think this module is a little bit misleading. At first, it seems, by
> using it, one can implement a multi-active Kamailio cluster, and the module
> will, by itself, handle Path-related operations. However, all it does is a
> simple replication that can be done using t_replicate, or dmq_t_replicate.
>
> Regards
>
> On Tue, Apr 23, 2019 at 4:17 PM Charles Chance <
> charles.cha...@sipcentric.com> wrote:
>
>> Hello,
>>
>> The lookup() function acts in exactly the same way as it would usually.
>> The purpose of dmq_usrloc is to replicate contacts between all nodes -
>> encapsulating them inside the KDMQ messages you see being exchanged.
>> Therefore, if a contact registers to node A and you perform a lookup on
>> node B, the result of the lookup will be essentially the same as if it were
>> performed on node A.
>>
>> Of course, if your clients are behind NAT, then you'll probably need any
>> outgoing messages to be routed via the node on which the client is
>> registered. Utilising the Path-related parameters of the registrar module
>> can help here.
>>
>> The db_mode makes no difference either - dmq_usrloc interacts with the
>> usrloc module completely independently of the storage method used. I would,
>> however, argue that the main point of dmq_usrloc is to provide completely
>> in-memory storage and replication, improving performance and removing the
>> additional layer of storage/replication, so using db_mode 3 seems somewhat
>> counterproductive.
>>
>> Cheers,
>>
>> Charles
>>
>>
>> On Mon, 22 Apr 2019 at 14:12, Gholamreza Sabery 
>> wrote:
>>
>>> Hi,
>>>
>>> Recently, I started to use dmq_usrloc module. I successfully set it up.
>>> Unfortunately, the documentation does not specify the behavior of
>>> dmq_usrloc module with other Kamailio modules. For example, I see a bunch
>>> of KDMQ messages are exchanged between nodes, but how the lookup() function
>>> behaves with dmq_usrloc, or what is it's effect on a db_mode of 3!
>>>
>>> Regards
>>> ___
>>> Kamailio (SER) - Users Mailing List
>>> sr-users@lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>
>>
>>
>> Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered
>> office: Faraday Wharf, Innovation Birmingham Campus, Holt Street,
>> Birmingham Science Park, Birmingham B7 4BB.
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DMQ_USRLOC

2019-04-23 Thread Gholamreza Sabery
Dear Charles,

I think this module is a little bit misleading. At first, it seems, by
using it, one can implement a multi-active Kamailio cluster, and the module
will, by itself, handle Path-related operations. However, all it does is a
simple replication that can be done using t_replicate, or dmq_t_replicate.

Regards

On Tue, Apr 23, 2019 at 4:17 PM Charles Chance <
charles.cha...@sipcentric.com> wrote:

> Hello,
>
> The lookup() function acts in exactly the same way as it would usually.
> The purpose of dmq_usrloc is to replicate contacts between all nodes -
> encapsulating them inside the KDMQ messages you see being exchanged.
> Therefore, if a contact registers to node A and you perform a lookup on
> node B, the result of the lookup will be essentially the same as if it were
> performed on node A.
>
> Of course, if your clients are behind NAT, then you'll probably need any
> outgoing messages to be routed via the node on which the client is
> registered. Utilising the Path-related parameters of the registrar module
> can help here.
>
> The db_mode makes no difference either - dmq_usrloc interacts with the
> usrloc module completely independently of the storage method used. I would,
> however, argue that the main point of dmq_usrloc is to provide completely
> in-memory storage and replication, improving performance and removing the
> additional layer of storage/replication, so using db_mode 3 seems somewhat
> counterproductive.
>
> Cheers,
>
> Charles
>
>
> On Mon, 22 Apr 2019 at 14:12, Gholamreza Sabery 
> wrote:
>
>> Hi,
>>
>> Recently, I started to use dmq_usrloc module. I successfully set it up.
>> Unfortunately, the documentation does not specify the behavior of
>> dmq_usrloc module with other Kamailio modules. For example, I see a bunch
>> of KDMQ messages are exchanged between nodes, but how the lookup() function
>> behaves with dmq_usrloc, or what is it's effect on a db_mode of 3!
>>
>> Regards
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
>
>
> Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered
> office: Faraday Wharf, Innovation Birmingham Campus, Holt Street,
> Birmingham Science Park, Birmingham B7 4BB.
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DMQ_USRLOC

2019-04-23 Thread Charles Chance
Hello,

The lookup() function acts in exactly the same way as it would usually. The
purpose of dmq_usrloc is to replicate contacts between all nodes -
encapsulating them inside the KDMQ messages you see being exchanged.
Therefore, if a contact registers to node A and you perform a lookup on
node B, the result of the lookup will be essentially the same as if it were
performed on node A.

Of course, if your clients are behind NAT, then you'll probably need any
outgoing messages to be routed via the node on which the client is
registered. Utilising the Path-related parameters of the registrar module
can help here.

The db_mode makes no difference either - dmq_usrloc interacts with the
usrloc module completely independently of the storage method used. I would,
however, argue that the main point of dmq_usrloc is to provide completely
in-memory storage and replication, improving performance and removing the
additional layer of storage/replication, so using db_mode 3 seems somewhat
counterproductive.

Cheers,

Charles


On Mon, 22 Apr 2019 at 14:12, Gholamreza Sabery  wrote:

> Hi,
>
> Recently, I started to use dmq_usrloc module. I successfully set it up.
> Unfortunately, the documentation does not specify the behavior of
> dmq_usrloc module with other Kamailio modules. For example, I see a bunch
> of KDMQ messages are exchanged between nodes, but how the lookup() function
> behaves with dmq_usrloc, or what is it's effect on a db_mode of 3!
>
> Regards
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>

-- 
Sipcentric Ltd.
Company registered in England & Wales no. 
7365592. Registered
office: Faraday Wharf, Innovation 
Birmingham Campus, Holt Street, Birmingham Science Park, Birmingham B7 4BB.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] DMQ_USRLOC

2019-04-22 Thread Gholamreza Sabery
Hi,

Recently, I started to use dmq_usrloc module. I successfully set it up.
Unfortunately, the documentation does not specify the behavior of
dmq_usrloc module with other Kamailio modules. For example, I see a bunch
of KDMQ messages are exchanged between nodes, but how the lookup() function
behaves with dmq_usrloc, or what is it's effect on a db_mode of 3!

Regards
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc - which server?

2018-02-07 Thread Charles Chance
Hi Alex,

On 7 February 2018 at 18:05, Alex Balashov 
wrote:

>
> (1) Most of the endpoints in question are NAT'd, and I was using
> fix_nated_register() and the "received AVP" for mitigation.
>
> Although the "Received" address is replicated by DMQ, using Path to
> discover the adjacent "last hop" registrar overwrites the destination
> set and stops the 'received' parameter from being utilised. Moreover,
> there is no way to intercept it before the lookup() overwrites $du with
> Path instead of 'received'.
>

I would typically append the received IP/port to the Path header before
saving:

append_hf("Path: \r\n");

The last-hop registrar (as defined in Path uri) can then do something
like...

$du = $(hdr(Route){param.value,received});

...before sending it on its way.

I recall that we also set path_use_received parameter, although from memory
I couldn't say for sure if the above depended on it.


>
(2) When multiple Contact bindings are available for the same AOR, both
> local and remote, it would be desirable to have an easy way of selecting
> the most adjacent one (i.e. the local one, in preference to the ones
> removed by one Path hop).
>
> Is there a nonobvious easy way to accomplish this, or am I going to have
> to switch from lookup() to reg_fetch_contacts() or walk the lookup()'d
> branches and find the one I want?
>

I'm unsure about that one, I'm afraid, since we generally just append
branches for all contacts in parallel (which lookup(), combined with the
above, does very well).

There may be something that can be done with dmq_usrloc and q value, to
ensure that local contacts have a higher priority - and then set
append_branches parameter to 0 - but I am unaware of any existing way to
accomplish it without, as you suggest, switching to reg_fetch_contacts().

Cheers,

Charles

-- 
Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered 
office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, 
Birmingham Science Park, Birmingham B7 4BB.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc - which server?

2018-02-07 Thread Alex Balashov
Hi Charles, 

A few other questions arise, mostly as a matter of best practices rather
than functional possibility:

(1) Most of the endpoints in question are NAT'd, and I was using
fix_nated_register() and the "received AVP" for mitigation.

Although the "Received" address is replicated by DMQ, using Path to
discover the adjacent "last hop" registrar overwrites the destination
set and stops the 'received' parameter from being utilised. Moreover,
there is no way to intercept it before the lookup() overwrites $du with
Path instead of 'received'.

There are two solutions to this; one is to send the call to the last-hop
registrar and have it re-do the lookup(), reviving the 'received'
attribute. The requires transmitting the original AOR to be looked up as
a custom header or whatnot. The other option is to manually fetch the
'received' attribute subsequent to the lookup() on the source
(first/egress hop) registrar using reg_fetch_contacts(), which is what I
currently do. I stick that in a custom header instead.

Another option is to change the NAT traversal approach altogether and
instead of using the 'received' attribute, use set_contact_alias() to
modify the stored Contact everywhere. 

Perhaps the latter option is the simplest of all, but I am curious as to
whether you have an opinion on possible pitfalls and virtues in the
context of a dmq_usrloc-replicated registrar cluster.

(2) When multiple Contact bindings are available for the same AOR, both
local and remote, it would be desirable to have an easy way of selecting
the most adjacent one (i.e. the local one, in preference to the ones
removed by one Path hop).

Is there a nonobvious easy way to accomplish this, or am I going to have
to switch from lookup() to reg_fetch_contacts() or walk the lookup()'d
branches and find the one I want?

Thanks,

-- Alex

On Mon, Feb 05, 2018 at 03:32:21PM +, Charles Chance wrote:

> Hi Alex,
> 
> Thanks for the update - glad you solved it.
> 
> Cheers,
> 
> Charles
> 
> On Mon, 5 Feb 2018 at 14:41, Alex Balashov 
> wrote:
> 
> > Hi Charles,
> >
> > By way of further update:
> >
> > On Thu, Feb 01, 2018 at 07:06:41PM +, Charles Chance wrote:
> >
> > > > > modparam("registrar", "path_mode", 0)
> > > > > modparam("registrar", "path_use_received", 1)
> > > > > modparam("registrar", "path_check_local", 1)
> > > >
> > > > I have the latter set, but left the former two to defaults.
> > > >
> > > >
> > > That may be the issue then, I think. The default for path_mode is 2:
> > >
> > > "The path header is only saved into usrloc, if path support is indicated
> > in
> > > the registration request by the “path” option of the “Supported” header."
> >
> > path_mode 0 + path_check_local + append_hf() + msg_apply_changes() was
> > indeed the winning formula. Thank you.
> >
> > -- Alex
> >
> > --
> > Alex Balashov | Principal | Evariste Systems LLC
> >
> > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> >
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> >
> -- 
> *Charles Chance*
> Managing Director
> 
> t. 0330 120 1200m. 07932 063 891
> 
> -- 
> Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered 
> office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, 
> Birmingham Science Park, Birmingham B7 4BB.

> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc - which server?

2018-02-05 Thread Alex Balashov
Hi Charles,

By way of further update:

On Thu, Feb 01, 2018 at 07:06:41PM +, Charles Chance wrote:

> > > modparam("registrar", "path_mode", 0)
> > > modparam("registrar", "path_use_received", 1)
> > > modparam("registrar", "path_check_local", 1)
> >
> > I have the latter set, but left the former two to defaults.
> >
> >
> That may be the issue then, I think. The default for path_mode is 2:
> 
> "The path header is only saved into usrloc, if path support is indicated in
> the registration request by the “path” option of the “Supported” header."

path_mode 0 + path_check_local + append_hf() + msg_apply_changes() was
indeed the winning formula. Thank you.

-- Alex

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc - which server?

2018-02-01 Thread Charles Chance
On 1 February 2018 at 19:02, Alex Balashov 
wrote:

> On Thu, Feb 01, 2018 at 06:57:03PM +, Charles Chance wrote:
>
> > Just to confirm, do you have use_path set?
> >
> > modparam("registrar", "use_path", 1)
>
> I do indeed.
>
> > modparam("registrar", "path_mode", 0)
> > modparam("registrar", "path_use_received", 1)
> > modparam("registrar", "path_check_local", 1)
>
> I have the latter set, but left the former two to defaults.
>
>
That may be the issue then, I think. The default for path_mode is 2:

"The path header is only saved into usrloc, if path support is indicated in
the registration request by the “path” option of the “Supported” header."

Can you try with the suggested values?

Cheers,

Charles

-- 
Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered 
office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, 
Birmingham Science Park, Birmingham B7 4BB.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc - which server?

2018-02-01 Thread Alex Balashov
On Thu, Feb 01, 2018 at 06:57:03PM +, Charles Chance wrote:

> Just to confirm, do you have use_path set?
> 
> modparam("registrar", "use_path", 1)

I do indeed.

> modparam("registrar", "path_mode", 0)
> modparam("registrar", "path_use_received", 1)
> modparam("registrar", "path_check_local", 1)

I have the latter set, but left the former two to defaults.

-- Alex

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc - which server?

2018-02-01 Thread Charles Chance
Hi Alex,

Just to confirm, do you have use_path set?

modparam("registrar", "use_path", 1)

For your setup I'd also recommend setting:

modparam("registrar", "path_mode", 0)
modparam("registrar", "path_use_received", 1)
modparam("registrar", "path_check_local", 1)

Cheers,

Charles


On 1 February 2018 at 18:47, Alex Balashov 
wrote:

> Hi Charles,
>
> ul.dump reflects that Path is not being applied to the local contact, so
> it should come as no surprise that it's not being replicated either.
>
> I added this:
>
> append_hf("Path: \r\n");
> msg_apply_changes();
>
> if(!save("location")) {
> ...
> }
>
> ...
>
> -- Alex
>
> On Thu, Feb 01, 2018 at 08:44:38AM +, Charles Chance wrote:
>
> > Hi Alex,
> >
> > Socket is never replicated but path definitely should be.
> >
> > Without DMQ involved and simply saving locally (with path header added
> > first) can you show me the output of ul.dump?
> >
> > Cheers,
> >
> > Charles
> >
> > On Thu, 1 Feb 2018 at 08:31, Alex Balashov 
> > wrote:
> >
> > > Ah, thank you for that! I had tried calling msg_apply_changes() after
> > > using add_path(), but didn't realise that it's dependent on relay
> rather
> > > than just adding it to the existing message lumps. However, to your
> > > point, the documentation does say that the "outgoing" interface address
> > > is populated by add_path*(), which of course means that has to be
> known.
> > >
> > > Nevertheless, Path is not being replicated. Furthermore, after
> upgrading
> > > to 5.1, I am not getting any replication of remote contacts whatsoever,
> > > even with no path involvement. And "socket" is still not an attribute
> of
> > > the DMQ messages being passed:
> > >
> > > KDMQ sip:usrloc@100.2.160.20 SIP/2.0
> > > Via: SIP/2.0/UDP
> > > 100.2.128.20;branch=z9hG4bKc0ec.d07b9da1.0
> > > To: 
> > > From:  > > >;tag=68a630e496181361fe35a2f5a89714ad-02ab
> > > CSeq: 10 KDMQ
> > > Call-ID: 4cf0c5e5257bcb22-6408@100.2.99.211
> > > Content-Length: 461
> > > User-Agent: kamailio (5.1.1 (x86_64/linux))
> > > Max-Forwards: 1
> > > Content-Type: application/json
> > >
> > > {"action":1,"aor":"marshal@org
> > > ","ruid":"uloc-5a712c1a-1901-dae1","c":"sip:va-server@100.
> 2.129.149:6060
> > > ;ob","received":"sip:100.2.129.149:6060
> > > ","path":"","callid":"R6m3zCogWsifTLebJ7n6zmlGHOwk1x
> A6","user_agent":"CallServer","instance":"","expires":
> 1517473708,"cseq":5015,"flags":0,"cflags":0,"q":0,"last_
> modified":1517473678,"methods":8159,"reg_id":0,"server_id":0}
> > >
> > >
> > > -- Alex
> > >
> > > --
> > > Alex Balashov | Principal | Evariste Systems LLC
> > >
> > > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> > > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> > >
> > > ___
> > > Kamailio (SER) - Users Mailing List
> > > sr-users@lists.kamailio.org
> > > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> > >
> > --
> > *Charles Chance*
> > Managing Director
> >
> > t. 0330 120 1200m. 07932 063 891
> >
> > --
> > Sipcentric Ltd. Company registered in England & Wales no. 7365592.
> Registered
> > office: Faraday Wharf, Innovation Birmingham Campus, Holt Street,
> > Birmingham Science Park, Birmingham B7 4BB.
>
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>

-- 
Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered 
office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, 
Birmingham Science Park, Birmingham B7 4BB.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc - which server?

2018-02-01 Thread Charles Chance
Hi Alex,

Socket is never replicated but path definitely should be.

Without DMQ involved and simply saving locally (with path header added
first) can you show me the output of ul.dump?

Cheers,

Charles

On Thu, 1 Feb 2018 at 08:31, Alex Balashov 
wrote:

> Ah, thank you for that! I had tried calling msg_apply_changes() after
> using add_path(), but didn't realise that it's dependent on relay rather
> than just adding it to the existing message lumps. However, to your
> point, the documentation does say that the "outgoing" interface address
> is populated by add_path*(), which of course means that has to be known.
>
> Nevertheless, Path is not being replicated. Furthermore, after upgrading
> to 5.1, I am not getting any replication of remote contacts whatsoever,
> even with no path involvement. And "socket" is still not an attribute of
> the DMQ messages being passed:
>
> KDMQ sip:usrloc@100.2.160.20 SIP/2.0
> Via: SIP/2.0/UDP
> 100.2.128.20;branch=z9hG4bKc0ec.d07b9da1.0
> To: 
> From:  >;tag=68a630e496181361fe35a2f5a89714ad-02ab
> CSeq: 10 KDMQ
> Call-ID: 4cf0c5e5257bcb22-6408@100.2.99.211
> Content-Length: 461
> User-Agent: kamailio (5.1.1 (x86_64/linux))
> Max-Forwards: 1
> Content-Type: application/json
>
> {"action":1,"aor":"marshal@org
> ","ruid":"uloc-5a712c1a-1901-dae1","c":"sip:va-server@100.2.129.149:6060
> ;ob","received":"sip:100.2.129.149:6060
> ","path":"","callid":"R6m3zCogWsifTLebJ7n6zmlGHOwk1xA6","user_agent":"CallServer","instance":"","expires":1517473708,"cseq":5015,"flags":0,"cflags":0,"q":0,"last_modified":1517473678,"methods":8159,"reg_id":0,"server_id":0}
>
>
> -- Alex
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-- 
*Charles Chance*
Managing Director

t. 0330 120 1200m. 07932 063 891

-- 
Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered 
office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, 
Birmingham Science Park, Birmingham B7 4BB.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc - which server?

2018-02-01 Thread Alex Balashov
Ah, thank you for that! I had tried calling msg_apply_changes() after
using add_path(), but didn't realise that it's dependent on relay rather
than just adding it to the existing message lumps. However, to your
point, the documentation does say that the "outgoing" interface address
is populated by add_path*(), which of course means that has to be known.

Nevertheless, Path is not being replicated. Furthermore, after upgrading
to 5.1, I am not getting any replication of remote contacts whatsoever,
even with no path involvement. And "socket" is still not an attribute of
the DMQ messages being passed:

KDMQ sip:usrloc@100.2.160.20 SIP/2.0
Via: SIP/2.0/UDP 
100.2.128.20;branch=z9hG4bKc0ec.d07b9da1.0
To: 
From: ;tag=68a630e496181361fe35a2f5a89714ad-02ab
CSeq: 10 KDMQ
Call-ID: 4cf0c5e5257bcb22-6408@100.2.99.211
Content-Length: 461
User-Agent: kamailio (5.1.1 (x86_64/linux))
Max-Forwards: 1
Content-Type: application/json

{"action":1,"aor":"marshal@org","ruid":"uloc-5a712c1a-1901-dae1","c":"sip:va-server@100.2.129.149:6060;ob","received":"sip:100.2.129.149:6060","path":"","callid":"R6m3zCogWsifTLebJ7n6zmlGHOwk1xA6","user_agent":"CallServer","instance":"","expires":1517473708,"cseq":5015,"flags":0,"cflags":0,"q":0,"last_modified":1517473678,"methods":8159,"reg_id":0,"server_id":0}


-- Alex

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc - which server?

2018-02-01 Thread Charles Chance
Hi Alex,

You’ll need to call msg_apply_changes before saving. Also, as I recall,
add_path will only work if relaying so you’ll need to add the header
manually. Something like this:

...
append_hf("Path:\r\n");

msg_apply_changes();
...


Let me know if it works for you.

Cheers,

Charles


On Thu, 1 Feb 2018 at 07:52, Alex Balashov 
wrote:

> Hi Charles,
>
> It does not appear that Path is being replicated, either.
>
> I am running add_path() prior to save()ing to usrloc, but on both hosts,
> I see:
>
> # kamcmd -s /tmp/kamailio_ctl ul.dump | grep -i path
> Path: [not set]
> Path: [not set]
> Path: [not set]
> Path: [not set]
> Path: [not set]
> Path: [not set]
> Path: [not set]
> Path: [not set]
>
> This applies to both local registrations and replicated ones.
>
> This is 5.0, though. Haven't tried 5.1 yet.
>
> -- Alex
>
> On Wed, Jan 31, 2018 at 04:53:09AM +, Charles Chance wrote:
> > Hi Alex,
> >
> > Which version are you running? There were a few related patches recently
> -
> > the one you mentioned will correctly set the server_id, although on its
> own
> > will probably not help in the correct routing of requests. For that, I
> > would normally make use of Path.
> >
> > The socket should indeed be set for locally received registrations - if
> not
> > then there is something wrong.
> >
> > Cheers,
> >
> > Charles
> >
> >
> > On 31 January 2018 at 03:32, Alex Balashov 
> > wrote:
> >
> > > Ah, I guess this is the very problem that this relatively bleeding-edge
> > > patch by Charles is meant to solve:
> > >
> > >
> https://github.com/kamailio/kamailio/commit/684059ca5bb76e2006a9560ac1efa8
> > > c3540d3a58#diff-511a71ab6e3db75071b6a440618be1df
> > >
> > > -- Alex
> > >
> > > --
> > > Alex Balashov | Principal | Evariste Systems LLC
> > >
> > > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> > > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> > >
> > > ___
> > > Kamailio (SER) - Users Mailing List
> > > sr-users@lists.kamailio.org
> > > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> > >
> >
> > --
> > Sipcentric Ltd. Company registered in England & Wales no. 7365592.
> Registered
> > office: Faraday Wharf, Innovation Birmingham Campus, Holt Street,
> > Birmingham Science Park, Birmingham B7 4BB.
>
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-- 
*Charles Chance*
Managing Director

t. 0330 120 1200m. 07932 063 891

-- 
Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered 
office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, 
Birmingham Science Park, Birmingham B7 4BB.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc - which server?

2018-02-01 Thread Alex Balashov
Unfortunately, no luck with 5.1 either.

On Thu, Feb 01, 2018 at 02:49:32AM -0500, Alex Balashov wrote:

> Hi Charles,
> 
> It does not appear that Path is being replicated, either. 
> 
> I am running add_path() prior to save()ing to usrloc, but on both hosts,
> I see:
> 
> # kamcmd -s /tmp/kamailio_ctl ul.dump | grep -i path
>   Path: [not set]
>   Path: [not set]
>   Path: [not set]
>   Path: [not set]
>   Path: [not set]
>   Path: [not set]
>   Path: [not set]
>   Path: [not set]
> 
> This applies to both local registrations and replicated ones. 
> 
> This is 5.0, though. Haven't tried 5.1 yet.
> 
> -- Alex
> 
> On Wed, Jan 31, 2018 at 04:53:09AM +, Charles Chance wrote:
> > Hi Alex,
> > 
> > Which version are you running? There were a few related patches recently -
> > the one you mentioned will correctly set the server_id, although on its own
> > will probably not help in the correct routing of requests. For that, I
> > would normally make use of Path.
> > 
> > The socket should indeed be set for locally received registrations - if not
> > then there is something wrong.
> > 
> > Cheers,
> > 
> > Charles
> > 
> > 
> > On 31 January 2018 at 03:32, Alex Balashov 
> > wrote:
> > 
> > > Ah, I guess this is the very problem that this relatively bleeding-edge
> > > patch by Charles is meant to solve:
> > >
> > > https://github.com/kamailio/kamailio/commit/684059ca5bb76e2006a9560ac1efa8
> > > c3540d3a58#diff-511a71ab6e3db75071b6a440618be1df
> > >
> > > -- Alex
> > >
> > > --
> > > Alex Balashov | Principal | Evariste Systems LLC
> > >
> > > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> > > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> > >
> > > ___
> > > Kamailio (SER) - Users Mailing List
> > > sr-users@lists.kamailio.org
> > > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> > >
> > 
> > -- 
> > Sipcentric Ltd. Company registered in England & Wales no. 7365592. 
> > Registered 
> > office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, 
> > Birmingham Science Park, Birmingham B7 4BB.
> 
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> 
> 
> -- 
> Alex Balashov | Principal | Evariste Systems LLC
> 
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> 
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc - which server?

2018-01-31 Thread Alex Balashov
Hi Charles,

It does not appear that Path is being replicated, either. 

I am running add_path() prior to save()ing to usrloc, but on both hosts,
I see:

# kamcmd -s /tmp/kamailio_ctl ul.dump | grep -i path
Path: [not set]
Path: [not set]
Path: [not set]
Path: [not set]
Path: [not set]
Path: [not set]
Path: [not set]
Path: [not set]

This applies to both local registrations and replicated ones. 

This is 5.0, though. Haven't tried 5.1 yet.

-- Alex

On Wed, Jan 31, 2018 at 04:53:09AM +, Charles Chance wrote:
> Hi Alex,
> 
> Which version are you running? There were a few related patches recently -
> the one you mentioned will correctly set the server_id, although on its own
> will probably not help in the correct routing of requests. For that, I
> would normally make use of Path.
> 
> The socket should indeed be set for locally received registrations - if not
> then there is something wrong.
> 
> Cheers,
> 
> Charles
> 
> 
> On 31 January 2018 at 03:32, Alex Balashov 
> wrote:
> 
> > Ah, I guess this is the very problem that this relatively bleeding-edge
> > patch by Charles is meant to solve:
> >
> > https://github.com/kamailio/kamailio/commit/684059ca5bb76e2006a9560ac1efa8
> > c3540d3a58#diff-511a71ab6e3db75071b6a440618be1df
> >
> > -- Alex
> >
> > --
> > Alex Balashov | Principal | Evariste Systems LLC
> >
> > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> >
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> >
> 
> -- 
> Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered 
> office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, 
> Birmingham Science Park, Birmingham B7 4BB.

> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc - which server?

2018-01-30 Thread Charles Chance
Hi Alex

On Wed, 31 Jan 2018 at 05:35, Alex Balashov 
wrote:

>
> I hadn't even thought of Path; I do see that it's replicated. However,
> what are the consequences of adding a Path to a locally bound
> registration that is also replicated? I would assume that would cause
> outbound requests to the endpoint to loop through Kamailio. Is there a
> means of adding Path only to replicated requests? Or am I mistaken about
> the effect?
>

This module parameter will avoid any local looping and was added for this
very scenario:
https://www.kamailio.org/docs/modules/stable/modules/registrar.html#registrar.p.path_check_local
.

The Socket is definitely not set on any registrations, including local
> ones. This is 5.0:60dc10a.
>

Let’s look into this - can you provide the relevant parts of your config
(mainly registrar/usrloc modparams and the route/section which handles
registrations)?

Best,

Charles

-- 
*Charles Chance*
Managing Director

t. 0330 120 1200m. 07932 063 891

-- 
Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered 
office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, 
Birmingham Science Park, Birmingham B7 4BB.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc - which server?

2018-01-30 Thread Alex Balashov
Hi Charles,

Thank you kindly for your response:

On Wed, Jan 31, 2018 at 04:53:09AM +, Charles Chance wrote:

> Which version are you running? There were a few related patches recently -
> the one you mentioned will correctly set the server_id, although on its own
> will probably not help in the correct routing of requests. For that, I
> would normally make use of Path.

I am running 5.0, but taking into account newer patches in 5.1 as I look
for solutions.

I hadn't even thought of Path; I do see that it's replicated. However,
what are the consequences of adding a Path to a locally bound
registration that is also replicated? I would assume that would cause
outbound requests to the endpoint to loop through Kamailio. Is there a
means of adding Path only to replicated requests? Or am I mistaken about
the effect?

The Socket is definitely not set on any registrations, including local
ones. This is 5.0:60dc10a.

-- Alex 

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc - which server?

2018-01-30 Thread Charles Chance
Hi Alex,

Which version are you running? There were a few related patches recently -
the one you mentioned will correctly set the server_id, although on its own
will probably not help in the correct routing of requests. For that, I
would normally make use of Path.

The socket should indeed be set for locally received registrations - if not
then there is something wrong.

Cheers,

Charles


On 31 January 2018 at 03:32, Alex Balashov 
wrote:

> Ah, I guess this is the very problem that this relatively bleeding-edge
> patch by Charles is meant to solve:
>
> https://github.com/kamailio/kamailio/commit/684059ca5bb76e2006a9560ac1efa8
> c3540d3a58#diff-511a71ab6e3db75071b6a440618be1df
>
> -- Alex
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>

-- 
Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered 
office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, 
Birmingham Science Park, Birmingham B7 4BB.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc - which server?

2018-01-30 Thread Alex Balashov
Ah, I guess this is the very problem that this relatively bleeding-edge
patch by Charles is meant to solve:

https://github.com/kamailio/kamailio/commit/684059ca5bb76e2006a9560ac1efa8c3540d3a58#diff-511a71ab6e3db75071b6a440618be1df

-- Alex

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc - which server?

2018-01-30 Thread Alex Balashov
Also, it appears that under the DMQ regime, the socket parameter is not
set for locally received registrations either?

# kamcmd -s /tmp/kamailio_ctl ul.dump  | grep Socket
Socket: [not set]
Socket: [not set]
Socket: [not set]
Socket: [not set]
Socket: [not set]
Socket: [not set]
Socket: [not set]
Socket: [not set]

-- Alex

On Tue, Jan 30, 2018 at 10:26:24PM -0500, Alex Balashov wrote:

> Hi,
> 
> The Socket parameter of location entries is not replicated under
> dmq_usrloc. 
> 
> To make matters worse, the technical characteristics of the registrar
> module are such that I cannot straightforwardly modify the incoming
> Contact to add a rider indicating the server on which the register was
> received.
> 
> The AoR domain is the same for all registrations received on any server
> in the DMQ mesh.
> 
> To reach the registrants, I need to forward the registration to the
> correct server that corresponds to the true provenance of the
> registration. What is a reasonable way of finding out what that is? I
> don't see any method of injecting such values into the replicated
> contacts, as dmq_usrloc does not provide hooks for this.
> 
> Thanks,
> 
> -- Alex 
> 
> -- 
> Alex Balashov | Principal | Evariste Systems LLC
> 
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> 
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] dmq_usrloc - which server?

2018-01-30 Thread Alex Balashov
Hi,

The Socket parameter of location entries is not replicated under
dmq_usrloc. 

To make matters worse, the technical characteristics of the registrar
module are such that I cannot straightforwardly modify the incoming
Contact to add a rider indicating the server on which the register was
received.

The AoR domain is the same for all registrations received on any server
in the DMQ mesh.

To reach the registrants, I need to forward the registration to the
correct server that corresponds to the true provenance of the
registration. What is a reasonable way of finding out what that is? I
don't see any method of injecting such values into the replicated
contacts, as dmq_usrloc does not provide hooks for this.

Thanks,

-- Alex 

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc, usrloc:db_mode 3, and PostgreSQL

2017-12-19 Thread Alex Balashov
On Tue, Dec 19, 2017 at 12:37:15PM -0800, Julien Chavanton wrote:

> Wonder where is it lost, we may need to run in debug mode to follow what is
> going on in db_postgress

I tried cranking up the debug considerably but did not gain any further
insight.

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc, usrloc:db_mode 3, and PostgreSQL

2017-12-19 Thread Julien Chavanton
Right looking back at your initial logs the DB handle is null when it
should not be.

Wonder where is it lost, we may need to run in debug mode to follow what is
going on in db_postgress

On Tue, Dec 19, 2017 at 12:08 PM, Alex Balashov 
wrote:

> db_mode 1 also does not work.
>
> On December 19, 2017 3:05:44 PM EST, Julien Chavanton <
> jchavan...@gmail.com> wrote:
> >Good, we confirm this is not about Postgres version
> >
> >Yes I understood that what was not working was the insert done when
> >receiving registration through DMQ, this is also what I have been
> >testing.
> >
> >Ok only db_mode 3 is not/never working ...
> >
> >In my lab, only one server is trying to insert and this is the server
> >receiving registration trough DMQ.
> >
> >I guess we could patch to output every queries generated in module
> >db_postgres
> >
> >
> >On Tue, Dec 19, 2017 at 11:43 AM, Alex Balashov
> >
> >wrote:
> >
> >> I will further note that db_mode 2 works even with timer_interval ==
> >1,
> >> so this is definitely some sort of timing / race issue related to
> >> immediate use of the DB in db_mode 3.
> >>
> >> On Tue, Dec 19, 2017 at 02:37:01PM -0500, Alex Balashov wrote:
> >>
> >> > I have tried against PG 9.6, and reloaded all the table schemas
> >just to
> >> > be completely sure. The problem persists.
> >> >
> >> > I should reemphasise that local usrloc storage works. It's only on
> >the
> >> > remote peers receiving bindings via dmq_usrloc that there is a
> >problem.
> >> >
> >> > --
> >> > Alex Balashov | Principal | Evariste Systems LLC
> >> >
> >> > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> >> > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> >> >
> >> > ___
> >> > Kamailio (SER) - Users Mailing List
> >> > sr-users@lists.kamailio.org
> >> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> >>
> >> --
> >> Alex Balashov | Principal | Evariste Systems LLC
> >>
> >> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> >> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> >>
> >> ___
> >> Kamailio (SER) - Users Mailing List
> >> sr-users@lists.kamailio.org
> >> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> >>
>
>
> -- Alex
>
> --
> Sent via mobile, please forgive typos and brevity.
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc, usrloc:db_mode 3, and PostgreSQL

2017-12-19 Thread Alex Balashov
db_mode 1 also does not work. 

On December 19, 2017 3:05:44 PM EST, Julien Chavanton  
wrote:
>Good, we confirm this is not about Postgres version
>
>Yes I understood that what was not working was the insert done when
>receiving registration through DMQ, this is also what I have been
>testing.
>
>Ok only db_mode 3 is not/never working ...
>
>In my lab, only one server is trying to insert and this is the server
>receiving registration trough DMQ.
>
>I guess we could patch to output every queries generated in module
>db_postgres
>
>
>On Tue, Dec 19, 2017 at 11:43 AM, Alex Balashov
>
>wrote:
>
>> I will further note that db_mode 2 works even with timer_interval ==
>1,
>> so this is definitely some sort of timing / race issue related to
>> immediate use of the DB in db_mode 3.
>>
>> On Tue, Dec 19, 2017 at 02:37:01PM -0500, Alex Balashov wrote:
>>
>> > I have tried against PG 9.6, and reloaded all the table schemas
>just to
>> > be completely sure. The problem persists.
>> >
>> > I should reemphasise that local usrloc storage works. It's only on
>the
>> > remote peers receiving bindings via dmq_usrloc that there is a
>problem.
>> >
>> > --
>> > Alex Balashov | Principal | Evariste Systems LLC
>> >
>> > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
>> > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>> >
>> > ___
>> > Kamailio (SER) - Users Mailing List
>> > sr-users@lists.kamailio.org
>> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>> --
>> Alex Balashov | Principal | Evariste Systems LLC
>>
>> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
>> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>


-- Alex

--
Sent via mobile, please forgive typos and brevity. 

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc, usrloc:db_mode 3, and PostgreSQL

2017-12-19 Thread Alex Balashov
I think the null DB handle pointer is at the heart of the problem, not any 
problematic query... 

On December 19, 2017 3:05:44 PM EST, Julien Chavanton  
wrote:
>Good, we confirm this is not about Postgres version
>
>Yes I understood that what was not working was the insert done when
>receiving registration through DMQ, this is also what I have been
>testing.
>
>Ok only db_mode 3 is not/never working ...
>
>In my lab, only one server is trying to insert and this is the server
>receiving registration trough DMQ.
>
>I guess we could patch to output every queries generated in module
>db_postgres
>
>
>On Tue, Dec 19, 2017 at 11:43 AM, Alex Balashov
>
>wrote:
>
>> I will further note that db_mode 2 works even with timer_interval ==
>1,
>> so this is definitely some sort of timing / race issue related to
>> immediate use of the DB in db_mode 3.
>>
>> On Tue, Dec 19, 2017 at 02:37:01PM -0500, Alex Balashov wrote:
>>
>> > I have tried against PG 9.6, and reloaded all the table schemas
>just to
>> > be completely sure. The problem persists.
>> >
>> > I should reemphasise that local usrloc storage works. It's only on
>the
>> > remote peers receiving bindings via dmq_usrloc that there is a
>problem.
>> >
>> > --
>> > Alex Balashov | Principal | Evariste Systems LLC
>> >
>> > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
>> > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>> >
>> > ___
>> > Kamailio (SER) - Users Mailing List
>> > sr-users@lists.kamailio.org
>> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>> --
>> Alex Balashov | Principal | Evariste Systems LLC
>>
>> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
>> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>


-- Alex

--
Sent via mobile, please forgive typos and brevity. 

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc, usrloc:db_mode 3, and PostgreSQL

2017-12-19 Thread Julien Chavanton
Good, we confirm this is not about Postgres version

Yes I understood that what was not working was the insert done when
receiving registration through DMQ, this is also what I have been testing.

Ok only db_mode 3 is not/never working ...

In my lab, only one server is trying to insert and this is the server
receiving registration trough DMQ.

I guess we could patch to output every queries generated in module
db_postgres


On Tue, Dec 19, 2017 at 11:43 AM, Alex Balashov 
wrote:

> I will further note that db_mode 2 works even with timer_interval == 1,
> so this is definitely some sort of timing / race issue related to
> immediate use of the DB in db_mode 3.
>
> On Tue, Dec 19, 2017 at 02:37:01PM -0500, Alex Balashov wrote:
>
> > I have tried against PG 9.6, and reloaded all the table schemas just to
> > be completely sure. The problem persists.
> >
> > I should reemphasise that local usrloc storage works. It's only on the
> > remote peers receiving bindings via dmq_usrloc that there is a problem.
> >
> > --
> > Alex Balashov | Principal | Evariste Systems LLC
> >
> > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> >
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc, usrloc:db_mode 3, and PostgreSQL

2017-12-19 Thread Alex Balashov
I will further note that db_mode 2 works even with timer_interval == 1,
so this is definitely some sort of timing / race issue related to
immediate use of the DB in db_mode 3.

On Tue, Dec 19, 2017 at 02:37:01PM -0500, Alex Balashov wrote:

> I have tried against PG 9.6, and reloaded all the table schemas just to
> be completely sure. The problem persists.
> 
> I should reemphasise that local usrloc storage works. It's only on the
> remote peers receiving bindings via dmq_usrloc that there is a problem.
> 
> -- 
> Alex Balashov | Principal | Evariste Systems LLC
> 
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> 
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc, usrloc:db_mode 3, and PostgreSQL

2017-12-19 Thread Alex Balashov
I have tried against PG 9.6, and reloaded all the table schemas just to
be completely sure. The problem persists.

I should reemphasise that local usrloc storage works. It's only on the
remote peers receiving bindings via dmq_usrloc that there is a problem.

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc, usrloc:db_mode 3, and PostgreSQL

2017-12-19 Thread Charles Chance
Julian - thanks for testing, I had very little time yesterday!

Alex - the only thing I can suggest is to check the table name on your
receiving node as by default the replicated contacts will use “location”.
If the table name is different then you’ll need to set the domain parameter
of dmq_usrloc. Either way, when dmq writes a replicated contact it uses the
usrloc API and is entirely independent of the underlying storage method. So
if there is an issue I suspect it’s somewhere else.

Cheers,

Charles

On Tue, 19 Dec 2017 at 05:00, Alex Balashov 
wrote:

> Julien,
>
> I am running PG 10. That is the only difference I can discern thus far,
> but let me compare your notes to mine and see if I can spot anything.
>
> Thank you very much for your testing and assistance!
>
> On Mon, Dec 18, 2017 at 08:33:26PM -0800, Julien Chavanton wrote:
>
> > kamailio510=# SELECT version();
> >
> > version
> >
> -
> >  PostgreSQL 9.5.6 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu
> > 4.8.2-19ubuntu1) 4.8.2, 64-bit
> > (1 row)
> >
> >
> >
> > #
> > U 127.0.0.1:5061 -> 127.0.1.101:5060
> > REGISTER sip:flowroute.com SIP/2.0.
> > Via: SIP/2.0/UDP 127.0.1.1:5061;branch=z9hG4bK-29823-2-0.
> > Via: SIP/2.0/UDP 1.1.1.2:5061;branch=z9hG4bK-29823-2-0.
> > From: ;tag=2.
> > To: .
> > Call-ID: 2-29823@127.0.1.1.
> > CSeq: 1 REGISTER.
> > Contact: sip:10001-1@1.1.1.2:5061.
> > Max-Forwards: 10.
> > Expires: 3000.
> > Content-Length: 0.
> > Path: .
> > .
> >
> > #
> > U 127.0.1.101:5060 -> 127.0.1.103:5060
> > KDMQ sip:usrloc@127.0.1.103:5060 SIP/2.0.
> > Via: SIP/2.0/UDP
> > 127.0.1.101;branch=z9hG4bKdd91.f90e0903.0.
> > To: .
> > From:  > >;tag=36786f8e01b2230090da58c495caeae0-9338.
> > CSeq: 10 KDMQ.
> > Call-ID: 567aa40265453df7-29439@127.0.1.101.
> > Content-Length: 304.
> > User-Agent: kamailio (5.1.0 (x86_64/linux)).
> > Max-Forwards: 1.
> > Content-Type: application/json.
> > .
> > {"action":1,"aor":"10001","ruid":"uloc-5a3891cf-72ff-1","c":"
> > sip:10001-1@1.1.1.2:5061","received":"","path":"","callid":"
> > 2-29823@127.0.1.1
> >
> ","user_agent":"n/a","instance":"","expires":1513660874,"cseq":1,"flags":0,"cflags":0,"q":-1,"last_modified":1513657874,"methods":4294967295,"reg_id":0,"server_id":0}
> > #
> > U 127.0.1.101:5060 -> 127.0.0.1:5061
> > SIP/2.0 200 OK.
> > Via: SIP/2.0/UDP 127.0.1.1:5061
> ;branch=z9hG4bK-29823-2-0;received=127.0.0.1.
> > Via: SIP/2.0/UDP 1.1.1.2:5061;branch=z9hG4bK-29823-2-0.
> > From: ;tag=2.
> > To: ;tag=3a03bde2e7478628969f6eb67250a042.25c7.
> > Call-ID: 2-29823@127.0.1.1.
> > CSeq: 1 REGISTER.
> > Contact: ;expires=3000,
> > ;expires=1917,
> > ;expires=1917,  > >;expires=1917.
> > Server: kamailio (5.1.0 (x86_64/linux)).
> > Content-Length: 0.
> > .
> >
> >
> >
> >
> > On Mon, Dec 18, 2017 at 8:26 PM, Alex Balashov <
> abalas...@evaristesys.com>
> > wrote:
> >
> > > Hello Julien,
> > >
> > > On Mon, Dec 18, 2017 at 08:17:54PM -0800, Julien Chavanton wrote:
> > >
> > > > Hi Alex, I have done some tests in a lab with dmq usrloc,
> > >
> > > Thank you for that!
> > >
> > > > With almost the same settings, only 2 servers using DMQ, the
> contacts are
> > > > written into postgres when replicated, I wonder what is the problem
> you
> > > are
> > > > facing ?
> > >
> > > I wonder that too. :-) What version of PG?
> > >
> > > > Maybe double check the DB schema, just in case ?
> > > > ../kamailio/utils/kamctl/postgres/usrloc-create.sql
> > >
> > > Yep, that's one of the first things I did. It's 100% conformant.
> > >
> > > Also, usrloc db_mode 3 without dmq_usrloc works just fine. This is
> > > something highly specific to dmq_usrloc.
> > >
> > > > Maybe you could send the trace of the SIP REGISTER to emulate it in
> the
> > > > test.
> > >
> > > I'm just testing pretty standard registrations from Bria on Android.
> > >
> > > -- Alex
> > >
> > > --
> > > Alex Balashov | Principal | Evariste Systems LLC
> > >
> > > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> > > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> > >
> > > ___
> > > Kamailio (SER) - Users Mailing List
> > > sr-users@lists.kamailio.org
> > > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> > >
>
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, 

Re: [SR-Users] dmq_usrloc, usrloc:db_mode 3, and PostgreSQL

2017-12-18 Thread Alex Balashov
Julien,

I am running PG 10. That is the only difference I can discern thus far,
but let me compare your notes to mine and see if I can spot anything.

Thank you very much for your testing and assistance!

On Mon, Dec 18, 2017 at 08:33:26PM -0800, Julien Chavanton wrote:

> kamailio510=# SELECT version();
> 
> version
> -
>  PostgreSQL 9.5.6 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu
> 4.8.2-19ubuntu1) 4.8.2, 64-bit
> (1 row)
> 
> 
> 
> #
> U 127.0.0.1:5061 -> 127.0.1.101:5060
> REGISTER sip:flowroute.com SIP/2.0.
> Via: SIP/2.0/UDP 127.0.1.1:5061;branch=z9hG4bK-29823-2-0.
> Via: SIP/2.0/UDP 1.1.1.2:5061;branch=z9hG4bK-29823-2-0.
> From: ;tag=2.
> To: .
> Call-ID: 2-29823@127.0.1.1.
> CSeq: 1 REGISTER.
> Contact: sip:10001-1@1.1.1.2:5061.
> Max-Forwards: 10.
> Expires: 3000.
> Content-Length: 0.
> Path: .
> .
> 
> #
> U 127.0.1.101:5060 -> 127.0.1.103:5060
> KDMQ sip:usrloc@127.0.1.103:5060 SIP/2.0.
> Via: SIP/2.0/UDP
> 127.0.1.101;branch=z9hG4bKdd91.f90e0903.0.
> To: .
> From:  >;tag=36786f8e01b2230090da58c495caeae0-9338.
> CSeq: 10 KDMQ.
> Call-ID: 567aa40265453df7-29439@127.0.1.101.
> Content-Length: 304.
> User-Agent: kamailio (5.1.0 (x86_64/linux)).
> Max-Forwards: 1.
> Content-Type: application/json.
> .
> {"action":1,"aor":"10001","ruid":"uloc-5a3891cf-72ff-1","c":"
> sip:10001-1@1.1.1.2:5061","received":"","path":"","callid":"
> 2-29823@127.0.1.1
> ","user_agent":"n/a","instance":"","expires":1513660874,"cseq":1,"flags":0,"cflags":0,"q":-1,"last_modified":1513657874,"methods":4294967295,"reg_id":0,"server_id":0}
> #
> U 127.0.1.101:5060 -> 127.0.0.1:5061
> SIP/2.0 200 OK.
> Via: SIP/2.0/UDP 127.0.1.1:5061;branch=z9hG4bK-29823-2-0;received=127.0.0.1.
> Via: SIP/2.0/UDP 1.1.1.2:5061;branch=z9hG4bK-29823-2-0.
> From: ;tag=2.
> To: ;tag=3a03bde2e7478628969f6eb67250a042.25c7.
> Call-ID: 2-29823@127.0.1.1.
> CSeq: 1 REGISTER.
> Contact: ;expires=3000,
> ;expires=1917,
> ;expires=1917,  >;expires=1917.
> Server: kamailio (5.1.0 (x86_64/linux)).
> Content-Length: 0.
> .
> 
> 
> 
> 
> On Mon, Dec 18, 2017 at 8:26 PM, Alex Balashov 
> wrote:
> 
> > Hello Julien,
> >
> > On Mon, Dec 18, 2017 at 08:17:54PM -0800, Julien Chavanton wrote:
> >
> > > Hi Alex, I have done some tests in a lab with dmq usrloc,
> >
> > Thank you for that!
> >
> > > With almost the same settings, only 2 servers using DMQ, the contacts are
> > > written into postgres when replicated, I wonder what is the problem you
> > are
> > > facing ?
> >
> > I wonder that too. :-) What version of PG?
> >
> > > Maybe double check the DB schema, just in case ?
> > > ../kamailio/utils/kamctl/postgres/usrloc-create.sql
> >
> > Yep, that's one of the first things I did. It's 100% conformant.
> >
> > Also, usrloc db_mode 3 without dmq_usrloc works just fine. This is
> > something highly specific to dmq_usrloc.
> >
> > > Maybe you could send the trace of the SIP REGISTER to emulate it in the
> > > test.
> >
> > I'm just testing pretty standard registrations from Bria on Android.
> >
> > -- Alex
> >
> > --
> > Alex Balashov | Principal | Evariste Systems LLC
> >
> > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> >
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> >

> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc, usrloc:db_mode 3, and PostgreSQL

2017-12-18 Thread Julien Chavanton
kamailio510=# SELECT version();

version
-
 PostgreSQL 9.5.6 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu
4.8.2-19ubuntu1) 4.8.2, 64-bit
(1 row)



#
U 127.0.0.1:5061 -> 127.0.1.101:5060
REGISTER sip:flowroute.com SIP/2.0.
Via: SIP/2.0/UDP 127.0.1.1:5061;branch=z9hG4bK-29823-2-0.
Via: SIP/2.0/UDP 1.1.1.2:5061;branch=z9hG4bK-29823-2-0.
From: ;tag=2.
To: .
Call-ID: 2-29823@127.0.1.1.
CSeq: 1 REGISTER.
Contact: sip:10001-1@1.1.1.2:5061.
Max-Forwards: 10.
Expires: 3000.
Content-Length: 0.
Path: .
.

#
U 127.0.1.101:5060 -> 127.0.1.103:5060
KDMQ sip:usrloc@127.0.1.103:5060 SIP/2.0.
Via: SIP/2.0/UDP
127.0.1.101;branch=z9hG4bKdd91.f90e0903.0.
To: .
From: ;tag=36786f8e01b2230090da58c495caeae0-9338.
CSeq: 10 KDMQ.
Call-ID: 567aa40265453df7-29439@127.0.1.101.
Content-Length: 304.
User-Agent: kamailio (5.1.0 (x86_64/linux)).
Max-Forwards: 1.
Content-Type: application/json.
.
{"action":1,"aor":"10001","ruid":"uloc-5a3891cf-72ff-1","c":"
sip:10001-1@1.1.1.2:5061","received":"","path":"","callid":"
2-29823@127.0.1.1
","user_agent":"n/a","instance":"","expires":1513660874,"cseq":1,"flags":0,"cflags":0,"q":-1,"last_modified":1513657874,"methods":4294967295,"reg_id":0,"server_id":0}
#
U 127.0.1.101:5060 -> 127.0.0.1:5061
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 127.0.1.1:5061;branch=z9hG4bK-29823-2-0;received=127.0.0.1.
Via: SIP/2.0/UDP 1.1.1.2:5061;branch=z9hG4bK-29823-2-0.
From: ;tag=2.
To: ;tag=3a03bde2e7478628969f6eb67250a042.25c7.
Call-ID: 2-29823@127.0.1.1.
CSeq: 1 REGISTER.
Contact: ;expires=3000,
;expires=1917,
;expires=1917, ;expires=1917.
Server: kamailio (5.1.0 (x86_64/linux)).
Content-Length: 0.
.




On Mon, Dec 18, 2017 at 8:26 PM, Alex Balashov 
wrote:

> Hello Julien,
>
> On Mon, Dec 18, 2017 at 08:17:54PM -0800, Julien Chavanton wrote:
>
> > Hi Alex, I have done some tests in a lab with dmq usrloc,
>
> Thank you for that!
>
> > With almost the same settings, only 2 servers using DMQ, the contacts are
> > written into postgres when replicated, I wonder what is the problem you
> are
> > facing ?
>
> I wonder that too. :-) What version of PG?
>
> > Maybe double check the DB schema, just in case ?
> > ../kamailio/utils/kamctl/postgres/usrloc-create.sql
>
> Yep, that's one of the first things I did. It's 100% conformant.
>
> Also, usrloc db_mode 3 without dmq_usrloc works just fine. This is
> something highly specific to dmq_usrloc.
>
> > Maybe you could send the trace of the SIP REGISTER to emulate it in the
> > test.
>
> I'm just testing pretty standard registrations from Bria on Android.
>
> -- Alex
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc, usrloc:db_mode 3, and PostgreSQL

2017-12-18 Thread Alex Balashov
Hello Julien,

On Mon, Dec 18, 2017 at 08:17:54PM -0800, Julien Chavanton wrote:

> Hi Alex, I have done some tests in a lab with dmq usrloc,

Thank you for that!

> With almost the same settings, only 2 servers using DMQ, the contacts are
> written into postgres when replicated, I wonder what is the problem you are
> facing ?

I wonder that too. :-) What version of PG? 

> Maybe double check the DB schema, just in case ?
> ../kamailio/utils/kamctl/postgres/usrloc-create.sql

Yep, that's one of the first things I did. It's 100% conformant.

Also, usrloc db_mode 3 without dmq_usrloc works just fine. This is
something highly specific to dmq_usrloc.

> Maybe you could send the trace of the SIP REGISTER to emulate it in the
> test.

I'm just testing pretty standard registrations from Bria on Android. 

-- Alex

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc, usrloc:db_mode 3, and PostgreSQL

2017-12-18 Thread Julien Chavanton
Hi Alex, I have done some tests in a lab with dmq usrloc,

--
version: kamailio 5.1.0 (x86_64/linux)

commit 28011aa9fdca7012103506d9a437c8e44dc8963c
Author: Daniel-Constantin Mierla 
Date:   Mon Dec 11 16:31:31 2017 +0100
--

With almost the same settings, only 2 servers using DMQ, the contacts are
written into postgres when replicated, I wonder what is the problem you are
facing ?

Maybe double check the DB schema, just in case ?
../kamailio/utils/kamctl/postgres/usrloc-create.sql


Maybe you could send the trace of the SIP REGISTER to emulate it in the
test.



The config I modified to try to test yours :

# - usrloc params -
modparam("usrloc", "db_url", "postgres://
postgres:cacao@127.0.0.1:5432/kamailio510")
modparam("usrloc", "db_mode", 3)
modparam("usrloc", "db_load", 0)
#modparam("usrloc", "db_insert_update", 1)
modparam("usrloc", "use_domain", 1)
modparam("usrloc", "nat_bflag", 6)
modparam("usrloc", "matching_mode", 2)
modparam("usrloc", "fetch_rows", 1)
modparam("usrloc", "timer_interval", 5)
modparam("usrloc", "timer_procs", 1)
modparam("usrloc", "db_timer_clean", 1)
modparam("usrloc", "hash_size", 19)
# extra just for testing
modparam("usrloc", "nat_bflag", 1)
modparam("usrloc", "desc_time_order", 0)
modparam("usrloc", "matching_mode", 0)
modparam("usrloc", "cseq_delay", 10)
modparam("usrloc", "fetch_rows", 1000)
modparam("usrloc", "hash_size", 16)

#!ifdef WITH_DMQ
loadmodule "dmq.so"
loadmodule "dmq_usrloc.so"
modparam("dmq", "server_address", "sip:127.0.1.103:5060")
modparam("dmq", "notification_address", "sip:127.0.1.101:5060")
modparam("dmq_usrloc", "enable", 1)
modparam("dmq_usrloc", "batch_size", 512)
modparam("dmq_usrloc", "batch_msg_size", 65536)
modparam("dmq_usrloc", "sync", 1)
#!endif





On Mon, Dec 18, 2017 at 6:00 AM, Alex Balashov 
wrote:

> Hello Charles,
>
> On Mon, Dec 18, 2017 at 11:50:55AM +, Charles Chance wrote:
>
> > Can you provide your usrloc and dmq_usrloc module parameters please?
>
> Well, naturally!
>
> modparam("usrloc", "nat_bflag", 1)
> modparam("usrloc", "use_domain", 1)
> modparam("usrloc", "db_url", "DB_DRIVER://DB_USER:DB_PASSWORD@DB_HOST
> /DB_NAME")
> modparam("usrloc", "db_mode", 3)
> modparam("usrloc", "desc_time_order", 0)
> #modparam("usrloc", "timer_interval", 60)
> modparam("usrloc", "matching_mode", 0)
> modparam("usrloc", "cseq_delay", 10)
> modparam("usrloc", "fetch_rows", 1000)
> modparam("usrloc", "hash_size", 16)
> modparam("usrloc", "timer_procs", 1)
>
> modparam("dmq", "server_address", "sip::5060")
> modparam("dmq", "notification_address", "sip:evaristesys-testbed-2:5060")
> modparam("dmq_usrloc", "enable", 1)
> modparam("dmq_usrloc", "batch_size", 512)
> modparam("dmq_usrloc", "batch_msg_size", 65536)
>
> -- Alex
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc, usrloc:db_mode 3, and PostgreSQL

2017-12-18 Thread Alex Balashov
Hello Charles,

On Mon, Dec 18, 2017 at 11:50:55AM +, Charles Chance wrote:

> Can you provide your usrloc and dmq_usrloc module parameters please?

Well, naturally!

modparam("usrloc", "nat_bflag", 1)
modparam("usrloc", "use_domain", 1)
modparam("usrloc", "db_url", "DB_DRIVER://DB_USER:DB_PASSWORD@DB_HOST/DB_NAME")
modparam("usrloc", "db_mode", 3)
modparam("usrloc", "desc_time_order", 0)
#modparam("usrloc", "timer_interval", 60)
modparam("usrloc", "matching_mode", 0)
modparam("usrloc", "cseq_delay", 10)
modparam("usrloc", "fetch_rows", 1000)
modparam("usrloc", "hash_size", 16)
modparam("usrloc", "timer_procs", 1)

modparam("dmq", "server_address", "sip::5060")
modparam("dmq", "notification_address", "sip:evaristesys-testbed-2:5060")
modparam("dmq_usrloc", "enable", 1)
modparam("dmq_usrloc", "batch_size", 512)
modparam("dmq_usrloc", "batch_msg_size", 65536)

-- Alex

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc, usrloc:db_mode 3, and PostgreSQL

2017-12-18 Thread Charles Chance
Hi Alex,

Can you provide your usrloc and dmq_usrloc module parameters please?

Cheers,

Charles


On Fri, 15 Dec 2017 at 20:54, Alex Balashov 
wrote:

> By way of follow-up:
>
> db_mode 1 likewise fails, in the same fashion.
>
> db_mode 2 does work and successfully sync the contact to the DB on
> timer_interval.
>
> So, I suspect this is some sort of race that raises when immediate
> database write-through is required.
>
> On Fri, Dec 15, 2017 at 02:31:06PM -0500, Alex Balashov wrote:
>
> > Hi,
> >
> > Running bleeding-edge branch 5.1 clone here.
> >
> > dmq_usrloc replication works fine when using in-memory only backing for
> > the underlying usrloc module, i.e. db_mode 0. I haven't tried mode 1 and
> > mode 2.
> >
> > I use mode 3, so that contacts are immediately persisted straight to a
> > local database. The database flavour is PostgreSQL in this case.
> >
> > When new contacts replicated via dmq_usrloc come in, I get this in the
> > Kamailio log:
> >
> > Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]:
> ERROR:  [db.c:465]: db_use_table(): invalid parameter value
> > Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]:
> ERROR: usrloc [udomain.c:817]: db_load_urecord_by_ruid(): failed to use
> table location
> > Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]:
> WARNING: dmq_usrloc [usrloc_sync.c:147]: delete_contact(): AOR/Contact not
> found
> > Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]:
> ERROR:  [db.c:465]: db_use_table(): invalid parameter value
> > Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]:
> ERROR: usrloc [udomain.c:817]: db_load_urecord_by_ruid(): failed to use
> table location
> > Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]:
> WARNING: dmq_usrloc [usrloc_sync.c:147]: delete_contact(): AOR/Contact not
> found
> >
> > I added some code to lib/srdb1/db.c to print the parameter name and the
> > location being passed to db_use_table():
> >
> >   */
> >  int db_use_table(db1_con_t* _h, const str* _t)
> >  {
> > +   LM_ERR("DB handle = %p\n", _h);
> > +
> > if (!_h || !_t || !_t->s) {
> > -   LM_ERR("invalid parameter value\n");
> > +   LM_ERR("invalid parameter value %.*s\n", _t->len, _t->s);
> > return -1;
> > }
> >
> > And got this:
> >
> > Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]:
> ERROR:  [db.c:462]: db_use_table(): DB handle = (nil)
> > Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]:
> ERROR:  [db.c:465]: db_use_table(): invalid parameter value location
> > Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]:
> ERROR: usrloc [udomain.c:631]: db_load_urecord(): failed to use table
> location
> > Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]:
> ERROR:  [db.c:462]: db_use_table(): DB handle = (nil)
> > Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]:
> ERROR:  [db.c:465]: db_use_table(): invalid parameter value location
> > Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]:
> ERROR: usrloc [ucontact.c:679]: db_insert_ucontact(): sql use_table failed
> > Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]:
> ERROR: usrloc [urecord.c:582]: insert_ucontact(): failed to insert in
> database
> >
> > So, it appears the DB handle being passed here is NULL is in this
> > situation.
> >
> > The same AOR is present in 'ul.dump' RPC command when using db_mode 0.
> >
> > Please advise? :)
> >
> > -- Alex
> >
> > --
> > Alex Balashov | Principal | Evariste Systems LLC
> >
> > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> >
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>

-- 
Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered 
office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, 
Birmingham Science Park, Birmingham B7 4BB.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dmq_usrloc, usrloc:db_mode 3, and PostgreSQL

2017-12-15 Thread Alex Balashov
By way of follow-up:

db_mode 1 likewise fails, in the same fashion.

db_mode 2 does work and successfully sync the contact to the DB on
timer_interval.

So, I suspect this is some sort of race that raises when immediate
database write-through is required.

On Fri, Dec 15, 2017 at 02:31:06PM -0500, Alex Balashov wrote:

> Hi,
> 
> Running bleeding-edge branch 5.1 clone here.
> 
> dmq_usrloc replication works fine when using in-memory only backing for
> the underlying usrloc module, i.e. db_mode 0. I haven't tried mode 1 and
> mode 2.
> 
> I use mode 3, so that contacts are immediately persisted straight to a
> local database. The database flavour is PostgreSQL in this case.
> 
> When new contacts replicated via dmq_usrloc come in, I get this in the
> Kamailio log:
> 
> Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: 
>  [db.c:465]: db_use_table(): invalid parameter value
> Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: 
> usrloc [udomain.c:817]: db_load_urecord_by_ruid(): failed to use table 
> location
> Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: 
> WARNING: dmq_usrloc [usrloc_sync.c:147]: delete_contact(): AOR/Contact not 
> found
> Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: 
>  [db.c:465]: db_use_table(): invalid parameter value
> Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: 
> usrloc [udomain.c:817]: db_load_urecord_by_ruid(): failed to use table 
> location
> Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: 
> WARNING: dmq_usrloc [usrloc_sync.c:147]: delete_contact(): AOR/Contact not 
> found
> 
> I added some code to lib/srdb1/db.c to print the parameter name and the
> location being passed to db_use_table():
> 
>   */
>  int db_use_table(db1_con_t* _h, const str* _t)
>  {
> +   LM_ERR("DB handle = %p\n", _h);
> +
> if (!_h || !_t || !_t->s) {
> -   LM_ERR("invalid parameter value\n");
> +   LM_ERR("invalid parameter value %.*s\n", _t->len, _t->s);
> return -1;
> }
> 
> And got this:
> 
> Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: 
>  [db.c:462]: db_use_table(): DB handle = (nil)
> Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: 
>  [db.c:465]: db_use_table(): invalid parameter value location
> Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: 
> usrloc [udomain.c:631]: db_load_urecord(): failed to use table location
> Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: 
>  [db.c:462]: db_use_table(): DB handle = (nil)
> Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: 
>  [db.c:465]: db_use_table(): invalid parameter value location
> Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: 
> usrloc [ucontact.c:679]: db_insert_ucontact(): sql use_table failed
> Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: 
> usrloc [urecord.c:582]: insert_ucontact(): failed to insert in database
> 
> So, it appears the DB handle being passed here is NULL is in this
> situation.
> 
> The same AOR is present in 'ul.dump' RPC command when using db_mode 0. 
> 
> Please advise? :)
> 
> -- Alex
> 
> -- 
> Alex Balashov | Principal | Evariste Systems LLC
> 
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> 
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] dmq_usrloc, usrloc:db_mode 3, and PostgreSQL

2017-12-15 Thread Alex Balashov
Hi,

Running bleeding-edge branch 5.1 clone here.

dmq_usrloc replication works fine when using in-memory only backing for
the underlying usrloc module, i.e. db_mode 0. I haven't tried mode 1 and
mode 2.

I use mode 3, so that contacts are immediately persisted straight to a
local database. The database flavour is PostgreSQL in this case.

When new contacts replicated via dmq_usrloc come in, I get this in the
Kamailio log:

Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: 
 [db.c:465]: db_use_table(): invalid parameter value
Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: 
usrloc [udomain.c:817]: db_load_urecord_by_ruid(): failed to use table location
Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: WARNING: 
dmq_usrloc [usrloc_sync.c:147]: delete_contact(): AOR/Contact not found
Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: 
 [db.c:465]: db_use_table(): invalid parameter value
Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: 
usrloc [udomain.c:817]: db_load_urecord_by_ruid(): failed to use table location
Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: WARNING: 
dmq_usrloc [usrloc_sync.c:147]: delete_contact(): AOR/Contact not found

I added some code to lib/srdb1/db.c to print the parameter name and the
location being passed to db_use_table():

  */
 int db_use_table(db1_con_t* _h, const str* _t)
 {
+   LM_ERR("DB handle = %p\n", _h);
+
if (!_h || !_t || !_t->s) {
-   LM_ERR("invalid parameter value\n");
+   LM_ERR("invalid parameter value %.*s\n", _t->len, _t->s);
return -1;
}

And got this:

Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: 
 [db.c:462]: db_use_table(): DB handle = (nil)
Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: 
 [db.c:465]: db_use_table(): invalid parameter value location
Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: 
usrloc [udomain.c:631]: db_load_urecord(): failed to use table location
Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: 
 [db.c:462]: db_use_table(): DB handle = (nil)
Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: 
 [db.c:465]: db_use_table(): invalid parameter value location
Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: 
usrloc [ucontact.c:679]: db_insert_ucontact(): sql use_table failed
Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: 
usrloc [urecord.c:582]: insert_ucontact(): failed to insert in database

So, it appears the DB handle being passed here is NULL is in this
situation.

The same AOR is present in 'ul.dump' RPC command when using db_mode 0. 

Please advise? :)

-- Alex

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Dmq_usrloc

2017-11-14 Thread sofos koko
Hi ...i would like to connect two kamailio in diffwrent network so i can get 
call from one to another is any kamailio.cfg example to help me do it!
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users