Campaign Service help you to create and manage your campaigns.
WSDL
The WSDL is called CampaignService. It encompasses not only the voice broadcast functionality, but also the methods needed to create and modify other types of campaigns. https://www.callfire.com/service/CampaignService?wsdl
Methods
addAutoDNCToCampaign
Use this function to add a number to the Do Not Call list.
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
campaignid
|
1
|
1
|
false
|
xsd:long
|
The campaign ID to start
|
To Test The Function
-
Create a new campaign
-
Call the addAutoDNCTo_Campaign function
-
Run the campaign, when you receive the call, press the DNC digit.
Response
The number would be added to the do not call list. Logon to callfire.com as an Admin, click on "Toolbox -> Phonebooks and DNC" to view the number
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
-5814
Example Response
-
-
Sample PHP Code
public function addAutoDNCToCampaign($api_key, $campaign_id, $debug)
{
$createOutboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOutboundcampaignWsdl,array('trace' => true));
$addAutoDNCarray = array (
'key' => $api_key,
'campaignId' => $campaign_id
);
try
{
$addAutoDNCToCampaignResponse = $campaignOutboundClient->addAutoDNCToCampaign($addAutoDNCarray);
$addAutoDNC = $addAutoDNCToCampaignResponse->out;
if($debug)
{
echo "Numbers will be added to DoNotCallList";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."
";
}
}
}
Sample C# Code
public void addAutoDNCToCampaign(string key, long campaignId)
{
LOG.Info("Entered addAutoDNCToCampaign(string key, long campaignId)");
/*
* Validation of parameters early helps avoid runtime
* exceptions such as null pointer exceptions (NPE). Invalid
* parameters can be rejected immediately before any web
* service calls are made.
*/
this.validateAccountKey(key);
this.validateCampaignId(campaignId);
try
{
/*
* add auto DNC to campaign
*/
this.campaignService.addAutoDNCToCampaign(key, campaignId);
}
catch (Exception e)
{
//write to log and raise exception indicating an error occurred
string msg = "Unable to addAutoDNCToCampaign";
LOG.Error(msg);
throw new CampaignException(msg, e);
}
finally
{
LOG.Info("Exited addAutoDNCToCampaign(string key, long campaignId)");
}
}
addNumbersToCampaign
If you need to add more numbers to an existing campaign, use this to upload additional phone numbers.
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
id
|
1
|
1
|
false
|
xsd:long
|
The campaign ID to start
|
csvData
|
1
|
1
|
true
|
xsd:string
|
The csv file containing the additional numbers. each number is followed by a comma and some extra data, the next phone number is on a separate line (think '\n')
|
Example CSV Data File Format
The CSV Data (String) should look like this for a campaign with just phone numbers ( New Line Seperated )
1231231234
1231231235
1231231236
...
1231231237
For Call Center Connect Campaigns or with Extra Data per number, it should be as follows =
1231231234,FirstName1,LastName1,ExtraInfo,Address
1231231235,FirstName2,LastName2,ExtraInfo,Address
...
1231231236,FirstNameN,LastNameN,ExtraInfo,Address
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
-3198
string
Example Response
-
-
Sample PHP Code
public function addNumbersToCampaign($api_key, $campaign_id, $csvdata, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$csv = file_get_contents($csvdata);
$addNumbersArray = array (
'key' => $api_key,
'id' => $campaign_id,
'csvData' => $csv
);
try
{
$addNumbersResponse = $campaignOutboundClient->addNumbersToCampaign($addNumbersArray);
$addNumbers = $addNumbersResponse->out;
if($debug)
{
echo "Successfully added numbers to existing campaign..";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."
";
}
}
}
Sampe C# Code
public void addNumbersToCampaign(string key, long campaignId, string numbersInCSV)
{
LOG.Info("Entered addNumbersToCampaign(string key, long campaignId, string numbersInCSV)");
/*
* Validation of parameters early helps avoid runtime
* exceptions such as null pointer exceptions (NPE). Invalid
* parameters can be rejected immediately before any web
* service calls are made.
*/
this.validateAccountKey(key);
this.validateCampaignId(campaignId);
try
{
/*
* add numbers to campaign
*/
this.campaignService.addNumbersToCampaign(key, campaignId, numbersInCSV);
}
catch (Exception e)
{
//write to log and raise exception indicating an error occurred
string msg = "Unable to addNumbersToCampaign";
LOG.Error(msg);
throw new CampaignException(msg, e);
}
finally
{
LOG.Info("Exited addNumbersToCampaign(string key, long campaignId, string numbersInCSV)");
}
}
createBroadcastNoAMD
This function is to create a broadcast campaign without answering machine detection
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
callerid
|
1
|
1
|
true
|
xsd:string
|
The caller ID that should be presented on each call (10 digits)
|
numbers
|
1
|
1
|
true
|
tns:ArrayOfString
|
10 digit phone numbers to call
|
dncDigit
|
1
|
1
|
true
|
xsd:string/td>
|
DTMF digit that will mark the call Do Not Call
|
liveFile
|
1
|
1
|
true
|
xsd:base64Binary
|
Binary sound file to play when the caller picks up the phone (WAV file 16 Bit 8kHz mono)
|
dncFile
|
1
|
1
|
true
|
xsd:base64Binary
|
Binary sound file to play when the user presses Do Not Call digit (WAV file 16 Bit 8kHz mono)
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
false
|
xsd:long
|
campaignid
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
string
string
string
string
string
YTM0NZomIzI2OTsmIzM0NTueYQ==
YTM0NZomIzI2OTsmIzM0NTueYQ==
Sample PHP Code
public function createBroadcastNoAMD($api_key, $caller_id, $phoneNumbers, $dncDigit, $live_file, $dnc_file, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
//Converting the input file to ArrayOfString
$lines = file($phoneNumbers) or die('Unable to upload phone numbers');
foreach($lines as $line)
{
$pnumber['string'][] = $line;
}
//Converting the sound files to byte format
$handle = fopen($live_file,'r');
$contents = fread($handle,filesize($live_file));
$liveFile = $contents;
$handle1 = fopen($dnc_file,'r');
$contents1 = fread($handle1,filesize($dnc_file));
$dncFile = $contents1;
$createcampaign = array(
'key' => $api_key,
'callerid' => $caller_id,
'numbers' => $pnumber,
'dncDigit' => $dncDigit,
'liveFile' => $liveFile,
'dncFile' => $dncFile
);
try
{
$createBroadcastNoAMDResponse = $campaignOutboundClient->createBroadcastNoAMD($createcampaign);
$campaignId = $createBroadcastNoAMDResponse->out;
if($debug)
{
echo "CampaignID : ".$campaignId."
";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."
";
}
}
}
Sample C# Code
public long createBroadcastNoAMD(string key, string callerId, List numbers,
string dncDigit, byte[] liveFile, byte[] dncFile)
{
LOG.Info("Entered createBroadcastNoAMD(string key, string callerId, List numbers, "
+ "string dncDigit, byte[] liveFile, byte[] dncFile)");
/*
* Validation of parameters early helps avoid runtime
* exceptions such as null pointer exceptions (NPE). Invalid
* parameters can be rejected immediately before any web
* service calls are made.
*/
this.validateAccountKey(key);
this.validateCallerId(callerId);
this.validateNumbers(numbers);
this.validateDNCDigit(dncDigit);
this.validateLiveFile(liveFile);
this.validateDNCFile(dncFile);
try
{
/*
* Create broadcast with no Anwering Machine Detection (AMD)
*/
long campaignId = this.campaignService.createBroadcastNoAMD(key, callerId,
numbers.ToArray(), dncDigit, liveFile, dncFile);
/*
* A quick check is performed to see if debug mode is enabled for logging.
* This ensure the string parameter is not evaluated unless it is needed.
*/
if (LOG.IsDebugEnabled)
{
LOG.Debug("New campaign created: " + campaignId);
}
return campaignId;
}
catch (Exception e)
{
//write to log and raise exception indicating an error occurred
string msg = "Unable to createBroadcastNoAMD";
LOG.Error(msg);
throw new CampaignException(msg, e);
}
finally
{
LOG.Info("Exited createBroadcastNoAMD(string key, string callerId, List numbers, "
+ "string dncDigit, byte[] liveFile, byte[] dncFile)");
}
}
createBroadcastToList
This function will allow you to send a broadcast out to the phone numbers you specify. The sound file provided will be played back to live pickups and be left as a message on answering machines.
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
callerid
|
1
|
1
|
true
|
xsd:string
|
The caller ID that should be presented on each call (10 digits)
|
listid
|
1
|
1
|
false
|
xsd:long
|
The ID of you phone book
|
soundFile
|
1
|
1
|
true
|
xsd:base64Binary
|
Binary sound file to play (WAV file 16 Bit 8kHz mono)
|
Response
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
string
3240
YTM0NZomIzI2OTsmIzM0NTueYQ==
Sample PHP Code
public function createBroadcastToList($api_key, $caller_id, $list_id, $soundfile, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
//Converting the sound files to byte format
$handle = fopen($soundfile,'r');
$contents = fread($handle,filesize($soundfile));
$soundFile = $contents;
$createBroadcasttoList = array(
'key' => $api_key,
'callerid' => $caller_id,
'listid' => $list_id,
'soundFile' => $soundFile
);
try
{
$createBroadCastToListResponse = $campaignOutboundClient->createBroadcastToList($createBroadcasttoList);
$campaignId = $createBroadCastToListResponse->out;
if($debug)
{
echo "CampaignID : ".$campaignId."
";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."
";
}
}
}
Sample C# Code
public long createBroadcastToList(string key, string callerId, long listId, byte[] soundFile)
{
LOG.Info("Entered createBroadcastToList(string key, string callerId, long listId, byte[] soundFile)");
/*
* Validation of parameters early helps avoid runtime
* exceptions such as null pointer exceptions (NPE). Invalid
* parameters can be rejected immediately before any web
* service calls are made.
*/
this.validateAccountKey(key);
this.validateCallerId(callerId);
this.validateListId(listId);
this.validateSoundFile(soundFile);
try
{
/*
* Create broadcast using an existing list
*/
long campaignId = this.campaignService.createBroadcastToList(key, callerId, listId,
soundFile);
/*
* A quick check is performed to see if debug mode is enabled for logging.
* This ensure the string parameter is not evaluated unless it is needed.
*/
if (LOG.IsDebugEnabled)
{
LOG.Debug("New campaign created: " + campaignId);
}
return campaignId;
}
catch (Exception e)
{
//write to log and raise exception indicating an error occurred
string msg = "Unable to createBroadcastToList";
LOG.Error(msg);
throw new CampaignException(msg, e);
}
finally
{
LOG.Info("Exited createBroadcastToList(string key, string callerId, long listId, byte[] soundFile)");
}
}
createBroadcastToList1
This function creates a Broad cast campaign. Use this function if you already have your sound files uploaded on callfire.com
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
callerid
|
1
|
1
|
true
|
xsd:string
|
The caller ID that should be presented on each call (10 digits)
|
listid
|
1
|
1
|
false
|
xsd:long
|
The ID of you phone book
|
soundFile
|
1
|
1
|
false
|
xsd:long
|
The ID of the sound file
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
false
|
xsd:long
|
campaignid
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
string
-7816
-9170
Example Response
-
-
-1129222
Sample PHP Code
public function createBroadcastToList1($api_key, $caller_id, $list_id, $soundfileid, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$createBroadcasttoList = array(
'key' => $api_key,
'callerid' => $caller_id,
'listid' => $list_id,
'soundFileId' => $soundfileid
);
try
{
$createBroadCastToListResponse = $campaignOutboundClient->createBroadcastToList1($createBroadcasttoList);
$campaignId = $createBroadCastToListResponse->out;
if($debug)
{
echo "CampaignID : ".$campaignId."
";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."
";
}
}
}
Sample C# Code
public long createBroadcastToListWithExistingSoundFile(string key, string callerId, long listId, long soundFileId)
{
LOG.Info("Entered createBroadcastToListWithExistingSoundFile(string key, string callerId, long listId, "
+ "long soundFileId)");
/*
* Validation of parameters early helps avoid runtime
* exceptions such as null pointer exceptions (NPE). Invalid
* parameters can be rejected immediately before any web
* service calls are made.
*/
this.validateAccountKey(key);
this.validateCallerId(callerId);
this.validateListId(listId);
this.validateSoundFileId(soundFileId);
try
{
/*
* Create broadcast using an existing list and sound file
*/
long campaignId = this.campaignService.createBroadcastToList1(key, callerId, listId,
soundFileId);
/*
* A quick check is performed to see if debug mode is enabled for logging.
* This ensure the string parameter is not evaluated unless it is needed.
*/
if (LOG.IsDebugEnabled)
{
LOG.Debug("New campaign created: " + campaignId);
}
return campaignId;
}
catch (Exception e)
{
//write to log and raise exception indicating an error occurred
string msg = "Unable to createBroadcastToListWithExistingSoundFile";
LOG.Error(msg);
throw new CampaignException(msg, e);
}
finally
{
LOG.Info("Exited createBroadcastToListWithExistingSoundFile(string key, string callerId, long listId, "
+ "long soundFileId)");
}
}
createBroadcastToNumbers
Same as sendBroadcastToList, except the campaign is not started immediately. This function will create a broadcast to the phone numbers you specify. The sound file provided will be played back to live pickups and be left as a message on answering machines.
-
Live Answer and Answering Machine Detection
-
Playback sound to Live Pickup and leave a message to Answering Machines
-
Use your own Callerid
-
Campaign DOES NOT start automatically
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
callerid
|
1
|
1
|
true
|
xsd:string
|
The caller ID that should be presented on each call (10 digits)
|
numbers
|
1
|
1
|
true
|
tns:ArrayOfString
|
10 digit phone numbers to call
|
soundFile
|
1
|
1
|
true
|
xsd:base64Binary
|
Binary sound file to play (WAV file 16 Bit 8kHz mono)
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
false
|
xsd:long
|
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
string
string
string
string
string
string
YTM0NZomIzI2OTsmIzM0NTueYQ==
Sample PHP Code
public function createBroadcastToNumbers($api_key, $caller_id, $phoneNumbers, $soundfile, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
//Converting the input file to ArrayOfString
$lines = file($phoneNumbers) or die('Unable to upload phone numbers');
foreach($lines as $line)
{
$pnumber['string'][] = $line;
}
//Converting the sound file
$handle = fopen($soundfile,'r');
$contents = fread($handle,filesize($soundfile));
$soundFile = $contents;
$createBroadcasttonumbersarray = array(
'key' => $api_key,
'callerid' => $caller_id,
'numbers' => $pnumber,
'soundFile' => $soundFile
);
try
{
$createBroadcastToNumbersResponse = $campaignOutboundClient->createBroadcastToNumbers($createBroadcasttonumbersarray);
$campaignId = $createBroadcastToNumbersResponse->out;
if($debug)
{
echo "CampaignID : ".$campaignId."
";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."
";
}
}
}
Sample C# Code
public long createBroadcastToNumbers(string key, string callerId, List numbers, byte[] soundFile)
{
LOG.Info("Entered createBroadcastToNumbers(string key, string callerId, List numbers, byte[] soundFile");
/*
* Validation of parameters early helps avoid runtime
* exceptions such as null pointer exceptions (NPE). Invalid
* parameters can be rejected immediately before any web
* service calls are made.
*/
this.validateAccountKey(key);
this.validateCallerId(callerId);
this.validateNumbers(numbers);
this.validateSoundFile(soundFile);
try
{
/*
* Create campaign using given numbers
*/
long campaignId = this.campaignService.createBroadcastToNumbers(key, callerId, numbers.ToArray(),
soundFile);
/*
* A quick check is performed to see if debug mode is enabled for logging.
* This ensure the string parameter is not evaluated unless it is needed.
*/
if (LOG.IsDebugEnabled)
{
LOG.Debug("New campaign created: " + campaignId);
}
return campaignId;
}
catch (Exception e)
{
//write to log and raise exception indicating an error occurred
string msg = "Unable to createBroadcastToNumbers";
LOG.Error(msg);
throw new CampaignException(msg, e);
}
finally
{
LOG.Info("Exited createBroadcastToNumbers(string key, string callerId, List numbers, byte[] soundFile");
}
}
createBroadcastToNumbers1
Same as sendBroadcastToList, except the campaign is not started immediately. This function will allow you to send a broadcast out to the phone numbers you specify. The sound file provided will be played back to live pickups and be left as a message on answering machines.
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
callerid
|
1
|
1
|
true
|
xsd:string
|
The caller ID that should be presented on each call (10 digits)
|
numbers
|
1
|
1
|
true
|
tns:ArrayOfString
|
10 digit phone numbers to call
|
soundFile
|
1
|
1
|
true
|
xsd:base64Binary
|
Binary sound file to play (WAV file 16 Bit 8kHz mono)
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
false
|
xsd:long
|
campaignid
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
string
string
string
-3464
Sample PHP Code
public function createBroadcastToNumbers1($api_key, $caller_id, $phoneNumbers, $soundfileid, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
//Converting the input file to ArrayOfString
$lines = file($phoneNumbers) or die('Unable to upload phone numbers');
foreach($lines as $line)
{
$pnumber['string'][] = $line;
}
$createBroadcasttonumbersarray = array(
'key' => $api_key,
'callerid' => $caller_id,
'numbers' => $pnumber,
'soundFileId' => $soundfileid
);
try
{
$createBroadCastToListResponse = $campaignOutboundClient->createBroadcastToNumbers1($createBroadcasttonumbersarray);
$campaignId = $createBroadCastToListResponse->out;
if($debug)
{
echo "CampaignID : ".$campaignId."
";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."
";
}
}
}
Sample C# Code
public long createBroadcastToNumbersWithExistingSoundFile(string key, string callerId, List numbers,
long soundFileId)
{
LOG.Info("Entered createBroadcastToNumbersWithExistingSoundFile(string key, string callerId, List numbers, "
+ "long soundFileId");
/*
* Validation of parameters early helps avoid runtime
* exceptions such as null pointer exceptions (NPE). Invalid
* parameters can be rejected immediately before any web
* service calls are made.
*/
this.validateAccountKey(key);
this.validateCallerId(callerId);
this.validateNumbers(numbers);
this.validateSoundFileId(soundFileId);
try
{
/*
* Create campaign using given numbers and an existing sound file
*/
long campaignId = this.campaignService.createBroadcastToNumbers1(key, callerId, numbers.ToArray(),
soundFileId);
/*
* A quick check is performed to see if debug mode is enabled for logging.
* This ensure the string parameter is not evaluated unless it is needed.
*/
if (LOG.IsDebugEnabled)
{
LOG.Debug("New campaign created: " + campaignId);
}
return campaignId;
}
catch (Exception e)
{
//write to log and raise exception indicating an error occurred
string msg = "Unable to createBroadcastToNumbersWithExistingSoundFile";
LOG.Error(msg);
throw new CampaignException(msg, e);
}
finally
{
LOG.Info("Exited createBroadcastToNumbersWithExistingSoundFile(string key, string callerId, List numbers, "
+ "long soundFileId");
}
}
createBroadcastWithDNC
This function will create a broadcast list with the DoNotCall Feature. Use this if you want to upload sound files from your system
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
callerid
|
1
|
1
|
true
|
xsd:string
|
The caller ID that should be presented on each call (10 digits)
|
numbers
|
1
|
1
|
true
|
tns:ArrayOfString
|
10 digit phone numbers to call
|
dncDigit
|
1
|
1
|
true
|
xsd:string
|
DTMF digit that will mark the call Do Not Call
|
liveAnswer
|
1
|
1
|
true
|
xsd:base64Binary
|
Binary sound file to play when the caller picks up the phone (WAV file 16 Bit 8kHz mono)
|
answeringMachine
|
1
|
1
|
true
|
xsd:base64Binary
|
Binary sound file to play when the call goes to voicemail (WAV file 16 Bit 8kHz mono)
|
dncFile
|
1
|
1
|
true
|
xsd:base64Binary
|
Binary sound file to play when the user presses Do Not Call digit (WAV file 16 Bit 8kHz mono)
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
false
|
xsd:long
|
campaignid
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
string
string
string
YTM0NZomIzI2OTsmIzM0NTueYQ==
YTM0NZomIzI2OTsmIzM0NTueYQ==
YTM0NZomIzI2OTsmIzM0NTueYQ==
Sample PHP Code
public function createBroadcastWithDNC($api_key, $caller_id, $phoneNumbers, $dncdigit, $liveanswer, $ansmachine, $dncfile, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl, array('trace' => true));
$lines = file($phoneNumbers) or die('Unable to upload phone numbers');
foreach($lines as $line)
{
$pnumber['string'][] = $line;
}
//Converting the sound file to byte format
$handle = fopen($liveanswer,'r');
$contents = fread($handle,filesize($liveanswer));
$liveAnswer = $contents;
$handle1 = fopen($ansmachine,'r');
$contents1 = fread($handle1,filesize($ansmachine));
$answeringMachine = $contents1;
$handle2 = fopen($dncfile,'r');
$contents2 = fread($handle2,filesize($dncfile));
$dncFile = $contents2;
$phoneNumber = '2134000543';
$createBroadcasttoList = array(
'key' => $api_key,
'callerid' => $caller_id,
'numbers' => $pnumber,
'dncDigit' => $dncdigit,
'liveAnswer' => $liveAnswer,
'answeringMachine' => $answeringMachine,
'dncFile' => $dncFile
);
try
{
$createBroadCastToListResponse = $campaignOutboundClient->createBroadcastWithDNC($createBroadcasttoList);
$campaignId = $createBroadCastToListResponse->out;
if($debug)
{
echo "CampaignID : ".$campaignId."";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."";
}
}
}
Sample C# Code
public long createBroadcastWithDNC(string key, string callerId, List numbers, string dncDigit,
byte[] liveAnswer, byte[] answeringMachine, byte[] dncFile)
{
LOG.Info("Entered createBroadcastWithDNC(string key, string callerId, List numbers, string dncDigit,"
+ "byte[] liveAnswer, byte[] answeringMachine, byte[] dncFile");
/*
* Validation of parameters early helps avoid runtime
* exceptions such as null pointer exceptions (NPE). Invalid
* parameters can be rejected immediately before any web
* service calls are made.
*/
this.validateAccountKey(key);
this.validateCallerId(callerId);
this.validateNumbers(numbers);
this.validateDNCDigit(dncDigit);
this.validateLiveFile(liveAnswer);
this.validateAnsweringFile(answeringMachine);
this.validateDNCFile(dncFile);
try
{
/*
* Create broadcast using given numbers with a DNC
*/
long campaignId = this.campaignService.createBroadcastWithDNC(key, callerId, numbers.ToArray(), dncDigit,
liveAnswer, answeringMachine, dncFile);
/*
* A quick check is performed to see if debug mode is enabled for logging.
* This ensure the string parameter is not evaluated unless it is needed.
*/
if (LOG.IsDebugEnabled)
{
LOG.Debug("New campaign created: " + campaignId);
}
return campaignId;
}
catch (Exception e)
{
//write to log and raise exception indicating an error occurred
string msg = "Unable to createBroadcastWithDNC";
LOG.Error(msg);
throw new CampaignException(msg, e);
}
finally
{
LOG.Info("Exited createBroadcastWithDNC(string key, string callerId, List numbers, string dncDigit,"
+ "byte[] liveAnswer, byte[] answeringMachine, byte[] dncFile");
}
}
createBroadcastWithDNC1
This function will create a broadcast list with the DoNotCall Feature. Use this function, if you have your sound files uploaded on callfire.com
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
callerid
|
1
|
1
|
true
|
xsd:string
|
The caller ID that should be presented on each call (10 digits)
|
numbers
|
1
|
1
|
true
|
tns:ArrayOfString
|
10 digit phone numbers to call
|
dncDigit
|
1
|
1
|
true
|
xsd:string
|
DTMF digit that will mark the call Do Not Call
|
laSoundFileId
|
1
|
1
|
false
|
xsd:long
|
The ID of the sound file to play when the caller picks up the phone
|
answeringMachine
|
1
|
1
|
false
|
xsd:long
|
The ID of the sound file to play when the call goes to voicemail
|
dncFileId
|
1
|
1
|
false
|
xsd:long
|
The ID of the sound file to play when the user presses Do Not Call digit
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
false
|
xsd:long
|
campaignid
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
string
string
string
string
string
string
-7230
2427
9092
Sample PHP Code
public function createBroadcastWith_DNC1($api_key, $caller_id, $phoneNumbers, $dncdigit, $liveAnswerid, $answeringMachineid, $dncFileid, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl, array('trace' => true));
$lines = file($phoneNumbers) or die('Unable to upload phone numbers');
foreach($lines as $line)
{
$pnumber['string'][] = $line;
}
$createBroadcasttoList = array(
'key' => $api_key,
'callerid' => $caller_id,
'numbers' => $pnumber,
'dncDigit' => $dncdigit,
'laSoundFileId' => $liveAnswerid,
'answeringMachine' => $answeringMachineid,
'dncFileId' => $dncFileid
);
try
{
$createBroadCastToListResponse = $campaignOutboundClient->createBroadcastWithDNC1($createBroadcasttoList);
$campaignId = $createBroadCastToListResponse->out;
if($debug)
{
echo "CampaignID : ".$campaignId."";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."";
}
}
}
Sample C# Code
public long createBroadcastWithDNCWithExistingSoundFiles(string key, string callerId, List numbers, string dncDigit,
long liveAnswerId, long answeringMachineId, long dncFileId)
{
LOG.Info("Entered createBroadcastWithDNCWithExistingSoundFiles(string key, string callerId, List numbers, "
+ "string dncDigit, long liveAnswerId, long answeringMachineId, long dncFileId)");
/*
* Validation of parameters early helps avoid runtime
* exceptions such as null pointer exceptions (NPE). Invalid
* parameters can be rejected immediately before any web
* service calls are made.
*/
this.validateAccountKey(key);
this.validateCallerId(callerId);
this.validateNumbers(numbers);
this.validateDNCDigit(dncDigit);
this.validateLiveId(liveAnswerId);
this.validateAnsweringId(answeringMachineId);
this.validateDNCId(dncFileId);
try
{
/*
* Create broadcast using given numbers with an existing DNC
*/
long campaignId = this.campaignService.createBroadcastWithDNC1(key, callerId, numbers.ToArray(), dncDigit,
liveAnswerId, answeringMachineId, dncFileId);
/*
* A quick check is performed to see if debug mode is enabled for logging.
* This ensure the string parameter is not evaluated unless it is needed.
*/
if (LOG.IsDebugEnabled)
{
LOG.Debug("New campaign created: " + campaignId);
}
return campaignId;
}
catch (Exception e)
{
//write to log and raise exception indicating an error occurred
string msg = "Unable to createBroadcastWithDNCWithExistingSoundFiles";
LOG.Error(msg);
throw new CampaignException(msg, e);
}
finally
{
LOG.Info("Exited createBroadcastWithDNCWithExistingSoundFiles(string key, string callerId, List numbers, "
+ "string dncDigit, long liveAnswerId, long answeringMachineId, long dncFileId)");
}
}
createBroadcastWithTransfer
This will create a voice broadcast campaign with the capability to transfer. Plays back a unique file for Live Answer and Answering Machine.
-
Live Answer and Answering Machine Detection
-
Leave different messages for Live Answer and Answering Machine
-
Detect any digit from the user to transfer to your number
-
Playback a file when user chooses the transfer digit
-
Use your own Callerid
-
Campaign DOES NOT start automatically
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
callerid
|
1
|
1
|
true
|
xsd:string
|
The caller ID that should be presented on each call (10 digits)
|
numbers
|
1
|
1
|
true
|
tns:ArrayOfString
|
10 digit phone numbers to call
|
transferNumber
|
1
|
1
|
true
|
xsd:string
|
10 digit phone number to transfer to
|
transferDigit
|
1
|
1
|
true
|
xsd:string
|
DTMF digit that will initiate the transfer
|
liveAnswer
|
1
|
1
|
true
|
xsd:base64Binary
|
Binary sound file to play when the caller picks up the phone (WAV file 16 Bit 8kHz mono)
|
answeringMachine
|
1
|
1
|
true
|
xsd:base64Binary
|
Binary sound file to play when the call goes to voicemail (WAV file 16 Bit 8kHz mono)
|
transferFile
|
1
|
1
|
true
|
xsd:string
|
Binary sound file to play when the user presses the transfer digit (WAV file 16 Bit 8kHz mono)
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
false
|
xsd:long
|
campaignid
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
string
string
string
string
string
YTM0NZomIzI2OTsmIzM0NTueYQ==
YTM0NZomIzI2OTsmIzM0NTueYQ==
YTM0NZomIzI2OTsmIzM0NTueYQ==
Sample PHP Code
public function createBroadcastWithTransfer($api_key, $caller_id, $phoneNumbers, $transfer_number, $transfer_digit, $liveanswer, $ansmachine, $transferfile, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$lines = file($phoneNumbers) or die('Unable to upload phone numbers');
foreach($lines as $line)
{
$pnumber['string'][] = $line;
}
//Converting the sound file to byte format
$handle = fopen($liveanswer,'r');
$contents = fread($handle,filesize($liveanswer));
$liveAnswer = $contents;
$handle1 = fopen($ansmachine,'r');
$contents1 = fread($handle1,filesize($ansmachine));
$answeringMachine = $contents1;
$handle2 = fopen($transferfile,'r');
$contents2 = fread($handle2,filesize($transferfile));
$transferFile = $contents2;
$createBroadcasttoListtransfer = array(
'key' => $api_key,
'callerid' => $caller_id,
'numbers' => $pnumber,
'transferNumber' => $transfer_number,
'transferDigit' => $transfer_digit,
'liveAnswer' => $liveAnswer,
'answeringMachine' => $answeringMachine,
'transferFile' => $transferFile
);
try
{
$createBroadCastToListTransferResponse = $campaignOutboundClient->createBroadcastWithTransfer($createBroadcasttoListtransfer);
$campaignId = $createBroadCastToListTransferResponse->out;
if($debug)
{
echo "CampaignID : ".$campaignId."";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."";
}
}
}
Sample C# Code
public long createBroadcastWithTransfer(string key, string callerId, List numbers, string transferNumber, string transferDigit, byte[] liveAnswer, byte[] answeringMachine, byte[] transferFile)
{
LOG.Info("Entered createBroadcastWithTransfer(string key, string callerId, List numbers, string transferNumber, "
+ "string transferDigit, byte[] liveAnswer, byte[] answeringMachine, byte[] transferFile)");
/*
* Validation of parameters early helps avoid runtime
* exceptions such as null pointer exceptions (NPE). Invalid
* parameters can be rejected immediately before any web
* service calls are made.
*/
this.validateAccountKey(key);
this.validateCallerId(callerId);
this.validateNumbers(numbers);
this.validateTransferNumber(transferNumber);
this.validateTransferDigit(transferDigit);
this.validateLiveFile(liveAnswer);
this.validateAnsweringFile(answeringMachine);
this.validateTransferFile(transferFile);
try
{
/*
* Create broadcast with given numbers and transfer file
*/
long campaignId = this.campaignService.createBroadcastWithTransfer(key, callerId, numbers.ToArray(),
transferNumber, transferDigit, liveAnswer, answeringMachine, transferFile);
/*
* A quick check is performed to see if debug mode is enabled for logging.
* This ensure the string parameter is not evaluated unless it is needed.
*/
if (LOG.IsDebugEnabled)
{
LOG.Debug("New campaign created: " + campaignId);
}
return campaignId;
}
catch (Exception e)
{
//write to log and raise exception indicating an error occurred
string msg = "Unable to createBroadcastWithTransfer";
LOG.Error(msg);
throw new CampaignException(msg, e);
}
finally
{
LOG.Info("Exited createBroadcastWithTransfer(string key, string callerId, List numbers, "
+ "string transferNumber, string transferDigit, byte[] liveAnswer, byte[] answeringMachine, byte[] transferFile)");
}
}
createBroadcastWithTransfer1
This function will create a broadcast campaign with the Call Transfer Feature Use this function if you have already uploaded your sound files on callfire
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
callerid
|
1
|
1
|
true
|
xsd:string
|
The caller ID that should be presented on each call (10 digits)
|
numbers
|
1
|
1
|
true
|
tns:ArrayOfString
|
10 digit phone numbers to call
|
transferNumber
|
1
|
1
|
true
|
xsd:string
|
10 digit phone number to transfer to
|
transferDigit
|
1
|
1
|
true
|
xsd:string
|
DTMF digit that will initiate the transfer
|
laSoundFileId
|
1
|
1
|
false/td>
|
xsd:long
|
The ID of the sound file to play when the caller picks up the phone
|
answeringMachine
|
1
|
1
|
false/td>
|
xsd:long
|
The ID of the sound file to play when the call goes to voicemail
|
transferFileId
|
1
|
1
|
false/td>
|
xsd:long
|
The ID of the sound file to play when the user presses the transfer digit
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
false
|
xsd:long
|
campaignid
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
string
string
string
string
string
953
-9785
-4219
Sample PHP Code
public function createBroadcastWithTransfer1($api_key, $caller_id, $phoneNumbers, $transfer_number, $transfer_digit, $liveanswerid, $ansmachineid, $transferfileid, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$lines = file($phoneNumbers) or die('Unable to upload phone numbers');
foreach($lines as $line)
{
$pnumber['string'][] = $line;
}
$createBroadcasttoListtransfer1 = array(
'key' => $api_key,
'callerid' => $caller_id,
'numbers' => $pnumber,
'transferNumber' => $transfer_number,
'transferDigit' => $transfer_digit,
'laSoundFileId' => $liveanswerid,
'answeringMachine' => $ansmachineid,
'transferFileId' => $transferfileid
);
try
{
$createBroadCastToListTransferResponse1 = $campaignOutboundClient->createBroadcastWithTransfer1($createBroadcasttoListtransfer1);
$campaignId = $createBroadCastToListTransferResponse1->out;
if($debug)
{
echo "CampaignID : ".$campaignId."";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."";
}
}
}
Sample C# Code
public long createBroadcastWithTransferWithExistingSoundFiles(string key, string callerId, List numbers, string transferNumber, string transferDigit, long liveAnswerId, long answeringMachineId, long transferFileId)
{
LOG.Info("Entered createBroadcastWithTransferWithExistingSoundFiles(string key, string callerId, List numbers, "
+ "string transferNumber, string transferDigit, long liveAnswerId, long answeringMachineId, long transferFileId)");
try
{
long campaignId = this.campaignService.createBroadcastWithTransfer1(key, callerId, numbers.ToArray(),
transferNumber, transferDigit, liveAnswerId, answeringMachineId, transferFileId);
return campaignId;
}
finally
{
LOG.Info("Exited createBroadcastWithTransferWithExistingSoundFiles(string key, string callerId, List numbers, "
+ "string transferNumber, string transferDigit, long liveAnswerId, long answeringMachineId, long transferFileId)");
}
}
createBroadcastWithTransferDNC
This function will create a broadcast to the phone numbers you specify, it allows an option to transfer and add to the DNC List. The sound file provided will be played back to live pickups and be left as a message on answering machines. On live answer, the user can select a digit to transfer to your call center or press another digit to be marked as Do Not Call.
-
Live Answer and Answering Machine Detection
-
Leave different messages for Live Answer and Answering Machine
-
Detect any digit from the user to transfer to your number
-
Detect any digit from the user to mark as Do-Not-Call
-
Playback a file when user chooses the transfer digit
-
Playback a file when user chooses the Do-Not-Call Digit
-
Use your own Callerid
-
Campaign DOES NOT start automatically
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
callerid
|
1
|
1
|
true
|
xsd:string
|
The caller ID that should be presented on each call (10 digits)
|
numbers
|
1
|
1
|
true
|
xsd:ArrayOfString
|
10 digit phone numbers to call
|
transferNumber
|
1
|
1
|
true
|
xsd:string
|
10 digit phone number to transfer to
|
transferDigit
|
1
|
1
|
true
|
xsd:string
|
DTMF digit that will initiate the transfer
|
dncDigit
|
1
|
1
|
true
|
xsd:string
|
DTMF digit that will mark the call Do Not Call
|
liveAnswer
|
1
|
1
|
true
|
xsd:base64Binary
|
Binary sound file to play when the caller picks up the phone (WAV file 16 Bit 8kHz mono)
|
answeringMachine
|
1
|
1
|
true
|
xsd:base64Binary
|
Binary sound file to play when the call goes to voicemail (WAV file 16 Bit 8kHz mono)
|
transferFile
|
1
|
1
|
true
|
xsd:base64Binary
|
Binary sound file to play when the user presses the transfer digit (WAV file 16 Bit 8kHz mono)
|
dncFile
|
1
|
1
|
true
|
xsd:base64Binary
|
Binary sound file to play when the user presses Do Not Call digit (WAV file 16 Bit 8kHz mono)
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
false
|
xsd:long
|
campaignid
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
string
string
string
string
string
YTM0NZomIzI2OTsmIzM0NTueYQ==
YTM0NZomIzI2OTsmIzM0NTueYQ==
YTM0NZomIzI2OTsmIzM0NTueYQ==
YTM0NZomIzI2OTsmIzM0NTueYQ==
Sample PHP Code
public function createBroadcastWithTransferDNC($api_key, $caller_id, $phoneNumbers, $transfer_number, $transfer_digit, $dnc_digit, $liveanswer, $ansmachine, $transferfile, $dncfile, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$lines = file($phoneNumbers) or die('Unable to upload phone numbers');
foreach($lines as $line)
{
$pnumber['string'][] = $line;
}
//Converting the sound file to byte format
$handle = fopen($liveanswer,'r');
$contents = fread($handle,filesize($liveanswer));
$liveAnswer = $contents;
$handle1 = fopen($ansmachine,'r');
$contents1 = fread($handle1,filesize($ansmachine));
$answeringMachine = $contents1;
$handle2 = fopen($transferfile,'r');
$contents2 = fread($handle2,filesize($transferfile));
$transferFile = $contents2;
$createBroadcastWithTransferDNCarray = array(
'key' => $api_key,
'callerid' => $caller_id,
'numbers' => $pnumber,
'transferNumber' => $transfer_number,
'transferDigit' => $transfer_digit,
'dncDigit' => $dnc_digit,
'liveAnswer' => $liveAnswer,
'answeringMachine' => $answeringMachine,
'transferFile' => $transferFile,
'dncFile' => $dncfile
);
try
{
$createBroadcastWithTransferDNCResponse = $campaignOutboundClient->createBroadcastWithTransferDNC($createBroadcastWithTransferDNCarray);
$campaignId = $createBroadcastWithTransferDNCResponse->out;
if($debug)
{
echo "CampaignID : ".$campaignId."";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."";
}
}
}
Sample C# Code
public long createBroadcastWithTransferDNC(string key, string callerId, List numbers, string transferNumber,
string transferDigit, string dncDigit, byte[] liveAnswer, byte[] answeringMachine, byte[] transferFile,
byte[] dncFile)
{
LOG.Info("Entered createBroadcastWithTransferDNC(string key, string callerId, List numbers, "
+ "string transferNumber, string transferDigit, string dncDigit, byte[] liveAnswer, byte[] answeringMachine, "
+ "byte[] transferFile, byte[] dncFile)");
try
{
long campaignId = this.campaignService.createBroadcastWithTransferDNC(key, callerId, numbers.ToArray(),
transferNumber, transferDigit, dncDigit, liveAnswer, answeringMachine, transferFile, dncFile);
return campaignId;
}
finally
{
LOG.Info("Exited createBroadcastWithTransferDNC(string key, string callerId, List numbers, "
+ "string transferNumber, string transferDigit, string dncDigit, byte[] liveAnswer, byte[] answeringMachine, "
+ "byte[] transferFile, byte[] dncFile)");
}
}
createBroadcastWithTransferDNC1
This function will create a broadcast list with the Call Transfer Feature & the add to DoNotCall List feature. Use this function if you have already uploaded your sound files on CallFire.com
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
callerid
|
1
|
1
|
true
|
xsd:string
|
The caller ID that should be presented on each call (10 digits)
|
numbers
|
1
|
1
|
true
|
xsd:ArrayOfString
|
10 digit phone numbers to call
|
transferNumber
|
1
|
1
|
true
|
xsd:string
|
10 digit phone number to transfer to
|
transferDigit
|
1
|
1
|
true
|
xsd:string
|
DTMF digit that will initiate the transfer
|
dncDigit
|
1
|
1
|
true
|
xsd:string
|
DTMF digit that will mark the call Do Not Call
|
laSoundFileId
|
1
|
1
|
false/td>
|
xsd:long
|
The ID of the sound file to play when the caller picks up the phone
|
answeringMachineFileId
|
1
|
1
|
false/td>
|
xsd:long
|
The ID of the sound file to play when the call goes to voicemail
|
transferFileId
|
1
|
1
|
false/td>
|
xsd:long
|
The ID of the sound file to play when the user presses the transfer digit
|
dncFileId/td>
|
1
|
1
|
false/td>
|
xsd:long
|
The ID of the sound file to play when the user presses Do Not Call digit
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
false
|
xsd:long
|
campaignid
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
string
string
string
string
string
string
string
string
string
7143
-7225
-979
-5415
Sample PHP Code
public function createBroadcastWithTransferDNC1($api_key, $caller_id, $phoneNumbers, $transfer_number, $transfer_digit, $dnc_digit, $liveanswerid, $ansmachineid, $transferfileid, $dncfileid, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$lines = file($phoneNumbers) or die('Unable to upload phone numbers');
foreach($lines as $line)
{
$pnumber['string'][] = $line;
}
$createBroadcastWithTransferDNCarray = array(
'key' => $api_key,
'callerid' => $caller_id,
'numbers' => $pnumber,
'transferNumber' => $transfer_number,
'transferDigit' => $transfer_digit,
'dncDigit' => $dnc_digit,
'laSoundFileId' => $liveanswerid,
'answeringMachineFileId' => $ansmachineid,
'transferFileId' => $transferfileid,
'dncFileId' => $dncfileid
);
try
{
$createBroadcastWithTransferDNCResponse1 = $campaignOutboundClient->createBroadcastWithTransferDNC1($createBroadcastWithTransferDNCarray);
$campaignId = $createBroadcastWithTransferDNCResponse1->out;
if($debug)
{
echo "CampaignID : ".$campaignId."";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."";
}
}
}
Sample C# Code
public long createBroadcastWithTransferDNCWithExistingSoundFiles(string key, string callerId, List numbers, string transferNumber,
string transferDigit, string dncDigit, long liveAnswerId, long answeringMachineId, long transferFileId,
long dncFileId)
{
LOG.Info("Entered createBroadcastWithTransferDNCWithExistingSoundFiles(string key, string callerId, List numbers, "
+ "string transferNumber, string transferDigit, string dncDigit, long liveAnswerId, long answeringMachineId, "
+ "long transferFileId, long dncFileId)");
try
{
long campaignId = this.campaignService.createBroadcastWithTransferDNC1(key, callerId, numbers.ToArray(),
transferNumber, transferDigit, dncDigit, liveAnswerId, answeringMachineId, transferFileId, dncFileId);
return campaignId;
}
finally
{
LOG.Info("Exited createBroadcastWithTransferDNCWithExistingSoundFiles(string key, string callerId, List numbers, "
+ "string transferNumber, string transferDigit, string dncDigit, long liveAnswerId, long answeringMachineId, "
+ "long transferFileId, long dncFileId))");
}
}
createBroadcastWithTransferDNCNoAMD
Use this function will create a broadcast list with the Call Transfer Feature & the add to DoNotCall List feature. This function does not have the Answering Machine Detection Feature. Use this function, if you want to upload the sound files from your system.
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
callerid
|
1
|
1
|
true
|
xsd:string
|
The caller ID that should be presented on each call (10 digits)
|
numbers
|
1
|
1
|
true
|
tns:ArrayOfString
|
10 digit phone numbers to call
|
transferNumber
|
1
|
1
|
true
|
xsd:string
|
10 digit phone number to transfer to
|
transferDigit
|
1
|
1
|
true
|
xsd:string
|
DTMF digit that will initiate the transfer
|
dncDigit
|
1
|
1
|
true
|
xsd:string
|
DTMF digit that will mark the call Do Not Call
|
liveAnswer
|
1
|
1
|
true
|
xsd:base64Binary
|
Binary sound file to play when the caller picks up the phone (WAV file 16 Bit 8kHz mono)
|
answeringMachine
|
1
|
1
|
true
|
xsd:base64Binary
|
Binary sound file to play when the call goes to voicemail (WAV file 16 Bit 8kHz mono)
|
transferFile
|
1
|
1
|
true
|
xsd:base64Binary
|
Binary sound file to play when the user presses the transfer digit (WAV file 16 Bit 8kHz mono)
|
dncFile
|
1
|
1
|
true
|
xsd:base64Binary
|
Binary sound file to play when the user presses Do Not Call digit (WAV file 16 Bit 8kHz mono)
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
false
|
xsd:long
|
campaignid
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
string
string
string
string
string
string
YTM0NZomIzI2OTsmIzM0NTueYQ==
YTM0NZomIzI2OTsmIzM0NTueYQ==
YTM0NZomIzI2OTsmIzM0NTueYQ==
YTM0NZomIzI2OTsmIzM0NTueYQ==
Sample PHP Code
public function createBroadcastWithTransferDNCNoAMD($api_key, $caller_id, $phoneNumbers, $transfer_number, $transfer_digit, $dnc_digit, $liveanswer, $ansmacfile, $transferfile, $dncfile, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$lines = file($phoneNumbers) or die('Unable to upload phone numbers');
foreach($lines as $line)
{
$pnumber['string'][] = $line;
}
//Converting the sound file to byte format
$handle = fopen($liveanswer,'r');
$contents = fread($handle,filesize($liveanswer));
$liveAnswer = $contents;
$handle2 = fopen($transferfile,'r');
$contents2 = fread($handle2,filesize($transferfile));
$transferFile = $contents2;
$handle3 = fopen($ansmacfile,'r');
$contents3 = fread($handle3,filesize($ansmacfile));
$ansmac = $contents3;
$handle4 = fopen($dncfile,'r');
$contents4 = fread($handle4,filesize($dncfile));
$dncfile1 = $contents4;
$createBroadcastWithTransferDNCNoAMDarray = array(
'key' => $api_key,
'callerid' => $caller_id,
'numbers' => $pnumber,
'transferNumber' => $transfer_number,
'transferDigit' => $transfer_digit,
'dncDigit' => $dnc_digit,
'liveAnswer' => $liveAnswer,
'answeringMachine' => $ansmac,
'transferFile' => $transferFile,
'dncFile' => $dncfile1
);
try
{
$createBroadcastWithTransferDNCNoAMDResponse = $campaignOutboundClient -> createBroadcastWithTransferDNCNoAMD($createBroadcastWithTransferDNCNoAMDarray);
$campaignId = $createBroadcastWithTransferDNCNoAMDResponse->out;
if($debug)
{
echo "CampaignID : ".$campaignId."";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."";
}
}
}
Sample C# Code
public long createBroadcastWithTransferDNCAndNoAMD(string key, string callerId, List numbers, string transferNumber,
string transferDigit, string dncDigit, byte[] liveAnswer, byte[] answeringMachine, byte[] transferFile,
byte[] dncFile)
{
LOG.Info("Entered createBroadcastWithTransferDNCAndNoAMD(string key, string callerId, List numbers, "
+ "string transferNumber, string transferDigit, string dncDigit, byte[] liveAnswer, byte[] answeringMachine, "
+ "byte[] transferFile, byte[] dncFile)");
try
{
long campaignId = this.campaignService.createBroadcastWithTransferDNCNoAMD(key, callerId, numbers.ToArray(),
transferNumber, transferDigit, dncDigit, liveAnswer, answeringMachine, transferFile, dncFile);
return campaignId;
}
finally
{
LOG.Info("Exited createBroadcastWithTransferDNCAndNoAMD(string key, string callerId, List numbers, "
+ "string transferNumber, string transferDigit, string dncDigit, byte[] liveAnswer, byte[] answeringMachine, "
+ "byte[] transferFile, byte[] dncFile)");
}
}
createBroadcastWithTransferDNCNoAMD1
This function will create a broadcast list with the Call Transfer Feature & the add to DoNotCall List feature. This function does not have the Answering Machine Detection Feature. Use this function, if you have already uploaded files on CallFire.com
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
callerid
|
1
|
1
|
true
|
xsd:string
|
The caller ID that should be presented on each call (10 digits)
|
numbers
|
1
|
1
|
true
|
tns:ArrayOfString
|
10 digit phone numbers to call
|
transferNumber
|
1
|
1
|
true
|
xsd:string
|
10 digit phone number to transfer to
|
transferDigit
|
1
|
1
|
true
|
xsd:string
|
DTMF digit that will initiate the transfer
|
dncDigit
|
1
|
1
|
true
|
xsd:string
|
DTMF digit that will mark the call Do Not Call
|
liveAnswer
|
1
|
1
|
true
|
xsd:long
|
The ID of the sound file to play when the caller picks up the phone
|
answeringMachine
|
1
|
1
|
true
|
xsd:long
|
The ID of the sound file to play when the call goes to voicemail
|
transferFile
|
1
|
1
|
true
|
xsd:long
|
The ID of the sound file to play when the user presses the transfer digit
|
dncFile
|
1
|
1
|
true
|
xsd:long
|
The ID of the sound file to play when the user presses Do Not Call digit
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
false
|
xsd:long
|
campaignid
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
string
string
string
string
string
string
-3497
-9374
6206
-8036
Sample PHP Code
Wsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$lines = file($phoneNumbers) or die('Unable to upload phone numbers');
foreach($lines as $line)
{
$pnumber['string'][] = $line;
}
$createBroadcastWithTransferDNCarray = array(
'key' => $api_key,
'callerid' => $caller_id,
'numbers' => $pnumber,
'transferNumber' => $transfer_number,
'transferDigit' => $transfer_digit,
'dncDigit' => $dnc_digit,
'liveAnswer' => $liveanswerid,
'answeringMachine' => '0',
'transferFile' => $transferfileid,
'dncFile' => $dncfileid
);
try
{
$createBroadcastWithTransferDNCResponse1 = $campaignOutboundClient -> createBroadcastWithTransferDNCNoAMD1($createBroadcastWithTransferDNCarray);
$campaignId = $createBroadcastWithTransferDNCResponse1->out;
if($debug)
{
echo "CampaignID : ".$campaignId."";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."";
}
}
}
Sample C# Code
public long createBroadcastWithTransferDNCAndNoAMDWithExistingSoundFiles(string key, string callerId, List numbers, string transferNumber, string transferDigit, string dncDigit, long liveAnswerId, long answeringMachineId, long transferFileId,long dncFileId)
{
LOG.Info("Entered createBroadcastWithTransferDNCAndNoAMDWithExistingSoundFiles(string key, string callerId, List numbers, "
+ "string transferNumber, string transferDigit, string dncDigit, long liveAnswerId, long answeringMachineId, "
+ "long transferFileId, long dncFileId)");
try
{
long campaignId = this.campaignService.createBroadcastWithTransferDNCNoAMD1(key, callerId, numbers.ToArray(),
transferNumber, transferDigit, dncDigit, liveAnswerId, answeringMachineId, transferFileId, dncFileId);
return campaignId;
}
finally
{
LOG.Info("Exited createBroadcastWithTransferDNCAndNoAMDWithExistingSoundFiles(string key, string callerId, List numbers, "
+ "string transferNumber, string transferDigit, string dncDigit, long liveAnswerId, long answeringMachineId, "
+ "long transferFileId, long dncFileId))");
}
}
createLiveAnswerNoDetect
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
callerid
|
1
|
1
|
true
|
xsd:string
|
The caller ID that should be presented on each call (10 digits)
|
name
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
mainSoundFile
|
1
|
1
|
true
|
xsd:long
|
|
fileForPress1
|
1
|
1
|
true
|
xsd:long
|
|
fileForPress2
|
1
|
1
|
true
|
xsd:long
|
|
numbers
|
1
|
1
|
true
|
tns:ArrayOfString
|
10 digit phone numbers to call
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
false
|
xsd:long
|
campaignid
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
string
string
-3824
-9141
6017
string
string
createReplicaCampaign
This function will create a copy of an existing campaign
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
campId
|
1
|
1
|
false
|
xsd:long
|
The campaign ID to start
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
false
|
xsd:long
|
campaignid
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
-6334
Sample PHP Code
public function createReplicaCampaign($api_key, $campid, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$createReplicaCampaignList = array(
'key' => $api_key,
'campId' => $campid
);
try
{
$createReplicaCampaignResponse = $campaignOutboundClient->createReplicaCampaign($createReplicaCampaignList);
$campaignId = $createReplicaCampaignResponse->out;
if($debug)
{
echo "CampaignID : ".$campaignId."";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."";
}
}
}
Sample C# Code
public long createReplicaCampaign(string key, long existingCampaignId)
{
LOG.Info("Entered createReplicaCampaign(string key, long existingCampaignId)");
try
{
long campaignId = this.campaignService.createReplicaCampaign(key, existingCampaignId);
return campaignId;
}
finally
{
LOG.Info("Exited createReplicaCampaign(string key, long existingCampaignId)");
}
}
createSingleQuestionPoll
This function will create a broadcast to the phone numbers you specify, it allows customers to select one of three options. The sound file provided will be played back to live pickups and be left as a message on answering machines. On live answer, the user can select one of the digits that are valid and the response will be recorded as a "callstatus" string you specify.
-
Live Answer and Answering Machine Detection
-
Leave different messages for Live Answer and Answering Machine
-
Detect any 3 digits from the user to mark the call with a callstatus
-
Specifiy the string to mark the callstatus field for the digit pressed.
-
(ex. press 1 and set the callstatus to "ACCEPTED")
-
Playback a file when user chooses one of the digits
-
Use your own Callerid
-
Campaign DOES NOT start automatically
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
callerid
|
1
|
1
|
true
|
xsd:string
|
The caller ID that should be presented on each call (10 digits)
|
numbers
|
1
|
1
|
true
|
tns:ArrayOfString
|
10 digit phone numbers to call
|
dncDigit
|
1
|
1
|
true
|
xsd:string
|
DTMF digit that will mark the call Do Not Call
|
lafile
|
1
|
1
|
true
|
xsd:base64Binary
|
Binary sound file to play when the caller picks up the phone (WAV file 16 Bit 8kHz mono)
|
amfile
|
1
|
1
|
true
|
xsd:base64Binary
|
Binary sound file to play when the call goes to voicemail (WAV file 16 Bit 8kHz mono)
|
dncfile
|
1
|
1
|
true
|
xsd:base64Binary
|
Binary sound file to play when the user presses Do Not Call digit (WAV file 16 Bit 8kHz mono)
|
poll1File
|
1
|
1
|
true
|
xsd:base64Binary
|
Binary sound file to be played when the user presses the poll1Digit. (WAV file 16 Bit 8kHz mono)
|
poll2File
|
1
|
1
|
true
|
xsd:base64Binary
|
Binary sound file to be played when the user presses the poll2Digit. (WAV file 16 Bit 8kHz mono)
|
poll3File
|
1
|
1
|
true
|
xsd:base64Binary
|
Binary sound file to be played when the user presses the poll3Digit. (WAV file 16 Bit 8kHz mono)
|
poll1Value
|
1
|
1
|
true
|
xsd:string
|
DTMF digit that will initiate the poll1File to be played and the poll1Value to be set
|
poll2Value
|
1
|
1
|
true
|
xsd:string
|
DTMF digit that will initiate the poll2File to be played and the poll2Value to be set
|
poll3Value
|
1
|
1
|
true
|
xsd:string
|
DTMF digit that will initiate the poll3File to be played and the poll3Value to be set
|
poll1Digit
|
1
|
1
|
true
|
xsd:string
|
String that should be used to mark the "status" field when pressing poll1Digit
|
poll2Digit
|
1
|
1
|
true
|
xsd:string
|
String that should be used to mark the "status" field when pressing poll2Digit
|
poll3Digit
|
1
|
1
|
true
|
xsd:string
|
String that should be used to mark the "status" field when pressing poll3Digit
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
false
|
xsd:long
|
campaignid
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
string
string
string
string
YTM0NZomIzI2OTsmIzM0NTueYQ==
YTM0NZomIzI2OTsmIzM0NTueYQ==
YTM0NZomIzI2OTsmIzM0NTueYQ==
YTM0NZomIzI2OTsmIzM0NTueYQ==
YTM0NZomIzI2OTsmIzM0NTueYQ==
YTM0NZomIzI2OTsmIzM0NTueYQ==
string
string
string
string
string
string
Sample PHP Code
public function createSingleQuestionPoll($api_key, $caller_id, $phoneNumbers, $dncDigit, $la_file, $am_file, $dnc_file, $poll1_file, $poll2_file, $poll3_file
, $poll1Value, $poll2Value, $poll3Value, $poll1Digit, $poll2Digit, $poll3Digit, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$lines = file($phoneNumbers) or die('Unable to upload phone numbers');
foreach($lines as $line)
{
$pnumber['string'][] = $line;
}
//Converting the sound file to byte format
$handle = fopen($la_file,'r');
$contents = fread($handle,filesize($la_file));
$lafile = $contents;
$handle1 = fopen($am_file,'r');
$contents1 = fread($handle1,filesize($am_file));
$amfile = $contents1;
$handle2 = fopen($dnc_file,'r');
$contents2 = fread($handle2,filesize($dnc_file));
$dncfile = $contents2;
$handle3 = fopen($poll1_file,'r');
$contents3 = fread($handle3,filesize($poll1_file));
$poll1File = $contents3;
$handle4 = fopen($poll2_file,'r');
$contents4 = fread($handle4,filesize($poll2_file));
$poll2File = $contents4;
$handle5 = fopen($poll3_file,'r');
$contents5 = fread($handle5,filesize($poll3_file));
$poll3File = $contents5;
$createSingleQuestionArray = array(
'key' => $api_key,
'callerid' => $caller_id,
'numbers' => $pnumber,
'dncDigit' => $dncDigit,
'lafile' => $lafile,
'amfile' => $amfile,
'dncfile' => $dncfile,
'poll1File' => $poll1File,
'poll2File' => $poll2File ,
'poll3File' => $poll3File,
'poll1Value' => $poll1Value,
'poll2Value' => $poll2Value,
'poll3Value' => $poll3Value,
'poll1Digit' => $poll1Digit,
'poll2Digit' => $poll2Digit,
'poll3Digit' => $poll3Digit
);
try
{
$createSingleQuestionPollResponse = $campaignOutboundClient->createSingleQuestionPoll($createSingleQuestionArray);
$campaignId = $createSingleQuestionPollResponse->out;
if($debug)
{
echo "CampaignID : ".$campaignId."";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."";
}
}
}
Sample C# Code
public long createSingleQuestionPoll(string key, string callerId, List numbers, string dncDigit,
byte[] liveAnswer, byte[] answeringMachine, byte[] dncFile, byte[] poll1File, byte[] poll2File, byte[] poll3File,
string poll1Value, string poll2Value, string poll3Value, string poll1Digit, string poll2Digit, string poll3Digit)
{
LOG.Info("Entered createSingleQuestionPoll(string key, string callerId, List numbers, string dncDigit, "
+ "byte[] liveAnswer, byte[] answeringMachine, byte[] dncFile, byte[] poll1File, byte[] poll2File, byte[] poll3File, "
+ "string poll1Value, string poll2Value, string poll3Value, string poll1Digit, string poll2Digit, string poll3Digit)");
try
{
long campaignId = this.campaignService.creategenerateSingleQuestionPoll(key, callerId, numbers.ToArray(),
dncDigit, liveAnswer, answeringMachine, dncFile, poll1File, poll2File, poll3File,
poll1Value, poll2Value, poll3Value, poll1Digit, poll2Digit, poll3Digit);
return campaignId;
}
finally
{
LOG.Info("Exited createSingleQuestionPoll(string key, string callerId, List numbers, string dncDigit, "
+ "byte[] liveAnswer, byte[] answeringMachine, byte[] dncFile, byte[] poll1File, byte[] poll2File, byte[] poll3File, "
+ "string poll1Value, string poll2Value, string poll3Value, string poll1Digit, string poll2Digit, string poll3Digit)");
}
}
createSimpleTTSCampaign
This function is used to create a text to speech campaign.
Parameters
Parameter name
|
Required
|
Description
|
api_key
|
Y
|
The API key that is registered with your account
|
name
|
Y
|
Name of the campaign
|
callerid
|
Y
|
The caller ID that should be presented on each call (10 digits)
|
phoneNumbers
|
Y
|
10 digit phone numbers to call
|
message
|
Y
|
The message that you want to be played to the list of phone numbers
|
Sample PHP Code
public function createSimpleTTSCampaign($api_key, $name, $callerid, $phoneNumbers, $message, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$lines = file($phoneNumbers) or die('Unable to upload phone numbers');
foreach($lines as $line)
{
$pnumber['string'][] = $line;
}
$createSimpleTTSCampaignParams = array(
'key' => $api_key,
'name' => $name,
'callerid' => $callerid,
'numbers' => $pnumber,
'message' => $message
);
try
{
$createSimpleTTSCampaignResponse = $campaignOutboundClient->createSimpleTTSCampaign($createSimpleTTSCampaignParams);
$campaignId = $createSimpleTTSCampaignResponse->out;
if($debug)
{
echo "CampaignID : ".$campaignId."
";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."
";
}
}
}
getCampaignByName
This function will return all campaigns that match the name passed in. This can be used to retrieve your campaigns by their name.
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
campaignName
|
1
|
1
|
true
|
xsd:string
|
Name of the campaign
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
true
|
tns:ArrayOfCampaignType
|
An array of Campaign Type
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
string
Sample PHP Code
public function getCampaignByName($api_key, $campaignname, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$getCampaignByNamearray = array (
'key' => $api_key,
'campaignName' => $campaignname
);
try
{
$getCampaignBynameResponse = $campaignOutboundClient->getCampaignByName($getCampaignByNamearray);
$getCampaignBynameDetails = $getCampaignBynameResponse->out;
if($debug)
{
echo "<table border='1'><tr><td>busy</td> <td>campaignId</td> <td>dialed</td> <td>doNotCall</td> <td>error</td> <td>live</td> <td>misc</td> <td>name</td> <td>noAnswer</td> <td>status</td> <td>total</td> <td>transfer</td> <td>type</td></tr>";
foreach($getCampaignBynameDetails->CampaignType as $line)
{
echo "<tr>";
echo "<td>" . $line->busy . "</td>";
echo "<td>" . $line->campaignId . "</td>";
echo "<td>" . $line->dialed . "</td>";
echo "<td>" . $line->doNotCall . "</td>";
echo "<td>" . $line->error . "</td>";
echo "<td>" . $line->live . "</td>";
echo "<td>" . $line->misc . "</td>";
echo "<td>" . $line->name . "</td>";
echo "<td>" . $line->noAnswer . "</td>";
echo "<td>" . $line->status . "</td>";
echo "<td>" . $line->total . "</td>";
echo "<td>" . $line->transfer . "</td>";
echo "<td>" . $line->type . "</td>";
echo "</tr>";
}
echo "</table>";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."";
}
}
}
Sample C# Code
public CampaignType[] getCampaignByName(string key, string campaignName)
{
LOG.Info("Entered getCampaignByName(string key, string campaignName)");
try
{
CampaignType[] campaignTypeArray = this.campaignService.getCampaignByName(key, campaignName);
return campaignTypeArray;
}
finally
{
LOG.Info("Exited getCampaignByName(string key, string campaignName)");
}
}
getCampaignIDs
This function will return all campaigns that match the id passed in. This can be used to retrieve your campaigns by their id's.
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
acctid
|
1
|
1
|
true
|
xsd:string
|
This is your account id
|
msgid
|
1
|
1
|
true
|
xsd:string
|
This is the message id
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
true
|
tns:ArrayOfLong
|
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
string
string
Sample PHP Code
public function getCampaignIDs($api_key, $acctid, $msgid, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$getCampaignIDsArray = array (
'key' => $api_key,
'acctid' => $acctid,
'msgid' => $msgid
);
try
{
$getCampaignIDsResponse = $campaignOutboundClient->getCampaignIDs($getCampaignIDsArray);
$getCampaignIDsDetails = $getCampaignIDsResponse->out;
if($debug)
{
print_r($getCampaignIDsDetails);
//print_r( $getCampaignstatsDetails[$name]);
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."";
}
}
}
Sample C# Code
public long[] getCampaignIds(string key, string acctId, string msgId)
{
LOG.Info("Entered getCampaignIds(string key, string acctId, string msgId)");
try
{
long[] campaignIdArray = this.campaignService.getCampaignIDs(key, acctId, msgId);
return campaignIdArray;
}
finally
{
LOG.Info("Exited getCampaignIds(string key, string acctId, string msgId)");
}
}
getCampaignStats
Use this function to return the statistics for a campaign. The statistics will include the following information ::
-
campaignId — The callfire unique id for the campaign
-
name — The name of the campaign
-
type — The type of campaign
-
status — The current state of the campaign (Running, Stopped, Finished, Cancelled)
-
total — The total calls in the campaign
-
dialed — The total dialed in the campaign
-
live — The total live answer in the campaign
-
answeringMachine — The total Answering Machine in the campaign
-
noAnswer — The total No Answers in teh campaign
-
doNotCall — The total DNC marked in the campaign
-
busy — The total Busy in the campaign
-
transfer — The total transfers in the campaign
-
error — The total calls that were Error's
-
misc — The total calls that faced a CallFire system error.
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
campaignId
|
1
|
1
|
false
|
xsd:long
|
The campaign ID to start
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
true
|
xsd:long
|
tns:CampaignType
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
-3916
Example Response
-
-
-
-0
-0
-1123231
-0
-0
-0
-0
-0
-csdfsd api
-0
-Running
-2
-0
-CallCenterConnect
Sample PHP Code
public function getCampaignStats($api_key, $campaign_id, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$getCampaignstatsArray = array (
'key' => $api_key,
'campaignId' => $campaign_id
);
$campaigntype = new CampaignType();
try
{
$getCampaignStatsResponse = $campaignOutboundClient->getCampaignStats($getCampaignstatsArray);
$getCampaignstatsDetails = $getCampaignStatsResponse->out;
if($debug)
{
echo "<b>Campaign Statistics</b>";
echo "answeringMachine : ".$getCampaignstatsDetails->answeringMachine;
echo "busy : ".$getCampaignstatsDetails->busy;
echo "campaignId : ".$getCampaignstatsDetails->campaignId;
echo "dialed : ".$getCampaignstatsDetails->dialed;
echo "doNotCall : ".$getCampaignstatsDetails->doNotCall;
echo "error : ".$getCampaignstatsDetails->error;
echo "live : ".$getCampaignstatsDetails->live;
echo "misc : ".$getCampaignstatsDetails->misc;
echo "name : ".$getCampaignstatsDetails->name;
echo "noAnswer : ".$getCampaignstatsDetails->noAnswer;
echo "status : ".$getCampaignstatsDetails->status;
echo "total : ".$getCampaignstatsDetails->total;
echo "transfer : ".$getCampaignstatsDetails->transfer;
echo "type : ".$getCampaignstatsDetails->type;
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."";
}
}
}
Sample C# Code
public CampaignType getCampaignStats(string key, long campaignId)
{
LOG.Info("Entered getCampaignStats(string key, long campaignId)");
try
{
CampaignType campaignType = this.campaignService.getCampaignStats(key, campaignId);
return campaignType;
}
finally
{
LOG.Info("Exited getCampaignStats(string key, long campaignId)");
}
}
getFullCampaignList
Returns a list of all your campaigns and their statistics.
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
false
|
tns:ArrayOfCampaignType
|
An array of CampaignType
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
Example Response
-
-
-
-
-0
-0
-1091867
-0
-0
-0
-0
-0
-api no AMD TTS campaign Fri Jun 04 18:33:43 PDT 2010
-0
-New
-2
-0
-Threshold
Sample PHP Code
public function getFullCampaignList($api_key, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$getFullCampaignListArray = array (
'key' => $api_key
);
try
{
$getFullCampaignlistResponse = $campaignOutboundClient->getFullCampaignList($getFullCampaignListArray);
$getFullCampaignDetails = $getFullCampaignlistResponse->out;
if($debug)
{
echo "<table border=1><tr><td>busy</td><td>campaignId</td><td>dialed</td><td>doNotCall</td><td>error</td><td>live</td><td>misc</td><td>name</td><td>noAnswer</td><td>status</td><td>total</td><td>transfer</td><td>type</td></tr>";
foreach($getFullCampaignDetails->CampaignType as $line)
{
echo "<tr>";
echo "<td>" . $line->busy . "</td>";
echo "<td>" . $line->campaignId . "</td>";
echo "<td>" . $line->dialed . "</td>";
echo "<td>" . $line->doNotCall . "</td>";
echo "<td>" . $line->error . "</td>";
echo "<td>" . $line->live . "</td>";
echo "<td>" . $line->misc . "</td>";
echo "<td>" . $line->name . "</td>";
echo "<td>" . $line->noAnswer . "</td>";
echo "<td>" . $line->status . "</td>";
echo "<td>" . $line->total . "</td>";
echo "<td>" . $line->transfer . "</td>";
echo "<td>" . $line->type . "</td>";
echo "</tr>";
}
echo "</table>";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error . "";
}
}
}
Sample C# Code
public CampaignType[] getFullCampaignList(string key)
{
LOG.Info("Entered getFullCampaignList(string key)");
try
{
CampaignType[] campaignTypeArray = this.campaignService.getFullCampaignList(key);
return campaignTypeArray;
}
finally
{
LOG.Info("Exited getFullCampaignList(string key)");
}
}
getMinuteBalance
This function will return the available balance (in minutes) in your account
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
true
|
xsd:string
|
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
Example Response
-
-
-2,629
Sample PHP Code
public function getMinuteBalance($api_key, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$getMinutebalanceArray = array (
'key' => $api_key
);
print_r($getMinutebalanceArray);
try
{
$getMinuteBalanceResponse = $campaignOutboundClient->getMinuteBalance($getMinutebalanceArray);
$getBalanceDetails = $getMinuteBalanceResponse->out;
if($debug)
{
echo "Your Current Minute Balance is ".$getBalanceDetails;
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."";
}
}
}
Sample C# Code
public string getMinuteBalance(string key)
{
LOG.Info("Entered getMinuteBalance(string key)");
try
{
string balance = this.campaignService.getMinuteBalance(key);
return balance;
}
finally
{
LOG.Info("Exited getMinuteBalance(string key)");
}
}
getRunningCampaignList
Returns a list of Running Campaigns and their statistics.
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
true
|
tns:ArrayOfCampaignType
|
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
Example Response
-
-
-
-
-0
-0
-1123231
-0
-0
-0
-0
-0
-csdfsd api
-0
-Running
-2
-0
-CallCenterConnect
Sample PHP Code
public function getRunningCampaignList($api_key, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$getRunningCampaignListArray = array (
'key' => $api_key
);
try
{
$getRunningCampaignResponse = $campaignOutboundClient->getRunningCampaignList($getRunningCampaignListArray);
$getCampaignDetails = $getRunningCampaignResponse->out;
if($debug)
{
echo "<table border=1><tr><td>busy</td><td>campaignId</td><td>dialed</td><td>doNotCall</td><td>error</td><td>live</td><td>misc</td><td>name</td><td>noAnswer</td><td>status</td><td>total</td><td>transfer</td><td>type</td></tr>";
foreach($getCampaignDetails->CampaignType as $line)
{
echo "<tr>";
echo "<td>" . $line->busy . "</td>";
echo "<td>" . $line->campaignId . "</td>";
echo "<td>" . $line->dialed . "</td>";
echo "<td>" . $line->doNotCall . "</td>";
echo "<td>" . $line->error . "</td>";
echo "<td>" . $line->live . "</td>";
echo "<td>" . $line->misc . "</td>";
echo "<td>" . $line->name . "</td>";
echo "<td>" . $line->noAnswer . "</td>";
echo "<td>" . $line->status . "</td>";
echo "<td>" . $line->total . "</td>";
echo "<td>" . $line->transfer . "</td>";
echo "<td>" . $line->type . "</td>";
echo "</tr>";
}
echo "</table>";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."";
}
}
}
Sample C# Code
public CampaignType[] getRunningCampaignList(string key)
{
LOG.Info("Entered getRunningCampaignList(string key)");
try
{
CampaignType[] campaignTypeArray = this.campaignService.getRunningCampaignList(key);
return campaignTypeArray;
}
finally
{
LOG.Info("Exited getRunningCampaignList(string key)");
}
}
sendBroadcastToList
This function will allow you to send a broadcast out to the phone numbers you specify. The sound file provided will be played back to live pickups and be left as a message on answering machines.
Warning: This function will automatically start the campaign! Only call this if you are ready to broadcast right away.
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
callerid
|
1
|
1
|
true
|
xsd:string
|
The caller ID that should be presented on each call (10 digits)
|
numbers
|
1
|
1
|
true
|
tns:ArrayOfString
|
10 digit phone numbers to call
|
soundFile
|
1
|
1
|
true
|
xsd:base64Binary
|
Binary sound file to play (WAV file 16 Bit 8kHz mono)
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
true
|
xsd:long
|
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
string
string
string
string
string
YTM0NZomIzI2OTsmIzM0NTueYQ==
Sample PHP Code
public function sendBroadcastToList($api_key, $caller_id, $phoneNumbers, $sound_file, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$lines = file($phoneNumbers) or die('Unable to upload phone numbers');
foreach($lines as $line)
{
$pnumber['string'][] = $line;
}
//Converting the sound files to byte format
$handle = fopen($sound_file,'r');
$contents = fread($handle,filesize($sound_file));
$soundFile = $contents;
$broadcastarray = array(
'key' => $api_key,
'callerid' => $caller_id,
'numbers' => $pnumber,
'soundFile' => $sound_file
);
try
{
$sendBroadcasttoListResponse = $campaignOutboundClient->sendBroadcastToList($broadcastarray);
$campaignId = $sendBroadcasttoListResponse->out;
if($debug)
{
echo "CampaignID : " . $campaignId . "<br/>";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error . "<br/>";
}
}
}
Sample C# Code
public long sendBroadcastToList(string key, string callerId, string[] numbers, byte[] soundFile)
{
// LOG.Info("Entered sendBroadcastToList(string key, string callerId, string[] numbers, byte[] soundFile)");
try
{
long broadcastId = this.campaignService.sendBroadcastToList(key, callerId, numbers, soundFile);
return broadcastId;
}
finally
{
// LOG.Info("Exited sendBroadcastToList(string key, string callerId, string[] numbers, byte[] soundFile)");
}
}
sendBroadcastToList1
This function will allow you to send a broadcast out to the phone numbers you specify. The sound file provided will be played back to live pickups and be left as a message on answering machines.
Warning: This function will automatically start the campaign!. Only call this if you are ready to broadcast right away.
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
callerid
|
1
|
1
|
true
|
xsd:string
|
The caller ID that should be presented on each call (10 digits)
|
listid
|
1
|
1
|
true
|
xsd:long
|
|
soundFile
|
1
|
1
|
true
|
xsd:base64Binary
|
Binary sound file to play (WAV file 16 Bit 8kHz mono)
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
true
|
xsd:long
|
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
string
-3210
YTM0NZomIzI2OTsmIzM0NTueYQ==
Sample PHP Code
public function sendBroadcastToList1($api_key, $caller_id, $list_id, $sound_file, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
//Converting the sound files to byte format
$handle = fopen($sound_file,'r');
$contents = fread($handle,filesize($sound_file));
$soundFile = $contents;
$broadcastarray = array(
'key' => $api_key,
'callerid' => $caller_id,
'listid' => $list_id,
'soundFile' => $sound_file
);
try
{
$sendBroadcasttoListResponse = $campaignOutboundClient->sendBroadcastToList1($broadcastarray);
$campaignId = $sendBroadcasttoListResponse->out;
if($debug)
{
echo "CampaignID : ".$campaignId."
";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."
";
}
}
}
Sample C# Code
public long sendBroadcastToList1(string key, string callerId, long listId, byte[] soundFile)
{
//LOG.Info("Entered sendBroadcastToList1(string key, string callerId, long listId, byte[] soundFile)");
try
{
long broadcastId = this.campaignService.sendBroadcastToList1(key, callerId, listId, soundFile);
return broadcastId;
}
finally
{
//LOG.Info("Exited sendBroadcastToList1(string key, string callerId, long listId, byte[] soundFile)");
}
}
sendBroadcastToList2
This function will allow you to send a broadcast out to the phone numbers you specify. The sound file provided will be played back to live pickups and be left as a message on answering machines.
Warning: This function will automatically start the campaign! Only call this if you are ready to broadcast right away.
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
callerid
|
1
|
true
|
1
|
xsd:string
|
The caller ID that should be presented on each call (10 digits)
|
numbers
|
1
|
1
|
true
|
tns:ArrayOfString
|
10 digit phone numbers to call
|
soundFile
|
1
|
1
|
true
|
xsd:base64Binary
|
Binary sound file to play (WAV file 16 Bit 8kHz mono)
|
name
|
1
|
1
|
true
|
xsd:string
|
Name of the campaign
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
false
|
xsd:long
|
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
string
string
string
string
string
YTM0NZomIzI2OTsmIzM0NTueYQ==
string
Sample PHP Code
public function sendBroadcastToList2($api_key, $caller_id, $phoneNumbers, $sound_file, $name, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$lines = file($phoneNumbers) or die('Unable to upload phone numbers');
foreach($lines as $line)
{
$pnumber['string'][] = $line;
}
//Converting the sound files to byte format
$handle = fopen($sound_file,'r');
$contents = fread($handle,filesize($sound_file));
$soundFile = $contents;
$broadcastarray = array(
'key' => $api_key,
'callerid' => $caller_id,
'numbers' => $pnumber,
'soundFile' => $soundFile,
'name' => $name
);
try
{
$sendBroadcasttoListResponse = $campaignOutboundClient->sendBroadcastToList2($broadcastarray);
$campaignId = $sendBroadcasttoListResponse->out;
if($debug)
{
echo "CampaignID : " . $campaignId . "";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error . "";
}
}
}
Sample C# Code
public long sendBroadcastToList2(string key, string callerId, string[] numbers, byte[] soundFile, string name)
{
LOG.Info("Entered sendBroadcastToList2(string key, string callerId, string[] numbers, byte[] soundFile, string name)");
try
{
long broadcastId = this.campaignService.sendBroadcastToList2(key, callerId, numbers, soundFile, name);
return broadcastId;
}
finally
{
LOG.Info("Exited sendBroadcastToList2(string key, string callerId, string[] numbers, byte[] soundFile, string name)");
}
}
sendBroadcastToListWithSoundId
This function will allow you to send a broadcast out to the phone numbers you specify. The sound file provided will be played back to live pickups and be left as a message on answering machines.
Warning: This function will automatically start the campaign! Only call this if you are ready to broadcast right away.
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
callerid
|
1
|
1
|
true
|
xsd:string
|
The caller ID that should be presented on each call (10 digits)
|
numbers
|
1
|
1
|
true
|
tns:ArrayOfString
|
10 digit phone numbers to call
|
soundFile
|
1
|
1
|
false
|
xsd:long
|
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
false
|
xsd:long
|
campaignid
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
string
string
string
-9742
Sample PHP Code
public function sendBroadcastToListWithSoundId($api_key, $caller_id, $phoneNumbers, $sound_file, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$lines = file($phoneNumbers) or die('Unable to upload phone numbers');
foreach($lines as $line)
{
$pnumber['string'][] = $line;
}
$broadcastarray = array(
'key' => $api_key,
'callerid' => $caller_id,
'numbers' => $pnumber,
'soundFile' => $sound_file
);
try
{
$sendBroadcasttoListwithSoundIDResponse = $campaignOutboundClient->sendBroadcastToListWithSoundId($broadcastarray);
$campaignId = $sendBroadcasttoListwithSoundIDResponse->out;
if($debug)
{
echo "CampaignID : ".$campaignId."";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error . "";
}
}
}
Sample C# Code
public long sendBroadcastToListWithExistingSoundFile(string key, string callerId, string[] numbers, long soundFile)
{
LOG.Info("Entered sendBroadcastToListWithExistingSoundFile(string key, string callerId, string[] numbers,long soundFile)");
try
{
long broadcastId = this.campaignService.sendBroadcastToListWithSoundId(key, callerId, numbers, soundFile);
return broadcastId;
}
finally
{
LOG.Info("Exited sendBroadcastToListWithExistingSoundFile(string key, string callerId, string[] numbers, long soundFile)");
}
}
sendCallForCampaign
This function sends a single call out immediately. The call will follow the design of the campaign specified and be included in campaign stats
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
campaignId
|
1
|
1
|
false
|
xsd:long
|
The campaign ID to start
|
key
|
1
|
1
|
true
|
xsd:string
|
The phone number that you wish to call
|
moreData
|
1
|
1
|
true
|
xsd:ArrayOfString
|
Additional data that you may have
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
-3447
string
string
string
string
string
string
Sample PHP Code
public function sendCallForCampaign($api_key, $campaign_id, $phoneNumber, $moreData, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$sendcallarray = array(
'key' => $api_key,
'campaignId' => $campaign_id,
'number' => $phoneNumber,
'moreData' => $moreData
);
try
{
$sendCallForCampaignResponse = $campaignOutboundClient->sendCallForCampaign($sendcallarray);
$campaignId = $sendCallForCampaignResponse->out;
if($debug)
{
echo "CampaignID : ".$campaignId."";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error . "";
}
}
}
Sample C# Code
public void sendCallForCampaign(string key, long campaignId, string number, string[] moreData)
{
LOG.Info("Entered sendCallForCampaign(string key, long campaignId, string number, string[] moreData)");
try
{
this.campaignService.sendCallForCampaign(key, campaignId, number, moreData);
}
finally
{
LOG.Info("Exited sendCallForCampaign(string key, long campaignId, string number, string[] moreData)");
}
}
sendSingleBridgeCall
This function sends a single call out immediately with the ability to have the transfer option to an extension number. The call will follow the design of the campaign specified and be included in campaign stats
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
callerid
|
1
|
1
|
true
|
xsd:string
|
The caller ID that should be presented on each call (10 digits)
|
agentNumber
|
1
|
1
|
true
|
xsd:string
|
The agent's phone number
|
extension
|
1
|
1
|
true
|
xsd:string
|
The extension number of the agent
|
transfer
|
1
|
1
|
true
|
xsd:string
|
The number that the call will be connected to
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
false
|
xsd:long
|
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
string
string
string
string
Sample PHP Code
public function sendSingleBridgeCall($api_key, $caller_id, $agentNumber, $extension, $transfer, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$sendSingleBridgeCallarray = array(
'key' => $api_key,
'callerid' => $caller_id,
'agentNumber' => $agentnumber,
'extension' => $extension,
'transfer' => $transfer
);
try
{
$sendSinglebridgeCallResponse = $campaignOutboundClient->sendSingleBridgeCall($sendSingleBridgeCallarray);
$campaignId = $sendSinglebridgeCallResponse->out;
if($debug)
{
echo "CampaignID : ".$campaignId."";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error . "";
}
}
}
Sample C# Code
public long sendSingleBridgeCall(string key, string callerId, string agentNumber, string extension, string transfer)
{
LOG.Info("Entered sendSingleBridgeCall(string key, string callerId, string agentNumber, string extension, string transfer)");
try
{
long broadcastId = this.campaignService.sendSingleBridgeCall(key, callerId, agentNumber, extension, transfer);
return broadcastId;
}
finally
{
LOG.Info("Exited sendSingleBridgeCall(string key, string callerId, string agentNumber, string extension, string transfer)");
}
}
sendSingleCallCampaign
This function sends a single call out immediately. The call will follow the design of the campaign specified and be included in campaign stats.
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
callerid
|
1
|
1
|
true
|
xsd:string
|
The caller ID that should be presented on each call (10 digits)
|
number
|
1
|
1
|
true
|
xsd:string
|
The phone number that you wish to call
|
soundFile
|
1
|
1
|
true
|
xsd:base64Binary
|
Binary sound file to play (WAV file 16 Bit 8kHz mono)
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
false
|
xsd:long
|
campaignid
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
string
string
YTM0NZomIzI2OTsmIzM0NTueYQ==
Sample PHP Code
public function sendSingleCallCampaign($api_key, $caller_id, $number, $sound_file, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
//Converting the sound files to byte format
$handle = fopen($sound_file,'r');
$contents = fread($handle,filesize($sound_file));
$soundFile = $contents;
$sendSingleCallCampaignarray = array(
'key' => $api_key,
'callerid' => $caller_id,
'number' => $number,
'soundFile' => $soundFile
);
try
{
$sendSingleCallcampaignResponse = $campaignOutboundClient->sendSingleCallCampaign($sendSingleCallCampaignarray);
$campaignId = $sendSingleCallcampaignResponse->out;
if($debug)
{
echo "CampaignID : ".$campaignId."";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error . "";
}
}
}
Sample C# Code
public long sendSingleCallCampaign(string key, string callerId, string number, byte[] soundFile)
{
LOG.Info("Entered sendSingleCallCampaign(string key, string callerId, string number, byte[] soundFile)");
try
{
long broadcastId = this.campaignService.sendSingleCallCampaign(key, callerId, number, soundFile);
return broadcastId;
}
finally
{
LOG.Info("Exited sendSingleCallCampaign(string key, string callerId, string number, byte[] soundFile)");
}
}
deleteCallsByNumber
Use this function to delete numbers from the list of those which have not yet been called.
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
false
|
xsd:string
|
The API key that is registered with your account
|
campaignId
|
1
|
1
|
false
|
xsd:long
|
The campaign ID to remove the numbers from
|
phonenumber
|
1
|
1
|
false
|
xsd:long
|
The phone number whose undialed calls will be removed from the campaign
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
false
|
xsd:string
|
Describes whether or not numbers were sucessfully removed
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
12345
8005551212
Example Response
Deleted 1 call record.
Sample PHP Code
public function deleteCallsByNumber($api_key, $campaign_id, $phonenumber, $debug)
{
$wsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$client = new SoapClient($wsdl,array('trace' => true));
$params = array (
'key' => $api_key,
'campaignId' => $campaign_id,
'phonenumber' => $phonenumber
);
try
{
$response = $client->deleteCallsByNumber($params);
$response = $deleteCampaignResponse->out;
if($debug)
{
echo "$response\n";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error . "
";
}
}
}
Sample C# Code
public string deleteCallsByNumber(string key, long campaignId, string phonenumber)
{
LOG.Info("Entered deleteCallsByNumber(string key, long campaignId, string phonenumber)");
try
{
string status = this.campaignService.deleteCallsByNumber(key, campaignId, phonenumber);
return status;
}
finally
{
LOG.Info("Exited deleteCampaign(string key, long campaignId, string phonenumber)");
}
}
deleteCampaign
Description
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
campaignId
|
1
|
1
|
false
|
xsd:long
|
The ID of the campaign to delete
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
false
|
xsd:long
|
campaignid
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
363
Sample PHP Code
public function deleteCampaign($api_key, $campaign_id, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$deleteCampaignArray = array (
'key' => $api_key,
'campaignId' => $campaign_id
);
try
{
$deleteCampaignResponse = $campaignOutboundClient->deleteCampaign($deleteCampaignArray);
$deleteCampaignId = $deleteCampaignResponse->out;
if($debug)
{
echo "Campaign # ID ".$campaign_id ." successfully deleted..";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error . "
";
}
}
}
Sample C# Code
public string deleteCampaign(string key, long campaignId)
{
LOG.Info("Entered deleteCampaign(string key, long campaignId)");
try
{
string status = this.campaignService.deleteCampaign(key, campaignId);
return status;
}
finally
{
LOG.Info("Exited deleteCampaign(string key, long campaignId)");
}
}
useAnsweringMachineDetectionType2
Description
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
campaignId
|
1
|
1
|
false
|
xsd:long
|
The campaign ID to change to the new Answering Machine detection
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
false
|
xsd:void
|
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
363
scrubCampaign
When you decide to scrub a campaign, what that does is before sending out calls corresponding to a campaign, CallFire compares the numbers in your campaign with the one's in the Do Not Call List. If there is a match, then that number is not called.
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
parameter name
|
1
|
1
|
true
|
xsd:string
|
The campaign id that you want to scrub the numbers from the DoNotCall(DNC) List
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
8499
Sample PHP Code
public function scrubCampaign($api_key, $campaign_id, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$scrubCampaignArray = array (
'key' => $api_key,
'campaignId' => $campaign_id
);
try
{
$scrubCampaignResponse = $campaignOutboundClient->scrubCampaign($scrubCampaignArray);
$scrub = $scrubCampaignResponse->out;
if($debug)
{
echo "Scrub Campaign Success";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error . "
";
}
}
}
Sample C# Code
public void scrubCampaign(string key, long campaignId)
{
//LOG.Info("Entered scrubCampaign(string key, long campaignId)");
try
{
this.campaignService.scrubCampaign(key, campaignId);
}
finally
{
//LOG.Info("Exited scrubCampaign(string key, long campaignId)");
}
}
startCampaign
Use this function to start a campaign that you created or stopped in the past.
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
campaignId
|
1
|
1
|
false
|
xsd:long
|
The campaign ID to start
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
false
|
xsd:string
|
"success"
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
6070
Sample PHP Code
public function startCampaign($api_key, $campaign_id, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$startCampaignArray = array (
'key' => $api_key,
'campaignId' => $campaign_id
);
try
{
$startCampaignResponse = $campaignOutboundClient->startCampaign($startCampaignArray);
$startCampaignId = $startCampaignResponse->out;
if($debug)
{
echo "Campaign start status : ".$startCampaignId;
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error . "
";
}
}
}
Sample C# Code
public string startCampaign(string key, long campaignId)
{
//LOG.info("Entered startCampaign(string key, long campaignId)");
try
{
string status = this.campaignService.startCampaign(key, campaignId);
return status;
}
finally
{
//LOG.info("Exited startCampaign(string key, long campaignId)");
}
}
stopCampaign
Use this function to stop a running campaign.
Parameters
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
key
|
1
|
1
|
true
|
xsd:string
|
The API key that is registered with your account
|
campaignId
|
1
|
1
|
false
|
xsd:long
|
The campaign ID to stop
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
true
|
xsd:string
|
"success" upon successfully stopping the campaign
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
-3409
Sample PHP Code
public function stopCampaign($api_key, $campaign_id, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$stopCampaignArray = array (
'key' => $api_key,
'campaignId' => $campaign_id
);
try
{
$stopCampaignResponse = $campaignOutboundClient->stopCampaign($stopCampaignArray);
$stopCampaignId = $stopCampaignResponse->out;
if($debug)
{
echo "Campaign Stopped Result : ".$stopCampaignId;
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error . "
";
}
}
}
Sample C# Code
public string stopCampaign(string key, long campaignId)
{
//LOG.info("Entered stopCampaign(string key, long campaignId)");
try
{
string status = this.campaignService.stopCampaign(key, campaignId);
return status;
}
finally
{
//LOG.info("Exited stopCampaign(string key, long campaignId)");
}
}
getRecording
Gets a recording for a call.
Parameters
Parameter name
|
type
|
Required
|
Description
|
key
|
string
|
Y
|
The API key that is registered with your account
|
callId
|
long
|
Y
|
The id of the call you need a recording for
|
Response
Parameter name
|
type
|
Description
|
byte []
|
Base64 encoded
|
Byte Array
|
Sample PHP Code
public function getRecording($api_key, $callid, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$getRecordingArray = array (
'key' => $api_key,
'callId' => $callid
);
try
{
$getrecordingResponse = $campaignOutboundClient->getRecording($getRecordingArray);
$getRecordingDetail = $getrecordingResponse->out;
if($debug)
{
echo "Recording [returned value in bytes]";
echo $getRecordingDetail;
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error . "
";
}
}
}
Sample C# Code
public byte[] getRecording(string key, long callid)
{
try
{
byte[] RecordingResponse = this.campaignService.getRecording(key, callid);
return RecordingResponse;
}
catch (Exception e)
{
string msg = "Unable to get the recording";
throw new CampaignException(msg, e);
}
}
updateSpeed
Use this function to change the speed of your campaign. You can specify the calls per minute.
Parameters
Parameter name
|
type
|
Required
|
Description
|
key
|
string
|
Y
|
The API key that is registered with your account
|
campaignId
|
long
|
Y
|
The campaign ID to start
|
speed
|
int
|
Y
|
The new speed in calls per minute for the campaign
|
Response
Parameter name
|
minOccurs
|
maxOccurs
|
nillable
|
type
|
Description
|
out
|
1
|
1
|
true
|
xsd:long
|
"success" upon successfully updating the speed of the campaign
|
Example Request
<?xml version="1.0" encoding="utf-8"?>
string
-8599
-4304
Sample PHP Code
public function updateSpeed($api_key, $campaign_id, $speed, $debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/CampaignService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$updateSpeedArray = array (
'key' => $api_key,
'campaignId' => $campaign_id,
'speed' => $speed
);
try
{
$updateSpeedResponse = $campaignOutboundClient->updateSpeed($updateSpeedArray);
$update_speed = $updateSpeedResponse->out;
if($debug)
{
echo "Campaign's speed update : ".$update_speed;
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error . "
";
}
}
}
Sample C# Code
public string updateSpeed(string key, long campaignId, int speed)
{
//LOG.Info("Entered updateSpeed(string key, long campaignId, int speed)");
try
{
string status = this.campaignService.updateSpeed(key, campaignId, speed);
return status;
}
finally
{
//LOG.Info("Exited updateSpeed(string key, long campaignId, int speed)");
}
}
Other Services
CallType
This object contains all the information available for a call.
Variable name
|
type
|
Description
|
Notes
|
phonenumber
|
String
|
Phone number dialed
|
|
callid
|
long
|
A Callfire Unique ID
|
|
timestarted
|
Date
|
When the call was started
|
|
duration
|
int
|
duration in seconds
|
|
status
|
String
|
The status of the call
|
|
notes
|
String
|
Any notes if available
|
Used for Call Center Only
|
extra
|
String
|
Additional information if present for the call
|
|
agentId
|
String
|
Which Agent took the call
|
Used for Call Center Only
|
agentUserId
|
String
|
The userid that the agent used
|
Used for Call Center Only
|
agentPhoneNumber
|
String
|
The phone number of the Agent
|
Used for Call Center Only
|
agentResponse
|
String
|
Response an agent typed in
|
Used for Call Center Only
|
responseTime
|
Date
|
The time when Agent responded to the call
|
Used for Call Center Only
|
CampaignType
This object contains all the information available for a campaign.
Variable Name
|
type
|
Description
|
campaignId
|
long
|
The callfire unique id for the campaign
|
name
|
String
|
The name of the campaign
|
type
|
String
|
The type of campaign
|
status
|
String
|
The current state of the campaign (Running, Stopped, Finished, Cancelled)
|
total
|
int
|
The total calls in the campaign
|
dialed
|
int
|
The total dialed in the campaign
|
live
|
int
|
The total live answer in the campaign
|
answeringMachine
|
int
|
The total Answering Machine in the campaign
|
noAnswer
|
int
|
The total No Answers in teh campaign
|
doNotCall
|
int
|
The total DNC marked in the campaign
|
busy
|
int
|
The total Busy in the campaign
|
transfer
|
int
|
The total transfers in the campaign
|
error
|
int
|
The total calls that were Error's
|
misc
|
int
|
The total calls that faced a CallFire system error.
|