Wednesday, March 18, 2009

Membangun SMS Gateway dengan Modem Wavecom Fasttrack, Kannel dan PlaySMS

Membangun sebuah SMS Gateway sendiri ternyata terbilang susah-susah gampang, saya membutuhkan kira-kira 4 hari untuk ngoprek sampai bisa jalan. Kebetulan saya dipinjami gsm modem merek Wavecom Fastrack, maka keinginan lama untuk ngoprek sms gateway timbul lagi.

Memang kelihatannya sekarang trend membuat sms gateway sudah bukan jamannya lagi. Namun karena murahnya pulsa sms, aplikasi ini masih tetap menarik untuk digunakan karena cukup efektif dan murah, apalagi adanya Pemilu atau Pilkada yang semakin semarak belakangan ini. Pengunaan SMS untuk kampanye menjadi alat yang praktis bagi para caleg atau calon kepala daerah.

Peralatan yang perlu disediakan : pertama yang jelas sebuah PC, gsm modem(bisa konektornya usb atau serial), sebuah CD Distro Linux(saya pakai Distro Elastix, based Centos 5.2), mengapa pilih ini, karena saya lebih familiar dengan Distro based Redhat dan ditambah sedikit pengetahuan tentang command-2 linux.

Pertama-tama, ya harus install Centos-nya. Saya install di PC Intel Atom yang baru saja saya beli(pernah saya bahas sebelumnya). Setelah selesai install Centos. Test untuk kenalin modemnya, gsm modem(Wavecom Fastrack) yang saya pakai menggunakan konektor serial. Saya pakai program wvdial untuk test pengenalan modem, karena paket ini belum ada ya harus di-install. Saya pilih install paket wvdial lewat internet, karena lebih gampang dan LAN di kantor saya langsung terkoneksi ke internet.
#yum install wvdial

Setelah selesai install saya coba test dengan perintah sbb:
#wvdialconf /etc/wvdial.conf

Keluar tampilan sbb :
Scanning your serial ports for a modem.

ttyS0<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyS0<*1>: ATQ0 V1 E1 -- OK
ttyS0<*1>: ATQ0 V1 E1 Z -- OK
ttyS0<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyS0<*1>: Modem Identifier: ATI -- WAVECOM MODEM
ttyS0<*1>: Speed 19200: AT --
ttyS0<*1>: Speed 19200: AT --
ttyS0<*1>: Speed 19200: AT --
ttyS0<*1>: Max speed is 9600; that should be safe.
ttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
Port Scan<*1>: S2 S3

Found a modem on /dev/ttyS0.
Modem configuration written to /etc/wvdial.conf.
ttyS0: Speed 9600; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
Nah gsm modem Wavecom dikenalin dengan kecepatan 9600 dan device berada di file device /dev/ttyS0. Informasi ini berguna pada saat kita nanti melakukan setting pada file konfigurasi kannel.

Selanjutnya kita install kannel. Kannel adalah sms engine yang akan kita gunakan sebagai sms gateway. Sebenarnya ada beberapa jenis sms gateway, seperti : gnokii, clickatell, sms server tools. Namun saya pilih kannel, karena saya lihat di google banyak yang pakai kannel dan rata-2 sukses.

Anda bisa install menggunakan tarball atau rpm, bisa didownload di sini untuk tarball, untuk rpm bisa didownload di sini.
Untuk instalasi menggunakan tarbal lakukan sbb :
Setelah download, taruh di direktori, misal : di /opt
#tar -xvzf gateway-x.x.x.tar.gz
#cd gateway-x.x.x
#./configure
#make
#make instal

Program bearerbox, smsbox, wapbox dan run_kannel_box terinstall di /usr/local/sbin.
sedang file konfigurasi kita kopi dari sourcenya di /opt/gateway-x.x.x/debian.
Untuk instalasi menggunakan rpm, lebih gampang lagi :
#rpm -ivh kannel-x.x.x.rpm
Setelah itu edit file konfigurasi kannel.conf menjadi sbb(ini di file konfigurasi saya, di Anda mungkin bisa beda):

group = core
admin-port = 13000
admin-password =
log-file = "/var/log/kannel/kannel.log"
log-level = 0
access-log = "/var/log/kannel/access.log"
smsbox-port = 13001
store-file = "/var/log/kannel/kannel.store"

group = smsc
smsc = at
host = 127.0.0.1
port = 13013
smsc-id = wavecom
modemtype = wavecom
device = /dev/ttyS0
speed = 9600
sms-center = "+6281100000"

group = modems
id = WAVECOM
name = WAVECOM
detect-string = WAVECOM
init-string = "AT+CNMI=2,1,0,0,0;+CMEE=1"

group = smsbox
bearerbox-host = 127.0.0.1
sendsms-port = 13131
sendsms-chars = "0123456789+"
global-sender = "+6281100000"
log-file = "/var/log/kannel/smsbox.log"
log-level = 0
access-log = "/var/log/kannel/access.log"

group = sendsms-user
username = playsms
password = playsms

group = sms-service
keyword = default
accept-x-kannel-headers = true
max-messages = 0
assume-plain-text = true
catch-all = true
get-url = "http://localhost/playsms/plugin/gateway/kannel/geturl.php?t=%t&q=%q&a=%a"

Perlu diperhatikan diatas baris-baris berikut ini silakan disesuaikan dengan konfigurasi anda, baris lainnya samakan saja :
smsc-id = wavecom
modemtype = wavecom
device = /dev/ttyS0
speed = 9600
sms-center = "+6281100000"

smsc-id dan modemtype saya pakai wavecom, krn gsm modemnya wavecom
device dan speed seperti yang didapat pada langkah wvdialconf diatas.
sms-center saya menggunakan operator Telkomsel, karena saya pakai simcard Telkomsel.

id = WAVECOM
name = WAVECOM
detect-string = WAVECOM

id, name dan detect-string sesuaikan dengan jenis modem anda

global-sender = "+6281100000"
global-sender saya pakai Telkomsel karena sim card pakai Simpati.

username = playsms
password = playsms

sesuaikan username dan password pada saat kita install playsms

Jika direktori /var/log/kannel belum di-create(ini biasanya pada instalasi menggunakan tarball, jika menggunakan rpm sudah otomatis di-create), buat dengan perintah :

#mkdir /var/log/kannel
#chmod 755 /var/log/kannel

Untuk test apakah kannel berjalan dengan baik jalankan perintah sbb :
#bearerbox /etc/kannel.conf
Keluar message sbb :
2009-03-13 10:11:44 [3293] [0] INFO: Debug_lvl = -1, log_file = , log_lvl = 0
2009-03-13 10:11:44 [3293] [0] WARNING: DLR: using default 'internal' for storage type.
2009-03-13 10:11:44 [3293] [0] INFO: DLR using storage type: internal
2009-03-13 10:11:44 [3293] [0] DEBUG: Kannel bearerbox version `1.4.3'.
Build `Mar 6 2009 16:02:25', compiler `4.1.2 20070626 (Red Hat 4.1.2-14)'.
System Linux, release 2.6.18-53.1.19.el5, version #1 SMP Wed May 7 08:20:19 EDT 2008, machine i686.
Hostname elastix.example.com, IP 127.0.0.1.
Libxml version 2.6.26.
Using OpenSSL 0.9.8b 04 May 2006.
Using native malloc.

2009-03-13 10:11:44 [3293] [0] INFO: Added logfile `/var/log/kannel/kannel.log' with level `0'.
2009-03-13 10:11:44 [3293] [0] INFO: Started access logfile `/var/log/kannel/access.log'.
2009-03-13 10:11:44 [3293] [0] WARNING: 'store-file' option deprecated, please use 'store-location' and 'store-type' instead.
2009-03-13 10:11:44 [3293] [0] INFO: HTTP: Opening server at port 13000.
2009-03-13 10:11:44 [3293] [0] DEBUG: Started thread 1 (gwlib/fdset.c:poller)
2009-03-13 10:11:44 [3293] [0] DEBUG: Started thread 2 (gwlib/http.c:server_thread)
2009-03-13 10:11:44 [3293] [0] DEBUG: Started thread 3 (gw/bb_http.c:httpadmin_run)
2009-03-13 10:11:44 [3293] [2] DEBUG: Thread 2 (gwlib/http.c:server_thread) maps to pid 3293.
2009-03-13 10:11:44 [3293] [1] DEBUG: Thread 1 (gwlib/fdset.c:poller) maps to pid 3293.
2009-03-13 10:11:44 [3293] [0] DEBUG: starting smsbox connection module
2009-03-13 10:11:44 [3293] [0] INFO: BOXC: 'smsbox-max-pending' not set, using default (100).
2009-03-13 10:11:44 [3293] [3] DEBUG: Thread 3 (gw/bb_http.c:httpadmin_run) maps to pid 3293.
2009-03-13 10:11:44 [3293] [0] DEBUG: Started thread 4 (gw/bb_boxc.c:sms_to_smsboxes)
2009-03-13 10:11:44 [3293] [0] DEBUG: Started thread 5 (gw/bb_boxc.c:smsboxc_run)
2009-03-13 10:11:44 [3293] [5] DEBUG: Thread 5 (gw/bb_boxc.c:smsboxc_run) maps to pid 3293.
2009-03-13 10:11:44 [3293] [4] DEBUG: Thread 4 (gw/bb_boxc.c:sms_to_smsboxes) maps to pid 3293.
2009-03-13 10:11:44 [3293] [0] INFO: Set SMS resend frequency to 60 seconds.
2009-03-13 10:11:44 [3293] [0] INFO: SMS resend retry set to unlimited.
2009-03-13 10:11:44 [3293] [0] DEBUG: smsbox MO concatenated message handling enabled
2009-03-13 10:11:44 [3293] [0] INFO: DLR rerouting for smsc id disabled.
2009-03-13 10:11:44 [3293] [0] INFO: AT2[wavecom]: configuration shows modemtype
2009-03-13 10:11:44 [3293] [0] DEBUG: AT2[wavecom]: Reading modem definitions from

2009-03-13 10:11:44 [3293] [0] DEBUG: AT2[wavecom]: Found <1> modems in config
2009-03-13 10:11:44 [3293] [0] INFO: AT2[wavecom]: modemtype not found, revert to autodetect
2009-03-13 10:11:44 [3293] [0] DEBUG: Started thread 6 (gw/smsc/smsc_at.c:at2_device_thread)
2009-03-13 10:11:44 [3293] [0] DEBUG: Started thread 7 (gw/bb_smscconn.c:sms_router)
2009-03-13 10:11:44 [3293] [0] INFO: ----------------------------------------
2009-03-13 10:11:44 [3293] [0] INFO: Kannel bearerbox II version 1.4.3 starting
2009-03-13 10:11:44 [3293] [7] DEBUG: Thread 7 (gw/bb_smscconn.c:sms_router) maps to pid 3293.
2009-03-13 10:11:44 [3293] [0] INFO: Loading store file `/var/log/kannel/kannel.store'
2009-03-13 10:11:44 [3293] [0] INFO: Store-file size 0, starting to unpack
2009-03-13 10:11:44 [3293] [0] INFO: Retrieved 0 messages, non-acknowledged messages: 0
2009-03-13 10:11:44 [3293] [6] DEBUG: Thread 6 (gw/smsc/smsc_at.c:at2_device_thread) maps to pid 3293.
2009-03-13 10:11:44 [3293] [6] DEBUG: AT2[wavecom]: detecting modem type
2009-03-13 10:11:44 [3293] [6] INFO: AT2[wavecom]: opening device
2009-03-13 10:11:44 [3293] [0] DEBUG: Started thread 8 (gw/bb_store_file.c:store_dumper)
2009-03-13 10:11:44 [3293] [0] INFO: MAIN: Start-up done, entering mainloop
2009-03-13 10:11:44 [3293] [0] DEBUG: AT2[wavecom]: start called
2009-03-13 10:11:44 [3293] [6] DEBUG: AT2[wavecom]: device opened. Telnet mode = 0
2009-03-13 10:11:44 [3293] [8] DEBUG: Thread 8 (gw/bb_store_file.c:store_dumper) maps to pid 3293.
2009-03-13 10:11:44 [3293] [8] DEBUG: Dumping 0 messages to store
2009-03-13 10:11:45 [3293] [6] DEBUG: AT2[wavecom]: device opened
2009-03-13 10:11:45 [3293] [6] INFO: AT2[wavecom]: speed set to 9600
2009-03-13 10:11:45 [3293] [6] DEBUG: AT2[wavecom]: --> ^M
2009-03-13 10:11:47 [3293] [6] DEBUG: AT2[wavecom]: --> AT^M
2009-03-13 10:11:47 [3293] [6] DEBUG: AT2[wavecom]: <-- OK
2009-03-13 10:11:47 [3293] [6] DEBUG: AT2[wavecom]: --> AT&F^M
2009-03-13 10:11:47 [3293] [6] DEBUG: AT2[wavecom]: <-- OK
2009-03-13 10:11:47 [3293] [6] DEBUG: AT2[wavecom]: --> ATE0^M
2009-03-13 10:11:47 [3293] [6] DEBUG: AT2[wavecom]: <-- OK
2009-03-13 10:11:47 [3293] [6] DEBUG: AT2[wavecom]: --> ATI^M
2009-03-13 10:11:47 [3293] [6] DEBUG: AT2[wavecom]: <-- WAVECOM MODEM
009-03-13 10:11:47 [3293] [6] DEBUG: AT2[wavecom]: <-- MULTIBAND 900E 1800
2009-03-13 10:11:47 [3293] [6] DEBUG: AT2[wavecom]: <-- OK
2009-03-13 10:11:47 [3293] [6] DEBUG: AT2[wavecom]: found string , using modem definition
2009-03-13 10:11:47 [3293] [6] DEBUG: AT2[wavecom]: --> AT+CSMS=?^M
2009-03-13 10:11:47 [3293] [6] DEBUG: AT2[wavecom]: <-- +CSMS: (0,1)
2009-03-13 10:11:47 [3293] [6] DEBUG: AT2[wavecom]: <-- OK
2009-03-13 10:11:47 [3293] [6] INFO: AT2[wavecom]: Phase 2+ is supported
2009-03-13 10:11:47 [3293] [6] INFO: AT2[wavecom]: Closing device
2009-03-13 10:11:47 [3293] [6] INFO: AT2[wavecom]: opening device
2009-03-13 10:11:47 [3293] [6] DEBUG: AT2[wavecom]: device opened. Telnet mode = 0
2009-03-13 10:11:47 [3293] [6] DEBUG: AT2[wavecom]: device opened
2009-03-13 10:11:47 [3293] [6] INFO: AT2[wavecom]: Logging in
2009-03-13 10:11:48 [3293] [6] INFO: AT2[wavecom]: init device
2009-03-13 10:11:48 [3293] [6] INFO: AT2[wavecom]: speed set to 9600
2009-03-13 10:11:48 [3293] [6] DEBUG: AT2[wavecom]: --> ATZ^M
2009-03-13 10:11:48 [3293] [6] DEBUG: AT2[wavecom]: <-- OK
2009-03-13 10:11:48 [3293] [6] DEBUG: AT2[wavecom]: --> AT^M
2009-03-13 10:11:48 [3293] [6] DEBUG: AT2[wavecom]: <-- AT
2009-03-13 10:11:48 [3293] [6] DEBUG: AT2[wavecom]: <-- OK
2009-03-13 10:11:48 [3293] [6] DEBUG: AT2[wavecom]: --> AT&F^M
2009-03-13 10:11:48 [3293] [6] DEBUG: AT2[wavecom]: <-- AT&F
2009-03-13 10:11:48 [3293] [6] DEBUG: AT2[wavecom]: <-- OK
2009-03-13 10:11:48 [3293] [6] DEBUG: AT2[wavecom]: --> ATE0^M
2009-03-13 10:11:48 [3293] [6] DEBUG: AT2[wavecom]: <-- ATE0
2009-03-13 10:11:48 [3293] [6] DEBUG: AT2[wavecom]: <-- OK
2009-03-13 10:11:48 [3293] [6] DEBUG: AT2[wavecom]: --> AT+IFC=2,2^M
2009-03-13 10:11:48 [3293] [6] DEBUG: AT2[wavecom]: <-- OK
2009-03-13 10:11:48 [3293] [6] DEBUG: AT2[wavecom]: --> AT+CPIN?^M
2009-03-13 10:11:49 [3293] [6] DEBUG: AT2[wavecom]: <-- +CPIN: READY
2009-03-13 10:12:00 [3293] [6] DEBUG: AT2[wavecom]: --> AT+CSCA="+6281100000"^M
2009-03-13 10:12:00 [3293] [6] DEBUG: AT2[wavecom]: <-- OK
2009-03-13 10:12:00 [3293] [6] DEBUG: AT2[wavecom]: --> AT+CMGF=0^M
2009-03-13 10:12:00 [3293] [6] DEBUG: AT2[wavecom]: <-- OK
2009-03-13 10:12:00 [3293] [6] DEBUG: AT2[wavecom]: --> AT+CSMS=?^M
2009-03-13 10:12:00 [3293] [6] DEBUG: AT2[wavecom]: <-- +CSMS: (0,1)
2009-03-13 10:12:00 [3293] [6] DEBUG: AT2[wavecom]: <-- OK
2009-03-13 10:12:00 [3293] [6] INFO: AT2[wavecom]: Phase 2+ is supported
2009-03-13 10:12:00 [3293] [6] DEBUG: AT2[wavecom]: --> AT+CSMS=1^M
2009-03-13 10:12:00 [3293] [6] DEBUG: AT2[wavecom]: <-- +CSMS: 1,1,1
2009-03-13 10:12:00 [3293] [6] DEBUG: AT2[wavecom]: <-- OK
2009-03-13 10:12:00 [3293] [6] DEBUG: AT2[wavecom]: --> AT+CNMI=2,1,0,0,0;+CMEE=1^M
2009-03-13 10:12:00 [3293] [6] DEBUG: AT2[wavecom]: <-- OK
2009-03-13 10:12:00 [3293] [6] INFO: AT2[wavecom]: AT SMSC successfully opened.

#smsbox /etc/kannel.conf
Keluar message sbb :
2009-03-13 10:13:43 [3302] [0] INFO: Debug_lvl = -1, log_file = , log_lvl = 0
2009-03-13 10:13:43 [3302] [0] DEBUG: Kannel smsbox version `1.4.3'.
Build `Mar 6 2009 16:02:25', compiler `4.1.2 20070626 (Red Hat 4.1.2-14)'.
System Linux, release 2.6.18-53.1.19.el5, version #1 SMP Wed May 7 08:20:19 EDT 2008, machine i686.
Hostname elastix.example.com, IP 127.0.0.1.
Libxml version 2.6.26.
Using OpenSSL 0.9.8b 04 May 2006.
Using native malloc.

2009-03-13 10:13:43 [3302] [0] INFO: Starting to log to file /var/log/kannel/smsbox.log level 0
2009-03-13 10:13:43 [3302] [0] INFO: Added logfile `/var/log/kannel/smsbox.log' with level `0'.
2009-03-13 10:13:43 [3302] [0] INFO: Service global sender set as '+6281100000'
2009-03-13 10:13:43 [3302] [0] INFO: Logging accesses to '/var/log/kannel/access.log'.
2009-03-13 10:13:43 [3302] [0] INFO: Started access logfile `/var/log/kannel/access.log'.
2009-03-13 10:13:43 [3302] [0] INFO: HTTP: Opening server at port 13131.

2009-03-13 10:13:43 [3302] [0] DEBUG: Started thread 1 (gwlib/fdset.c:poller)
2009-03-13 10:13:43 [3302] [0] DEBUG: Started thread 2 (gwlib/http.c:server_thread)
2009-03-13 10:13:43 [3302] [0] INFO: Set up send sms service at port 13131
2009-03-13 10:13:43 [3302] [0] DEBUG: Started thread 3 (gw/smsbox.c:sendsms_thread)
2009-03-13 10:13:43 [3302] [3] DEBUG: Thread 3 (gw/smsbox.c:sendsms_thread) maps to pid 3302.
2009-03-13 10:13:43 [3302] [2] DEBUG: Thread 2 (gwlib/http.c:server_thread) maps to pid 3302.
2009-03-13 10:13:43 [3302] [0] DEBUG: ----------------------------------------------
2009-03-13 10:13:43 [3302] [1] DEBUG: Thread 1 (gwlib/fdset.c:poller) maps to pid 3302.
2009-03-13 10:13:43 [3302] [0] DEBUG: Kannel smsbox version 1.4.3 starting
2009-03-13 10:13:43 [3302] [0] DEBUG: dumping group (sendsms-user):
2009-03-13 10:13:43 [3302] [0] DEBUG: =
2009-03-13 10:13:43 [3302] [0] DEBUG: =
2009-03-13 10:13:43 [3302] [0] DEBUG: =
2009-03-13 10:13:43 [3302] [0] DEBUG: Started thread 4 (gw/smsbox.c:obey_request_thread)
2009-03-13 10:13:43 [3302] [0] DEBUG: Started thread 5 (gw/smsbox.c:url_result_thread)
2009-03-13 10:13:43 [3302] [0] DEBUG: Started thread 6 (gw/smsbox.c:http_queue_thread)
2009-03-13 10:13:43 [3302] [6] DEBUG: Thread 6 (gw/smsbox.c:http_queue_thread) maps to pid 3302.
2009-03-13 10:13:43 [3302] [5] DEBUG: Thread 5 (gw/smsbox.c:url_result_thread) maps to pid 3302.
2009-03-13 10:13:43 [3302] [0] INFO: Connected to bearerbox at 127.0.0.1 port 13001.
2009-03-13 10:13:43 [3302] [4] DEBUG: Thread 4 (gw/smsbox.c:obey_request_thread) maps to pid 3302.
2009-03-13 10:13:43 [3302] [0] DEBUG: Started thread 7 (gw/heartbeat.c:heartbeat_thread)
2009-03-13 10:13:43 [3302] [7] DEBUG: Thread 7 (gw/heartbeat.c:heartbeat_thread) maps to pid 3302.
Instalasi PlaySMS

Persyaratan instalasi PlaySMS :
  • Web Server (Apache)
  • Database Server MySQL 4.x.x atau lebih tinggi
  • PHP 4.4.x atau versi lebih tinggi yang stabil dengan module mysql
  • PHP PEAR DB(php-pear)
  • Koneksi ke SMTP server (playSMS pakai ini untuk kirim email)
1. Download playsms-0.9.3.tar.gz dari websitenya di http://playsms.sourceforge.net
2. Taruh misal : di direktori /opt, lalu archive playsms-0.9.3.tar.gz
# tar -xvzf playsms-0.9.3.tar.gz
3. Buat direktori playsms di /var/www/html
#mkdir /var/www/html/playsms
4. Hasil archive di direktori playsms-09.3/web dikopi ke /var/www/html
#cp -pr playsms-0.9.3/web /var/www/html/playsms
5. Buat beberapa direktori log dan spool untuk playsms :
# mkdir -p /var/spool/playsms
# mkdir -p /var/log/playsms
6. Buat username dan passwordnya :
#adduser playsms
#passwd playsms
7. Buat database playsms dan import playsms.sql untuk membuat tabel-2nya.
# mysqladmin -u root -p create playsms
# mysql -u root -p playsms < /opt/playsms-0.9.3/db/playsms.sql
8. Kopi config-dist.php ke config.php, lalu edit file config.php
# cp config-dist.php config.php
# vi config.php
Isinya kurang lebih sbb :
$db_param['type'] = 'mysql'; // database engine
$db_param['host'] = 'localhost'; // database host/server
$db_param['port'] = ''; // database port
$db_param['user'] = 'root'; // database username
$db_param['pass'] = 'eLaStIx.2oo7'; // database password
$db_param['name'] = 'playsms'; // database name
$db_param['pref'] = 'playsms'; // table's prefix without trailing
yang perlu diperhatikan adalah baris ke 5, isi dengan password anda untuk user root database mysql-nya. Sedang baris ke 6 dan ke 7 mengikuti default dari langkah ke 7.
9. Kopi file-file playsms, playsmsd, playsmsd.php, dan playsmsd_start ke direktori /usr/local/bin :
# cd /opt/playsms-0.9.3/bin
# cp playsmsd playsmsd.php playsmsd_start /usr/local/bin/
# cp playsms /etc/default/
10. Browse http://localhost/playsms/ dan login dengan username : admin dan password : admin


Kirim SMS , log messagenya sbb :
2009-03-13 10:17:46 [3293] [9] DEBUG: boxc_receiver: sms received 2009-03-13 10:17:46 [3293] [9] DEBUG: send_msg: sending msg to box: <127.0.0.1>
2009-03-13 10:17:48 [3293] [6] DEBUG: AT2[wavecom]: TP-Validity-Period: 24.0 hours
2009-03-13 10:17:48 [3293] [6] DEBUG: AT2[wavecom]: --> AT+CMGS=60^M

2009-03-13 10:17:48 [3293] [6] DEBUG: AT2[wavecom]: <-- >

2009-03-13 10:17:48 [3293] [6] DEBUG: AT2[wavecom]: send command status: 1 2009-03-1310:17:48[3293][6]DEBUG:AT2[wavecom]:--> 0031000C912612641405510011A734C834A80EA2A3CBF2320B747EBFC9A0F65BEE4EBBCFA110A8051A4293A069730A42BEE9ECB4BB0C9A96E5F6F4B80C 2009-03-13 10:17:48 [3293] [6] DEBUG: AT2[wavecom]: --> ^Z
2009-03-13 10:17:51 [3293] [6] DEBUG: AT2[wavecom]: <-- >
2009-03-13 10:17:51 [3293] [6] DEBUG: AT2[wavecom]: <-- +CMGS: 81
2009-03-13 10:17:51 [3293] [6] DEBUG: AT2[wavecom]: <-- OK

2009-03-13 10:17:51 [3293] [6] DEBUG: AT2[wavecom]: send command status: 0 2009-03-1310:17:51[3293][6]DEBUG:DLR[internal]:AddingDLRsmsc=wavecom,ts=81, src=62818xxxxxx, dst=+6221xxxxxxxx, mask=31, boxc=
2009-03-13 10:17:51 [3293] [6] DEBUG: SMSC[wavecom]: creating DLR message
2009-03-13 10:17:51 [3293] [6] DEBUG: SMSC[wavecom]: DLR = http://localhost/playsms/plugin/gateway/kannel/dlr.php?type=%d&slid=14&uid=1

2009-03-13 10:17:51 [3293] [10] DEBUG: send_msg: sending msg to box: <127.0.0.1>
2009-03-13 10:17:51 [3293] [10] DEBUG: boxc_sender: sent message to <127.0.0.1>
2009-03-13 10:17:51 [3293] [9] DEBUG: boxc_receiver: got ack

2009-03-13 10:18:04 [3293] [8] DEBUG: Dumping 0 messages to store
2009-03-13 10:18:13 [3293] [9] DEBUG: boxc_receiver: heartbeat with load value 0 received

Terima SMS, lognya sbb :
2009-03-18 13:45:33 [5912] [7] DEBUG: clear_old_concat_parts called
2009-03-18 13:46:06 [5912] [6] DEBUG: AT2[wavecom]: <-- +CMTI: "SM",1 2009-03-18 13:46:06 [5912] [6] DEBUG: AT2[wavecom]: +CMTI incoming SMS indication: +CMTI: "SM",1 2009-03-18 13:46:08 [5912] [6] INFO: AT2[wavecom]: CMTI received, but no message-storage is set in confiuration.setting now to
2009-03-18 13:46:08 [5912] [6] INFO: System error 2: No such file or directory
2009-03-18 13:46:08 [5912] [6] DEBUG: AT2[wavecom]: --> AT+CPMS="SM"^M
2009-03-18 13:46:08 [5912] [6] DEBUG: AT2[wavecom]: <-- +CPMS: 1,40,1,40 2009-03-18 13:46:08 [5912] [6] DEBUG: AT2[wavecom]: <-- OK 2009-03-18 13:46:08 [5912] [6] DEBUG: AT2[wavecom]: --> AT+CMGR=1^M
2009-03-18 13:46:08 [5912] [6] DEBUG: AT2[wavecom]: <-- +CMGR: 0,,35 2009-03-18 13:46:08 [5912] [6] DEBUG: AT2[wavecom]: <-- 07912618485400F9240B912618987811F500009030813164958212502B485C76A741F4F29C0E5AA7E5E936 2009-03-18 13:46:08 [5912] [6] DEBUG: AT2[wavecom]: received message from SMSC: +62818445009 2009-03-18 13:46:08 [5912] [6] DEBUG: AT2[wavecom]: Numeric sender (international) <+62818987115>
2009-03-18 13:46:08 [5912] [6] DEBUG: AT2[wavecom]: User data length read as (18)
2009-03-18 13:46:08 [5912] [6] DEBUG: AT2[wavecom]: Udh decoding done len=18 udhi=0 udhlen=0 udh=''
2009-03-18 13:46:08 [5912] [10] DEBUG: send_msg: sending msg to box: <127.0.0.1>
2009-03-18 13:46:08 [5912] [10] DEBUG: boxc_sender: sent message to <127.0.0.1>
2009-03-18 13:46:08 [5912] [9] DEBUG: boxc_receiver: got ack
2009-03-18 13:46:08 [5912] [6] DEBUG: AT2[wavecom]: <-- OK 2009-03-18 13:46:08 [5912] [6] DEBUG: AT2[wavecom]: --> AT+CMGD=1^M
2009-03-18 13:46:09 [5912] [6] DEBUG: AT2[wavecom]: <-- OK 2009-03-18 13:46:24 [5912] [9] DEBUG: boxc_receiver: heartbeat with load value 0 received 2009-03-18 13:46:24 [5912] [8] DEBUG: Dumping 0 messages to store
Berikut beberapa screenshot PlaySMS :
Login SMS Gateway
Welcome Page
Send SMS
Send Broadcast SMS
Inbox Incoming SMS
Inbox Outgoing SMS
Manage Kannel

Preferences Administration
Main Configuration
Manage User

Tuesday, March 17, 2009

Endian Firewall, Microsoft Exchange Server 2007 SP1 dan Blackberry Enterprise Server

Ini sekedar share pengalaman, kurang lebih 3 bulan yang lalu saya diminta oleh seorang teman untuk membangun Infrastruktur Blackberry Enterprise Server di sebuah RS yang cukup terkenal di Jakarta. Karena saya tidak tahu kebutuhannya apa, saya harus kolek data ke site, apa saja infrastruktur yang sudah tersedia. Ternyata RS ini belum punya mail server sendiri masih hosting di luar, dan anehnya walau terkoneksi ke internet tidak ada firewallnya. Semua dokter disini sudah memakai BB(BlackBerry handset), mereka pakai yang versi BIS, karena usernya sudah cukup banyak(+/- 30-an user) pihak provider BB memberikan gratis untuk instalasi dan lisensi BES. Ini sudah menjadi kebijaksana provider tersebut, jika user BIS di suatu company sudah memenuhi kuota tertentu, maka akan diberi lisensi BES secara gratis. Namun karena tidak adanya infrastruktur, BES tidak bisa di setup di RS ini. Untuk maksud demikian saya diundang untuk membangun infrastruktur untuk BES di sini.

Akhirnya saya harus membangun Firewall, saya pilih Endian Firewall, sebagai platform Unified Threat Managementnya. Berdasar pengalaman, efw merupakan firewall yang paling mudah disetup dan dimaintain. Dan untuk Mail servernya menggunakan Exchange Server 2007 SP1, ini saya pilih karena kompatibilitas-nya dengan BlackBerry sudah cukup matang. Oleh karena menggunakan Exchange 2007 saya harus membangun Active Directory, sebagai database usernya. Dan yang terakhir mensetup BES-nya.

Platform yang digunakan untuk Operating System Active Directory dan Mail Server menggunakan Windows Server 2008, sedang Blacberry Enterprise Servernya menggunakan Windows SBS 2003. Sayangnya, BES ternyata belum mensupport Windows Server 2008, yang disupport adalah versi Windows Server 2003.

Salah satu kemudahan dari Windows Server 2008 adalah semua paket add-on atau patches sudah tersedia. Jadi kebutuhan untuk Dotnet, add-on, patches untuk Exchange Server tidak perlu download lagi, semuanya sudah disediakan. Beda kalau kita pakai Windows Server 2003, perlu download dotnet, patch-patch tambahan atau install dari CD/DVD-nya.

Instalasi dari Firewall sampai BES server membutuhkan kira-kira 6 kali datang ke site. Selebihnya konfigurasi dan maintenance saya jalankan lewat remote.
Berikut adalah gambaran Arsitektur sederhana Firewall-AD-Exchange server 2007 - BES

Kombinasi antara linux dan windows ternyata cukup ampuh. Karena tidak adanya antispam dan antivirus di server windows, Exchange Server sempat diserbu spam. Sebenarnya Exchange Server 2007 sudah menyediakan antispam, namun kita harus menginstall role Edge Server agar antispamnya bisa diaktifkan. Oleh karena itu diperlukan investasi hardware dan lisensi lagi untuk OS-nya, Karena keterbatasan budget dari RS ini, maka saya memberikan solusi antispam dari Endian Firewall, dan ternyata cukup ampuh untuk membendung spam yang masuk ke Mail Server Exchange.
Blog beni-santoso.blogspot.com telah memiliki alamat dan hosting baru dengan alamat www.benisantoso.info