Forum Discussion

Eric Brasher's avatar
Eric Brasher
Copper Contributor
Nov 07, 2024

Real-time Microsoft Teams Phone (PSTN) Events & Bot Joining Calls Automatically

I’m working on a solution to capture real-time events from Microsoft Teams Phone(PSTN Calling), specifically for events like:

Outbound calls

Inbound calls

My goal is not only to capture these events but also to have a bot, built with the Microsoft Bot Framework, join the calls as soon as they start.

Here are a few questions I have:

Capturing Events: What is the best way to retrieve these specific events in real time? I’ve explored the Microsoft Graph API, but I’m uncertain if it provides what I need for Teams Phone (PSTN Calling).

Bot Joining Calls: How can I programmatically have the bot join a call automatically? I’ve read about call automation and using the Graph API for joining calls, but not sure how to get the meeting id of teams phone (pstn) calls real or near real-time.

Any advice or relevant documentation would be really helpful! Thanks!

  • Eric Brasher - Thank you for your inquiry about your Teams app development issue!
    You can subscribe to changes to call records using the Microsoft Graph webhook subscriptions capability, allowing them to build near-real-time reports from the data or to alert on certain scenarios like emergency calls. Using webhooks, you can receive a continuous feed of call records as they are created. learn.microsoft.com/en-us/graph/…

    Thanks, 

    Nivedipa

    ------------------------------------------------------------------------------------------ 

    If the response is helpful, please click "Mark as Solution" and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate. 

Resources