serfreeman1337 / asterlink

Asterisk integration with Bitrix24 and SuiteCRM
MIT License
29 stars 19 forks source link
asterisk bitrix24 crm-integration suitecrm

AsterLink

Asterisk CRM Connector. Supports FreePBX v14 integration with Bitrix24 and SuiteCRM.

Asterisk

You need Asterisk 13+.
To monitor calls this connector listens for AMI events.

There should be 4 different contexts to distinguish calls:

Default configuration is tested to work with FreePBX v14 and Asterisk v13.

Here is configuration for basic-pbx asterisk dialplan:

dialplan:
  incoming_context:
  - DCS-Incoming
  outgoing_context:
  - Outbound-Dial
  ext_context:
  - Dial-Users
  - DCS-Incoming
  dial_context: Long-Distance

You see DCS-Incoming in ext_context because we are dialing queue extensions directly from incoming context.
(queue memeber config member => PJSIP/1101 and not member => Local/1101@Dial-Users like in freepbx).

CallerID Format

Connector can format CallerID using regexp. This useful when your VoIP provider doesn't send desired format.

If config is set and callerid doesn't matched any of regexp, then call will be ignored.

CRM Integration

See instructions in the following files:

Install

Install asterlink under /opt/asterlink folder.

Startup script example

Create /etc/systemd/system/asterlink.service file with following contents:

[Unit]
Description=AsterLink Connector
After=freepbx.service

[Install]
WantedBy=multi-user.target

[Service]
ExecStart=/bin/sh -c 'exec /opt/asterlink/asterlink >>/opt/asterlink/app.log 2>>/opt/asterlink/err_app.log'
WorkingDirectory=/opt/asterlink
Restart=always
RestartSec=5
systemctl enable asterlink
systemctl start asterlink