[sr-dev] git:master: avpops: update avp_check documentation related to xavp vars as parameters

Victor Seva linuxmaniac at torreviejawireless.org
Mon Sep 23 21:52:56 CEST 2013


Module: sip-router
Branch: master
Commit: 3abb169001022567aa0be629677b9e445d1c3ca5
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3abb169001022567aa0be629677b9e445d1c3ca5

Author: Victor Seva <linuxmaniac at torreviejawireless.org>
Committer: Victor Seva <linuxmaniac at torreviejawireless.org>
Date:   Sat Sep 21 11:26:45 2013 +0200

avpops: update avp_check documentation related to xavp vars as parameters

---

 modules/avpops/doc/avpops_admin.xml |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/modules/avpops/doc/avpops_admin.xml b/modules/avpops/doc/avpops_admin.xml
index dc3ab0c..84434b7 100644
--- a/modules/avpops/doc/avpops_admin.xml
+++ b/modules/avpops/doc/avpops_admin.xml
@@ -760,11 +760,26 @@ avp_pushto("$br","$avp(i:680)");
 ...
 avp_check("$avp(i:678)", "lt/i:345/g");
 avp_check("$fd","eq/$td/I");
-avp_check("$avp(s:foo)","gt/$avp($bar)/g");
+avp_check("$avp(s:foo)","gt/$avp($var(bar))/g");
 avp_check("$avp(s:foo)","re/sip:.*@bar.net/g");
 avp_check("$avp(s:foo)","fm/$avp(fm_avp)/g");
 ...
 				</programlisting>
+				<para>NOTE: you can use a xavp variable ($xavp(key1[indx1]=>key2[indx2]))
+				as first or second parameter.
+				If you want to check all the values of the key2 you should
+				use [*] at indx2. The [*] index is not allowed at indx1.
+				</para>
+				<programlisting format="linespecific">
+...
+avp_check("$xavp(op[0]=>lt[0])", "lt/i:345/g");
+avp_check("$xavp(op=>fd","eq/$td/I");
+avp_check("$xavp(op[1]=>foo[*])","gt/$avp($var(bar))/g");
+avp_check("$avp(s:foo)","re/$xavp(op[0]=>re[*]/g");
+$var(id)=2;
+avp_check("$xavp(op=>foo[*])","fm/$xavp(op=>fm[$var(id)])/g");
+...
+				</programlisting>
 			</example>
 		</section>
 		<section>




More information about the sr-dev mailing list