Module: kamailio
Branch: master
Commit: 5c8ddbc64f556e4fec1f0e1215a42abb0b010cd3
URL:
https://github.com/kamailio/kamailio/commit/5c8ddbc64f556e4fec1f0e1215a42ab…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2020-01-03T09:44:07+01:00
avpops: add avp_subst_pv() documentation
---
Modified: src/modules/avpops/doc/avpops_admin.xml
---
Diff:
https://github.com/kamailio/kamailio/commit/5c8ddbc64f556e4fec1f0e1215a42ab…
Patch:
https://github.com/kamailio/kamailio/commit/5c8ddbc64f556e4fec1f0e1215a42ab…
---
diff --git a/src/modules/avpops/doc/avpops_admin.xml
b/src/modules/avpops/doc/avpops_admin.xml
index beb5787624..8c87de058d 100644
--- a/src/modules/avpops/doc/avpops_admin.xml
+++ b/src/modules/avpops/doc/avpops_admin.xml
@@ -971,6 +971,36 @@ avp_subst("$avp(i:678)/$avp(i:679)/g",
"/(.*)@(.*)/\1@$rd/");
processing will use it.
</para>
</section>
+ <section id="avpops.f.avp_subst_pv">
+ <title>
+ <function moreinfo="none">avp_subst_pv(avps, subst)</function>
+ </title>
+ <para>
+ Same functionality than avp_subst() but seccond parameter will be
+ evaluated first.
+ </para>
+ <para>
+ This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
+ BRANCH_ROUTE, LOCAL_ROUTE and ONREPLY_ROUTE.
+ </para>
+ <example>
+ <title><function>avp_subst_pv</function> usage</title>
+ <programlisting format="linespecific">
+...
+$(avp(src)[*]) = "testME";
+$var(z) = "j";
+$var(y) = "e";
+$var(x) = "/" + $var(y) + "/" + $var(z) + "/gi";
+
+## all this calls will produce the same result "tjstMj"
+avp_subst_pv("$avp(src)", "/e/j/gi");
+avp_subst_pv("$avp(src)", "/" + $var(y) + "/" + $var(z) +
"/gi");
+avp_subst_pv("$avp(src)", "/$var(y)/$var(z)/gi");
+avp_subst_pv("$avp(src)", "$var(x)");
+...
+ </programlisting>
+ </example>
+ </section>
<section id="avpops.f.avp_op">
<title>
<function moreinfo="none">avp_op(name,op_value)