Rocket.Chat Installation Process(centos)

Rocket.Chat in CentOS

STEP 1-  Install necessary dependency packages

  • Update package list and configure yum to install the official MongoDB packages with the following yum repository file:
     sudo yum -y check-update

cat << EOF | sudo tee -a /etc/yum.repos.d/mongodb-org-4.0.repo
[mongodb-org-4.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/7/mongodb-org/4.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc
EOF


Configure Node.js to be installed via package manager:
      sudo yum install -y curl && curl -sL https://rpm.nodesource.com/setup_8.x | sudo bash -

Install build tools, MongoDB, nodejs and graphicsmagick:

      sudo yum install -y gcc-c++ make mongodb-org nodejs

      sudo yum install -y epel-release && sudo yum install -y GraphicsMagick

Using npm install inherits and n, and the node version required by Rocket.Chat:

sudo
npm install -g inherits n && sudo n 8.11.4


STEP 2- Install Rocket.Chat

Download the latest Rocket.Chat version:

      curl -L https://releases.rocket.chat/latest/download -o /tmp/rocket.chat.tgz
      tar -xzf /tmp/rocket.chat.tgz -C /tmp

Install (this guide uses /opt but feel free to choose a different directory):

      cd /tmp/bundle/programs/server && npm install

      sudo mv /tmp/bundle /opt/Rocket.Chat


STEP 3- Configure the Rocket.Chat service

Add the rocketchat user, set the right permissions on the Rocket.Chat folder and create the Rocket.Chat service file:

      sudo useradd -M rocketchat && sudo usermod -L rocketchat
      sudo chown -R rocketchat:rocketchat /opt/Rocket.Chat

cat << EOF |sudo tee -a /lib/systemd/system/rocketchat.service
[Unit]
Description=The Rocket.Chat server
After=network.target remote-fs.target nss-lookup.target nginx.target mongod.target
[Service]
ExecStart=/usr/local/bin/node /opt/Rocket.Chat/main.js
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=rocketchat
User=rocketchat
Environment=MONGO_URL=mongodb://localhost:27017/rocketchat?replicaSet=rs01 MONGO_OPLOG_URL=mongodb://localhost:27017/local?replicaSet=rs01 ROOT_URL=http://localhost:3000/ PORT=3000
[Install]
WantedBy=multi-user.target
EOF

Open the Rocket.Chat service file just created (/usr/lib/systemd/system/rocketchat.service) using sudo and your favourite text editor, and change the ROOT_URL environmental variable to reflect the URL you want to use for accessing the server (optionally change MONGO_URL, MONGO_OPLOG_URL and PORT):

MONGO_URL=mongodb://localhost:27017/rocketchat?replicaSet=rs01
MONGO_OPLOG_URL=mongodb://localhost:27017/local?replicaSet=rs01 ROOT_URL=http://your-host-name.com-as-accessed-from-internet:3000
PORT=3000

Setup storage engine and replication for MongoDB (mandatory for versions > 1), and enable and start MongoDB and Rocket.Chat:
     sudo sed -i "s/^#  engine:/  engine: mmapv1/"  /etc/mongod.conf
     sudo sed -i "s/^#replication:/replication:\n  replSetName: rs01/" /etc/mongod.conf
     sudo systemctl enable mongod && sudo systemctl start mongod
     mongo --eval "printjson(rs.initiate())"
     sudo systemctl enable rocketchat && sudo systemctl start rocketchat


STEP 4- Configure your Rocket.Chat server

Open a web browser and access the configured ROOT_URL (http://your-host-name.com-as-accessed-from-internet:3000), follow the configuration steps to set an admin account and your organization and server info.


 

Automatic Call Distribution (ACD) Queues(part-1)[*ASTERISK*]

Automatic Call Distribution Queues

Automatic Call Distribution (ACD), or call queuing, provides a way for a PBX to queue up incoming calls from a group of users: it aggregates multiple calls into a holding pattern, assigns each call a rank, and determines the order in which that call should be delivered to an available agent (typically, first in first out). When an agent becomes available, the highest-ranked caller in the queue is delivered to that agent, and everyone else moves up a rank.
**Important point–

There are two types of call centers: inbound and outbound. ACD refers to the technology that handles inbound call centers, whereas the term Dialer (or Predictive Dialer) refers to the technology that handles outbound call centers. In this book we will primarily focus on inbound calling.

Creating a Simple ACD Queue

To start with, we’re going to create a simple ACD queue. It will accept callers and attempt to deliver them to a member of the queue.
We’ll create the queue(s) in the queues.conf file, and manually add queue members to it through the Asterisk console.
The first step is to create an empty agents.conf file in your /etc/asterisk configuration directory. We will not use or edit this file, however the app_queue module expects to find it, and will not load if it does not exist:
          $ cd /etc/asterisk
          $ touch agents.conf
Next you need to create the queues.conf file, which is where configuration for the actual queues is defined:
          $touch queues.conf
Populate it with the following configuration, which will create two queues named [sales] and [support].
[general]
autofill=yes                   ;  distribute all waiting callers to available members
shared_lastcall=yes       ;  respect the wrapup time for members logged into more
                                     ;  than one queu
[StandardQueue](!)      ; template to provide common features
musicclass=default       ; play [default] music
strategy=rrmemory       ; use the Round Robin Memory strategy
joinempty=no               ; do not join the queue when no members available
leavewhenempty=yes   ; leave the queue when no members available
ringinuse=no                 ; don’t ring members when already InUse (prevents
                                      ; multiple calls to an agent)
[sales](StandardQueue)       ; create the sales queue using the parameters in the
                                            ; StandardQueue template
[support](StandardQueue)   ; create the support queue using the parameters in the
                                            ; StandardQueue template
The [general] section defines the default behavior and global options. We’ve only specified two options in the [general] section, since the built-in defaults are sufficient for our needs at this point.
The first option is autofill, which tells the queue to distribute all waiting callers to all available members immediately. Previous versions of Asterisk would only distribute one caller at a time, which meant that while Asterisk was signaling an agent, all other calls were held (even if other agents were available) until the first caller in line had been connected to an agent (which obviously led to bottlenecks in older versions of Asterisk where large, busy queues were being used). Unless you have a particular need for

backward-compatibility, this option should always be set to yes.
The second option in the [general] section of queues.conf is shared_lastcall. When we enable shared_lastcall , the last call to an agent who is logged into multiple queues will be the call that is counted for wrapup time in order to avoid sending a call to an
agent from another queue during the wrap period. If this option is set to no , the wrap timer will only apply to the queue the last call came from, which means an agent who was wrapping up a call from the support queue might still get a call from the sales queue. This option should also always be set to yes (the default).
The next section, [StandardQueue](!) is the template we’ll apply to our sales and sup‐ port queues (we declared it a template by adding(!)). We’ve defined the musicclass to be the default music on hold, as configured in the musiconhold.conf file. The strategy
we’ll employ is rrmemory, which stands for Round-Robin with Memory. The rrmemory strategy works by rotating through the agents in the queue in sequential order, keeping track of which agent got the last call, and presenting the next call to the next agent. When it gets to the last agent, it goes back to the top (as agents log in, they are added to the end of the list). We’ve set joinempty to
no since it is generally bad form to put callers into a queue where there are no agents available to take their calls.
The leavewhenempty option is used to control whether callers should fall out of the Queue() application and continue on in the dialplan if no members are available to take their calls. We’ve set this to yes because you won’t normally want callers waiting in a
queue with no logged-in agents.
Finally, we’ve set ringinuse to no, which tells Asterisk not to ring members when their devices are already ringing. The purpose of setting ringinuse to no is to avoid multiple calls to the same member from one or more queues.
Once you’ve finished configuring your queues.conf file, you can save it and reload the app_queue.so module from your Asterisk CLI:
$ asterisk -r
*CLI> module reload app_queue.so
— Reloading module ‘app_queue.so’ (True Call Queueing)
Then verify that your queues were loaded into memory (don’t forget to ensure an empty agents.conf file exists as well):
localhost*CLI> queue show
support has 0 calls (max unlimited) in ‘rrmemory’ strategy
(0s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0% within 0s
No Members
No Callers
sales has 0 calls (max unlimited) in ‘rrmemory’ strategy
(0s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0% within 0s
No Members
No Callers
The output of queue show provides various pieces of information, including those parts detailed in Table:
Table  Output of queue show CLI command
Field      Description
W:          Queue weight
C:           Number of calls presented to this queue
A:           Number of calls that have been answered by a member
SL:         Service level
Now that you’ve created the queues, you need to configure your dialplan to allow calls to enter the queue.
Add the following dialplan logic to the extensions.conf file:
[Queues]
exten => 7001,1,Verbose(2,${CALLERID(all)} entering the support queue)
same => n,Queue(support)
same => n,Hangup()
exten => 7002,1,Verbose(2,${CALLERID(all)} entering the sales queue)
same => n,Queue(sales)
same => n,Hangup()
[LocalSets]
include => Queues ; allow phones to call queues
We’ve included theQueues context in the LocalSets context so that our telephones can call the queues we’ve set up.

Read more

Pattern Matching(Asterisk)

Pattern Matching If we want to be able to allow people to dial through Asterisk and have Asterisk connect them to outside resources, we need a way to match on any possible phone number that the caller might dial. For situations like this, Asterisk offers pattern matching. Pattern matching allows you to create one extension … Read more

Building an Interactive Dialplan(ASTERISK)

Building an Interactive Dialplan The dialplan we just built was static; it will always perform the same actions on every call. Many dialplans will also need logic to perform different actions based on inputfrom the user, so let’s take a look at that now. The Goto(), Background(), and WaitExten() Applications As its name implies, the … Read more

A Simple Dialplan(ASTERISK)

“A Simple Dialplan” Open up the file /etc/asterisk/extensions.conf, and let’s take a look at your first dialplan. Hello World In the first priority of our extension, we answer the call. In the second, we play a sound file named hello-world, and in the third we hang up the call. The code we are interested in … Read more

How To Install GNOME GUI In CentOS 7 Linux

centos 7 GUI install

How To Install GNOME GUI In CentOS 7 Linux Step 1 Install Gnome GUI packages using the YUM command. CentOS 7: # yum groupinstall “GNOME Desktop” “Graphical Administration Tools” Step 2 Enable GUI on system startup. In CentOS 7 / RHEL 7,  systemd uses “targets” instead of runlevel. The /etc/inittab file is no more used to change run levels. … Read more

xrdp installation on CentOS 7

check rdp from windows to linux

xrdp installation on CentOS 7 Prerequisites 1. First, install Gnome GUI on CentOS 7 / RHEL 7 2. xrdp is available in EPEL repository, Install and configure EPEL repository rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm Install xrdp on CentOS 7 Use YUM command to install xrdp package on CentOS 7 / RHEL 7 yum -y install xrdp tigervnc-server Once xrdp is installed, … Read more

an authentication error has occurred the token supplied to the function is invalid

remote desktop error

an authentication error has occurred the token supplied to the function is invalid in xrdp 0.9.8 TLSv1.2 and TLSv1.3 is added by default. in older version of windows system TLSv1.3 was not supported. thats why it is not connecting with xrdp server. To resolve this issue from server side follow the steps below. 1. Login … Read more

Anydesk installation on centos 7

anydesk

Anydesk installation on centos 7 What is AnyDesk AnyDesk is the open source remote desktop application . It is one of the world’ s most comfortable remote desktop application. Access all your programs, documents and files from anywhere, without having to entrust your data to a cloud service. You can say it’ s an alternative … Read more