CallFire Solutions

Query Calls

Follow

QUERY CALLS

Lists inbound and outbound calls

This operation queries for calls using standard ActionQuery, which filters on batchId, broadcastId, toNumber, and other parameters. It returns a list of calls and all associated information. See GetCall if you need to get just a single call action by id.

REQUEST PARAMETERS

ParameterDemo ValueDescriptionData Type
QueryCalls   Calls request by query object
MaxResults Max number of results to return limited to 1000 (default: 1000) long
FirstResult Start of next result set (default: 0) long
BroadcastId BroadcastId to query on long
BatchId BatchId to query on long
State List of Action States to query on[READY, SELECTED, CALLBACK, FINISHED, DNC, DUP, INVALID, TIMEOUT] List[ActionState]
Result List of Results to query on[LA, AM, BUSY, DNC, XFER, XFER_LEG, NO_ANS, UNDIALED, INTERNAL_ERROR, CARRIER_ERROR, CARRIER_TEMP_ERROR, SD, POSTPONED] List[Result]
Inbound Is call inbound boolean
IntervalBegin Beginning of DateTime interval to search on dateTime
IntervalEnd End of DateTime interval to search on dateTime
FromNumber E.164 11 digit number PhoneNumber
ToNumber E.164 11 digit number List[PhoneNumber]
LabelName Label that result must have to be included string

RESPONSE PARAMETERS

ParameterDescriptionData Type
CallQueryResult List of Calls returned from query  
TotalResults Results count long
Call Call Information  
Id Unique ID of action long
FromNumber E.164 11 digit number or short code PhoneNumber
ToNumber List of E.164 11 digit numbers space seperated List[PhoneNumber]
State Current State of Action[READY, SELECTED, CALLBACK, FINISHED, DNC, DUP, INVALID, TIMEOUT] ActionState
BatchId Unique ID of Batch associated with Action long
BroadcastId Unique ID of Broadcast associated with Action long
ContactId Unique ID of Contact associated with Action long
Inbound Is inbound Action boolean
Created DateTime Action was created 'CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm]' dateTime
Modified DateTime Action was modified 'CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm]' dateTime
FinalResult [LA, AM, BUSY, DNC, XFER, XFER_LEG, NO_ANS, UNDIALED, INTERNAL_ERROR, CARRIER_ERROR, CARRIER_TEMP_ERROR, SD, POSTPONED] Result
Label    
Name   string
CallRecord    
Id   long
Result [LA, AM, BUSY, DNC, XFER, XFER_LEG, NO_ANS, UNDIALED, INTERNAL_ERROR, CARRIER_ERROR, CARRIER_TEMP_ERROR, SD, POSTPONED] Result
FinishTime DateTime action finished in 'CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm]' format dateTime
BilledAmount Credits charged for call or text float
QuestionResponse Question / Response pair defined in IVR campaign with 'stash'.  
Question IVR stash 'varname' string
Response IVR stash value associated with 'varname' string
OriginateTime   dateTime
AnswerTime   dateTime
Duration Duration of call in seconds int
RecordingMeta Recordings are audio recorded during a call.  
Id   long
Name   string
Created   dateTime
LengthInSeconds   int

EXAMPLE


using RestSharp;

namespace [your-namespace]
{
    public class [your-class]
    {
        public string QueryCalls()
        {
            var client = new RestClient("https://www.callfire.com/api/1.1/rest/");
            client.Authenticator = new HttpBasicAuthenticator("YourLoginId", "password");

            var request = new RestRequest("call", Method.GET);
            request.AddParameter("MaxResults", "5");
            request.AddParameter("State", "FINISHED");
            request.AddParameter("Result", "LA");
            request.AddParameter("Inbound", "false");

            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:ResourceList xmlns="http://api.callfire.com/data" xmlns:r="http://api.callfire.com/resource" totalResults="5">

    <Call id="209720137001">

       <FromNumber>12132609784</FromNumber>

       <ToNumber context="cf3-verify" verifyDigits="5307">14252163710</ToNumber>

       <State>FINISHED</State>

       <BroadcastId>1836940001</BroadcastId>

       <ContactId>165332795001</ContactId>

       <Inbound>false</Inbound>

       <Created>2014-05-19T15:25:36Z</Created>

       <Modified>2014-12-12T21:40:02Z</Modified>

       <FinalResult>LA</FinalResult>

       <CallRecord id="125746517001">

          <Result>LA</Result>

          <FinishTime>2014-05-19T15:26:20Z</FinishTime>

          <BilledAmount>0.0</BilledAmount>

          <OriginateTime>2014-05-19T15:25:37Z</OriginateTime>

          <AnswerTime>2014-05-19T15:25:44Z</AnswerTime>

          <Duration>36</Duration>

       </CallRecord>

    </Call>

</r:ResourceList>

Have more questions? Submit a request

Comments