# Настройка записи разговоров на стороне Asterisk

Настройка записи разговоров осуществляется в файле конфигурации Asterisk – extensions.conf.

Пример реализации записи разговоров:

`exten => 1000,n,Set(RecFile=${STRFTIME(${EPOCH},,%Y-%m/%d)}/in_${CDR(src)}_${STRFTIME(${EPOCH},,%Y-%m-%d-%H-%M-%S)}.wav)`\
`exten => 1000,n,Set(CDR(recordingfile)=${RecFile})`\
`exten => 1000,n,MixMonitor(${RecFile})`

RecFile – Имя записываемого файла. Если не содержит абсолютный путь, то помещается в директорию, определенную по умолчанию в настройках asterisk.conf

В данном примере имя аудиофайла заносим в таблицу CDR, в поле recordingfile. Если этого поля нет в БД, его необходимо добавить.

[Настройка записи разговоров в FreePBX](https://wiki.merionet.ru/articles/zapis-razgovorov-s-pomoshhyu-freepbx)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.itgrix.ru/for-admins/nastroika-zapisi-razgovorov-na-storone-asterisk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
