LogoLogo
  • What is Itgrix
  • Contacts
  • Our story
  • Connector installation
    • System requirements
    • Itgrix for Bitrix24 and Asterisk
      • How to perform offline authorization
      • How to obtain a license offline
      • Configuring the connector to work in a closed network
      • Call tests
    • Itgrix for Kommo and Asterisk
      • Restricted mode setting features
      • Call card
      • Call tests
  • Additional functions
    • Automatic call transfer to responsible manager
    • Setting up click-to-call features
      • Features of customization after Bitrix24 23.300.0 update
    • Autoreplacement for phone numbers
    • How to view employee call statistics in Bx24
    • FMC number recognition
    • Configuring WebRTC in Asterisk (FreePBX)
    • Itgrix AsterPhone for Bitrix24
    • Itgrix AsterPhone for Kommo
  • For admins
    • Running an additional copy of the module
    • Deploying a module backup
    • Call processing for the period
    • Examples of the structure of registered calls from CEL
    • Wrong time in created cases in Bitrix24
    • SSH access
    • Useful commands
    • Script to test the module service
    • Changing login and password to enter the admin panel
    • Module files
    • Status monitoring
    • Application update
    • In the CEL table, there is no internal employee number in the cid_num column
    • How to fix click-to-call
    • Custom SSL certificates for https requests
    • Examples of configuring WSS connections
    • Converting recordings to MP3 before sending to Bitrix24
    • How to fix call recording problems
    • Install and configure CEL
    • B24 authorization bugfix
  • Useful customizations (any CRM)
    • Audio file name customization
    • Call data (call_full) in customizations
    • Change the number / context for calling to asterisk
    • Change phone number before sending data to CRM
    • Black and white lists
  • Useful customizations itgrix_bx (Bitrix24)
  • Useful customizations itgrix_kmo (Kommo)
  • FAQ
    • How to pay
    • How to check licence status
    • Differences in connection to B24 via SIP-connector and Itgrix
    • How to turn off the display of calls in the calendar
    • How to view statistics on employee calls
    • Updating the app
    • Offline install (only for Bitrix24)
    • Offline update
    • Reliable softphones for Asterisk
    • Detail-call-statuses
  • Changelog Itgrix_bx
  • Changelog Itgrix_kommo
  • Policy of interaction with Asterisk
Powered by GitBook
On this page

Was this helpful?

  1. Additional functions
  2. Setting up click-to-call features

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.

  1. Add the following code to init.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());
  1. 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/'.

  2. The same address for click-to-call requests should be specified in the module settings, in the Bitrix24 section:

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

PreviousSetting up click-to-call featuresNextAutoreplacement for phone numbers

Last updated 1 year ago

Was this helpful?