microsoft-graph-comms-samples icon indicating copy to clipboard operation
microsoft-graph-comms-samples copied to clipboard

Can we invite the resource account of Media Bot [AksSamples/teams-recording-bot] from a IVR Bot using Invite PSTN Participants API?

Open bijaykush opened this issue 2 years ago • 1 comments

Scenario: ResourceAccount1 is created with appId of IVR Bot. ResourceAccount2 is created with appId of Media Bot.

Call coming to PSTN number of ResourceAccount1 gets answered in IVR Bot and a prompt is played as per our requirements. And we need to record the all the call between the caller, PSTN number and Teams user, etc., so we used Media Bot (Teams Recording Bot: https://github.com/microsoftgraph/microsoft-graph-comms-samples/tree/master/Samples/V1.0Samples/AksSamples(Deprecated)/teams-recording-bot) as a 2nd component. Teams Recoding Bot works fine independently when recorded user (policy assigned user) joins the call with non-recorded user and records the audio.

ResourceAccount2 was used to create recording policy with PS commands $policyName = 'RecordingPolicy' New-CsTeamsComplianceRecordingPolicy -Identity $policyName -Enabled $true -ComplianceRecordingApplications @(New-CsTeamsComplianceRecordingApplication -Parent $policyName -Id #################) And then the same ResourceAccount2 was assigned with fake PSTN number so that the number can be used for invitation through the API.

Afterwards, we invited the ResourceAccount2 (with a fake number assigned as PSTN to it). We used Invite PSTN Participant API for resource account. (Reference: https://learn.microsoft.com/en-us/graph/api/participant-invite?view=graph-rest-1.0&tabs=http#example-4-invite-one-pstn-participant-to-an-existing-call), it does not work. Following issues happens:

Issue from teams recording bot logs Call status gets to Establishing state first on CallUpdate event, and then it retries for 3 times and gets terminated state as shown in the screenshot image

Expected behavior Teams Recording Bot should join the call and starts recording of conversations between the caller, receiver and bot(play prompt etc.)

Graph Communications SDK image

Logs

Call status updated to Establishing - Call status updated to Establishing - Application Insights Telemetry: {"name":"AppTraces","time":"2023-11-16T16:33:15.2364372Z","iKey":"a3186f6a-db5c-4358-ae64-e83919606edd","tags":{"ai.cloud.roleInstance":"DESKTOP-JI3FGAT","ai.internal.sdkVersion":"dotnet:2.21.0-429"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Call status updated to Establishing -"}}} Call status updated to Terminated - Server Internal Error. DiagCode: 500#3003.@ Call status updated to Terminated - Server Internal Error. DiagCode: 500#3003.@ Application Insights Telemetry: {"name":"AppTraces","time":"2023-11-16T16:33:21.0344176Z","iKey":"a3186f6a-db5c-4358-ae64-e83919606edd","tags":{"ai.cloud.roleInstance":"DESKTOP-JI3FGAT","ai.internal.sdkVersion":"dotnet:2.21.0-429"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Call status updated to Terminated - Server Internal Error. DiagCode: 500#3003.@"}}} Application Insights Telemetry: {"name":"AppTraces","time":"2023-11-16T16:33:22.6189522Z","iKey":"a3186f6a-db5c-4358-ae64-e83919606edd","tags":{"ai.cloud.roleInstance":"DESKTOP-JI3FGAT","ai.internal.sdkVersion":"dotnet:2.21.0-429"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Answer Bot"}}} Call status updated to Establishing - Call status updated to Establishing - Application Insights Telemetry: {"name":"AppTraces","time":"2023-11-16T16:33:23.4826065Z","iKey":"a3186f6a-db5c-4358-ae64-e83919606edd","tags":{"ai.cloud.roleInstance":"DESKTOP-JI3FGAT","ai.internal.sdkVersion":"dotnet:2.21.0-429"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Call status updated to Establishing -"}}} Call status updated to Terminated - Server Internal Error. DiagCode: 500#3003.@ Call status updated to Terminated - Server Internal Error. DiagCode: 500#3003.@ Application Insights Telemetry: {"name":"AppTraces","time":"2023-11-16T16:33:28.9488054Z","iKey":"a3186f6a-db5c-4358-ae64-e83919606edd","tags":{"ai.cloud.roleInstance":"DESKTOP-JI3FGAT","ai.internal.sdkVersion":"dotnet:2.21.0-429"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Call status updated to Terminated - Server Internal Error. DiagCode: 500#3003.@"}}} Application Insights Telemetry: {"name":"AppTraces","time":"2023-11-16T16:33:30.3718261Z","iKey":"a3186f6a-db5c-4358-ae64-e83919606edd","tags":{"ai.cloud.roleInstance":"DESKTOP-JI3FGAT","ai.internal.sdkVersion":"dotnet:2.21.0-429"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Answer Bot"}}} Call status updated to Establishing - Call status updated to Establishing - Application Insights Telemetry: {"name":"AppTraces","time":"2023-11-16T16:33:31.1649702Z","iKey":"a3186f6a-db5c-4358-ae64-e83919606edd","tags":{"ai.cloud.roleInstance":"DESKTOP-JI3FGAT","ai.internal.sdkVersion":"dotnet:2.21.0-429"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"Call status updated to Establishing -"}}} Call status updated to Terminated - Server Internal Error. DiagCode: 500#3003.@ Call status updated to Terminated - Server Internal Error. DiagCode: 500#3003.@

@ksikorsk @1fabi0 @JasonTheDeveloper @ssulzer

Any help/feedback or solution for our requirement would be appreciated.

bijaykush avatar Nov 16 '23 17:11 bijaykush

Can you please share a Scenario-Id or Call-Id. It looks like you are using old versions (from 2020) of the Graph Communications & media SDKs, so please consider updating to the latest.

ssulzer avatar Dec 01 '23 23:12 ssulzer