Receiving Real-Time Call Information and Recordings via Dataphone API #
Overview #
Dataphone provides a real-time API that pushes call information directly to customers’ systems, allowing them to receive immediate updates about incoming, answered, and ended calls. In addition, after a call ends, the API also sends a link to the call recording. This article explains how to integrate with the Dataphone API, handle the data and recordings provided, and outlines the benefits of this integration.
How It Works #
Whenever a call is initiated, answered, or ended, Dataphone will post a JSON payload to the customer’s designated endpoint. For ended calls, the payload includes a link to the call recording.
Customer Endpoint #
Ensure that your system is configured to receive POST requests at the endpoint you provide to Dataphone.
JSON Payload Structure #
1. New Call #
When a new call is initiated, Dataphone sends the following JSON payload:
{
"call_uuid": "312b1671-6556-432d-a42e-6582e690661a",
"caller_id_name": "WIRELESS CALLER",
"caller_id_number": "+12122223333",
"caller_destination": "+17186331444",
"time": "2024-04-03 13:58:22",
"user_ext": "",
"call_state": "ringing"
}
2. Answered Call #
When a call is answered, the following JSON payload is sent:
{
"call_uuid": "312b1671-6556-432d-a42e-6582e690661a",
"caller_id_name": "WIRELESS CALLER",
"caller_id_number": "+12122223333",
"caller_destination": "+17186331444",
"time": "2024-04-03 13:59:22",
"user_ext": "201",
"call_state": "answer"
}
3. Hang-Up Call and Call Recording #
When a call is ended, the following JSON payload is sent, including a link to the call recording:
{
"call_uuid": "312b1671-6556-432d-a42e-6582e690661a",
"caller_id_name": "WIRELESS CALLER",
"caller_id_number": "+12122223333",
"caller_destination": "+17186331444",
"time": "2024-04-03 13:59:34",
"user_ext": "201",
"call_state": "hangup",
"recording_url": "https://app.company.org/recordings/312b1671-6556-432d-a42e-6582e690661a.mp3"
}
Integration Requirements #
- Endpoint: Your system must have an endpoint capable of receiving POST requests.
- Security: Ensure that your endpoint is secured, as the data being transferred contains sensitive information.
- Data Handling: Your system should be able to parse and handle the JSON payloads effectively, including retrieving and storing call recordings from the provided
recording_url
.
By leveraging the Dataphone API, your organization can not only streamline communication processes but also enhance the quality of customer interactions and service delivery.