# Voice two-way calling - two-way call interface

#### Interface Description：

The two-way call is mainly used to call the customer service number of the company first, and then call the called customer number after the connection is made.

#### Request method
POST, form-data format

#### request parameters

| parameter name | type | Is it necessary | illustrate |
| --- | --- | --- | --- |
| service | string | yes | App.Sip\_Call.DoubleCall |
| token | string | yes | Token, minimum: 32; maximum 32 |
| extnumber | string | yes | Extension Number |
| anumber | string | yes | Employee Mobile Number |
| bnumber | string | yes | called customer number |
| disnumber | string | no | Displayed calling number, leave it blank and pick a random calling number |
| userid | string | no | Custom Data (Employee ID) |
| memberid | string | no | Custom Data (Member ID) |
| chengshudu | string | no | Custom Data (Maturity)|
| customuuid | string | no | Custom Data (Customer ID)|

#### Interface request example（PHP）

    <?php
        $apiUrl = 'http://127.0.0.1:8080';
        $postFields = [
            'service'   => 'App.Sip_Call.DoubleCall',
            'token'     => 'ABCDEFG',
            'extnumber'  => 'abcdefg',
            'anumber'  => 'abcdefg',
            'bnumber'  => 'abcdefg',
            'disnumber'  => 'abcdefg',
            'userid'  => 'abcdefg',
            'memberid'  => 'abcdefg',
            'chengshudu'  => '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": "The double call command is sent successfully",
            "reqtime": 1584953473,
            "rsptime": 1584953473
        },
        "msg": ""
    }