MS Teams call event - microsoft-teams

we have a windows form made using VB.net
Is there an API we can use, so that when a call is received in Teams an event is triggered?
And in the event it can determine the caller number?
And is there an event for when the call is finished, which can determine how long the call lasted?
Thanks

There is no direct way that you can handle the call triggered event at your custom application but you can get the call related details using Graph API: Reference doc https://learn.microsoft.com/en-us/graph/api/callrecords-callrecord-get?view=graph-rest-1.0&tabs=http
In order to get the Id which getting use to fetch callRecords you need to Create subscription to get call notifications.
Create subscription- Subscribes a listener application to receive change notifications when the requested type of changes occur to the specified resource in Microsoft Graph.

Related

Azure Communication Services - Teams Calls

Hi with the new ACS will it be possible to fire an event when a call is answered and fire an event after the call has finished?
I'm wanting to capture the number of the call that has been answered and then open a program to pop up the details of the caller.
Thanks
It is possible to hook to EventGrid events:
Call Started
Call Ended
You can extract the phone number from rawId or use the new createIdentifierFromRawId method to convert it to the correct identifier type for further usage.
See the events reference and the quickstart for Azure Communication Services.
You can also listen to some events with the Call Automation SDK.

In Google DialogFlow CX, is it possible to call on an external API, then get the callback response after 15min?

I am using an exteranl API that do some work for 15min, when it finish it will call any URL you define in your initial request to send the results to.
Is it possible for dialogFlow to accept this result in 15min? Is there like a built-in async response handler in DialogFlow?
If you are calling external APIs via webhook, it would be subject to the maximum webhook timeout limit of 30 seconds. After the response timeout is exceeded, Dialogflow invokes a webhook error or timeout built-in event and continues processing as usual. Therefore, Dialogflow would no longer accept webhook responses more than the set timeout limit.
Note that conversational interfaces are meant to be designed as a continuous message exchange between the end user and the app/bot. If your web service requires more time for executing operations in the background and this cannot be optimized, consider redesigning the conversation flow in such a way that end users don't wait for the app/bot to reply for more than the set webhook timeout limit.
If you have your own custom application (integrated using APIs or Client Libraries), you can instead call/invoke the function that needs 15 minutes of work (let’s call this function_1) from your custom application.
Here’s a basic setup:
User enters a query from the interface of your custom application.
Your custom application sends the user query with the Detect Intent
request to the Dialogflow agent (using APIs or Client Libraries).
After your custom application receives a Detect Intent response from
the agent, you can create code to get the intent name or event name
from the detectIntentResponse.queryResult.match.intent.displayName
or match.event response json respectively and then call/invoke
function_1 based on the intent or event matched.
Once function_1 is finished processing, you can either send a direct response to the
user in your custom application’s interface or send a Detect Intent
request to your agent so it matches an Intent and sends the intent
response back to your custom application.
No, it won't be possible as you describe it. The only way to call external services is through webhooks, but these are thought as calls that return a very specific object which Dialogflow then returns as an answer to the user directly, so they are inherently synchronous.
What you could do instead is think of a workaround. I don't know the specific of what service you're calling, but you could set up a small server to handle the webhook response from dialogflow which doesn't do anything except trigger the call to the external api, and when you get the answer you could process it (put the relevant content inside a "fulfilment" object as per Dialogflow specification) and trigger an event in your agent through the dialogflow API.
so the final process could look something like this.
user asks for e.g. "pizza": the right intent is triggered and the route for that intent calls a webhook server
your webhook server receives the call from dialogflow and calls the external api asking for the list of all pizzas ever created. it returns an empty fulfilment to the server
when the webhook server receives the response after 15 mins it triggers an event in the agent (look into the dialogflow api for your programming language of choice: python, node, java) and injects some parameters in the request, which you can then use to form a sentence in the agent
when I was just starting out I found this very useful to get a grasp of what the platform expects you to do in terms of interacting with external services, take a look at the graph especially which I think makes it clearer

Retrieve caller-ID in Microsoft Teams in realtime

I'm trying to integrate Teams with an external service by using a Teams Bot/App. The app should call an external API with the caller-ID of the incoming PSTN call.
My success went so far, that I could get a list of the last calls but they were far away from being realtime and the caller-ID was masked.
Is it possible at all to "listen" to call metadata in realtime?
You can Retrieve the Call id by Subscribe for Microsoft Graph change notifications to be notified when your user's data changes, so you don't have to poll for changes. check Use the Microsoft Graph API to get change notifications also check this sample. when you subscribe to call

Disallow user to make a call when there are no more credits: Sinch Javascript SDK

My application allows unlimited instant messages for free, but takes credits for calls. I want to be able to disallow user to make a call when he does not have any more credits. How in a ideal scenario is this managed using javascript SDK?
I am coming from a standpoint, that although I am able to control this behavior through some validations in code itself, but what happens when the user is a hacker? He can go to console and call javascript methods of its own such as removeListeners and then callClient.callUser(userId). How do you protect sinchClient in such case? Thanks.
Note: I am open to provide more information if the question is not clear.
Sinch exposes a REST based callback mechanism to control your call flow. You can set a callback URL in the Sinch Portal under Applications >> Voice and Video settings. Each call will then trigger a Incoming Call Event (documented here: https://www.sinch.com/docs/voice/rest/#callbackapi) and you can control whether or not to connect this call via the callback response.

Glympse API event handling

I am trying to launch glympse app by using an intent and receiving the information through broadcast. Is there any way that I will be notified about the events occurring like ticket removed, expired, updated etc?
There sure is.
We created a library project to make this easier for you. It can be found here: https://github.com/Glympse/glympse-app-sdk/tree/master/Android/GlympseIntentsLib
A sign-in is required to view these documents that might be helpful.
Tutorial: https://developer.glympse.com/Content/client/app/guides/Glympse_Intents_Tutorial.html
Reference Docs: https://developer.glympse.com/Content/client/app/guides/Glympse_Intents_Reference.html
Specifically, check out the method CreateGlympseParams.setCallbackAction(String). This will allow you to set an action which will be used to broadcast a message back to your app.
Another option is to use CreateGlympseParams.setEventsListener(EventsListener). With this method, you can supply an object that implements GlympseApp.EventsListener. Using this method, our library handles the broadcast under the covers and your object's methods will be invoked as the event occur.

Resources