<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hello,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
function couldnt  probably validate parameter.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Could you share your function line.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Best Regards</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Yasin CANER</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<pre style="font-family: monospace; background-color: rgb(252, 255, 252); border: 1px solid rgb(153, 204, 204); padding-left: 15pt; overflow: auto; border-radius: 2.5px; font-size: 15px">if ( subst_body("/^o=(.*) /o=$fU /") ) {};</pre>
or</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<pre style="font-family: monospace; background-color: rgb(252, 255, 252); border: 1px solid rgb(153, 204, 204); padding-left: 15pt; overflow: auto; border-radius: 2.5px; font-size: 15px">$avp(regx)="/^o=(.*)/o=$fU/";</pre>
<pre style="font-family: monospace; background-color: rgb(252, 255, 252); border: 1px solid rgb(153, 204, 204); padding-left: 15pt; overflow: auto; border-radius: 2.5px; font-size: 15px">if ( subst_body("$avp(regx)") ) {};</pre>
<br>
</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> sr-users <sr-users-bounces@lists.kamailio.org> on behalf of Kristijan Vrban <vrban.lkml@gmail.com><br>
<b>Sent:</b> Wednesday, February 20, 2019 6:00 PM<br>
<b>To:</b> Kamailio (SER) - Users Mailing List<br>
<b>Subject:</b> [SR-Users] Regex issue with subst_body</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">Hi, in a sdp i need to rewrite a a=sendrecv to a=sendonly<br>
but onyl for the for the video stream. I made a regex like this:<br>
<br>
(?<=m=video)(?s)(.*)(a=sendrecv)<br>
<br>
Full version here: <a href="https://regex101.com/r/rovecJ/1">https://regex101.com/r/rovecJ/1</a><br>
<br>
But if have problems to translate this into kamailio config via<br>
subst_body function. I always end with ERROR: fix_actions(): fixing<br>
failed (code=-3)<br>
<br>
Somebody sees the mistake?<br>
<br>
Kristijan<br>
<br>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
sr-users@lists.kamailio.org<br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</div>
</span></font></div>
</div>
</body>
</html>