[Kamailio-Users] PCRE Regex / Transformations Bug?
Brandon Armstead
brandon at voipo.com
Wed Dec 23 06:28:03 CET 2009
Hello,
I'm attempting to use the following in Kamailio:
$(hdr(from){re.subst,/(.*?);(.*)/\1/}) --- however it does not match /
replace, with this from header sample:
From: <sip:714364XXXX at XX.XX.XX.XX
;pstn-params=808282808882;cpc=unknown>;tag=gK0b53f6d9
However if this is fully pcre compatible, then I am a bit lost as I've
checked the results in php, perl, and python produces:
From: <sip:714364XXXX at XX.XX.XX.XX (expected result)
However, Kamailio does not match / replace / etc using the following:
xlog("L_INFO", "Test From Header Regex:
$(hdr(from){re.subst,/(.*?);(.*)/\1/})");
Code Samples / Regex Pattern Replacements:
PHP: http://codepad.org/CUttQH1r
Perl: http://codepad.org/ZfAO4X5v
Python: http://codepad.org/T14SYWkZ
Any comments / help / etc is always appreciated, look forward to hearing
back from you all!
Sincerely,
Brandon Armstead
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20091222/cd989438/attachment.htm>
More information about the sr-users
mailing list