Skip to content

Commit

Permalink
Call Recording GA version update. (#115)
Browse files Browse the repository at this point in the history
* Call Automation GA Version Update
* return state in response of getRecordingState API.
---------

Co-authored-by: maulinasharma <[email protected]>
  • Loading branch information
Mohammad Irfan and v-mausha authored Jun 19, 2023
1 parent 88aa5d8 commit 2a22af6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion CallRecording/Controllers/RecordingsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ public RecordingsController(IConfiguration configuration, ILogger<RecordingsCont
[HttpGet("OutboundCall")]
public async Task<IActionResult> 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);
Expand Down Expand Up @@ -143,7 +147,7 @@ public async Task<IActionResult> 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}");
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions CallRecording/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion CallRecording/RecordingApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Azure.Communication.CallAutomation" Version="1.0.0-alpha.20230601.1" />
<PackageReference Include="Azure.Communication.CallAutomation" Version="1.0.0" />
<PackageReference Include="Azure.Messaging.EventGrid" Version="4.12.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
Expand Down

0 comments on commit 2a22af6

Please sign in to comment.