[OpenSIPS-Users] Textops and IPv6

Sidwell, David david.sidwell at necect.com
Wed Dec 10 22:22:59 CET 2014


When using the TEXTOPS module to search and/or replace items in the SIP messages, I don't seem to be able to match IPv6 addresses that are enclosed in square brackets '[' ']'.
If I try and escape with '\[' or ']' it seems to invalidate the entire subst command.
If I escape with '\x4b' or '\x4d' it simply won't match.

e.g.
subst('/^Contact: ([^@]*<)([^@]*@)[a-zA-Z_0-9\[\].:-]+(.*)(>.*)$/Contact: \1\2$var(contact)\3\4/ig');


Any ideas?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20141210/e0c8e699/attachment.htm>


More information about the Users mailing list