Calling an external REST API on incoming and missed call

Status
Not open for further replies.

Massimo Barbieri

New User
Joined
Oct 19, 2021
Messages
5
Reaction score
0
Hi,
3CX Newbie here, I've searched the forum with no luck.

I would like to call an external REST API with the calling number and the internal "answering" number (DID?) as parameters.

I tried Script-based IVRs and it works, but the second parameter is always "-", and I don't know if I missed some configuration option, or maybe there is a different, better approach.

Can you help me? Thank you very much.

Massimo
 
Maybe you could route inbound calls to a CFD app, which could invoke your REST API using the Web Service REST component, and then the CFD app could transfer the call to the next destination that should handle the call, for example a queue.

You will have access to the caller's number (variable session.ani) and called number / DID (variable session.did). But you will receive this call in the CFD app as soon as it reaches 3CX. If you need to know if an agent picks up or not, that's not possible using the CFD.
 
  • Like
Reactions: Evolute IT
Thank you very much.
I just spoke with the customer, here's the scenario:

- let's say there are 10 people who can answer the incoming call
- new incoming call: the 3CX decides, based on some policy, to ring 2 of the 10 internal phones (3 and 7)
- at this point, I need to make a REST call with two parameters: A) the caller number and B) the internal numers ringing (3 and 7)
- internal 7 picks up the phone: I need a different REST call with caller number and 7
- optional: if nobody answers and the call get missed, I need another REST call with caller number and internal numbers

Is it possibile to do something like this with CFD, or in another way?

Thank you again.

Massimo
 
Hello Massimo,

Unfortunately this is not possible with any API or tool provided by 3CX. You could launch an URL from the Web Client when it receives a call, but that would be a separate notification for extension 3 and 7.
 
  • Like
Reactions: Evolute IT
Ok, it is not a problem to handle separate notification fo 3 and 7...
Can I send a notify when 3 and 7 rings, AND when 7 picks up? If so, with what tools? CFD?

Thank you very much.

Massimo
 
Ok, it is not a problem to handle separate notification fo 3 and 7...
Can I send a notify when 3 and 7 rings, AND when 7 picks up? If so, with what tools? CFD?

Thank you very much.

Massimo
No, only one, when it rings OR when it's answered.... You can do this from the Web Client > Settings > Integration > Auto launch a Custom Contact URL using variables.
 
Thank you very much, I found it.
But it is a client-side thing (it opens the page in the browser).
We need a server-to-server notification.

If that's not possible, is it possible to "ask" to 3cx what is the current phones status? If we can get this information (e.g.: user1 is speaking with numberxxx, user2 and user3 are ringing with caller number yyy and so on) we can poll and do the server-to-server calls ourselves.
 
Thank you very much, I found it.
But it is a client-side thing (it opens the page in the browser).
We need a server-to-server notification.

If that's not possible, is it possible to "ask" to 3cx what is the current phones status? If we can get this information (e.g.: user1 is speaking with numberxxx, user2 and user3 are ringing with caller number yyy and so on) we can poll and do the server-to-server calls ourselves.
Unfortunately this is all you can do at the moment. There is no API to query this for now.
 
  • Like
Reactions: Evolute IT
Ok, I see, thank you very much for the effort to help me.
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
112,323
Messages
591,896
Members
165,474
Latest member
costionofrei