Re: [SR-Users] How to iterate comma separated string

2013-06-11 Thread Daniel-Constantin Mierla
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 t

Re: [SR-Users] How to iterate comma separated string

2013-06-11 Thread Alex Balashov
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:

[SR-Users] How to iterate comma separated string

2013-06-11 Thread Mino Haluz
Hi, I have to iterate string like 1,2,3,4 in kamailio. How could you do this? I know we have s.select,index,separator but I dont know how to go through all elements. Thanks, Mino ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing lis