<div dir="ltr"><div>That works, here's what I've ended up using:<br></div><div><br></div><div>rtpengine_manage("loop-protect ... other things I need", , $var(body));</div><div>remove_body_part();</div><div>add_body_part($(var(body){re.subst,/^s=.*$/s=abcxxx/g}), "application/sdp");</div><div><br></div><div>but seems cumbersome, I was expecting to do rtpengine_manage followed by replace_body_all and don't interfere further with the flow<br></div><div><br></div><div>Anyway, thanks<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 24 Mar 2022 at 02:33, Artiom Druz <<a href="mailto:artiom.druz@gmail.com">artiom.druz@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Hello, Alberto.<div dir="auto">You can modify it by using an optional parameter in rtpengine_offer (sdp_var - <a href="https://opensips.org/html/docs/modules/3.2.x/rtpengine#func_rtpengine_offer" target="_blank">https://opensips.org/html/docs/modules/3.2.x/rtpengine#func_rtpengine_offer</a>).</div><div dir="auto">Logic:</div><div dir="auto">You can write new sdp body to the variable instead of rewrite of existing SDP. After that you can modify "s" parameter in this variable.</div><div dir="auto">Next - you delete existing SDP (remove_body_part()) and add new SDP with content from variable (add_body_part()).</div><div dir="auto"><br></div><div dir="auto">Best regards,</div><div dir="auto">Artiom Druz</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">чт, 24 мар. 2022 г., 04:34 Alberto <<a href="mailto:alberto.rinaudo@gmail.com" target="_blank">alberto.rinaudo@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div>I'm trying to change the session name, the s= line, while using rtpengine.</div><div><br></div><div>If I remove rtpengine and do replace_body_all("^s=.*$", "s=abczzz"); it works just fine and I see the new session name in the second leg of the call.</div><div><br></div><div>But when rtpengine_offer is called, the original sdp body is used instead of the modified body.</div><div>I tried to do replace_body_all before and after rtpengine_offer, but it doesn't work, the second leg always has the original session name.<br></div><div><br></div><div>Any advice?</div><div>Thanks<br></div></div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" rel="noreferrer" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>