Skip to main content

Predictive outbound - Get extension enabled status

Get extension enabled status

Interface Description:

Get the extension list information owned by the user。

request parameters

parameter name type Is it necessary illustrate
service string yes App.Sip_Status.GetSipValidStatus
token string yes The token obtained through the authorization interface
extnumber string yes Extension number, multiple extension numbers are separated by commas

Interface request example(PHP)

<?php
    $apiUrl = 'http://127.0.0.1:8080';
    $postFields = [
        'service'   => 'App.Sip_Status.GetSipValidStatus',
        'token'     => 'ABCDEFG',
        'extnumber'  => '100001'
    ];
    $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

{
    "ret": 200,
    "data": {
        "status": 0,
        "desc": "get success",
        "result": [
            {
                "extnumber": "90170002",
                "code": 1016
            }
        ],
        "reqtime": 1581508401,
        "rsptime": 1581508401
    },
    "msg": ""
}

Return parameter description

parameter name type illustrate
result array extension data array
—extnumber string Ext
—code int Extension Status