Make an Outbound Call
Make an outbound call from an extension through a trunk of the PBX.
Conditions
- The call will go through an outbound route, so the extension needs to have permission of dialing through that route.
- Send the request to make an extension dial an external number.
The extension will ring first, pick up the call on the extension and the external number will be dialed. If autoanswer is set to yes, the calling party will hear the ring back tone, the called party will hear the ringing.
Endpoint
POST /api/v0.0.1/extension/dial_outbound?token={token}&type={type}
Request Parameters
Name | Importance | Type | Description |
extid | Required | Int | The extension number. |
outto | Required | String | The external number. |
autoanswer | Optional | String | Whether to auto answer the call or not. This parameter requires the SIP phone to support.
|
Examples
Request Example
POST /api/v0.0.1/extension/dial_outbound?token=813b621cfe8eecf445a2ce1f4a079ffe&type=json HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 172.16.6.150
{
"extid":"101",
"outto":"16103",
"autoanswer":"no"
}
POST /api/v0.0.1/extension/dial_outbound?token=813b621cfe8eecf445a2ce1f4a079ffe&type=xml HTTP/1.1
Content-Type:application/xml; charset=utf-8
Host: 172.16.6.150
<?xml version="1.0" encoding="UTF-8" ?>
<xml>
<extid>101</extid>
<outto>16103</outto>
<autoanswer>no</autoanswer>
</xml>
Response Example
HTTP/1.1 200 OK
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
{
"status": "Success"
}
HTTP/1.1 200 OK
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
<?xml version="1.0" encoding="UTF-8" ?>
<xml>
<status>Success</status>
</xml>