[OpenSIPS-Users] [External] Re: how to send a 'list' parameter to rtpengine, or modify SDP in script before sending to rtpengine

Pyle, Jeff JPyle at fusionconnect.com
Tue Feb 25 16:01:44 UTC 2025


Razvan, I'll open a feature request.

Vlad, I'm not quite sure how to feed a specific SDP to rtpengine. I'll research that.

Another possible approach that Richard suggested is to use rtpengine's new "templates" feature to put all the necessary flags and their options directly into the rtpengine.conf file, and then call the relevant template from the OpenSIPS rtpengine functions. That might simplify the overall script in helpful ways anyway.


Regards,
Jeff

________________________________
From: Users <users-bounces at lists.opensips.org> on behalf of Vlad Paiu <vladpaiu at opensips.org>
Sent: Friday, February 21, 2025 05:09
To: users at lists.opensips.org <users at lists.opensips.org>
Subject: [External] Re: [OpenSIPS-Users] how to send a 'list' parameter to rtpengine, or modify SDP in script before sending to rtpengine

You don't often get email from vladpaiu at opensips.org. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>
WARNING: This email originated outside of Fusion's email platform. DO NOT CLICK links or attachments unless you recognize the sender and know the content is safe.

In the meanwhile you can try stream_delete() for all streams that you're not interested in, then calling https://opensips.org/html/docs/modules/3.3.x/sipmsgops.html#func_get_updated_body_part to get the updated SDP and feed that to RTPEngine.


On 2/19/25 23:31, Pyle, Jeff wrote:
I asked the rtpengine-related part of this question on the rtpengine list. Richard's response:

In the newer Kamailio module we have restructured the flags parsing so that you can do `rtpengine_offer("sdp-media-remove=[video message image]")` but likely that change hasn't made it over to OpenSIPS yet.

Is his assumption correct? Does this make sense for a feature request on the Github page?


Regards,
Jeff



________________________________
From: Users <users-bounces at lists.opensips.org><mailto:users-bounces at lists.opensips.org> on behalf of Pyle, Jeff <JPyle at fusionconnect.com><mailto:JPyle at fusionconnect.com>
Sent: Wednesday, January 22, 2025 18:30
To: OpenSIPS Users <users at lists.opensips.org><mailto:users at lists.opensips.org>
Subject: [OpenSIPS-Users] how to send a 'list' parameter to rtpengine, or modify SDP in script before sending to rtpengine

Hello,

I'm on OpenSIPS 3.4.9 with rtpengine 13.1.1.6. I'm trying to make use of the 'sdp-media-remove' command supported in this version of rtpengine to remove unwanted media sessions from the SDP.

The author of rtpengine reminds me its syntax is
  "sdp-media-remove" : ["<media-type>", "<media-type>", ...]

Or, in other words, this command requires a 'list' as its parameters.

The only way I could get rtpengine not to throw an error was by using "sdp-media-remove=video". rtpengine shows this as
  "sdp-media-remove": "video"

Based on the documentation, it needs to be
  "sdp-media-remove" : ["video"]

How can one formulate an rtpengine_offer() command so that I can provide a 'list'. In my case I want to preserve only the 'audio' session, so, I need to write an rtpengine_offer() message with the sdp-media-remove command that sends this:
  "sdp-media-remove" : ["video", "text", "application", "message", "other"]

Even better, is it possible to use standard OpenSIPS scripting commands like stream_exists() and stream_delete() to remove the streams from the SDP before sending to rtpengine? In my testing, these commands don't have any effect on what rtpengine receives.

I have Cisco devices on my network that send an rtpmap payload of 255, which rtpengine typically refuses to process because it's out of spec. Removing the erroneous an unnecessary streams in OpenSIPS before processing in rtpengine would solve this problem without having to patch rtpengine.


Regards,
Jeff


This message is subject to Fusion Connect, Inc.’s email communication policy: www.fusionconnect.com/email-policy<http://www.fusionconnect.com/email-policy>


_______________________________________________
Users mailing list
Users at lists.opensips.org<mailto:Users at lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


This message is subject to Fusion Connect, Inc.’s email communication policy: www.fusionconnect.com/email-policy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20250225/8f5dc2ea/attachment-0001.html>


More information about the Users mailing list