Broadcast Service

Contents

Broadcast Service

Description

This SOAP API service will allow you to quickly send out voice broadcasts from your database systems.

This document will go over how to create a voice broadcast API campaign along with sample code.

Pre-Requisites

  1. Create an account on callfire.com
  2. Get your API Key from the Account Page.
  3. Make sure you have enough funds in your account for the volume you will dial.

WSDL

Broadcast Service WSDL = https://www.callfire.com/service/BroadcastService?wsdl


Methods

concatenate

This function will allow you to concatenate two or more sound files.

   Parameters    
   * key - This is the key that you were provided when you registerd with callfire.com. You can view your key by logging onto callfire.com & then goto "Settings -> Account Settings".
   * soundFiles - This is an array of the sound files that you want to concatenate. The sound files must be in Base64Binary Format.
   Output
   * The function will return you the concatenated sound files in Base64Binary Format.
Example Request
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <tnsa:concatenate xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:tnsa="http://api.campaign.dialer.skyyconsulting.com" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <tnsa:key>string</tnsa:key>
      <tnsa:soundFiles>
        <tnsa:base64Binary>YTM0NZomIzI2OTsmIzM0NTueYQ==</tnsa:base64Binary>
        <tnsa:base64Binary>YTM0NZomIzI2OTsmIzM0NTueYQ==</tnsa:base64Binary>
      </tnsa:soundFiles>
    </tnsa:concatenate>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Example Response

Sample PHP Code

Sample C# Code
        public byte[] concatenate(string key, byte[][] numbers)
        {
            //LOG.Info("Entered concatenate(string key, List<byte[]> numbers)");
            try
            {
                byte[] campaignId = this.broadcastService.concatenate(key, numbers);
                return campaignId;
            }
            catch (Exception e)
            {
                string msg = "unable to concatenate";
                LOG.Error(msg);
                throw new BroadcastServiceException(msg, e);
            }
            finally
            {
                //LOG.Info("Exited concatenate(string key, List<byte[]> numbers)");
            }
        }

createBroadcast

Use this function to create a broadcast campaign. A broadcast campaign will send out calls to the numbers that you upload and a sound file would be played to those numbers.

   Parameters
   * key - This is the key that you were provided when you registered with callfire.com, You can view         your key by logging onto callfire.com & then goto "Settings -> Account Settings"
   * soundFile- This is the sound file that you wish to be played.
   * callerId- This will be the caller id that would be displayed on all outgoing calls.
   * numbers - This is the list of phone numbers to which the call would be made and the sound file would be played.
   Output
   * Upon successful creation of the campaign, a campaign id would be returned.
Example Request
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <tnsa:createBroadcast xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:tnsa="http://api.campaign.dialer.skyyconsulting.com" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <tnsa:key>string</tnsa:key>
      <tnsa:soundFile>YTM0NZomIzI2OTsmIzM0NTueYQ==</tnsa:soundFile>
      <tnsa:callerId>string</tnsa:callerId>
      <tnsa:numbers>
        <tnsa:NumberIdType>
          <tnsa:phonenumber>string</tnsa:phonenumber>
          <tnsa:recId>string</tnsa:recId>
        </tnsa:NumberIdType>
        <tnsa:NumberIdType>
          <tnsa:phonenumber>string</tnsa:phonenumber>
          <tnsa:recId>string</tnsa:recId>
        </tnsa:NumberIdType>
        <tnsa:NumberIdType>
          <tnsa:phonenumber>string</tnsa:phonenumber>
          <tnsa:recId>string</tnsa:recId>
        </tnsa:NumberIdType>
        <tnsa:NumberIdType>
          <tnsa:phonenumber>string</tnsa:phonenumber>
          <tnsa:recId>string</tnsa:recId>
        </tnsa:NumberIdType>
      </tnsa:numbers>
    </tnsa:createBroadcast>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Example Response

Sample PHP Code
public function create_BBroadcast($key,$soundFile,$callerid,$phone_numbers,$debug)
	{
		$createOtboundcampaignWsdl = 'https://www.callfire.com/service/BroadcastService?wsdl';
		$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));

		$handle = fopen($soundFile,'r');
		$contents = fread($handle,filesize($soundFile));
		$sfile = $contents;

		$lines = file($phone_numbers) or die('Unable to upload phone numbers');
		foreach($lines as $line)
		{
			$numberidtype = new NumberIdType($line,"32204");
			$pnumber['string'][] = $numberidtype;
		}


		$createcampaign = array(
   		'key' => $key,
		'soundFile' => $sfile,
		'callerId' => $callerid,
		'numbers' => $pnumber
		);
		try
		{
			$createUserRespopnse = $campaignOutboundClient->createBroadcast($createcampaign);
			$campaignId = $createUserRespopnse->out;
			if($debug)
			{
				print_r($campaignId);
			}
		}
		catch(SoapFault $error)
		{
			if($debug)
			{
				echo $error."<br/>";
			}
		}
	}
Sample C# Code
       public long createBroadcast(string key, byte[] soundFile, string callerId, NumberIdType[] numbers)
        {
            //LOG.Info("Entered createBroadcast(string key, byte[] soundFile, string callerId, NumberIdType[] numbers)");
            try
            {
                long campaignId = this.broadcastService.createBroadcast(key, soundFile, callerId, numbers);
                return campaignId;
            }
            catch (Exception e)
            {
                string msg = "Unable to create broadcast";
                LOG.Error(msg);
                throw new BroadcastServiceException(msg, e);
            }
            finally
            {
                //LOG.Info("Exited createBroadcast(string key, byte[] soundFile, string callerId, NumberIdType[] numbers) ");
            }
        }

getCallDetailsFor2000Records

Use this function to get the Details the first 2000 calls for a campaign.

   Parameters
  * key - This is the key that you were provided when you registered with callfire.com, You can view your key by logging onto callfire.com & then goto "Settings -> Account Settings"
  * campaignId - This is the campaign id of the campaign for which you want to see the call records
  * offset - Set the value of offset to see the records. Eg-1. If you wish to see the first 2000 records, set this value to 0. Eg-2. If you have say (4000 records), then call the function with offset=0 to see the first 2000 records & then call the function again with an offset=2000 to get the next 2000 records.
   Output
  * The function would return the call details for 2000 records from your campaign.
Example Request
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <tnsa:getCallDetailsFor2000Records 
xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:tnsa="http://api.campaign.dialer.skyyconsulting.com" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <tnsa:key>string</tnsa:key>
      <tnsa:campaignid>1973</tnsa:campaignid>
      <tnsa:offset>-1419</tnsa:offset>
    </tnsa:getCallDetailsFor2000Records>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Example Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><ns1:getCallDetailsFor2000RecordsResponse xmlns:ns1="http://api.campaign.dialer.skyyconsulting.com"><ns1:out><ns1:CallType><agentId xmlns="http://api.campaign.dialer.skyyconsulting.com" xsi:nil="true" /><agentPhoneNumber xmlns="http://api.campaign.dialer.skyyconsulting.com" xsi:nil="true" /><agentResponse xmlns="http://api.campaign.dialer.skyyconsulting.com" xsi:nil="true" /><agentUserId xmlns="http://api.campaign.dialer.skyyconsulting.com" xsi:nil="true" /><callid xmlns="http://api.campaign.dialer.skyyconsulting.com">590362910</callid><duration xmlns="http://api.campaign.dialer.skyyconsulting.com">4</duration><extra xmlns="http://api.campaign.dialer.skyyconsulting.com" xsi:nil="true" /><notes xmlns="http://api.campaign.dialer.skyyconsulting.com" xsi:nil="true" /><phonenumber xmlns="http://api.campaign.dialer.skyyconsulting.com">2134000543</phonenumber><status xmlns="http://api.campaign.dialer.skyyconsulting.com">AM</status><timestarted xmlns="http://api.campaign.dialer.skyyconsulting.com">2010-06-23T12:11:17-07:00</timestarted></ns1:CallType></ns1:out></ns1:getCallDetailsFor2000RecordsResponse></soap:Body></soap:Envelope>
Sample PHP Code
	public function getCallDetailsFor2000_BRecords($api_key,$campaign_id,$offset,$debug)
	{
		$createOtboundcampaignWsdl = 'https://www.callfire.com/service/BroadcastService?wsdl';
		$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
		$getCallDetailsFor2000RecordsArray1 = array (
		'key' => $api_key,
		'campaignid' => $campaign_id,
		'offset' => $offset
		);
		try
		{
			$getcallDetailsfor2000RecordsResponse1 = $campaignOutboundClient->getCallDetailsFor2000Records($getCallDetailsFor2000RecordsArray1);
			$getCallDetails1 = $getcallDetailsfor2000RecordsResponse1->out;
			if($debug)
			{
				echo "<table border=1><tr><td>agentId</td><td>agentPhoneNumber</td><td>agentResponse</td><td>agentUserId</td><td>callid</td><td>duration</td><td>extra</td><td>notes</td><td>phonenumber</td><td>status</td><td>timestarted</td></tr>";
				foreach($getCallDetails1->CallType as $line)
				{
					echo "<tr>";
					echo "<td>".$line->agentId."</td>";
					echo "<td>".$line->agentPhoneNumber."</td>";
					echo "<td>".$line->agentResponse."</td>";
					echo "<td>".$line->agentUserId."</td>";
					echo "<td>".$line->callid."</td>";
					echo "<td>".$line->duration."</td>";
					echo "<td>".$line->extra."</td>";
					echo "<td>".$line->notes."</td>";
					echo "<td>".$line->phonenumber."</td>";
					echo "<td>".$line->status."</td>";
					echo "<td>".$line->timestarted."</td>";
					echo "</tr>";
				}
				echo "</table>";
			}
		}
		catch(SoapFault $error)
		{
			if($debug)
			{
				echo $error."<br/>";
			}
		}
	}
Sample C# Code
        public CallType[] getCallDetailsFor2000Records(string key, long campaignId, int offset)
        {
            //LOG.Info("Entered getCallDetailsFor2000Records(string key, long campaignId,, int offset)");
            try
            {
                CallType[] callTypeArray =  
                    this.broadcastService.getCallDetailsFor2000Records(key,campaignId,offset);
                return callTypeArray;
            }
            catch(Exception e)
            {
                string msg = "Unable to getCallDetailsFor2000Records";
                LOG.Error(msg);
                throw new BroadcastServiceException(msg,e);
            }
            finally
            {
                //LOG.Info("Exited getCallDetailsFor2000Records(string key, long campaignId,, int offset)");
            }
        }

getFullCampaignList

Use this function to get a list of all the campaigns in your account.

   Parameters
  * key - This is the key that you were provided when you registered with callfire.com, You can view your key by logging onto callfire.com & then goto "Settings -> Account Settings"
   Output
  * The function will return the campaign list
Example Request
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <tnsa:getFullCampaignList 
xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:tnsa="http://api.campaign.dialer.skyyconsulting.com" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <tnsa:key>string</tnsa:key>
    </tnsa:getFullCampaignList>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Example Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><ns1:getFullCampaignListResponse xmlns:ns1="http://api.campaign.dialer.skyyconsulting.com">
<ns1:out>
<ns1:CampaignType>
<answeringMachine xmlns="http://api.campaign.dialer.skyyconsulting.com">0</answeringMachine>
<busy xmlns="http://api.campaign.dialer.skyyconsulting.com">0</busy>
<campaignId xmlns="http://api.campaign.dialer.skyyconsulting.com">1091867</campaignId>
<dialed xmlns="http://api.campaign.dialer.skyyconsulting.com">0</dialed>
<doNotCall xmlns="http://api.campaign.dialer.skyyconsulting.com">0</doNotCall>
<error xmlns="http://api.campaign.dialer.skyyconsulting.com">0</error>
<live xmlns="http://api.campaign.dialer.skyyconsulting.com">0</live>
<misc xmlns="http://api.campaign.dialer.skyyconsulting.com">0</misc>
<name xmlns="http://api.campaign.dialer.skyyconsulting.com">api no AMD TTS campaign  Fri Jun 04 18:33:43 PDT 2010</name>
<noAnswer xmlns="http://api.campaign.dialer.skyyconsulting.com">0</noAnswer>
<status xmlns="http://api.campaign.dialer.skyyconsulting.com">New</status>
<total xmlns="http://api.campaign.dialer.skyyconsulting.com">2</total>
<transfer xmlns="http://api.campaign.dialer.skyyconsulting.com">0</transfer>
<type xmlns="http://api.campaign.dialer.skyyconsulting.com">Threshold</type>
</ns1:CampaignType>
</ns1:out>
</ns1:getFullCampaignListResponse>
</soap:Body>
</soap:Envelope>
Sample PHP Code
	public function getFullCampaign_BList($api_key,$debug)
	{
		$createOtboundcampaignWsdl = 'https://www.callfire.com/service/BroadcastService?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>answeringMachine</td><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->answeringMachine."</td>";
					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>";
				}
			}
		}
		catch(SoapFault $error)
		{
			if($debug)
			{
				echo $error."<br/>";
			}
		}
	}
Sample C# Code
        public CampaignType[] getFullCampaignList(String key)
        {
            //LOG.Info("Entered getFullCampaignList(String key)");
            try
            {
                CampaignType[] campaignTypeArray =
                    this.broadcastService.getFullCampaignList(key);

                return campaignTypeArray;
            }
            finally
            {
                //LOG.Info("Exited getFullCampaignList(String key) ");
            }
        }

getRunningCampaignList

Use this function to get a list of running campaigns.

   Parameters
   * key - (String) This is the key that you were provided when you registered with callfire.com, You can view your key by logging onto callfire.com & then goto "Settings -> Account Settings"
   Output
   * The function will return the list of all the running campaigns from your account.
Example Request
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <tnsa:getRunningCampaignList 
xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:tnsa="http://api.campaign.dialer.skyyconsulting.com" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <tnsa:key>string</tnsa:key>
    </tnsa:getRunningCampaignList>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Example Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><ns1:getRunningCampaignListResponse xmlns:ns1="http://api.campaign.dialer.skyyconsulting.com">
<ns1:out>
<ns1:CampaignType>
<answeringMachine xmlns="http://api.campaign.dialer.skyyconsulting.com">0</answeringMachine><busy xmlns="http://api.campaign.dialer.skyyconsulting.com">0</busy><campaignId xmlns="http://api.campaign.dialer.skyyconsulting.com">1123231</campaignId><dialed xmlns="http://api.campaign.dialer.skyyconsulting.com">0</dialed><doNotCall xmlns="http://api.campaign.dialer.skyyconsulting.com">0</doNotCall><error xmlns="http://api.campaign.dialer.skyyconsulting.com">0</error><live xmlns="http://api.campaign.dialer.skyyconsulting.com">0</live><misc xmlns="http://api.campaign.dialer.skyyconsulting.com">0</misc><name xmlns="http://api.campaign.dialer.skyyconsulting.com">csdfsd api</name><noAnswer xmlns="http://api.campaign.dialer.skyyconsulting.com">0</noAnswer><status xmlns="http://api.campaign.dialer.skyyconsulting.com">Running</status><total xmlns="http://api.campaign.dialer.skyyconsulting.com">1</total><transfer xmlns="http://api.campaign.dialer.skyyconsulting.com">0</transfer><type xmlns="http://api.campaign.dialer.skyyconsulting.com">CallCenterConnect</type>
</ns1:CampaignType>
</ns1:out>
</ns1:getRunningCampaignListResponse>
</soap:Body>
</soap:Envelope>
Sample PHP Code
	public function getRunningCampaign_BList($api_key,$debug)
	{
		$createOtboundcampaignWsdl = 'https://www.callfire.com/service/BroadcastService?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>answeringMachine</td><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->answeringMachine."</td>";
					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>";
				}
			}
		}
		catch(SoapFault $error)
		{
			if($debug)
			{
				echo $error."<br/>";
			}
		}
	}
Sample C# Code
        public CampaignType[] getRunningCampaignList(string key)
        {
            //LOG.Info("Entered getRunningCampaignList(string key)");
            try
            {
                CampaignType[] campaignList = this.broadcastService.getRunningCampaignList(key);
                return campaignList;
            }
            catch(Exception e)
            {
                string msg = "uanable to getRunningCampaignList";
                LOG.Error(msg);
                throw new BroadcastServiceException(msg,e);
            }
            finally
            {
                //LOG.Info("Exited getRunningCampaignList(string key) ");
            }
        }

isCampaignRunning

Use this function to check whether a campaign is running or not.

   Parameters
   * key - This is the key that you were provided when you registerd with callfire.com, You can view your key by logging onto callfire.com & then goto "Settings -> Account Settings"
   * campaignId - This is the campaign id of the campaign for which you wish to test whether the campaign is running or not.
   Output
   * The function will return true if a campaign is running, otherwise it returns false.
Example Request
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <tnsa:isCampaignRunning xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:tnsa="http://api.campaign.dialer.skyyconsulting.com" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <tnsa:key>string</tnsa:key>
      <tnsa:campaignId>-4743</tnsa:campaignId>
    </tnsa:isCampaignRunning>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Example Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><ns1:isCampaignRunningResponse xmlns:ns1="http://api.campaign.dialer.skyyconsulting.com"><ns1:out>false</ns1:out></ns1:isCampaignRunningResponse></soap:Body></soap:Envelope>
Sample PHP Code
	public function isCampaignB_Running($api_key,$campaign_id,$debug)
	{
		$createOtboundcampaignWsdl = 'https://www.callfire.com/service/BroadcastService?wsdl';
		$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
		$startCampaignArray = array (
		'key' => $api_key,
		'campaignId' => $campaign_id
		);
		try
		{
			$startCampaignResponse = $campaignOutboundClient->isCampaignRunning($startCampaignArray);
			$startCampaignId = $startCampaignResponse->out;
			if($debug)
			{
				echo $startCampaignId;
			}
		}
		catch(SoapFault $error)
		{
			if($debug)
			{
				echo $error."<br/>";
			}
		}
	}
Sample C# Code
       public string isRunningCampaign(string key, long campaignId)
        {
            //LOG.Info("Entered isRunningCampaign(string key, long campaignId)");
            try
            {
                string status = this.broadcastService.isCampaignRunning(key, campaignId);
                return status;
            }
            catch (Exception e)
            {
                string msg = "Uanble to execute the call (isRunningCampaign)";
                LOG.Error(msg);
                throw new BroadcastServiceException(msg, e);
            }
            finally
            {
                //LOG.Info("Exited isRunningCampaign(string key, long campaignId)");
            }
        }

sendBroadcast

Use this function to create a broadcast campaign and send out the calls immediately. NOTE: Use this function only if you are ready to broadcast immediately

   Parameters
   * key - (String) This is the key that you were provided when you registerd with callfire.com, You can view your key by logging onto callfire.com & then goto "Settings -> Account Settings"
   * soundFile - (base64binary) This is the sound file that you wish to be played.
   * callerId - (String) This will be the caller id that would be displayed on all outgoing calls.
   * numbers - This is list of phone numbers for which you wish to create a broadcast campaign.
   Output
   * The function would return the campaign id.
Example Request
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <tnsa:sendBroadcast xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:tnsa="http://api.campaign.dialer.skyyconsulting.com" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <tnsa:key>string</tnsa:key>
      <tnsa:soundFile>YTM0NZomIzI2OTsmIzM0NTueYQ==</tnsa:soundFile>
      <tnsa:callerId>string</tnsa:callerId>
      <tnsa:numbers>
        <tnsa:NumberIdType>
          <tnsa:phonenumber>string</tnsa:phonenumber>
          <tnsa:recId>string</tnsa:recId>
        </tnsa:NumberIdType>
        <tnsa:NumberIdType>
          <tnsa:phonenumber>string</tnsa:phonenumber>
          <tnsa:recId>string</tnsa:recId>
        </tnsa:NumberIdType>
        <tnsa:NumberIdType>
          <tnsa:phonenumber>string</tnsa:phonenumber>
          <tnsa:recId>string</tnsa:recId>
        </tnsa:NumberIdType>
        <tnsa:NumberIdType>
          <tnsa:phonenumber>string</tnsa:phonenumber>
          <tnsa:recId>string</tnsa:recId>
        </tnsa:NumberIdType>
      </tnsa:numbers>
    </tnsa:sendBroadcast>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Example Response

Sample PHP Code
	public function send_BBroadcast($key,$soundFile,$callerid,$phone_numbers,$debug)
	{
		$createOtboundcampaignWsdl = 'https://www.callfire.com/service/BroadcastService?wsdl';
		$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));


		$handle = fopen($soundFile,'r');
		$contents = fread($handle,filesize($soundFile));
		$sfile = $contents;

		$lines = file($phone_numbers) or die('Unable to upload phone numbers');
		foreach($lines as $line)
		{
			$numberidtype = new NumberIdType("2134000543","32204");
			$pnumber['string'][] = $numberidtype;
		}


		$createcampaign = array(
   		'key' => $key,
		'soundFile' => $sfile,
		'callerId' => $callerid,
		'numbers' => $pnumber
		);
		try
		{
			$createUserRespopnse = $campaignOutboundClient->sendBroadcast($createcampaign);
			$campaignId = $createUserRespopnse->out;
			if($debug)
			{
				print_r($campaignId);
			}
		}
		catch(SoapFault $error)
		{
			if($debug)
			{
				echo $error."<br/>";
			}
		}
	}
Sample C# Code
        public long sendBroadcast(string key,byte[] soundFile, string callerid, NumberIdType[] numbersarray)
        {
            //LOG.Info("Entered sendBroadcast(string key,byte[] soundFile, string callerid, NumberIdType[] numbersarray)");
            try
            {
                long campaignId = this.broadcastService.sendBroadcast(key,soundFile,callerid,numbersarray);
                return campaignId;
            }
            catch(Exception e)
            {
                string msg = "unable to send broadcast";
                LOG.Error(msg);
                throw new BroadcastServiceException(msg,e);
            }
            finally
            {
                //LOG.Info("Exited sendBroadcast(string key,byte[] soundFile, string callerid, NumberIdType[] numbersarray)");
            }
        }

startCampaign

Start Campaign will start up a pre-established campaign that you have created.

   Parameters
   * key - (String) This is the key that you were provided when you registerd with callfire.com, You can view your key by logging onto callfire.com & then goto "Settings -> Account Settings"
   * campaignId - (long) This is the id of the campaign that you want to start.
   Output
   * The function would return "success" upon successful completion of the request
Example Request
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <tnsa:startCampaign xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:tnsa="http://api.campaign.dialer.skyyconsulting.com" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <tnsa:key>string</tnsa:key>
      <tnsa:campaignId>-7347</tnsa:campaignId>
    </tnsa:startCampaign>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Example Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body><ns1:startCampaignResponse xmlns:ns1="http://api.campaign.dialer.skyyconsulting.com"><ns1:out>success</ns1:out></ns1:startCampaignResponse>
</soap:Body>
</soap:Envelope>
Sample PHP Code
public function start_BCampaign($api_key,$campaign_id,$debug)
	{
		$createOtboundcampaignWsdl = 'https://www.callfire.com/service/BroadcastService?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 successfully started.. ";
				echo $startCampaignId;
			}
		}
		catch(SoapFault $error)
		{
			if($debug)
			{
				echo $error."<br/>";
			}
		}
	}
Sample C# Code
 public string startCampaign(string key, long campaignId)
        {
            //LOG.Info("Entered startCampaign(string key, long campaignId)");
            try
            {
                string status = this.broadcastService.startCampaign(key, campaignId);
                return status;
            }
            finally
            {
                //LOG.Info("Exited startCampaign(string key, long campaignId)");
            }
        }

stopCampaign

This function will stop a running campaign.

   Parameters
   * key - (String) This is the key that you were provided when you registerd with callfire.com, You can view your key by logging onto callfire.com & then goto "Settings -> Account Settings"
   * campaignId - (long) This is the id of the campaign that you want to stop.
   Output
   * The function would return "success" upon successful completion of the request
Example Request
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <tnsa:stopCampaign xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:tnsa="http://api.campaign.dialer.skyyconsulting.com" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <tnsa:key>string</tnsa:key>
      <tnsa:campaignId>9174</tnsa:campaignId>
    </tnsa:stopCampaign>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Example Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><ns1:stopCampaignResponse xmlns:ns1="http://api.campaign.dialer.skyyconsulting.com"><ns1:out>success</ns1:out></ns1:stopCampaignResponse></soap:Body></soap:Envelope>
Sample PHP Code
public function stop_BCampaign($api_key,$campaign_id,$debug)
	{
		$createOtboundcampaignWsdl = 'https://www.callfire.com/service/BroadcastService?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 successfully stopped..";
				echo $stopCampaignId;
			}
		}
		catch(SoapFault $error)
		{
			if($debug)
			{
				echo $error."<br/>";
			}
		}
	}
Sample C# Code
public string stopCampaign(string key, long campaignId)
        {
            try
            {
                string status = this.broadcastService.stopCampaign(key, campaignId);
                return status;
            }
            catch (Exception e)
            {
                string msg = "Uanble to stop campaign";
                LOG.Error(msg);
                throw new BroadcastServiceException(msg, e);
            }
            finally
            {
                //LOG.Info("Exited stopCampaign(string key, long campaignId)");
            }
        }

updateSpeed

This function will update the speed of the campaign to the new speed that you speciy. Enter the speed in terms of the (No. of calls per minute).

   Parameters
 * key - (String) This is the key that you were provided when you registerd with callfire.com, You can view your key by logging onto callfire.com & then goto "Settings -> Account Settings"
 * campaignId - (long) This is the id of the campaign for which you want to increase the speed.
 * speed - (int) This will be the new campaign speed. (Specify in calls per minute). Eg. Suppose you wish to make 40 calls per minute, then set the value of speed to 40
   Output
 * The function would return "success" upon successful completion of the request
Example Request
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <tnsa:updateSpeed xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:tnsa="http://api.campaign.dialer.skyyconsulting.com" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <tnsa:key>string</tnsa:key>
      <tnsa:campaignId>7015</tnsa:campaignId>
      <tnsa:speed>5792</tnsa:speed>
    </tnsa:updateSpeed>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Example Response
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><ns1:updateSpeedResponse xmlns:ns1="http://api.campaign.dialer.skyyconsulting.com"><ns1:out>success</ns1:out></ns1:updateSpeedResponse></soap:Body></soap:Envelope>
Sample PHP Code
	public function update_SpeedBroadcast($key,$campaignId,$speed,$debug)
	{
		$createOtboundcampaignWsdl = 'https://www.callfire.com/service/BroadcastService?wsdl';
		$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));

		$update_SpeedBroadcastparams = array(
   		'key' => $key,
		'campaignId' => $campaignId,
		'speed' => $speed
		);
		try
		{
			$updateSpeedResponse = $campaignOutboundClient->updateSpeed($update_SpeedBroadcastparams);
			$status = $updateSpeedResponse->out;
			if($debug)
			{
				echo "Speed Updation Status :: ".$status;
			}
		}
		catch(SoapFault $error)
		{
			if($debug)
			{
				echo $error."<br/>";
			}
		}
	}
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.broadcastService.updateSpeed(key, campaignId, speed);
                return status;
            }
            catch (Exception e)
            {
                string msg = "Unable to updateSpeed";
                LOG.Error(msg);
                throw new BroadcastServiceException(msg, e);
            }
            finally
            {
                //LOG.Info("Exited updateSpeed(string key, long campaignId, int speed)");
            }
        }

verifyUser

This function will send out a call to verify a user

   Parameters
   * key - (String) your api key from the account page
   * phonenumber - (String) this is the phone number to which you want to send the verification code
   * callerid - (String) this is the caller id that would appear on all outbound calls
   * verificationCode - (int) the verification code would be sent out to the user
   Output
   * The user would get the call and the verification code would be played on their phone
Example Request
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <tnsa:verifyUser xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:tnsa="http://api.campaign.dialer.skyyconsulting.com" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <tnsa:key>string</tnsa:key>
      <tnsa:phonenumber>string</tnsa:phonenumber>
      <tnsa:callerid>string</tnsa:callerid>
      <tnsa:verificationCode>1223</tnsa:verificationCode>
    </tnsa:verifyUser>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Example Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<ns1:verifyUserResponse xmlns:ns1="http://api.campaign.dialer.skyyconsulting.com"/>
</soap:Body>
</soap:Envelope>
Sample PHP Code
	public function verify_User($key,$phonenumber,$callerid,$verificationCode,$debug)
	{
		$createOtboundcampaignWsdl = 'https://www.callfire.com/service/BroadcastService?wsdl';
		$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));

		$createcampaign = array(
   		'key' => $key,
		'phonenumber' => $phonenumber,
		'callerid' => $callerid,
		'verificationCode' => $verificationCode
		);
		try
		{
			$createUserRespopnse = $campaignOutboundClient->verifyUser($createcampaign);
			$campaignId = $createUserRespopnse->out;
			if($debug)
			{
				print_r($campaignId);
			}
		}
		catch(SoapFault $error)
		{
			if($debug)
			{
				echo $error."<br/>";
			}
		}
	}
Sample C# Code
        public void verifyUser(string key, string phonenumber, string callerid, int verificationCode)
        {
            //LOG.Info("Entered verifyUser(string key, string phonenumber, string callerid, int verificationCode)");
            try
            {
                this.broadcastService.verifyUser(key, phonenumber, callerid, verificationCode);
            }
            catch (Exception e)
            {
                string msg = "Unable to verifyUser";
                LOG.Error(msg);
                throw new BroadcastServiceException(msg, e);
            }
            finally
            {
                //LOG.Info("Exited verifyUser(string key, string phonenumber, string callerid, int verificationCode)");
            }
        }