[sr-dev] git:master:42678706: pv: docs for xavp_lshift() function

Daniel-Constantin Mierla miconda at gmail.com
Tue May 10 19:43:37 CEST 2022


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2022-05-10T19:42:48+02:00

pv: docs for xavp_lshift() function

---

Modified: src/modules/pv/doc/pv_admin.xml

---

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

---

diff --git a/src/modules/pv/doc/pv_admin.xml b/src/modules/pv/doc/pv_admin.xml
index dca9392822..bc36df564b 100644
--- a/src/modules/pv/doc/pv_admin.xml
+++ b/src/modules/pv/doc/pv_admin.xml
@@ -732,6 +732,39 @@ xavp_child_rm("x", "y");
 ...
 xavi_child_rm("WhatEver", "FoO");
 # same result as: $xavi(whatever=>foo) = $null;
+...
+				</programlisting>
+			</example>
+		</section>
+		<section id="pv.f.xavp_lshift">
+			<title>
+				<function moreinfo="none">xavp_lshift(xname, idx)</function>
+			</title>
+			<para>
+				Left shift with rotation of the xavps with name xname so that
+				the one at the index idx becomes the first and the ones before
+				it are at the end of the list.
+			</para>
+			<para>
+				The first parameter has to be the name of XAVP in the root list.
+				The second parameter is the index of the XAVP that becomes the
+				first one.
+			</para>
+			<para>
+				The parameters can be with variables.
+			</para>
+			<para>
+			Function can be used from ANY ROUTE.
+			</para>
+			<example>
+				<title><function>xavp_lshift</function> usage</title>
+				<programlisting format="linespecific">
+...
+$xavp(n) = 10;
+$xavp(n) = 20;
+$xavp(n) = 30;
+xavp_lshift("n", "1");
+# results in: $xavp(n) having the list of values 20 30 10
 ...
 				</programlisting>
 			</example>




More information about the sr-dev mailing list