浏览代码

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

Kamailio Dev 5 年之前
父节点
当前提交
20c1666e24
共有 1 个文件被更改,包括 69 次插入0 次删除
  1. 69 0
      src/modules/siputils/README

+ 69 - 0
src/modules/siputils/README

@@ -96,6 +96,9 @@ Gabriel Vasile
               4.30. is_supported(option)
               4.31. is_first_hop()
               4.32. sip_p_charging_vector(flags)
+              4.33. contact_param_encode(pname, saddr)
+              4.34. contact_param_decode(pname)
+              4.35. contact_param_decode_uri(pname)
 
         5. Exported pseudo-variables
 
@@ -148,6 +151,9 @@ Gabriel Vasile
    1.39. is_supported() usage
    1.40. is_first_hop() usage
    1.41. sip_p_charging_vector() usage
+   1.42. contact_param_encode usage
+   1.43. contact_param_decode usage
+   1.44. contact_param_decode_ruri usage
 
 Chapter 1. Admin Guide
 
@@ -205,6 +211,9 @@ Chapter 1. Admin Guide
         4.30. is_supported(option)
         4.31. is_first_hop()
         4.32. sip_p_charging_vector(flags)
+        4.33. contact_param_encode(pname, saddr)
+        4.34. contact_param_decode(pname)
+        4.35. contact_param_decode_uri(pname)
 
    5. Exported pseudo-variables
 
@@ -420,6 +429,9 @@ modparam("auth", "rpid_avp", "$avp(myrpid)")
    4.30. is_supported(option)
    4.31. is_first_hop()
    4.32. sip_p_charging_vector(flags)
+   4.33. contact_param_encode(pname, saddr)
+   4.34. contact_param_decode(pname)
+   4.35. contact_param_decode_uri(pname)
 
 4.1.  ring_insert_callid()
 
@@ -969,6 +981,63 @@ if(is_first_hop()) { ... }
 sip_p_charging_vector("g");
 ...
 
+4.33.  contact_param_encode(pname, saddr)
+
+   This function encodes URI inside Contact headers by building a new URI
+   from 'saddr' parameter and adding a parameter with the name 'pname'
+   containing incoming URI encoded in Base64URL format.
+
+   Meaning of the parameters is as follows:
+     * pname - name of the new URI parameter to hold the encoded incoming
+       URI.
+     * saddr - local server address, can be host part, host-port part or
+       host-port-params part.
+
+   This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE.
+
+   Example 1.42. contact_param_encode usage
+...
+if (is_method("REGISTER") and src_ip == 10.0.0.0/8) {
+    contact_param_encode("ksu", "1.2.3.4:5060;transport=tcp");
+}
+...
+
+4.34.  contact_param_decode(pname)
+
+   This function decodes URI inside Contact headers by building a new URI
+   from 'pname' parameter, decoding its value from Base64URL.
+
+   Meaning of the parameters is as follows:
+     * pname - name of the incoming URI parameter holding the encoded URI
+       value.
+
+   This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE.
+
+   Example 1.43. contact_param_decode usage
+...
+if (is_method("REGISTER") and src_ip == 1.2.3.4) {
+    contact_param_decode("ksu");
+}
+...
+
+4.35.  contact_param_decode_uri(pname)
+
+   This function decodes R-URI (request URI) by building a new R-URI from
+   'pname' parameter, decoding its value from Base64URL.
+
+   Meaning of the parameters is as follows:
+     * pname - name of the incoming URI parameter holding the encoded URI
+       value.
+
+   This function can be used from REQUEST_ROUTE.
+
+   Example 1.44. contact_param_decode_ruri usage
+...
+if (is_method("INVITE") and src_ip == 1.2.3.4) {
+    contact_param_decode_ruri("ksu");
+}
+...
+
 5. Exported pseudo-variables
 
    5.1. $pcv(all)