Inbound

Contents

Inbound and Call Tracking

Description

This service provides you with the capability to purchase an inbound number or forward your calls to a number.

WSDL

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


Methods

purchaseSingleNumber

Use this function to purchase a single Inbound Number.

  • apiKey - 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".
  • numbers - This is the number that you wish to purchase
Sample PHP Code
	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/>";
			}
		}
	}
Sample C# Code
        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)");
            }
        }

forwardSingleNumber

Parameters

  • apiKey - 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".
  • publicNumber - When somebody calls this number, your call gets forwarded to the source number that you specify.
  • sourceNumber - This is the number to which the call would be forwarded.
  • recording - This is the recording file that would be played
  • recordFlag - Set this true if you want a recording to be played when the call gets forwarded.
Sample PHP Code
	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/>";
			}
		}
	}
Sample C# Code
        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)");
            }
        }

Overview

Call Tracking and Inbound Services are available through the API and the CallFire web portal.

Quick Links

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

CallFire XML

Click here for CallFire API documenation.