On 6/11/13 3:54 PM, Alex Balashov wrote:
Mino,

Something like this should probably work:

   $var(x) = "1,2,3,4";

   $var(i) = 0;

   while(defined $(var(x){s.select,$var(i),,})) {
      ...

      $var(i) = $var(i) + 1;
   }

If the 'defined' operator always results 'true' on the results of this transformation, then alternately this:

   while($(var(x){s.select,$var(i),,}{s.len}) > 0)
It should work testing if result is !=$null as well, I added an entry in faq, anyone could jump and enhance the content with other options:

https://www.kamailio.org/wiki/tutorials/faq/main#how_to_iterate_through_the_ite

Cheers,
Daniel

--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, San Francisco, USA - June 24-27, 2013
  * http://asipto.com/u/katu *


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to