# Передача номера транка и названия сущности при входящем звонке в CallerID

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

{% hint style="warning" %}
В админке модуля должна быть включена кастомизация автораспределения в разделе Настройки - Модуль

<img src="/files/VfANTdFzGyt6xVhX9DP1" alt="" data-size="original">
{% endhint %}

Данный код нужно добавить в файл `/opt/itgrix_bx/customizer/actions/customize_autodistribution.php`

{% code overflow="wrap" %}

```php
<?php

// Вернуть параметры:
// number (строка) - номер на который распределится звонок, пустой если не нужно распределять
// name (строка) - имя которое нужно отобразить на Caller ID, максимум 20 символов, опционально
// Параметры from, error и entity - только для чтения, они удаляются автоматически.

$name = $params['name'];
$trunkNumber = $params['trunk'];

$newName = $trunkNumber . ' ' . $name;

$newName = mb_substr($newName, 0, 20);

$params['name'] = $newName;

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

{% endcode %}


---

# 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/settings/autodistribution/peredacha-nomera-tranka-i-nazvaniya-sushnosti-pri-vkhodyashem-zvonke-v-callerid.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.
