Contents |
This service provides you with the capability to purchase an inbound number or forward your calls to a number.
The list service allows you to . The WSDL for which is available here: Inbound Service WSDL.
Use this function to purchase a single Inbound Number.
public function purchaseSingleNumber($apiKey,$number,$debug)
{
$createOtboundcampaignWsdl = 'http://www.callfire.com/service/InboundService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$purchaseparams = array(
'apiKey' => $apiKey,
'number' => $number
);
try
{
$purchaseSingleNumberResponse = $campaignOutboundClient->purchaseSingleNumber($purchaseparams);
$campaignId = $purchaseSingleNumberResponse->out;
if($debug)
{
echo "Purchase Status :: ".$campaignId;
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."<br/>";
}
}
}
public string purchaseSingleNumber(string apiKey, string number)
{
//LOG.Info("Entered purchaseSingleNumber(string apiKey, string number)");
try
{
string purchaseNumberResponse = this.inboundService.purchaseSingleNumber(apiKey, number);
return purchaseNumberResponse;
}
catch (Exception e)
{
string msg = "Unable to purchaseSingleNumber";
LOG.Error(msg);
throw new InboundServiceException(msg, e);
}
finally
{
//LOG.Info("Exited purchaseSingleNumber(string apiKey, string number)");
}
}
Parameters
public function forwardSingleNumber($apiKey,$publicNumber,$sourceNumber,$recording,$recordFlag,$debug)
{
$createOtboundcampaignWsdl = 'http://www.callfire.com/service/InboundService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$handle = fopen($recording,'r');
$contents = fread($handle,filesize($recording));
$rec = $contents;
$createcampaign = array(
'apiKey' => $apiKey,
'publicNumber' => $publicNumber,
'sourceNumber' => $sourceNumber,
'recording' => $rec,
'recordFlag' => $recordFlag
);
try
{
$createUserRespopnse = $campaignOutboundClient->forwardSingleNumber($createcampaign);
$campaignId = $createUserRespopnse->out;
if($debug)
{
print_r($campaignId);
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."<br/>";
}
}
}
public string forwardSingleNumber(string apiKey, string publicNumber, string sourceNumber, byte[] recording, Boolean recordFlag)
{
//LOG.Info("Entered forwardSingleNumber(string apiKey, string publicNumber, string sourceNumber, byte[] recording, Boolean recordFlag)");
try
{
string forwardSingleNumberResponse = this.inboundService.forwardSingleNumber(apiKey, publicNumber, sourceNumber, recording, recordFlag);
return forwardSingleNumberResponse;
}
catch (Exception e)
{
string msg = "Unable to forward single number";
LOG.Error(msg);
throw new InboundServiceException(msg, e);
}
finally
{
//LOG.Info("Exited forwardSingleNumber(string apiKey, string publicNumber, string sourceNumber, byte[] recording, Boolean recordFlag)");
}
}
Call Tracking and Inbound Services are available through the API and the CallFire web portal.
Service WSDL = https://www.callfire.com/service/InboundService?wsdl
Click here for CallFire API documenation.
