Skip to content

Commit

Permalink
drouting: document the "persistent_state" parameter
Browse files Browse the repository at this point in the history
(cherry picked from commit 24517fd)
  • Loading branch information
liviuchircu committed May 22, 2014
1 parent 3a8fdd9 commit fce034e
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 52 deletions.
119 changes: 67 additions & 52 deletions modules/drouting/README
Expand Up @@ -53,14 +53,15 @@ Anca-Maria Vamanu
1.3.12. define_blacklist (str)
1.3.13. default_group (int)
1.3.14. force_dns (int)
1.3.15. probing_interval (integer)
1.3.16. probing_method (string)
1.3.17. probing_from (string)
1.3.18. probing_reply_codes (string)
1.3.19. use_domain (int)
1.3.20. drg_user_col (str)
1.3.21. drg_domain_col (str)
1.3.22. drg_grpid_col (str)
1.3.15. persistent_state (int)
1.3.16. probing_interval (integer)
1.3.17. probing_method (string)
1.3.18. probing_from (string)
1.3.19. probing_reply_codes (string)
1.3.20. use_domain (int)
1.3.21. drg_user_col (str)
1.3.22. drg_domain_col (str)
1.3.23. drg_grpid_col (str)

1.4. Exported Functions

Expand Down Expand Up @@ -109,24 +110,25 @@ Anca-Maria Vamanu
1.12. Set define_blacklist parameter
1.13. Set default_group parameter
1.14. Set force_dns parameter
1.15. Set probing_interval parameter
1.16. Set probing_method parameter
1.17. Set probing_from parameter
1.18. Set probing_reply_codes parameter
1.19. Set use_domain parameter
1.20. Set drg_user_col parameter
1.21. Set drg_domain_col parameter
1.22. Set drg_grpid_col parameter
1.23. do_routing usage
1.24. route_to_carrier usage
1.25. route_to_gw usage
1.26. use_next_gw usage
1.27. goes_to_gw usage
1.28. is_from_gw usage
1.29. dr_is_gw usage
1.30. dr_disable() usage
1.31. dr_gw_status usage
1.32. dr_carrier_status usage
1.15. Set the persistent_state parameter
1.16. Set probing_interval parameter
1.17. Set probing_method parameter
1.18. Set probing_from parameter
1.19. Set probing_reply_codes parameter
1.20. Set use_domain parameter
1.21. Set drg_user_col parameter
1.22. Set drg_domain_col parameter
1.23. Set drg_grpid_col parameter
1.24. do_routing usage
1.25. route_to_carrier usage
1.26. route_to_gw usage
1.27. use_next_gw usage
1.28. goes_to_gw usage
1.29. is_from_gw usage
1.30. dr_is_gw usage
1.31. dr_disable() usage
1.32. dr_gw_status usage
1.33. dr_carrier_status usage

Chapter 1. Admin Guide

Expand Down Expand Up @@ -563,98 +565,111 @@ modparam("drouting", "default_group", 4)
modparam("drouting", "force_dns", 0)
...

1.3.15. probing_interval (integer)
1.3.15. persistent_state (int)

Specifies whether the state column should be loaded at startup
and flushed during runtime or not.

Default value is “1” (enabled).

Example 1.15. Set the persistent_state parameter
...
# disable all DB operations with the state of a gateway
modparam("drouting", "persistent_state", 0)
...

1.3.16. probing_interval (integer)

How often (in seconds) the probing of a destination should be
done. If set to 0, the probing will be disabled as
functionality (for all destinations)

Default value is “30”.

Example 1.15. Set probing_interval parameter
Example 1.16. Set probing_interval parameter
...
modparam("drouting", "probing_interval", 60)
...

1.3.16. probing_method (string)
1.3.17. probing_method (string)

The SIP method to be used for the probing requests.

Default value is “"OPTIONS"”.

Example 1.16. Set probing_method parameter
Example 1.17. Set probing_method parameter
...
modparam("drouting", "probing_method", "INFO")
...

1.3.17. probing_from (string)
1.3.18. probing_from (string)

The FROM SIP URI to be advertised in the SIP probing requests.

Default value is “"sip:prober@localhost"”.

Example 1.17. Set probing_from parameter
Example 1.18. Set probing_from parameter
...
modparam("drouting", "probing_from", "sip:pinger@192.168.2.10")
...

1.3.18. probing_reply_codes (string)
1.3.19. probing_reply_codes (string)

A comma separted list of SIP reply codes. The codes defined
here will be considered as valid reply codes for probing
messages, apart for 200.

Default value is “NULL”.

Example 1.18. Set probing_reply_codes parameter
Example 1.19. Set probing_reply_codes parameter
...
modparam("drouting", "probing_reply_codes", "501, 403")
...

1.3.19. use_domain (int)
1.3.20. use_domain (int)

Flag to configure whether to use domain match when querying
database for user's routing group.

Default value is “1”.

Example 1.19. Set use_domain parameter
Example 1.20. Set use_domain parameter
...
modparam("drouting", "use_domain", 0)
...

1.3.20. drg_user_col (str)
1.3.21. drg_user_col (str)

The name of the column in group db table where the username is
stored.

Default value is “username”.

Example 1.20. Set drg_user_col parameter
Example 1.21. Set drg_user_col parameter
...
modparam("drouting", "drg_user_col", "user")
...

1.3.21. drg_domain_col (str)
1.3.22. drg_domain_col (str)

The name of the column in group db table where the domain is
stored.

Default value is “domain”.

Example 1.21. Set drg_domain_col parameter
Example 1.22. Set drg_domain_col parameter
...
modparam("drouting", "drg_domain_col", "host")
...

1.3.22. drg_grpid_col (str)
1.3.23. drg_grpid_col (str)

The name of the column in group db table where the group id is
stored.

Default value is “groupid”.

Example 1.22. Set drg_grpid_col parameter
Example 1.23. Set drg_grpid_col parameter
...
modparam("drouting", "drg_grpid_col", "grpid")
...
Expand Down Expand Up @@ -709,7 +724,7 @@ modparam("drouting", "drg_grpid_col", "grpid")
pseudo-variable which will be populated with the attributes
of the matched carrier.

Example 1.23. do_routing usage
Example 1.24. do_routing usage
...
# all groups, sort on order
do_routing();
Expand Down Expand Up @@ -748,7 +763,7 @@ do_routing("2", "F", , , "$var(gw_attributes)");
pseudo-variable which will be populated with the attributes
of this carrier.

Example 1.24. route_to_carrier usage
Example 1.25. route_to_carrier usage
...
if ( route_to_carrier("my_top_carrier", , "$var(carrier_att)") ) {
xlog("Routing to \"my_top_carrier\" - $var(carrier_att)\n");
Expand All @@ -773,7 +788,7 @@ if ( route_to_carrier("my_top_carrier", , "$var(carrier_att)") ) {
pseudo-variable which will be populated with the attributes
of the currently matched gateway.

Example 1.25. route_to_gw usage
Example 1.26. route_to_gw usage
...
if ( route_to_gw("gw_europe") ) {
t_relay();
Expand Down Expand Up @@ -816,7 +831,7 @@ if ( route_to_gw("gw1,gw2,gw3", "$var(gw_attrs)") ) {
pseudo-variable which will be populated with the attributes
of the matched carrier.

Example 1.26. use_next_gw usage
Example 1.27. use_next_gw usage
...
if (use_next_gw()) {
t_relay();
Expand Down Expand Up @@ -866,7 +881,7 @@ if (use_next_gw(, , "$var(carrier_attrs)")) {
pseudo-variable which will be populated with the attributes
of the matched gateway.

Example 1.27. goes_to_gw usage
Example 1.28. goes_to_gw usage
...
if (goes_to_gw("1", , "$var(gw_attrs)")) {
sl_send_reply("403","Forbidden");
Expand Down Expand Up @@ -904,7 +919,7 @@ if (goes_to_gw("1", , "$var(gw_attrs)")) {
pseudo-variable which will be populated with the attributes
of the matched gateway.

Example 1.28. is_from_gw usage
Example 1.29. is_from_gw usage
...
if (is_from_gw("3","1") {
}
Expand Down Expand Up @@ -940,7 +955,7 @@ if (is_from_gw("3","1") {
pseudo-variable which will be populated with the attributes
of the matched gateway.

Example 1.29. dr_is_gw usage
Example 1.30. dr_is_gw usage
...
if (dr_is_gw("$avp(uac)","3") {
}
Expand All @@ -956,7 +971,7 @@ if (dr_is_gw("$avp(uac)","3") {

This function can be used from REQUEST_ROUTE and FAILURE_ROUTE.

Example 1.30. dr_disable() usage
Example 1.31. dr_disable() usage
...
if (t_check_status("(408)|(5[0-9][0-9])")) {
dr_disable();
Expand Down Expand Up @@ -994,7 +1009,7 @@ if (t_check_status("(408)|(5[0-9][0-9])")) {
status (optional)
_empty_line_

Example 1.31. dr_gw_status usage
Example 1.32. dr_gw_status usage
$ ./opensipsctl fifo dr_gw_status 2
Enabled:: no
$ ./opensipsctl fifo dr_gw_status 2 1
Expand All @@ -1018,7 +1033,7 @@ Enabled:: yes
status (optional)
_empty_line_

Example 1.32. dr_carrier_status usage
Example 1.33. dr_carrier_status usage
$ ./opensipsctl fifo dr_carrier_status CR1
Enabled:: no
$ ./opensipsctl fifo dr_carrier_status CR1 1
Expand Down
21 changes: 21 additions & 0 deletions modules/drouting/doc/drouting_admin.xml
Expand Up @@ -707,6 +707,27 @@ modparam("drouting", "force_dns", 0)
</example>
</section>

<section>
<title><varname>persistent_state</varname> (int)</title>
<para>
Specifies whether the <emphasis>state</emphasis> column
should be loaded at startup and flushed during runtime or not.
</para>
<para>
<emphasis>Default value is <quote>1</quote> (enabled).
</emphasis>
</para>
<example>
<title>Set the <varname>persistent_state</varname> parameter</title>
<programlisting format="linespecific">
...
# disable all DB operations with the state of a gateway
modparam("drouting", "persistent_state", 0)
...
</programlisting>
</example>
</section>

<section>
<title><varname>probing_interval</varname> (integer)</title>
<para>
Expand Down

0 comments on commit fce034e

Please sign in to comment.