microsoftgraph / microsoft-graph-comms-samples

Microsoft Graph Communications Samples
MIT License
208 stars 231 forks source link

Help for bot, getting call notifications #99

Open stefan2410 opened 5 years ago

stefan2410 commented 5 years ago

Hi, I'm trying to register/develop a bot, getting incoming calls notifications and answer/transfer them. My code is based on the IncidentBot . I've registered the bot in Azure with the required API permissions (MS Teams and Skype). I've deployed the AppService and I can see (using SignalR notifications) that it works as expected when I call via PostMan the Rest API (unathorized requests). I tried to test it either with AppService or with ngrok (reserved domain) The Webhook is https://[service url]/callback/calling I don't get incoming calls notifications. We want to relate the bot with a phone number to get incoming calls or (if no possible) with a group where the bot is the only one member. It seems to me that I've not understood the workflow.My testing is (as a teams user) to call the phone number assigned to this group, or to call another user. I expected, in any case, the bot to get all incoming calls notifications at least, but I'm not succesful. I don't want the bot to have interface as a user in teams. I would really appreciate your help. Thanks

stefan2410 commented 5 years ago

My webhook https://[service url]/callback/calling (this is the messaging endpoint in both MSTeams and Skype channels) has never been called from the Teams service. (using either ngrok or deployed AppService) In my code, I've got the bot with DI in my Startup Configure and I can read the messages from CommunicationClient. It seems normal, so the problem should be with the webhook only.

   CommunicationsClientBuilder.cs:122 Build  Assembly: GraphCommunicationsClient
    [INF] CommunicationsClientBuilder.cs:125 Build  Application: IncomingCallsBot{
       "AadApplicationIdentity": {
       "AppId": "43fafe11-d9bc-4678-a82d-2b4e47b4eff5",
      "AppName": "IncomingCallsBot"
     }
  }
    [INF] CommunicationsClientBuilder.cs:128 Build  Product: GraphCommunicationsClient-IncomingCallsBot
    [INF] CommunicationsClientBuilder.cs:131 Build  Version: 1.1.0.581
    [INF] CommunicationsClientBuilder.cs:135 Build  UserAgent: GraphCommunicationsClient-IncomingCallsBot/1.1.0.581
    [INF] DispatcherContainer.cs:111 RegisterDispatcherGetOrAdd  Dispatcher Container registering notification dispatcher for: app/calls
    [INF] NotificationDispatcher.cs:225 Subscribe  Subscribed: app/calls To queue: app/calls
stefan2410 commented 5 years ago

Please, is it possible a bot to get incoming calls notifications without direct calling from Teams user interface, notifications for one group and possibly to answer them and/or transfer them, acccording to our rules ? notifications about incoming PSTN calls or between teams users? I would appreciate your answer.

ksikorsk commented 5 years ago

The only supported way to get incoming call notifications today is to call your bot using Teams client. PSTN support is on it's way.

The answer/transfer APIs will be the same once PSTN support is added. The only difference is that the source identity will be a phone identity.

stefan2410 commented 5 years ago

Thanks @ksikorsk but it was not clear in the documentation. It says only that a bot can't make outbound calls to PSTN. When to expect the PSTN support? a roadmap maybe.

rugt0r commented 5 years ago

This is proving to be an issue for me- I was hoping that I would be able to use the graph API to get details of all ongoing calls, not just the ones involving the bot. I am trying to improve incoming call tracking, but including the bot in every call is an unwieldy solution that doesn't give us a complete picture of what's going on.

@ksikorsk do you know if there are any plans for an API that could expose all ongoing calls for a given tenant? If not, is there a means to request this? It would be more useful than the bot functionality.

Thanks.

ksikorsk commented 5 years ago

If I understand you correctly, you would like to be an observer of the meeting without actually being a participant?

@VinodRavichandran to track this request.

VinodRavichandran commented 5 years ago

Yes, Webhook subscription and notifications for Call events is something we have started designing.

FYI @zhengni-msft

rugt0r commented 5 years ago

Thanks for the feedback, much appreciated.

stefan2410 commented 5 years ago

@VinodRavichandran Would be able to use the "The Webhook subscription and notifications for Call events" in an standalone application and in tenant scope? or only in a bot? There are 2 different use-cases

  1. Get real-time call events (from incoming =>ringing =>answered =>hangup), for all tenant users, by a standalone application or a bot . The notifications will be used to update our history-analytics and for integrations.
  2. Get real-time call events for a tenant's group (or groups) in a bot . a. The bot to be able to answer the call. The goal is to associate the bot with different phone numbers. The bot could be the only group member in such groups (or a variation of specialized bots.) b. Play our IVR ( or add another step to the call queue IVR when the bot answers the call). c. Ring the appropriate users (based on skills, etc) and transfer the call to first user answered the transfer leg, "whisper", recording, get notifications for hangup.
    d. Presence availability to ring the users. We don't have it this very moment. We don't know if users are busy on call or away, not disturb, etc. So, skill hunt is not possible really. Such functionality is part of this user's voice issue
  3. Can we hope the Webhook to be ready till MSIgnite (at least the 1st use-case) ?

If there is a possibility to test something, early and help, I would be very glad.

AHComp commented 4 years ago

so 3 months later what is the progress in the desiging and implementation of notifications for Call events ?

surezg commented 4 years ago

@VinodRavichandran - Looks like Teams Voice platform rollout was preponed to this december which was Q1-2020 before. Do we have any specific updates on the Bot Calling API's this month. Any tentative for full call recording and accepting PSTN to Bot which are not part of current API's.

Appreciate your help!

Thanks, Suresh.

VinodRavichandran commented 4 years ago

Comms APIs were just released in v1 last week. PSTN number assignment is referred in the blog. Recording was not a part of the release

https://developer.microsoft.com/en-us/graph/blogs/microsoft-graph-cloud-communications-apis-are-now-generally-available/

rugt0r commented 4 years ago

Yes, Webhook subscription and notifications for Call events is something we have started designing.

Hi, any update on when this is likely to be available? Being able to list all ongoing calls and their participants (without a bot having to be present in each call) would be very useful to us.

Githamza commented 4 years ago

Hello , I'm strongly interested too, I would like to keep track of notifications from an incoming call that is transfered to a user but without including the bot in the call/meeting ( user should see the incoming number/user when he respond to a call , not the Bot name ) .

Any updates , or workarounds ?

Update: Can we use Graph Webhooks to keep track of a call ?

scorpionfly7 commented 4 years ago

Hi, Is there ability to monitor calls in Teams, using Teams Client SDK? For example notify, that there is started call? @ksikorsk

vipulw2011 commented 4 years ago

Hi, Is there any update on this issue. Even I need the notification of incoming call with it's details in my service via a callback url. If anyone has implemented can you please share/guide how we do it ? Thanks

VishalWaman commented 3 years ago

+1

robert-leafworks commented 3 years ago

+1 from our side! For us we need the event for incoming phone call via PSTN as well. We need to fire a webhook for phone call events (i.e. ringing, call accepted) or building an app inside teams which opens when an incoming call is received. Both ways would work for us to implement our use cases.

cyril-iselin commented 3 years ago

+1 same like @robert-leafworks

zindont commented 3 years ago

+1 same like @robert-leafworks

AHComp commented 3 years ago

So guys now honestly Microsoft is just kidding you. There will definitely be no WebHook for the telephone functions because there is already a solution from Microsoft to implement such a function. Unfortunately, Microsoft does not want the smaller partner to develop solutions on this function because Microsoft wants to develop these solutions first with large software providers. We noticed this over a year ago and have developed an alternative to the old TAPI interface based on the resources made available by Microsoft. If somebody interested to buy the code or consulting it's possible to contact me.

logistic-people-deutschland commented 2 years ago

I am also interested we want to build a solution where we show our users which customer is calling the customer data is in our database whether there is something like that?

babunirwan commented 2 years ago

Any update on the webhooks for incoming PSTN calls notifications??

robert-leafworks commented 2 years ago

Maybe they will have in 2030 🤣 - until then we will discourage all clients to use MS Teams business voice for professional use - better use other solutions here.

How much effort would it be to simply have a webhook ready to be called when a call comes in? It's ridiculous that MS product managers didn't see this when building V1 of the application. It's like no one needs to integrate their phone channels with their ERP, CRM etc. 🙄

babunirwan commented 2 years ago

If they do not have incoming call hook where is this API used - https://docs.microsoft.com/en-us/graph/api/call-answer?view=graph-rest-1.0&tabs=http

siseli commented 1 year ago

We need a call notification API for use in teams apps too. Is it really the way it seems and this is still not possible?

The requirement is really simple: a web hook or some other event notification to monitor incoming and outgoing calls for a certain user. We need it to display additional information about the call to the user.

Please MS, tell us that there is a way to do this or that you are at least working on it.

qatestolegmig commented 5 months ago

Any updates in 2024? Or MS does not care at all that customers request this feature for 5+ years?