Trying to create and debug Teams calling and meeting bot from Bot Framework v4 for CPI project. found here: CallingBotSample I have gone through all the steps correctly But I have some problems which got me stuck.
Tunneling with Ngrok work fine (200 OK) for /api/callback
and /api/messages
Problem 1: AdaptiveCard v1.3 is not showing when the Bot is starting.
Fact: I want the card to show every time the bot is starting as shown in this link: Calling Bot
Problem 2: OnMessageActivityAsync()
get the request from user such as createcall
However the turnContext.Activity.Text
has the value But turnContext.Activity.Value
returns null
and that will result on Bot showing message but not calling or joining meeting.
Snip:
protected override async Task OnMessageActivityAsync(ITurnContext<IMessageActivity> turnContext, CancellationToken cancellationToken)
{
if (string.IsNullOrEmpty(turnContext.Activity.Text))
{
//turnContext.Activity.Text = null;
dynamic value = turnContext.Activity.Value;
if (value != null)
{
string type = value["type"];
type = string.IsNullOrEmpty(type) ? "." : type.ToLower();
await SendReponse(turnContext, type, cancellationToken);
}
}
else
{
await SendReponse(turnContext, turnContext.Activity.Text.Trim().ToLower(), cancellationToken);
//await OnTurnAsync(turnContext, cancellationToken);
}
}
What I want is a 100% working calling bot that can join any user calls and record it
Does anyone have a subjection or a solution to my questions?
We tried to repro this issue at our end, but everything works for us. We are able to get Welcome card and calls are getting placed without any issue.We can record the call as well. Also able to join scheduled meeting and Invite participants to meetings as mentioned.
Please make sure you have enabled calling and configured proper endpoint on Teams channel page.