Fatih Aydin
Fatih Aydin

Reputation: 1

ACS Video Call Recording servercallId API Error

I developed a project that can make video calls with the "QuickStart: Add 1:1 video calling" and "Rooms Call". When I access the Call Id value from this project and use it in the API, I get this error;

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

ErrorCode: 8527

Content:

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

console.log

console.log output

Example call 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);
    }
}

Although I am using the original code without making many changes, this issue persists.

CallRecording API

QuickStart: Add 1:1 video calling to your app

What could I be doing wrong? I applied all the articles and solution suggestions but I couldn’t get a result.Despite having an active video call, I keep encountering the error Invalid join identity, cannot join call.

Upvotes: 0

Views: 141

Answers (1)

Naveen Sharma
Naveen Sharma

Reputation: 1308

I tried using your code even I got the same error .

Use RecordingStateCallbackUri after specifying Wav.

I have refered this MSDOC to configure call recording and make sure call should be active no need add
serverCallIdin get Description.

enter image description here

Below code is to receive recordingId during initiation of the call .

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

enter image description here

The alternate direct way to join a received call event is by using AnswerCallAsync(options) to get answer_result. You can then use ServerCallId to start the call recording.

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


For more details, refer to this GitHub repository for information on recording status and how to download it

Output:
enter image description here

Upvotes: 0

Related Questions