<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoPlainText">Method I am using so far that works to always add a=record:on for testing
<br>
<br>
<span style="font-family:"Courier New"">KSR.textops.search_append_body("", "a=record:on")</span><o:p></o:p></p>
<p class="MsoPlainText"><br>
<br>
I do believe there MAY be a bug with the below as it never <i>replaces <br>
</i><br>
<span style="font-family:"Courier New"">KSR.textops.replace_body_all<br>
<br>
<o:p></o:p></span></p>
<p class="MsoPlainText">It would be good to know if this is a bug or me doing it wrong but if no further action required you can close this thread<o:p></o:p></p>
<p class="MsoPlainText">Lewis <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="mso-fareast-language:EN-GB">From:</span></b><span lang="EN-US" style="mso-fareast-language:EN-GB"> Lewis Hutchinson
<br>
<b>Sent:</b> 14 April 2022 10:32<br>
<b>To:</b> sr-users@lists.kamailio.org<br>
<b>Subject:</b> RE: append new a= in SDP (without rtpengine)<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">After a lot of playing around and fixing a silly mistake I had made I have managed to get it to work however the issue I have is, using:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><br>
<span style="font-family:"Courier New"">           KSR.textops.replace_body_all("a=record:off", "a=record:on")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">           KSR.textops.replace_body_str("a=record:off", "a=record:on", "a")<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The SDP entry is not replaced but a new one added<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.5pt;font-family:"Courier New";color:#1D1C1D;background:#F8F8F8">v=0</span><span style="font-size:11.5pt;font-family:"Courier New";color:#1D1C1D"><br>
<span style="background:#F8F8F8">o=ml-live-A 1649898066 1649898067 IN IP4 1.1.1.1</span><br>
<span style="background:#F8F8F8">s=ml-live-A</span><br>
<span style="background:#F8F8F8">c=IN IP4 1.1.1.1</span><br>
<span style="background:#F8F8F8">t=0 0</span><br>
<span style="background:#F8F8F8">m=audio 35238 RTP/AVP 8 0 102 9 101 103</span><br>
<span style="background:#F8F8F8">a=record:off < ------------------------------------------------------------- Not replaced but left in situ</span><br>
<span style="background:#F8F8F8">a=rtpmap:8 PCMA/8000</span><br>
<span style="background:#F8F8F8">a=rtpmap:0 PCMU/8000</span><br>
<span style="background:#F8F8F8">a=rtpmap:102 opus/48000/2</span><br>
<span style="background:#F8F8F8">a=fmtp:102 useinbandfec=1; usedtx=1; maxaveragebitrate=30000; maxplaybackrate=48000; sprop-maxcapturerate=48000; ptime=20; minptime=10; maxptime=40</span><br>
<span style="background:#F8F8F8">a=rtpmap:9 G722/8000</span><br>
<span style="background:#F8F8F8">a=rtpmap:101 telephone-event/8000</span><br>
<span style="background:#F8F8F8">a=fmtp:101 0-15</span><br>
<span style="background:#F8F8F8">a=rtpmap:103 telephone-event/48000</span><br>
<span style="background:#F8F8F8">a=fmtp:103 0-15</span><br>
<span style="background:#F8F8F8">a=sendrecv</span><br>
<span style="background:#F8F8F8">a=rtcp:35239</span><br>
<span style="background:#F8F8F8">a=ptime:20</span><br>
<span style="background:#F8F8F8">a=record:on < --------------------------------------------------------------- added here
</span></span><span style="font-family:"Courier New""><br>
<br>
<o:p></o:p></span></p>
<p class="MsoNormal">This is still present in the debug log<br>
<br>
<span style="font-family:"Courier New";color:#1D1C1D;background:white">DEBUG: <core> [core/parser/sdp/sdp.c:599]: parse_sdp_session(): ignoring unknown type in a= line: `a=record:off#015#012a=ptime:20...'</span><br>
<br>
I know I can load SDPOPD and remove the, <span style="font-family:"Courier New"">
a=record:off</span> but I am under the impression that it should not be required if TEXTOPS was doing its job properly<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Any help is appreciated<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black;mso-fareast-language:EN-GB">Lewis
</span></b><span style="mso-fareast-language:EN-GB"><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="mso-fareast-language:EN-GB">From:</span></b><span lang="EN-US" style="mso-fareast-language:EN-GB"> Lewis Hutchinson
<br>
<b>Sent:</b> 13 April 2022 16:56<br>
<b>To:</b> <a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a><br>
<b>Subject:</b> append new a= in SDP (without rtpengine)<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">version: kamailio 5.5.3<br>
Using KEMI Python<o:p></o:p></p>
<p class="MsoNormal"><br>
I have read several posts on this and tried several approaches but can not seem to get it to work. As it stands I am trying to add a=record:on | a=record:off | a=record:pause In the SDP because FreeSWITCH creating the INVITE isn’t able to do this in the way
 required. When it is sent from FreeSWITCH a=record:on is send a=record <br>
<br>
I have looked at SDPOPS, TEXTOPS and a few others but non of the offer the option to just inject and a= into the SDP body.<br>
<br>
So as a result I tried a  couple of options where the INVITE is created with a=record (unsure why FreeSWITCH wont let us just add :off etc to the end but that’s another point that if anyone know would be helpful) and then using replace_body or search_append_body
 but the result is TEXTOPS is unable to action the request because of a SDP parse error<br>
<br>
<span style="color:#1D1C1D;background:white">DEBUG: <core> [core/parser/sdp/sdp.c:599]: parse_sdp_session(): ignoring unknown type in a= line: `a=record#015#012a=ptime:20...'<br>
<br>
Does anyone have any thoughts or tricks on this to give me a few options at ways to handle this?</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black;mso-fareast-language:EN-GB">Lewis</span></b><span style="mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>