Direct Connect Service

The direct connect service is an excellent way to control the CallFire dialer and bypass the predictive logic. It is an excellent system, for example, when you have a list of old customers that need targeted calls backs.

Direct Connect Service

Description

The direct connect service is an excellent way to control the CallFire dialer and bypass the predictive logic. It is an excellent system, for example, when you have a list of old customers that need targeted calls backs.

WSDL

The list service allows you to . The WSDL for which is available here: Direct Connect Service WSDL.

Methods

agentLogin

Use this function to login an agent. The agent will receive a call and their agent id would be played to them. They will use this agent id to log in to CallFire.com

  • api_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 id of the campaign for which you want your agent to login.
  • phonenumber - This is the phone number of the agent. Agent will receive a call on this number.
  • userId - This is the user id that would be assigned to that agent.
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:agentLogin 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>-8113</tnsa:campaignId>
      <tnsa:phonenumber>string</tnsa:phonenumber>
      <tnsa:userId>string</tnsa:userId>
    </tnsa:agentLogin>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Sample PHP Code
	public function agentLogin($api_key,$campaignId,$phonenumber,$userId,$debug)
	{
		$createOtboundcampaignWsdl = 'https://www.callfire.com/service/DirectConnectService?wsdl';
		$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));

		$createcampaign = array(
   		'key' => $api_key,
   		'campaignId' => $campaignId,
		'phonenumber'=> $phonenumber,
		'userId' => $userId
		);
		try
		{
			$agentlogin = $campaignOutboundClient->agentLogin($createcampaign);
			if($debug)
			{
				echo "Agent Login Success";
			}
		}
		catch(SoapFault $error)
		{
			if($debug)
			{
				echo $error."<br/>";
			}
		}
	}
Sample C# Code
        public void agentLogin(string key,long campaignId,string phonenumber,string userid)
        {
            try
            {
                this.directConnectService.agentLogin(key,campaignId,phonenumber,userid);
            }
            catch(Exception e)
            {
                string msg = "Unable to do agentLogin(string key,long campaignId,string phonenumber,string userid)";
                LOG.Error(msg);
                throw new DirectConnectServiceException(msg, e);
            }
        }

agentLoginWithMusicOnHold

Use this function to login an agent. The agent will receive a call and their agent id would be played to them. They will use this agent id to log in to CallFire.com

  • api_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 id of the campaign for which you want your agent to login.
  • phonenumber - This is the phone number of the agent. Agent will receive a call on this number.
  • userId - This is the user id that would be assigned to that agent.
  • musicOnHold - This is the music that would be played on hold.
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:agentLoginWithMusicOnHold 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>-8113</tnsa:campaignId>
      <tnsa:phonenumber>string</tnsa:phonenumber>
      <tnsa:userId>string</tnsa:userId>
     <tnsa:musicOnHold>string</tnsa:musicOnHold>
    </tnsa:agentLoginWithMusicOnHold>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Sample PHP Code
	public function agentLoginWithMusicOnHold($api_key,$campaignId,$phonenumber,$userId,$musicOnHold,$debug)
	{
		$createOtboundcampaignWsdl = 'https://www.callfire.com/service/DirectConnectService?wsdl';
		$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));

		$createcampaign = array(
   		'key' => $api_key,
   		'campaignId' => $campaignId,
		'phonenumber'=> $phonenumber,
		'userId' => $userId,
		'musicOnHold' => $musicOnHold
		);
		try
		{
			$agentlogin = $campaignOutboundClient->agentLoginWithMusicOnHold($createcampaign);
			if($debug)
			{
				echo "Agent Login Success";
			}
		}
		catch(SoapFault $error)
		{
			if($debug)
			{
				echo $error."<br/>";
			}
		}
	}
Sample C# Code
       public void agentLoginWithMusicOnHold(string key,long campaignId,string phonenumber,string userid,string musiconhold)
        {
            try
            {
                this.directConnectService.agentLoginWithMusicOnHold(key,campaignId,phonenumber,userid,musiconhold);
            }
            catch(Exception e)
            {
                string msg = "Unable to call agentLoginWithMusicOnHold(string key,long campaignId,string phonenumber,string userid,string musiconhold)";
                LOG.Error(msg);
                throw new DirectConnectServiceException(msg, e);
            }
        }

barge

Use this function to listen to an agent's call. Parameters

  • api_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 - 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 id of the campaign that you want to stop
  • agentId - This is the id of the agent
  • phonenumber - This is the phone number of the agent whose conversation you want to listen
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:barge 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>-1386</tnsa:campaignId>
      <tnsa:agentId>string</tnsa:agentId>
      <tnsa:phonenumber>string</tnsa:phonenumber>
    </tnsa:barge>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


Sample PHP Code
	public function barge($api_key,$campaignId,$agentId,$phonenumber,$debug)
	{
		$createOtboundcampaignWsdl = 'https://www.callfire.com/service/DirectConnectService?wsdl';
		$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));

		$createcampaign = array(
   		'key' => $api_key,
   		'campaignId' => $campaignId,
		'agentId' => $agentId,
		'phonenumber'=> $phonenumber
		);
		try
		{
			$Bridge = $campaignOutboundClient->barge($createcampaign);
			if($debug)
			{
				echo "Barge success";
			}
		}
		catch(SoapFault $error)
		{
			if($debug)
			{
				echo $error."<br/>";
			}
		}
	}
Sample C# Code
        public void barge(string key, long campaignId,string agentid,string phonenumber)
        {
            try
            {
                this.directConnectService.barge(key,campaignId,agentid,phonenumber);
            }
            catch(Exception e)
            {
                string msg = "Unable to barge(string key, long campaignId,string agentid,string phonenumber)";
                LOG.Error(msg);
                throw new DirectConnectServiceException(msg, e);
            }
        }

bridgeCall

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:bridgeCall 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>744</tnsa:campaignId>
      <tnsa:agentId>string</tnsa:agentId>
      <tnsa:phonenumber>string</tnsa:phonenumber>
      <tnsa:callerid>string</tnsa:callerid>
    </tnsa:bridgeCall>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Sample PHP Code
	public function bridgeCall($api_key,$campaignId,$agentId,$phonenumber,$callerid,$debug)
	{
		$createOtboundcampaignWsdl = 'https://www.callfire.com/service/DirectConnectService?wsdl';
		$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));

		$createcampaign = array(
   		'key' => $api_key,
   		'campaignId' => $campaignId,
		'agentId' => $agentId,
		'phonenumber'=> $phonenumber,
		'callerid' => $callerid
		);
		try
		{
			$bridgeCall = $campaignOutboundClient->bridgeCall($createcampaign);
			if($debug)
			{
				echo "Bridge Call success";
			}
		}
		catch(SoapFault $error)
		{
			if($debug)
			{
				echo $error."<br/>";
			}
		}
	}
Sample C# Code

        public void bridgeCall (string key, long campaignId,string agentid,string phonenumber,string callerid)
        {
            try
            {
                this.directConnectService.bridgeCall(key,campaignId,agentid,phonenumber,callerid);
            }
            catch(Exception e)
            {
                string msg = "Unable to bridgeCall (string key, long campaignId,string agentid,string phonenumber,string callerid)";
                LOG.Error(msg);
                throw new DirectConnectServiceException(msg, e);
            }
        }

deBridgeCall

Parameters

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:deBridgeCall 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>2055</tnsa:campaignId>
      <tnsa:agentId>string</tnsa:agentId>
    </tnsa:deBridgeCall>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Sample PHP Code
	public function deBridgeCall($api_key,$campaignId,$agentId,$debug)
	{
		$createOtboundcampaignWsdl = 'https://www.callfire.com/service/DirectConnectService?wsdl';
		$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));

		$createcampaign = array(
   		'key' => $api_key,
   		'campaignId' => $campaignId,
		'agentId' => $agentId
		);
		try
		{
			$deBridgeCall = $campaignOutboundClient->deBridgeCall($createcampaign);
			if($debug)
			{
				echo "Call de-Bridged success";
			}
		}
		catch(SoapFault $error)
		{
			if($debug)
			{
				echo $error."<br/>";
			}
		}
	}
Sample C# Code
        public void deBridgeCall(string key, long campaignId, string agentId)
        {
            try
            {
                this.directConnectService.deBridgeCall(key, campaignId, agentId);
            }
            catch (Exception e)
            {
                string msg = "Unable deBridgeCall(string key, long campaignId, string agentId)";
                LOG.Error(msg);
                throw new DirectConnectServiceException(msg, e);
            }
        }

getAgentInfo

Use this function to get the agent information

Parameters
  • api_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 id of the campaign correspoding to which you want to get the agent information.
  • agentId - This is the id of the agent whose information you want to view.
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:getAgentInfo 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>5198</tnsa:campaignId>
      <tnsa:agentId>string</tnsa:agentId>
    </tnsa:getAgentInfo>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Sample PHP Code
	public function getAgentInfo($api_key,$campaignId,$agentId,$debug)
	{
		$createOtboundcampaignWsdl = 'https://www.callfire.com/service/DirectConnectService?wsdl';
		$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));

		$createcampaign = array(
   		'key' => $api_key,
   		'campaignId' => $campaignId,
		'agentId' => $agentId
		);
		try
		{
			$getAgentinfo = $campaignOutboundClient->getAgentInfo($createcampaign);
			$agentInfoReponse = $getAgentinfo->out;
			if($debug)
			{
				echo "Agent Info :: ".$agentInfoReponse;
			}
		}
		catch(SoapFault $error)
		{
			if($debug)
			{
				echo $error."<br/>";
			}
		}
	}
Sample C# Code
        public string getAgentInfo(string key, long campaignId,string agentid)
        {
            try
            {
                string response = this.directConnectService.getAgentInfo(key,campaignId,agentid);
                return response;
            }
            catch(Exception e)
            {
                string msg = "Unable to getAgentInfo(string key, long campaignId,string agentid)";
                LOG.Error(msg);
                throw new DirectConnectServiceException(msg, e);
            }
        }

getAgentId

This function will get you the Agent ID (A unique session id created for each time an agent is logged in) of a user you just logged in. The userId must match. It requires you have =

  1. Already sent an agent login request
  2. The agent is on the phone and has heard your entire intro sound file
  3. The agent has not hung up the phone call

Parameters

  • key = your API Key
  • campaignId = the campaign ID you are using
  • userId = the userid of the agent you logged in
Returns
  • long = the agent id you can use to bridge calls to.
Sample PHP Code
	public function getAgentId($api_key,$campaignId,$userId,$debug)
	{
		$createOtboundcampaignWsdl = 'https://www.callfire.com/service/DirectConnectService?wsdl';
		$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));

		$createcampaign = array(
   		'key' => $api_key,
   		'campaignId' => $campaignId,
		'userId' => $agentId
		);
		try
		{
			$agentId = $campaignOutboundClient->getAgentId($createcampaign);
			$agentIdResponse = $agentId->out;
			if($debug)
			{
				echo "Agent ID :: ".$agentIdResponse;
			}
		}
		catch(SoapFault $error)
		{
			if($debug)
			{
				echo $error."<br/>";
			}
		}
	}
Sample C# Code
        public long getAgentId(string key, long campaignid, string userid)
        {
            try
            {
                long agentid = this.directConnectService.getAgentId(key, campaignid, userid);
                return agentid;
            }
            catch(Exception e)
            {
                string msg = "Unable to getAgentId(string key, long campaignid, string userid)";
                LOG.Error(msg);
                throw new DirectConnectServiceException(msg, e);
            }
        }

getAgentList

Use this function to the list of all the agents

  • api_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 id of the campaign corresponding to which you want to get the list of all agents.
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:getAgentList 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>-7309</tnsa:campaignId>
    </tnsa:getAgentList>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Sample PHP Code
	public function getAgentList($api_key,$campaignId,$debug)
	{
		$createOtboundcampaignWsdl = 'https://www.callfire.com/service/DirectConnectService?wsdl';
		$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));

		$createcampaign = array(
   		'key' => $api_key,
   		'campaignId' => $campaignId
		);
		try
		{
			$getAgentList = $campaignOutboundClient->getAgentList($createcampaign);
			$getAgentListResponse = $getAgentList->out;
			
			if($debug)
			{
				print_r($getAgentListResponse);
			}
		}
		catch(SoapFault $error)
		{
			if($debug)
			{
				echo $error."<br/>";
			}
		}
	}
Sample C# Code
        public string[] getAgentList (string key,long campaignId)
        {
            try
            {
                string[] getAgent_List = this.directConnectService.getAgentList(key,campaignId);
                return getAgent_List;
            }
            catch(Exception e)
            {
                string msg = "Unable to getAgentList (string key,long campaignId)";
                LOG.Error(msg);
                throw new DirectConnectServiceException(msg, e);
            }
        }

kickAgent

Use this function to login an agent.

Parameters
  • api_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 id of the campaign.
  • agentId - This is the id of the agent that you want to login into the system.
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:kickAgent 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>9245</tnsa:campaignId>
      <tnsa:agentId>string</tnsa:agentId>
    </tnsa:kickAgent>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Sample PHP Code
	public function kickAgent($api_key,$campaignId,$agentId,$debug)
	{
		$createOtboundcampaignWsdl = 'https://www.callfire.com/service/DirectConnectService?wsdl';
		$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));

		$createcampaign = array(
   		'key' => $api_key,
   		'campaignId' => $campaignId,
		'agentId' => $agentId
		);
		try
		{
			$kickAgent = $campaignOutboundClient->kickAgent($createcampaign);
			if($debug)
			{
				echo "Agent login success";
			}
		}
		catch(SoapFault $error)
		{
			if($debug)
			{
				echo $error."<br/>";
			}
		}
	}
Sample C# Code
       public void kickAgent(string key,long campaignid,string agentid)
        {
            try
            {
                this.directConnectService.kickAgent(key, campaignid, agentid);
            }
            catch(Exception e)
            {
                string msg = "Unable to kickAgent(string key,long campaignid,string agentid)";
                LOG.Error(msg);
                throw new DirectConnectServiceException(msg, e);
            }
        }

sendAMCallToSound

If the agent hits an answering machine, this function can be used to play back a pre-recorded message to the call. The Agent is immediately available to take the next call.

When this function is called, the CallFire system will wait for the answering machine intro to stop playing before it starts playing your sound file.

Parameters

  • api_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 id of the campaign.
  • agentId - This is the id of the agent.
  • soundFileId - This is the sound file id. You can get this id by logging on to CallFire.com
Sample PHP Code
	public function sendAMCallToSound($api_key,$campaignId,$agentId,$soundFileId,$debug)
	{
		$createOtboundcampaignWsdl = 'https://www.callfire.com/service/DirectConnectService?wsdl';
		$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));

		$createcampaign = array(
   		'key' => $api_key,
   		'campaignId' => $campaignId,
		'agentId' => $agentId,
		'soundFileId' => $soundFileId
		);
		try
		{
			$sendAMCall = $campaignOutboundClient->sendAMCallToSound($createcampaign);
			if($debug)
			{
				echo "send AM Call to Sound Success";
			}
		}
		catch(SoapFault $error)
		{
			if($debug)
			{
				echo $error."<br/>";
			}
		}
	}
Sample C# Code
        public void sendAMCallToSound(string key, long campaignId, string agentid, long soundFileId)
        {
            try
            {
                this.directConnectService.sendAMCallToSound(key,campaignId,agentid,soundFileId);
            }
            catch(Exception e)
            {
                string msg = "Unable to sendAMCallToSound(string key, long campaignId,string agentid,long soundFileId)";
                LOG.Error(msg);
                throw new DirectConnectServiceException(msg, e);
            }
        }

sendAMCallToSoundDirect

If the agent hits an answering machine, this function can be used to play back a pre-recorded message to the call. The Agent is immediately available to take the next call.

When this function is called, the CallFire system will start playing your sound file immediately. It does not wait for any answering machine intro to stop.

Parameters

  1. apikey
  2. campaignId
  3. agentId
  4. soundFileID

redirectCall

Use this function to redirect a call to a different number

Parameters

  • api_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 - 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 id of the campaign that you want to stop
  • agentId - This is the id of the agent
  • phonenumber - This is the phone number to which you want the call to be re-directed
  • callerid - This is the callerid that would appear on all calls
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:redirectCall 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>5115</tnsa:campaignId>
      <tnsa:agentId>string</tnsa:agentId>
      <tnsa:phonenumber>string</tnsa:phonenumber>
      <tnsa:callerid>string</tnsa:callerid>
    </tnsa:redirectCall>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Sample PHP Code
	public function redirectCall($api_key,$campaignId,$agentId,$phonenumber,$callerid,$debug)
	{
		$createOtboundcampaignWsdl = 'https://www.callfire.com/service/DirectConnectService?wsdl';
		$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));

		$createcampaign = array(
   		'key' => $api_key,
   		'campaignId' => $campaignId,
		'agentId' => $agentId,
		'phonenumber'=> $phonenumber,
		'callerid' => $callerid
		);
		try
		{
			$redirectCall = $campaignOutboundClient->redirectCall($createcampaign);
			if($debug)
			{
				echo "Call re-directed";
			}
		}
		catch(SoapFault $error)
		{
			if($debug)
			{
				echo $error."<br/>";
			}
		}
	}
Sample C# Code
        public void redirectCall(string key,long campaignId,string agentId,string phonenumber,string callerid)
        {
            try
            {
                this.directConnectService.redirectCall(key,campaignId,agentId,phonenumber,callerid);
            }
            catch(Exception e)
            {
                string msg = "Unable to redirectCall(string key,long campaignId,string agentId,string phonenumber,string callerid)";
                LOG.Error(msg);
                throw new DirectConnectServiceException(msg, e);
            }
        }

startCampaign

Use this function to start an existing campaign Parameters

  • api_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 id of the campaign that you want to start
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>-8035</tnsa:campaignId>
    </tnsa:startCampaign>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Sample PHP Code
	public function startDCCampaign($api_key,$campaignId,$debug)
	{
		$createOtboundcampaignWsdl = 'https://www.callfire.com/service/DirectConnectService?wsdl';
		$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));

		$createcampaign = array(
   		'key' => $api_key,
   		'campaignId' => $campaignId
		);
		try
		{
			$startCampaign = $campaignOutboundClient->startCampaign($createcampaign);
			if($debug)
			{
				echo "Campaign Started ";
			}
		}
		catch(SoapFault $error)
		{
			if($debug)
			{
				echo $error."<br/>";
			}
		}
	}
Sample C# Code
        public void startCampaign(string key, long campaignId)
        {
            try
            {
                this.directConnectService.startCampaign(key,campaignId);
            }
            catch(Exception e)
            {
                string msg = "Unable to startCampaign(string key, long campaignId)";
                LOG.Error(msg);
                throw new DirectConnectServiceException(msg, e);
            }
        }

stopCampaign

Use this function to stop a campaign Parmeters

  • api_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 - 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 id of the campaign that you want to stop
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>-6584</tnsa:campaignId>
    </tnsa:stopCampaign>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Sample PHP Code
	public function stopDCCampaign($api_key,$campaignId,$debug)
	{
		$createOtboundcampaignWsdl = 'https://www.callfire.com/service/DirectConnectService?wsdl';
		$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));

		$createcampaign = array(
   		'key' => $api_key,
   		'campaignId' => $campaignId
		);
		try
		{
			$stopCampaign = $campaignOutboundClient->stopCampaign($createcampaign);
			if($debug)
			{
				echo "Campaign Stoped ";
			}
		}
		catch(SoapFault $error)
		{
			if($debug)
			{
				echo $error."<br/>";
			}
		}
	}
Sample C# Code
        public void stopCampaign(string key, long campaignId)
        {
            try
            {
                this.directConnectService.stopCampaign(key,campaignId);
            }
            catch(Exception e)
            {
                string msg = "Unable to stopCampaign(string key, long campaignId)";
                LOG.Error(msg);
                throw new DirectConnectServiceException(msg, e);
            }
        }

Sample Client

The following code, written in Java using xFire is showcases the agent login process.

public class DirectConnectClient 
{
	private static final String APIKEY = "6f83c5703d17830d3b7d2wefwlkjwiuqwoioihhnsdf7327f2048a";
	private static final long CAMPAIGNID = 106459;
	
	public static void main(String [] args)
	{
		DirectConnectServiceClient client = new DirectConnectServiceClient();
        
		//create a default service endpoint
        DirectConnectServicePortType service = client.getDirectConnectServiceHttpPort();
        
		//login the agent
		service.agentLogin(APIKEY, CAMPAIGNID, "2135556955", "uuu1");
		
		// Get the list of agents logged in for that campaign ( Just for fun ) 
		List<String> agentList = service.getAgentList(APIKEY, CAMPAIGNID).getString();
		System.out.println(agentList);
		
                // get the Agentid ( Session ID for the agent )
		long agentid = service.getAgentId(APIKEY, CAMPAIGNID, "uuu1");
		
		try
		{
			Thread.sleep(30000L); // 30 seconds wait to make sure agent hears the intro and is ready for the call
		} catch (Exception e) {}
		
		System.out.println("Sending Call..." + agentid);
		
		// The number 3105557076 is the number to which the agent wants to connect.
		service.bridgeCall(APIKEY, CAMPAIGNID, Long.toString(agentid), "3105557076", "2135556955");

		System.out.println("test client completed");
        		
		System.exit(0);
	}
}