# Склеивание названия транка и имени контакта для показа в карточке звонка

Для склеивания имени контакта из битрикса и номера линии исправляем экстеншн, используемый для автораспределения в /etc/asterisk/extensions.conf .

**В данном примере:**

DID транка – 17472325060

Имя транка – TEST\_LINE

```
exten => 17472325060,1,Set(CALLERID(num)=${CALLERID(num):1})
same = n,Set(DB(CLID_OUT/${CALLERID(num)})=${EXTEN})
same = n,Set(CURLOPT(hashcompat)=yes)
same = n,Set(CURLOPT(httptimeout)=5)
same = n,Set(CURLOPT(conntimeout)=5)
same = n,Set(HASH(forwardHash)=${CURL(http://localhost:8077/forward?phone=${CALLERID(num)})})
same = n,Set(CALLERID(name)=TEST_LINE-${HASH(forwardHash,name)})
same = n,GoSub(callrecord,${EXTEN},1)
same = n,NoOp(${CALLERID(num)})
same = n,NoOp(${CALLERID(name)})
same = n,Dial(SIP/213)
same = n,Hangup()
```

{% hint style="danger" %}
При внесении изменений в диалплан Астериска нужно быть предельно внимательным.\
Это может влиять на логику всех звонков, в том числе полностью отключить прием звонков.
{% 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/custom_common/trunk-and-client-number.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.
