[sr-dev] git:master:a074608c: evrexec: docs for sockaddr attribute

Daniel-Constantin Mierla miconda at gmail.com
Wed Mar 30 08:41:14 CEST 2022


Module: kamailio
Branch: master
Commit: a074608ca41e70b21de27e050869883e70e13033
URL: https://github.com/kamailio/kamailio/commit/a074608ca41e70b21de27e050869883e70e13033

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2022-03-30T08:40:45+02:00

evrexec: docs for sockaddr attribute

---

Modified: src/modules/evrexec/doc/evrexec_admin.xml

---

Diff:  https://github.com/kamailio/kamailio/commit/a074608ca41e70b21de27e050869883e70e13033.diff
Patch: https://github.com/kamailio/kamailio/commit/a074608ca41e70b21de27e050869883e70e13033.patch

---

diff --git a/src/modules/evrexec/doc/evrexec_admin.xml b/src/modules/evrexec/doc/evrexec_admin.xml
index bcd6af5f49..565b33f560 100644
--- a/src/modules/evrexec/doc/evrexec_admin.xml
+++ b/src/modules/evrexec/doc/evrexec_admin.xml
@@ -17,12 +17,13 @@
 	<title>Overview</title>
 	<para>
 		The module executes event route blocks or KEMI functions on dedicated
-		processes at startup. The execution can be delayed for a specified
-		interval of time.
+		processes at startup, upon an RPC command or data received on a custom
+		UDP socket.
 	</para>
 	<para>
-		The actions in the event route should be a loop or other tasks that
-		run forever.
+		For startup event route, the execution can be delayed for a specified
+		interval of time. The actions in the event route should be a loop or
+		other tasks that run forever.
 	</para>
 	</section>
 	<section>
@@ -66,7 +67,7 @@
 		<itemizedlist>
 		<listitem>
 		<para>
-		"name=_string_;wait=_number_;workers=_number_"
+		"name=_string_;wait=_number_;workers=_number_;sockaddr=_udp_socket_"
 		</para>
 		</listitem>
 		</itemizedlist>
@@ -88,7 +89,8 @@
 		<para>
 			<emphasis>workers</emphasis> - if set to 0 or 1 the task is executed
 			in a dedicated process. Any number > 1 will create more dedicated
-			processes, each of them executing the task.
+			processes, each of them executing the startup task. For UDP data
+			execution (when 'sockaddr' is set), only 1 worker process is created.
 		</para>
 		</listitem>
 		<listitem>
@@ -97,6 +99,13 @@
 			inside the dedicated process before executing the task.
 		</para>
 		</listitem>
+		<listitem>
+		<para>
+			<emphasis>sockaddr</emphasis> - full UDP socket address in format
+			'udp:ip:port' (example: 'udp:127.0.0.1:54321').
+		</para>
+		</listitem>
+
 		</itemizedlist>
 		<para>
 		<emphasis>
@@ -108,6 +117,7 @@
 		<programlisting format="linespecific">
 ...
 modparam("evrexec", "exec", "name=evrexec:timer;wait=1000;workers=1;")
+modparam("evrexec", "exec", "name=evrexec:udp;sockaddr=udp:127.0.0.1:4444;workers=1;")
 ...
 event_route[evrexec:timer] {
   $var(x) = 0;
@@ -117,6 +127,11 @@ event_route[evrexec:timer] {
     sleep("600");
   }
 }
+
+event_route[evrexec:udp] {
+  xinfo("udp socket data: [$evr(data)]\n");
+}
+
 ...
 </programlisting>
 		</example>




More information about the sr-dev mailing list