Gammu is the most popular program to build customized sms server. It can connect to various of handset, from the oldest model until recently launched model. Also it support populars os(es) such as Microsoft Windows and Linux Ubuntu.
To setup gammu under windows simply download win32 binary from gammu site. For Ubuntu, even easier.
$ sudo apt-install gammu
That's all.
Once installed try edit gammurc (gammu config files). Windows version, config file will be in same folder as gammu.exe. For Ubuntu version, the config file is in /etc. Edit where needed.
My working setting is :
[gammu]
port = /dev/ttyS1
;model = 6110
connection = at19200
;synchronizetime = yes
logfile = /home/says/gammulog
logformat = textall
;use_locking = yes
;gammuloc = locfile
;startinfo = yes
;gammucoding = utf8
;rsslevel = teststable
;usephonedb = yes
To test out :
$ gammu --identify
On success connection it should display our gsm modem properties.
Manufacturer : Nokia
Model : 6150 (NSM-1)
Firmware : 4.12 E (02-12-98)
Hardware : 2320
IMEI : 493002107068660
Original IMEI : 493002107068660
Manufactured : 1298
Product code : 0502690
Simlock 1 : MCC+MNC 00101, opened, factory, counter 0
Simlock 2 : GID1 0000, opened, factory, counter 0
Simlock 3 : GID2 0000, opened, factory, counter 0
Simlock 4 : MSIN 0000000001, opened, factory, counter 0
MSID : 823c21bb67cc5d6aab0f3caae6
MCU checksum : 4057
DSP ROM : 4
Next is configure smsd engine. Create a smsd config file. Ussually named smsdrc. Edit where needed. Put the file in same folder as we running Gammu. I strongly recommend using files style, as you can easily to customize the system.
[smsd]
PIN = 327426
logfile = /home/says/sms/logs/smsdlog
commtimeout = 10
sendtimeout = 20
#receivefrequency = 0
#resetfrequency = 0
deliveryreport = log
phoneid = mdsms
inboxpath = /home/says/sms/inbox/
outboxpath = /home/says/sms/outbox/
sentsmspath = /home/says/sms/sent/
errorsmspath = /home/says/sms/error/
inboxformat = standard
transmitformat = auto
The main part of the system just to read incoming sms save it to /inbox, send any message that we put in /outbox. Next gammu smsd able to do the rest.
Next, create an agent just to read message source to be send out, and retrieve incoming msg in inbox to store in your database. last thing is create nice fancy interface, of course dont forget the user authentication. Then hola, your own sms server is ready to serve.
Download : php agent to read & delete files