API Documentation

There are three components of the Telefol API:

  • the SIP stack for streaming audio from the call center telephony system
  • the HTTP API for Event and Call Management
  • the ActiveMQ message queue to which events are published when triggered

Typical event flow

  1. Telefol receives one or more HTTP requests to /api/add-event, /api/update-event, or /api/delete-event to configure the phrases to recognize.

  2. Telefol receives HTTP request to /api/start-call.

  3. Telefol receives incoming SIP call. The SIP headers will contain the call id specified in /api/start-call.

  4. Two UDP connections are established for this call - one to carry audio from the agent channel, and one to carry audio from the customer channel. Audio from each channel is analyzed by Telefol. As soon as the required criteria for any event are satisfied, an event notification object is generated and posted to the message queue. This step continues until the call is terminated.

  5. Call is terminated.

  6. At any time between steps 2 and 5 inclusive, updated call metadata may be delivered via /api/update-metadata. These changes will take effect immediately and may change which events will trigger for this call.

  7. Event defintions may not be added, deleted, or updated for an active call. Any changes to the set of active events will only apply to calls connected after the changes are completed.