Module: kamailio
Branch: master
Commit: dc486a9464de5d12d00af28675e51e843492e36a
URL: https://github.com/kamailio/kamailio/commit/dc486a9464de5d12d00af28675e51e8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-07-21T14:20:15+02:00
cfgutils: updated docs for sleep() and usleep()
---
Modified: modules/cfgutils/doc/cfgutils_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/dc486a9464de5d12d00af28675e51e8…
Patch: https://github.com/kamailio/kamailio/commit/dc486a9464de5d12d00af28675e51e8…
---
diff --git a/modules/cfgutils/doc/cfgutils_admin.xml b/modules/cfgutils/doc/cfgutils_admin.xml
index f62fd68..0266ab5 100644
--- a/modules/cfgutils/doc/cfgutils_admin.xml
+++ b/modules/cfgutils/doc/cfgutils_admin.xml
@@ -243,12 +243,13 @@ rand_get_prob();
<itemizedlist>
<listitem>
<para><emphasis>time</emphasis> - Time to wait in seconds.
+ It can be an integer or a variable
+ holding an integer.
</para>
</listitem>
</itemizedlist>
<para>
- This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
- FAILURE_ROUTE, BRANCH_ROUTE.
+ This function can be used from ANY_ROUTE.
</para>
<example>
<title><function>sleep</function> usage</title>
@@ -271,13 +272,13 @@ sleep("1");
<itemizedlist>
<listitem>
<para><emphasis>time</emphasis> - Time to wait in micro-seconds
- (1/1000000 of a second).
+ (1/1000000 of a second). It can be an integer or a variable
+ holding an integer.
</para>
</listitem>
</itemizedlist>
<para>
- This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
- FAILURE_ROUTE, BRANCH_ROUTE.
+ This function can be used from ANY_ROUTE.
</para>
<example>
<title><function>usleep</function> usage</title>
Experimenting janssonrpc-c, I noticed that I can't get anythin in the result variable, if no "route" option is specified.
1/ With "route" option, everything is OK:
janssonrpc_request("local", "bar.PIC1", '{"cli": "$avp(cli)","en": "$avp(cld)"}', "route=RPC_Init_Resp,retry=1");
route[RPC_Init_Resp] {
xlog("JANSSON result: $var(result)\n");
The "xlog" returns the json formatted results as expected:
JANSSON result: {"result":{"NetScenario":"PreCall","cli":"123456789","en":"9876543210Destination":"sip:xxx@xx.x.xx.xxx:xxxx","NextRPC":"bar.PIC2"}}
2/ The exact same request, without the route option does not return anything:
janssonrpc_request("local", "bar.PIC1", '{"cli": "$avp(cli)","en": "$avp(cld)"}');
xlog("JANSSON result: $var(result)\n");
The "xlog" returns 0 this time:
JANSSON result: 0
A tshark trace indicates the same response is returned by the jsonrpc server, excluding a potential issue on this side.
I am available for futher information
Best regards,
Laurent.
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/256