In this tutor I had install Gammu (sms gateway) + Kalkun (web sms app) on ClearOS-6.2.
Although this gammu SMS gateway applications, sometimes we need to broadcast an sms or make an application to send sms using a daemon on the operating system to reboot server...
Preparation Environment and hardware requirements:
- Hardware: Huawei E173 USB 3G (http://www.ebay.com/itm/Unlocked-Huawei-E173-HSDPA-7-2Mbps-GSM-3G-USB-Modem-New-/120814994357)
- Sim card ofcourse
It takes some of the compiler package, Install the developers
yum groupinstall 'Development Tools'
yum install cmake
Installing and configuring Gammu
Installation of hardware, Before doing the configuration, first prepare a GSM modem to be used. In this case I use Huawei E173 USB 3G like above.
wget http://sourceforge.net/projects/gammu/files/gammu/1.31.0/gammu-1.31.0.tar.gz
tar -xzvf gammu-1.31.0.tar.gz
cd gammu-1.31.0
./configure
make
make install
Then test gammu:
Gammu
If no error, the test instasi the command:
If it had error will say can't find libGammu.so.7 and link like this:
ln -s /usr/local/lib64/libGammu.so /usr/lib64/libGammu.so.7
ln -s /usr/local/lib64/libgsmsd.so /usr/lib64/libgsmsd.so.7
and configure modem by command:
gammu-config
port: /dev/ttyUSB* (depen your usb modem attached port)
connection: at115200
model: auto
logfile:/var/log/gammu/smsdlog
synchronizetime: yes
logformat: textalldate
save and exit
and identify command:
gammu --identify
if it connected it's say your modem name connection...
Create mysql database:
mysql -uroot -p
create database sms;
\q
import data tab:
mysql -uroot -p sms </root/gammu-1.31.0/docs/sql/mysql.sql
Now change your gammu identify and mysql spec like this:
nano /etc/gammu-smsdrc
# Now install Kalkun
cd /var/www/virtual/xxx.xxxx.xxxx
wget http://nchc.dl.sourceforge.net/project/kalkun/kalkun/0.5/kalkun_0.5.tar.gz
tar zxvf kalkun_0.5.tar.gz
and insert your mysql info:
nano application/config/database.php
$db['default']['hostname'] = "localhost";
// MySQL
$db['default']['username'] = "";
$db['default']['password'] = "";
$db['default']['database'] = "sms";
$db['default']['dbdriver'] = "mysql";
Open a web browser, then type http:// <your domain for sms>
Configure it with next-> next
When finished, delete or rename the install folder on it's onwe web root.
Change the settings of sms daemon to run the script as a text entry.
nano /etc/gammu-smsdrc
change runonreceive to your sms webroot folder like this:
runonreceive = /var/www/xxxxxx/daemon.sh
# Edit the daemon file and its daemon.php in /scripts folder
nano /var/www/xxxx/script/daemon.sh
and change to your onwe
DAEMON=/var/www/html/sms/scripts/daemon.php
nano /var/www/xxxx/script/daemon.php
$url = "http://<your domain for sms>";
# Stop and start your gammu-smsdrc:
killall -9 gammu-smsdrc
gammu-smsdrc --deamon
# View log and send recieved testing
tail -f /var/log/gammu/smsdlog
Goto your kalkun by: http://xxxxxxxxx login by user and password: 'kalkun' and try to send and recieved SMS from your gateway, look your log to more information.
Now I'm try to integrate to openerp sms client, if anyone know it please let me know.
Although this gammu SMS gateway applications, sometimes we need to broadcast an sms or make an application to send sms using a daemon on the operating system to reboot server...
Preparation Environment and hardware requirements:
- Hardware: Huawei E173 USB 3G (http://www.ebay.com/itm/Unlocked-Huawei-E173-HSDPA-7-2Mbps-GSM-3G-USB-Modem-New-/120814994357)
- Sim card ofcourse
It takes some of the compiler package, Install the developers
yum groupinstall 'Development Tools'
yum install cmake
Installing and configuring Gammu
Installation of hardware, Before doing the configuration, first prepare a GSM modem to be used. In this case I use Huawei E173 USB 3G like above.
wget http://sourceforge.net/projects/gammu/files/gammu/1.31.0/gammu-1.31.0.tar.gz
tar -xzvf gammu-1.31.0.tar.gz
cd gammu-1.31.0
./configure
make
make install
Then test gammu:
Gammu
If no error, the test instasi the command:
If it had error will say can't find libGammu.so.7 and link like this:
ln -s /usr/local/lib64/libGammu.so /usr/lib64/libGammu.so.7
ln -s /usr/local/lib64/libgsmsd.so /usr/lib64/libgsmsd.so.7
and configure modem by command:
gammu-config
port: /dev/ttyUSB* (depen your usb modem attached port)
connection: at115200
model: auto
logfile:/var/log/gammu/smsdlog
synchronizetime: yes
logformat: textalldate
save and exit
and identify command:
gammu --identify
if it connected it's say your modem name connection...
Create mysql database:
mysql -uroot -p
create database sms;
\q
import data tab:
mysql -uroot -p sms </root/gammu-1.31.0/docs/sql/mysql.sql
Now change your gammu identify and mysql spec like this:
nano /etc/gammu-smsdrc
[gammu]
device = /dev/ttyUSB6
model = E173 (E173)
connection = at115200
[smsd]
service = mysql
PIN = 1234
logfile = /var/log/gammu/smsdlog
debuglevel = 1
#runonreceive = /some/script
commtimeout = 30
sendtimeout = 30
user = <user_database>
password = <password>
pc = localhost
database = sms
# Now install Kalkun
cd /var/www/virtual/xxx.xxxx.xxxx
wget http://nchc.dl.sourceforge.net/project/kalkun/kalkun/0.5/kalkun_0.5.tar.gz
tar zxvf kalkun_0.5.tar.gz
and insert your mysql info:
nano application/config/database.php
$db['default']['hostname'] = "localhost";
// MySQL
$db['default']['username'] = "";
$db['default']['password'] = "";
$db['default']['database'] = "sms";
$db['default']['dbdriver'] = "mysql";
Open a web browser, then type http:// <your domain for sms>
Configure it with next-> next
When finished, delete or rename the install folder on it's onwe web root.
Change the settings of sms daemon to run the script as a text entry.
nano /etc/gammu-smsdrc
change runonreceive to your sms webroot folder like this:
runonreceive = /var/www/xxxxxx/daemon.sh
# Edit the daemon file and its daemon.php in /scripts folder
nano /var/www/xxxx/script/daemon.sh
and change to your onwe
DAEMON=/var/www/html/sms/scripts/daemon.php
nano /var/www/xxxx/script/daemon.php
$url = "http://<your domain for sms>";
# Stop and start your gammu-smsdrc:
killall -9 gammu-smsdrc
gammu-smsdrc --deamon
# View log and send recieved testing
tail -f /var/log/gammu/smsdlog
Goto your kalkun by: http://xxxxxxxxx login by user and password: 'kalkun' and try to send and recieved SMS from your gateway, look your log to more information.
Now I'm try to integrate to openerp sms client, if anyone know it please let me know.
In VoIP and PBX
Share this post:
Responses (11)
-
Accepted Answer
-
Accepted Answer
Nick Howitt wrote:
im looking for someone that can get it work for me, do you understand about it ? I can pay if possible
If you insist on using ClearOS 6.x, check out the REMI repo. You can get 5.6, 7.0 - 7.3. They still appear to be active. I have never tried them and do not have a working 6.x installation at the moment. -
Accepted Answer
-
Accepted Answer
Nick Howitt wrote:
thank you for the replay, do you think there is way to get that PHP those days?
Aviv Dror wrote:
I don't think you can now. 6.x has been end of life for nearly 3 years. Kalkun currently requires php >= 5.6 and this is not available in 6.x. You may be able to do the installation in 7.x if you use the PHP Engines app to use a 7.x version of PHP rather than the stock 5.4.
Is someone understand how to do it, for money of course
[edit]
I have not even looked at SMS Gammu.
[/edit] -
Accepted Answer
Aviv Dror wrote:
I don't think you can now. 6.x has been end of life for nearly 3 years. Kalkun currently requires php >= 5.6 and this is not available in 6.x. You may be able to do the installation in 7.x if you use the PHP Engines app to use a 7.x version of PHP rather than the stock 5.4.
Is someone understand how to do it, for money of course
[edit]
I have not even looked at SMS Gammu.
[/edit] -
Accepted Answer
-
Accepted Answer
-
Accepted Answer
i have made this install with kalkun 0.6. have you tested runonreceive to assure that you have in correct places received your messages? please see that i see messages in table inbox of database mysql all messages are there but in http://server../kalkun in inbox we see nothing about? please could you verify your version?
thansk in advance. :dry: -
Accepted Answer
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »