<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="monospace">On 2.2 you cannot use variables as parms for
any script functions, some of them do not support variables. And
replace_body() is one of them.<br>
<br>
In 3.4 all script functions can take vars as params, so you should
be fine.<br>
<br>
Regards,<br>
</font>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
<a class="moz-txt-link-freetext" href="https://www.siphub.com">https://www.siphub.com</a></pre>
<div class="moz-cite-prefix">On 22.03.2024 08:37, Stefan Carlsson
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:f26617e5-d0b8-43a6-84f8-d577375a0137@tetab.nu">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="text/html; charset=utf-8">
<div id="nine_body_n18e64d-d37ce" class="nine_body mceEditable"
dir="auto"
style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12.0pt; line-height:1.3; color:#1f497d">
<div class="nine-pg" dir="auto">Still on 2.2 but are planning to
migrste later in the spring to Ubuntu and 3.4 .. </div>
<div class="nine-pg" dir="auto"><br>
</div>
<div class="nine-pg" dir="auto">Can you please in some quick
notes tell me what must change in the script if required....</div>
<div class="nine-pg blank sign" dir="auto"><span
style="font-family:calibri,arial,helvetica,sans-serif; font-size:11pt"> </span></div>
<div class="nine-pg blank sign" dir="auto"><span
style="font-family:calibri,arial,helvetica,sans-serif; font-size:11pt">Regards
…</span></div>
<div id="nine-sign-n18e64d-d37ce" class="nine_signature"
dir="auto"
style="font-size:11pt; font-family:'calibri' ,'arial' ,'helvetica' ,sans-serif; line-height:1.3">
<div class="nine-pg" dir="auto">
<div class="nine-pg MsoNormal" dir="auto"><br>
</div>
<div class="nine-pg MsoNormal" dir="auto">Stefan </div>
<div class="nine-pg" dir="auto"><br>
</div>
</div>
</div>
</div>
<div class="quoted_output_body">
<div id="quoted_header_n18e64d-d37ce"
class="quoted_header_editor fold" dir="auto">
<hr
style="border:none; height:1px; color:#e1e1e1; background-color:#e1e1e1">
<div dir="auto" style="border:none; padding:3.0pt 0cm 0cm 0cm"><span
style="font-size:11.0pt; font-family:Calibri,Arial,Helvetica,sans-serif"><b>From:</b>
Bogdan-Andrei Iancu <a class="moz-txt-link-rfc2396E" href="mailto:bogdan@opensips.org"><bogdan@opensips.org></a><br>
<b>Sent:</b> Thursday, 21 March 2024 17:30<br>
<b>To:</b> Stefan Carlsson; <a class="moz-txt-link-abbreviated" href="mailto:users@lists.opensips.org">users@lists.opensips.org</a><br>
<b>Subject:</b> Re: [OpenSIPS-Users] SDP<br>
</span></div>
</div>
<br type="attribution">
</div>
<div><font face="monospace">Hi,<br>
<br>
What OpenSIPS version are you using? <br>
<br>
Regards,<br>
</font>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext"
href="https://www.opensips-solutions.com" moz-do-not-send="true">https://www.opensips-solutions.com</a>
<a class="moz-txt-link-freetext" href="https://www.siphub.com"
moz-do-not-send="true">https://www.siphub.com</a></pre>
<div class="moz-cite-prefix">On 21.03.2024 00:09, Stefan
Carlsson wrote:<br>
</div>
<blockquote type="cite">
<meta name="Generator"
content="Microsoft Word 15 (filtered medium)">
<style>@font-face
{font-family:"Cambria Math"}@font-face
{font-family:Calibri}@font-face
{font-family:"Segoe UI Emoji"}@font-face
{font-family:Consolas}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif}a:link, span.MsoHyperlink
{color:#0563C1;
text-decoration:underline}a:visited, span.MsoHyperlinkFollowed
{color:#954F72;
text-decoration:underline}pre
{margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New"}p.msonormal0, li.msonormal0, div.msonormal0
{margin-right:0in;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif}span.HTMLPreformattedChar
{font-family:Consolas}span.gmailsignatureprefix
{}span.EmailStyle21
{font-family:"Calibri",sans-serif;
color:windowtext}span.EmailStyle22
{font-family:"Calibri",sans-serif;
color:windowtext}.MsoChpDefault
{font-size:10.0pt}div.WordSection1
{}</style>
<div class="WordSection1">
<p class="MsoNormal">Hi !</p>
<p class="MsoNormal">I sincerely apologize that I not read
thru all the modules before my orginal post , I’ve found
that textops module can search and replace
</p>
<p class="MsoNormal">the text in both the header and the
body. (which I mailed to the requester)
</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I’ve tried some of the exported
functions but:</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">orginal snap: o=root 276479022
276479022 IN IP4 172.24.7.20</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">$avp(reinv_sess_id) = “12345678”; #
Got this from $avp(reinv_oline) = $(rb{sdp.line,o}) and
some regex tweeking and
$(avp(reinv_result){s.select,1,;})
</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">$avp(reinv_sess_ver) = “276479022”;</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">replace_body("$avp(reinv_sess_ver)","$avp(reinv_sess_id)");</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">This seemed not to work …</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">but this did:</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Original text snap: a=sendrecv</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">replace_body("a=sendrecv",
"a=sendonly"); # Indicate call hold according
RFC3264
</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<div>
<p class="MsoNormal"><span style="">// Regards …</span></p>
<p class="MsoNormal"><span style="">Stefan</span></p>
<p class="MsoNormal"><span style=""> </span></p>
</div>
<p class="MsoNormal"> </p>
<div>
<div
style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Bogdan-Andrei Iancu <a
class="moz-txt-link-rfc2396E"
href="mailto:bogdan@opensips.org"
moz-do-not-send="true">
<bogdan@opensips.org></a> <br>
<b>Sent:</b> Wednesday, 20 March, 2024 14:44<br>
<b>To:</b> OpenSIPS users mailling list <a
class="moz-txt-link-rfc2396E"
href="mailto:users@lists.opensips.org"
moz-do-not-send="true">
<users@lists.opensips.org></a>; Stefan
Carlsson <a class="moz-txt-link-rfc2396E"
href="mailto:stefan.carlsson@tetab.nu"
moz-do-not-send="true">
<stefan.carlsson@tetab.nu></a><br>
<b>Subject:</b> Re: [OpenSIPS-Users] SDP</p>
</div>
</div>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span
style="font-family:"Courier New"">Nothing is
impossible as time as you search in the right place (aka
the Manual). See my reply on your thread.<br>
<br>
Regards,<br>
<br>
</span></p>
<pre>Bogdan-Andrei Iancu</pre>
<pre> </pre>
<pre>OpenSIPS Founder and Developer</pre>
<pre> <a href="https://www.opensips-solutions.com"
class="moz-txt-link-freetext" moz-do-not-send="true">https://www.opensips-solutions.com</a></pre>
<pre> <a href="https://www.siphub.com"
class="moz-txt-link-freetext" moz-do-not-send="true">https://www.siphub.com</a></pre>
<div>
<p class="MsoNormal">On 14.03.2024 09:50, Stefan Carlsson
wrote:</p>
</div>
<blockquote style="margin-top:5.0pt; margin-bottom:5.0pt">
<p class="MsoNormal">Hi !</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">You can use the module sipmsgops to
view and change some of the ADP fields such as codecs
and streams … but unfortunately you don’t have</p>
<p class="MsoNormal">complete control of the SDP compared
to what it seems could be done on the Kamailio SIP
router</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I need to change the a=sendrecv field
and it seems to be impossible
<span
style="font-family:"Segoe UI Emoji",sans-serif">☹</span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span style="">Regards …</span></p>
<p class="MsoNormal"><span style="">_________________________________</span></p>
<p class="MsoNormal"><span style="">Stefan Carlsson</span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><b>From:</b> Users <a
href="mailto:users-bounces@lists.opensips.org"
moz-do-not-send="true">
<users-bounces@lists.opensips.org></a> <b>On
Behalf Of </b>Prathibha B<br>
<b>Sent:</b> Thursday, 14 March, 2024 05:16<br>
<b>To:</b> OpenSIPS users mailling list <a
href="mailto:users@lists.opensips.org"
moz-do-not-send="true">
<users@lists.opensips.org></a><br>
<b>Subject:</b> [OpenSIPS-Users] SDP</p>
<p class="MsoNormal"> </p>
<div>
<p class="MsoNormal">How to see the SDP in opensips?<br
clear="all">
</p>
<div>
<p class="MsoNormal"> </p>
</div>
<p class="MsoNormal"><span class="gmailsignatureprefix">--
</span></p>
<div>
<div>
<div>
<p class="MsoNormal">Regards,</p>
</div>
<div>
<p class="MsoNormal">B.Prathibha</p>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><br>
<br>
</p>
<pre>_______________________________________________</pre>
<pre>Users mailing list</pre>
<pre><a href="mailto:Users@lists.opensips.org"
class="moz-txt-link-freetext" moz-do-not-send="true">Users@lists.opensips.org</a></pre>
<pre><a
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
class="moz-txt-link-freetext" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a></pre>
</blockquote>
<p class="MsoNormal"> </p>
</div>
</blockquote>
<br>
</div>
</blockquote>
<br>
</body>
</html>