Hello,

I need to build a VoIP system who receives SIP and RTP traffic in a public IP and encrypt both of them with TLS and SRTP respectively. The main point is to have security inside of the local network (I know it may sound unuseful).

So, I was trying to build the whole system in Kamailio but I got stucked with the RTP to SRTP bridge and I do not really know how to do it. I know that there are some modules like rtpproxy-ng and rtpengine as media relay that can handle SRTP... any ideas?
I just want to make sure that I am in the right way.

If it could be done in Kamailio, have I to write the code to encrypt RTP, like the algorithm or something?

Would it be convenient to send the RTP packets to Asterisk? (and Asterisk would somehow encrypt them?)

I am pretty new with all of this, any help will be apreciate,
thank you.