Asterisk Integration
Direct integration of Bitrix24 & Asterisk via Bitrix24 REST API.
containts in-app purchases
Installations: 7258
Version: 4
Published: 28.03.2017
Updated: 11.04.2018

It's a functional solution for integration of your Bitrix24 and Asterisk.

The solution has three components:

  • main application Asterisk Integration (you're at the landing page right now);

  • module for FreePBX (you can find it on the installation page);

  • add-on Telephony24 (only for commercial users).

A module to exchange data with Bitrix24 via REST API is installed on the FreePBX side. The configuration process is performed in FreePBX interface.

What you gain

With the integration app you obtain a powerful tool to control the sales department and to analyse telephone load, speed and call processing quality.

VoIP Integration scenarios

  • When the incoming call comes in, the module starts looking for the responsible call operator in CRM. If an operator is not responding, the call is redirected either according to the Dialplan or to the operator’s mobile phone;

  • If the telephone number has not been registered in the CRM yet, a new lead is created automatically;

  • The lead/contact profile is displayed to the operator before s/he picks up and gets hidden if the operator is not responding;

  • When the conversation is over, the module creates a new activity in a lead/contact/deal profile with the type, duration and record of the conversation, as well as with the identification of the responsible operator;

  • Click-to-call in lead/contact/deal profile and dialing via Bitrix24 GUI;

  • Callback via Bitrix24 widget.

Special aspects related to FreePBX

  • The solution is a fully-featured module which can be plugged into any part of the dialplan, for example after the greeting or into a specific thread of the voice menu;

  • Queues, Ring groups and FollowMe compliance;

  • If the connection with Bitrix24 is lost, Asterisk keeps working on its own.

Additional perks and bonuses

  • Client can evaluate call quality and operator’s service. The valuation is recorded in CRM;

  • Each number can have a specific lead source (statistical call-tracking);

  • The client’s name is displayed right at the telephone’s screen even if the user has not logged in the CRM;

  • If a call gets missed, a new task is created automatically — all calls are duly registered.

Reports on calls (available in Telephony24)

  • Report on outgoing calls, efficient outgoing calls (more than 20 sec) and incoming calls;

  • Report on the speed of missed calls processing;

  • The data for reports is processed inside Bitrix24.


  • FreePBX v.13.0.121+;

  • SIP trunk;

  • For self-hosted Bitrix24 you need an active licence and a valid SSL certificate.

Please note that you will be charged for the calls according to your VoIP provider tariffs.

How to start

  • The process of the application installation and configuration requires a system engineer. The details are on the Install tab.

  • The app is free for two telephony users (users with indicated internal extensions).

  • To remove telephony user limit and activate reports please contact us for Telephony24 add-on (tab Support).

Selling points

  1. High-speed: the integration scheme is optimized so that the call connection is established as fast as possible.

  2. Sustainable: even if the integration is down, the telephony will keep working on its own.

  3. Easy-to-use: you won’t need any additional software or instruments, just a phone (softphone) and Internet access.

  4. Flexible: you can design call routing process as you wish.

  5. Functional: the app is not just a connector but also a whole pack of business instruments for work with telephony and CRM.

Version 4

Handler address fixed.

Version 3

New feature: missed call automatically generates a new task.

Version 2

Added permissions to trace call redirections

Version 1

Initial version

We perform our module support in Open lines chat. You can reach us via:

  1. The chat right in your Bitrix24 (the link opens a chatbox in your Bitrix24).

  2. The chat at our site informunity.us (the icon in the right bottom corner opens a chatbox). After the start of the dialog enter your email so that you could receive a notification about our reply and the communication history even after you close tab with the chat in your browser.

The first way is the most convenient one: you will always find our reply and the communication history in your Bitrix24 messenger. But for the link to work in a self-hosted version of Bitrix24, you must have all necessary modules installed and the portal must have connection with the outer world. If the first option does not work for one reason or another, please proceed with the second one.

Please note that we do not provide technical support via phone or email.

If you haven't received a prompt response, please wait for us to reply. We work from 9 am till 6 pm Moscow time (GMT+3), Mo-Fri.

We care about your feedback and do our best to answer all of your questions. Text us :)

Network configurations










“Bitrix24 address”:address

“Bitrix24 address”:port








“FreePBX address”:port



“Bitrix24 address”:address

“Bitrix24 address”:port


  • FreePBX server must have continuous access to license.informunity.ru:443.

  • FreePBX server must have continuous access to Bitrix24 portal, which address is indicated in "Bitrix24 address" field.

  • license.informunity.ru must have recurring (once a day) access to 443 port via FQDN address of Bitrix24 portal.

  • FreePBX server must be permanently available via address, indicated in the "FreePBX address" field for license.informunity.ru.

If Asterisk is behind NAT, it is required to do call forwarding.

Linux-iptables boundary Firewall example:

Internal server FreePBX address:

In the module settings it is required to set the following:

In Firewall settings configure the following:

iptables -t nat -A PREROUTING -i eth0 -s -p tcp -d --dport 80 -j DNAT --to-destination

Note: while setting the ports redirection, do not give access to all your addresses.

1. Module installation in FreePBX

  • Go to FreePBX control panel → Module Administration and choose Upload Modules.

  • Go to Local module administration or Manage local modules. Select module Informunity Bitrix24 in the Admin section, choose Install and Process. After that select "confirm" and wait for the end of installation. Press Return.

  • Next, press Apply Config.

2. Module Registration

  • Before the registration we recommend to set up a special user account (for example, PBX) with administrator rights and proceed the registration process on behalf of this account. As the result you avoid two problems:
  1. A priori the entities in Bitrix24 are created in the name of the user who registered the module. Using a separate account helps to avoid the mix up while creating and changing the entities.
  2. The user whose account is used for module registration must have the administrator rights for CRM, Tasks, Open lines, Users, Telephony, Disk, Chat and notifications. If the rights are changed, the module can stop working correctly. In order to avoid this we recommend to create a separate user account with all listed rights.
  • Before registering the module please make sure that the "Integration with Asterisk app" is installed in your Bitrix24.
  • To start the registration go to Admin → Informunity Bitrix24.

Bitrix24 address — address of your Bitrix24 portal. It's also necessary to open access for the server license.informunity.ru. It’s necessary to use the domain name or the real IP address.
FreePBX address — FreePBX server external address, from which Bitrix24 portal will receive call recordings. Also Click to Call agent will be registered at this address.

The app's payment status — shows whether you have paid/demo or other app status.

License active till — your subscription expiration date.

Users with extensions — the number of users who have internal numbers.

For the function Click2Call and CallBack to work correctly open access in FreePBX and edge device for license.informunity.ru.

Fill in the required fields: Portal address and FreePBX address.

  • Press Register to start the registration.

  • After applying the authorization window will be opened at your Bitrix24 portal.

  • After authorization you will get the application code which is to be inserted into Application ID field. Next, click Register.

If you didn’t get the application code, press Return. Then, check input data and register again.

You are required to go through authorization procedure only once, using Bitrix24 administrator login.

3. Bitrix24 Handlers

Bitrix24 Handlers tab shows the status and allows you to register handlers if necessary. If handler is not registered the system will not process corresponding calls.

Click to Call — outbound Bitrix24 calls handler.*

Auto Answer Click To Call — if Yes it will pick up the phone automatically.

Call Back — widget site callback handler.**

Call Back Destination — destination destination where the call is transferred from the site widget, for example, to IVR or queue.

*To register a handler click “Register” next to the corresponding handler and wait for “Complete” pop-up.

**To make sure that Callback works, choose where the call should go from the web form (widget). Apply the settings by clicking Submit.

Then you should:

- Add telephone field to the form.

- Attach handler to widget in Bitrix24 (CRM -> Settings-> CRM Forms).

4. Lines configuration

Lines allow to see the number to which the call has come in the call profile.

Go to the module tab Informunity Bitrix24 Lines and press Add:

  • Enter DID, which receives the calls;

  • Enter the line number you would like to be displayed;

  • Press Save, next Apply Settings;

  • Also Lines allow to call from Bitrix24 using a particular route. To activate this point out Line number in "Dialing rules".


You can choose a line right from the dialing panel.

5. Task forms configuration

Task forms allow to set a task for an assigned manager (for Lead/Contact) if the call is missed. If a Lead/Contact does not exist or is created upon the current call then the task will not be created.

Choose the task form in "Inbound routes", see p.6.

6. Inbound Routes Module Setting

The setting is necessary for calls to be registered and profiles to be created when a call is inbound.

  • To configure destinations, where CRM integration is needed, go to Inbound Destinations and click Add button:

Description — destination name.

Default User — manager, to whom the event is tied to, if the call was not answered and an incoming call was designated to none of other managers.

Exceptions — list of users that do not get assigned with calls and do not receive pop-up call cards (to configure the list, please see Exceptions tab in the upper bar).

Show Caller Name — caller name will be displayed in the SIP phone/ softphone.

Add to chat — show calls in the chat list. No Answered — only unanswered calls, All — all calls.

Assign to Unanswered Lead — choose destination in case of a missed call — Default User or Assigned Manager.

Create task on unanswered call — this option allows to choose the necessary task form for missed calls.

Show Card — display call profile in Bitrix24.

Create lead — create a new lead and deal.

Source — Source from Bitrix24 Selection lists.

Destination for registered callers — if “Extension” is selected the call will be redirected to manager responsible for lead or contact with the current call number, if “Extension&Mobile” is selected, manager will receive the call to mobile phone if he doesn’t take the internal call.

  • Now you can choose queues, ring groups, IVR or a specific Extension.

  • When choosing a queue, a ring group or an IVR, the call follows Failover Destination of the listed modules.

Assessment — upon the call client will be offered to assess quality of service by pressing button (0–5) at the phone.

Initial message — voice greeting before assessment.

Final message — voice message after assessment.

Destination — call destination.

Set destination for inbound route, for example:

Also you may set configured destination in any of available FreePBX modules (Announcement, IVR, SetCID).

7. Outbound Routes Module Setting

The setting is necessary for calls to be registered and profiles to be opened when a call is outbound.

  • Open Outbound Routes tab, select the route and press Edit:

Status (Enabled|Disabled|Assessment) — Enable/ Disable in a route/ Enable with the following assessment.

Exceptions — list of users that do not get assigned with calls and do not receive pop-up call cards (to configure the list, please see Exceptions tab in the upper bar).

Source — call source is taken from Bitrix24. It does not affect the call routing.

Create Lead — create a lead or deal.

Show card — show call profile in Bitrix24.

Advanced settings:

For the integration to work properly with the portal, you should set inbound and outbound CallerID's in the same format, for example, 74995556677. Please note that Bitrix24 accept symbols such as "+", ")", "-".

For inbound calls, you can use a third party module, for example, "Set CallerID".

Number Modification for Bitrix24 — modifications of the number that is transferred to Bitrix24. It does not affect the call routing. Modifications are made in the same way as with Asterisk variables.

Add number:  4955555555 -> 7${DAIL_NUMBER} -> 74955555555

Delete number:  0984955555555 -> ${DAIL_NUMBER:2} -> 74955555555

Upon configuration press Update.

Then press Submit.

8. Tab "Advanced"

Check WSS Softphone Compatibility — tab, where you can check if the settings for the softphone to work via WSS were made correctly. Also, there you can indicate the port which will be used by external sources to access Asterisk server via WSS protocol.

Cache — clear cache in Asterisk (user ID in Bitrix24 and the internal number correspondence).

Request Timeout, sec. — maximum waiting time. The time that the module takes to wait sending a request to Bitrix24 from or/and to a license server.

Recordings — allows to choose the format of the recordings sent to Bitrix24 portal. Bitrix24 supports only mp3 and wav, all the other formats will be attached and will be available for downloading.

  • MP3 — convert wav to mp3 and transmit record to Bitrix24.

  • FreePBX Format — transmit record in the format that is set in general settings of FreePBX.

  • Don't Attach Records — don't transmit records.

  • Stereo — the record is not related to FreePBX settings. The client's voice goes to channel #1, the operator's voice goes to channel #2.

Links to records — automatically adds the links to records.

Download log — lets you download file from the server.

9. Tab “Exceptions”

Here you can create lists of employees that will be chosen as exceptions so that they won’t participate in module work, i.e. their calls will not be registered by Bitrix24 and they will not see pop-up call cards.

10. Recommendations on audio recordings configurations

Advanced Settings:

Call Recording Format: wav

Inbound Routes:

Call Recording: Yes

Outbound Routes:

Call Recording: Yes


Inbound External Calls: Don’t Care

Outbound External Calls: Don’t Care

Inbound Internal Calls: Yes

Outbound Internal Calls: Yes

11. Bitrix24 settings

Specify internal numbers of telephony users. For click2call function configure number for outgoing calls as “Application: Asterisk Integration” for users.

12. Examples of variables modules configurations

A call goes along the main route, reaches IVR and next, it is distributed to departments (as 1 — Sales Department, 2 — Technical Department etc.).

Set up Inbound Destinations:




Set up IVR:

Enable Direct Dial option

Set invalid Destination and Timeout Destination

Set up points 1 and 2

Set up Inbound Route:

Set Inbound destination IN1

13. Compatibility with other FreePBX modules

Time Condition — YES.

Announcement  — YES.

Queues — YES.

Ring Groups — YES.

Set CallerID — YES.

Follow Me — NO, while responsible manager is being defined

Customer Relationship Management — NO.