[OpenSIPS-Users] drouting gw list
Ben Newlin
Ben.Newlin at genesys.com
Wed Nov 10 16:16:00 EST 2021
Yes, the default behavior without any flags is to use the GWs in the order they are defined in the DB. So if they are in the DB as
primaryGW,secondaryGW
then the primaryGW will always be selected first, and secondaryGW will only be used if you perform failover in the script, with something like use_next_gw().
Ben Newlin
From: Users <users-bounces at lists.opensips.org> on behalf of David Villasmil <david.villasmil.work at gmail.com>
Date: Wednesday, November 10, 2021 at 11:14 AM
To: OpenSIPS users mailling list <users at lists.opensips.org>
Subject: Re: [OpenSIPS-Users] drouting gw list
Thanks again Ben,
I'm still not understanding: Setting it to <NULL> (as is, nothing) would then only send to the first gw, and only to the second on failure?
Regards,
David Villasmil
email: david.villasmil.work at gmail.com<mailto:david.villasmil.work at gmail.com>
phone: +34669448337
On Wed, Nov 10, 2021 at 2:06 PM Ben Newlin <Ben.Newlin at genesys.com<mailto:Ben.Newlin at genesys.com>> wrote:
Yes, in 2.4 it is controlled by the flags. If you set it to 2 it will only ever use the first gateway and there will be no failover. If you want to allow for failover and use the gateways in the order they are defined you should not set any flags.
https://opensips.org/docs/modules/2.4.x/drouting.html#idp163040<https://opensips.org/docs/modules/2.4.x/drouting.html#idp163040>
Ben Newlin
From: Users <users-bounces at lists.opensips.org<mailto:users-bounces at lists.opensips.org>> on behalf of David Villasmil <david.villasmil.work at gmail.com<mailto:david.villasmil.work at gmail.com>>
Date: Wednesday, November 10, 2021 at 7:50 AM
To: OpenSIPS users mailling list <users at lists.opensips.org<mailto:users at lists.opensips.org>>
Subject: Re: [OpenSIPS-Users] drouting gw list
Sorry,
it's defined in cr_carriers, that's the list of gws which are then defined on dr_gateways.
The "flags" field is "1", which i take to mean weight-based (this is opensips 2.4)
So i would need to set the flags to "2"?
Regards,
David Villasmil
email: david.villasmil.work at gmail.com<mailto:david.villasmil.work at gmail.com>
phone: +34669448337
On Wed, Nov 10, 2021 at 2:56 AM Ben Newlin <Ben.Newlin at genesys.com<mailto:Ben.Newlin at genesys.com>> wrote:
David,
Is this gw_list defined on a dr_rule or a dr_carrier? What is the value of the sort_alg column for that dr_rule/dr_carrier? If the sort_alg is set to W, then the assigned values are interpreted as weights. So with this configuration it would send 100 out of 110 calls to PrimaryGW and 10 out of 110 calls to SecondaryGW.
If you don’t want to use the SecondaryGW except for failover you should not use weighted routing, so you should set the sort_alg column to N.
https://www.opensips.org/Documentation/Install-DBSchema-3-2#GEN-DB-DR-RULES<https://www.opensips.org/Documentation/Install-DBSchema-3-2#GEN-DB-DR-RULES>
Ben Newlin
From: Users <users-bounces at lists.opensips.org<mailto:users-bounces at lists.opensips.org>> on behalf of David Villasmil <david.villasmil.work at gmail.com<mailto:david.villasmil.work at gmail.com>>
Date: Tuesday, November 9, 2021 at 7:37 PM
To: users at lists.opensips.org<mailto:users at lists.opensips.org> <users at lists.opensips.org<mailto:users at lists.opensips.org>>
Subject: [OpenSIPS-Users] drouting gw list
Hello folks,
i have the following gw_list
PrimaryGW=100,SecondaryGW=10
I'm seeing calls going to the SecondaryGW.
How should i set this if i only want the SecondaryGW to be used for failover?
Regards,
David Villasmil
email: david.villasmil.work at gmail.com<mailto:david.villasmil.work at gmail.com>
phone: +34669448337
_______________________________________________
Users mailing list
Users at lists.opensips.org<mailto:Users at lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users<http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
_______________________________________________
Users mailing list
Users at lists.opensips.org<mailto:Users at lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users<http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20211110/07e741c9/attachment.html>
More information about the Users
mailing list