> For the complete documentation index, see [llms.txt](https://docs.mikopbx.com/mikopbx/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mikopbx.com/mikopbx/faq/cases/bluring.md).

# Скрытие номера от сотрудника

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

1. Перейдите в раздел **Система** → **Кастомизация системных файлов**

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2FIn35rPMX4a6Ty9sFCh0t%2FsystemFileCustomization.png?alt=media&amp;token=20e27e89-3807-475c-8dac-3a08229edab0" alt=""><figcaption><p>Раздел "Кастомизация системных файлов"</p></figcaption></figure>

2. Откройте для редактирования конфигурационный файл **modules.conf**. Установите режим «**Добавлять в конец файла**»

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2FTsLJNUGPvNlBAaPrUaln%2FmodulesConf.jpg?alt=media&amp;token=2862cb04-c2ca-4720-871f-95a53dc6387b" alt=""><figcaption><p>Режим "Добавлять в конец файла"</p></figcaption></figure>

3. Подключим модуль для вычисления хэш суммы:

```
load => func_md5.so
```

4. Откройте для редактирования конфигурационный файл **extensions.conf**. Установите режим «**Добавлять в конец файла**»

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2FNpM0R24YXcSefxHRxwuw%2FextensionConf.jpg?alt=media&amp;token=28ce55fb-73f0-426f-818c-75de6b5a77ea" alt=""><figcaption></figcaption></figure>

5. Опишем контекст для подмены номера

```php
[dial_create_chan-custom]
exten => s,1,NoOp()
    ; Только для входящих; 
    same => n,ExecIf($["${CHANNEL(channeltype)}" == "Local" || "${FROM_DID}x" == "x"]?return)
    ; Обработка не требуется, если звонит внутренний номер. 
    same => n,ExecIf(${DIALPLAN_EXISTS(internal,${CONNECTEDLINE(num)},1)}?return)
    ; Обработка не требуется, если номера нет в списке. 
    same => n,ExecIf($[${DIALPLAN_EXISTS(bluring-extensions,${CHANNEL(endpoint)},1)} == 0]?return)
    ; Получим кэш номера. 
    same => n,Set(blNumber=${CONNECTEDLINE(num):-4}*${MD5(${CONNECTEDLINE(num)})})
    same => n,Set(DB(bluring/${blNumber})=${CONNECTEDLINE(num)})
    ; Подмена callerid
    same => n,Set(CONNECTEDLINE(num)=${blNumber})
    same => n,Set(CONNECTEDLINE(name)=${blNumber})
	same => n,return
```

6. Опишем контекст с номерами, для которых нужно подменять номер

```php
[bluring-extensions]
; Разрешаем подмену для номера 201
exten => 201,1,NoOp()
; Разрешаем подмену всех четырехзначных номеров
exten => _XXXX,1,NoOp()
```

7. Предусмотрим возможность перезвонить на подменный номер

```php
[all_peers](+)
exten => _XXXX*.,1,Set(number=${DB(bluring/${EXTEN})})
    same => n,ExecIf($["${number}x" == "x"]?hangup)
    same => n,Goto(all_peers,${number},1)
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mikopbx.com/mikopbx/faq/cases/bluring.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
