Media Server Configurations for CX Voice
Requirements
Software Requirements
Item | Recommended | Installation guide |
Media Server | Latest version | |
EFCX | Latest version |
Install Lua libraries
SSH into the Debian server onto which the Media Server is installed.
Use command
CODEssh username@server-ip
Enter user password and press ENTER.
Use command
CODEsu
Enter root password and press ENTER.
Run the following commands, one at a time:
- CODE
apt install lua-socket sudo apt install lua-sec sudo apt-get install lua-json sudo apt-get install -y lua-dkjson
Configure IVR scripts and recordings
Deployment
SSH into the Media Server.
Use command
CODEssh username@server-ip
Enter user password and press ENTER.
Use command
CODEsu
Enter root password and press ENTER.
Confirm git is installed, and install it if is not.
Clone the Media Server scripts repository:
CODEgit clone -b TAG https://efcx:RecRpsuH34yqp56YRFUb@gitlab.expertflow.com/rtc/freeswitch-scripts.git
Where TAG is the latest branch tag of the Media Server scripts repository obtained from here.
Navigate to the cloned repository to access the files:
CODEcd freeswitch-scripts
Alter the file name of cx_env.lua to cx_env{DN}.lua where {DN} is the dialing number of the IVR (Set in the CxIvr Dialplan section below).
e.g. for an IVR with a dialing number of 1555 the file would be named cx_env1555.lua.
CODEmv cx_env.lua cx_env1555.lua
Move the files ending in .lua to the Media Server scripts folder:
- CODE
mv *.lua /usr/share/freeswitch/scripts
Move any custom IVR scripts to the Media Server scripts folder:
CODEmv <custom-lua-IVR-script> /usr/share/freeswitch/scripts
Move the ivr_prompts folder:
CODEmv ivr_prompts /usr/share/freeswitch/sounds/
Assign read-write permissions to the ivr_prompts and scripts folder:
CODEchmod 777 -R /usr/share/freeswitch/sounds/ivr_prompts chmod 777 -R /usr/share/freeswitch/scripts
Configuration
Open cx_env{DN}.lua :
CODEvi /usr/share/freeswitch/scripts/cx_env{DN}.lua
CODElocal config = {} config = { -- Set to NAME or ID depending on whether queue field contains name or ID of queue queueType = 'NAME', -- Name or ID of queue to reserve agents from queue = 'Voice Queue', -- NOTE: Keeping queue and queueType as '' will cause CX to use the default queue set in the CX Voice channel -- queue = '', -- queueType = '', -- CxFQDN cxFqdn = "https://devops.com", -- API of voice connector for reserving an agent voiceConnectorApi = "http://VC-IP:VC-PORT", -- Path of folder containing sound files that play during the IVR menu, DO NOT CHANGE ivr_prompts_folder = "/usr/share/freeswitch/sounds/ivr_prompts/", } return config
Press the "I" key to enter editing mode.
The queueType field can contain one of two values:
'NAME'
''
The queue field can contain one of two types of values, based on what the queueType field above contains:
Name of the Agent Queue e.g. Support Queue (If queueType contains 'NAME') This name can be obtained from Unified Admin from the Queues section.
Empty string i.e. '' (If queueType contains '')
If queue and queueType are set to '' , then the call will be routed to the default queue set for the CX Voice channel in Unified Admin.
The voiceConnectorApi field will contain a URL in the following format:
http://VC-IP:VC-PORT/request-agent
Replace VC-IP and VC-PORT with IP address and port of the voice connector.
The cxFqdn field contains the fully qualified domain name of the EFCX:
https://devops.com
Replace https://devops.com with the EFCX domain name.
The ivr_prompts_folder field contains path to the ivr_prompts folder. Leave it at the default value.
Save and exit the file by pressing the Esc key, entering :wq and pressing ENTER.
Steps 11-15 below are optional, in case Post-Call-Survey is in use.
Open pcs1_env.lua:
CODEvi /usr/share/freeswitch/scripts/pcs1_env.lua
CODElocal config = {} config = { formId = "form-id123", cxFqdn = "https://devops.expertflow.com", ivr_prompts_folder = "/usr/share/freeswitch/sounds/ivr_prompts/" } return config
Press the "I" key to enter editing mode.
The formId will contain the ID of the PCS Survey form created on Unified Admin (make sure that audio prompts were uploaded for each question).
The cxFqdn field contains the fully qualified domain name of the EFCX:
Replace devops.expertflow.com with the EFCX domain name.
The ivr_prompts_folder field contains path to the ivr_prompts folder. Leave it at the default value.
Save and exit the file by pressing the Esc key, entering :wq and pressing ENTER.