[OpenSIPS-Users] SDP Manipulation in Opensips 3.6

Liviu Chircu liviu at opensips.org
Wed Sep 24 13:53:19 UTC 2025


Hi Anestis,

In case you haven't solved the problem, surely there has to be a way 
using pre-3.6 code, try something resembling:

$var(sdp) = ${rb(application/sdp){re.subst,/a=ptime:[0-9]*\r\n//g});  -> 
just sample code, YMMV -- store the RE inside a $var if cfg syntax does 
not parse this!

rtpengine_manage(...., , , $var(sdp)); # pass it the modified SDP 
buffer, should work just fine

Now, with 3.6+, the solution SHOULD look like:

$sdp.line(a=ptime) = NULL; # delete the 1st a=ptime found
$sdp.stream(audio/a=ptime) = NULL; # more accurate; delete the 1st ptime 
line found in the 1st audio stream

rtpengine_manage();

... but this hasn't been thoroughly tested yet, such usage combination 
could could even cause a crash as of now (new SDP changes system + old 
SDP changes system used together).  I am already working on better 
management of the $sdp changes during failure_route.  Will also take a 
look at some more onreply_route usage scenarios afterwards.

Best regards,

On 13.09.2025 18:25, Anestis Mavrofyllidis wrote:
> I have tried the new way:
> $sdp.line(a=ptime) = NULL,
> Right before the end of the route I can see in the log a correct $sdp; 
> the $mb is still the initial, before the sdp change.

-- 
Liviu Chircu
www.opensips-solutions.com | www.siphub.com




More information about the Users mailing list