Integrating Asterisk, FreePBX and vTiger

vTiger is a free, fully-featured open source CRM solution that can be used to manage your customers and sales leads. It can also integrate with Asterisk to provide click-to-call and call notification from within vTiger itself.

While the Elastix distribution comes with both Asterisk and vTiger installed it may not be desirable to have your CRM and VOIP system running on the same server for performance reasons. You don’t want vTiger interfering with the call quality. Also vTiger on Elastix is not normally at the latest version, which has resulted in security issues in the past.

The solution is to run vTiger and Asterisk on different servers. The instructions below were kindly provided by a SysAdminMan customer on the steps required to integrate Asterisk and vTiger. If you want assistance with this please open a support ticket.

This would work well with a SysAdminMan FreePBX server –

1 – Whitelist the vTiger server IP addresses in the Asterisk server firewall

2 – Add the following lines to FreePBX /etc/asterisk/manager_custom.conf:

secret=YourSecret ;make sure there are no unusual characters such as quotes in the password
permit=YourVtigerIP/YourVtigerMask ; or use a mask of if only 1 IP

3 – Add credentials to vTiger PBX module as follows:

Asterisk server IP YourSysadminmanPbxIP
Asterisk server port 5038
Asterisk username vTiger
Asterisk password YourSecret
Asterisk Version 1.6 (this works fine with Asterisk 1.8 also)

4 – Change these lines in /var/www/html/vtigercrm/modules/PBXManager/utils/AsteriskClass.php

case "SIP":
$context = "from-internal";
case "PSTN":
$context = "from-internal";//"outbound-dialing";
$context = "from-internal";
$this->createCall($from, $to, $context);

5 – Add trunks, extensions and any outbound routes making sure that in your extensions you select context = from-internal

5 thoughts on “Integrating Asterisk, FreePBX and vTiger

  1. BIGGYsmall

    What else needs to be done when using a installation of vtiger on a separate machine?

    I’ve decided not to use the version of vtiger that comes intigrated into elastix as its out of date, so instead I installed vTiger 5.4.0 on a new machine, which can ping the PBX server but wont allow me vTiger server to connect as an extension.

  2. matt Post author

    Did you try all the things above. Mainly the firewall changes and the Asterisk manager conf.

  3. angelo paglialonga

    I agree with you that performance on a vtiger server should not influence phone call quality, maybe using two connected virtual servers it should be possible to avoid performance troubles.

  4. matt Post author

    It’s definitely possible and recommended to have vTiger on a separate server to Asterisk if possible.


Comments are closed.