To set up an Asterisk integration, take the following steps:
-
Prepare Asterisk for integration. Read more >>>
-
Set up Creatio Messaging Service. Read more >>>
-
Set up the message exchange library. Read more >>>
-
Set up the Asterisk parameters. Read more >>>
In Creatio, the Asterisk integration functionality requires a separate license. You need to generate a license request, send it to our service team, upload the received license file into the system, and distribute the licenses among the users. Read more: Creatio licensing and Manage user licenses.
The integration is only possible if complete preliminary Asterisk setup was performed by the phone integration administrator.
1. Prepare Asterisk for integration
The AMI (Asterisk Manager Interface) interface is used to interact with Asterisk. Use AMI to connect to Asterisk servers, configure and manage client programs.
-
Create an AMI user for Creatio, specify the user's parameters in the “manager.conf” file, for example:
Replace the “deny” and “permit” values with the corresponding addresses.
-
Check the parking feature activity and the “features.conf” file parameters, for example:
2. Set up Creatio Messaging Service (formerly Terrasoft Messaging Service)
The messaging service lets you connect Creatio to Asterisk via AMI protocol and distribute call events between Creatio users. Some of the settings differ depending on the platform on which the Asterisk telephony service is deployed – .NET Framework or .NET Core.
Set up Creatio Messaging Service on the .NET Framework platform
-
Before installing Creatio Messaging Service (CMS), make sure that your computer runtime environment has:
-
A .NET Framework package version 4.7.2 or later on the server where you are going to install Creatio Messaging Service.
-
At least 2 Gb of RAM and 20 Gb of free drive space.
-
-
Contact Creatio support to receive the messaging service installation files or download the files via the URL: Download Creatio Messaging Service. Unpack the archive to a folder to ensure a smooth installation. If you run the installation directly from the archive, the archiver application may interfere with the install wizard.
-
Run the Creatio Messaging Service Install.msi file on the machine intended as the message exchange server and proceed with the installation.
-
Make sure that the “TerrasoftMessagingService” service is running in the Windows Services application. If the “TerrasoftMessagingService” service is not running, start it manually.
-
Open the folder with the service files: ~\BPMonline Messaging Service. Specify the following parameters for Asterisk connector in the “Terrasoft.Messaging.Service.exe.config” configuration file:
See the list of Asterisk connector parameters in the following table.
Parameter caption
Parameter function
FilePath
Use this parameter for diagnostics of the system. It allows to repeat a set of events from the file. The default value should be empty.
URL
Asterisk server IP address parameter.
protocol
The parameter enables selecting the protocol type: SIP or PJSIP. Contact your PBX administrator to find out the needed protocol type.
Port
AMI protocol port. By default, “5038.”
OriginateContext
The command is used to initialize the call from Creatio phone number. The parameter contains the caption of the context from which the call will be made to the user phone number. The default value for FreePBX is “from-internal”
parkingLotContext
The context for call initialization to receive parking line. The default value is “originateContext.”
AutoPauseOnCommutationStart
The checkbox is used for the correct work with Asterisk queues. If the checkbox is selected, the system will put the agent on a pause in all queues after answering the call. The feature is used to avoid the second call during the handling of the first one and/or putting the first call on hold.
queueExtensionFormat
The call channel format while receiving the call from the queue. If using LocalChannel, the default value in FreePBX is “Local/{0}@from-queue.”
sendRingStartedOnRingingState
The checkbox stands for the correct handling of the call from the queue. If this checkbox is selected, the system will display the call with the user after receiving the “NewState” event with the Ringing parameter by AMI. The default value is “On.”
traceQueuesState
This setting is used to define the agent's status in the queues. If the agent receives the second call from the queue while handling the first one in Creatio, it is used for debugging. Information about the status of agents is being written to the log file of the connector. The default value is “Off.”
Configuration example:
- Test the phone integration.
Set up Creatio Messaging Service on the .NET Core platform
-
Install Docker. Installing Docker on Linux platforms is covered in the Docker guide. Run the “docker --version” command on Linux machine to verify the installed Docker version.
-
Install Docker Compose. Installing Docker Compose for Linux OS is covered in the Docker documentation. Run the “docker-compose --version” command on Linux machine to verify the installed Docker Compose version.
-
Install and set up the Docker Compose components. The container of the messaging service is deployed via the Docker Compose utility. Download the archive. Unzip the archive with the configuration files and scripts to a custom directory, for example, /opt/messaging.host.
The archive structure of the configuration files and scripts:
-
Using the Linux terminal, go to the /docker-compose catalog of the unzipped archive, for example, /opt/messaging.host/docker-compose.
-
Run the “sudo docker-compose pull” command in the terminal. Wait until the download of the required service component images from the Docker Hub is complete.
-
Specify the following parameters for Asterisk connector in the “etc/appsettings.json” configuration file:
-
Run the sudo docker-compose up -d command to launch the service. A “logs” folder will be created in the current catalog.
See the list of Asterisk connector parameters in the following table.
Parameter caption
Parameter function
FilePath
Use this parameter for diagnostics of the system. It allows to repeat a set of events from the file. The default value should be empty.
URL
Asterisk server IP address parameter.
protocol
The parameter enables selecting the protocol type: SIP or PJSIP. Contact your PBX administrator to find out the needed protocol type.
Port
AMI protocol port. By default, “5038.”
OriginateContext
The command is used to initialize the call from Creatio phone number. The parameter contains the caption of the context from which the call will be made to the user phone number. The default value for FreePBX is “from-internal”
parkingLotContext
The context for call initialization to receive parking line. The default value is “originateContext.”
AutoPauseOnCommutationStart
The checkbox is used for the correct work with Asterisk queues. If the checkbox is selected, the system will put the agent on a pause in all queues after answering the call. The feature is used to avoid the second call during the handling of the first one and/or putting the first call on hold.
queueExtensionFormat
The call channel format while receiving the call from the queue. If using LocalChannel, the default value in FreePBX is “Local/{0}@from-queue.”
sendRingStartedOnRingingState
The checkbox stands for the correct handling of the call from the queue. If this checkbox is selected, the system will display the call with the user after receiving the “NewState” event with the Ringing parameter by AMI. The default value is “On.”
traceQueuesState
This setting is used to define the agent's status in the queues. If the agent receives the second call from the queue while handling the first one in Creatio, it is used for debugging. Information about the status of agents is being written to the log file of the connector. The default value is “Off.”
Configuration example:
- Test the phone integration.
3. Set up the message exchange library
Message exchange library selection and setup is performed once by the system administrator. Some of the settings differ depending on the platform that the Asterisk telephony service is deployed on – .NET Framework or .NET Core.
Set up the library on the .NET Framework platform
-
Open the system designer by clicking in the top right corner of the application window.
-
Click “System settings” in the “System setup” block.
-
In the “Default messages exchange library” (“SysMsgLib” code) system setting, set the default value to “Telephony integration library based on Asterisk (AMI) protocol.”
-
In the “Message exchange server” (“SysMsgServerNode” code) system setting, select the connection parameters of the system messages service. In the Default value field, specify the message exchange network address in the following format: “ws://server:2013” for sites served over HTTP or “wss://server:2013” for sites served over HTTPS, where:
-
server – domain name of the server that hosts the message exchange service. Using IP addresses or “localhost” is not recommended.
-
“2013” – the port used by default for connecting to the messaging service. You can change the port number in the “Terrasoft.Messaging.Service.exe.config” file. Using “localhost” is not recommended, as it may cause errors when connecting to the phone integration server. When using a wss connection, make sure that server address matches the address in the SSL certificate.
-
Set up the library on the .NET Core platform
-
Open the system designer by clicking in the top right corner of the application window.
-
Click “System settings” in the “System setup” block.
-
In the “Default messages exchange library” (“SysMsgLib” code) system setting, set the default value to “Phone integration library based on Asterisk (AMI) protocol.”
-
In the “Message exchange server” (“SysMsgServerNode” code) system setting, select the connection parameters of the message service. In the Default value field, specify the message exchange network address in the following format: “http://server:2013” for sites served over HTTP or “https://server:2014” for sites served over HTTPS, where:
-
server – domain name of the server that hosts the message exchange service. Using IP addresses or “localhost” is not recommended.
-
“2013 or 2014” – the port used by default for connecting to the messaging service. You can change the port number in the “docker-compose.yml” configuration file. Using “localhost” is not recommended, as it may cause errors when connecting to the phone integration server. When using an HTTPS connection, make sure that server address matches the address in the SSL certificate.
-
4. Set up the Asterisk parameters
These settings should be applied to every Creatio user who received Asterisk integration license. To do this:
-
Open the user profile page by clicking the Profile image button on the main page of the application.
-
Click the Call Center parameters setup button.
-
On the displayed page, fill out the required fields:
-
Disable call Center integration – this checkbox allows you to disable Creatio integration with the phone integration. The call button will not be displayed on the communication panel of the application.
-
Number – Asterisk user line number. It matches the phone number by default. For example, to track the SIP/305 user line, specify the “305” value, and to track the SIP/office line, specify the “office” value.
-
Outgoing call context – specify the outgoing call context if it differs from the system outgoing call context specified in the “Terrasoft.Messaging.Service.exe.config” file for this particular user.
-
Enable debugging – this checkbox allows you to display troubleshooting information within the browser console. This troubleshooting information can be used when the phone integration runs into problems and the customer addresses the service team.
-
-
Click Save.
-
Refresh the browser page to apply the changes.