Giter VIP home page Giter VIP logo

docker-kamailio's People

Contributors

joeblackwaslike avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

docker-kamailio's Issues

kubernetes services not allowing to bind to the same nodeport for tcp and udp protocols

We have the following service manifest for kamailio:

kind: Service
apiVersion: v1
metadata: 
  name: kamailio
  labels:
    app: kamailio
    role: sip-proxy
spec:
  selector:
    app: kamailio
    project: valuphone
  type: NodePort
  clusterIP: None
  ports:
    - name: sip-tcp
      protocol: TCP
      port: 5060
      nodePort: 5060
    - name: sip-udp
      protocol: UDP
      port: 5060
      nodePort: 5060
    - name: sip-tls
      protocol: TCP
      port: 5061
      nodePort: 5061
    - name: alg-tcp
      protocol: TCP
      port: 7000
      nodePort: 7000
    - name: alg-udp
      protocol: UDP
      port: 7000
      nodePort: 7000
    - name: alg-tls
      protocol: TCP
      port: 7001
      nodePort: 7001  

When I try to create it, it gives the following error:

The Service "kamailio" is invalid.
spec.ports[1].nodePort: invalid value '5060', Details: provided port is already allocated

It appears that the error checking kubernetes does of the service manifest isn't taking into account that udp and tcp ports are different ports. If i run it through and change the tcp ports to one port higher, it works.

I discussed the possible bug with the kubernetes developers and they had this to say:

justinsb [8:17 PM] 
@xwhyz: I think it’s actually a bug/design mistake (my mistake) that we don’t allow you to bind the same NodePort for both TCP & UDP

[8:18] 
It’s not a huge deal if you have ELB in front, because it will redirect the ports anyway

[8:19] 
Not sure what to recommend if you’re not using ELB though

[8:19] 
It’s definitely a fixable bug.  Though likely not in 1.2

the following manifest is working, but doesn't meet the sip standards as i understand them:

kind: Service
apiVersion: v1
metadata: 
  name: kamailio
  labels:
    app: kamailio
    role: sip-proxy
spec:
  selector:
    app: kamailio
    project: valuphone
  type: NodePort
  clusterIP: None
  ports:
    - name: sip-tcp
      protocol: TCP
      port: 5060
      nodePort: 5060
    - name: sip-udp
      protocol: UDP
      port: 5060
      #nodePort: 5060
      nodePort: 5061
    - name: sip-tls
      protocol: TCP
      port: 5061
      # nodePort: 5061
      nodePort: 5062
    - name: alg-tcp
      protocol: TCP
      port: 7000
      nodePort: 7000
    - name: alg-udp
      protocol: UDP
      port: 7000
      # nodePort: 7000
      nodePort: 7001
    - name: alg-tls
      protocol: TCP
      port: 7001
      nodePort: 7002   

Here is the output of kubectl describe svc kamailio

Name:           kamailio
Namespace:      default
Labels:         app=kamailio,role=sip-proxy
Selector:       app=kamailio,project=valuphone
Type:           NodePort
IP:             None
Port:           sip-tcp 5060/TCP
NodePort:       sip-tcp 5060/TCP
Endpoints:      172.17.16.27:5060,172.17.20.76:5060,172.17.60.89:5060
Port:           sip-udp 5060/UDP
NodePort:       sip-udp 5061/UDP
Endpoints:      172.17.16.27:5060,172.17.20.76:5060,172.17.60.89:5060
Port:           sip-tls 5061/TCP
NodePort:       sip-tls 5062/TCP
Endpoints:      172.17.16.27:5061,172.17.20.76:5061,172.17.60.89:5061
Port:           alg-tcp 7000/TCP
NodePort:       alg-tcp 7000/TCP
Endpoints:      172.17.16.27:7000,172.17.20.76:7000,172.17.60.89:7000
Port:           alg-udp 7000/UDP
NodePort:       alg-udp 7001/UDP
Endpoints:      172.17.16.27:7000,172.17.20.76:7000,172.17.60.89:7000
Port:           alg-tls 7001/TCP
NodePort:       alg-tls 7002/TCP
Endpoints:      172.17.16.27:7001,172.17.20.76:7001,172.17.60.89:7001
  • it seems the best fix for this situation after some discussion with the kubernetes dev's is to add some rules to iptables to direct the traffic to come in from the correct ports, but obviously we're looking for the best solution to the problem

NAT functionaloty

Hi
How does kamailio docker obtain the real ip of the client for fixing the NAT issues (like fix_nated_contact or fix_nated_register)

thanks
Siva

Kubewait can't reach API URL because of issue with permissions

Hello, Joe.

Probably, you don't use RBAC in your Kubernetes cluster, but I do. So, a bunch of monitoring containers can't reach API rules because of permissions. (I've done files with roles and make PR later).

But I have the next problem:
1)I've created necessary Roles and RoleBindings.
2)But kubewait doesn't get them

pykube.exceptions.HTTPError: deployments.extensions "rabbitmq" is forbidden: User "system:serviceaccount:default:default" cannot get deployments.extensions in the namespace "default": [clusterrole.rbac.authorization.k8s.io "get-deployments-default" not found, role.rbac.authorization.k8s.io "get-rabbitmq-resources" not found]

though they exist and they are visible via kubectl:

root@kmaster1:~/# kubectl get roles
NAME                       AGE
get-couchdb-configmap      2d
get-couchdb-statefulsets   2d
get-rabbitmq-resources     22h

ENV variables not defined in the ConfingMap though they exits in yaml file

Hello.
I've noticed that to variables presented in the kubernetes/local.yaml

- name: FREESWITCH_SYNC_SOURCE
          valueFrom:
            configMapKeyRef:
              name: kamailio
              key: freeswitch.sync.source
 - name: FREESWITCH_SYNC_ARGS
           valueFrom:
            configMapKeyRef:
              name: kamailio
              key: freeswitch.sync.args

But they are not defined in the ConfigMap definition:

data:
  kamailio.log.level: info
  kamailio.log.color: 'true'
  rabbitmq.hosts: rabbitmq
  kamailio.shm-memory: '128'
  kamailio.pkg-memory: '8'
  kamailio.enable-roles: websockets,message,presence_query,presence_notify_sync,registrar_sync

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.