GET CALL
Gets a call by id
This operation returns an individual call action. See QueryCalls if you need to get a list of call actions and determine individual callIds.
The general usage is to start a call campaign using SendCall, then to pass the returned broadcastId to QueryCalls to determine the callIds of the call actions created. TGetCall can then be called with a unique callId to determine information and state of the call action.
REQUEST PARAMETERS
Parameter | Data Type | Demo Value | Description |
---|---|---|---|
GetCall | object | Call request by unique ID | |
Id | long | 135 | Unique ID of resource |
RESPONSE PARAMETERS
Parameter | Data Type | Description |
---|---|---|
Call | Call Information | |
Id | long | Unique ID of action |
FromNumber | PhoneNumber | E.164 11 digit number or short code |
ToNumber | List[PhoneNumber] | List of E.164 11 digit numbers space seperated |
State | ActionState | Current State of Action [READY, SELECTED, CALLBACK, FINISHED, DNC, DUP, INVALID, TIMEOUT] |
BatchId | long | Unique ID of Batch associated with Action |
BroadcastId | long | Unique ID of Broadcast associated with Action |
ContactId | long | Unique ID of Contact associated with Action |
Inbound | boolean | Is inbound Action |
Created | dateTime | DateTime Action was created 'CCYY-MM-DDThh:mm:ss[Z(+/-)hh:mm]' |
Modified | dateTime | DateTime Action was modified 'CCYY-MM-DDThh:mm:ss[Z(+/-)hh:mm]' |
FinalResult | Result | [LA, AM, BUSY, DNC, XFER, XFER_LEG, NO_ANS, UNDIALED, INTERNAL_ERROR, CARRIER_ERROR, CARRIER_TEMP_ERROR, SD, POSTPONED] |
Label | ||
Name | string | |
CallRecord | ||
Id | long | |
Result | Result | [LA, AM, BUSY, DNC, XFER, XFER_LEG, NO_ANS, UNDIALED, SENT, INTERNAL_ERROR, CARRIER_ERROR, CARRIER_TEMP_ERROR, SD, POSTPONED] |
FinishTime | dateTime | DateTime action finished in 'CCYY-MM-DDThh:mm:ss[Z(+/-)hh:mm]' format |
BilledAmount | float | Credits charged for call or text |
QuestionResponse | Question / Response pair defined in IVR campaign with ['stash']. (https://www.callfire.com/help/docs/callfire-xml/tags/stash) | |
Question | string | IVR stash 'varname' |
Response | string | IVR stash value associated with 'varname' |
OriginateTime | dateTime | |
AnswerTime | dateTime | |
Duration | int | Duration of call in seconds |
RecordingMeta | Recordings are audio recorded during a call. | |
Id | long | |
Name | string | |
Created | dateTime | |
LengthInSeconds | int | |
Link | string |
EXAMPLE
using RestSharp;
namespace [your-namespace]
{
public class [your-class]
{
public string GetCall()
{
long callId = 1428507003; // Your Call Id here
var client = new RestClient("https://www.callfire.com/api/1.1/rest/");
client.Authenticator = new HttpBasicAuthenticator("YourLoginId", "password");
var request = new RestRequest(string.Format("call/{0}", callId), Method.GET);
var response = client.Execute(request);
string content = response.Content;
return content;
}
}
}
The XML returned is:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<r:Resource xmlns="http://api.callfire.com/data" xmlns:r="http://api.callfire.com/resource">
<Call id="224205636001">
<FromNumber>12132609784</FromNumber>
<ToNumber context="cf3-verify" verifyDigits="9366">19196991764</ToNumber>
<State>FINISHED</State>
<BroadcastId>1836940001</BroadcastId>
<ContactId>169915679001</ContactId>
<Inbound>false</Inbound>
<Created>2014-06-16T19:34:29Z</Created>
<Modified>2014-06-16T19:35:14Z</Modified>
<FinalResult>LA</FinalResult>
<CallRecord id="135106697001">
<Result>LA</Result>
<FinishTime>2014-06-16T19:35:16Z</FinishTime>
<BilledAmount>0.0</BilledAmount>
<OriginateTime>2014-06-16T19:34:29Z</OriginateTime>
<AnswerTime>2014-06-16T19:34:41Z</AnswerTime>
<Duration>35</Duration>
</CallRecord>
</Call>
</r:Resource>