htable module should do the trick to you.
On Tuesday 02 November 2010, Bernhard Suttner wrote:
Hi,
I want something like that:
# define some router to use later in the script (global section)
Mod_param(router(1), "10.10.10.1")
mod_param(router(2), "10.10.10.2")
mod_param(router(3), "10.10.10.3")
Mod_param(router_count, "3")
within the different routes I want to loop through the routers like that:
$var(i)
while($(var(i) < $var(router_count)) {
if ($var(router($var(i)) == src_ip") {
.. do something
}
}
Is that somehow possible?
Any hint or idea is appreciated!
Best regards,
Bernhard Suttner
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users