You can run a click to call connection using SOAP or REST.

Methods

Click to Call (SOAP)

WSDL

https://www.callfire.com/service/ClickToCallAPI?wsdl

Parameters

Parameter name Required Description
key Y The API key that is registered with your account
cfacct Y The Campaign id of your click to call campaign
phonenumber Y The phone number you want to connect
info Y Any extra information you wish to store for this connection ( Name or Email Address are common )
delay Y The number of minutes to time delay before making the call ( 0 for no delays )

Click to Call (REST)

URL

https://www.callfire.com/service/clicktocall/sendconnect

Parameters

Parameter name Required Description
cfacct Y The Campaign id of your click to call campaign
phonenumber Y The phone number you want to connect
info Y Any extra information you wish to store for this connection ( Name or Email Address are common )
delay Y The number of minutes to time delay before making the call ( 0 for no delays )

Example — https://www.callfire.com/service/clicktocall/sendconnect?cfacct=1&phonen...

Where Campaign ID is 1, Number to connect is 123-123-3214, jaa13@gmail.com is additional information and the call is instant (0 delay)

createClickToCallCampaign

Example Request

<?xml version="1.0" encoding="utf-8"?>

  
    
      string
      string
      string
    
  

Sample PHP Code

public function createClickToCallCampaign($api_key, $caller_id, $transferNumber, $awayMessage, $debug)
{
	$createOtboundcampaignWsdl = 'http://www.callfire.com/service/ClickToCallAPI?wsdl';
	$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));

	$createcampaign = array(
  		'key' => $api_key,
  		'callerid' => $caller_id,
  		'transferNumber' => $transferNumber,
   	'awayMessage' => $awayMessage
	);
	try
	{
		$createClickToCallCampaignResponse = $campaignOutboundClient->createClickToCallCampaign($createcampaign);
		$campaignId = $createClickToCallCampaignResponse->out;
		if($debug)
		{
			echo "CampaignID : ".$campaignId."
";
		}
	}
	catch(SoapFault $error)
	{
		if($debug)
		{
			echo $error."
";
		}
	}
}

Sample C# Code

public long createClickToCallCampaign(string key, string callerid, string transferNumber, string awayMessage)
{
    //LOG.Info("Entered createClickToCallCampaign(string key, string callerid, string transferNumber, string awayMessage)");
    try
    {
        long campaignId = (long) this.clickToCallAPI.createClickToCallCampaign(key, callerid, transferNumber, awayMessage);
        return campaignId;
    }
    catch (Exception e)
    {
        string msg = "Unable to create click to call campaign";
        LOG.Error(msg);
        throw new ClickToCallServiceException(msg, e);
    }
    finally
    {
        //LOG.Info("Exited createClickToCallCampaign(string key, string callerid, string transferNumber, string awayMessage)");
    }
}

sendConnection

Use this function to send out a connection for a campaign that you created.

Parameters

Parameter name Required Description
key Y The API key that is registered with your account
cfacct Y This is the campaign id for which you want to send out the connection
phonenumber Y This is the phone number to which the connection call would be made.
info Y Any extra information you wish to store for this connection
delay Y Enter the time in minutes after which the call would be made to the phone number that you specified.

Example Request

<?xml version="1.0" encoding="utf-8"?>

  
    
      string
      3892
      string
      string
      -5337
    
  

Sample PHP Code

public function sendConnection($api_key,$cfacct,$phoneNumber,$info,$delay,$debug)
{
	$createOtboundcampaignWsdl = 'http://www.callfire.com/service/ClickToCallAPI?wsdl';
	$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));

	$createcampaign = array(
  		'key' => $api_key,
  		'cfacct' => $cfacct,
  		'phonenumber' => $phoneNumber,
   	'info' => $info,
	'delay' => $delay
	);
	try
	{
		$sendconnectionResponse = $campaignOutboundClient->sendConnection($createcampaign);
		$campaignId = $sendconnectionResponse->out;
		if($debug)
		{
			echo "Connection sent success";
		}
	}
	catch(SoapFault $error)
	{
		if($debug)
		{
			echo $error."
";
		}
	}
}

Sample C# Code

public void sendConnection(string key, int cfacct, string phonenumber, string info, int delay)
{
    //LOG.Info("Entered sendConnection(string key, int cfacct, string phonenumber, string info, int delay)");
    try
    {
        this.clickToCallAPI.sendConnection(key, cfacct, phonenumber, info, delay);
    }
    finally
    {
        //LOG.Info("Exited sendConnection(string key, int cfacct, string phonenumber, string info, int delay)");
    }
}