| Author |
Post |
|
|
#1 Fri May 06, 2011 16:13, 189 months ago.
|
|
Member
Registered: May 2011
Location: calgary AB, Canada
|
Operating system name and version: Ubuntu 9.04 Version of smsd: 3.1.14 Smsd installed from: sources Name and model of a modem / phone: Siemens TC65 Quad Band Interface: serial (via USB interface)
I am just curious to find out how I should run the script file. Do I run it with "./sql_demo" or do I place the file into a particular location for the sms server tool to work with?
thanks
|
|
|
#2 Fri May 06, 2011 16:25, 189 months ago.
|
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
In the smsd.conf, define: eventhandler = /usr/local/bin/smsd_eventhandler.shWith this setting smsd will execute the script every time when SMS is sent, received, or failed to send. If you are playing with "amounts" as in the sql_demo is done, save the content as smsd_eventhandler.sh. See also this topic: Sample eventhandler to store messages into SQL database.
|
|
|
#3 Fri May 06, 2011 16:38, 189 months ago.
|
|
Member
Registered: May 2011
Location: calgary AB, Canada
Topic owner
|
Again. I appreciate your reply. Thank you very much.
|
|
|
#4 Fri May 06, 2011 19:21, 189 months ago.
|
|
Member
Registered: May 2011
Location: calgary AB, Canada
Topic owner
|
First of all, thanks to you Keke, sms server tool is now logging received sms to mySQL db. Nonetheless, I don't think the sms server tool is logging sent sms. I ran: sudo sendsms ####### 'ping'Even though I receive a text to my mobile phone from the sms server tool, I don't see a logged line in my mySQL. sudo cat /usr/local/bin/smsd_eventhandler.sh: 'bash' Syntax Highlight powered by GeSHi What am I doing wrong?
|
|
|
#5 Sat May 07, 2011 15:49, 189 months ago.
|
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
Your log should say that there is an error in SQL syntax. Just because of this kind of issues, smsd will log if eventhandler says something, or if eventhandler prints something to the standard error output...
Please check and fix the apostrophe after text field title.
|