CallFire has a new API!
We are proud to announce the launch of our API 2.0! Learn more about our streamlined, transactional and broadcast APIs. This version of the API documentation will remain available for reference only. There will be no new development, only bug fixes. We highly recommend upgrading to our newer and more sophisticated documentation.
Return list of sound meta info that includes id, status, name, length, etc...
This operation only returns meta info, not the actual sound data. The
raw binary sound data can be obtained from the GetSoundData
.
Request Parameters
Parameter | Demo Value | Description | Data Type |
---|---|---|---|
QuerySoundMeta | SoundMeta request by query | object | |
MaxResults | Max number of results to return limited to 1000 (default: 1000) | long | |
FirstResult | Start of next result set (default: 0) | long |
* indicates choice value, bolded parameters are required
Response Parameters
Parameter | Description | Data Type |
---|---|---|
SoundMetaQueryResult | List of SoundMeta returned from query | |
TotalResults | Results count | long |
SoundMeta | Sounds are prerecorded audio stored on CallFire, and made available for use in voice broadcasts and IVRs. | |
id | long | |
Status | [PENDING, ACTIVE, FAILED, ARCHIVED, SCRUBBED] | SoundStatus |
Name | Name of sound meta | string |
Created | DateTime when sound was created | dateTime |
LengthInSeconds | Duration of stored sound in seconds | int |
<?php
/**
* You'll need your login/password pair when you create the SOAP client.
* Don't use the fake login/password provided here; it's just for show and
* won't work.
*/
$wsdl = "http://callfire.com/api/1.1/wsdl/callfire-service-http-soap12.wsdl";
$client = new SoapClient($wsdl, array(
'soap_version' => SOAP_1_2,
'login' => 'YourLoginId',
'password' => 'YourPassword'));
/**
* QuerySoundMeta. List all sound meta data for sounds store in account.
*/
$query = new stdclass();
$query->MaxResults = 2; // long
$query->FirstResult = 0; // long
$response = $client->QuerySoundMeta($query);
print_r($response);
// Sample $response:
//
// stdClass Object (
// [TotalResults] => 0
// [SoundMeta] => Array(
// [0] => stdClass Object(
// [Status] => ACTIVE
// [Name] => My API Test Sound
// [Created] => 2013-03-07T10:44:36-08:00
// [LengthInSeconds] => 2
// [id] => 9
// )
// [1] => stdClass Object (
// [Status] => ACTIVE
// [Name] => Sample Audio for Live Answers
// [Created] => 2013-02-27T15:43:54-08:00
// [LengthInSeconds] => 11
// [id] => 4
// )
// )
// )
?>