Giter VIP home page Giter VIP logo

asterlink's Introduction

AsterLink

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

Asterisk

You need Asterisk 13+.
To monitor how call is going this connector listens for AMI events.

There should be 4 different contexts to distinguish calls:

  • incoming_context - context for incoming calls from voip trunk. inbound calls will be registred there
  • outgoing_context - context for outgoing calls. outbound calls will be registred there
  • ext_context - extensions dials from queue, ring group, etc. use this context to route incoming calls to your extensions
  • dial_context - context for originating (click2dial) 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.

  • cid_format - from PBX to CRM
  • dial_format - from CRM to PBX
    • expr - regual expression (use double blackslashes)
    • repl - replace pattern

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.

  • Create folder /opt/asterlink
    mkdir /opt/asterlink; cd /opt/asterlink
  • Download binary from releases page
    wget https://github.com/serfreeman1337/asterlink/releases/latest/download/asterlink_x86_64.tar.gz
    tar xvf asterlink_x86_64.tar.gz && rm asterlink_x86_64.tar.gz
    chmod +x asterlink
    • Or build it from source (assume you have go installed)
    go get github.com/serfreeman1337/asterlink
    go build github.com/serfreeman1337/asterlink
  • Create configuration file. Use conf.example.yml as example.
    wget https://raw.githubusercontent.com/serfreeman1337/asterlink/master/conf.example.yml
    mv conf.example.yml conf.yml
    nano conf.yml
    Note: config file is using YAML format and it requires to have proper indentation.
    Use online yaml validator to check your file for errors.
  • Test run
    ./asterlink

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

asterlink's People

Contributors

serfreeman1337 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.