[OpenSIPS-Users] check VIA Header / regexp + variables?
Max Mühlbronner
mm at 42com.com
Thu Mar 3 11:54:36 CET 2011
Hello,
i want to perform a check on the VIA Headers, basically to compare if
the source ip ($si) is included in one of the VIA Headers. Already tried
several things, but it seems like there is no way to check for a
variable in a regexpression, maybe someone got a solution or tried
something similar before?
for example:
if (search ("Via:.*$si.")) {
...
}
or
$var(viacheck) = $si;
if (search ("Via:.*$var(viacheck).")) {
...
}
or different approach:
$var(viacheck) = $si;
if($(hdr(Via)[*])=~ ".*$var(viacheck).") {
...
}
But nothing seems to work, is there any way to check for a variable /
non static values in a regexp? Or does anyone know a way to check if the
source ip is contained in VIA Header?
Best Regards
Max M.
More information about the Users
mailing list