Send Voice Call
Sending a Voice call is completely different from Sending Text SMS. A Voice call involves multiple factor to be considered before & after the Voice Call is sent. But not to worry when you are using SainoFirst's Voice Platform. We've taken all complexities on us, so that you can have a seamless integration. To send voice call you have below options:-
Text-To-Speech based Voice Call
Pre-Recorded Audio File based voice Call
Voice Call Send
POST
<base_url>/bulk-voice
Request Body
reportUrl
string
The URL at which Voice Campaign reports will be sent for this campaign. Read Reports & Deliveries section below for more information
text
string
The actual text that would be converted to voice by Text-to-Speech synthesis and will be played over Voice call.
🚩Required if is_text is true
✔ Not-Required if is_text is false
audio_file_url
string
URL of audio file that will be played on voice call. 🚩 Make sure the above URL passed, is publicly accessible. If call scheduled for future date, this URL must be accessible till the date call is scheduled at.
config
object
See below for more details on config
object. There is a separate section with detailed explanation.
timezone
string
Timezone. See the timezone table for more help.
📌 Required if send_at
is passed in the request.
send_at
integer
Epoch time (time in milliseconds) equivalent to the Actual Future Time (at which the call must be sent). 1. Time must be in future. (Min. 5 minutes, Max. 60 Days) 2. All the requests with past date/time will be rejected. 3. All the request with future date more than 60 days, will be rejected.
subscription_id
integer
Pricing and Routes will be based on this ID. The value of this ID can be accessed from the SainoFirst's Application under connectivity. If subscription not assigned please contact your account manager.
maxLengthOfCall
number
Limits the call duration to this much seconds, the call will be disconnected after this much second automatically even if receiver is not cutting the call. (Value In Second) 📌 This max duration is not applicable for the calls which are forwarded by the receiver.
speech_rate
number
minimum 0.5 - maximum 2 (Lower the value, Slower the speed of voice audio converted via text-to-speech synthesis )
🚩 Required if is_text is true
✔ Not-Required if is_text is false
language_id
integer
Language ID of the text to be converted via Text-to-Speech synthesis. Please refer voice call language page.
🚩 Required if is_text is true
✔ Not-Required if is_text is false
is_text
boolean
Set this to true
for sending text-to-speech based voice call.
Set this to false
for sending pre-recorded audio based voice call.
If false : audio_file_url
parameter is mandatory.
numbers
array
Array of String
of numbers.
Simple Text-To-Speech Voice Call ( 2 Factor Authentication )
Request:
A HTTP POST
request should contain body like below.
Response:
After the request is successfully received at our server, response will be like below with Status Code: 200
Fully Featured Text-To-Speech Voice Call
Request:
A HTTP POST
request should contain body like below.
Response:
After the request is successfully received at our server, response will be like below with Status Code: 200
Pre-Recorded Audio Voice Call
Request:
A HTTP POST
request should contain body like below.
Response:
After the request is successfully received at our server, response will be like below with Status Code: 200
Advanced Voice Call: How to Configure Voice Call ?
Advanced voice call is the voice call where Listener (or Receiver) will be able to interact even with the simple pre-recorded or text-to-speech voice call. Features in Advance voice call:
Repeat the same voice message again on press of 'Assigned' key.
Forward the call to some other (predefined) number on press of 'Assigned' key.
Capture the response of every phone key pressed by the user while the call is going on.
The config
parameter of the request body is used to make a advanced voice call.
This parameter is a JSON Object which has two properties.
repeat
- Value must be a single digit number. On press of this number key, the call will be repeated.callTransfer
- Value is an object with two properties:transferKey
- Value must be a single digit number. On press of this number key, the call will be repeated.
Parameter
Value Type
Description
repeat
Single Digit Number
On press of this number key, the call will be repeated.
The vice call will be disconnected automatically when the maxLengthOfCall
is reached.
callTransfer
Object
Must contain two properties inside this object.
transferKey
- On press of this key, call will be forwarded.transferNumber
- Number on which call to be forwarded.
Example:-
Reports & Deliveries
In order to get delivery reports directly into your system you need to take care of few simple things.
Please make sure that, the URL passed in the field
reportUrl
, must acceptHTTP POST
request withJSON
request body.If you wish to get any additional data in the report callback, you should user query parameters and values in the URL itself.
If you don't pass the reportUrl
parameter in request body, we will not be able to push the reports to your system. However, messages will still be delivered to the destination.
Last updated