GAMMU SMS GATEWAY

Posted on Sep 10 2012 - 11:05am by Huzoor Bux

SMS GATEWAY is a sms via a shortcode transaction, in which we can send and receive messages up to many thousands. Here I will apply an SMS GATEWAY. Tools for software I would use is Gammu as SMS GATEWAY and turkeys as a medium to receive and send through the source code php while for the hardware required is a modem that I use is iTegno WM1080A +.

I will install Gammu is in Linux, Ubuntu version 11:04

  • Install Gammu needs;

@ HB-OS: ~ $ sudo apt-get install Gammu Gammu-smsd lamp-server libmysqlclient-dev

Seteleh the installation is complete connect the modem to the pc, and then type this command;
@ HB-OS: ~ $ dmesg (log will appear as below)

 

 

 

 

Create a file gammurc to check pc connection to the modem;
@ HB-OS: ~ $ sudo nano /etc/gammurc (browse the file by typing the below
[Gammu]
device = /dev/ttyUSB3
connection = at115200

  • type this command to detect the modem;

@ HB-OS: ~ $ Gammu – identify (will show logs like this)

 

 

 

 

  • After detecting a successful modem, now connect the modem to MYSQL database Gammu, Gammu-edit file smsdrc

@ HB-OS: ~ $ sudo nano /etc/Gammu-smsdrc (settings file, as shown below)
# Configuration file for Gammu SMS Daemon

# Gammu library configuration, see gammurc (5)
[Gammu]
# Please configure this!
port = /dev/ttyUSB3
connection = at115200
# Debugging
# LogFormat = textall

# SMSD configuration, see Gammu-smsdrc (5)
[Smsd]
service = mysql
logfile = /var /log/Gammu/syslog
# Increase for debugging information
debuglevel = 255

# Script to be executed when new message has been received
runonreceive = /var/www/huzoorbux.com/scripts/daemon.sh

# Commication frequency settings
commtimeout = 1
sendtimeout = 10

# Phone communication settings
checksecurity = 0
# Resetfrequency = 0

# Database backends congfiguration
user = root
password = password
pc = localhost
# Pc can also Contain port or socket path after the colon (eg localhost :/path/to/s $
database = sms

# 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/

customize your database state ..

  • Muneeb

    kiya hay?