Checking Status for an Outbound Call

get
Check Status for an Outbound Call

https://insight.plumvoice.com/api/outbound/{call_id}
Request
Response
Request
Path Parameters
call_id
required
string
Call ID number
Headers
content-type
optional
string
application/x-www-form-urlencoded
Response
200: OK
Note: The sample call was queued and then canceled.
JSON
XML
JSON
{
'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'
}
]
}
}
XML
<result>
<success>true</success>
<call_details>
<status>canceled</status>
<attempts>1</attempts>
<max_attempts>1</max_attempts>
<queued_timestamp>1429214458</queued_timestamp>
<last_attempt_timestamp>1429214474</last_attempt_timestamp>
<start_timestamp>1429214400</start_timestamp>
<end_timestamp>1429218000</end_timestamp>
<reattempt_wait>0</reattempt_wait>
<events>
<item><event>queued</event><timestamp>1429214465</timestamp></item>
<item><event>canceled</event><timestamp>1429214474</timestamp></item>
</events>
</call_details>
</result>
404: Not Found
Example: no outbound id was found
JSON
XML
JSON
{'success':false,'error':'An outbound call was not found by that id.'}
XML
<result>
<success>false</success>
<error>An outbound call was not found by that id.</error>
</result>

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);