Call Masking Scenario
Business case:
The scenario has the following entities.
Client (A) with number: +123456789
Center (X) with an active Virtual Number: +12015976882
Recipient (B) with number: +987654321
Client A makes a call to the Center X.
The Center X receives the call from Client A and then connects the Client A with the Recipient B.
As a result, Client A and Recipient B are able to communicate.
Client A and Recipient B do not share each other's caller information (call number).
Steps to implement this scenario
- Log in Routee platform and buy a Virtual Number. In our case the Virtual Number is the following: "+12015976882"
- In the Virtual Number settings you can set up the callbacks (A. Dialplan URL and B. Inbound Voice Callback URL) for that number.
A. The Dialplan URL is used for two reasons.
i. Routee will make a POST request to your server to provide the inbound call details to the provided Dialplan URL. The payload for our example case will look like:
{
"messageId": "me66d22e-dc10-48de-b696-45f63c6d0aad",
"conversationTrackingId": "666e3777-f32a-4350-996b-364018d457b5",
"from": "+123456789",
"to": "+12015976882"
}
ii. Also, your server should respond with an HTTP 200 status and provide a valid dialplan to Routee.
Your server should do a POST request with headers: Content-Type: application/json
and a valid Dialplan as request body.
A valid dialplan will look like this:
"dialPlan": {
"verbs": [
{
"type": "SAY",
"message": {
"language": "en-US",
"gender": "female",
"text": "Hello from AMD company"
}
},
{
"type": "DIAL",
"from": "+12015976882",
"callback": ":https://my-outbound-callback.com",
"to": {
"phone": "+987654321"
}
}
B. Inbound Voice Callback URL
This callback is used to provide information regarding the inbound call (eg. the call status, the duration and more)
In the provided Inbound Voice Callback URL you will receive a payload like this:
{
"messageId": "wwq6d22e-kz10-4dde-jojo-aksjc6d0aad",
"to": "+12015976882",
"from": "+123456789",
"country": "US",
"price": 0.0015,
"originatingService": "Voice",
"conversationTrackingId": "666e3777-f32a-4350-996b-364018d457b5",
"status": {
"name": "Completed",
"reason": "",
"description": "",
"updatedDate": "2020-03-09T10:11:27.441Z"
},
"direction": "Inbound",
"respectQuietHours": false,
"duration": 20,
"createdAt": "2020-03-09T10:11:07.547Z",
"chargeInterval": 1
}
In the provided Dialplan you can redirect / bridge the initial call to another recipient. In our scenario we have a Dial verb inside the Dialplan that will bridge the call with the recipient B with number: +987654321
You will receive an callback for this Outbound call at the provided Callback Url in the Dial verb (in our example the callback url for the Outbound call is: https://www.my-outbound-callback.com).
An example of the outbound callback url that you will get is the following:
{
"messageId": "an1t22-3jo2-8dds-djll-and9d9dalkdj",
"conversationTrackingId": "666e3777-f32a-4350-996b-364018d457b5",
"to": "+987654321",
"from": "+12015976882",
"status": {
"name": "Completed",
"updatedDate": "2020-03-09T10:11:27.547Z"
},
"direction": "Outbound",
"originatingService": "Voice",
"respectQuietHours": false,
"duration": 30,
"price": 0.002
}
How will you track the calls.
In our example there are 2 different calls.
An initial call to the Client A (+123456789) and then a second bridged call to the Recipient B (+987654321)
You will receive a different tracking for each call (messageId).
Also you will receive the same tracking for the Conversation (conversationTrackingId)
How will you estimate the duration of the calls.
In the Inbound Callback Url you will receive the total duration of the Inbound call.
The Inbound call is from Client A: +123456789 to Center X: +12015976882.
Total duration of the Inbound call: 20 sec
In the Outbound call the duration is the total duration of the Conversation from Client A: +123456789 to Recipient B: +987654321.
Total duration of the Conversation call: 30sec
Conclusion
In the above scenario we manage to connect the Client A with the Recipient B without publishing the caller information to each other.
Updated almost 5 years ago