[OpenSIPS-Users] Regular expression problems with replace_body

Bogdan-Andrei Iancu bogdan at voice-system.ro
Wed Dec 9 10:17:47 CET 2009


Hi Kristijan,

have you tried without the Match-beginning-of-line operator ^ ? The 
internal regexec function is not using the REG_NEWLINE flag.

Regards,
Bogdan

Kristijan Vrban wrote:
> Hello, i try to use replace_body to modify the RTP port in INVITE and 
> OK messages:
>
> from:
> m=audio 13740 RTP/AVP 8 0 3 101
>
> to:
> m=audio 666 RTP/AVP 8 0 3 101
>
> with:
> replace_body("^m=audio \d+", "m=audio 666");
>
> but "^m=audio \d+" does not match. But the regular expression should 
> be correct.
>
> Kristijan
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro




More information about the Users mailing list