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.

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to