Solution of error “The transceiver type is not supported by port hardware” on HP A5800

I noticed once on the switch HP A5800 Series Switch JC103A, when inserting the module Foxgate SFP-1SM-1550nm-10SC (10km), the following error:

%Apr 26 12:18:56:384 2000 HP OPTMOD/4/MODULE_IN:
 GigabitEthernet1/0/24: The transceiver is UNKNOWN_SFP_PLUS.
%Apr 26 12:18:56:524 2000 HP OPTMOD/5/CHKSUM_ERR:
 GigabitEthernet1/0/24: The checksum of transceiver information is bad!
%Apr 26 12:18:56:674 2000 HP OPTMOD/3/TYPE_ERR:
 GigabitEthernet1/0/24: The transceiver type is not supported by port hardware!

Alternatively, you can try running the command:

transceiver phony-alarm-disable

But in my case this command did not help.
Also noticed that the error did not occur when inserting a similar module is not at 10km, but at 3km – Foxgate SFP-1SM-1550nm-3SC 3km.

The problem was solved by updating the firmware of the switch, as I did in the article – HP A5800 Firmware Upgrade
I updated the firmware from “A5800_5820X-CMW520-R1809P11” to “A5800_5820X-CMW520-R1810P13”.
After the upgrade, both modules were working and there were no errors in the console.

See also:
Using third-party SFP modules in Cisco switches

Sending Asterisk voicemail to multiple emails

Let’s say the voice mail is configured as I described in the article – Setting up voicemail in Asterisk.
There is the following context:

207 => 1111,Username,,,attach=yes|tz=ua|delete=yes

If you want to send a voice message to several email addresses, then instead of, for example, testmail:

207 => 1111,Username,testmail,,attach=yes|tz=ua|delete=yes

Then open the /etc/aliases file in a text editor:

sudo nano /etc/aliases

And let’s specify aliases for testmail:


Done, Asterisk will send a message to testmail, and it will be automatically forwarded to the specified addresses.

See also:
Redirecting mail for the root user

Setting up voicemail in Asterisk

For example, I’ll set up voice mail for SIP number 207.
Voice messages will be sent to the email using Postfix.
How to install it I described in this article – Installing and Configuring Postfix.

For starters, let’s point out the following in the context of SIP 207 (usually in /etc/asterisk/sip.conf):


Next, configure the configuration of voice mail in the file /etc/asterisk/voicemail.conf:

; Format of audio files
; From whom to send letters with notifications
; Whether to attach to an audio file
; The maximum number of messages (standard 100, maximum 9999)
; Maximum message time in seconds
; Maximum greeting time in seconds
; Number of seconds of silence before recording is complete
; Threshold sensitivity to silence, the lower the sensitivity, the value from 0 to 256, standard 128
; Maximum number of failed connection attempts
; Automatically move the listened messages to the "Old" folder. The default is on.
; The encoding of messages, the standard ISO-8859-1, with it my part of the text was displayed incorrectly, so it's better to specify UTF-8
; Skip the line "[PBX]:" from the message header
; The text of the line "From:"
; Letter subject
emailsubject=New voice message ${VM_MSGNUM} in the mailbox ${VM_MAILBOX}
; The contents of the letter
emailbody=Dear ${VM_NAME}:\n\n\tYou received a new voice message in length ${VM_DUR} under the number (number ${VM_MSGNUM})\nin the mailbox ${VM_MAILBOX} from ${VM_CALLERID}, at ${VM_DATE}. \n\t
; Date format
emaildateformat=%A, %d %B %Y в %H:%M:%S
pagerdateformat=%T %D
; Standard program for sending mail
mailcmd=/usr/sbin/sendmail -t

ru=Europe/Moscow|'vm-received' q 'digits/at' H 'hours' M 'minutes'
ua=Europe/Kiev|'vm-received' q 'digits/at' H 'hours' M 'minutes'

; We will write the context parameters voicemailcontext, 1111 - voice mail password (you can not specify), Username - user name, - which address to send voice messages, after the comma you can specify one more, at the end of the option
207 => 1111,Username,,,attach=yes|tz=ua|delete=yes

By the way, if you do not specify “delete=yes”, when the maxmsg limit is reached, the answering machine will say a greeting, and then the text that the subscriber’s voice box is full and do not save the message, or send it to the email. In this case, you need to call the voicemail number and delete the messages. If “delete=yes” is specified, the messages are not stored on the server, they do not come to the voice mailbox, but only sent to the email, in this case the maxmsg limit does not work and the overflow is not possible.

Now, in the configuration of the dial plan /etc/asterisk/extensions.conf in the main context, add the number by calling to which you can listen to the mail:

exten => 500,1,Log(NOTICE, Dialing out from ${CALLERID(all)} to VoiceMail (500))
exten => 500,n,VoiceMailMain(0${CALLERID(num)}@voicemailcontext,s)
exten => 500,n, Hangup

And add the VoiceMail line to the dialing context of the number 207 (after which, if the number is not answered or not on the network, voice mail will work), for example:

exten => 207,1,Dial(SIP/207,30)
exten => 207,n,Answer
exten => 207,n,VoiceMail(207@voicemailcontext)

Finally we connect to the Asterisk console, reload the configuration, see the list of voice mailboxes and letters:

asterisk -rvv
sip reload
voicemail reload
dialplan reload
voicemail show users

The recorded messages are stored in the directory /var/spool/asterisk/voicemail/
Sound files are stored in /usr/share/asterisk/sounds

See also:
Sending Asterisk voicemail to multiple emails
Solving the error in Asterisk “File vm-newn does not exist in any format”
How to convert audio files to ulaw, alaw, gsm, g722, etc. for Asterisk

Redirecting mail for the root user

Open the aliases in the text editor:

sudo nano /etc/aliases

Example of redirecting the root mail to


You can forward directly to several addresses:


Press Ctrl+O then Enter and Ctrl+X to exit the nano editor.

For the changes to take effect, you must update the alias database with the command:

cd /etc
sudo newaliases

If postfix is used as the mail sending server, then the /etc/postfix/ config file can specify other paths to the list and the alias base, for example:

alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/postfix/aliases

In this case, edit this file too:

sudo nano /etc/postfix/aliases
cd /etc/postfix/aliases
sudo newaliases
sudo service postfix restart

For verification, you can send an email to the user as root:

echo 'Test' | mail -s Test root

Installing Metamod on Linux

Metamod – a module that allows to extend the capabilities of the HLDS server, it intercepts calls to functions and transmits data to other plug-ins.

For example, I will install it on the server Counter-Strike 1.6.
Let’s go to the directory cstrike and create the necessary folders:

cd ~/hlds/cstrike
mkdir addons
cd addons
mkdir metamod
cd metamod
mkdir dlls
cd dlls

Download the archive from Metamod and unpack it:

tar -zxvf metamod-p-1.21p37-linux_i686.tar.gz

Create the plugins.ini file:

cd ~/hlds/cstrike/addons/metamod
touch plugins.ini

Open the file liblist.gam in the text editor (in the nano editor, press Ctrl+X to exit, y or n, then Enter to save or discard the changes:

cd ~/hlds/cstrike
nano liblist.gam

Add at the end of the line:

gamedll_linux "addons/metamod/dlls/"

Done, Metamod is installed, the server can be rebooted.
In order to connect nosteam clients to the server, you can install Dproto as well.

A new version of Metamod can be found here

Asterisk time based routing

Here is an example of routing calls over time in Asterisk.
Assume that the /etc/asterisk/extensions.conf file has a configured context for the trunk with the following parameters:

exten => s,1,DIAL(SIP/6004&SIP/6003,19)
exten => s,2,Hangup()

And to resolve the time calls to different phones, we will point out for the context of this trunk only nested contexts:

include => daytime,8:00-18:00,mon-sat,*,*
include => nighttime,18:00-8:00,mon-sun,*,*
include => sunday,8:00-22:00,sun,*,*

In fact, daytime, nighttime, sunday are only the names of contexts for which the time is written in the context of [Trunk_2], they can be called anything.

And then in these separate contexts we will already add the necessary extensions.
That is, in the afternoon:

exten => s,1,DIAL(SIP/6004&SIP/6003,19)
exten => s,2,Hangup()

At night:

exten => s,1,DIAL(SIP/6002,19)
exten => s,2,Hangup()

And on Sunday:

exten => s,1,DIAL(SIP/6002,19)
exten => s,2,Hangup()

You can also, for example, create a holiday context with holidays:

include => holiday,*,*,1,jan
include => holiday,*,*,8,mar


For those who want to paint more in detail by day, I’ll give you a list of days in English:
mon – Monday
tue – Tuesday
wed – Wednesday
thu – Thursday
fri – Friday
sat – Saturday
sun – Sunday

Similarly, up to three letters and names of months are shortened.

Ubiquiti Zabbix templates

I sketched a small template for the client stations (and other devices in the station mode), displaying the level of the signal (with the trigger at a low level), traffic, auto-filling in the network node’s inventory – frequency, SSID AP, WLAN MAC, etc.
In the template, the group “Wi-Fi equipment” needs to be changed to the desired one (it is possible to use the standard Templates), and also specify the correct SNMP community instead of “COMMUNITY”.
Download Zabbix template Ubiquiti Client Station

Recovering GRUB Linux

Usually on each disk there is an MBR (master boot record) and when the computer is turned on, the BIOS accesses it for information for further download. On Linux systems, GRUB is used as the boot loader, I will write about the recovery options of which below.

You can see the version of GRUB using the command:

grub-install --version

1) First option.
We start the system with LiveCD/USB, for example in the Ubuntu Desktop image, in addition to the installation, it is possible to start the system.
Open the terminal, for this press Alt+F2 and enter the command:


Let’s see the list of sections:

sudo fdisk -l
ls /dev/[hsv]d[a-z]*[0-9]*

Suppose the partition with the loader on /dev/sda1, connect it to the directory /mnt:

sudo mount /dev/sda1 /mnt

If software RAID is used, then:

ls /dev/md*
mount /dev/md2 /mnt

Either LVM:

ls /dev/mapper/*
mount /dev/mapper/vg0-root /mnt

And install grub in MBR with the following command:

sudo grub-install --root-directory=/mnt /dev/sda

You may also need to update the grub menu:

sudo update-grub --output=/mnt/boot/grub/grub.cfg

Done, grub is restored!

2) The second option through chroot.
Again, you need to start the system from the LiveCD/USB and open the terminal.
We will admit the partition with the loader together with the main partition on /dev/sda1.

We will connect it to /mnt, and also we will tie several necessary directories:

sudo mount /dev/sda1 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys  /mnt/sys

If /boot finds on a separate partition, then connect it to /mnt/boot, for example:

sudo mount /dev/sda2 /mnt/boot

Let’s move on to chroot:

sudo chroot-prepare /mnt
sudo chroot /mnt

Install GRUB:

grub-install /dev/sda

In case of an error, we type:

grub-install --recheck /dev/sda

It is possible still so:

grub-install --recheck --no-floppy /dev/sda

Exit the chroot:


Disconnect the sections:

sudo umount /mnt/dev
sudo umount /mnt/proc
sudo umount /mnt/sys
sudo umount /mnt

Similarly /boot if it is separate:

sudo umount /mnt/boot

Restart the computer:

sudo reboot

3) The third option, using recovery mode.
Let’s see what partitions are the next command (the numbering of disks starts with 0, and the partitions with 1, that is, the disk /dev/sda can be called for example hd0, and the partition /dev/sda1 – hd0,1):

We indicate this section:

set prefix=(hd0,1)/boot/grub 
set root=(hd0,1)

And let’s check if there is grub:

ls /boot/grub

If there are, we load the modules:

insmod ext2
insmod normal

If the section is in the format btrfs, then execute a few other commands:

set prefix=(hd0,1)/@/boot/grub
set root=(hd0,1)
insmod btrfs
insmod normal

After the commands, Grub will start and determine which operating systems are installed.
Finally, run Linux and from the root user install grub on the correct disk, for example /dev/sda:

grub-install /dev/sda

Restart the system and check:



Updating the GI Matrix Lite’s firmware

There are several options for updating the GI Matrix Lite firmware:
1) Using USB flash drive
2) From the computer through the RS-232 port
3) From the Master receiver to the Slave receiver through the RS-232 ports
4) Through the Internet
5) From the satellite

On the test I will give an example of updating the firmware using a USB stick.

First of all we make a backup copy of the firmware by connecting the USB flash drive to the receiver and selecting MENU – System – Save to USB – OK
And also save the keys MENU – Conditional access – CA setting – Edit keys – press the green button, after that the file mcaskey.bin appears on the flash drive.


1) Download the latest firmware from the Internet or for example from here

2) Unpack the firmware file from the archive if it is in it and copy it to a USB flash drive, then connect the USB flash drive to the receiver.

3) Open MENU – System – Update via USB, select the firmware file, select the update type, then Start and OK.

At the end, the receiver will reboot itself.
At the time of updating, you can not turn off the power of the receiver or turn off the USB flash drive.

Configuring Cron Jobs in cPanel and WHM

Cron jobs are added separately for each user through the cPanel and WHM web interface, namely cPanel “Advanced” -> “Cron Jobs“.
Through the WHM panel “Home” -> “Server Configuration” -> “Configure cPanel Cron Jobs“.

But there are also system tasks that can not be seen through the panel.
They can be seen by connecting through SSH to the server and running the command from the root user:

crontab -e

or from another user via sudo:

sudo crontab -e

In the nano editor, the shortcut Ctrl+X is used to exit, and y/n to save or discard the changes.
The file itself with the tasks is located on the path /var/spool/cron/root

If an annoying report is sent to an e-mail when executing an assignment, you can hide the output of the task by adding the following code to the end of the command:

>/dev/null 2>&1

To restart the Cron service, use the command:

service crond restart

See also a similar article: Using and configuring CRON