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

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2020-10-14T15:55:29+02:00

pv: docs for xvp_slist_explode()

---

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

---

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

---

diff --git a/src/modules/pv/doc/pv_admin.xml b/src/modules/pv/doc/pv_admin.xml
index 8b4b0aa309..3967b38234 100644
--- a/src/modules/pv/doc/pv_admin.xml
+++ b/src/modules/pv/doc/pv_admin.xml
@@ -413,6 +413,49 @@ $xavp(x[0]=&gt;c) = "d";
 $xavp(x[0]=&gt;a) = "b";
 xavp_params_implode("x", "$var(out)");
 # results in: $var(out) is "a=b;c=d;e=f;"
+...
+                               </programlisting>
+                       </example>
+               </section>
+               <section id="pv.f.xavp_slist_explode">
+                       <title>
+                               <function 
moreinfo="none">xavp_slist_explode(slist, sep, mode, xname)</function>
+                       </title>
+                       <para>
+                               Breaks a string list in tokens by separators 
and stores them
+                               in XAVPs. Note that is not storing empty values.
+                       </para>
+                       <para>
+                               The first parameter has to be a string (static 
or with variables).
+                       </para>
+                       <para>
+                               The second parameter has to contain separator 
characters (they
+                               can be many).
+                       </para>
+                       <para>
+                               The third parameter is mode, controlling the 
behaviour of extracting
+                               the tokens, the supported mode right now is 
't', which trims
+                               the white spaces around the value.
+                       </para>
+                       <para>
+                               The fourth parameter is the name of the xavp to 
hold the tokens.
+                       </para>
+                       <para>
+                               The values are stored as string type.
+                       </para>
+                       <para>
+                       Function can be used from ANY ROUTE.
+                       </para>
+                       <example>
+                               <title><function>xavp_slist_explode</function> 
usage</title>
+                               <programlisting format="linespecific">
+...
+xavp_slist_explode("a=b; c=d;", "=;", "t", "x");
+# results in:
+#    $xavp(x[0]) = "a";
+#    $xavp(x[1]) = "b";
+#    $xavp(x[2]) = "c";
+#    $xavp(x[3]) = "d";
 ...
                                </programlisting>
                        </example>


_______________________________________________
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to