Home > kalkun > Kalkun: Simple Autoreply (Experimental)

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

/*
|--------------------------------------------------------------------------
| 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.

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:

# 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:

// Please configure this
$url = "http://localhost/kalkun";

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.

Advertisements
Categories: kalkun Tags: ,
  1. February 20, 2011 at 10:34 pm

    Thanks Bro, this is a very important feature. Looking forward to next update with more features. Keep up the good work!

  2. iChsan
    February 27, 2011 at 12:17 pm

    keren. bisa jalan di windows:-)

  3. February 28, 2011 at 8:08 am

    @iChsan: Apakah sudah dicobakan di Windows daemon.bat nya? Saya ga punya Windows nih :\

  4. iChsan
    March 1, 2011 at 5:09 am

    yup. sudah dicoba di windows. dan berjalan seperti yg diharapkan:-)
    – xampp-win32-1.7.4-VC6
    – gammu 1.28.0

  5. May 3, 2011 at 8:57 am

    thanks bang, mantaps jalan punyaku 😀

  6. June 9, 2011 at 4:45 am

    Akang… Kalau mau bikin auto reply ketika menerima sms tertentu logikanya gimana ya?
    Terus, Kalkun bisa pake reg-regan gak Kang?

    Thank you so much.. 🙂

  7. June 9, 2011 at 8:41 am

    @Tsara: Silahkan gunakan fitur External Script, untuk reg-regan pake fitur SMS Member.

  8. Ade
    June 13, 2011 at 4:03 am

    kang punten mau nanya, saya sudah set daemon.sh dan daemon.php seperti diatas, untuk melihat inbox sms masuk sudah ok, tetapi untuk auto reply belum bisa yah, padahal kalkun_settings.php sudah saya sesuaikan, saya pake ubuntu server natty + gammu + kalkun, mohon pencerahan kang…. nuhun

  9. June 13, 2011 at 2:29 pm

    @Ade: Diperbaiki pada commit #eaa515f . Silahkan dicoba.

  10. pardiyanto
    December 18, 2011 at 5:31 am

    terima kasih saya ucapkan atas software nya.
    saya menggunakan kalkun 0.4 rc 2.
    gammu 1.30,
    xampp 1.7.3
    modem ONDA / PHS101 device = com connection = at 921600.
    os windows xp sp3
    berjalan dengan baik.
    selamat tahun baru 2012.

  11. agus
    January 25, 2012 at 3:59 am

    bang saya mau tanya.. knpa kalkun saya tdk dpt menampilkan inbox… dmn yg perlu sy edit.. terima kasih

  12. agus
    January 25, 2012 at 4:35 am

    agus :
    bang saya mau tanya.. knpa kalkun saya tdk dpt menampilkan inbox… dmn yg perlu sy edit.. terima kasih

  13. May 29, 2012 at 7:06 am

    MAs, saya nyoba artikelnya diatas , tapi belum bisa pula Auto replaynya,,
    kemungkinan apanya Ya?,

  14. pupu syaefullah
    March 30, 2013 at 7:52 am

    terimakasih mas, sy sudah coba dan berhasil..

  15. heryhan
    July 18, 2013 at 6:32 am

    saya gak bisa gan di kalkun 0.7.1

  16. Setsuna
    November 15, 2013 at 9:56 am

    is there a way to make the SMS auto forwards to a different number?

  17. satria
    December 2, 2013 at 1:55 pm

    ini referensi nya dari mana ya kalo boleh tau ? dari buku atau darimanakah ? thx 🙂

  1. No trackbacks yet.

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

%d bloggers like this: