How do i check state of an extension (Active call, offline etc) from an external server (Call controll api?)

Status
Not open for further replies.

Grant Moxom

Free User
Basic Certified
Joined
Aug 11, 2020
Messages
75
Reaction score
19
Hey all!
I'm needing to check the state of an extension from my external service (for the purpose of lead routing). My client manages lead routing outside of 3cx. Is the only way to do this to use the call control api and expose it to our server manually? I am sure I can figure our the call control api but I'm wondering if these is a 'best practice' way that doesn't use the soon to be deprecated call control.
 
Actually better question - can we trigger a webhook every time a call is picked up or hung up? Would this be held in the CRM server side integration? If so I think I will be able to solve this myself =) (waiting on my enterprise license trial to go live)
 
First, while you can use Call Control API. It is not documented and not supported. You're on your own. @voiptoys has a few softwares that can do the API for you (they work with 3CX I believe) so maybe check that out.

For the second question, the server-side integration only hook is after the call ended. The "ReportCall" scenario. For what you want, you would need the client-side integration which hasn't been updated since 2015. (Works only on 3CX for Windows)
 
You can check the agent's status in a Call Flow Designer (CFD) application. This requires that you route inbound calls first to the CFD, then the CFD can route the call to the appropriate agent.
 
  • Like
Reactions: Evolute IT
You can check the agent's status in a Call Flow Designer (CFD) application. This requires that you route inbound calls first to the CFD, then the CFD can route the call to the appropriate agent.
That's what we're doing for a CRM Routing app. But we had to customize the ReportCall to also add the properties we need.
 
If you want to do something when an agent answers a call, there are 5 options:
  1. The web and windows clients have the ability to execute a program (a browser or exe for example) and pass to the application the caller's name and number as parameters. No programming required.

  2. Write a server-side integration using the 3CX CRM Integration template

  3. Write a 3CX Phone for Windows plugin

  4. Use the 3CX Call Control API to subscribe to 3CX events

  5. Use our VoIPTools API to subscribe to 3CX events.
 
Thanks for your reply's guys. Just to clarify.

1: With CRM integration - is it possible to reliably trigger callstart and callend conditions to a webhook so that we always know when someone is on the phone and when they are not? Is it technically possible? From what I see I can't seem to get it to reliably trigger for both of those conditions

2: If that doesn't work is the only reliably way to use the callcontrol API to send these webhook responses? As in the only reliable way that will work across all platforms including android app

3: Willl definitely consider voiptools later down the track - but want to get the client up and running at lower cost first and ensure they are happy with it

4: With the CFD - this seems like an over complication if I'm only dealing with incoming calls to the system no? Eg I have 250 extensions recieving and making external calls - is CFD a genuine method to send webhooks to our server to trigger extension availability?
 
If your intent is to try and determine the extension's availability based on whether they are on/off the phone, there is a lot more that needs to be checked. For example:
  • Is the extension status set to "Available"?
  • Is there a phone registered to the extension? (maybe not if they use softphone and PC is off)
  • Is the extension logged into the appropriate queue(s)?
  • Finally, is extension currently in a call? (active connection)
 
True, but the first step is state change just to see if I can get at least that happening.
 
Status
Not open for further replies.

Forum statistics

Threads
111,956
Messages
589,927
Members
164,858
Latest member
MichaelRussell3