diff --git a/CallRecording/Controllers/RecordingsController.cs b/CallRecording/Controllers/RecordingsController.cs index ebc4ddf7..5f3db55f 100644 --- a/CallRecording/Controllers/RecordingsController.cs +++ b/CallRecording/Controllers/RecordingsController.cs @@ -50,6 +50,10 @@ public RecordingsController(IConfiguration configuration, ILogger OutboundCall([FromQuery] string targetPhoneNumber) { + if(!targetPhoneNumber.Contains("+")) + { + targetPhoneNumber = targetPhoneNumber.Replace(" ", "+"); + } var callerId = new PhoneNumberIdentifier(_configuration["ACSAcquiredPhoneNumber"]); var target = new PhoneNumberIdentifier(targetPhoneNumber); var callInvite = new CallInvite(target, callerId); @@ -143,7 +147,7 @@ public async Task GetRecordingStateAsync([FromQuery] string recor var response = await _client.GetCallRecording().GetStateAsync(_recordingId).ConfigureAwait(false); _logger.LogInformation($"GetRecordingStateAsync response -- > {response}"); - return Ok(); + return Ok($"{response.Value.RecordingState}"); } /// diff --git a/CallRecording/README.MD b/CallRecording/README.MD index 96bbe89d..93454ea1 100644 --- a/CallRecording/README.MD +++ b/CallRecording/README.MD @@ -47,7 +47,7 @@ Call Recording enables you to record multiple calling scenarios available in Azu 1. Navigate to your Communication Service resource on Azure portal and select `Events` from the left side blade. 2. Click `+ Event Subscription` to create a new subscription, provide `Name` field value. 3. Under Topic details, choose a System Topic or create new, no changes required if its already have topic name. -4. Under `Event Types` Filter for `Recording File Status Updated(Preview)` event. +4. Under `Event Types` Filter for `Recording File Status Updated` event. 5. Choose `Endpoint Type` as `Web Hook` and provide the public url generated by Dev Tunnels. It would look like `https://21pdf6lm-44348.usw2.devtunnels.ms/recordingFileStatus`. 6. Click `Create` to complete the event grid subscription. The subscription is ready when the provisioning status is marked as succeeded. **Note:** Application should be running to able to create the `Web Hook` successfully. @@ -60,7 +60,7 @@ Once App is running local, you will see all list of exposed API on swagger. - Try it out `GET OutboundCall`, provide the Target PSTN phone number to get the call. - `Execute`, accept the call on Target PSTN Phone number, Keep call running. 2. Step 2. Start Recording. - - Try it out `POST StartRecording`, provide the serverCallId value, optional if recording the same call started in step1. + - Try it out `GET StartRecording`, provide the serverCallId value, optional if recording the same call started in step1. - `Execute`, recording would be started. 3. Step 3. (Optional) Execute `POST PauseRecording` and then `POST ResumeRecording`, passing recordingId is optional. 4. Step 4. Execute `DELETE StopReocording` for stop the recording. diff --git a/CallRecording/RecordingApi.csproj b/CallRecording/RecordingApi.csproj index 3188e071..f2bfb19d 100644 --- a/CallRecording/RecordingApi.csproj +++ b/CallRecording/RecordingApi.csproj @@ -5,7 +5,7 @@ True - +