[Serusers] "replace" and "search"

Ramin Nikaeen rnikaeen at goldline.net
Tue Sep 6 21:39:54 CEST 2005


 

 

 

 

Dear Friends,

 

I am trying to replace the "From" header field with "anonymous" and then
test 

the "From" header field to see if it contains "anonymous". When the
"search"

is executed, it can not find the "anonymous" in the From header field
although

it seems to have been replaced successfully.

 

Does anyone know what the problem is?

 

Thanks

 

Ramin

 

 

------------------------------------------------------------------------
------------------------------------------------------------------------
---------

"replace" and "search"

 

                        replace("^From:(.*)>" , "From: \"Anonymous\"
<sip:anonymous at anonymous.com>");

 


                        if (search("^(f|F)rom:.*(a|A)nonymous"))

                        {


                                log(3, "From field tested WAS
Anonymous\n");


                        }


                        else


                        {

                                log(3, "From field tested NOT
Anonymous\n");

                        }     

------------------------------------------------------------------------
------------------------------------------------------------------------
---------

 

 

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20050906/12557987/attachment.htm>


More information about the sr-users mailing list