Best place to implement webhooks

Status
Not open for further replies.

ntenisOT

New Member
Apr 4, 2018
1
0
1
37
Dear all,

I would like to ask if there is a place that we can place some code to be executed under different conditions. For example, when

  1. Call initiated
  2. Call answered
  3. Call hanged-up
  4. Call terminated.
We want to have some code executed when the above events occur in order to perform an asynchronous api call and update an external system.

Can you please suggest some best practises?
 

LarryW

New Member
Jun 22, 2018
10
0
1
55
Wisconsin
Did you ever figure anything out here? We are hoping to do something where we could monitor for inbound calls to an extension and in our own internal system use CID or other information to associate it with a customer or ticket. Thanks for any ideas on how to do this!
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,414
376
83
The Freeswitch Event Socket is probably the place to start, there is an event socket library that you can build. For an example of accessing the socket in php, without the library, look at the code behind "Active Calls" in the FusionPBX web interface.

It very much depends on the application you want, but I have also used a SIP library for Java or Python to run a process that registers an extension that then receives notification messages like Busy Lamp Fields do. The notification content is XML and can easily be parsed.
 
  • Like
Reactions: John

John

Member
Jan 23, 2017
97
8
8
The Freeswitch Event Socket is probably the place to start, there is an event socket library that you can build. For an example of accessing the socket in php, without the library, look at the code behind "Active Calls" in the FusionPBX web interface.

It very much depends on the application you want, but I have also used a SIP library for Java or Python to run a process that registers an extension that then receives notification messages like Busy Lamp Fields do. The notification content is XML and can easily be parsed.
Thank you Adrian. Always helpful, always good advice without looking down at people.
 
Status
Not open for further replies.