Installasi SMS Gateway PlaySMS di Fedora

Dokumentasi Installasi SMS Gateway PlaySMS

Topologi SMS Gateway IMPRO

Persiapan Installasi

  1. Fedora Core sudah terinstall dengan baik
  2. GSM Modem USB dengan Merk wavecom
  3. Aplikasi SMS Gateway “PlaySMS” http://playsms.sourceforge.net
  • Database Server MySQL
  • Web  Server ( Apache )
  • PHP 4.4 XX
  1. Kannel gateway-1.4.3 ( SMS Engine )

Pengenalan Modem USB & Installasi Modem GSM Wavecom

  • Untuk test modem dengan cara meng install wvdial
  • # yum install wvdial
  • Untuk lihat konfigurasi ada di /etc/wvdial.conf

#/etc/wvdial.conf

[Dialer Defaults]

Init1 = ATZ

Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0

Modem Type = Analog Modem

; Phone = <Target Phone Number>

ISDN = 0

; Password = <Your Password>

; Username = <Your Login Name>

Modem = /dev/ttyUSB0

Baud = 115200

  • Modem Terdeteksi di /dev/ttyUBS0 ( karena kita menggunkan model modem USB )
  • Dan Buad rate nya 115200

Installasi SMS Engine Kannel Gateway-1.4.3

  • Untuk master nya download dari http://www.kannel.org/download.shtml
  • #tar -xvzf gateway-x.x.x.tar.gz
    #cd gateway-x.x.x
    #./configure
    #make
    #make install
  • Setelah terinstall maka secara otomatis akan terinstall juga
    • Bearear box
    • Smbox
    • Wapbox
    • run_kannel_box

Lokasi installasi tersebut berada di /usr/local/sbin

  • Untuk konfifurasi SMS Engine kannel nya ada di /etc/kanel/kanel.conf

#

# CORE

#

group = core

admin-port = 13000

smsbox-port = 13001

admin-password = admin

status-password = admin

box-allow-ip = “127.0.0.1”

log-level = 0

log-file = “/var/log/kannel/kannel.log”

access-log = “/var/log/kannel/access.log”

store-file = “/var/log/kannel/kannel.store”

#

# SMSC MODEM GSM

#

group = smsc

smsc = at

host = localhost

smsc-id = modem

modemtype = wavecom

device = /dev/ttyUSB0

speed = 115200

sms-center = +6281100000

group = modems

speed = 115200

id = wavecom

name = wavecom

detect-string = “WAVECOM”

detect-string = “MODEM”

init-string = “AT+CNMI=2,1,0,0,0;+CMEE=1″

#

# SMSBOX SETUP

#

group = smsbox

bearerbox-host = localhost

sendsms-port = 13013

sendsms-chars = “0123456789+”

global-sender = +6281100000

log-level = 0

log-file = “/var/log/kannel/smsbox.log”

access-log = “/var/log/kannel/access.log”

#

# SEND-SMS USERS

#

group = sendsms-user

username = playsms

password = playsms

“/etc/kannel/kannel.conf” [noeol] 64L, 1175C

  • Membuat direktori untuk log SMS
    • #mkdir /var/log/kannel
      #chmod 755 /var/log/kannel
    • Test Kannel apakah berjalan dengan baik
    • #bearerbox /etc/kannel.conf

Install PlaySMS

  • Master playsms-0.9.3.tar.gz di extract
  • Tar –xvz playsms-0.9.3.tar.gz

Buat directory di /var/www/html

  • #mkdir /var/www/html/playsms

Hasil archive di direktori playsm-09.3 /web /di kopi ke /var/www/html

  • cp –pr playsms-0.9.3/web /var/www/html/playsms

Buat Direktori log dan spool untuk playsms

  • mkdir –p /var/spool/playsms
  • mkdir –p /var/log/playsms

Buat Username dan password nya :

  • adduser playsms
  • passwd playsms

Buat database playsms dan import playm.ql untuk membuat tabel2nya

  • mysqladmin –u root –p /create playsms
  • mysql –u root –p playsms </opt/playsms-0.9.3/db/playsms.sql

Kopi config

  • cp config-dist.php config.php
  • vi config.php

<?php

// PHP PEAR DB compatible database engine:

// msql, mssql, mysql, oci8, odbc, pgsql, sqlite

$core_config['db']['type'] = ‘mysql';            // database engine

$core_config['db']['host'] = ‘localhost'; // database host/server

$core_config['db']['port'] = ‘3306’;             // database port

$core_config['db']['user'] = ‘root';             // database username

$core_config['db']['pass'] = ”;                 // database password

$core_config['db']['name'] = ‘playsms';          // database name

$core_config['db']['pref'] = ‘playsms';          // table’s prefix without trailing underscore

// SMTP configuration

$core_config['smtp']['relm'] = ”; // yes, not realm, its relm

$core_config['smtp']['user'] = ”;

$core_config['smtp']['pass'] = ”;

$core_config['smtp']['host'] = ‘localhost';

$core_config['smtp']['port'] = ’25′;

// Do not change anything below this line unless you know what to do

// —————————————————————–

// you can turn on or off PHP error reporting

// on production level you should turn off PHP error reporting (set to 0), by default its on

//error_reporting(0);

//error_reporting(E_ALL ^ (E_NOTICE | E_WARNING | E_DEPRECATED));

error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));

// logs directories

$apps_path['logs']   = ‘/var/log/playsms';

// log level: 0=disabled, 1=info, 2=warning, 3=debug, 4=verbose

// WARNING: log level 3 and 4 will also save sensitif information such as password for used gateway

$core_config['logstate']    = 0;

// 0 for single session login; 1 for multi session login

// multi session login is not secure because playsms leaves md5 crypted username and password

// on admin’s computer

$core_config['multilogin']  = 1;

// are we using http or https ? the default is using http instead https

$core_config['ishttps']            = false;

?>

yang perlu diperhatikan adalah baris ke 5, isi dengan password tadi untuk user root database mysql-nya. Sedang baris ke 6 dan ke 7 mengikuti default dari langkah ke 7.mysql nya

Kopi file-file playsms,playsmsd,playsmsd.php dan playsms_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/

Test dengan browser

Finish

About these ads

Leave a Reply

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s