Identifiying 'Transferred' calls on MS Teams - microsoft-teams

I'm using MS Teams OpenGraph API to fetch CDR details (ref API: https://graph.microsoft.com/v1.0/communications/callRecords/{callDataRecordId}?$expand=sessions($expand=segments))
It seems to be I'm totally unable to distinguish regular 1-to-1 calls from transferred calls or figuring the path of a call.
The only thing that I can tell from the CDR data is the failureInfo which seems sometimes is:
failreInfo {
stage: callSetup
reason: Other
}
[Update]
The scenario I'm trying to make:
MS User calls a phone number.
MS User puts call on hold. [15 seconds]
MS User resumes call.
MS User transfers call to another MS Teams account.
The other MS Teams account picks up for few seconds and then closes the phone.
An illustrated path:

Related

Get Teams Call state

When I start a call in Teams my user status is set to "busy-inacall" and as I have set "busy-on-busy" in the Teams admin policies, I am not available for a call anymore.
When I'm in a call and a planned meeting in Outlook starts the user status is set to "busy-inAmeeting" and I'm still not available for a call anymore.
When I'm not in a call and a planned meeting in Outlook starts, I am set to "busy-inAmeeting" as well but I'm available for a call.
So the user status/presence does not display the availability for a call.
How can I get (via MS Graph) if is user is available for a call?

Call and online meeting bot - Peer to peer call is terminated automatically

I am trying to develop a simple bot that is supposed to answer incoming call made in personal chat with bot. The bot is employing application hosted media to play or get access to media streams. I am making use of classes and controllers that are implemented in Huebot sample project at Github. The bot is registered on MS Azure and i am using ngrok for local testing and debugging. While debugging after making the call, breakpoints are hit that are placed in 'CallsOnIncoming' or 'CallsOnUpdated' event handlers. So my bot configurations over Azure and in MS Teams seem to be correct. For setting up media platform, I have installed the wildcard SSL certificated issued by Let's Encrypt and CName records are created for corresponding tcp URLs exposed by ngrok. The environment is multi-tenant i.e. bot registration is done on another tenant, while bot is installed and tested in MS Teams on another tenant.
These are Media platform settings:
MediaPlatformInstanceSettings = new MediaPlatformInstanceSettings()
{
CertificateThumbprint = "0B687..................",
InstanceInternalPort = 8445,
InstancePublicPort = 15410,
InstancePublicIPAddress = new IPAddress(0x0),
ServiceFqdn = "4.mycustomdomain.com",
},
Here's the snapshot for ngrok:
The problem is, when call is made to the bot, after 5 to 10 seconds call is terminated automatically. Whereas he Call status should turn to 'Established' and the call shouldn't end until user does this.Please guide, what could be wrong.
The call is terminating because Teams can't connect to your media endpoint of the InstancePublicIPAddress / InstancePublicPort. It timesout (i believe in 15 seconds) and terminates the call when it can't get a media connection.
You need to put the IP address of 4.tcp.ngrok.io from your running ngrok settings above into it.
e.g.
InstancePublicIPAddress = Dns.GetHostEntry("4.tcp.ngrok.io").AddressList[0]
You may want to put error checking around the GetHostEntry call in production code.

What happens to the activity if my end point is not accessible or returns a 500?

I have a Microsoft bot app that can be installed in Teams on a team.
For now, I save the tenant ID + team id in our DB when the app gets installed, via a received activity on our end point.
What happens if my prod is not up at the moment of the installation? (for whatever reason, could be an update or just a technical downtime...)
Is it lost forever? Is it retried?
Same question with a 500 error?
This activity is an example, it could be any other activity. Ex: a user is added/removed, a message has been sent etc...
For OnMembersAddedAsync; unfortunately there is no retry from the Teams side, it fires and forgets.
The information in that Activity will be included in any subsequent send from Teams - so the bot can recover, if the user interacts with the bot again. Messages would just be sent when the bot recovers.
You can find a bit more info on Teams and events here:
How do I send a 1:1 welcome message?

outlook calendar events for rooms

I am making a web app which pulls the names and events of rooms from outlook calendar. I am able to get rooms list but how can I get the calendar schedule for each room. How would the get request look like then?
Here's the link of the tutorial that I used: Build Node.js Express apps with Microsoft Graph
Here's the link of the documentation of the room list: user: findRooms
The getSchedule method get the free/busy availability information for a collection of users, distributions lists, or resources (rooms or equipment) for a specified time period.
POST /users/{id|userPrincipalName}/calendar/getSchedule
If successful, this method returns a 200 OK response code and a collection of scheduleInformation objects for each object in the schedules parameter.
It looks like the API is still in Beta and not yet supported in production applications. So, I'd suggest double check whether it works now in production or not.

Is LUIS limited for use?

I have been receiving exception in my application saying
Exception: Response status code does not indicate success: 403 (Quota Exceeded).
Does this means we are only allowed 1000 hits per application per month on the LUIS?
Anyother justification are welcomed around this exceptions.
There are several quotas on LUIS's keys usage:
Free key:
5 calls / second
10 000 calls / month
Standard key:
50 calls / second
See Azure portal's capture below where the 5/second is visible for free plan:
And link to LUIS pricing here
There is also (or was) an out of Azure preview key good for only 1000 messages per month on a rolling daily window. Not sure if it’s still there but it could be what you’re running into. It was called the bootstrap key and was just using your programmatic api key as the runtime key.
It is also depending on the starter key that was created for each user when using LUIS free from first time, we need to migrate the luis model to a Azure resource, only then we can use 10,000 message free per month as per F0 plan, else it will be 1000 for each user authorizing key.
Reference link https://learn.microsoft.com/en-us/azure/cognitive-services/luis/luis-concept-keys

Resources