Get Outbound Call Status

get
Checking Status For An Outbound Call

https://fuse.plumvoice.com/api/outbound/{call_id}
Check the status of an outbound call.
Request
Response
Request
Path Parameters
call_id
required
string
Call ID for the desired call The call_id is returned from the queue and bulk_queue APIs
Response
200: OK
JSON
XML
JSON
{
"call_details": {
"max_attempts": "1",
"attempts": "1",
"events": [
{
"event": "queued",
"timestamp": 1475095892
},
{
"event": "dialing",
"timestamp": 1475095893
},
{
"event": "connected",
"timestamp": 1475095925
},
{
"event": "disconnected",
"timestamp": 1475095928
}
],
"phone_number": "'6173720293'",
"status": "completed",
"queued_timestamp": "1475095892",
"start_timestamp": "1475095925",
"end_timestamp": "1475095928",
"reattempt_wait": "300",
"duration": 3
}
}
XML
<?xml version="1.0"?>
<result>
<call_details>
<max_attempts>1</max_attempts>
<attempts>1</attempts>
<events>
<item>
<event>queued</event>
<timestamp>1475095892</timestamp>
</item>
<item>
<event>dialing</event>
<timestamp>1475095893</timestamp>
</item>
<item>
<event>connected</event>
<timestamp>1475095925</timestamp>
</item>
<item>
<event>disconnected</event>
<timestamp>1475095928</timestamp>
</item>
</events>
<phone_number>'6173720293'</phone_number>
<status>completed</status>
<queued_timestamp>1475095892</queued_timestamp>
<start_timestamp>1475095925</start_timestamp>
<end_timestamp>1475095928</end_timestamp>
<reattempt_wait>300</reattempt_wait>
<duration>3</duration>
</call_details>
</result>
404: Not Found
Example: no outbound id was found
JSON
XML
JSON
{"error":"No outbound call was found by that id."}
XML
<?xml version="1.0"?>
<result>
<error>No outbound call was found by that id.</error>
</result>

Possible Response Codes

  • 200: success

  • 401: authentication headers invalid or the account is inactive

  • 403: user does not have the appropriate permission to view the outbound call (owned by another user)

  • 404: outbound call not found

  • 405: invalid HTTP method supplied (only GET allowed)

  • 500: database error

The return structure contains the following item(s):

Name

Data Type

Always Present

Description

error

string

no

Message indicating what went wrong with the request when the HTTP code is not 200.

call_details

mixed

no

All call data for the outbound call. Supplied when the HTTP code is 200. See the table below for more information on the data in this item.

Definitions: Call Detail Data

Name

Data Type

Value

status

string

Current status for the outbound call.

attempts

int

Total number of attempts made.

max_attempts

int

Maximum number of attempts for each queued number.

queued_timestamp

int

Unix timestamp indicating when the call was queued.

start_timestamp

int

Unix timestamp indicating when the call was scheduled to start outbound call attempts.

end_timestamp

int

Unix timestamp indicating when the outbound call was scheduled to stop outbound attempts.

reattempt_wait

int

Time, in seconds, to wait between retrying the outbound call after a failure.

events

mixed

Numerically indexed array of outbound call events. Each row uses the 'event' and 'timestamp' labels to indicate the event and its duration.

duration

int

Duration, in seconds, of a successfully completed call.

Sample Code

This sample PHP code makes a request to this method:

<?php
// account and application settings
$email = '<your_email_address>';
$developer_key = '<your_developer_key>';
$call_id = '<your_call_id>';
// build the URL
$url = 'https://fuse.plumvoice.com/api/outbound/'.$call_id;
$ch = curl_init();
curl_setopt($ch, CURLOPT_USERPWD, $email.':'.$developer_key);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/json"));
$result = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
var_dump($result);
var_dump($http_code);