Checking Status for an Outbound Call

Check Status for an Outbound Call

GET https://insight.plumvoice.com/api/outbound/{call_id}

Path Parameters

Name
Type
Description

call_id

string

Call ID number

Headers

Name
Type
Description

content-type

string

application/x-www-form-urlencoded

{
  'success':true,
  'call_details': {
  'status':'canceled',
  'attempts':'1',
  'max_attempts':'1',
  'queued_timestamp':'1429214458',
  'last_attempt_timestamp':'1429214474',
  'start_timestamp':'1429214400',
  'end_timestamp':'1429218000',
  'reattempt_wait':'0',
  'events': [
    {
      'event':'queued',
      'timestamp':'1429214465'
    },
    {
       'event':'canceled',
       'timestamp':'1429214474'
    }
    ]
  }
}

Possible Response Codes

  • 200: success

  • 401: authentication headers invalid or the account is inactive

  • 403: the account attempting to view the outbound call details does not have appropriate permissions

  • 404: outbound call was not found

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

  • 415: unsupported media type (Content-Type value in request)

  • 500: database error

The return structure will contain the following item(s):

Name

Data Type

Always Present

Description

success

boolean

yes

Indicates the outcome of the request

error

string

no

If the success value is false this provides a message indicating what error(s) occurred

call_details

mixed

no

All call data for the outbound call. See the table below for all of the data required therein.

Definitions: Call Details 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 to be made

queued_timestamp

int

Unix timestamp of when the call was queued

last_attempt_timestamp

int

Unix timestamp of when the last event for the outbound call occurred

start_Timestamp

int

Unix timestamp of when the call was scheduled to start outbound call attempts

end_timestamp

int

Unix timestamp of 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 with the indices 'event' and 'timestamp' indicating the event and its duration

Sample Code

This sample PHP code makes a request to this method:

<?php
$ch = curl_init();
$url = 'https://insight.plumvoice.com/api/outbound/{call_id}';
$username = 'you@yourdomain.com';
$password = 'you_developer_key';
curl_setopt($ch, CURLOPT_USERPWD, $username.":".$password);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/json", "Content-Type: application/x-www-form-urlencoded"));
$result = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
var_dump($result);
var_dump($http_code);

Last updated