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
  • Contact us instead of reading the instructions
  • To automatically direct an incoming call to the Manager responsible for the entity (contact, company, or lead) in CRM, you need:

Was this helpful?

  1. Additional functions

Automatic call transfer to responsible manager

PreviousCall testsNextSetting up click-to-call features

Last updated 1 year ago

Was this helpful?

Contact us instead of reading the instructions

If you don’t feel like wasting time on instructions or they didn’t help, contact our support. We will quickly help you set everything up and answer all questions!\

Contact us in any convenient way:

  • (quick and easy; there are no bots, but live people))

  • Telegram:

  • E-mail:

  • Website:

Working hours: 08:00 - 17:00 Moscow Time (UTC+3). Weekends: Saturday, Sunday.

To automatically direct an incoming call to the Manager responsible for the entity (contact, company, or lead) in CRM, you need:

  1. CURL command must be enabled in Asterisk. Check it out:

$ asterisk -rx 'core show function CURL'

As a result, you should get a description of the curl function. If CURL is not available, it must be installed on the Asterisk server.

  1. In the PBX dialplan, you need to create a context which the call will come to BEFORE the voice greeting.

Asterisk setup

Set the context in file /etc/asterisk/extensions_custom.conf. Context below is as example, pay attention to the code, it needs to be changed:

[bx24transfer]
exten => 1,1,Set(CURLOPT(hashcompat)=yes)
exten => 1,n,Set(CURLOPT(httptimeout)=5)
exten => 1,n,Set(CURLOPT(conntimeout)=5)
exten => 1,n,Set(HASH(forwardHash)=${CURL(http://localhost:8077/forward?phone=${CALLERID(num)})})
exten => 1,n,Set(CALLERID(name)=${HASH(forwardHash,name)})
exten => 1,n,GotoIf($[${HASH(forwardHash,number)}]?from-internal,${HASH(forwardHash,number)},1:ivr-1,s,1)

In this example: localhost:8077 - address and port of the server the module is installed on; ivr-1,s,1 - IVR context where the call goes to if a number was not found in CRM; CURLOPT(conntimeout)=5 - request timeout (5 seconds); if no data is received, the call will go further.

Context logic:

  1. The caller's number is passed to the variable.

  2. The existence of the value of this variable is checked (the variable must contain an internal number of the responsible person for the lead / contact / company). If the number is received, the call is transferred to the responsible person (from-internal,${TOEXT},1 - in the "from-internal" context a call to the TOEXT number is created). If there is no answer (or empty), the call goes to a voice greeting (in this example, ivr-1, s, 1).

It is possible to show the entity name on the phone.

To do this, configure the context as follows:

[bx24transfer] exten => 1,1,Set(CURLOPT(hashcompat)=yes) exten => 1,n,Set(CURLOPT(httptimeout)=5) exten => 1,n,Set(CURLOPT(conntimeout)=5) exten => 1,n,Set(HASH(forwardHash)=${CURL(http://localhost:8077/extendedForward?phone=${CALLERID(num)})}) exten => 1,n,Set(CALLERID(name)=${HASH(forwardHash,name)}) exten => 1,n,GotoIf($[${HASH(forwardHash,number)}]?from-internal,${HASH(forwardHash,number)},1:ivr-1,s,1)

FreePBX setup

It is necessary to include our custom context in the FreePBX dialplan. To do this, use the Custom Destinations module.

  1. Go to Admin → Custom Destinations and click Add Destination:

In the Target field, specify bx24transfer,1,1. Click Submit and Apply Config. Context added.

  1. Go to Connectivity → Inbound Routes, select the incoming route which auto-distribution is configured for, and in the Set Destination block, specify Custom Destinations, select bx24asterisk (context name)

  1. If you need to change the direction of the call (ivr-1, s, 1 does not fit), you need to find out the context which you want to direct the call to and specify it in file /etc/asterisk/extensions_custom.conf.

  2. For groups we get ext-group, N, 1, where N - is the group number. The group number can be found in Applications → Ring Groups.

  3. The route for custom destinations can be found in Admin → Custom Destinations, in the Target field.

  4. For all other cases:

  • Go to Inbound Routes,

  • Choose a route,

  • Right-click on the field with the name of the route and select Explore Element.

  • In the source code window find the value of the selected element.

In this case it is ext-group, 3, 1. Specify this route in the bx24transfer context instead of ivr-1, s, 1.

Online chat
itgrix_bot
bx24@itgro.ru
www.itgrix.com