Inbound Voice Calls
When you rent or update a number that supports Voice service, you are able to define a dialplan URL ("voiceInboundStrategy.dialplanUrl"), in order to receive notifications about the incoming calls and handle them according to your preferences.
In this way you define the behavior of your number (what someone that calls your number will hear, to whom he connects etc), so it is required to set a valid Url, if you want to use Voice service.
For each call to your Number, your service will receive the following payload:
{
"messageId": string,
"conversationTrackingId": string,
"from": string,
"to": string
}
KEY | DESCRIPTION |
---|---|
messageId | The id of the inbound Voice call. |
conversationTrackingId | The tracking id of the conversation. |
from | The sender of the inbound Voice call. |
to | The recipient of the inbound Voice cal (your number). |
An example payload is shown below:
{
"messageId": "700bbc09-0556-4e86-bad1-215a8020e111",
"conversationTrackingId": "8207dc68-e51c-44e8-95d1-a2d87449a2b3",
"from": "306999999999",
"to": "+306911111111"
}
In order to handle the call as you want, Routee waits to receive a valid dialplan as response to the above request.
See an example of how to use your Number to receive inbound calls
Voice Inbound Callbacks
When you rent or update a Number, you are also able to define a callback Url ("inboundVoiceCallbackUrl"), to receive notifications about your inbound voice messages.
Inbound Voice Callbacks are generated when a call to your number is completed.
Your callback service will receive a POST HTTP request with the following request body for an individual inbound message:
{
"messageId": "string",
"conversationTrackingId": "string",
"to": "string",
"from": "string",
"status": {
"name": "string",
"updatedDate": "string"
},
"direction": "string",
"originatingService": "string",
"respectQuietHours": "boolean",
"duration": "number",
"price": "number"
}
KEY | DESCRIPTION |
---|---|
messageId | The trackingId of the voice message. |
conversationTrackingId | The trackingId of the voice conversation. |
to | The recipient of the Call (your Number). |
from | The senderId of the Call. |
status | The status object of the voice conversation. |
status.name | The status name of the voice conversation. |
status.updatedDate | The date of the status of the voice conversation. |
direction | The direction of the voice conversation (Inbound). |
originatingService | The service that sent this message (Voice). |
respectQuietHours | Indicates if the Call should respect the quiet hours, default value: false. |
duration | The duration of the voice conversation. |
price | The cost of the voice conversation. |
Updated almost 5 years ago