Besides cloud hosted PBX, you can connect your office PBX to Bitrix24.
As configuring PBX connection using Rest API is mostly done in the app downloaded from the Market, you can learn how to connect your PBX in the app description or contact the app developer. This article is about connecting office PBX using SIP connector.
There is the following logic of calls when using this connection type:
-
When making outbound calls, Bitrix24 will connect to the server specified in the Outgoing calls section of the number connection parameters, and establish the connection after authorization.
-
To accept incoming calls, you will need to configure your IP-PBX and create trunk using the parameters specified in the Incoming calls section of the number connection parameters.
You have free minutes available to make outbound calls and test the SIP connection. Check the number of free minutes and the active license term on the Connection page in the Balance and Statistics section.
You can accept incoming calls at no cost via your Bitrix24 SIP PBX. But to make outgoing calls or forward calls using your SIP PBX, you will need to purchase the SIP connector.
Connection configuration in Bitrix24
-
Go to CRM > Add-ons > Telephony section, click Connection > Office PBX.
-
Then click Connect office PBX.
-
Fill out the form.
- Connection name - an arbitrary name of the connection. This field is optional.
- Server Address – is the IP address of your PBX.
- Login and Password – PBX access data.
-
Click Connect and configure the connection parameters.
Office PBX settings
Let's consider setting up an office PBX using Asterisk as an example. For PBX setting, use the data from the Incoming calls block:
Creating trunk
The following entry must be made in the file sip.conf:
[voximplant] dtmfmode=rfc2833 ; then instead of youraccount, type the name of your account in the Server field (see the screenshot above). fromdomain= youraccount type=friend host= youraccount ; the value of the Login fromuser=asterisk username=asterisk ; as a password value the value from the field Password is used secret=mypass insecure=port,invite conext=contex-internal disallow=all nat=yes allow=ulaw&alaw
nat
parameter, which must be set to yes/no
, depending on whether you have a NAT network or not.As an example, below is a sample configuration where the data from the example above are used:
[voximplant] dtmfmode=rfc2833 fromdomain=ip.b24-2729-1386056980.voximplant.com type=friend host=ip.b24-2729-1386056980.voximplant.com fromuser=sip1 username=sip1 secret=e349429f63f7e4d7025fcd32d477ea05 insecure=port,invite conext=contex-internal disallow=all nat=yes allow=ulaw&alaw
incoming
instead of ip
value in the Server field (e.g.: incoming.b24-6864-1386141129.bitrixphone.com
). You can continue using this value, but the module will work much slower. So we recommend changing it to ip
.Apply the settings using the command in the Asterisk console:
sip reload
Setting up calls from Asterisk to VoxImplant
First, you need to configure your Dialplan, which must be included in the file extensions.conf. When configuring your Dialplan, enter the command:
Dial(SIP/voximplant/${EXTEN}
In this case, a call will be sent to Bitrix24 as a call to the number to which it has been originally made in Asterisk.
Apply the settings using the command in the Asterisk console:
dialplan reload
Firewall settings in the local network
By default, the following ports are used:
- For calls from a browser: 443 TCP, 3478 TCP/UDP, 8000-48000 UDP.
- For calls from a SIP device: 5060 TCP/UDP, 3478 TCP/UDP, 8000-48000 UDP.
Normally, SIP requires that the outbound traffic be permitted (from PBX, for example), and inbound connections will work automatically. RTP is usually used as UDP (so data can still be transmitted, although packets are lost).
The ports themselves can be set up in the PBX properties: the port that is indicated in the properties must also be opened in Firewall.