[SR-Users] Kamailio and Asterisk in K8s

H Yavari hyavari at rocketmail.com
Fri Mar 5 18:54:52 CET 2021


 Thank you so much David for sharing this.I am on the same architecture.
It seems I should spend more time on inserting Multus in GKE and run RTPe in host mode. 
Regards,Hossein


    On Thursday, March 4, 2021, 10:39:12 PM PST, David Villasmil <david.villasmil.work at gmail.com> wrote:  
 
 So here's my rtpengine conf:
[rtpengine]
interface=internal/[PRIVATE_IP];external/[PRIVATE_IP]![PUBLIC_IP]
foreground=true
log-stderr=true
listen-ng=[PRIVATE_IP]:22222
port-min=23000
port-max=32768
recording-dir=/tmp
recording-method=pcap
recording-format=eth
log-level=6
delete-delay=0

and in Kamailio, you listen on 2 ports, one for the public side, the other for the private:
listen=LISTEN_PRIVATE_PROTO:LISTEN_PRIVATE_IF:LISTEN_PRIVATE_PORT advertise ADVERTISE_IP:ADVERTISE_PORT
listen=LISTEN_PRIVATE_PROTO:LISTEN_PRIVATE_IF:5080

This is basically my setup, it should be straightforward.

Hope that helps
Regards,
David Villasmilemail: david.villasmil.work at gmail.comphone: +34669448337

On Thu, Mar 4, 2021 at 5:18 PM Julien Klingenmeyer <julien.klingenmeyer at ovhcloud.com> wrote:


Hi Hossein,

 

What do you mean by ‘some issue in host-mode’?

We use both Kamailio and RTPEngine in Kubernetes clusters with Multus CNI to manage both private and public interfaces and we have not encountered any issues so far with this configuration.

 

Kind regards

Julien

 

De : sr-users <sr-users-bounces at lists.kamailio.org> au nom de H Yavari <hyavari at rocketmail.com>
Répondre à : "Kamailio (SER) - Users Mailing List" <sr-users at lists.kamailio.org>
Date : mercredi 3 mars 2021 à 20:05
À : "Kamailio (SER) - Users Mailing List" <sr-users at lists.kamailio.org>
Objet : [SR-Users] Kamailio and Asterisk in K8s

 

Hi to all,

 

I am going to run multiple Asterisk instances (Pods) in my Kubernetes cluster. I have a stateless Kamailio sip proxy also. We know that K8s can't handle port range for its services, So we have to use host network for Asterisk deployment. But in this mode, Asterisk pods can't connect to other pods through local IPs and you have to add a second network interface to your pods. One solution is using something like Multus that provides multi-home pods. But it has some issue in host-mode!

 

Also, Using media proxy like RTPEngine in front of Asterisk instances doesn't make a change. You have to run RTPEngine in the host mode or just run it on a VM with multiple NIC.

What is the practical solution for this scenario?

 

Thank you.

 

BR

Hossein
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users at lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users at lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20210305/a19cc498/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot 2021-03-04 at 20.58.47.png
Type: image/png
Size: 153625 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20210305/a19cc498/attachment.png>


More information about the sr-users mailing list