Forum Discussion
Teams bot intercepting incoming call
- Sep 21, 2023
PMcVries - Using the Get call API , you can get the source and targets details of a call and based on that you can take decision of redirecting the call using redirect call API.
Thanks,
Prasad Das
------------------------------------------------------------------------------------------
If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link.
PMcVries -
-
Subscribe to the call records resource type using the Microsoft Graph API. This subscription allows your application to receive notifications whenever there is a new call or an update to an existing call. You can use the Create subscription API to create a subscription for call records.
The
resource
parameter in the API call should be set tocommunications/callRecords
. This ensures that your application receives notifications for call records. -
Handle the incoming notifications from the Microsoft Graph API. Whenever there is a new call or an update to an existing call, your application will receive a notification to the specified callback URL. The notification payload will contain the call ID among other details.
You can use the call ID received in the notification payload to retrieve the call details by making a GET request to the following endpoint:
GET /communications/calls/{id}
Replace
{id}
with the call ID obtained from the notification payload.This API call will return the details of the call, including information about the parties involved, timestamps, and other relevant data.
By following these steps, a third-party application can receive the call ID for a call that is directed from party1 to party2. The call ID can be used to retrieve the call details and perform any necessary actions or processing.
Thanks,
Prasad Das
------------------------------------------------------------------------------------------
If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link.
Prasad_Das-MSFT
What you describe works only for ended calls.
But I unserstood the question that PMcVries was looking for a solution to get events for currently active calls.
That is what we are also looking for.
Is there any possibility to get an "ringing" event, if a MS Teams User gets an incomming call?
- Prasad_Das-MSFTNov 30, 2023
Microsoft
relkniw - There doesn't seem to be any such option available currently. To achieve your requirements, we recommend you give your feedback in Teams Feedback Portal.