The best solution is to use RTPEngine. Just don't reinvent the wheel, do as "best practices".
Also, setting up and configuring RTPEngine is really easy and you would just need to add a couple of lines of code on the kamailio script. 
Here are a couple of links to help you on that quest:

Configuring RTPEngine in Kamailio: A Quick Guide – Blog for the Tech Community (voipnuggets.com)

And good old Nick's headbutts with networking
Kamailio Bytes – Setting up rtpengine in Kamailio to relay RTP / Media | Nick vs Networking



Sérgio Charrua


On Fri, Apr 26, 2024 at 11:48 AM christian.marinelli--- via sr-users <sr-users@lists.kamailio.org> wrote:
christian.marinelli@hotmail.it wrote:
> Hi Sergio,
> thank you for you support and thank you about the three posibilities you suggest to me!
>
> I prefer the second one because the third could create problems with other services in the
> VPN and the first one is a little bit difficult for a neophyte user with SIP concepts.
> So i prefer the second one!
> Can you suggest me how i can change my Kamailio configuration to do this behavior?
> Thanks you so much in advance
> Christian

Hi @sergio charrua,
the last days i tryed to search and study how to set my Kamailio server to modify the SDP content and replace
internal/private IP addresses with the public addresses, but...without success! :(
Can you help me to understand how can i modify the Kamailio configuration to do this?
Thank you in advance
Christian
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-leave@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe: