Module: kamailio
Branch: master
Commit: 79b2e4b00ebf7a7cdf0ed3b9c4ab7f0176d78686
URL:
https://github.com/kamailio/kamailio/commit/79b2e4b00ebf7a7cdf0ed3b9c4ab7f0…
Author: Henning Westerholt <hw(a)gilawa.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2022-05-03T17:45:49Z
cfgutils: improve example for $RANDOM
---
Modified: src/modules/cfgutils/doc/cfgutils_admin.xml
---
Diff:
https://github.com/kamailio/kamailio/commit/79b2e4b00ebf7a7cdf0ed3b9c4ab7f0…
Patch:
https://github.com/kamailio/kamailio/commit/79b2e4b00ebf7a7cdf0ed3b9c4ab7f0…
---
diff --git a/src/modules/cfgutils/doc/cfgutils_admin.xml
b/src/modules/cfgutils/doc/cfgutils_admin.xml
index 5f411a272a..7df0a2a87e 100644
--- a/src/modules/cfgutils/doc/cfgutils_admin.xml
+++ b/src/modules/cfgutils/doc/cfgutils_admin.xml
@@ -839,11 +839,11 @@ $ &kamcmd; cfgutils.get_gflags
<programlisting format="linespecific">
...
if (rand_event()) {
- $avp(i:10) = ($RANDOM / 16777216); # 2^24
- if ($avp(i:10) < 10) {
- $avp(i:10) = 10;
+ $var(value) = ($RANDOM / 16777216); # 2^24
+ if ($var(value) < 10) {
+ $var(value) = 10;
}
- append_to_reply("Retry-After: $avp(i:10)\n");
+ append_to_reply("Retry-After: $var(value)\n");
sl_send_reply("503", "Try later");
exit;
};