Re: [OpenSIPS-Users] Load_Balancing

2022-09-13 Thread Vadim Dumalekov via Users
Hello!

Thanks! But I stayed with the LB-module and CacheDB-local. It works well!


Best regards!

 
> 9 сент. 2022 г., в 15:32, David Villasmil  
> написал(а):
> 
> Agreed, just go with dispatcher (I usually do random, which distributes the 
> calls pretty well)
> 
> On Fri, 9 Sep 2022 at 12:00, Bogdan-Andrei Iancu  > wrote:
> Vadim,
> 
> The 2 INVITE requests are not part of the same dialog, so you cannot use 
> dlg_val's - each initial INVITE is creating a different dialog.
> 
> Now, if you really want, you can rely on the fact that the 2 INVITEs 
> have the same call-id and and use the cachedb_local to remember which 
> Ast box handled the first INVITE. But this somehow will invalidate the 
> whole idea of balancing calls.
> 
> Regards,
> 
> Bogdan-Andrei Iancu
> 
> OpenSIPS Founder and Developer
>https://www.opensips-solutions.com 
> OpenSIPS Summit 27-30 Sept 2022, Athens
>https://www.opensips.org/events/Summit-2022Athens/ 
> 
> 
> On 9/9/22 10:44 AM, Vadim Dumalekov wrote:
> > Thanks!
> >
> > I have one more question. Why can't the dlg_val be set in this case.
> > This variable (dlg_val) is not passed to the second INVITE, although it is 
> > a SIP Dialog (INVITE -> 401 -> ACK -> INVITE ...)
> >
> >
> >> 9 сент. 2022 г., в 9:14, Bogdan-Andrei Iancu  >> > написал(а):
> >>
> >> Hi,
> >>
> >> Considering the fact that Ast_2 cannot perform auth on a challenge done by 
> >> Ast_1, you should re-consider the routing logic in OpenSIPS, and not to 
> >> use LB, but rather dispatcher with hashing over call-id for example.
> >>
> >> Regards,
> >>
> >> Bogdan-Andrei Iancu
> >>
> >> OpenSIPS Founder and Developer
> >>   https://www.opensips-solutions.com 
> >> OpenSIPS Summit 27-30 Sept 2022, Athens
> >>   https://www.opensips.org/events/Summit-2022Athens/ 
> >> 
> >>
> >> On 9/8/22 1:43 PM, Vadim Dumalekov via Users wrote:
> >>> Thank you for the answer!
> >>>
> >>> Yes, of cource. But there is this situation:
> >>>
> >>> UAC (INVITE w/o auth)  ->  OpenSIPS (LB: Ast_1)  ->  Ast_1 (401 Unauth)
> >>> UAC (INVITE with auth)  ->  OpenSIPS (LB: Ast_2)  ->  Ast_2 (401 Unauth)
> >>>
> >>> ... etc, until LB selects the same Asterisk for two INVITE`s (w/o auth 
> >>> and with auth).
> >>>
> >>>
> >>> Vadim
> >>>
>  8 сент. 2022 г., в 12:16, Bogdan-Andrei Iancu   > написал(а):
> 
>  Hi Vadim,
> 
>  If you have a cluster of ASterisk servers, each box from the cluster 
>  should be able to handle the auth response, even if the challenge was 
>  done by a different one. Otherwise it is not a cluster, but a bunch of 
>  servers.
> 
>  Regards,
> 
>  Bogdan-Andrei Iancu
> 
>  OpenSIPS Founder and Developer
>    https://www.opensips-solutions.com 
>  
>  OpenSIPS Summit 27-30 Sept 2022, Athens
>    https://www.opensips.org/events/Summit-2022Athens/ 
>  
> 
>  On 9/7/22 3:52 PM, Vadim Dumalekov via Users wrote:
> > Hello!
> >
> > Please help me. I'm using the Load_Balancer module for the incoming 
> > calls to an Asterisk cluster. When an INVITE is sent to one of the 
> > Asterisks, we receive the "401 Unauthorized" message from that server. 
> > But when UAC sends the INVITE with the authorization, the LB-module 
> > sends it to another Asterisk. Sometimes it happens multiple times.
> >
> >
> > Thanks in advance!
> >
> > Vadim.
> >
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org 
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users 
> > 
>  ___
>  Users mailing list
>  Users@lists.opensips.org 
>  http://lists.opensips.org/cgi-bin/mailman/listinfo/users 
>  
> >>> ___
> >>> Users mailing list
> >>> Users@lists.opensips.org 
> >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users 
> >>> 
> 
> 
> ___
> Users mailing list
> Users@lists.opensips.org 
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users 
> 
> -- 
> Regards,
> 
> David Villasmil
> email: david.villasmil.w...@gmail.com 
> phone: 

Re: [OpenSIPS-Users] Load_Balancing

2022-09-09 Thread David Villasmil
Agreed, just go with dispatcher (I usually do random, which distributes the
calls pretty well)

On Fri, 9 Sep 2022 at 12:00, Bogdan-Andrei Iancu 
wrote:

> Vadim,
>
> The 2 INVITE requests are not part of the same dialog, so you cannot use
> dlg_val's - each initial INVITE is creating a different dialog.
>
> Now, if you really want, you can rely on the fact that the 2 INVITEs
> have the same call-id and and use the cachedb_local to remember which
> Ast box handled the first INVITE. But this somehow will invalidate the
> whole idea of balancing calls.
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>https://www.opensips-solutions.com
> OpenSIPS Summit 27-30 Sept 2022, Athens
>https://www.opensips.org/events/Summit-2022Athens/
>
> On 9/9/22 10:44 AM, Vadim Dumalekov wrote:
> > Thanks!
> >
> > I have one more question. Why can't the dlg_val be set in this case.
> > This variable (dlg_val) is not passed to the second INVITE, although it
> is a SIP Dialog (INVITE -> 401 -> ACK -> INVITE ...)
> >
> >
> >> 9 сент. 2022 г., в 9:14, Bogdan-Andrei Iancu 
> написал(а):
> >>
> >> Hi,
> >>
> >> Considering the fact that Ast_2 cannot perform auth on a challenge done
> by Ast_1, you should re-consider the routing logic in OpenSIPS, and not to
> use LB, but rather dispatcher with hashing over call-id for example.
> >>
> >> Regards,
> >>
> >> Bogdan-Andrei Iancu
> >>
> >> OpenSIPS Founder and Developer
> >>   https://www.opensips-solutions.com
> >> OpenSIPS Summit 27-30 Sept 2022, Athens
> >>   https://www.opensips.org/events/Summit-2022Athens/
> >>
> >> On 9/8/22 1:43 PM, Vadim Dumalekov via Users wrote:
> >>> Thank you for the answer!
> >>>
> >>> Yes, of cource. But there is this situation:
> >>>
> >>> UAC (INVITE w/o auth)  ->  OpenSIPS (LB: Ast_1)  ->  Ast_1 (401 Unauth)
> >>> UAC (INVITE with auth)  ->  OpenSIPS (LB: Ast_2)  ->  Ast_2 (401
> Unauth)
> >>>
> >>> ... etc, until LB selects the same Asterisk for two INVITE`s (w/o auth
> and with auth).
> >>>
> >>>
> >>> Vadim
> >>>
>  8 сент. 2022 г., в 12:16, Bogdan-Andrei Iancu 
> написал(а):
> 
>  Hi Vadim,
> 
>  If you have a cluster of ASterisk servers, each box from the cluster
> should be able to handle the auth response, even if the challenge was done
> by a different one. Otherwise it is not a cluster, but a bunch of servers.
> 
>  Regards,
> 
>  Bogdan-Andrei Iancu
> 
>  OpenSIPS Founder and Developer
>    https://www.opensips-solutions.com
>  OpenSIPS Summit 27-30 Sept 2022, Athens
>    https://www.opensips.org/events/Summit-2022Athens/
> 
>  On 9/7/22 3:52 PM, Vadim Dumalekov via Users wrote:
> > Hello!
> >
> > Please help me. I'm using the Load_Balancer module for the incoming
> calls to an Asterisk cluster. When an INVITE is sent to one of the
> Asterisks, we receive the "401 Unauthorized" message from that server. But
> when UAC sends the INVITE with the authorization, the LB-module sends it to
> another Asterisk. Sometimes it happens multiple times.
> >
> >
> > Thanks in advance!
> >
> > Vadim.
> >
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>  ___
>  Users mailing list
>  Users@lists.opensips.org
>  http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >>> ___
> >>> Users mailing list
> >>> Users@lists.opensips.org
> >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-- 
Regards,

David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load_Balancing

2022-09-09 Thread Vadim Dumalekov via Users
Thanks!

I have one more question. Why can't the dlg_val be set in this case. 
This variable (dlg_val) is not passed to the second INVITE, although it is a 
SIP Dialog (INVITE -> 401 -> ACK -> INVITE ...) 


> 9 сент. 2022 г., в 9:14, Bogdan-Andrei Iancu  написал(а):
> 
> Hi,
> 
> Considering the fact that Ast_2 cannot perform auth on a challenge done by 
> Ast_1, you should re-consider the routing logic in OpenSIPS, and not to use 
> LB, but rather dispatcher with hashing over call-id for example.
> 
> Regards,
> 
> Bogdan-Andrei Iancu
> 
> OpenSIPS Founder and Developer
>  https://www.opensips-solutions.com
> OpenSIPS Summit 27-30 Sept 2022, Athens
>  https://www.opensips.org/events/Summit-2022Athens/
> 
> On 9/8/22 1:43 PM, Vadim Dumalekov via Users wrote:
>> Thank you for the answer!
>> 
>> Yes, of cource. But there is this situation:
>> 
>> UAC (INVITE w/o auth)  ->  OpenSIPS (LB: Ast_1)  ->  Ast_1 (401 Unauth)
>> UAC (INVITE with auth)  ->  OpenSIPS (LB: Ast_2)  ->  Ast_2 (401 Unauth)
>> 
>> ... etc, until LB selects the same Asterisk for two INVITE`s (w/o auth and 
>> with auth).
>> 
>> 
>> Vadim
>> 
>>> 8 сент. 2022 г., в 12:16, Bogdan-Andrei Iancu  
>>> написал(а):
>>> 
>>> Hi Vadim,
>>> 
>>> If you have a cluster of ASterisk servers, each box from the cluster should 
>>> be able to handle the auth response, even if the challenge was done by a 
>>> different one. Otherwise it is not a cluster, but a bunch of servers.
>>> 
>>> Regards,
>>> 
>>> Bogdan-Andrei Iancu
>>> 
>>> OpenSIPS Founder and Developer
>>>  https://www.opensips-solutions.com
>>> OpenSIPS Summit 27-30 Sept 2022, Athens
>>>  https://www.opensips.org/events/Summit-2022Athens/
>>> 
>>> On 9/7/22 3:52 PM, Vadim Dumalekov via Users wrote:
 Hello!
 
 Please help me. I'm using the Load_Balancer module for the incoming calls 
 to an Asterisk cluster. When an INVITE is sent to one of the Asterisks, we 
 receive the "401 Unauthorized" message from that server. But when UAC 
 sends the INVITE with the authorization, the LB-module sends it to another 
 Asterisk. Sometimes it happens multiple times.
 
 
 Thanks in advance!
 
 Vadim.
 
 
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>> 
>>> ___
>>> Users mailing list
>>> Users@lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> 
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load_Balancing

2022-09-09 Thread Bogdan-Andrei Iancu

Vadim,

The 2 INVITE requests are not part of the same dialog, so you cannot use 
dlg_val's - each initial INVITE is creating a different dialog.


Now, if you really want, you can rely on the fact that the 2 INVITEs 
have the same call-id and and use the cachedb_local to remember which 
Ast box handled the first INVITE. But this somehow will invalidate the 
whole idea of balancing calls.


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 27-30 Sept 2022, Athens
  https://www.opensips.org/events/Summit-2022Athens/

On 9/9/22 10:44 AM, Vadim Dumalekov wrote:

Thanks!

I have one more question. Why can't the dlg_val be set in this case.
This variable (dlg_val) is not passed to the second INVITE, although it is a SIP Dialog 
(INVITE -> 401 -> ACK -> INVITE ...)



9 сент. 2022 г., в 9:14, Bogdan-Andrei Iancu  написал(а):

Hi,

Considering the fact that Ast_2 cannot perform auth on a challenge done by 
Ast_1, you should re-consider the routing logic in OpenSIPS, and not to use LB, 
but rather dispatcher with hashing over call-id for example.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 27-30 Sept 2022, Athens
  https://www.opensips.org/events/Summit-2022Athens/

On 9/8/22 1:43 PM, Vadim Dumalekov via Users wrote:

Thank you for the answer!

Yes, of cource. But there is this situation:

UAC (INVITE w/o auth)  ->  OpenSIPS (LB: Ast_1)  ->  Ast_1 (401 Unauth)
UAC (INVITE with auth)  ->  OpenSIPS (LB: Ast_2)  ->  Ast_2 (401 Unauth)

... etc, until LB selects the same Asterisk for two INVITE`s (w/o auth and with 
auth).


Vadim


8 сент. 2022 г., в 12:16, Bogdan-Andrei Iancu  написал(а):

Hi Vadim,

If you have a cluster of ASterisk servers, each box from the cluster should be 
able to handle the auth response, even if the challenge was done by a different 
one. Otherwise it is not a cluster, but a bunch of servers.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 27-30 Sept 2022, Athens
  https://www.opensips.org/events/Summit-2022Athens/

On 9/7/22 3:52 PM, Vadim Dumalekov via Users wrote:

Hello!

Please help me. I'm using the Load_Balancer module for the incoming calls to an Asterisk 
cluster. When an INVITE is sent to one of the Asterisks, we receive the "401 
Unauthorized" message from that server. But when UAC sends the INVITE with the 
authorization, the LB-module sends it to another Asterisk. Sometimes it happens multiple 
times.


Thanks in advance!

Vadim.


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load_Balancing

2022-09-09 Thread Bogdan-Andrei Iancu

Hi,

Considering the fact that Ast_2 cannot perform auth on a challenge done 
by Ast_1, you should re-consider the routing logic in OpenSIPS, and not 
to use LB, but rather dispatcher with hashing over call-id for example.


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 27-30 Sept 2022, Athens
  https://www.opensips.org/events/Summit-2022Athens/

On 9/8/22 1:43 PM, Vadim Dumalekov via Users wrote:

Thank you for the answer!

Yes, of cource. But there is this situation:

UAC (INVITE w/o auth)  ->  OpenSIPS (LB: Ast_1)  ->  Ast_1 (401 Unauth)
UAC (INVITE with auth)  ->  OpenSIPS (LB: Ast_2)  ->  Ast_2 (401 Unauth)

... etc, until LB selects the same Asterisk for two INVITE`s (w/o auth and with 
auth).


Vadim


8 сент. 2022 г., в 12:16, Bogdan-Andrei Iancu  написал(а):

Hi Vadim,

If you have a cluster of ASterisk servers, each box from the cluster should be 
able to handle the auth response, even if the challenge was done by a different 
one. Otherwise it is not a cluster, but a bunch of servers.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 27-30 Sept 2022, Athens
  https://www.opensips.org/events/Summit-2022Athens/

On 9/7/22 3:52 PM, Vadim Dumalekov via Users wrote:

Hello!

Please help me. I'm using the Load_Balancer module for the incoming calls to an Asterisk 
cluster. When an INVITE is sent to one of the Asterisks, we receive the "401 
Unauthorized" message from that server. But when UAC sends the INVITE with the 
authorization, the LB-module sends it to another Asterisk. Sometimes it happens multiple 
times.


Thanks in advance!

Vadim.


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load_Balancing

2022-09-08 Thread Vadim Dumalekov via Users
Thank you for the answer!

Yes, of cource. But there is this situation:

UAC (INVITE w/o auth)  ->  OpenSIPS (LB: Ast_1)  ->  Ast_1 (401 Unauth)
UAC (INVITE with auth)  ->  OpenSIPS (LB: Ast_2)  ->  Ast_2 (401 Unauth)

... etc, until LB selects the same Asterisk for two INVITE`s (w/o auth and with 
auth).


Vadim

> 8 сент. 2022 г., в 12:16, Bogdan-Andrei Iancu  
> написал(а):
> 
> Hi Vadim,
> 
> If you have a cluster of ASterisk servers, each box from the cluster should 
> be able to handle the auth response, even if the challenge was done by a 
> different one. Otherwise it is not a cluster, but a bunch of servers.
> 
> Regards,
> 
> Bogdan-Andrei Iancu
> 
> OpenSIPS Founder and Developer
>  https://www.opensips-solutions.com
> OpenSIPS Summit 27-30 Sept 2022, Athens
>  https://www.opensips.org/events/Summit-2022Athens/
> 
> On 9/7/22 3:52 PM, Vadim Dumalekov via Users wrote:
>> Hello!
>> 
>> Please help me. I'm using the Load_Balancer module for the incoming calls to 
>> an Asterisk cluster. When an INVITE is sent to one of the Asterisks, we 
>> receive the "401 Unauthorized" message from that server. But when UAC sends 
>> the INVITE with the authorization, the LB-module sends it to another 
>> Asterisk. Sometimes it happens multiple times.
>> 
>> 
>> Thanks in advance!
>> 
>> Vadim.
>> 
>> 
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 
> 
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load_Balancing

2022-09-08 Thread Bogdan-Andrei Iancu

Hi Vadim,

If you have a cluster of ASterisk servers, each box from the cluster 
should be able to handle the auth response, even if the challenge was 
done by a different one. Otherwise it is not a cluster, but a bunch of 
servers.


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 27-30 Sept 2022, Athens
  https://www.opensips.org/events/Summit-2022Athens/

On 9/7/22 3:52 PM, Vadim Dumalekov via Users wrote:

Hello!

Please help me. I'm using the Load_Balancer module for the incoming calls to an Asterisk 
cluster. When an INVITE is sent to one of the Asterisks, we receive the "401 
Unauthorized" message from that server. But when UAC sends the INVITE with the 
authorization, the LB-module sends it to another Asterisk. Sometimes it happens multiple 
times.


Thanks in advance!

Vadim.


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Load_Balancing

2022-09-08 Thread Vadim Dumalekov via Users
Hello!

Please help me. I'm using the Load_Balancer module for the incoming calls to an 
Asterisk cluster. When an INVITE is sent to one of the Asterisks, we receive 
the "401 Unauthorized" message from that server. But when UAC sends the INVITE 
with the authorization, the LB-module sends it to another Asterisk. Sometimes 
it happens multiple times. 


Thanks in advance!

Vadim.


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users