I have self-hosted kubernetes cluster, launched on oracle cloud instances.

I want to launch there FreePBX (asterisk distribution). So, I have problems with NAT - sip protocol is terrible to work with NAT.

How can I bypass it? I have two ideas:

  1. create VPN (openvpn??) service in the another container in the same pod with freepbx, so, clients(app on smartphone, hardware phone) will connect to vpn, and than to freepbx
  2. use turn/coturn, something like this: https://github.com/l7mp/stunner

So, client will use turn, and freepbx will use turn as well

But maybe I can just somehow configure SIP protocol for server?

Basically, I have multiple NATs: client > router > external IP > internal IP of oracle cloud > metallb (which uses this internal IP > pod’s IP address.

And it kills SIP traffic. It even can’t auth :(

Also, I used gomplate template to generate ports for my service (for SIP I need high range of ports for RTP)