SMS Server Tools 3
This site is hosted by Kekekasvi.com
 Menu
Basic information:
Additional information:
Support:
Get SMS Server Tools 3:
Additional Options

 Sponsored links

 Search
Custom Search

 Visitor locations
 
 SMS Server Tools 3 Community
Welcome, Guest. Please login or register. Tue Apr 23, 2024 09:20
SMSTools3 Community » Help and support Bottom

[answered] Some clarification about eventhandler

  This topic is locked

Page:  1

Author Post
Member
Registered:
Apr 2010
Location: Malaysia
Operating system name and version: Linux CentOS 4.8
Version of smsd: 3.1.11
Smsd installed from: sources
Name and model of a modem / phone: Wavecomm Fastrak Supreme 10
Interface: Serial

I have successfully implemented smsd with our helpdesk system. I have also, with help from this forum, made use of eventhandler so that our technicians are able to close a ticket by sending an sms to the helpdesk system.

I would like to move a step further and log all events into an SQL database. I have found the script here:
http://smstools3.kekekasvi.com/topic.php?post=132#post132

Questions:
1) On the top part of the script, in the comment section, Keke wrote:
Quote
# You need a MYSQL database as described in the documentation.
# Please read the documentation before using this script.

:| I tried browsing thru the ~/doc directory, but couldn't find any reference to mysql. Where can I get the database schema to do this ?

2) As stated earlier, I have an eventhandler script written in bash too, that handles incoming SM from our technicians. Can I just append the script at http://smstools3.kekekasvi.com/topic.php?post=132#post132 to my current script ?

TIA.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
almangkok wrote
1) On the top part of the script, in the comment section, Keke wrote:
Quote
# You need a MYSQL database as described in the documentation.
# Please read the documentation before using this script.

:| I tried browsing thru the ~/doc directory, but couldn't find any reference to mysql. Where can I get the database schema to do this ?

The schema could be like the following:
+---------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------------+--------------+------+-----+---------+----------------+
| id | bigint(20) | NO | PRI | NULL | auto_increment |
| type | varchar(16) | YES | | NULL | |
| sent | datetime | YES | | NULL | |
| received | datetime | YES | | NULL | |
| sender | varchar(32) | YES | | NULL | |
| receiver | varchar(32) | YES | | NULL | |
| status | varchar(3) | YES | | NULL | |
| msgid | varchar(3) | YES | | NULL | |
| text | mediumtext | YES | | NULL | |

...and some more fields, depending on the front-end application.
almangkok wrote
2) As stated earlier, I have an eventhandler script written in bash too, that handles incoming SM from our technicians. Can I just append the script at http://smstools3.kekekasvi.com/topic.php?post=132#post132 to my current script ?

Yes, you can append it. You can also store the script as a different file, and include it to your script:

#!/bin/bash

<Your script here>

. /usr/local/bin/smsd_mysql_eventhandler.sh
 
'bash' Syntax Highlight powered by GeSHi


Member
Registered:
Apr 2010
Location: Malaysia
Topic owner
Thank you for the clarification.

  This topic is locked

Page:  1

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.