Hi, all zabbix users 
I have a problem with the correct operation of the SMS sent from zabbix.
My configuration looks like this:
Zabbix 4.0.5 installed on Centos 7
Huawei E220 modem USB
I use Gnokii to send sms with notifications from zabbix.
Modem configuration:
[global]
port = /dev/ttyUSB1
model = AT
connection = serial
use_locking = no
serial_baudrate = 9600
smsc_timeout = 30
[gnokiid]
binddir = /usr/bin/
[logging]
debug = off
rlpdebug = off
xdebug = off
After 'gnokii --identify' returns a message to me:
GNOKII wersja 0.6.31
IMEI : 354136028385973
Producent : huawei
Model : E220
Nazwa produktu : E220
Wydanie : 11.116.05.00.00
Script configuration:
#!/bin/sh
HOME=/etc
PATH=/bin:/sbin:/usr/bin:/usr/sbin
LOGFILE="/var/log/zabbix/zabbix-sms.log"
echo "Recipient='$1' Message='$3'" >> ${LOGFILE}
MOBILE_NUMBER=`echo "$1" | sed s#\s##`
# Log it
echo "echo $3 | /usr/bin/sudo /usr/bin/gnokii --sendsms ${MOBILE_NUMBER}" >>${LOGFILE}
# Send it
echo "$3" | /usr/bin/sudo /usr/bin/gnokii --sendsms "${MOBILE_NUMBER}" 1>>${LOGFILE} 2>&1
# EOF
The chmod 777 privileges are given for the script and the USB modem and zabbix-sms.log
User zabbix added to sudoers.
I Using the 'echo "test text" | gnokii --sendsms +48xxxxxxxxx and I get sms messages correctly. There is also a sms reading from 'gnokii --getsms SM 0 end' and sms removal from the console - works correctly.
smszabbix.sh added as the media type in the configuration as a script with the same name as the smszabbix.sh in alertscripts. Phone number is correctly. Earlier, I had zabbix 3.4 and everything worked correctly. I received Zabbix SMS notifications.
Now from zabbix I get the error message "Process exited with code: 20." ----> screen
What I doing wrong?
please for help zabbix users
sorry for my bad English

I have a problem with the correct operation of the SMS sent from zabbix.
My configuration looks like this:
Zabbix 4.0.5 installed on Centos 7
Huawei E220 modem USB
I use Gnokii to send sms with notifications from zabbix.
Modem configuration:
[global]
port = /dev/ttyUSB1
model = AT
connection = serial
use_locking = no
serial_baudrate = 9600
smsc_timeout = 30
[gnokiid]
binddir = /usr/bin/
[logging]
debug = off
rlpdebug = off
xdebug = off
After 'gnokii --identify' returns a message to me:
GNOKII wersja 0.6.31
IMEI : 354136028385973
Producent : huawei
Model : E220
Nazwa produktu : E220
Wydanie : 11.116.05.00.00
Script configuration:
#!/bin/sh
HOME=/etc
PATH=/bin:/sbin:/usr/bin:/usr/sbin
LOGFILE="/var/log/zabbix/zabbix-sms.log"
echo "Recipient='$1' Message='$3'" >> ${LOGFILE}
MOBILE_NUMBER=`echo "$1" | sed s#\s##`
# Log it
echo "echo $3 | /usr/bin/sudo /usr/bin/gnokii --sendsms ${MOBILE_NUMBER}" >>${LOGFILE}
# Send it
echo "$3" | /usr/bin/sudo /usr/bin/gnokii --sendsms "${MOBILE_NUMBER}" 1>>${LOGFILE} 2>&1
# EOF
The chmod 777 privileges are given for the script and the USB modem and zabbix-sms.log
User zabbix added to sudoers.
I Using the 'echo "test text" | gnokii --sendsms +48xxxxxxxxx and I get sms messages correctly. There is also a sms reading from 'gnokii --getsms SM 0 end' and sms removal from the console - works correctly.
smszabbix.sh added as the media type in the configuration as a script with the same name as the smszabbix.sh in alertscripts. Phone number is correctly. Earlier, I had zabbix 3.4 and everything worked correctly. I received Zabbix SMS notifications.
Now from zabbix I get the error message "Process exited with code: 20." ----> screen
What I doing wrong?
please for help zabbix users
sorry for my bad English
Comment