ACS 视频通话录音服务器callId API 错误

问题描述 投票:0回答:1

我开发了一个可以通过“快速入门:添加1:1视频通话”和“房间通话”进行视频通话的项目。当我从该项目访问 Call Id 值并在 API 中使用它时,出现此错误;

Invalid join identity, cannot join call. Status: 400 (Bad Request)

错误代码:8527

内容:

{“error”:{“code”:“8527”,“message”:“Invalid join identity, cannot join call.”}}

console.log

console.log output

呼叫 ID 示例:34117f27-6459-4826-9v44-756rdde1c313

[HttpGet("StartRecording")]
public async Task<IActionResult> StartRecordingAsync([FromQuery] string serverCallId)
{
    try
    {
        _serverCallId = serverCallId ?? _client.GetCallConnection(_callConnectionId).GetCallConnectionProperties().Value.ServerCallId;

        StartRecordingOptions recordingOptions = new StartRecordingOptions(new ServerCallLocator(_serverCallId))
        {
            RecordingContent = RecordingContent.Audio,
            RecordingChannel = RecordingChannel.Unmixed,
            RecordingFormat = RecordingFormat.Wav,
        };

        var callRecording = _client.GetCallRecording();
        var response = await callRecording.StartAsync(recordingOptions).ConfigureAwait(false);

        _recordingId = response.Value.RecordingId;
        return Ok($"RecordingId: {_recordingId}");
    }
    catch (Exception ex)
    {
        return BadRequest(ex.Message);
    }
}

虽然我使用的是原始代码,没有进行太多更改,但这个问题仍然存在。

通话录音API

快速入门:向您的应用添加 1:1 视频通话

我可能做错了什么?我应用了所有文章和解决方案建议,但无法得到结果。尽管正在进行视频通话,但我仍然遇到错误

Invalid join identity, cannot join call.

javascript c# azure acs azure-communication-services
1个回答
0
投票

我尝试使用你的代码,即使我遇到了同样的错误。

指定

RecordingStateCallbackUri
后使用
Wav

我已参考此 MSDOC 来配置通话录音并确保通话应处于活动状态,无需添加

serverCallId
在获取描述中。

enter image description here

下面的代码是在发起呼叫期间接收

recordingId

 RecordingFormat = RecordingFormat.Wav, 
    RecordingStateCallbackUri = new Uri(_configuration["CallbackUri"])  

enter image description here

加入接听电话事件的另一种直接方法是使用

AnswerCallAsync(options)
获取
answer_result
。然后您可以使用
ServerCallId
开始通话录音

if (answer_result.IsSuccess)  
{  
  
CallLocator callLocator = new ServerCallLocator(answer_result.SuccessResult.ServerCallId);  
.....
......
}


有关更多详细信息,请参阅此 GitHub 存储库,了解有关录制状态以及如何下载的信息

输出:
enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.