Inside Out Blog
How you do anything is how you do everything
  • Home
  • Technology
  • Money
  • Photography & Videography
  • Projects

Popular Tags

FusionPBX FreeSWITCH Security Clustering Linux VoIP MariaDB SEO Personal Load Balancing PHP High Availability Joomla Darktable Fail2Ban Nagios Mageia RPM DNS PowerDNS

Looking for RPMs? Set up our RHEL repo.

rpm

Works on CentOS6/7/8 & Alma/Rocky 8/9
Sponsored by OKay Inc

  1. You are here:  
  2. Home
  3. Technology

Posting a Form with POST method with CasperJS

Details
Category: Technology
  • CasperJS

Here it goes the first example. The system I need to scrap has a form of username and password to access data. So obviously, the first step is to log into the system by sending data using the HTTP POST method. I did this with these steps.

Read more: Posting a Form with POST method with CasperJS

Making your Apache more DoS resistant

Details
Category: Technology
  • Security
  • Fail2Ban

Availability is one pillar of Information Security; it defines itself as the capability of being accessed by legit users when needed. On the other hand, we have DoS attacks which attack an asset availability. A successful DoS attack will not let a user access an asset when needed.

Exposures to DoS attacks are not the easiest to discover; a vulnerability scan will not report them. A successful DoS attack does not always exploit a vulnerability. DoS attacks are discovered easily by seasoned security practitioners. For example, an attacker could send millions of HTTP requests to a valid URL on a given website. The HTTP request could be valid and legitimate, but what makes it an attack is the excess of it. The HTTP server cannot handle it, therefore when a legit user tries to access it, he will fail; the HTTP server is too busy.

There could be many kinds of DoS attacks. This article will prevent the following:

  • When an attacker requests too many times the same URL.
  • When an attacker requests too many times different URLs; each type of request may not be considered an attack, but the sum of them it is.

Read more: Making your Apache more DoS resistant

How to Reboot all Endpoints with FusionPBX

Details
Category: Technology
  • FusionPBX

FusionPBX offers a way to remotely reboot your registered endpoints. Of course, those endpoints must honour the SIP signal. However, the problem arises when you have many extensions. Last week, I had the challenge to reboot more than one thousand endpoints, where eight hundred of them were registered in a single server. As you imagine, the clicking way is too much hassle. There should be another way.

Sadly, as of this day, neither FusionPBX 4.2 (the latest stable branch when writing this article) nor FusionPBX 4.3 (August 26th, 2017) offers a simple way to accomplish this task. After reading the code, I found that all elements were there, I just needed to iterate them to send the signals to all the registered endpoints. So I did it, I took the code from the other parts and joined them to produce a script that would reboot all the listed endpoints. And here it is my pull request that hopefully would be accepted in FusionPBX 4.3.

This patch will enable FusionPBX to reboot all the listed endpoints. If you are watching only the endpoints of a tenant and you click on the button, it will only reboot endpoints registered on that endpoint. If you are listing all the endpoints and click on the button, it will reboot all the endpoints in your server.

Read more: How to Reboot all Endpoints with FusionPBX

How to code a LinkedIn authentication in PHP

Details
Category: Technology
  • PHP
  • LinkedIn

LinkedIn has shown the world to be a good professional social network. You can have your professional profile or your company profile; leave the social to Facebook. After a while, of reading how to do a PHP code that allows you to authenticate, I didn't find a PHP lib to do that (note that my Google-Fu is very bad, I don't doubt there are some). So, here is how I did it.

The first thing is to be registered as a LinkedIn developer (just like Facebook); I won't talk about how to do this. You will need to create there your application, when you are done you will need an API Key and API secret.

Read more: How to code a LinkedIn authentication in PHP

Export a MySQL/MariaDB SELECT into a CSV file

Details
Category: Technology
  • MariaDB

This is not a new question, but I think it is interesting to know how to export a SELECT statement into a CSV formatted file. In this example, I am going to export a FusionBPX CDR format.

SELECT domain_name, direction, caller_id_name, caller_id_number, destination_number, start_stamp, end_stamp, billsec, hangup_cause
        INTO OUTFILE 'amfs.csv'
        FIELDS TERMINATED BY ','
        OPTIONALLY ENCLOSED BY '"'
        ESCAPED BY '\\'
        LINES TERMINATED BY '\n'
        FROM v_xml_cdr
        WHERE domain_uuid='f4abf9c1-842f-4408-b923-dd0c94ae86da'
                AND start_stamp >= '2015-03-01'
        ORDER BY start_stamp;

 This query exports only selected columns into a file called amfs.csv with the following characteristics:

  • fields are delimited by a comma,
  • non-numeric fields are enclosed by double quotes "
  • if there is a need to escape a character, it will be used the slash \

Now, after executing this SELECT, your next question is to know where the file is. In my case, it was in the /var/lib/mysql/fusionpbx/amfs.csv path, which is the directory where the database is stored.

This file does not contain the field names in the first row. You can edit the file with any file editor and add them. Take them from the SELECT statement, as they are. This is an optional step.

After that, you can use any software such as Microsoft Excel or LibreOffice to open it.

Good Luck!

  1. Yet Another FusionPBX Enterprise Cluster Overview (Kamailio? No Thanks!)
  2. Homer? No thanks, here it is an Alternative for Doing Support
  3. Speeding Up your Website Tip: Use WebP Format
  4. Adding Swap into a Linux Server after Installation

Page 20 of 35

  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24

Latest Articles

  • Protecting your PBX against Passwords Leaks
  • Installing Unifi OS on Linux
  • Understanding the E.164
  • Basic Protection against Telemarketing and Unwanted Calls with FreeSWITCH
  • OpenID Authentication (OKTA implementation)

Do you need some FusionPBX free support? Join this FusionPBX/FreeSWITCH Support Channel.

telegram logo

To know the rules, read the pinned post

Copyright © 2026 Inside Out Blog. All Rights Reserved.
Joomla! is Free Software released under the GNU General Public License.
  • Sitemap