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.
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.
The list service allows you to . The WSDL for which is available here: Direct Connect Service WSDL.
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
<?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>
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/>";
}
}
}
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);
}
}
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
<?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>
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/>";
}
}
}
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);
}
}
Use this function to listen to an agent's call. Parameters
<?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>
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/>";
}
}
}
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);
}
}
<?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>
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/>";
}
}
}
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);
}
}
Parameters
<?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>
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/>";
}
}
}
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);
}
}
Use this function to get the agent information
<?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>
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/>";
}
}
}
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);
}
}
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 =
Parameters
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/>";
}
}
}
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);
}
}
Use this function to the list of all the agents
<?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>
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/>";
}
}
}
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);
}
}
Use this function to login an agent.
<?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>
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/>";
}
}
}
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);
}
}
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
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/>";
}
}
}
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);
}
}
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
Use this function to redirect a call to a different number
Parameters
<?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>
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/>";
}
}
}
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);
}
}
Use this function to start an existing campaign Parameters
<?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>
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/>";
}
}
}
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);
}
}
Use this function to stop a campaign Parmeters
<?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>
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/>";
}
}
}
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);
}
}
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);
}
}
