2
0
Эх сурвалжийг харах

modules: readme files regenerated - siputils ... [skip ci]

Kamailio Dev 8 жил өмнө
parent
commit
39a00f0a52

+ 116 - 98
src/modules/siputils/README

@@ -81,22 +81,23 @@ Gabriel Vasile
               4.11. is_uri_user_e164(pseudo-variable)
               4.11. is_uri_user_e164(pseudo-variable)
               4.12. is_tel_number(tval)
               4.12. is_tel_number(tval)
               4.13. is_numeric(tval)
               4.13. is_numeric(tval)
-              4.14. encode_contact(encoding_prefix,hostpart)
-              4.15. decode_contact()
-              4.16. decode_contact_header()
-              4.17. cmp_uri(str1, str2)
-              4.18. cmp_aor(str1, str2)
-              4.19. append_rpid_hf()
-              4.20. append_rpid_hf(prefix, suffix)
-              4.21. is_rpid_user_e164()
-              4.22. set_uri_user(uri, user)
-              4.23. set_uri_host(uri, host)
-              4.24. is_request()
-              4.25. is_reply()
-              4.26. is_gruu([uri])
-              4.27. is_supported(option)
-              4.28. is_first_hop()
-              4.29. sip_p_charging_vector(flags)
+              4.14. is_alphanum(tval)
+              4.15. encode_contact(encoding_prefix,hostpart)
+              4.16. decode_contact()
+              4.17. decode_contact_header()
+              4.18. cmp_uri(str1, str2)
+              4.19. cmp_aor(str1, str2)
+              4.20. append_rpid_hf()
+              4.21. append_rpid_hf(prefix, suffix)
+              4.22. is_rpid_user_e164()
+              4.23. set_uri_user(uri, user)
+              4.24. set_uri_host(uri, host)
+              4.25. is_request()
+              4.26. is_reply()
+              4.27. is_gruu([uri])
+              4.28. is_supported(option)
+              4.29. is_first_hop()
+              4.30. sip_p_charging_vector(flags)
 
 
         5. Exported pseudo-variables
         5. Exported pseudo-variables
 
 
@@ -130,22 +131,23 @@ Gabriel Vasile
    1.20. is_uri_user_e164 usage
    1.20. is_uri_user_e164 usage
    1.21. is_tel_number usage
    1.21. is_tel_number usage
    1.22. is_numeric usage
    1.22. is_numeric usage
-   1.23. encode_contact usage
-   1.24. decode_contact usage
-   1.25. decode_contact_header usage
-   1.26. cmp_uri usage
-   1.27. cmp_aor usage
-   1.28. append_rpid_hf usage
-   1.29. append_rpid_hf(prefix, suffix) usage
-   1.30. is_rpid_user_e164 usage
-   1.31. set_uri_user usage
-   1.32. set_uri_host usage
-   1.33. is_request usage
-   1.34. is_reply usage
-   1.35. is_gruu() usage
-   1.36. is_supported() usage
-   1.37. is_first_hop() usage
-   1.38. sip_p_charging_vector() usage
+   1.23. is_alphanum usage
+   1.24. encode_contact usage
+   1.25. decode_contact usage
+   1.26. decode_contact_header usage
+   1.27. cmp_uri usage
+   1.28. cmp_aor usage
+   1.29. append_rpid_hf usage
+   1.30. append_rpid_hf(prefix, suffix) usage
+   1.31. is_rpid_user_e164 usage
+   1.32. set_uri_user usage
+   1.33. set_uri_host usage
+   1.34. is_request usage
+   1.35. is_reply usage
+   1.36. is_gruu() usage
+   1.37. is_supported() usage
+   1.38. is_first_hop() usage
+   1.39. sip_p_charging_vector() usage
 
 
 Chapter 1. Admin Guide
 Chapter 1. Admin Guide
 
 
@@ -184,22 +186,23 @@ Chapter 1. Admin Guide
         4.11. is_uri_user_e164(pseudo-variable)
         4.11. is_uri_user_e164(pseudo-variable)
         4.12. is_tel_number(tval)
         4.12. is_tel_number(tval)
         4.13. is_numeric(tval)
         4.13. is_numeric(tval)
-        4.14. encode_contact(encoding_prefix,hostpart)
-        4.15. decode_contact()
-        4.16. decode_contact_header()
-        4.17. cmp_uri(str1, str2)
-        4.18. cmp_aor(str1, str2)
-        4.19. append_rpid_hf()
-        4.20. append_rpid_hf(prefix, suffix)
-        4.21. is_rpid_user_e164()
-        4.22. set_uri_user(uri, user)
-        4.23. set_uri_host(uri, host)
-        4.24. is_request()
-        4.25. is_reply()
-        4.26. is_gruu([uri])
-        4.27. is_supported(option)
-        4.28. is_first_hop()
-        4.29. sip_p_charging_vector(flags)
+        4.14. is_alphanum(tval)
+        4.15. encode_contact(encoding_prefix,hostpart)
+        4.16. decode_contact()
+        4.17. decode_contact_header()
+        4.18. cmp_uri(str1, str2)
+        4.19. cmp_aor(str1, str2)
+        4.20. append_rpid_hf()
+        4.21. append_rpid_hf(prefix, suffix)
+        4.22. is_rpid_user_e164()
+        4.23. set_uri_user(uri, user)
+        4.24. set_uri_host(uri, host)
+        4.25. is_request()
+        4.26. is_reply()
+        4.27. is_gruu([uri])
+        4.28. is_supported(option)
+        4.29. is_first_hop()
+        4.30. sip_p_charging_vector(flags)
 
 
    5. Exported pseudo-variables
    5. Exported pseudo-variables
 
 
@@ -396,22 +399,23 @@ modparam("auth", "rpid_avp", "$avp(myrpid)")
    4.11. is_uri_user_e164(pseudo-variable)
    4.11. is_uri_user_e164(pseudo-variable)
    4.12. is_tel_number(tval)
    4.12. is_tel_number(tval)
    4.13. is_numeric(tval)
    4.13. is_numeric(tval)
-   4.14. encode_contact(encoding_prefix,hostpart)
-   4.15. decode_contact()
-   4.16. decode_contact_header()
-   4.17. cmp_uri(str1, str2)
-   4.18. cmp_aor(str1, str2)
-   4.19. append_rpid_hf()
-   4.20. append_rpid_hf(prefix, suffix)
-   4.21. is_rpid_user_e164()
-   4.22. set_uri_user(uri, user)
-   4.23. set_uri_host(uri, host)
-   4.24. is_request()
-   4.25. is_reply()
-   4.26. is_gruu([uri])
-   4.27. is_supported(option)
-   4.28. is_first_hop()
-   4.29. sip_p_charging_vector(flags)
+   4.14. is_alphanum(tval)
+   4.15. encode_contact(encoding_prefix,hostpart)
+   4.16. decode_contact()
+   4.17. decode_contact_header()
+   4.18. cmp_uri(str1, str2)
+   4.19. cmp_aor(str1, str2)
+   4.20. append_rpid_hf()
+   4.21. append_rpid_hf(prefix, suffix)
+   4.22. is_rpid_user_e164()
+   4.23. set_uri_user(uri, user)
+   4.24. set_uri_host(uri, host)
+   4.25. is_request()
+   4.26. is_reply()
+   4.27. is_gruu([uri])
+   4.28. is_supported(option)
+   4.29. is_first_hop()
+   4.30. sip_p_charging_vector(flags)
 
 
 4.1.  ring_insert_callid()
 4.1.  ring_insert_callid()
 
 
@@ -642,12 +646,26 @@ if (is_tel_number("+24242424") {
 
 
    Example 1.22. is_numeric usage
    Example 1.22. is_numeric usage
 ...
 ...
-if (is_numeric($rU)) {  # Test if R-URI user consists of decimal digits
+if (is_numeric("$rU")) {  # Test if R-URI user consists of decimal digits
    ...
    ...
 }
 }
 ...
 ...
 
 
-4.14.  encode_contact(encoding_prefix,hostpart)
+4.14.  is_alphanum(tval)
+
+   Checks if the parameter value consists solely of decimal digits or
+   alphabetic ASCII characters. The parameter can include variables.
+
+   This function can be used from ANY_ROUTE.
+
+   Example 1.23. is_alphanum usage
+...
+if (is_alphanum("$rU")) {
+   ...
+}
+...
+
+4.15.  encode_contact(encoding_prefix,hostpart)
 
 
    This function will encode uri-s inside Contact header in the following
    This function will encode uri-s inside Contact header in the following
    manner sip:username:password@ip:port;transport=protocol goes
    manner sip:username:password@ip:port;transport=protocol goes
@@ -669,12 +687,12 @@ if (is_numeric($rU)) {  # Test if R-URI user consists of decimal digits
 
 
    This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE.
    This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE.
 
 
-   Example 1.23. encode_contact usage
+   Example 1.24. encode_contact usage
 ...
 ...
 if (src_ip == 10.0.0.0/8) encode_contact("natted_client","1.2.3.4");
 if (src_ip == 10.0.0.0/8) encode_contact("natted_client","1.2.3.4");
 ...
 ...
 
 
-4.15.  decode_contact()
+4.16.  decode_contact()
 
 
    This function will decode the request URI. If the RURI is in the format
    This function will decode the request URI. If the RURI is in the format
    sip:encoding_prefix*username*ip*port*protocol@hostpart it will be
    sip:encoding_prefix*username*ip*port*protocol@hostpart it will be
@@ -687,12 +705,12 @@ if (src_ip == 10.0.0.0/8) encode_contact("natted_client","1.2.3.4");
 
 
    This function can be used from REQUEST_ROUTE.
    This function can be used from REQUEST_ROUTE.
 
 
-   Example 1.24. decode_contact usage
+   Example 1.25. decode_contact usage
 ...
 ...
 if (uri =~ "^sip:natted_client") { decode_contact(); }
 if (uri =~ "^sip:natted_client") { decode_contact(); }
 ...
 ...
 
 
-4.16.  decode_contact_header()
+4.17.  decode_contact_header()
 
 
    This function will decode URIs inside Contact header. If the URI in the
    This function will decode URIs inside Contact header. If the URI in the
    format sip:encoding_prefix*username*ip*port*protocol@hostpart it will
    format sip:encoding_prefix*username*ip*port*protocol@hostpart it will
@@ -705,7 +723,7 @@ if (uri =~ "^sip:natted_client") { decode_contact(); }
 
 
    This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE.
    This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE.
 
 
-   Example 1.25. decode_contact_header usage
+   Example 1.26. decode_contact_header usage
 ...
 ...
 reply_route[2] {
 reply_route[2] {
         ...
         ...
@@ -714,13 +732,13 @@ reply_route[2] {
 }
 }
 ...
 ...
 
 
-4.17.  cmp_uri(str1, str2)
+4.18.  cmp_uri(str1, str2)
 
 
    The function returns true if the two parameters matches as SIP URI.
    The function returns true if the two parameters matches as SIP URI.
 
 
    This function can be used from ANY_ROUTE.
    This function can be used from ANY_ROUTE.
 
 
-   Example 1.26. cmp_uri usage
+   Example 1.27. cmp_uri usage
 ...
 ...
 if(cmp_uri("$ru", "sip:[email protected]"))
 if(cmp_uri("$ru", "sip:[email protected]"))
 {
 {
@@ -728,14 +746,14 @@ if(cmp_uri("$ru", "sip:[email protected]"))
 }
 }
 ...
 ...
 
 
-4.18.  cmp_aor(str1, str2)
+4.19.  cmp_aor(str1, str2)
 
 
    The function returns true if the two parameters matches as AoR. The
    The function returns true if the two parameters matches as AoR. The
    parameters have to be SIP URIs.
    parameters have to be SIP URIs.
 
 
    This function can be used from ANY_ROUTE.
    This function can be used from ANY_ROUTE.
 
 
-   Example 1.27. cmp_aor usage
+   Example 1.28. cmp_aor usage
 ...
 ...
 if(cmp_aor("[email protected]", "sip:kamailio@$fd"))
 if(cmp_aor("[email protected]", "sip:kamailio@$fd"))
 {
 {
@@ -743,7 +761,7 @@ if(cmp_aor("[email protected]", "sip:kamailio@$fd"))
 }
 }
 ...
 ...
 
 
-4.19.  append_rpid_hf()
+4.20.  append_rpid_hf()
 
 
    Appends to the message a Remote-Party-ID header that contains header
    Appends to the message a Remote-Party-ID header that contains header
    'Remote-Party-ID: ' followed by the saved value of the SIP URI received
    'Remote-Party-ID: ' followed by the saved value of the SIP URI received
@@ -754,14 +772,14 @@ if(cmp_aor("[email protected]", "sip:kamailio@$fd"))
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
    BRANCH_ROUTE.
    BRANCH_ROUTE.
 
 
-   Example 1.28. append_rpid_hf usage
+   Example 1.29. append_rpid_hf usage
 ...
 ...
 append_rpid_hf();  # Append Remote-Party-ID header field
 append_rpid_hf();  # Append Remote-Party-ID header field
 ...
 ...
 
 
-4.20.  append_rpid_hf(prefix, suffix)
+4.21.  append_rpid_hf(prefix, suffix)
 
 
-   This function is the same as Section 4.19, “ append_rpid_hf()”. The
+   This function is the same as Section 4.20, “ append_rpid_hf()”. The
    only difference is that it accepts two parameters--prefix and suffix to
    only difference is that it accepts two parameters--prefix and suffix to
    be added to Remote-Party-ID header field. This function ignores
    be added to Remote-Party-ID header field. This function ignores
    rpid_prefix and rpid_suffix parameters, instead of that allows to set
    rpid_prefix and rpid_suffix parameters, instead of that allows to set
@@ -778,13 +796,13 @@ append_rpid_hf();  # Append Remote-Party-ID header field
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
    BRANCH_ROUTE.
    BRANCH_ROUTE.
 
 
-   Example 1.29. append_rpid_hf(prefix, suffix) usage
+   Example 1.30. append_rpid_hf(prefix, suffix) usage
 ...
 ...
 # Append Remote-Party-ID header field
 # Append Remote-Party-ID header field
 append_rpid_hf("", ";party=calling;id-type=subscriber;screen=yes");
 append_rpid_hf("", ";party=calling;id-type=subscriber;screen=yes");
 ...
 ...
 
 
-4.21.  is_rpid_user_e164()
+4.22.  is_rpid_user_e164()
 
 
    The function checks if the SIP URI received from the database or radius
    The function checks if the SIP URI received from the database or radius
    server and will potentially be used in Remote-Party-ID header field
    server and will potentially be used in Remote-Party-ID header field
@@ -794,68 +812,68 @@ append_rpid_hf("", ";party=calling;id-type=subscriber;screen=yes");
 
 
    This function can be used from REQUEST_ROUTE.
    This function can be used from REQUEST_ROUTE.
 
 
-   Example 1.30. is_rpid_user_e164 usage
+   Example 1.31. is_rpid_user_e164 usage
 ...
 ...
 if (is_rpid_user_e164()) {
 if (is_rpid_user_e164()) {
     # do something here
     # do something here
 };
 };
 ...
 ...
 
 
-4.22.  set_uri_user(uri, user)
+4.23.  set_uri_user(uri, user)
 
 
    Sets userpart of SIP URI stored in writable pseudo variable 'uri' to
    Sets userpart of SIP URI stored in writable pseudo variable 'uri' to
    value of pseudo variable 'user'.
    value of pseudo variable 'user'.
 
 
    This function can be used from ANY_ROUTE.
    This function can be used from ANY_ROUTE.
 
 
-   Example 1.31. set_uri_user usage
+   Example 1.32. set_uri_user usage
 ...
 ...
 $var(uri) = "sip:user@host";
 $var(uri) = "sip:user@host";
 $var(user) = "new_user";
 $var(user) = "new_user";
 set_uri_user("$var(uri)", "$var(user)");
 set_uri_user("$var(uri)", "$var(user)");
 ...
 ...
 
 
-4.23.  set_uri_host(uri, host)
+4.24.  set_uri_host(uri, host)
 
 
    Sets hostpart of SIP URI stored in writable pseudo variable 'uri' to
    Sets hostpart of SIP URI stored in writable pseudo variable 'uri' to
    value of pseudo variable 'host'.
    value of pseudo variable 'host'.
 
 
    This function can be used from ANY_ROUTE.
    This function can be used from ANY_ROUTE.
 
 
-   Example 1.32. set_uri_host usage
+   Example 1.33. set_uri_host usage
 ...
 ...
 $var(uri) = "sip:user@host";
 $var(uri) = "sip:user@host";
 $var(host) = "new_host";
 $var(host) = "new_host";
 set_uri_host("$var(uri)", "$var(host)");
 set_uri_host("$var(uri)", "$var(host)");
 ...
 ...
 
 
-4.24.  is_request()
+4.25.  is_request()
 
 
    Return true if the SIP message is a request.
    Return true if the SIP message is a request.
 
 
    This function can be used from ANY_ROUTE.
    This function can be used from ANY_ROUTE.
 
 
-   Example 1.33. is_request usage
+   Example 1.34. is_request usage
 ...
 ...
 if (is_request()) {
 if (is_request()) {
         ...
         ...
 }
 }
 ...
 ...
 
 
-4.25.  is_reply()
+4.26.  is_reply()
 
 
    Return true if the SIP message is a reply.
    Return true if the SIP message is a reply.
 
 
    This function can be used from ANY_ROUTE.
    This function can be used from ANY_ROUTE.
 
 
-   Example 1.34. is_reply usage
+   Example 1.35. is_reply usage
 ...
 ...
 if (is_reply()) {
 if (is_reply()) {
         ...
         ...
 }
 }
 ...
 ...
 
 
-4.26.  is_gruu([uri])
+4.27.  is_gruu([uri])
 
 
    The function returns true if the uri is GRUU ('gr' parameter is
    The function returns true if the uri is GRUU ('gr' parameter is
    present): 1 - pub-gruu; 2 - temp-gruu.
    present): 1 - pub-gruu; 2 - temp-gruu.
@@ -866,12 +884,12 @@ if (is_reply()) {
 
 
    This function can be used from ANY_ROUTE.
    This function can be used from ANY_ROUTE.
 
 
-   Example 1.35. is_gruu() usage
+   Example 1.36. is_gruu() usage
 ...
 ...
 if(is_gruu()) { ... }
 if(is_gruu()) { ... }
 ...
 ...
 
 
-4.27.  is_supported(option)
+4.28.  is_supported(option)
 
 
    Function returns true if given option is listed in Supported header(s)
    Function returns true if given option is listed in Supported header(s)
    (if any) of the request. Currently the following options are known:
    (if any) of the request. Currently the following options are known:
@@ -879,12 +897,12 @@ if(is_gruu()) { ... }
 
 
    This function can be used from ANY_ROUTE.
    This function can be used from ANY_ROUTE.
 
 
-   Example 1.36. is_supported() usage
+   Example 1.37. is_supported() usage
 ...
 ...
 if (is_supported("outbound")) { ... }
 if (is_supported("outbound")) { ... }
 ...
 ...
 
 
-4.28.  is_first_hop()
+4.29.  is_first_hop()
 
 
    The function returns true if the proxy is first hop after the original
    The function returns true if the proxy is first hop after the original
    sender. For incoming SIP requests, it means there is only one Via
    sender. For incoming SIP requests, it means there is only one Via
@@ -896,19 +914,19 @@ if (is_supported("outbound")) { ... }
 
 
    This function can be used from ANY_ROUTE.
    This function can be used from ANY_ROUTE.
 
 
-   Example 1.37. is_first_hop() usage
+   Example 1.38. is_first_hop() usage
 ...
 ...
 if(is_first_hop()) { ... }
 if(is_first_hop()) { ... }
 ...
 ...
 
 
-4.29.  sip_p_charging_vector(flags)
+4.30.  sip_p_charging_vector(flags)
 
 
    Manage the P-Charging-Vector header (RFC7315). The flags can be: 'r' -
    Manage the P-Charging-Vector header (RFC7315). The flags can be: 'r' -
    remove; 'g' - generate; 'f' - force (remove + generate).
    remove; 'g' - generate; 'f' - force (remove + generate).
 
 
    This function can be used from ANY_ROUTE.
    This function can be used from ANY_ROUTE.
 
 
-   Example 1.38. sip_p_charging_vector() usage
+   Example 1.39. sip_p_charging_vector() usage
 ...
 ...
 sip_p_charging_vector("g");
 sip_p_charging_vector("g");
 ...
 ...