Jump to content

Tom

Members
  • Posts

    69
  • Joined

  • Last visited

  • Days Won

    9

Posts posted by Tom

  1. On 2/15/2018 at 5:00 AM, VincentdeWit said:

    Thanks for the tip! I've been using the template files provided by FusionPBX, they've saved a ton of time since they are already in their Github repo.
    I've been familiar with Twig, and using the node-twig implementation for templating. It's really easy to understand and one of the simplest out there.

    If you're looking into a NodeJS API, take a look at Cradle as CouchDB client.

     

    @Tom Hmm, I'll look into that one. The thing I'm more concerned about is security wise for provisioning, such as if I know a phone's MAC I can basically lookup every phone's SIP credentials. I could off-course apply IP address filtering (store an array of IP addresses in the account DB, but sounds too complex (how about different branches, remote working, VPN etc.)).

    The idea behind mTLS is that knowing the MAC is useless if you don't have the correct client certificate.

  2. 3 hours ago, VincentdeWit said:

    Been working on this for a while now, and found out that the existing solutions are a bit outdated.
    What we did is build a NodeJS API (based on Express) together with MongoDB where we store information such as MAC address, Account ID and Owner ID (if applicable). 
    Our beta solution now basically provides a few things;
    - Provisioning based on MAC address
    - Remote phonebook support linked to users and groups in Kazoo (CouchDB layer)
    - Custom editable fields, such as IP address, DNS, Language etc

    There still are some things that we're not sure of on how it would work best; such as security, scalability and overall performance.

    Would be happy to share code when it's fully up and running.

    I believe mTLS is the most secure solution, but it's unfortunately the most difficult to implement properly.

  3. 1 minute ago, tomas_ said:

    Sounds great!

    The monster UI part is already in place in the default SmartPBX / voip app (4.1), at least selection of device, MAC address field and feature keys.

    Br - Tomas

    I don't think the provisioning aspects of Monster UI should be reused for a couple reasons:

    1. When a device contacts the provisioning server, there needs to be a fast way to lookup the configuration based on mac address. Currently, all of the device data for an account is under an account database, so you'd have to filter by mac under ever account, which will yield low performance. I was thinking of creating a single database just for provisioning (it would store the device config options, mac address, and account owner).
    2. I tried examining the Monster UI source code to determine what requests/responses I needed to implement, and this proved to be a difficult endeavor. I would rather code a new app that I fully understand.
    3. Coding a new app provides more flexibility than being stuck with whatever UI elements made sense for the 2600hz provisioner. Even 2600hz needed to expose different functionality and created the Advanced Provisioner app, which is not open source.
  4. I know there are quite a few of us running open source Kazoo who would like to auto provision phones but cannot purchase the service from 2600hz for various reasons (if you can buy from 2600hz, I think you should - their auto provisioner is really good). There is an open source solution out there, but it is not secure (Provisioner v4).

    I am interested in creating an open source auto provisioner, but I need the community's help to make it a reality.

    Right now I could really use help defining a secure, robust, and scalable architecture, specifically the data model, before I begin coding. Right now, I am thinking about creating a separate server that uses mTLS for authentication (I don't know Erlang so a Kazoo app isn't an option) and a Monster UI app.

    If the community can help me at this early stage with the architecture and data model, I intend to deliver an MIT licensed auto provisioner on GitHub that incorporates as much of your feedback as possible (similar to what I did for my Ansible roles for those who have checked them out).

    I look forward to working with you guys to make this a reality!

    -Tom

  5. 48 minutes ago, amn said:

    I would be interested in your configs that are different from bigcouch.  Looks to be almost the same except for zones.  There is just one comment by the developer about it with one example it but not explained in much detail.

     

    These are the only things I changed: https://github.com/kazoo-ansible/couchdb/tree/master/templates

    Note: I'm only running in one zone right now.

  6. On 8/7/2017 at 4:59 PM, mc_ said:

    I think this is a great suggestion! I've been using Couch 2 (well, the master branch that I update every week or so) to good effect. We'll have to wait and see how operations feels about migrating existing installations from BigCouch to Couch 2. I think that's the main holdup at this point.

    Would love to hear experiences others have with migrations and with running Couch 2 vs BigCouch.

    I'm running CouchDB 2 in production, and I haven't had any issues. I had the luxury of planning my first deployment around this transition, so I don't have any experience with the migration.

  7. @Uzair Mahmud, I changed the Sip profile to auto, and that seems to have worked with my environment. I'm not sure how it will work with a Lan setup. Can you test it before I add a variable?

    Edit: I tested this for LAN as well, and it worked fine as long as I used my public IP from my ISP when I registered the phones. Is this something that you can live with? If it is, the newest version of the Ansible roles should work for you.

    Edit 2: Setting FreeSwitch to auto does not work now that I tested it again. Are you good with the variable disable_nat_correction to disable the SDP fix and FreeSwitch external IPs?

  8. I've been trying to track down this NAT issue for months. I need help, but I'm not sure who to ask.

    I reinstalled my VM where I had this all working, and it's not working again, despite using the same configuration.

    Follow-up:

    It seems that http://kamailio.org/docs/modules/stable/modules/presence.html#presence.p.server_address might have something to do with this. I added this in, and I was able to make calls again.

  9. It looks like your configuration file has the private IP. I have code to detect the public IP address, but it doesn't work in all situations. If your cloud provider has an API to get the public IP, I can add it. I can also find a way to set the public IP for each host, but this is less ideal.

    It's not just Kamailio. There's a file in Freeswitch too. It's better if we can automate it than trying manual tweaks.

  10. On 10/9/2017 at 6:56 PM, Sean Wysor said:

    What is the owner being changed to? I do not know of anything offhand that sets permissions in opt outside of /opt/kazoo.

    The kazoo-applications and kazoo-ecallmgr startup scripts take recursive ownership of /opt/. I have submitted a pull request at https://github.com/2600hz/kazoo-configs-core/pull/8, and I hope someone can review it for me.

  11. 2 hours ago, Sean Wysor said:

    What is the owner being changed to? I do not know of anything offhand that sets permissions in opt outside of /opt/kazoo.

    The kazoo user takes ownership of everything under /opt:

    [tnewman@kazoo opt]$ ls -la /opt
    total 0
    drwxr-xr-x.  4 kazoo root     34 Oct 10 01:08 .
    dr-xr-xr-x. 17 root  root    224 Oct  9 23:33 ..
    drwxr-xr-x.  9 kazoo couchdb 122 Oct 10 01:06 couchdb
    drwxr-xr-x.  8 kazoo daemon  107 Oct 10 01:11 kazoo

    Here are the steps to verify this:

    1. sudo chown -R couchdb /opt/couchdb
    2. The permissions are now correct:
      [tnewman@kazoo opt]$ ls -la /opt
      total 0
      drwxr-xr-x.  4 kazoo   root     34 Oct 10 01:08 .
      dr-xr-xr-x. 17 root    root    224 Oct  9 23:33 ..
      drwxr-xr-x.  9 couchdb couchdb 122 Oct 10 01:06 couchdb
      drwxr-xr-x.  8 kazoo   daemon  107 Oct 10 01:11 kazoo

       

    3. sudo systemctl restart kazoo-applications
    4. The permissions are incorrect again:
      [tnewman@kazoo opt]$ ls -la /opt
      total 0
      drwxr-xr-x.  4 kazoo root     34 Oct 10 01:08 .
      dr-xr-xr-x. 17 root  root    224 Oct  9 23:33 ..
      drwxr-xr-x.  9 kazoo couchdb 122 Oct 10 01:06 couchdb
      drwxr-xr-x.  8 kazoo daemon  107 Oct 10 01:11 kazoo

       

  12. Subnets:

    /32 is the correct ACL, since /32 is a single IP address. Since the clustering is automated, we can ensure that only the exact Kamailio IP addresses are whitelisted.

    Cookie:

    The Kazoo role does change the cookie. I'm really confused why it's not working. You might have to restart kazoo-applications and kazoo-ecallmgr for the cookie file used by sup to actually be written.

×
×
  • Create New...