CallFire has a new API!
We are proud to announce the launch of our API 2.0! Learn more about our streamlined, transactional and broadcast APIs. This version of the API documentation will remain available for reference only. There will be no new development, only bug fixes. We highly recommend upgrading to our newer and more sophisticated documentation.
Start sending calls using VoiceBroadcastConfig
or by setting up an IVR using IvrBroadcastConfig
.
Sending a call requires at least a ToNumber and sound id or an IVR. The returned broadcastId can be passed to
QueryCalls
to get state of call actions in campaign and get list of individual
callIds for use in GetCall
request. The broadcastId can also be passed to
GetBroadcastStats
to get information about the call campaign, such as BilledAmount,
Duration, State, etc...
Request Parameters
Parameter | Demo Value | Description | Data Type |
---|---|---|---|
SendCall | object | ||
RequestId | Unique ID, used to de-dup requests and make sure request is not processed twice | anyURI | |
Type | Type of Broadcast[VOICE, IVR, TEXT, CCC] | BroadcastType | |
BroadcastName | Title of Broadcast (default: API Send) | string | |
ToNumber | List of E.164 11 digit numbers space or comma separated | List[PhoneNumber] | |
ScrubBroadcastDuplicates | Scrub duplicates (default: false) | boolean | |
Label | Label for Broadcast | string | |
MaxActive | Max simultaneous calls | int | |
VoiceBroadcastConfig * | Configuration needed for a Voice Broadcast | object | |
id | Unique ID of BroadcastConfig | long | |
Created | DateTime Broadcast was created 'CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm]' | dateTime | |
FromNumber | E.164 11 digit number or short code | PhoneNumber | |
LocalTimeZoneRestriction | Restrict the times your compaign can run | object | |
BeginTime | Earliest time a client can be contacted in the timezone associated with the number's NPA/NXX | time | |
EndTime | Latest time a client can be contacted in the timezone associated with the number's NPA/NXX | time | |
RetryConfig | Retry logic for broadcast | object | |
MaxAttempts | Max attempts to retry broadcast (default: 1) | int | |
MinutesBetweenAttempts | Minutes between broadcast attempts (default: 60) | int | |
RetryResults | Conditions to retry on[LA, AM, BUSY, DNC, XFER, NO_ANS, XFER_LEG, SENT, RECEIVED, DNT, TOO_BIG, INTERNAL_ERROR, CARRIER_ERROR, CARRIER_TEMP_ERROR, UNDIALED, SD, POSTPONED, ABANDONED, SKIPPED, INVALID_NUMBER] | List[Result] | |
RetryPhoneTypes | Phone types to call in retry[FIRST_NUMBER, HOME_PHONE, WORK_PHONE, MOBILE_PHONE] | List[RetryPhoneType] | |
AnsweringMachineConfig | Action to take if machine answers[AM_ONLY, AM_AND_LIVE, LIVE_WITH_AMD, LIVE_IMMEDIATE] | AnsweringMachineConfig | |
LiveSoundText * | string | ||
LiveSoundId * | ID of Sound to play if call answered by live person | long | |
LiveSoundTextVoice | Voice | ||
MachineSoundText * | string | ||
MachineSoundId * | ID of Sound to play if call answered by machine | long | |
MachineSoundTextVoice | Voice | ||
TransferSoundText * | string | ||
TransferSoundId * | ID of Sound to play if call transfered | long | |
TransferSoundTextVoice | Voice | ||
TransferDigit | Phone digit call transfers on if pressed | PhoneDigit | |
TransferNumber | Number to transfer call to | PhoneNumber | |
DncSoundText * | string | ||
DncSoundId * | Do Not Call unique ID of sound | long | |
DncSoundTextVoice | Voice | ||
DncDigit | Do Not Call Digit | PhoneDigit | |
MaxActiveTransfers | Max Transfers | int | |
IvrBroadcastConfig * | Configuration needed for an IVR Broadcast | object | |
id | Unique ID of BroadcastConfig | long | |
Created | DateTime Broadcast was created 'CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm]' | dateTime | |
FromNumber | E.164 11 digit number or short code | PhoneNumber | |
LocalTimeZoneRestriction | Restrict the times your compaign can run | object | |
BeginTime | Earliest time a client can be contacted in the timezone associated with the number's NPA/NXX | time | |
EndTime | Latest time a client can be contacted in the timezone associated with the number's NPA/NXX | time | |
RetryConfig | Retry logic for broadcast | object | |
MaxAttempts | Max attempts to retry broadcast (default: 1) | int | |
MinutesBetweenAttempts | Minutes between broadcast attempts (default: 60) | int | |
RetryResults | Conditions to retry on[LA, AM, BUSY, DNC, XFER, NO_ANS, XFER_LEG, SENT, RECEIVED, DNT, TOO_BIG, INTERNAL_ERROR, CARRIER_ERROR, CARRIER_TEMP_ERROR, UNDIALED, SD, POSTPONED, ABANDONED, SKIPPED, INVALID_NUMBER] | List[Result] | |
RetryPhoneTypes | Phone types to call in retry[FIRST_NUMBER, HOME_PHONE, WORK_PHONE, MOBILE_PHONE] | List[RetryPhoneType] | |
DialplanXml | IVR xml document describing dialplan | string |
* indicates choice value, bolded parameters are required
Response Parameters
Parameter | Description | Data Type |
---|---|---|
CreatedId | Unique ID of resource | long |
<?php
/**
* You'll need your login/password pair when you create the SOAP client.
* Don't use the fake login/password provided here; it's just for show and
* won't work.
*/
$wsdl = "http://callfire.com/api/1.1/wsdl/callfire-service-http-soap12.wsdl";
$client = new SoapClient($wsdl, array(
'soap_version' => SOAP_1_2,
'login' => 'YourLoginId',
'password' => 'YourPassword'));
/**
* SendCall. Asynchronous operation that starts a call campaign to
* specified numbers.
*/
$request = new stdclass();
$request->BroadcastName = 'Test API SendCall Broadcast';
$request->ToNumber = array('18185551212');
$request->VoiceBroadcastConfig = new stdClass();
$request->VoiceBroadcastConfig->FromNumber = '13105551212'; // PhoneNumber
$request->VoiceBroadcastConfig->AnsweringMachineConfig = 'LIVE_IMMEDIATE'; // [AM_ONLY, AM_AND_LIVE, LIVE_WITH_AMD, LIVE_IMMEDIATE]
$request->VoiceBroadcastConfig->LiveSoundId = 9; // long
$broadcastId = $client->SendCall($request);
echo "Broadcast ID: $broadcastId\n";
// Sample response:
// Broadcast ID: 332
// Use #GetBroadcast with returned $broadcastId to determine the status of call campaign
//
// $request = new stdClass();
// $request->Id = $broadcastId;
// $broadcastInfo = $client->GetBroadcast($request);
//
?>