Integrating Asterisk, Freepbx and Vtiger

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Integrating Asterisk, FreePBX and vTiger

8 April 2013MattAsterisk
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 –


sysadminman.net/sysadminman-freepbx-hosting.html

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

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

[vTiger]
secret=YourSecret ;make sure there are no unusual characters such as
quotes in the password
deny=0.0.0.0/0.0.0.0
permit=YourVtigerIP/YourVtigerMask ; or use a mask of 255.255.255.255 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

switch($typeCalled){
case "SIP":
$context = "from-internal";
break;
case "PSTN":
$context = "from-internal";//"outbound-dialing";
break;
default:
$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

You might also like