Replace_body works .
replace_body("AVP 8 9", "AVP 9 8");
Before
m=audio 49152 RTP/AVP 8 9 18 101.
a=rtpmap:8 PCMA/8000.
a=rtpmap:9 G722/8000.
a=rtpmap:18 G729/8000.
After
m=audio 17782 RTP/AVP 9 8 101.
a=rtpmap:8 PCMA/8000.
a=rtpmap:9 G722/8000.
-----Message d'origine-----
De : Nicolas Breuer
Envoyé : jeudi 13 juillet 2017 18:09
À : Kamailio (SER) - Users Mailing List <[email protected]>
Objet : RE: [SR-Users] Subst_body M Audio
Hello,
I tried to disable the rtpproxy & indeed the issue is not present.
I put the subst_body at the end of the script ( in the branch_route section )
Rtpproxy is called before and the sdp body is still altered
m=audio 49152 RTP/AVP 9 8 101.11648
a=rtpmap:8 PCMA/8000.
a=rtpmap:9 G722/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.
a=nortpproxy:yes.
-----Message d'origine-----
De : sr-users [mailto:[email protected]] De la part de
Carsten Bock Envoyé : jeudi 13 juillet 2017 11:53 À : Kamailio (SER) - Users
Mailing List <[email protected]> Objet : Re: [SR-Users] Subst_body M
Audio
Hi,
it seems you are triggering RTPProxy after the subst_body (hence the port and
the parameter a=nortpproxy in the SDP).
Try removing RTPProxy.
Thanks,
Carsten
2017-07-13 11:23 GMT+02:00 Nicolas Breuer <[email protected]>:
>
>
> 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.
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> [email protected]
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
--
Carsten Bock
CEO (Geschäftsführer)
ng-voice GmbH
Millerntorplatz 1
20359 Hamburg / Germany
http://www.ng-voice.com
mailto:[email protected]
Office +49 40 5247593-40
Fax +49 40 5247593-99
Sitz der Gesellschaft: Hamburg
Registergericht: Amtsgericht Hamburg, HRB 120189
Geschäftsführer: Carsten Bock
Ust-ID: DE279344284
Hier finden Sie unsere handelsrechtlichen Pflichtangaben:
http://www.ng-voice.com/imprint/
_______________________________________________
Kamailio (SER) - Users Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
Kamailio (SER) - Users Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users