Method I am using so far that works to always add a=record:on for testing

KSR.textops.search_append_body("", "a=record:on")



I do believe there MAY be a bug with the below as it never replaces

KSR.textops.replace_body_all

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

Lewis

 

From: Lewis Hutchinson
Sent: 14 April 2022 10:32
To: sr-users@lists.kamailio.org
Subject: RE: append new a= in SDP (without rtpengine)

 

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:

 


           KSR.textops.replace_body_all("a=record:off", "a=record:on")

           KSR.textops.replace_body_str("a=record:off", "a=record:on", "a")

 

The SDP entry is not replaced but a new one added

 

v=0
o=ml-live-A 1649898066 1649898067 IN IP4 1.1.1.1
s=ml-live-A
c=IN IP4 1.1.1.1
t=0 0
m=audio 35238 RTP/AVP 8 0 102 9 101 103
a=record:off < ------------------------------------------------------------- Not replaced but left in situ
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:102 opus/48000/2
a=fmtp:102 useinbandfec=1; usedtx=1; maxaveragebitrate=30000; maxplaybackrate=48000; sprop-maxcapturerate=48000; ptime=20; minptime=10; maxptime=40
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtpmap:103 telephone-event/48000
a=fmtp:103 0-15
a=sendrecv
a=rtcp:35239
a=ptime:20
a=record:on < --------------------------------------------------------------- added here


This is still present in the debug log

DEBUG: <core> [core/parser/sdp/sdp.c:599]: parse_sdp_session(): ignoring unknown type in a= line: `a=record:off#015#012a=ptime:20...'

I know I can load SDPOPD and remove the, a=record:off but I am under the impression that it should not be required if TEXTOPS was doing its job properly

 

Any help is appreciated

 

Lewis

 

From: Lewis Hutchinson
Sent: 13 April 2022 16:56
To: sr-users@lists.kamailio.org
Subject: append new a= in SDP (without rtpengine)

 

version: kamailio 5.5.3
Using KEMI Python


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

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.

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

DEBUG: <core> [core/parser/sdp/sdp.c:599]: parse_sdp_session(): ignoring unknown type in a= line: `a=record#015#012a=ptime:20...'

Does anyone have any thoughts or tricks on this to give me a few options at ways to handle this?

 

Lewis