SIP and Phone Servers: an Overview
I’d like to take a break from some of the more political and analytical posts on here to discuss something technical: our server. Specifically, I’d like to discuss the way our phone system operates, which resides on its own secure, dedicated in-house server.
When I first began learning about polling and methods of survey dissemination, we were using an outside service to complete our calls (like many other research companies). One day, I decided that there are countless reasons (apart from variable costs) to move everything in-house, and thus began my adventure in building a fully capable SIP endpoint with the capacity to conduct rapid, simultaneous outbound calling.
Before I go into detail on how this frustrating process eventually resulted in a successful build, here are the current specs for our system.
- Server: HP something-or-other with a Xeon something-or-other processor. This box was originally marketed as a workstation for technical positions, but I bought it for the processor (and price). Nothing fancy, just solid performance for one basic task.
- 1 TB HDD (might upgrade to SSD)
- 12 GB RAM (upgraded from original 4 GB[?])
- Lots of ports (irrelevantly) and probably integrated graphics (also irrelevantly)
- OS: Debian 8.1 (no gui desktop environment); note that you can use CENTOS, but I’m more comfortable with Debian.
- Connection: 300 mb/s down, 30 mb/s up (I recommend at least 50 mb/s down, 20 mb/s up for any SIP connection with more than 100 simultaneous calls)
- Protocol & Codec: SIP; G.711
- Registrar/Endpoint: varies; there are many competing services, some better than others
- Router: MikroTik Routerboard
- Dialer: Newfies Dialer (open source)
- PBX/Switch: FreeSWITCH
- Capability: 350+ simultaneous outbound calls = ~5000-10000 calls per hour
- Security: multiple firewalls, integrated DOS protection, IP-based black/white lists, VPN
Step 1: Buy a Box, Install OS
While I realize that several dialer options exist, you’ll likely find the most robust options for Linux-based systems. Do your research, decide which system works for you, and purchase/install appropriately. As mentioned, our particular configuration requires either CENTOS or Debian, running on a machine with at least 4 GB of RAM and a reasonable processor. If you plan on only using this system for call purposes, I recommend finding something pre-owned, preferably for a generic office environment. Technically, the sky is the limit, just don’t buy a system that was designed to run Windows 8 from the factory. These systems do not have a typical BIOS, and as a result you will have an excessively difficult time installing a Linux distribution.
The alternative to hosting in-house is of course cloud hosting, which is certainly a viable option for some. I prefer to have full control and ready access to our server, plus many services cannot offer a data connection sufficient for this type of build. There are innumerable variables that affect your results; if just one changes, you will likely lose data.
Once you have the right box, it’s time to install the OS. For any installation, I recommend erasing the entire hard drive, including (especially) any previous OS that came pre-installed. If you’re installing Debian for use with Newfies, take note: you need to install all of the server options (apart from print) during the installation. For whatever reason, installing these components after the fact will result in errors with the dialer.
Another note, and this one is important: while you can certainly run a dialer with a desktop environment, don’t. Your server will be limited in its capacity, and you will likely encounter errors. Save yourself the trouble and use the command line.
I learned this the hard way when I thought “hey, I could install a desktop environment and this machine would be even more useful when it isn’t actively dialing.” It’s a fools errand.
Once you have a system up and running, perform an update. Next is the software.
Step 2: Install Software
I chose to use Newfies because it is open source and relatively stable; it also includes a mostly automated installer. Using wget, the installation package will download, and you simply follow the commands to install both FreeSWITCH and Newfies. Once the installation is complete (roughly 45 minutes), you will need to configure the settings. Follow the prompts, and use the online guide.
You may choose to use a competing product, many of which are based on Asterisk. I can’t comment on these specific installations, but here are a few things to keep in mind:
- Some of these packages can be very temperamental, so be prepared to start over. In extreme cases, you may need to reinstall the entire OS from scratch.
- Figure out where the most important files reside. It is very likely that you will need to edit some of the program’s parameters within the file system, so pay attention to the structure of its dependencies.
These instructions are essentially the same if you plan to set up a call center with multiple branches – installing Freeswitch/Asterisk is fairly straightforward.
Step 3: Initial Configuration
The configuration process will vary, depending on the software and the purpose of your build. For Freeswitch/Newfies, the process is mostly automated; just be sure to leave the username blank when you’re setting it up. When you log in, enter “root” as the username for admin access; you can set up additional accounts from there.
If you’re setting up a call center, use the Freeswitch or Asterisk guide to determine the proper routing. This can get tedious and confusing, but there is a ton of documentation and community support out there.
Step 4: Choose SIP Registrar and Configure SIP Endpoint
Choosing the right SIP registrar is no easy task, but here’s a rundown of some of the services:
- Plivo: good service, but not for dialers
- Didlogic: mediocre service (calls to certain phones won’t go through – not sure why); cheap
- Flowroute: Excellent service; reasonable pricing
- Twilio: hasn’t offered registration in the past, but that is set to change; reasonable pricing
Once you’ve chosen a service, the setup is usually similar. Plug the variables into the external profile for your switch, which usually include:
- Username (for the actual endpoint, not your online account)
- Realm (e.g. sip.xyz.com)
- Register y/n
Once you have the variable entered, restart the switch application and check to make sure it is registered. On Freeswitch, it will show “REGED” if you have a connection.
All of the rest is specific to your application and/or your organization. Again, there are mountains of documentation and community support out there for all of this, but this short guide can get you up and running quickly, provided you have a basic knowledge of telephony.