> For the complete documentation index, see [llms.txt](https://docs.itgrix.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.itgrix.com/additional-functions/setting-up-click-to-call-features/features-of-customization-after-bitrix24-23.300.0-update.md).

# Features of customization after Bitrix24 23.300.0 update

To be able to make click-to-call from the boxed version of Bitrix24 in a closed network, you need to:

In the 1C-Bitrix24 administrative interface (\<portal\_address>/bitrix) under **Content → Site Structure → Files and Folders**

1. Let's check if there is a file in which we will make changes at the following path `local/php_interface/init.php`

If there is no such file, we will change the contents of the `bitrix/php_interface/init.php` file or init.php for a specific file.

2. Add the following code to `init.php`

```php
\Bitrix\Main\Loader::includeModule('rest');
class MyEventProvider extends \Bitrix\Rest\Event\ProviderOAuth
{
   public function send(array $queryData)
   {
      $http = new \Bitrix\Main\Web\HttpClient();
      foreach($queryData as $key => $item)
      {
         if(preg_match('/192\.168\./', $item['query']['QUERY_URL'])) // directly sending handlers, having  192.168. in the address
         {
            $http->post($item['query']['QUERY_URL'], $item['query']['QUERY_DATA']);
            unset($queryData[$key]);
         }
      }
      if(count($queryData) > 0)
      {
         parent::send(array_values($queryData)); // all the rest is to be sent via the standard mechanism
      }
   }
}
\Bitrix\Rest\Event\Sender::setProvider(MyEventProvider::instance());
```

3. In this code you need to change the template `'/192.168./'` in the `preg_match` function: it should contain the address to which click-to-call requests will be sent, it should be the address to which the Bitrix24 server can access the module's admin area, for example, if the module's admin area is available at `example.com:8077`, then the template will be '`/example.com:8077/'`.
4. The same address for click-to-call requests should be specified in the module settings, in the Bitrix24 section:

<figure><img src="/files/rX4L43tJBvPXctPKLnYa" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
If you do not use the code above, the Asterisk server must allow incoming requests from `https://oauth.bitrix.info` address.

To get IP addresses from which incoming requests can come, you can use the following commands:

`curl https://dl.bitrix24.com/webhook/app.json`

`curl https://dl.bitrix24.com/webhook/app-world.json`
{% endhint %}


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.itgrix.com/additional-functions/setting-up-click-to-call-features/features-of-customization-after-bitrix24-23.300.0-update.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
