How to Setup Vtiger CRM Telephony Integration with Asterisk
Human has been answering telephone for a long time without knowing who is on the other side. Customer expectation has grown multifold for companies to keep customer records well before the salesman pick the call. A lot of such powerful & productive integration can be done when you marry Asterisk to Vtiger CRM.
Call Tracking, Call Logging, Make calls from inside your CRM, Know who is calling are a few productive integration that can be done with ready-to-use Vtiger Asterisk Connector — PBXManager Suite.
Here is a simple setting up guide for the integration.
Setting up PBX Manager with Asterisk
Step 1: Install & Configure Asterisk
Install:
user-ThinkPad-T410:~ user$ sudo apt-get install asterisk
Launch Asterisk CLI to check Asterisk is running,
user-ThinkPad-T410:~ user$ sudo asterisk -r
To get out of the CLI, type exit
*CLI > exit
Configure:
Take backup of sip.conf and extensions.conf file in /etc/asterisk folder
user-ThinkPad-T410:~ user$ sudo cp sip.conf old-sip.confuser-ThinkPad-T410:~ user$ sudo cp extensions.conf old-extensions.conf
Edit sip.conf file
user-ThinkPad-T410:~ user$ sudo vi /etc/asterisk/sip.conf
Configure the sip.conf file with the sample-sip.conf file
Edit extensions.conf
user-ThinkPad-T410:~ user$ sudo vi /etc/asterisk/extensions.conf
Configure the sip.conf file with the sample-extensions.conf file
Edit Asterisk cdr configuration file: (cdr_manager.conf) : download sample-cdr_manager.conf file to configure
Edit Asterisk manager configuration file: (manager.conf) :download sample-manager.conf file
To apply changes restart Asterisk
user-ThinkPad-T410:~ user$ sudo /etc/init.d/asterisk restart
Launch Asterisk CLI
user-ThinkPad-T410:~ user$ sudo asterisk -rvvv
V’s are verbose level
user-ThinkPad-T410*CLI> sip show peers /* It lists registered users in sip.conf with status unmonitored */
Step 2: Install Softphone — ZoIPer
- Create an account in ZoIPer
- Choose SIP option.
Credentials:
user/user@host : 7002@10.2.1.20
Password : 7002login
Domain / Outbound Proxoy : 10.2.1.20
3. Click Next → Account Name (7002@10.2.1.20) → Next
Now your account has been registered in your Asterisk server. You can verify the request and response in Asterisk CLI window.
Step 3: Install Vtiger Asterisk Connector
Vtiger Asterisk connector is a gateway to connect Asterisk server and your Vtiger CRM. It helps to make interaction over HTTP when it handles incoming or outgoing calls.
Features:
- Pops out notification on incoming call.
- Transfers the input from Vtiger to Asterisk.
- Manages call record file.
Installation & Configuration:
- Download Vtiger Asterisk Connector
- Unzip the downloaded package in CRM root directory
- Edit VtigerAsteriskConnector/VtigerAsteriskConnector.properties file to make the following changes
Location where the application server will be running.
Call Recordings storage path
Location where the applications database files will be stored.
Asterisk Server Details
Vtiger CRM URL
Step 4: Configure PBX Manager in Vtiger
1. Login to your Vtiger CRM.
2. Click CRM Settings → Integration → PBX Manager.
3. Edit Asterisk Server Details.
Configure user extension number:
1. Open My Preferences.
2. In “More Information” block configure the user number in CRM Phone Extension field. Eg. 7001
3. Start Asterisk Connector. In terminal execute lines one by one
user-ThinkPad-T410:~ user$ cd VtigerAsteriskConnector/bin/user-ThinkPad-T410:~ user$ ./start.sh /* To start Asterisk Connector */
Note:
To refresh Asterisk connector
user-ThinkPad-T410:~ user$ ./start.shuser-ThinkPad-T410:~ user$ ./stop.sh
To verify, you can run Protocol://Asterisk_Server_IP:Port (http://10.2.1.20:8585/)
Troubleshooting Tips:
If you make any changes in sip.conf restart
user-ThinkPad-T410*CLI> sip reload
If you make any changes in extensions.conf restart
user-ThinkPad-T410*CLI> dialplan reload
If you need to track you can use the logs from VtigerAsteriskConnector in Logs folder
We believe this guide helped you integrate your Asterisk with your Vtiger CRM and get the best out of your CRM. We have given a sample of a integration, you can enhance it further more and do more. You can extend it to add lots of features and make your work simple. If you have any questions or further help in extending your Vtiger CRM with advanced functionalities, you can get help from us.
Initially posted at Smackcoders blog