[SR-Users] Need help in transforming an SDP string through a re.subst

Denys Pozniak denys.pozniak at gmail.com
Tue Feb 23 19:51:14 CET 2021


Hello!

There is a task to remove a fragment (*a=rtpmap:8 PCMA/8000#015#012*) from
the SDP string generated by the rtpengine.


*v=0#015#012o=kw 1614043485 1614043486 IN IP4
185.19.237.77#015#012s=kw#015#012c=IN IP4 1.1.1.1#015#012t=0
0#015#012m=audio 31828 RTP/AVP 0 8 101#015#012a=silenceSupp:off - - -
-#015#012a=direction:both#015#012a=rtpmap:0 PCMU/8000#015#012a=rtpmap:8
PCMA/8000#015#012a=rtpmap:101 telephone-event/8000#015#012a=fmtp:101
0-16#015#012a=sendrecv#015#012a=rtcp:31829#015#012a=ptime:20#015#012*

The most logical option seems to be using the re.subst transformation, but
so far no success.
$avp(write_sdp_pv) = $(avp(write_sdp_pv){re.subst,/a=rtpmap:8
PCMA\/8000%23015%23012//s});

Сan there be an alternative or am I doing something wrong with the re.subst?

-- 

BR,
Denys Pozniak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20210223/4b310cce/attachment.htm>


More information about the sr-users mailing list