PlaySMS Web Interface Gammu, Install and configure

Requirements:

  • Nginx & PHP-FPM are properly installed, especially with PHP MySQL connections.
  • MySQL server as a database server.
  • Git Client

Install Gammu SMS Daemon

Gammu SMS Daemon is a program that periodically scans GSM modems for received messages, stores and defined messages as well as messages enqueued in this storage. It is the perfect tool for managing them and automatically processing them.

install with the command:

apt-get install gammu-smsd

then create directory:

mkdir -p /var/spool/gammu/{inbox,outbox,sent,error} chown gammu.gammu -Rf /var/spool/gammu/

create the file / etc / gammu-smsdrc

[gammu]
# Please configure this!
port = /dev/ttyUSB0
model = at
connection = at115200
synchronizetime = yes
logfile = /var/log/gammu0.log
logformat = textalldate
# Debugging
#logformat = textall
# SMSD configuration, see gammu-smsdrc(5)
[smsd]
service = files
logfile = /var/log/gammu-smsd0.txt
# Increase for debugging information
debuglevel = 0
#ReceiveFrequency = 300
ReceiveFrequency = 60
StatusFrequency = 60
CommTimeout = 60
SendTimeout = 60
LoopSleep = 10
CheckSecurity = 0
# Paths where messages are stored
inboxpath = /var/spool/gammu/inbox/
outboxpath = /var/spool/gammu/outbox/
sentsmspath = /var/spool/gammu/sent/
errorsmspath = /var/spool/gammu/error/
deliveryreport = sms
view raw gammu.rc hosted with ❤ by GitHub

start service:

root@infra:/srv/playsms# /etc/init.d/gammu-smsd start * gammu-smsd is running root@infra:/srv/playsms#

or

gammu-smsd -c /etc/gammu-smsdrc

Install PlaySMS

playSMS is a free and open source SMS management software. A flexible Web-based mobile portal system such as SMS gateway, bulk SMS provider, personal messaging system, corporate and group communication tools

PlaySMS is used as an interface to send and receive SMS from Gammu. In this experiment only using 1 modem.

download the source code for PlaySMS & extract

wget -c "https://github.com/antonraharja/playSMS/archive/master.zip" && unzip master.zip

move directory then copy install.conf.dist to install.conf

cd playSMS-master/; cp install.conf.dist install.conf;

then edit install.conf. adjust to conditions.

# INSTALL DATA
# ============
# Please change INSTALL DATA below to suit your system configurations
# Please do not change variable name, you may change only the value
# MySQL database username
DBUSER=”playsms”
# MySQL database password
DBPASS=”pass”
# MySQL database name
DBNAME=”playsms”
# MySQL database host
DBHOST=”localhost”
# MySQL database port
DBPORT=”3306″
# Web server’s user, for example www-data2 user by default is www-data
# note: please make sure your web server user
WEBSERVERUSER=”www-data”
# Web server’s group, for example www-data2 group by default is www-data
# note: please make sure your web server group
WEBSERVERGROUP=”www-data”
# Path to playSMS extracted source files
PATHSRC=”$(pwd)”
# Path to playSMS web files
# note: please make sure your web root path, in this example its /var/www/html
PATHWEB=”/srv/playsms”
# Path to playSMS additional files
PATHLIB=”/var/lib/playsms”
# Path to playSMS daemon and other binary files
PATHBIN=”/usr/local/bin”
# Path to playSMS log files
PATHLOG=”/var/log/playsms”
# Path to playSMS daemon configuration file
# note: this example will create playsmsd.conf in /etc
PATHCONF=”/etc”
# END OF INSTALL DATA
# ===================
view raw install.conf hosted with ❤ by GitHub

for the public directory application path it will be saved in / srv / playsms. after that run:

./install-playsms.sh

after properly installed and no errors can be checked with the command:

playsmsd /etc/playsmsd.conf status

if it’s not running, run it with the command:

playsmsd /etc/playsmsd.conf start

check again with the status command:

root@infra:/srv/playsms# playsmsd /etc/playsmsd.conf status playsmsd is running schedule at pid 1393 ratesmsd at pid 1395 dlrssmsd at pid 1398 recvsmsd at pid 1401 sendsmsd at pid 1404

Configuration in PlaySMS:

  1. Gateway Settings & SMSC

Click Settings -> Manage gateway and SMSC, then fill in as follows:

2 Outgoing SMS Settings Click Settings -> Route outgoing SMS, then fill in as follows:

  1. SMS Incoming Settings:

Click Settings -> Incoming SMS Route, Fill in ‘no’ on all select dropdowns, except as in the following picture:

Click Save then test send sms to modem number from another number, and send sms from modem number to another number.

Results:

Sent SMS report

SMS inbox report

comments

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s