看起来您正在引用较早版本的CallFire API。有一个新的界面加上一个提供GetSoundData方法的新API。调用此方法将返回原始MP3数据,您还可以请求WAV。
https://www.callfire.com/api-documentation/version/1.1/CallService/GetSoundData
文档提供了一个PHP的例子,但这些参数应该是相同的,如果你的端口成另一种语言。
<?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'));
/**
* GetSoundData. Get raw binary sound data (MP3 or WAV) for stored sound asset.
*/
$request = new stdclass();
$request->Id = 9; // long required
$request->Format = 'MP3'; // SoundFormat [WAV, MP3]
$response = $client->GetSoundData($request);
$byteCount = file_put_contents("my_returned_sound.mp3", $response);
echo "byteCount: " . $byteCount;
// Sample response:
// byteCount: 22749
?>