Set Teams busy when doing a call in 3CX

travelfon

Free User
Joined
Aug 4, 2020
Messages
2
Reaction score
0
Hi,

Is there a way to set Teams to busy (red light) if I do a call in 3CX. So Caller on Teams could see that I am busy right now and do not ask why I am not answer the Teams Call.

Regards, Daniel
 
Regarding your question, please note that this is not possible as there is no cross-presence information synchronization from 3cx to teams.
 
I am familiar with Asterisk AGI and was hoping to find a similar call processing API in 3CX.

Since the Graph Presence API left beta stage, I am successfully using (not yet in 3CX!!!):
Code:
https://graph.microsoft.com/v1.0/users/<user_id>/presence/setPresence
https://graph.microsoft.com/v1.0/users/<user_id>/presence/clearPresence
(more explicit code is blocked by Cloudflare)

I am using the application client secret login flow just like 3CX for the user/contacts sync. (API permission: Presence.ReadWrite.All)

The BIG question is how do I do this in 3CX? And why is 3CX not implementing this themselves as they already link to O365?

  1. I looked at the call flow designer but that would only help on setting somebody "busy" as it doesn't stay in the call.
  2. The CRM interface would allow me to set somebody "available" once a call ended.
But it seems a huge hurdle to implement both for this rather trivial task.

Another option could be a client-side integration using TAPI but that would involve a different OAuth flow to MSGraph.

I am looking into the unofficial(?) Powershell API now unless somebody could point me into the "right" direction.

Alex
 
  • Like
Reactions: Michael209
Thanks for the info and background. You are right the Teams presence API recently became available and its something we want to integrate with. Its on our roadmap...
 
Nice :)
 
We introduced 3CX only recently. It quickly became apparent that setting 3CX status based on Teams status is just as important as the other way around - especially if you're using 3cx soft phones.

Microsoft moved the subscription to Graph changes via webhook from beta to 1.0 some time ago: https://learn.microsoft.com/en-us/graph/api/resources/webhooks?view=graph-rest-1.0

There are a few obstacles to overcome:
  • the need for a webhook service that handles validation
  • since presence state notification contains rich information data needs to be encryted/decrypted
  • for now Presence.Read.All is only supported via delegated permissions, which requires some sort of user interaction when first aquiring a token
Since my C# coding capabilities are somewhat lacking I only modified the unoffical 3cx-web-api to handle webhook service validation and hacked together some Bash scripts to do the "heavy lifting".

You can find my write-up here: https://blog.loetzimmer.de/2023/04/teams-presence-synchronization-for-3cx.html

I really hope this gets back on the priority list for 3CX to be handled "correctly". All the MS-Identity code already exists in the code this should be some rother low-hanging fruit!
 
  • Like
Reactions: Michael209

Members Online Now

Forum statistics

Threads
111,831
Messages
589,277
Members
164,660
Latest member
RJenkinsROCK