[OpenSIPS-Users] replace_body function question

Bogdan-Andrei Iancu bogdan at opensips.org
Tue Jan 6 17:10:09 CET 2015


Try replace_body_all("^s=xyz$","s=abc") to force also an end of header.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 06.01.2015 18:03, John Nash wrote:
> Yes!!..It works. I used EOH because in actual implementation I need to 
> use some regular expression ( So that it can change s= line to "xyz" 
> no matter what the original value.) but with EOH (even with hard coded 
> value) it does not work.
>
> On Tue, Jan 6, 2015 at 9:28 PM, Bogdan-Andrei Iancu 
> <bogdan at opensips.org <mailto:bogdan at opensips.org>> wrote:
>
>     Hi John,
>
>     I guess you want to replace a line in the message body with
>     replace_body_all(), right ? Give it a test without the EOH :
>     replace_body_all("^s=xyz","s=abc");
>
>     Regards,
>
>     Bogdan-Andrei Iancu
>     OpenSIPS Founder and Developer
>     http://www.opensips-solutions.com
>
>     On 02.01.2015 17:06, John Nash wrote:
>>     Has there been some recent changes to this function? I used this
>>     function in version 1.6 fine but now not seem to be working. I am
>>     trying very simple ..
>>
>>     replace_body_all("^s=xyz\r\n","s=abc\r\n");
>>
>>     But it does not work. I tried " strip_body()" and it worked as
>>     expected.
>>
>>
>>     _______________________________________________
>>     Users mailing list
>>     Users at lists.opensips.org  <mailto:Users at lists.opensips.org>
>>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>

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


More information about the Users mailing list