Donnerstag, 27. April 2023

Teams Presence synchronization for a 3CX on premises

 The recent posts about setting Teams presence and being notified about Teams presence changes are the building blocks to synchronize the presence state between MS Teams and our 3CX PBX both ways.

  • a call on Teams sets the 3CX presence state to "Away" if it was "Available" before
  • if Teams becomes "Available" and 3CX state is "Away" => set 3CX to "Available"
  • a call on 3CX tries to set the Teams presence "Busy" - there is some logic behind the scenes, we can't control about overriding "Offline" and "Away" in Teams which comes in handy in this case

Mittwoch, 26. April 2023

Teams Presence Notification via CLI

Receiving phone calls on our regular soft phone while in a Teams meeting is quite annoying. It would be quite useful to set the soft phone presence according to the Teams presence.

In my last blog entry I wrote about how to do this the other way around.

Microsoft moved the notification on Graph changes via webhook from beta to 1.0 some time ago. Yet there are a few obstacles to overcome:

  • the need for a webhook listening service that handles validation
  • since presence state notification contains rich information data needs to be encryted/decrypted
  • for now Presence.Read.All only supports delegated permissions, which requires some sort of user interaction when first acquiring a token