Skip to main content

Batch IVR - Call out ivr voice in batches

Call out ivr voice in batches

Interface Description:

For different numbers that need to play the same IVR voice content, you can use this interface to make calls in batches, and a single submission should not exceed 5000 numbers.

Request method: POST, form-data format

Request URL:

http://platform.infin8linx.com/api/yunhu

request parameters

parameter name type Is it necessary illustrate
service string yes App.Sip_Call.PlayVoice
appid string yes authorized appid
accesskey string yes authorized accesskey
nationcode string yes Country shortcode in: India id: Indonesia ph: Philippines mx: Mexico co: Colombia tha: Thailand
destnumber string yes Target number, connect multiple numbers with ","
voicetype int yes The audio file type to play. 1: offline voice file, 2: online voice (url)
voicefile string yes Offline audio file name or online voice url address
userkey int no Whether user buttons are required, 1: required, 0 not required, default 0
chengshudu string no Customer-defined data, returned as it is in the callback data after the call ends.
disnumber string no Caller ID, if left blank, a random caller ID will be selected
customuuid string no Customer-defined data, returned as it is in the callback data after the call ends
waittime int no call waiting time
conntime int no call airtime
todayonly int no Whether the number submitted on the day is only dialed on the same day 1: Yes, the number that has not been called on the day will be kicked out of the queue directly 2: No, the number that has not been called on the day will continue to call the next day, and the default is 1 if it is not transmitted

Interface request example(PHP)

<?php
    $apiUrl = 'http://127.0.0.1:8080';
    $postFields = [
        'service'   => 'App.Sip_Call.PlayVoice',
        'appid'     => 'ABCDEFG',
        'accesskey'     => 'ABCDEFG',
        'nationcode'     => 'id',
        'destnumber'  => '133,134,135,135',
        'voicetype'  => 'abcdefg',
        'voicefile'  => 'abcdefg',
        'chengshudu'  => 'abcdefg',
        'disnumber'  => 'abcdefg',
        'customuuid'  => 'abcdefg',
        'waittime'  => 60,
        'conntime'  => 60,
        'todayonly'  => 1,
    ];
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, $apiUrl);
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    $response = curl_exec($curl);
    $curlError = curl_error($curl);
    curl_close($curl);
    var_dump($response);
?>

return data structure example

{
    "code": 200,
    "msg": "successful request",
    "data": {
        "desc": "Play command sent successfully",
        "reqtime": 1588836407,
        "rsptime": 1588836407
    }
}

Return parameter description

parameter name type illustrate
code int return code 200 success
msg string return prompt information
data object return data object
—desc string request hints
—reqtime int request timestamp
—rsptime int return timestamp