Module: kamailio
Branch: master
Commit: 80a78412d6ad02251d1bd64dd9ce72acd1742fa6
URL:
https://github.com/kamailio/kamailio/commit/80a78412d6ad02251d1bd64dd9ce72a…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2017-10-29T09:17:01+01:00
modules: readme files regenerated - rtimer ... [skip ci]
---
Modified: src/modules/rtimer/README
---
Diff:
https://github.com/kamailio/kamailio/commit/80a78412d6ad02251d1bd64dd9ce72a…
Patch:
https://github.com/kamailio/kamailio/commit/80a78412d6ad02251d1bd64dd9ce72a…
---
diff --git a/src/modules/rtimer/README b/src/modules/rtimer/README
index e5e8454ce9..aec594b58c 100644
--- a/src/modules/rtimer/README
+++ b/src/modules/rtimer/README
@@ -33,6 +33,7 @@ Daniel-Constantin Mierla
1.1. Set timer parameter
1.2. Set exec parameter
+ 1.3. Use exec parameter with a Kemi engine
Chapter 1. Admin Guide
@@ -113,18 +114,32 @@ modparam("rtimer", "timer",
"name=ta;interval=100000u;mode=1;")
The parameter can be set multiple times to get more routes executed on
same timer.
* timer - name of the timer.
- * route - the index of the route to be executed.
+ * route - the name of the route block to be executed, or the name of
+ the function from kemi script. The kemi function receives a string
+ parameter with the value being the name of the module.
Default value is NULL.
Example 1.2. Set exec parameter
...
modparam("rtimer", "timer", "name=ta;interval=10;mode=1;")
-modparam("rtimer", "exec", "timer=ta;route=8")
+modparam("rtimer", "exec", "timer=ta;route=ONTIMER")
-route[8] {
+route[ONTIMER] {
xlog("timer routine: time is $TF\n");
# delete from my sql cache table entries older than 2H
sql_query("delete from kamailio_cache where last_updated<$TS-3600");
}
...
+
+ Example 1.3. Use exec parameter with a Kemi engine
+...
+modparam("rtimer", "timer", "name=ta;interval=10;mode=1;")
+modparam("rtimer", "exec", "timer=ta;route=ksr_rtimer")
+...
+-- rtimer event callback function implemented in Lua
+function ksr_rtimer(evname)
+ KSR.info("===== rtimer module triggered event\n");
+ return 1;
+end
+...