您似乎在引用旧版本的 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
?>