Showing posts with label vicidial server. Show all posts
Showing posts with label vicidial server. Show all posts

Tuesday, August 15, 2017

Install Backup Vicidial on Digital Ocean

As a back up, I've installed an instance of Vicidial in the cloud through Digital Ocean. I haven't used it yet full time, as I still have my on-premise servers working. It just helps me sleep at night knowing that I have a back up for emergencies. I've tested only a few calls on this and it seems to work fine. I haven't used it full-blown yet so I don't know how well it performs with 5 concurrent users.

Droplet Requirements:

  • Minimum Memory: 1 GB or higher
  • Disk Space: 30 GB or higher
  • OS: CentOS 6.8 x64
For the location of the server, I chose somewhere in North America, because my vendor's VOIP servers are located in United States. I figured that would help with lessening data travel time which prevents choppy calls and delayed voices. (Comment below if you think this logic is wrong.)

Afterwards I just followed the installation instructions on Ray Solomon's website. For me, it was easier to follow than the striker24x7 version. At first try, it took me the whole day, but on the second try I was able to finish in half a day. It's not entirely updated, like some of the installers of the components have a newer version, so just make sure to check the links if there are newer versions and change the download addresses accordingly.

If you find it useful and if you are happy with the outcome, check out Ray Solomon's Amazon wishlist at the bottom of his webpage. I hope he's enjoying the Bayou Seasoning Injector I sent.

P.S. When you're done installing, don't forget to set your iptables properly to block off the hackers!

Update June 2022: The Ray Solomon Website is gone but wayback machine has a copy of it, thankfully! I hope this helps you!

Tuesday, June 13, 2017

Schedule Daily Job on Deletion of Old Recordings

I previously wrote an entry on freeing up space in Vicidial by deleting old recordings and log files (see here). Previously, I didn't have to do this frequently. Now, I have to perform this every 2-3 days thanks to the high volume of calls.

With that, I learned that scheduling this job daily saves me a lot of time from having to do this manually by editing the cron file.

Type in SSH
crontab -e

Add to the bottom then save
### remove WAV files and remove log file daily at after office hours
30 18 * * * rm -f /var/spool/asterisk/monitorDONE/ORIG/*.wav
30 18 * * * rm -f /var/log/httpd/*
35 18 * * * sudo reboot

For this job I've scheduled, it's set to delete old WAV files and logs at 6:30pm then reboot at 6:35pm every day. For more info on the how to add jobs in cron, check here.



Friday, February 24, 2017

Deleting Recordings from a Specific Date in Vicidial

How does one delete recordings from a specific date? It's a good thing that vicidial recordings are named by date. In my case, the recordings we use are in MP3 format.

For example here, if I wanted to delete all MP3's from March 19, 2016, I just need to use the command below:
rm -f /var/spool/asterisk/monitorDONE/MP3/20160319*.mp3
It would be helpful in freeing up space if the original .WAV files are also deleted since they eat up a lot of space. This isn't a date-specific command since we only need the MP3's.
rm -f /var/spool/asterisk/monitorDONE/ORIG/*.wav 

To free up more space, check here:
http://simplevicidial.blogspot.com/2016/04/no-mysqlsock-because-root-partition-is.html 

*Another thing I learned: Sometimes, you just need to reboot to free up space.

Tuesday, April 5, 2016

No MySQL.sock because Root Partition is 100% Full

Last week our Vicidial Server crashed and our agents couldn't make calls anymore. After restarting the server and trying to do the ol' rename-mysql.sock solution, I found that the mysql.sock file was missing. What gives??!

When I try to access the agent page in Vicidial, the error was: "MySQL connect ERROR: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)". Normally, I would follow the process of renaming or deleting the existing mysql.sock file then restart the mysql service. However, this time, there was no mysql.sock. (Impt: Please DO NOT delete the mysql! They are not the same as mysql.sock!)

After checking with the provider, turns out that the root partition is already full. Here are the steps that the provider gave to resolve the issue.

Steps and SSH commands:
  1. Find out how much space you have left.
    SSH Command: df -h
    In the Admin Page, go to "Reports" and scroll down and look for "Disk". It should provide the percentage of use.
  2. Delete unwanted files. In this case, you can delete the .WAV duplicates. It won't delete your .MP3 recordings.
    SSH Command:
    rm -f /var/spool/asterisk/monitorDONE/ORIG/*.wav
    rm -f /var/log/httpd/*
  3. Restart the server via SSH. Do not just push the power button or pull the plug.
    SSH Command: sudo reboot
And there you go! If that still doesn't work but you have the mysql.sock file already, follow the old process of renaming or deleting the existing mysql.sock file then restart the mysql service

Friday, October 2, 2015

MySQL Connect Error in Vicidial

Because my UPS failed, my Vicidial Server did not get to shutdown properly when the power flickered for a second. This caused the MySQL error and I can't get past anything after clicking "Agent" or "Administration".

Here's what I did in the Linux Command Line:
mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.bak
service mysqld start

After that, it was okay. Keep this piece of code close to you, if you expect power outages to happen... or if you're too lazy to use "sudo poweroff". See reason for this code at the source from stackoverflow.com

Update:



Source: http://stackoverflow.com/questions/20407292/centos-another-mysql-daemon-already-running-with-the-same-unix-socket

Changing the Static Internal Network IP Address of the Vicidial Server | Sorry, there are no available sessions

We did a revamp of the entire office network, so the old internal network IP addresses had to change. When the vendor installed our Vicidial Server, he preset it with the old one. 

Here's how I did the changes (2 important steps):

1. In Linux Shell Scripting Command Line, type the following:
sudo ifconfig eth0 <new IP address> netmask 255.255.255.0

Check afterwards if the IP address has been updated by typing:
ifconfig
Source:  http://www.howtogeek.com/118337/stupid-geek-tricks-change-your-ip-address-from-the-command-line-in-linux/


2. Next, still in Linux Shell Scripting Command Line, type the following to change the same IP address in the Vicidial Database:
/usr/share/astguiclient/ADMIN_update_server_ip.pl
After that, just follow the prompts. What I did was to keep pressing Enter and it knew what IP address was the old one and which one was the new one.

This second step is important, because it will re-point the Vicidial Database internal network IP addresses to the new one. If you forget to do this, you'll get the error "Sorry, there are no available sessions" when you log in as an agent.

Source: http://striker24x7.blogspot.com/2014/01/sorry-there-are-no-available-sessions.html