Skip to content

Commit

Permalink
uid_gflags Update README (SER => Kamailio)
Browse files Browse the repository at this point in the history
  • Loading branch information
oej committed Jan 17, 2015
1 parent 03792bb commit 6429161
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 57 deletions.
76 changes: 37 additions & 39 deletions modules/uid_gflags/README
@@ -1,12 +1,11 @@

UID Gflags Module

Jiri Kuthan

<jiri@iptel.org>

Copyright � 2004 FhG FOKUS
_________________________________________________________________
__________________________________________________________________

Table of Contents

Expand All @@ -24,7 +23,7 @@ Jiri Kuthan
3.3. is_ugflag(flag_num)

4. FIFO Interface
5. XMLRPC Interface
5. RPC Interface

List of Examples

Expand All @@ -47,37 +46,37 @@ Chapter 1. Admin Guide
3.3. is_ugflag(flag_num)

4. FIFO Interface
5. XMLRPC Interface
5. RPC Interface

1. Overview

The module implements global flags. The difference between the global
flags and flags that can be used in the configuration file or AVPs is
that they the scope of the global flags is not limited to the SIP
message or transaction being processed. Global flags are always
The module implements global flags. The difference between the global
flags and flags that can be used in the configuration file or AVPs is
that they the scope of the global flags is not limited to the SIP
message or transaction being processed. Global flags are always
available, their contents is not forgotten when a SIP transaction gets
destroyed in SER.
destroyed in Kamailio.

Global flags can be accessed from the configuration script, for
Global flags can be accessed from the configuration script, for
example:
if (is_ugflag("1")) {
t_relay_to_udp("10.0.0.1", "5060");
} else {
t_relay_to_udp("10.0.0.2", "5060");
};

The value of the global flags can be manipulated by external tools
such as the web interface of SER or cmd line administration tools. One
particular application of global flags could be runtime configuration
changes without the need to restart SER.
The value of the global flags can be manipulated by external tools such
as the web interface of Kamailio or cmd line administration tools. One
particular application of global flags could be runtime configuration
changes without the need to restart Kamailio.

2. Parameters

2.1. initial (integer)

2.1. initial (integer)

The initial value of global flags. Each bit in the integer represents
The initial value of global flags. Each bit in the integer represents
one flag.

Default value is 0.
Expand All @@ -90,8 +89,8 @@ if (is_ugflag("1")) {

3.1. set_gflag(flag_num)

Set the flag identified by flag_num to 1. The range of flag_num is 0
to 31.
Set the flag identified by flag_num to 1. The range of flag_num is 0 to
31.

Example 1.1. set_ugflag usage
...
Expand All @@ -100,8 +99,8 @@ set_ugflag("2");

3.2. reset_ugflag(flag_num)

Set the flag identified by flag_num to 0. The range of flag_num is 0
to 31.
Set the flag identified by flag_num to 0. The range of flag_num is 0 to
31.

Example 1.2. reset_ugflag usage
...
Expand All @@ -110,38 +109,37 @@ reset_ugflag("2");

3.3. is_ugflag(flag_num)

Returns 1 when flag identified by flag_num is set, 0 otherwise. The
Returns 1 when flag identified by flag_num is set, 0 otherwise. The
range of flag_num parameter is 0 to 31.

4. FIFO Interface

The state of the global flags can be read and modified over the FIFO
interface of SER. This module implements the following FIFO interface
functions:
The state of the global flags can be read and modified over the FIFO
interface of Kamailio. This module implements the following FIFO
interface functions:
* set_gflag - Set the value of a flag to 1. The function accepts one
parameter which is the number of the flag to be set.
* reset_gflag - Reset the value of a flag to 0. The function accepts
one parameter which is the number of the flag to be reset.
* is_gflag - Return the status of a flag. The FIFO function would
return TRUE if the flag is set and FALSE if it is not set. The
only parameter of this function is the number of the flag.

5. XMLRPC Interface

The state of the global flags can be read and modified over the XMLRPC
interface. This module implements the following XMLRPC interface
commands:
* gflags.set - Set the value of a flag to 1. The function accepts
one parameter which is the number of the flag to be set.
* gflags.reset - Reset the value of a flag to 0. The function
accepts one parameter which is the number of the flag to be reset.
* gflags.is_set - Return the status of a flag. The FIFO function
would return TRUE if the flag is set and FALSE if it is not set.
* is_gflag - Return the status of a flag. The FIFO function would
return TRUE if the flag is set and FALSE if it is not set. The only
parameter of this function is the number of the flag.

5. RPC Interface

The state of the global flags can be read and modified over the RPC
interface. This module implements the following RPC interface commands:
* gflags.set - Set the value of a flag to 1. The function accepts one
parameter which is the number of the flag to be set.
* gflags.reset - Reset the value of a flag to 0. The function accepts
one parameter which is the number of the flag to be reset.
* gflags.is_set - Return the status of a flag. The FIFO function
would return TRUE if the flag is set and FALSE if it is not set.
The only parameter of this function is the number of the flag.
* gflags.flush - Flush the state of global flags into database.
* gflags.dump - Return the status of all flags. The value is TRUE if
the flag is set and FALSE if the flag is not set. The function has
no parameters.
* global.reload - Reload values from global_attrs DB table. This
* global.reload - Reload values from global_attrs DB table. This
function does not have any parameters. There is no return value on
success.
12 changes: 9 additions & 3 deletions modules/uid_gflags/doc/fifo.xml
@@ -1,6 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [

<!-- Include general documentation entities -->
<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
%docentities;

]>

<section id="gflags.fifo" xmlns:xi="http://www.w3.org/2001/XInclude">
<sectioninfo>
Expand All @@ -10,7 +16,7 @@

<para>
The state of the global flags can be read and modified over the FIFO
interface of SER. This module implements the following FIFO interface
interface of &kamailio;. This module implements the following FIFO interface
functions:
</para>
<itemizedlist>
Expand Down
10 changes: 8 additions & 2 deletions modules/uid_gflags/doc/functions.xml
@@ -1,6 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [

<!-- Include general documentation entities -->
<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
%docentities;

]>

<section id="uid_gflags.functions" xmlns:xi="http://www.w3.org/2001/XInclude">
<sectioninfo>
Expand Down
12 changes: 9 additions & 3 deletions modules/uid_gflags/doc/params.xml
@@ -1,14 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [

<!-- Include general documentation entities -->
<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
%docentities;

]>

<section id="gflags.parameters" xmlns:xi="http://www.w3.org/2001/XInclude">
<sectioninfo>
</sectioninfo>

<title>Parameters</title>

<section id="initial">
<section id="gflags.p.initial">
<title><varname>initial</varname> (integer)</title>
<para>
The initial value of global flags. Each bit in the integer
Expand Down
16 changes: 11 additions & 5 deletions modules/uid_gflags/doc/uid_gflags.xml
@@ -1,6 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [

<!-- Include general documentation entities -->
<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
%docentities;

]>

<book id="gflags" xmlns:xi="http://www.w3.org/2001/XInclude">
<bookinfo>
Expand Down Expand Up @@ -29,7 +35,7 @@
or AVPs is that they the scope of the global flags is not limited
to the SIP message or transaction being processed. Global flags are
always available, their contents is not forgotten when a SIP
transaction gets destroyed in SER.
transaction gets destroyed in &kamailio;.
</para>
<para>
Global flags can be accessed from the configuration script, for example:
Expand All @@ -43,9 +49,9 @@ if (is_ugflag("1")) {
</programlisting>
<para>
The value of the global flags can be manipulated by external tools
such as the web interface of SER or cmd line administration
such as the web interface of &kamailio; or cmd line administration
tools. One particular application of global flags could be runtime
configuration changes without the need to restart SER.
configuration changes without the need to restart &kamailio;.
</para>
</section>

Expand Down
16 changes: 11 additions & 5 deletions modules/uid_gflags/doc/xmlrpc.xml
@@ -1,16 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [

<!-- Include general documentation entities -->
<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
%docentities;

]>

<section id="gflags.xmlrpc" xmlns:xi="http://www.w3.org/2001/XInclude">
<sectioninfo>
</sectioninfo>

<title>XMLRPC Interface</title>
<title>RPC Interface</title>

<para>
The state of the global flags can be read and modified over the XMLRPC
interface. This module implements the following XMLRPC interface commands:
The state of the global flags can be read and modified over the RPC
interface. This module implements the following RPC interface commands:
</para>
<itemizedlist>
<listitem>
Expand Down

0 comments on commit 6429161

Please sign in to comment.