> For the complete documentation index, see [llms.txt](https://itgro-aly.gitbook.io/test-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://itgro-aly.gitbook.io/test-docs/custom_common/pjsip-vmesto-chan_sip-u-izbrannykh-polzovatelei.md).

# pjsip vmesto chan\_sip u izbrannykh polzovatelei

{% hint style="info" %}
Кастомизация настраивается в файле **process\_originate\_params.php,** он находится в каталоге:
{% endhint %}

|          itgrix\_bx (Битрикс24)         |           itgrix\_amo (amoCRM)           |
| :-------------------------------------: | :--------------------------------------: |
| **/opt/itgrix\_bx/customizer/actions/** | **/opt/itgrix\_amo/customizer/actions/** |

{% hint style="info" %}
Для более ранних версий:
{% endhint %}

| itgrix\_bx (Битрикс24) ДО версии 3.4.0 | itgrix\_amo (amoCRM) ДО версии 2.6.0 |
| :------------------------------------: | :----------------------------------: |
|       **/opt/itgrix\_bx/custom/**      |     **/opt/itgrix\_amo/custom/**     |

Пример: некоторые сотрудники работают на PJSIP, а другие на chan\_sip. Нужно настроить так, чтобы у первых originate исполнялся через PJSIP.

На основе номера сотрудника (пира), меняем протокол:

```php
$channel = &$params['channel'];
list($channel_type, $peer) = explode("/", $channel);

$pjsipPeerList = array(101, 102, 103); 
if (in_array($peer, $pjsipPeerList)) {
  $channel_type = "PJSIP";
};

$channel = $channel_type . '/' . $peer;

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