[SR-Users] Subst_body M Audio

Nicolas Breuer Nicolas.Breuer at belcenter.biz
Thu Jul 13 11:23:37 CEST 2017


Hello,

I'm trying to replace the M part in the SDP Body.

Seems not working as expected ( I changed the "s" part without problems )

Code :
if ( subst_body('/(^m=.*)/m=testing of rewrite.\r/') ) { $var(s)=""; };


Here's the incoming body message

c=IN IP4 217.112.180.235.
t=0 0.
m=audio 49152 RTP/AVP 8 9 18 101.
a=rtpmap:8 PCMA/8000.
a=rtpmap:9 G722/8000.
a=rtpmap:18 G729/8000.
a=fmtp:18 annexb=no.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.

After subst. ( note the .10840 on the m line)

c=IN IP4 217.112.180.10.
t=0 0.
m=testing of rewrite..10840
a=rtpmap:8 PCMA/8000.
a=rtpmap:9 G722/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.
a=nortpproxy:yes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170713/24ffb113/attachment.html>


More information about the sr-users mailing list