From hunterj91@hotmail.com Fri Oct 23 19:00:08 2015 From: Jonathan Hunter To: sr-users@lists.kamailio.org Subject: [SR-Users] Multi-Array with AVPs Date: Fri, 23 Oct 2015 17:00:01 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0794008448==" --===============0794008448== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Guys, Hope all are well? sorry to post but Im just trying to get something working where Im trying to = convert a php function script into the kamailio.cfg. Im getting there but wonder how I can group results of sets of avps with anot= her avp. Say I have these variables; $(avp(NTgrp)) =3D 'SB100_000361(a)1.2.3.4|SB100_000213(a)1.2.3.5|SB100_000225= (a)1.2.3.6|SB100_000361(a)1.2.3.7|SB100_000213(a)1.2.3.8';$(avp(Prio)) =3D '1= |1|1|2|2';$(avp(Wgt)) =3D '10000|10000|80000|30000|70000';$(avp(CInc)) =3D '0= |0|1|0|1';$(avp(WTot))=3D '100000|100000|100000|100000|100000'; I then run a = while script to split up their variables via the delimiter | in user; $var(j)=3D0;while($var(j)<$var(count)) {$(avp(NTgrpP))=3D$(avp(NTgrp){s.selec= t,$var(j),|});$(avp(PrioP))=3D$(avp(Prio){s.select,$var(j),|});$(avp(WgtP))= =3D$(avp(Wgt){s.select,$var(j),|});$(avp(CIncP))=3D$(avp(CInc){s.select,$var(= j),|});$(avp(WTotP))=3D$(avp(WTot){s.select,$var(j),|});xlog("L_INFO"," Now E= ach time we have $(avp(NTgrpP)) $(avp(PrioP)) $(avp(WgtP)) $(avp(CIncP)) $(av= p(WTotP))\n");$var(j)=3D$var(j)+1;} This then results in;INFO: