
The prototype goes to Open Source: Exchange of telephone operators
History
One fine evening, my friend asked if I could do one thing. I said that I could, and over the next couple of months, in my spare time from work and leisure, I made a working prototype like this:
Exchange of telephone operators working independently from home.
An alternative to traditional call centers, which allows you to save employees from cold calls, quickly inform or interview existing customers and find out the needs of potential ones.
A year and a half passed, during which I tried to apply for start-up contests (they refused either because of the formal reason for the lack of an open legal entity, or because I could not fill out a business plan absly), to interest people close to telephone services and even Offered a buyback system, but without much success.
Therefore, it seems to me correct that the idea does not fade out, put all the best practices in the public domain. What I do.

Justification (Rational)
It’s hard for people far from this industry, as well as myself, to assess the size of the market. There is a report on market research from RBC, but this report can be purchased for 45 thousand rubles, so I had to confine myself to searching on the Internet, and here is what he gave:
- there is a huge market for call centers, but (almost) they all have operators physically located on the territory of call centers
- in Russia there are 88 thousand call center operators. In Russia, call centers make 450 million calls a year. In the United States and Europe, these indicators are an order of magnitude higher.
Students, maternity decrees, and disabled people due to health reasons are not so easy to earn, but finding a permanent job is a whole problem, but they have enough free time.
Repeatedly faced with the fact that call centers refuse to take the dialer projects less than 50 thousand rubles. And this is a pretty solid amount compared to, for example, the Yandex.Direct monthly advertising budget, if you take a small business. And what will be the return - it is very difficult to predict. If everything can be flexibly regulated with Yandex, then traditional call centers have quite a few levers of control and management. Here you can pay 100 rubles (or get them as a bonus during registration) and immediately see how the calls go.
Benefits
For the owners of the service: A
high-tech solution that allows you to provide a large volume of services at low cost.
No need for a large number of employees on staff.
Creates jobs. The principle of the exchange is mediation.
For the customer service:
Simple. Download your contact list and informational text. All free operators immediately see your task and begin to call.
Quickly. A successful call from the operator is immediately transferred to your employee, who can only invoice.
Qualitatively. Operators are interested in the quality and quantity of calls, unlike office colleagues. You do not pay those who left to drink tea.
Economically.You pay only for calls. Neither for the office, nor the monthly fee for telephone lines, nor the metropolitan salaries of call center operators.
For telephone operator:
Work on the phone. Where, when and how much you choose. To work, you only need the Internet and a headset.
Quickly. Turn on the computer and you are already at work.
Conveniently. Work as much as you want and when you want.
Profitable. You get money for every call.
The target audience
1. Small and medium-sized businesses that want to save employees from cold calls, quickly inform or interview existing customers and find out the potential needs.
2. Students, mothers on maternity leave, disabled people for health reasons and just people with free time.
What has been done and works
A working FreeSWITCH setup in conjunction with Zadarma / Telphin.
An event-oriented Ruby web server serving the site along with customer and operator interfaces.
A flash client for making SIP calls by a telephone operator directly from its interface.
We tested communication with both mobile numbers and landline numbers, including on Linksys / Cisco PAP2T equipment.
"Invitations" to the site instead of open registration. Alas, invitations can only be issued through the console; there is no administrator interface.
A nice responsive site with operator and customer interfaces that meet MVP requirements.
The operator interface allows you to perform all operations without a mouse, using keyboard shortcuts, for example, 'h' to hang up, and 't' to transfer the call to the customer’s call manager.
Transferring a call to the side of the dialer manager with the ability to inform the operator during the transfer of a call to the manager where the call was made and describe the level of customer interest.
Operator interface
The operator’s page looks something like this, here in one picture from left to right:
- the initial page, which shows the text script (in the broader version, the script is on the right, and the buttons and fields to fill in are on the left);
- the page displayed during the conversation allows you to record the contents of the conversation in text and add a new contact if you called a non-responsible person;
- the page shown after the conversation allows you to fill in the fields, as well as set the status of the call

Customer interface
It gives customers the opportunity to fill in a spreadsheet of a certain format, including phone numbers, names, etc., set a conversation scenario, and monitor the results of the call in the form of a tablet.
Obvious flaws
When starting the service, at least one regular telephone operator is required. Otherwise, no one will satisfy the needs of the first customers.
If the customer himself does not have a professional conversation script editor, then the call may go somewhere to the side and not reach the goal.
There is no admin interface.
The flash plug-in for the SIP call is quite buggy, and in addition does not work on OS X. It is also prone to a miracle bug when the flash settings window pops up to allow access to the microphone, but this window is not visible, although you can bypass this bug by going through the browser menu in the flash plug-in settings.
Internal implementation
For those who are lazy to read the code, I’ll briefly tell you.
At the heart of the communications system is the software-based PBX FreeSWITCH.
The website is made in Ruby, but without Rails, and on my favorite goal Sinatra, and even with DataMapper.
FreeSWITCH is in Inbound Event Socket mode and is controlled by a Ruby script (calls), also event-oriented, without using any Librevox or Adhearsion.
Incremental database migrations are triggered by the migrate script, and the migrations themselves are located in the migrations directory.
The database is PostgreSQL, on the development machine is SQLite3.
Redis is used to exchange data between the website, namely the telephone operator’s interface and the script that controls conversations.
The page is built using Bootstrap.
Used by jQuery.
Mousetrap is used for keyboard navigation through the web interface.
Corrections and improvements that I planned
- accounting of call times
- test coverage of a web application
- operator test for professional suitability (test call with a robot, recording a conversation, analyzing offline)
- a test plan on which operators can learn (with robots), and moderators evaluate and direct them
- interface moderator
- admin interface
- put the unit on a dialed contact so that two operators cannot call there at the same time
- security: remove unnecessary from freeswitch.mxml, redo the flash dialer
- prevent operators from calling the numbers they entered to ontactam (so that they do not call Kudykina Gora at the expense of the service)
- prohibit entering the same contact twice, inform the moderator
- limit the maximum duration of the call, inform the moderator of regular excesses according to some plan or operator
— the interface of the customer’s manager so that he can immediately see where the call came from and what data the caller originally entered
— receive a call to the customer’s manager page to avoid calls to city numbers
- attribution of used icons and js libraries
- interactive training for the interface
More far-reaching:
- call recording (8kbit / s ~ = 1GB / month)
- call the customer manager to the SIP number (with we reduce the costs of the customer)
- offer the operator rotation of projects once an hour
- call back to the city operator, if it is impossible to use the call from the site
- call to SIP-client operator
- WebRTC instead of flash client
Source
Sources on Github
In the kit for this case, I have a set of recipes for babushka (something more human from the Chef, Puppet, and Ansible family) and a simple script that reads the server configuration, allowing you to configure a dozen of them with one command. As a couple to babushka, I naturally called him ded. I'll post it on the same account as soon as I comb it. It only works with Debian / Fedora / CentOS, while lately, I have somehow more and more liked having it on Archlinux servers.
What's next?
I do not expect any reaction to the idea or suggestions.
But I like this thing, and I would be glad if it worked. But I definitely can’t do it alone.