[OpenSIPS-Users] How to replace a port in SDP text?
Mohamed OUALLA
oualla.simohamed at gmail.com
Fri Aug 16 20:48:13 UTC 2024
Hi Rodrigo,
I hope this help:
```
#Change sdp port of m line to 12345
if (has_body("application/sdp")) {
subst_body("/^m=audio [0-9]+ RTP\/AVP/m=audio 12345 RTP\/AVP/");
}
```
Best,
Mohamed
On Fri, Aug 16, 2024 at 9:24 PM Rodrigo Pimenta Carvalho <pimenta at inatel.br>
wrote:
> Hi.
>
> I'm using OpenSIPs 2.3
>
> How can I change a port value in SDP text (in INVITE or SIP OK) ? I was
> reading about Script Transformations and module textops, but I can't
> figure out how to do that.
>
> Any hint will be very helpful!
>
> I mean the port in the line like this: m=audio* 50270 *RTP/AVP 106 9 0 8
> 3 111 102 110 112 98 101 100 99
> I just want to test and see what will happen (with RTP packages) if I
> change such port with the source port.
>
> Best regards.
>
> [image: cid:a604bf77-b5d0-4cba-b35b-b5456300e731]
>
> *Rodrigo Pimenta Carvalho*
>
> Inatel Competence Center - PDI
>
>
>
> *www.inatel.br <http://www.inatel.br/>*
>
>
>
> <https://www.facebook.com/inatel/>
>
> <https://www.linkedin.com/school/inatel/mycompany/verification/>
>
> [image: cid:9e1aa20a-9909-4469-b056-bf2a099cc8cb]
> <https://www.instagram.com/inatel.tecnologias/?hl=pt>
>
> <https://www.youtube.com/c/InatelTecnologias>
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
--
==============================
Mohamed OUALLA
*VoIP Technical Solutions and Software Engineer*
Mail: oualla.simohamed at gmail.com
N.Phone: +212 6 29 19 3116
<oualla.simohamed at gmail.com>*SSC Certified Professional*
==============================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20240816/2796a9e8/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-cid_a604bf.png
Type: image/png
Size: 5592 bytes
Desc: not available
URL: <http://lists.opensips.org/pipermail/users/attachments/20240816/2796a9e8/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-ehe3sv15.png
Type: image/png
Size: 675 bytes
Desc: not available
URL: <http://lists.opensips.org/pipermail/users/attachments/20240816/2796a9e8/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-cjaof3xp.png
Type: image/png
Size: 832 bytes
Desc: not available
URL: <http://lists.opensips.org/pipermail/users/attachments/20240816/2796a9e8/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-cid_9e1aa2.png
Type: image/png
Size: 2252 bytes
Desc: not available
URL: <http://lists.opensips.org/pipermail/users/attachments/20240816/2796a9e8/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-w5a25r52.png
Type: image/png
Size: 957 bytes
Desc: not available
URL: <http://lists.opensips.org/pipermail/users/attachments/20240816/2796a9e8/attachment-0009.png>
More information about the Users
mailing list