A little known outside telecom hangout is a fact: when you call somewhere from your phone, your number, which is displayed for an incoming call, is just an arbitrary text string that your mobile operator substituted. And if there is something interesting between the two devices, for example, a machine with Asterisk or a cloud with Voximplant, then this line can be changed to any other. The situation when, when calling, instead of the caller’s number, a completely different number is called a Phone Number Masking. And this technique is widely used to solve a number of interesting problems. Read about them under the cut.
Taxi and other Uber-like solutions
Giving the driver a real customer number is not a good idea. Then the driver can call the wrong case - that's all. Number substitution works like this: as soon as the driver accepts the order, it becomes known to the backend of the taxi service. And if the driver needs to call the customer, then instead he calls the special service number. The call comes to the Voximplant cloud, where an HTTP request to the backend is made from JavaScript and receives order information. After that, the cloud calls the customer, and as soon as he picks up the phone, connects it to the incoming call from the driver. If you are interested in the details, read how it is implemented in Wheely .
This method allows the driver and the client not to know each other’s numbers: all calls go through the cloud. In an outgoing call to the client, Caller ID is set to the contact center number. Due to this, if the client after the trip calls the “driver's number”, he will be greeted with a voice menu and will offer to contact either the driver or the contact center operator. And if the driver does not work, then the client can be offered that the service will call him back when the driver comes to work. Also, all conversations can be recorded, the record is recognized - for faster quality control. All these functions can be implemented in several lines of JavaScript code:
Net.httpRequest(url, function(e) { //
if (e.code===200) { // ?
var resp =e.text?JSON.parse(e.text) : {};
if (resp.numberToCall) { //
// , :
var out =VoxEngine.callPSTN(resp.numberToCall, ACCESS_NUMBER);
It looks like a taxi service, but with its own nuances. Very often, calls are made not through cellular communication, but with the help of applications: couriers call to coordinate logistics, and the Internet is now much cheaper than even wholesale offers for cellular communication for companies. It looks like this: the courier has a web / android / ios-application with the button "contact customer". When you click on it, the corresponding SDK establishes a TCP / WebSocket connection to the Voximplant cloud, signals the call and transmits voice over the (S) RTP protocol. When you call back to the courier, a push notification mechanism is used, so even if the application is closed, it will not hurt to “reach” the delivery service. ')
If you use one cloud for all communication automation, you can make interesting integrated solutions. For example, by calling the cloud-based JavaScript script via the HTTP API, you can confirm the delivery. And with the help of the voice menu, the client can directly from this call contact the courier, if it is now available, or the contact center. At the same time, masking the number makes the client “one number” to which he “just calls”. And under the hood JavaScript on the position of the stars determines where to send the call.
Thanks to WebRTC ( our latest article about WebRTC ) you can call from web pages and web pages, and the cloud with JavaScript at the ready commutes these calls with traditional telephony. Masking the number works here. Where does the web page number come from? For all outgoing calls from the CRM cloud, customers substitute their “external” phone number. If they call this phone, the next steps with the call are simply recorded in the JavaScript script. For example, distribute to the call center operator with which the client communicated the last time. Or automatically tell about the status of the order. Or escalate a call to support the second level, if it is the fifth call in an hour.
Why do you need masking numbers
Many companies, such as Uber, directly connect their customers with drivers. But there are many stories on the Internet, when the number preserved in the call logs was then misused, especially on the night from Friday to Monday, after a hard day at work. Masking the number allows you to avoid accidents and calls at three in the morning. This is done in a single line in the JavaScript code.