Browse code

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

Kamailio Dev authored on 16/06/2021 10:16:28
Showing 1 changed files
... ...
@@ -102,6 +102,7 @@ Gabriel Vasile
102 102
               4.36. contact_param_decode(pname)
103 103
               4.37. contact_param_decode_uri(pname)
104 104
               4.38. contact_param_rm(pname)
105
+              4.39. hdr_date_check(tdiff)
105 106
 
106 107
         5. Exported pseudo-variables
107 108
 
... ...
@@ -160,6 +161,7 @@ Gabriel Vasile
160 161
    1.45. contact_param_decode usage
161 162
    1.46. contact_param_decode_ruri usage
162 163
    1.47. contact_param_rm usage
164
+   1.48. hdr_date_check usage
163 165
 
164 166
 Chapter 1. Admin Guide
165 167
 
... ...
@@ -223,6 +225,7 @@ Chapter 1. Admin Guide
223 225
         4.36. contact_param_decode(pname)
224 226
         4.37. contact_param_decode_uri(pname)
225 227
         4.38. contact_param_rm(pname)
228
+        4.39. hdr_date_check(tdiff)
226 229
 
227 230
    5. Exported pseudo-variables
228 231
 
... ...
@@ -444,6 +447,7 @@ modparam("auth", "rpid_avp", "$avp(myrpid)")
444 447
    4.36. contact_param_decode(pname)
445 448
    4.37. contact_param_decode_uri(pname)
446 449
    4.38. contact_param_rm(pname)
450
+   4.39. hdr_date_check(tdiff)
447 451
 
448 452
 4.1.  ring_insert_callid()
449 453
 
... ...
@@ -1112,6 +1116,25 @@ if (is_method("REGISTER") and src_ip == 1.2.3.4) {
1112 1116
 }
1113 1117
 ...
1114 1118
 
1119
+4.39.  hdr_date_check(tdiff)
1120
+
1121
+   Returns true if sip message has Date header and its value is lower than
1122
+   'NOW() - tdiff'.
1123
+
1124
+   Meaning of the parameters is as follows:
1125
+     * tdiff - time difference in seconds, it can be a variable or static
1126
+       integer value.
1127
+
1128
+   This function can be used from ANY_ROUTE.
1129
+
1130
+   Example 1.48. hdr_date_check usage
1131
+...
1132
+if (!hdr_date_check("10")) {
1133
+    sl_send_reply("403", "Outdated date");
1134
+    exit;
1135
+}
1136
+...
1137
+
1115 1138
 5. Exported pseudo-variables
1116 1139
 
1117 1140
    5.1. $pcv(all)