Skip to main content
Skip table of contents

Media Server Deployment and Configuration Guide (With Google Transcription Support)

Prerequisites

Software Requirements

Item

Recommended

Installation guide

Operating System

Debian 12

-

FQDN mapped to server IP address

-

-

Hardware Requirements

Item

Minimum

RAM

16GB

Disk space

150GB

CPU

8 cores

Port Utilization Requirements

The following ports must be open on the server for the voice connector to function.

FireWall Ports/Port range

Network Protocol

Description

5060:5091

udp

Used for SIP signaling.

5060:5091

tcp

Used for SIP signaling.

8021

tcp

Media Server Event Socket

16384:32768

udp

Used for audio/video data in SIP, WSS, and other protocols

7443

tcp

Used for WebRTC

8115

tcp

Voice Connector API

5432

tcp

Postgresql Database

3000

tcp

Outbound Dialer API

22

tcp

SSH

80

tcp

HTTP

443

tcp

HTTPS

1194

udp

OpenVPN

The ports can be opened as follows:

  1. SSH into the Debian server.

    1. Use command

      CODE
      ssh username@server-ip
    2. Enter user password.

    3. Use command

      CODE
      su
    4. Enter root password

  2. Run the following command:

    • CODE
      sudo iptables -A INPUT -p PROTOCOL -m PROTOCOL --dport PORT -j ACCEPT
    • Where PORT is the required Firewall port/port range and PROTOCOL is the associated Network Protocol.

  3. Save this port configuration with command:

    CODE
    sudo iptables-save

Additional Firewall Rules

  • iptables -A INPUT -i lo -j ACCEPT

  • iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

  • iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT

  • iptables -P INPUT DROP

  • iptables -P FORWARD DROP

  • iptables -P OUTPUT ACCEPT

Setup Google Cloud Speech Service

  • Create a Google Account.

  • Create a project on Google Cloud console.

  • Enable a Billing account for this project.

  • Enable Speech API for this project.

  • Create credentials for the Speech service in a JSON format.

  • Download this JSON file and rename it to google-creds.json.

  • Upload this file to the Debian server onto which the Media Server will be deployed, and move it to the /home directory.

Install Media Server

  1. SSH into the Debian server onto which the Media Server will be deployed.

    1. Use command

      CODE
      ssh username@server-ip
    2. Enter user password.

    3. Use command

      CODE
      su
    4. Enter root password.

  2. Run commands:

    • CODE
      sudo apt update
      sudo apt install -y lua-sec certbot lua-socket lua-json lua-dkjson
      apt install -y git
      git clone -b google_transcribe https://efcx:RecRpsuH34yqp56YRFUb@gitlab.expertflow.com/rtc/media-server-setup.git "/usr/src/fusionpbx-install.sh"
      chmod -R 777 /usr/src/fusionpbx-install.sh
      cd /usr/src/fusionpbx-install.sh/debian && ./install.sh
  3. Once the installation has finished, some information will be shown as below:

  1. In a web browser, open the domain name URL and use the provided username and password to log on.

    1. A screen like below should open for a successful installation:

  1. If the page does not open, then go to the command line and run

    CODE
    systemctl stop apache2
    systemctl restart nginx
  2. Try opening the page in Step 3b again, and if it does not open, reset the server and start the installation again.

  3. In the command line, use the command to access the Freeswitch command line as shown below:

    CODE
    fs_cli

Configure Global Transcription

  • Login to Media Server web interface. 

    • Open in browser: https://IP-addr, where IP-addr is the IP address of the Media Server.

  • Add the username and password that was shown upon installation and press LOGIN.

  • Select the Variables option from the Advanced tab.

image-20240822-062345.png
  • Press ADD on the top right.

image-20240822-062446.png
  • Set the Category to Defaults, Name to transcription-vendor and Value to google.

  • Save the changes by pressing SAVE button in top right corner.

  • Open SIP Status under the Status tab.

image-20240424-103838.png
  • Press the RELOAD XML button at the top right.

  • Open the Dialplan Manager section under the Dialplan tab.

  •  Add a new Dialplan by pressing the ADD Button on the top.

image-20240912-051058.png
  •  Fill the form with following details :

    • Name = google_transcription

    • Condition 1 =  Click the black arrow button, then in the field paste ${transcription-vendor}

      • For the field to the right, add ^google$

    • Action 1  =  Select first item from the list  

  • Save the form by pressing save button on top right corner.

  • Re-open google_transcription dialplan.

  • Set the Continue field to True.

  • Set the order field to 889.

  • Set the Context field to global.

  • Set the Domain field to Global.

  • Delete the second row by checking the box in the Delete column for the second row and pressing SAVE in the top right.

  • Add the following information to this dialplan:

Tag

Type

Data

Group

Order

Enabled

action

set

START_RECOGNIZING_ON_VAD=true

0

10

true

action

export

START_RECOGNIZING_ON_VAD=true

0

15

true

action

export

nolocal:execute_on_answer=lua start_transcribe.lua google <language> ${uuid}

0

50

true

  • For <language> a language tag can be chosen from this list, based on the speech model used e.g. en-US.

  • Save the changes by pressing SAVE button in top right corner.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.