# Использование стороннего хранилища записей

**Для использования стороннего хранилища записей необходимо указать следующие настройки модуля:**

1\) В блоке "Asterisk" в поле "recordings\_dir" пишем адрес сервера, который будет отдавать записи.

Например, `"recordings_dir": "http://sip.records.ru:8123"`

2\) В блоке "App" в поле `"store_recordings_in_crm"` ставим false:

`"store_recordings_in_crm": false`

После завершения звонка в CRM будет указана ссылка на модуль с командой для скачивания файла и параметрами звонка (типа get\_record\_\[id звонка]\_from..\_to…)

При клике по этой ссылке:\
1\) модуль делает запрос в таблицу CDR, берет имя файла из поля `recordingfile`;\
2\) к имени файла модуль добавляет значение переменной `"recordings_dir"` из конфига;\
3\) перенаправляет запрос на адрес сервера с записями\
(адрес начинается с "http\://", "https\://", "//", "ftp\://" или файл не найден).

**В итоге получаем ссылку подобного вида:**

`http://sip.records.ru:8123/file_name.mp3`

Если параметр `"recordings_dir_subdirs_by_date`" равен true, то:

`http://sip.records.ru:8123/2018/02/02/file_name.mp3`\\

{% hint style="warning" %}
Сервер, хранящий записи, должен уметь обрабатывать подобные запросы.
{% endhint %}


---

# 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/another-storage.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.
