[Kamailio-Users] Textops / Search / Regex

Brandon Armstead brandon at cryy.com
Thu Sep 10 18:57:26 CEST 2009


Hello,

    I currently have the following search method use:

search("(restricted|anonymous|Anonymous|Private|private|Unknown|unknown)")

unfortunately this is catching cases where there is a Diversion header i.e.
Diversion: < sip:1234 at someHost > ; reason = unknown


So I attempted to do an assertion:

search("(restricted|anonymous|Anonymous|Private|private|Unknown|(?<!reason=)unknown)")

However it does not seem that Kamailio is completely PCRE compatible? thus
server fail.... / parse error

Does anyone have a solution so I can keep the same matching, except exclude
matching "unknown|Unknown" when reason=unknown, however match it in all
other conditions?

Thank you for any and all help ahead of time.



Sincerely,
Brandon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20090910/8df5fd5f/attachment.htm>


More information about the sr-users mailing list