[OpenSIPS-Users] Problem with gflags

Saint Michael venefax at gmail.com
Thu Oct 27 14:20:12 UTC 2022


Dear friends
I set flag to 1, using
opensips-cli -x mi set_gflag 1
and it works, in fact:

 opensips-cli -x mi get_gflags
{
    "hex": "0x1",
    "dec": "1"
}

but in the code, this test never works:

if (is_gflag(1)) {
xlog("$ci Shutting Down\r\n");
        }
 else {
xlog("$ci Gflag is not 1\r\n");
        }

I only get the second xlog()

The documentation may be wrong, it asks us to use
if (is_gflag("1")) {..}
But opensips fails to start.

How do I test for gflag=1 inside my
route
{

}



More information about the Users mailing list