User:Avi Marcus

From FreeSWITCH Wiki
Jump to: navigation, search

Often on IRC as AviMarcus

Amazon Wishlist:

Israel Origination and Termination are available!


Via a CLEC in Israel with *excellent* quality.. 02,03,04,08 numbers can also be ported for free. 07X can only be ported in block of 10.

  • 2 channel DIDs in 02, 03, 04, 08, 072, 077 area codes are available for $3/month.
  • 30 channel DIDs for $39/month.
    • Need more? Stack 30-channel packages OR add 0.5c per minute for overage.

You can get media proxied via London, UK or bypassed to get it directly from Israel.

Wholesale Termination, minimum top-up of $50.

  • 1c to fixed, no CID is passed.
  • 2.5c premium to fixed AND all Israel local numbers - 1-700, *1234. Israel CID can be passed.
  • 0.5c to Israel 800
  • 4c to mobile - passes any CID.

Contact Avi to sign up.


Processing Credit Cards via IVR

PCI protecting_telephone-based_payment_card_data.pdf

UK offers of security

    • 6 pounds per channel/month. Perhaps 250pound setup fee. via SRTP with "SIPEncrypt" I think. They hope for PCI certification in 2012 Q1. Claim PCI compliance now.
    • SRTP/TLS no extra costs, just select it in the control panel for the trunk. "Yes 100% secure between us and BT. From here we encrypt and deliver to you." They are applying for PCI certification so they can get government contracts in 2012.

Current Project: HA Setup


It's purely for failover, NOT load balancing. I don't have the volume for a cluster, and I'm running on a VPS so upgrading the plan for more ram should also allow more CPU usage. I'll cross that bridge when if/when I get to it.

Since it's only one box, ALL services - web server and DB for web gui, FreeSWITCH's db, everything are to be duplicated across both machines.

Goal / Main Features

Host FreeSWITCH in a High-Availability manner:

  • High availability on the same IP via IP Failover so no need for DNS SRV
  • "Sofia Recover" for recovering LIVE calls - Failover to another box in the same datacenter, that has a backup of the DB, so that I can keep calls online with minimal loss of audio stream.

--Since it's possible to have this happen, isn't it worth it? That in the (un?)likely event that the server goes down, the machine, that rack loses power/'net, that you can take over.. and recover the active calls?!


I'm using (aff - show me some love) for hosting my VPS. I've heard of a few running production VoIP and specifically FreeSWITCH there. There's a script for installing which apparently some people are still running.

  • When you set up a second box, they automatically put it on a different server physically.
  • They make it easy to deploy new servers and install a server ISO (took <5 minutes)
  • They support IP failover
  • Internal bandwidth is free for network syncing
  • Like many other VPS, they have out-of-band access to your vps if there should be external networking issues.
  • They have datacenters spread out across the USA and even one in Europe (my choice - I'm in Israel)


I'm using Ubuntu 10.04 LTS, so sue me. I've been using it for desktop for a while, and it seems pretty friendly. I haven't tried CentOS yet, I'll take it one new project at a time...

Installing packages

I'm going to prefer .deb for all installs other than FreeSWITCH and the gui I'm using - FusionPBX.

Web Server

It seems nginx with php5-fpm is the way to go. True, the gui has a small load, but I'm using mod_xml_curl to do fancy LCR, billing, and general customization.


I see many use mysql with a master-master setup. I'm considering alternatives for 2 reasons, but I may be misinformed: 1) With sqlite, I can easily move freeswitch's DB, and the lcr table, to a ramdisk for increased read/write speed and easier syncing to the other system. 2) With sqlite, there's no RAM overhead. Not sure how big a deal this is. 3) I'm actually not sure FreeSWITCH stored the calls/channels in the odbc database at all. Since I'm largely unfamiliar with sqlite, I'm having a hard time importing my old data. I'm not sure this is worth pursuing at this time because the performance gain is beyond my need at this time.

Check maatkit for replication monitoring.

"replicate-ignore-table=db.table" for ignoring a table in replication.

Run for tuning suggestions.

NOTE: with such a small DB and open ram, the kernal probably caches the files in ram anyway. No need for sqlite in ram.

What to do with the second box?

It seems the second box is purely:

  1. monitoring the second box ready to pounce
  2. copying the current active calls/channels list.

If the calls/channel list is being rsync'd, that means it will overwrite the local copy and will not allow you to use the server at all.

It would be nice if the second server - since how often are you going to be failing over?? could server as something of a testing site, but not run anything you really want to keep alive. So perhaps, rsync the active DB to a temporary folder, and the script that runs the "sofia recover" will also run copying out the old DB and rewriting this there. I guess a "drop all calls" too.

This would be bad if you were doing real updates to the dialplan / xml and you suddenly got failed over to. But if you are doing such extensive changes, then you should be running it in test contexts, or if really extensive, in a new server instance.


Since both boxes are identical, I don't see any particular reason to force a restore to the main box. I suppose if you have a time that load goes to 0 (end of a business day?) then you could. Especially if you are running other supplementary, non critical services on your second box. (e.g. a socks5 proxy?) Therefore, whichever server is in passive mode will be pulling? the rsync updates.

Links to helpful info about how to set this up:

Heartbeat for failover: [1]

Rsync'ing: [2] and [3]

Sofia Recover: Freeswitch_HA