CyCoreSystems / asterisk-k8s-demo

Demo of scalable Asterisk on Kubernetes
Apache License 2.0
158 stars 72 forks source link

How to connect to Kamailio with it's current deployment #14

Closed ftntming closed 4 years ago

ftntming commented 4 years ago

Hi Sean and others,

My apologies for creating this issue since I don't know a better way to approach you for help.

I've setup the asterisk demo according to your wonderful documentation. My current state is image

My dumb question is how I can test/verify the system is working? In your demo I didn't see the detailed steps. And now with all the services default to ClusterIP I don't know how to tested them from my local hosts. More specifically, I'm looking to

  1. Create some extensions/inbound rules
  2. Register to the created extensions
  3. Call between these extensions

Any help is much appreciated!

Thanks a lot, Ming

Ulexus commented 4 years ago

Thanks for you kind words, and you are correct: we do not get into things like extensions, registrations, or extension-to-extension calling. The demo only handles inbound calls being terminated to Asterisk.

Those kinds of features are more complicated and more implementation-specific, and I what I was primarily trying to do is demonstrate the minimum possible scalable VoIP deployment on Kubernetes.

Just for general guidelines, though:

ftntming commented 4 years ago

Thanks @Ulexus for your quick response and the guidelines. If we're using kamailio as load balancer, why it's service only bind to 5060/UDP but not RTP ports? Also current kamailio is using ClusterIP, which is not public IP, how can I allow my local client hit the kamailio through k8s?

Thanks a lot!

Ulexus commented 4 years ago

kamailio does not handle RTP in any way. rtpproxy (which is included within the kamailio Pod) handles RTP. However, kubernetes does not provide a way to expose a wide range of ports as RTP generally requires. Instead, we make use of symmetric RTP and the fact that the near side should begin sending RTP without waiting on the remote side, to trigger NAT.

Note that any related firewall rules are still up to you to open for the RTP port range. In the demo, the default range is 20000-30000/UDP.

ftntming commented 4 years ago

Got it! Thanks Sean. That's really helpful!