# Voice Call API - Make a voice call

#### Interface Description

Initiate a call directly to a number, most of which are applicable to calling the interface after clicking "Call" on the web page.

#### Request method
POST, form-data format

#### request parameters

| parameter name        | type     | Is it necessary | illustrate                     |
| :--------- | :----- | :--- | :--------------------- |
| service    | string | 是    | App.Sip\_Call.MakeCall |
| token      | string | 是    | The token obtained through the authorization interface         |
| extnumber  | string | 是    | Ext                    |
| destnumber | string | 是    | target number                   |
| disnumber  | string | 否    | Caller ID, if left blank, a random caller ID will be selected   |
| userid     | string | 否    | Custom parameters (employee id)           |
| chengshudu | string | 否    | Custom parameters (maturity)             |
| memberid   | string | 否    | Custom parameters (member id)          |
| customuuid | string | 否    | Custom parameters (customer id)            |

#### Interface request example（PHP）

```
<?php
    $apiUrl = 'http://127.0.0.1:8080';
    $postFields = [
        'service'   => 'App.Sip_Call.MakeCall',
        'token'     => 'ABCDEFG',
        'extnumber'  => 'abcdefg',
        'destnumber'  => 'abcdefg',
        'disnumber'  => 'abcdefg',
        'userid'  => 'abcdefg',
        'chengshudu'  => 'abcdefg',
        'memberid'  => 'abcdefg',
        'customuuid'  => 'abcdefg',
    ];
    $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": "Call command sent successfully",
            "reqtime": 1581389402,
            "rsptime": 1581389402
        },
        "msg": ""
    }