microsoft-graph-comms-samples icon indicating copy to clipboard operation
microsoft-graph-comms-samples copied to clipboard

Help for bot, getting call notifications

Open stefan2410 opened this issue 6 years ago • 29 comments

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 avatar Jul 14 '19 15:07 stefan2410

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 avatar Jul 15 '19 23:07 stefan2410

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.

stefan2410 avatar Jul 16 '19 05:07 stefan2410

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.

ksikorsk avatar Jul 16 '19 20:07 ksikorsk

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.

stefan2410 avatar Jul 16 '19 21:07 stefan2410

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.

rugt0r avatar Jul 17 '19 09:07 rugt0r

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.

ksikorsk avatar Sep 10 '19 22:09 ksikorsk

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

FYI @zhengni-msft

VinodRavichandran avatar Sep 11 '19 01:09 VinodRavichandran

Thanks for the feedback, much appreciated.

rugt0r avatar Sep 11 '19 10:09 rugt0r

@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.

stefan2410 avatar Sep 17 '19 08:09 stefan2410

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

AHComp avatar Dec 14 '19 17:12 AHComp

@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.

surezg avatar Dec 24 '19 15:12 surezg

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/

VinodRavichandran avatar Dec 24 '19 19:12 VinodRavichandran

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.

rugt0r avatar Jan 15 '20 14:01 rugt0r

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 ?

Githamza avatar May 19 '20 09:05 Githamza

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

scorpionfly7 avatar Jun 19 '20 09:06 scorpionfly7

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

vipulw2011 avatar Aug 25 '20 11:08 vipulw2011

+1

VishalWaman avatar Nov 21 '20 15:11 VishalWaman

+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.

robert-leafworks avatar Apr 15 '21 07:04 robert-leafworks

+1 same like @robert-leafworks

cyril-iselin avatar Apr 23 '21 12:04 cyril-iselin

+1 same like @robert-leafworks

zindont avatar Jun 09 '21 10:06 zindont

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.

AHComp avatar Jun 09 '21 13:06 AHComp

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?

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

babunirwan avatar Jun 10 '22 09:06 babunirwan

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. 🙄

robert-leafworks avatar Jun 10 '22 14:06 robert-leafworks

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

babunirwan avatar Jun 13 '22 08:06 babunirwan

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.

siseli avatar Nov 29 '22 14:11 siseli

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

qatestolegmig avatar Apr 23 '24 08:04 qatestolegmig