microsoftgraph / microsoftgraph/microsoft-graph-comms-samples

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

Open
#678 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
253
Forks
275
Avg merge
1d 5h
Merged PRs (30d)
1

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Teams recording bot sample at AksSamples(Deprecated)/teams-recording-bot and the Invite PSTN Participants API example linked in the issue. Reproduce the invitation flow using the two resource accounts, then inspect the Establishing-to-Terminated transitions and 500#3003 logs; done means identifying whether this configuration is supported and documenting the required correction or limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
api, audio-video-rtc
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.