Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

03/04/2017 PBX Manager - Vtiger

Vtiger Log in

Grow sales revenue, marketing ROI, and customer happiness with the Vtiger CRM Cloud Try it Free

PBX Manager

Contents
Setting up PBX Manager with Asterisk

Step 1: Install Vtiger Asterisk Connector

Step 3: Configure your Asterisk credentials in Vtiger

Step 4: Configure the extension number for each user

Vtiger Asterisk Connector

Configuration Example

Setting up PBX Manager with Asterisk

Step 1: Install Vtiger Asterisk Connector


Please refer this link for more information on Vtiger Asterisk Connector.

Step 2: Configure your Asterisk credentials in Vtiger


After installing Vtiger Asterisk Connector, please follow few simple steps to configure your Asterisk Server information in Vtiger CRM :

1. Login to your CRM instance and click on icon on the top right corner of the CRM.

2. Click CRM Settings.

3. Click PBX Manager under Integration in Settings sidebar.

4. Edit Asterisk Server Details.

Vtiger Asterisk App URL - configure server name where Vtiger Asterisk Connector is installed as shown:

Syntax : Protocol://Asterisk_Server_IP:Port

Protocol http/https
Asterisk_Server_IP Your Asterisk Server IP
Port Server Port configured in Vtiger Asterisk Connector config file.

Outbound Context - Vtiger specific context configured in your Asterisk Server

Outbound Trunk - Trunk configured in your Asterisk server

Vtiger Secret Key - Unique key generated for authentication, which has to be configured in Vtiger Asterisk Connector.

5. Click Save button.

Step 4: Configure the extension number for each user


For each user who is allowed to handle incoming and outgoing calls from the CRM, the extension number should be configured in the User preferences page.

1. Open My Preferences.

2. Configure user number in CRM Phone Extension field under “More Information” block.

Number format:

Extension: [Extension_number]

e.g., 1002

Once configuration is completed on both sides i.e., Vtiger and Asterisk, you are now ready to make and receive calls in the CRM.

https://wiki.vtiger.com/vtiger6/index.php/PBX_Manager#Step_1:_Install_Vtiger_Asterisk_Connector 1/4
03/04/2017 PBX Manager - Vtiger

Vtiger Asterisk Connector

Introduction
Vtiger Asterisk application acts a gateway to connect to Vtiger CRM from the Asterisk Server. It makes it easy for Vtiger and Asterisk interaction over HTTP when incoming or
outgoing calls need to be handled.

Features
Vtiger Asterisk Connector provides following features:

1. Connect to Vtiger and notify the incoming call.

2. Accept commands from Vtiger and forward it to Asterisk (Click-to-Call).

3. Call recording file management.

Installation Prerequisites
1. Asterisk 1.8

2. Java 1.7 onwards

3. Vtiger Details

VtigerServerURL - http://vtigercrm.onyourserver.tld

VtigerSecretKey - [Copy this detail from Vtiger CRM Settings > Integration > PBXManager page]

Installing Vtiger Asterisk Connector


Click on the this link to download Vtiger Asterisk Connector.

Unzip the application package (VtigerAsteriskConnector-x.y.zip)

unzip VtigerAsteriskConnector-x.y.zip

Update VtigerAsteriskConnector/VtigerAsteriskConnector.properties

Asterisk Server

ServerIP IP on which the Vtiger Asterisk Connector will be running. (Preferably use 0.0.0.0)
ServerPort Port on which Vtiger Asterisk Connector has to run in your server.
StorageDir Path to store the Asterisk Call Recordings in your Asterisk server.
AsteriskAppDBPath Path to store the Vtiger Asterisk Connector database file in your server.
AsteriskServerPort Port on which Asterisk Server is running.
AsteriskUsername Username configured in manager.conf of your Asterisk Server.
AsteriskPassword Password configured in manager.conf of your Asterisk Server.

Vtiger

VtigerURL Absolute URL on Vtiger CRM you are integrating with.


Copy and Paste the Vtiger Secret Key that is generated in your Vtiger Instance.
VtigerSecretKey You can find this under Vtiger CRM > Settings > Integration > PBXManager > Asterisk Server Details

Changes Required in Asterisk Server


Edit Asterisk Extensions configuration file: (extensions.conf)

; --- START ----


[vtiger_inbound]
exten => DID,1,Agi(agi://0.0.0.0/incoming.agi)
exten => _X.,1,Agi(agi://0.0.0.0/incoming.agi)
; --- END ---

; --- START ----


[vtiger_outbound]

https://wiki.vtiger.com/vtiger6/index.php/PBX_Manager#Step_1:_Install_Vtiger_Asterisk_Connector 2/4
03/04/2017 PBX Manager - Vtiger
exten => _X.,1,Agi(agi://0.0.0.0/incoming.agi)
; --- END ---

Add above two context in extensions.conf OR include below dial plan within existing context (both inbound and outbound context).

exten => _X.,1,Agi(agi://0.0.0.0/incoming.agi)

Note:

1. _X = pattern to accept any number as extension


2. 0.0.0.0 = VtigerAskteriskConnector_ServerIP (or the one configured in VtigerAskteriskConnector/VtigerAskteriskConnector.properties)
3. DID = DID provided by your service provider.

Edit Asterisk cdr configuration file: (cdr_manager.conf) and modify “enabled” field as shown below:

;--- START ---


enabled = yes
;--- END ---

Edit Asterisk manager configuration file: (manager.conf)

Add Vtiger IP in the ACL (Access Control List) under the username configured in VtigerAskteriskConnector/VtigerAskteriskConnector.properties as shown below:

;--- START ---


permit = Vtiger_IP/255.255.255.0
;--- END ---

Add Asterisk server IP under permit field as Vtiger Connector uses same IP to for AMI login.

;--- START ---


permit = ASTERISK_IP/255.255.255.0
;--- END ---

Configuration Example

Trunks: Select any one of the outbound trunk, say “XYZ” from FreePBX.

Context:

a. Outbound Calls: [Should be part of trunk = XYZ]


Add new context for handling outbound calls.

; --- START ----


[vtiger_outbound]
exten => _X.,1,Agi(agi://0.0.0.0/incoming.agi)
; --- END ---

OR

Include below dial plan within existing context, say “Outgoing”

exten => _X.,1,Agi(agi://0.0.0.0/incoming.agi)

b. Inbound Calls:
Add new context for handling inbound calls. And make this context as default in FreePBX Settings > Asterisk SIP Settings > Default Context = vtiger_inbound.

; --- START ----


[vtiger_inbound]
exten => 123456789,1,Agi(agi://0.0.0.0/incoming.agi)
exten => _X.,1,Agi(agi://0.0.0.0/incoming.agi)
; --- END ---

where 123456789 - Inbound DID

OR

https://wiki.vtiger.com/vtiger6/index.php/PBX_Manager#Step_1:_Install_Vtiger_Asterisk_Connector 3/4
03/04/2017 PBX Manager - Vtiger

Include below dial plan within existing inbound context, say “from-internal” assuming all incoming calls are routed to this context.

[from-internal]


exten => _X.,1,Agi(agi://0.0.0.0/incoming.agi)

Asterisk Manager Settings


AMI user added in connector config file should have following permissions.

;---------START----------
read = all,system,call,log,verbose,command,agent,user,config, originate
write = all,system,call,log,verbose,command,agent,user,config, originate
;---------STOP

xx.xx.xx.xxx is our Vtiger Server IP, added under permit field.

permit = xx.xx.xx.xxx/255.255.255.0

yy.yy.yy.yyy is our Asterisk server IP, added under permit field.

permit = yy.yy.yy.yyy/255.255.255.0

Vtiger Settings
Go to CRM Settings -- > Integration --> PBXManager. Add following configuration:

a. Vtiger Asterisk App URL = http://127.0.0.1: (the port you picked)

Refer VtigerAsteriskConnector config file.

ServerIP = 127.0.0.1
ServerPort = 56002 [pick a unused port]
AsteriskServerIP = 127.0.0.1
AsteriskServerPort = 5038
AsteriskUserName =admin
AsteriskPassword = xxxxxxxxx

b. Outbound Context = vtiger_outbound

It must match a context in extensions.conf, in that context you must have exten => _X.,1,agi(agi://0.0.0.0/incoming.agi).

c. Outbound Trunk = XYZ

It must match the trunk name added in FreePBX.

https://wiki.vtiger.com/vtiger6/index.php/PBX_Manager#Step_1:_Install_Vtiger_Asterisk_Connector 4/4

You might also like