I have without ^ and $ before, i have now tried again like you suggested
but it does not work.
It goes in the if loop ("search_body") but it does not replace inactive
with sendonly.
I have also look at return code from replace_body and it gives me "-1".
Stas Kobzar je 6/18/2021 ob 1:04 PM napis
Hello,
Just do not use ^ and $ in the search pattern. It is probably trying to
match the whole SDP packet, not single line.
On Fri, Jun 18, 2021 at 5:09 AM Miha via Users
wrote:
> Hello
>
> have issue with replace_body as it does not change SDP.
> My code looks like this:
>
> if (has_body("appl
Hello
have issue with replace_body as it does not change SDP.
My code looks like this:
if (has_body("application/sdp")){
if(search_body("a=inactive")){
*replace_body("^a=inactive$", "a=sendonly");*
}
$var(rtpengine_flags) ="trust-address replace-origin
I fixed it! :)
Sadly it was again my own mistake! I had written in-iface as in-face and
out-face as out-face.
I think I need an eye test!.
Thanks
Mark.
On Wed, 25 Mar 2020 at 12:33, Mark Farmer wrote:
> Now that I've corrected my silly xlog() lines I've got it partially
> working, transcodin
Now that I've corrected my silly xlog() lines I've got it partially
working, transcoding is working (correct codecs passed in either direction).
However the connection & origin IP addresses are incorrect. I tried
reversing the in-face & out-face flags but that made no difference.
Nearly there, an
Hi Bogdan, thanks for the reply.
That was what I ended up trying to do, hence the other question about
deleting a line from a pvar but that's another thread.
However, I do have a related question.
Does the body modification also apply to a reply? The issue I have now is
that when I try to apply m
Hi Mark,
You mentioned calling rtpengine before? if so, note that you cannot have
more than one change over the same part of the body. And rtpengine is
replacing the whole body, so you cannot change a prev change.
What you have to do is to tell rtpengine_offer() to provide the new body
into a
Hi everyone
I am trying to remove a line from the SDP resulting from rtpengine_offer()
but it's not working for me. Can anyone tell me what I am doing wrong
please?
if (is_from_gw("2")) {
remove_hf("Contact","g");
insert_hf("Contact: \r\n");
xlog("C
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 ex
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 w
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
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.
___
12 matches
Mail list logo