Kalkun: Simple Autoreply (Experimental)
This feature implement some users who simply want to have automatic reply to every incoming message. No matter what is the sms contain of, that’s why we called it simple autoreply.
Off course this feature disabled by default, you need to change the config in /application/config/kalkun_settings.php
1
2
3
4
5
6
7
8
9
10
11
| /* |-------------------------------------------------------------------------- | Simple Autoreply (Experimental) |-------------------------------------------------------------------------- | | Always reply (automatically) every incoming message | */ $config [ 'simple_autoreply' ] = FALSE; $config [ 'simple_autoreply_uid' ] = '1' ; // set user id who sent the message, must be valid ID $config [ 'simple_autoreply_msg' ] = "Thanks for sending me the message" ; |
Change $config[‘simple_autoreply’] to TRUE to enable this feature.
$config[‘simple_autoreply_uid’] is an identifier which user sent the autoreply, uid 1 is the default value.
$config[‘simple_autoreply_msg’] is the message you want to sent.
$config[‘simple_autoreply_uid’] is an identifier which user sent the autoreply, uid 1 is the default value.
$config[‘simple_autoreply_msg’] is the message you want to sent.
Last, you need to setup the daemon. The daemon will scan the inbox and process the autoreply and some other activity like @username check. The daemon also needs php-cli.
There are 2 ways to run the daemon. First, using the runonreceive which provided by gammu, or by cron/scheduler. But, because cron need third party software, i prefer using runonreceive.
Edit your gammu-smsd configuration file (smsdrc), change the path based on your environment:
[smsd]
runonreceive = /opt/lampp/htdocs/kalkun/scripts/daemon.sh
Or if you are using Windows:
[smsd]
runonreceive = C:\xampp\htdocs\kalkun\scripts\daemon.bat
Warning: It always a good idea to move the scripts directory outside the www, so it’s not accessible from browser.
Set correct path on daemon.sh or daemon.bat:
1
2
3
| # Configure this (use absolute path) PHP= /usr/bin/php # php cli path DAEMON= /path/to/kalkun/scripts/daemon .php # daemon.php path |
Make sure that the daemon script is executable.
$ sudo chmod +x daemon.php daemon.sh daemon.bat
Change URI path in daemon.php, the default value is:
1
2
| // Please configure this |
That’s it, now try send message to Kalkun, and see if the autoreply is working.
Troubleshooting: If somehow gammu-smsd fail to run the daemon script it will thrown error like this:
gammu-smsd[3665]: Process failed with exit status 126
Check permission and try to run the script manually.
Kalkun: Simple Balasan Otomatis (Eksperimental)
20 Februari 2011Azhari HarahapTinggalkan komentarGo to comments
Fitur ini menerapkan beberapa pengguna yang hanya ingin memiliki balasan otomatis untuk setiap pesan yang masuk. Tidak peduli apa sms mengandung, itu sebabnya kami menyebutnyaautoreply sederhana.
Tentu saja fitur ini dinonaktifkan secara default, Anda perlu mengubah konfigurasi di /application/config/kalkun_settings.php
1
2
3
4
5
6
7
8
9
10
11
| /* |-------------------------------------------------------------------------- | Simple Autoreply (Experimental) |-------------------------------------------------------------------------- | | Always reply (automatically) every incoming message | */ $config [ 'simple_autoreply' ] = FALSE; $config [ 'simple_autoreply_uid' ] = '1' ; // set user id who sent the message, must be valid ID $config [ 'simple_autoreply_msg' ] = "Thanks for sending me the message" ; |
Change $config[‘simple_autoreply’] to TRUE to enable this feature.
$config[‘simple_autoreply_uid’] is an identifier which user sent the autoreply, uid 1 is the default value.
$config[‘simple_autoreply_msg’] is the message you want to sent.
$config[‘simple_autoreply_uid’] is an identifier which user sent the autoreply, uid 1 is the default value.
$config[‘simple_autoreply_msg’] is the message you want to sent.
Last, you need to setup the daemon . The daemon will scan the inbox and process the autoreply and some other activity like @username check. The daemon also needs php-cli .
There are 2 ways to run the daemon. First, using the runonreceive which provided by gammu, or by cron/scheduler . But, because cron need third party software, i prefer using runonreceive.
Edit your gammu-smsd configuration file (smsdrc), change the path based on your environment:
[smsd]
runonreceive = /opt/lampp/htdocs/kalkun/scripts/daemon.sh
Or if you are using Windows:
[smsd]
runonreceive = C:\xampp\htdocs\kalkun\scripts\daemon.bat
Warning: It always a good idea to move the scripts directory outside the www, so it’s not accessible from browser.
Set correct path on daemon.sh or daemon.bat:
1
2
3
| # Configure this (use absolute path) PHP= /usr/bin/php # php cli path DAEMON= /path/to/kalkun/scripts/daemon .php # daemon.php path |
Make sure that the daemon script is executable.
$ sudo chmod +x daemon.php daemon.sh daemon.bat
Change URI path in daemon.php, the default value is:
1
2
| // Please configure this |
That’s it, now try send message to Kalkun, and see if the autoreply is working.
Troubleshooting: If somehow gammu-smsd fail to run the daemon script it will thrown error like this:
gammu-smsd[3665]: Process failed with exit status 126
Check permission and try to run the script manually.
– xampp-win32-1.7.4-VC6
– gammu 1.28.0
Terus, Kalkun bisa pake reg-regan gak Kang?