
In web technologies, I really like the standard HTML / JS / CSS foundation, which makes it easy to use third-party components. Add the “Call” button, i.e. Voice telephony functionality, in a PC application, is a long story with frameworks, libraries, messages, streams and operating systems. Adding the same button to a web application is a matter of one element and one JavaScript library. Under the cut, I will tell the story of the integration of one such button.
Why does Megaplan need voice calls?
')

Megaplan is not only a task management system with a design from Lebedev, but also a convenient CRM system. Keeping the history of relationships with each client in one place helps employees navigate through many daily contacts. Evolutionarily, our brain is adapted to remember about 150 "familiar" faces: this is the maximum size of the pack, if we really descended from pack animals. But for many businesses, 150 business contacts per day is a common thing. They come to the aid of CRM-systems, which serve as a reliable help in the difficult task of communications and are designed to maximize the melting brain of an employee.

Voice communication is very important. Language is basically an imperfect tool for expressing thoughts, and evolutionarily we are used to transmit a lot of additional information through facial expressions and intonation, which is necessary for decision-making, but disappears when communicating via e-mail.
Typically, CRM-system is integrated with the company's PBX. This is a long and complicated process that requires the presence of the PBX itself, SIP-phones and a gloomy admin in a sweater to correct situations like “oh, I pressed everything, but it doesn’t call”. Integration of calls directly into the web interface allows you to minimize the number of actions and focus on the important - communication with clients and colleagues, solving tasks.
No less important factor is the recording of calls. You can simply write using PBX (if any), but a convenient interface for accessing records is really valuable. Often, different employees contact with clients, or a client comes out of hibernation with whom they last spoke several months ago — in such cases, a convenient tool for studying previous calls can be crucial for making a deal.
How we made friends with VoxImplant and Megaplan

The main idea of our platform is that calls are made not between two clients, but between clients and the cloud. And in the cloud in the ambush sits JavaScript, which by the incoming call or API call does all sorts of things: it commutes calls, calls from the cloud to the outside, recognizes and synthesizes voice, records conversations, provides conference calls and performs a million more useful functions.
After reviewing the documentation, the Megaplan team began developing JavaScript scripts for the VoxImplant cloud and integrating our Web SDK into its product. It took a lot of time to connect to the cloud using the HTTP API: it was necessary to automatically add and delete both new and existing Megaplan users. We helped integrate billing: through the HTTP API, the primary account creates children and works with their balance.

An interesting task was the introduction of the functionality of the call from the site. Our Web SDK allows you to make voice and video calls, as well as transmit the text, but at the same time has no interface, reasonably giving it to the mercy of web application designers. And the designers and developers of Megaplan faced a difficult task: how to seamlessly enter calls into the existing interface so that users can be as comfortable as possible. To solve this problem, lists of user scenarios were compiled, which were then sorted by frequency. The “main tab” mechanism was developed: the voice call itself goes only in one tab, the others display the status and transfer control to it.
The Web SDK supports both WebRTC and Flash, so the site introduced compatibility mode if WebRTC is not supported. Also prompts have been added for the user to confirm the use of the microphone in the browser.
A lot of test dollars were spent on debugging all of this machinery, since we have a cloud debugger for JavaScript scripts, which allows us to step through the code and examine the current state of calls.
What happened in the end

As a result, it turned out to be implemented and fully integrated into the Megaplan call mechanism, which works out of the box and does not require complicated settings. An employee can call customers and colleagues as soon as they are added to telephony users (which happens automatically for current employees and with confirmation for new ones); search for contacts in one click on a variety of parameters (automatic search for a client by phone number for an incoming call); work with the call log and listen to the recording of conversations. At the same time, communication between employees is absolutely free.
One of the key features of VoxImplant - the ability to set a single outgoing call number - allows the Megaplan to make all outgoing calls from a common corporate number or assign individual numbers to employees.
Now Megaplan is working on the integration of incoming calls with automated processing scripts and plans to actively develop telephony. In the near future, we will see new opportunities that allow modern business not to fight with interfaces and settings, but to focus on solving problems and communicating with customers.