Thanks Ovidiu, that was it! Didn't register one was a bitmask and the other the position.
Regards, David Villasmil email: [email protected] phone: +34669448337 On Thu, Jun 10, 2021 at 2:11 AM Ovidiu Sas <[email protected]> wrote: > Read the docs. > In the script, the argument is the position of the flag. > Via MI, the argument is a bitmask. > > -ovidiu > > On Wed, Jun 9, 2021 at 6:33 PM David Villasmil > <[email protected]> wrote: > > > > So I'm trying to use gflags.so in 2.4.7 > > > > I set the module as: > > > > loadmodule "gflags.so" > > modparam("gflags", "initial", 0) > > > > then i'm doing: > > > > if (is_gflag("1")) { > > xlog("L_ERR", "[$ci][$rm]: gflag(1) is set\n"); > > } else { > > xlog("L_ERR", "[$ci][$rm]: gflag(1) is not set\n"); > > } > > > > Then, via CLI I'm setting the flag like so: > > > > # opensipsctl fifo is_gflag "1" > > FALSE > > > > And is set it with: > > > > # opensipsctl fifo set_gflag "1" > > > > and check it is actually set: > > > > # opensipsctl fifo is_gflag "1" > > TRUE > > > > But no matter what i do, the script always sees the flag as not set. > > > > Did I misunderstand the purpose of the module? I want to be able to set > the flag dynamically from the CLI to enable/disable a feature at runtime... > is this not possible? > > > > thanks guys. > > > > Regards, > > > > David Villasmil > > email: [email protected] > > phone: +34669448337 > > > > > > On Wed, Jun 9, 2021 at 8:55 PM David Villasmil < > [email protected]> wrote: > >> > >> gflags! > >> > >> Regards, > >> > >> David Villasmil > >> email: [email protected] > >> phone: +34669448337 > >> > >> > >> On Wed, Jun 9, 2021 at 5:05 PM David Villasmil < > [email protected]> wrote: > >>> > >>> Hello guys, > >>> > >>> On 2.4 is it possible to set a flag at runtime? I want to set a > feature toggle based on that. > >>> > >>> Regards, > >>> > >>> David Villasmil > >>> email: [email protected] > >>> phone: +34669448337 > > > > _______________________________________________ > > Users mailing list > > [email protected] > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > -- > VoIP Embedded, Inc. > http://www.voipembedded.com > > _______________________________________________ > Users mailing list > [email protected] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users >
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
