[OpenSIPS-Users] Load_Balancing

David Villasmil david.villasmil.work at gmail.com
Fri Sep 9 12:32:21 UTC 2022


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 <bogdan at opensips.org>
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 <bogdan at opensips.org>
> написал(а):
> >>
> >> 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 <bogdan at opensips.org>
> написал(а):
> >>>>
> >>>> 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 at lists.opensips.org
> >>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >>>> _______________________________________________
> >>>> Users mailing list
> >>>> Users at lists.opensips.org
> >>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >>> _______________________________________________
> >>> Users mailing list
> >>> Users at lists.opensips.org
> >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-- 
Regards,

David Villasmil
email: david.villasmil.work at gmail.com
phone: +34669448337
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20220909/1d58c752/attachment-0001.html>


More information about the Users mailing list