vtenext CRM Integration
Guide Objective
The purpose of this guide is to explain how to configure the vtenext CRM integration scripts on NethVoice 8 to let the two systems exchange data.
Introduction to the Concept
Data exchange between the two systems can go both ways:
-
from vtenext CRM to NethVoice:
- show CRM contact info on incoming calls inside CTI.
- populate NethVoice centralized phone directory with company contacts from vtenext.
-
from NethVoice to vtenext CRM:
- NethVoice can register caller info in vtenext for incoming calls.
1. Show Caller Info
Definition
This feature allows you to show caller info, taken from vtenext CRM, while receiving an incoming call.
How it Works
- a contact registered in vtenext CRM calls.
- their information appears in CTI while the phone rings.
2. Populate NethVoice Phone Directory with vtenext Contacts Data
Definition
Phone data for vtenext contacts are periodically imported into the NethVoice centralized phone directory.
How it Works
Periodically, contacts phone data are updated automatically by importing them from vtenext into the NethVoice phone directory, according to the Address Book Sources settings in the Application menu.
The update interval can be:
- 15 minutes
- 30 minutes
- 1 hour
- 6 hours
- 24 hours
You can check the import frequency with the command:
runagent -m nethvoice1
systemctl --user status phonebook-update.timer
Output example:
● phonebook-update.timer - Timer for phonebook source update
Loaded: loaded (/home/nethvoice136/.config/systemd/user/phonebook-update.timer; enabled; preset: disabled)
Active: active (waiting) since Tue 2026-03-17 16:21:55 CET; 3 weeks 6 days ago
Until: Tue 2026-03-17 16:21:55 CET; 3 weeks 6 days ago
Trigger: Tue 2026-04-14 08:15:44 CEST; 1min 42s left
Triggers: ● phonebook-update.service
3. Register Incoming Calls into vtenext
This function needs a proprietary plugin, available from vtenext, that implements the notify_incoming_call endpoint of vtenext API. Please contact vtenext support to obtain the plugin.
Definition
On an incoming call, the event is registered in vtenext, attributed to the called extension owner, and an incoming call notification is shown in vtenext.
How it Works
When a phone extension receives an inbound call, NethVoice notifies vtenext through an API call, and the event is registered in CRM and linked to the extension owner as defined in the Asterisk configuration under user preferences.
Configuration Instructions
Prerequisites
- Version 1.6 or later of the NethVoice image.
The version number can be checked inside the NethVoice module with the command:
runagent -m nethvoice1
env | grep IMAGE_URL - Version 2 of vtenext CRM.
- vtenext plugin (needed only if you want to register incoming calls in vtenext).
VTENEXT Configuration
Obtain the Webservice Access Key
- Log in as the user handling the API calls.
- Open Settings (gear icon at the bottom left).
- Select Business Process Manager (buildings icon on the left).
- Go to Webservice REST.
- In the Username field, select the user that will run the scripts.
- Press the button Webservice accesskey – Show.
- Authenticate.
- Copy the content of the Access Key field.
Install the vtenext plugin
- Get the plugin from vtenext.
- Open Settings (gear icon at the bottom left).
- Select Business Process Manager (buildings icon on the left).
- Go to Module Manager.
- Select the Custom Modules tab.
- Press the button Import new module.
- Press the file selection button and choose the plugin ZIP file from your disk.
- Press Import.
- Verify that the NethVoice module appears in the Standard Modules list.
Install the scripts in NethVoice
-
Access the machine via ssh.
-
To enter the NethVoice module, run the command:
runagent -m nethvoice1 -
To enter the FreePBX container, run the command:
podman exec -ti freepbx /bin/sh -
Copy the files:
lookup_vte.phpfrom/usr/src/nethvoice/samplesto/usr/src/nethvoice/lookup.dvte.phpfrom/usr/share/phonebooks/samples/to/usr/share/phonebooks/scriptsvte_incoming_call.phpfrom/usr/src/nethvoice/samplesto/var/lib/asterisk/agi-bin
You can run the following commands to do it:
cp /usr/src/nethvoice/samples/lookup_vte.php /usr/src/nethvoice/lookup.d
cp /usr/share/phonebooks/samples/vte.php /usr/share/phonebooks/scripts
cp /usr/src/nethvoice/samples/vte_incoming_call.php /var/lib/asterisk/agi-bin -
Edit all three scripts to update:
- the API base URL
- the username
- the Access Key
-
Define the
NETHCTI_CDR_SCRIPT_EXTENSION_RINGenvironment variable in the module environment, pointing to thevte_incoming_call.phpscript:sed -i '/^NETHCTI_CDR_SCRIPT_EXTENSION_RING=/d' environment && echo 'NETHCTI_CDR_SCRIPT_EXTENSION_RING="/var/lib/asterisk/agi-bin/vte_incoming_call.php"' >> environment -
To apply changes, restart FreePBX inside the NethVoice module with the command:
warningThe following command will close all active calls, so execute it when suitable.
systemctl --user restart freepbx