How to call custom REST API for incoming call ?

Status
Not open for further replies.

dotBase

SOHO User
Joined
Apr 26, 2023
Messages
3
Reaction score
1
Hello,

I am new to 3CX so sorry if my question is not clear enough.

I want to know how (and if it is really possible) to trigger a REST API call for any incoming call ?

Ideally, I would like
  • a REST API call when an incoming call is detected
  • a REST API call when someone pick up the phone
  • a REST API call when the call is ended
With the core journalisation, I can only get one event call but I can easily create a call in my external system from the beginning, enrich the call (taking notes, categorize etc.) in the external solution AND then update the call status and duration using the other phone event (or I missed something).

We are running on premise.

Many thanks for your help.

Fred
 
  • Like
Reactions: Evolute IT
@VoIPTools API would be the only way currently.

3CX only has the contact lookup (made when the call is incoming/outgoing initially) and call journaling which is done at the end.

There's no hooks for call picked up.
 
Hello @ConceptsWeb ,

thank you for your answer. Your answer confirmed what we experimented.
I was wondering / hoping that we can handle such thing with custom code or maybe with the Flow Manager ?

I will take a look at @VoIPTools ; but it seems that an additionnal installation is required, and I am not sure that my customer will agree with that. So I will check.

Fred
 
I was wondering / hoping that we can handle such thing with custom code or maybe with the Flow Manager ?
Unfortunately there's no reliable ways of doing it in a Call Flow, even with custom code. The API just isn't there.

but it seems that an additionnal installation is required, and I am not sure that my customer will agree with that.
It does, but gives MANY APIs that you can use for other integrations as well. They have a pretty complete suite of addons.
 
Hello,

I am new to 3CX so sorry if my question is not clear enough.

I want to know how (and if it is really possible) to trigger a REST API call for any incoming call ?

Ideally, I would like
  • a REST API call when an incoming call is detected
  • a REST API call when someone pick up the phone
  • a REST API call when the call is ended
With the core journalisation, I can only get one event call but I can easily create a call in my external system from the beginning, enrich the call (taking notes, categorize etc.) in the external solution AND then update the call status and duration using the other phone event (or I missed something).

We are running on premise.

Many thanks for your help.

Fred
Perhaps there are Webhook events you need here, in particular picking up the phone https://creomate.com/3cx-webhook-documentation/
 
Hi @OlegOLP ,

thank you, but, as for previous solution, it is an addon.

I read that 3CX provides API (Call Control API) but that API documentation is no more available ?
Does it mean that we are no suppose to call this API (if we found how to do it)?
And is there a way to access the SQL database of 3cx (on premise) ?

Fred
 
Let me answer your 2nd question first. 3CX strongly urges you not to access the database directly. It is unsupported and they will flag your PBX as "unsupported" if they find out you are doing it. DO NOT DO THIS.

Regarding the 3CX Call Control API, this is an integral part of the internal functions of the 3CX server. It's still there and is not likely to go away. But 3CX discourages people from using it. With this API you could totally destroy your PBX if you don't know what you are doing, and thus why the documentation was withdrawn.

For full disclosure, we have been using the 3CX Call Control API for 15+ years and I can tell you that it is a very, very complex API and we are still making adjustments to how we use it based on experience. It is not for the faint of heart...

There has been some talk about making a publicly available REST API that IS supported, but we have not heard much about it for more than a year. I suspect 3CX has decided to not make the API public after all. But that is just a guess based entirely on the fact that 3CX has not provided any updates on the subject in a long time (that I am aware of anyway).
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
111,893
Messages
589,598
Members
164,763
Latest member
Techmansam