Categories
Essay

Is the Internet the best place to get information?

In recent years, the internet has become people’s preferred communication system. Some individuals argue that this environment is not reliable when it comes to obtaining information. Although this is a democratic type of media, I believe that the lack of regulation tends to increase the amount of false information spread among its users.

The advancement of technology has brought many benefits to society as a whole. Nowadays, not only are mobile devices affordable, but also access to the network is cheap and available even in remote places. Therefore, the more people adopt the internet as their main source of news, the more media vehicles will publish their content on this platform. As a result, people from various social backgrounds are now able to consume information as previous generations could not imagine. Usually, people who are better informed make the best decisions in many aspects of their lives.

On the other hand, the internet was born without any regulatory system. The concept behind its creation was to provide a space in which every citizen could freely manifest his or her thoughts and beliefs. Because of this chaotic environment, many groups have been using the web as a tool to spread misinformation, conspiracy theories, and many other content that will manipulate the opinion of readers. To illustrate, recently, so-called fake news played a huge role in the United States elections. If voters had checked the validity of the information, they might have changed the way they voted. In other words, if internet users do not carefully check the source of what they are reading, they will become an easy target for those who want to spread biased messages as true information.

To sum up, this is a controversial topic, and there is not a simple measure to fix these issues. The system is hugely complex and involves a multitude of players such as tech companies, governments, legislators and political regimes. In summary, people should think twice after reading a piece of information from the internet.

Categories
Essay

What the causes of crimes are and how to prevent them

Annually, the number of criminals on the street increases. Criminal activity has countless causes, such as poverty and lack of education. By improving such social conditions, the government might be able to decrease violence on the streets. This essay will discuss this topic in detail.

Although the overall sense of safety in large cities has been increasing, those places still have neighborhoods in which criminals have territorial dominance. In such areas, the state cannot provide its inhabitants with even basic public services. The lack of schools, for example, is the main reason behind the use of youngsters as a workforce by criminal organizations. It is not rare to see drug dealers and cartels luring teenagers with guns, gold jewelry, and, consequently, power in order to recruit them. As a result, uneducated people might think it is easier to obtain social status and wealth as gang members. If the government wants to ameliorate this situation, it must invest heavily in education in these sensible regions.

Moreover, destitute individuals also have a tendency to commit more crimes than fortunate ones. Nowadays, the media publishes an astonishing number of advertisements on television, social media, and billboards, to name a few. People who cannot afford such items may eventually consider engaging in illegal activity to make money. In this case, their lack of moral values will play a huge role in this decision. However, if they have a job that provides them with enough money to buy things, they will not have to handle this dilemma.

In summary, this is a controversial subject that not even specialists have a silver-bullet solution to. However, it is clear that the more educated a population is, the less crime its people will experience on a daily basis. This field should be the number one priority of every public authority.

Categories
Linux Network RedHat

RedHat 8 Basic Network Settings

For those who have choose to not set up the network connection during the RedHat 8 installation process, it is quintessential doing that soon after the system performs a reboot. Otherwise, you might not be able to install remote packages, receiving nor sending information anywhere.

The following tutorial provides the very basic configuration to make such connectivity possible.

1 – Change your “hostname”. Just edit the file “/etc/hostname” and overwrite the machine’s full hostname.

2 – Define your IP address.

Considering that your system has recognized your interface as “ens160“, and you do not have a DHCP system available on LAN. Edit the file “/etc/sysconfig/network-scripts/ifcfg-ens160.

2.1 – Change the parameter BOOTPROTO from dhcp to static

2.2 – In the end of file, you should add two parameters: IPADDR=X.X.X.X (for example, 192.168.0.2) IPMASK=X.X.X.X (for example, 255.255.255.0)

3 – Now, edit the file “/etc/sysconfig/network” to set up your default gateway. Add the following parameter: GATEWAY=X.X.X.X (for example, 192.168.0.1)

4 – To make this changes effective, type the commands below:

# ifdown ens160 ; ifup ens160

5 – You can check if those settings were rightly applied.

# ifconfig ens160
ens160: flags=4163 mtu 1500
inet 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::289b:a5a7:1282:9065 prefixlen 64 scopeid 0x20
inet6 2804:14c:5bb2:8e8f:72ff:9ed2:b6d9:81b4 prefixlen 64 scopeid 0x0
ether 00:0c:29:9a:b6:0e txqueuelen 1000 (Ethernet)
RX packets 611 bytes 71365 (69.6 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 569 bytes 67271 (65.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 100 0 0 ens160
192.168.0.0 0.0.0.0 255.255.255.0 U 100 0 0 ens160

6 – Finally, test if you are able to get a “ping” response from an public internet address.

# ping -c 3 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=55 time=22.6 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=55 time=22.6 ms
64 bytes from 1.1.1.1: icmp_seq=3 ttl=55 time=20.8 ms

If the IP address that you already set up has fully access to the Internet beyond the gateway, you will be able to get the correct answer from the destiny.

--- 1.1.1.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 6ms
rtt min/avg/max/mdev = 20.785/21.971/22.571/0.847 ms

Categories
Linux RedHat Technology

Changing System Runlevel on RedHat 8

Most of Centos, Fedora, and RedHat previous users are used to set Runlevel by changing the file “/etc/inittab”, however, the newest version of the Red Hat OS (version 8) changed the way how it is set.

You should use the following commands to perform this change in each scenario.

Multi-user terminal mode (alike to runlevel 3)

# systemctl set-default multi-user.target

Graphical mode (alike to runlevel 5)

# systemctl set-default graphical.target
Categories
Asterisk Linux

Recording and mixing Asterisk’s calls

One of the most valuable features of the Asterisk PBX server is its recording support. However, before playing the audio files, we must merge both sides of the recorded call. This article was written based on Asterisk version 16 and Sox v14.4.1.

The first step is enabling this feature in the extensions file /etc/asterisk/extensions.conf. The application used for recording is MixMonitor.

In this example, we used the parameter as follows:

exten => s,n,MixMonitor(${UNIQUEID}.wav49)

Note that, ${UNIQUEID} is the filename and .wav49 is the extension, which means that Asterisk will convert audio files by using the WAV format.

After settings are applied, the new recording files will be placed on the directory /var/spool/asterisk/monitor

Before listening to these audios, you should mix them whether they were created from incoming or outgoing calls. Here, we use the the program called sox.

Mixing incoming calls:

/usr/bin/sox -m DIR_MONITOR/FILENAME-in.wav DIR_MONITOR/FILENAME-out.wav OUTPUT-PATH

Where:

DIR_MONITOR: The full path of audio files (/var/spool/asterisk/monitor).

FILENAME: The unique ID given by Asterisk when it was created. In this case, we have (-in) for one side of the call and (-out) for the other one. For example, 1617641548.58651-in.wav and 1617641548.58651-out.wav

OUTPUT-PATH: The full path containing the directory and the filename of the new mixed audio. For example: /var/spool/asterisk/records/my-record.wav

Mixing outgoing calls:

In this case, we must set the frequency to 8000 Mhz, define the channels to mono, and its format to WAV. It is important to notice that we just handle one single file.

/usr/bin/sox DIR_MONITOR/FILENAME.WAV -r 8000 -c 1 -e signed-integer OUTPUT-PATH

I strongly recommend that you make a script to deal with these recordings, store the new files safety and erase the previous ones. This is important to save disc space of the Asterisk server.

Categories
Asterisk Database Linux

Asterisk + ODBC + Mysql

The latest versions of the Asterisk PBX server connect to the Mysql database server by using ODBC. In this tutorial, I will show you how to set this up.

My test environment is CentOS Linux released on 7.9.2009, Asterisk 16.16.0, unixODBC 2.3.1, and Mysql Community Server 8.

I am taking for granted that you already have your Mysql installed and running. If you have not taken this step yet, you should use a tutorial like this one.

1 – Install the Unix ODBC:

# yum -y install unixODBC

2 – Download the official Mysql library connector from: https://dev.mysql.com/downloads/connector/odbc/

# wget https://cdn.mysql.com//Downloads/Connector-ODBC/8.0/mysql-connector-odbc-8.0.23-linux-glibc2.12-x86-64bit.tar.gz

Decompress the package in /usr/local directory or wherever you like.

# tar -zxvf mysql-connector-odbc-8.0.23-linux-glibc2.12-x86-64bit.tar.gz -C /usr/local

3 – Edit the file /etc/odbcinst.ini and insert the following code block:

[MySQL_ANSI]
Driver=/usr/local/mysql-odbc/lib/libmyodbc8a.so
sageCount=1

4 – Edit the file /etc/odbc.ini and create your connection:

[asterisk-connector]
Description = MySQL connection
Driver = MySQL_ANSI
Database = asterisk
Server = 127.0.0.1
Port = 3306

5 – Now, you must configure your Asterisk to use the connection. The file which contains that information is /etc/asterisk/res_odbc.conf

[asterisk]
enabled => yes
dsn => asterisk-connector
username => user
password => secret
pre-connect => yes
max_connections => 100

6 – Finally, make sure that Asterisk is using the ODBC module, take a look at the file /etc/asterisk/modules.conf and find the following line:

preload => res_odbc.so

If you have any questions, please use the comment box below.