> For the complete documentation index, see [llms.txt](https://docs.itgrix.ru/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.itgrix.ru/custom_bx/default-resp-for-trunks.md).

# Разные ответственные по умолчанию за разные транки

По умолчанию модуль позволяет задать только одного пользователя, который будет ответственным за полученные пропущенные звонки. Однако это поведение можно кастомизировать и назначать ответственных в зависимости от номера телефона, на который пришел звонок (транк).

**Сценарий:** за пропущенные звонки нужно указать разных ответственных пользователей в зависимости от транка +73432723033 – сотрудник с id = 5; 88007654321 – сотрудник с id = 456.

Для этого на странице с настройками включаем опцию **"параметры завершения разговора"** .

![](/files/-MLbnwVMTXlhq6kaEsDp)

Изменяем код в файле кастомизации.

{% hint style="info" %}
Кастомизация настраивается в файле **/opt/itgrix\_bx/customizer/actions/process\_final\_params.php.**

Для версий ДО 3.4.0 этот файл находится в каталоге **/opt/itgrix\_bx/custom/**
{% endhint %}

```php
// Указываем ID пользователя в Битрикс,
// который будет ответственным за пропущенные на транк
$trunkToID = array(
    '+73432723033' => 5,
    '88007654321' => 456
);

if ($params['STATUS_CODE'] == 304 // неотвеченный
        && array_key_exists($params['call']['trunk'], $trunkToID)) {
    $params['USER_ID'] = $trunkToID[$params['call']['trunk']];
}

return array(
    'state' => 'success',
    'data'  => $params,
);
```

Подробно параметры [описаны в статье](/custom_bx.md#5-process_final_params).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/custom_bx/default-resp-for-trunks.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.
