Module: kamailio
Branch: master
Commit: 60399b423f288c7b28756e480413475793e7ae11
URL: https://github.com/kamailio/kamailio/commit/60399b423f288c7b28756e480413475…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2019-01-28T08:31:37+01:00
modules: readme files regenerated - exec ... [skip ci]
---
Modified: src/modules/exec/README
---
Diff: https://github.com/kamailio/kamailio/commit/60399b423f288c7b28756e480413475……
[View More]Patch: https://github.com/kamailio/kamailio/commit/60399b423f288c7b28756e480413475…
---
diff --git a/src/modules/exec/README b/src/modules/exec/README
index 2e9c2bcd2a..b63a8b27a1 100644
--- a/src/modules/exec/README
+++ b/src/modules/exec/README
@@ -35,6 +35,7 @@ Jan Janak
4.1. exec_dset(command)
4.2. exec_msg(command)
4.3. exec_avp(command [, avplist])
+ 4.4. exec_cmd(command)
5. Known Issues
@@ -45,6 +46,7 @@ Jan Janak
1.3. exec_dset usage
1.4. exec_msg usage
1.5. exec_avp usage
+ 1.6. exec_cmd usage
Chapter 1. Admin Guide
@@ -66,6 +68,7 @@ Chapter 1. Admin Guide
4.1. exec_dset(command)
4.2. exec_msg(command)
4.3. exec_avp(command [, avplist])
+ 4.4. exec_cmd(command)
5. Known Issues
@@ -144,6 +147,7 @@ modparam("exec", "time_to_kill", 20)
4.1. exec_dset(command)
4.2. exec_msg(command)
4.3. exec_avp(command [, avplist])
+ 4.4. exec_cmd(command)
4.1. exec_dset(command)
@@ -213,6 +217,27 @@ exec_avp("echo TEST");
exec_avp("echo TEST", "$avp(s:test)");
...
+4.4. exec_cmd(command)
+
+ Executes an external command. It is a lightweight version, which does
+ not pass the SIP message as parameter, does not set the environment
+ variables and it does not use the output of the command.
+
+ Meaning of the parameters is as follows:
+ * command - Command to be executed. It can include pseudo-variables.
+
+ WARNING: if the var you are passing out has a bash special character in
+ it, the var needs to be placed inside quotes, for example:
+ exec_msg("print-contact.sh '$ct'");
+
+ This function can be used from ANY_ROUTE.
+
+ Example 1.6. exec_cmd usage
+...
+exec_cmd("echo TEST > /tmp/test.txt");
+exec_cmd("echo TEST > /tmp/$rU.txt");
+...
+
5. Known Issues
There is currently no guarantee that scripts ever return and stop
[View Less]
Module: kamailio
Branch: master
Commit: 385fdc71abd0b4f8349f725273bccd483d859088
URL: https://github.com/kamailio/kamailio/commit/385fdc71abd0b4f8349f725273bccd4…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-01-28T08:20:32+01:00
exec: docs for exec_cmd() function
---
Modified: src/modules/exec/doc/exec_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/385fdc71abd0b4f8349f725273bccd4……
[View More]Patch: https://github.com/kamailio/kamailio/commit/385fdc71abd0b4f8349f725273bccd4…
---
diff --git a/src/modules/exec/doc/exec_admin.xml b/src/modules/exec/doc/exec_admin.xml
index 51667fb60d..12249d5104 100644
--- a/src/modules/exec/doc/exec_admin.xml
+++ b/src/modules/exec/doc/exec_admin.xml
@@ -267,6 +267,41 @@ exec_msg("echo TEST > /tmp/$rU.txt");
exec_avp("echo TEST");
exec_avp("echo TEST", "$avp(s:test)");
...
+</programlisting>
+ </example>
+ </section>
+ <section id="exec.f.exec_cmd">
+ <title>
+ <function moreinfo="none">exec_cmd(command)</function>
+ </title>
+ <para>
+ Executes an external command. It is a lightweight version, which
+ does not pass the SIP message as parameter, does not set the
+ environment variables and it does not use the output of the command.
+ </para>
+ <para>Meaning of the parameters is as follows:</para>
+ <itemizedlist>
+ <listitem>
+ <para><emphasis>command</emphasis> - Command to be executed. It
+ can include pseudo-variables.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ WARNING: if the var you are passing out has a bash special
+ character in it, the var needs to be placed inside quotes, for example:
+ exec_msg("print-contact.sh '$ct'");
+ </para>
+ <para>
+ This function can be used from ANY_ROUTE.
+ </para>
+ <example>
+ <title><function moreinfo="none">exec_cmd</function> usage</title>
+ <programlisting format="linespecific">
+...
+exec_cmd("echo TEST > /tmp/test.txt");
+exec_cmd("echo TEST > /tmp/$rU.txt");
+...
</programlisting>
</example>
</section>
@@ -274,8 +309,8 @@ exec_avp("echo TEST", "$avp(s:test)");
<section id="exec.known_issues">
<title>Known Issues</title>
<para>
- There is currently no guarantee that scripts ever return and stop
- blocking the &sip; server. (There is kill.c but it is not used along with
+ There is currently no guarantee that scripts ever return and stop
+ blocking the &sip; server. (There is kill.c but it is not used along with
the current mechanisms based on popen. Besides that kill.c is ugly).
</para>
</section>
[View Less]