Replace session name in sdp

229 views
Skip to first unread message

Alberto

unread,
Mar 23, 2022, 1:16:05 PM3/23/22
to rtpengine
Hi,
I'm using the latest rtpengine and opensips 3.2
is there an option to replace the session name, s= line?
This is usually the same as the useragent, but I'm replacing the useragent using opensips, and would like to replace the s= line accordingly.
Thanks

Richard Fuchs

unread,
Mar 23, 2022, 1:25:42 PM3/23/22
to rtpe...@googlegroups.com
No we don't have such an option. Your best bet is probably to do it from
your SIP proxy, e.g. through the sdpops module or so. Or submit a patch
as pull request 👍

Cheers

Alberto

unread,
Mar 23, 2022, 1:41:24 PM3/23/22
to rtpengine
I tried to do it in opensips, using
replace_body_all("^s=.*$", "s=abczzz");
This works if I don't use rtpengine.

When I add all the rtpengine offer/answer functions, the s= line is reverted to the original.
I tried to do replace_body_all before and after the rtpengine_offer, but it doesn't seem to have any effect.

Richard Fuchs

unread,
Mar 23, 2022, 2:44:32 PM3/23/22
to rtpe...@googlegroups.com
On 23/03/2022 13.41, [EXT] Alberto wrote:
> I tried to do it in opensips, using
> replace_body_all("^s=.*$", "s=abczzz");
> This works if I don't use rtpengine.
>
> When I add all the rtpengine offer/answer functions, the s= line is
> reverted to the original.
> I tried to do replace_body_all before and after the rtpengine_offer,
> but it doesn't seem to have any effect.

I don't know about OpenSIPS but with Kamailio you have to use
msg_apply_changes() when you do something like this.

Cheers

Alberto

unread,
Mar 23, 2022, 7:33:20 PM3/23/22
to rtpengine
There's no such option in opensips.
It might be a bug in opensips that rtpengine is supplied with the original body instead of the modified version.
I'll check with them as well.
Thanks.

H R

unread,
Mar 24, 2022, 8:51:10 AM3/24/22
to rtpengine
Reply all
Reply to author
Forward
0 new messages