> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hubtalk.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 16. Recording and webhooks

> Call recording with a retention period and post-call notifications to your CRM.

# Call recording and notifications to your CRM

> [!NOTE]
>
> **Module goal:** turn on recording with a retention period and hand the call results to an external system.

![Recording parameters gear: channels and retention](https://mintcdn.com/hubtalk/UuNkjJ26eB-xpPwv/images/tutorial/tut-32-settings-recording_en.webp?fit=max\&auto=format\&n=UuNkjJ26eB-xpPwv\&q=85\&s=61169e70dd1a42be192fa968f3b2bafa)

Call recording: stereo (agent and customer in separate channels) or mono; retention is forever or a number of days. Stereo makes reviewing disputed calls much easier.

> [accordion] Show the full panel
>
> ![Recording parameters gear: channels and retention](https://mintcdn.com/hubtalk/UuNkjJ26eB-xpPwv/images/tutorial/tut-32-settings-recording_en.webp?fit=max\&auto=format\&n=UuNkjJ26eB-xpPwv\&q=85\&s=61169e70dd1a42be192fa968f3b2bafa)

Recording is turned on with the **Call recording** switch on the **Call** card, and the **Recording parameters** gear next to it opens two settings:

* **Channels** — **Stereo** (agent and customer in separate channels) or **Mono** (a single mixed channel).
* **Audio retention** — **Keep forever** or **Delete after N days**, with a period of 1 day or more. This is your answer to the question "how long do we keep the customer's voice".

Voice calls are recorded — phone calls and test calls from the browser. The finished recording appears in the player in the header of the [call details](https://docs.hubtalk.ai/v4/platform/campaign-history/call-details/recording.md), where it can also be downloaded; once the retention period is over, the card shows **The recording was deleted according to the retention policy**.

> [!NOTE]
>
> **Advice: tell the caller about the recording.** Call recording is regulated by law, and the rules depend on the country — and in the USA, on the state as well: some states require the consent of one party to the conversation, others the consent of all parties. The platform does not warn the caller by itself — that is your organization's responsibility. A reliable way is to mention the recording in the agent's first reply and check the wording with your lawyer.

![Webhooks window: address, events and the Test button](https://mintcdn.com/hubtalk/UuNkjJ26eB-xpPwv/images/tutorial/tut-33-settings-webhooks_en.webp?fit=max\&auto=format\&n=UuNkjJ26eB-xpPwv\&q=85\&s=228a392fbf542726433e652cd2032c98)

Post-call notifications: the address, the set of events and the Test button. The address settings have a separate Send test-session events switch — off by default, so tests don't clutter your CRM.

> [accordion] Show the full panel
>
> ![Webhooks window: address, events and the Test button](https://mintcdn.com/hubtalk/UuNkjJ26eB-xpPwv/images/tutorial/tut-33-settings-webhooks_en.webp?fit=max\&auto=format\&n=UuNkjJ26eB-xpPwv\&q=85\&s=228a392fbf542726433e652cd2032c98)

Two events you can subscribe to:

* `call_ended` — the call is over: status, reason, duration, transcript, variables.
* `call_analyzed` — post-call analytics is ready: summary, sentiment, custom fields, the success flag, plus the full call data and the finished recording. The event also arrives when the analytics was skipped or failed — the reason is given in the event itself.

Delivery is retried; if a secret is set in the **Signing secret — env variable name** field, the request is signed, and the receiving side can verify that it is genuine. The deliveries for a call are listed in the **Webhook deliveries** block of the call details, and undelivered ones can be resent with the **Retry** button. Webhooks are saved right away — they are not part of the agent draft and don't need publishing.

> [!WARNING]
>
> **An address belongs to one agent, and it pays to know this in advance**
>
> A webhook belongs to the agent in whose settings you created it; there is no organization-wide webhook. If you need events for several agents, add the address to each of them — the URL can be reused, and `agent_id` in the payload tells them apart.

> [!NOTE]
>
> **Variables arrive on an unanswered call too.** A call that did not connect produces a webhook with `dynamic_variables` — the values passed for the contact. An empty dictionary is not a sign of an unanswered call: tell the outcome by `call_status`.

> [!TIP]
>
> A campaign call carries the campaign and the contact in `metadata`: `campaign_id`, `contact_id`, `attempt_no`, `campaign_name`, `campaign_created_via` and `campaign_launched_via`. What arrives in the events, with examples, is on the [Webhooks](https://docs.hubtalk.ai/v4/webhooks.md) page; signing, retries and delivery order are in the [Web API](https://docs.hubtalk.ai/v4/web-api/webhooks.md).

> [!TIP]
>
> **Practice**
>
> Go through all the settings sections of your agent and fill them in as shown: the prompt, two models, a voice with a fallback, timers, AMD, recording, a webhook. Then click **Save** — and move on to conversation quality.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.