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. Mon Mar 01, 2021 06:30
SMSTools3 Community » Help and support Bottom

[answered] Some Clarifications

  This topic is locked

Page:  1

Author Post
Member
Registered:
Jun 2010
Location: Singapore
Operating system name and version: Windows 7 (64 bit)
Version of smsd: 3.1.14
Smsd installed from: downloaded the source from website (installed in cygwin)
Name and model of a modem: Wavecom WMOD2
Interface: USB

Hi Ke Ke,

I have something to clarify with you. Things are as follow:

- Validity from SMS FILE FORMAT is used in SMSD or ISP SERVER? It is used in which area?

- When smsd is moving the file around (Outgoing -> Checked -> Sent), will smsd overwrite the files in CHECKED and SENT folders? (Uniqueness of File name is measured by the whole SMS File related folders or only at the outgoing folder only?)

- How to interact with java programs when there is an event? Is there any sample for it?
(For  eventhandler  attribute in smsd.conf)

Thanks in advanced. :)


« Last edit by alexanderfuture on Thu Jan 13, 2011 10:21, 123 months ago. »
Member
Registered:
Jun 2010
Location: Singapore
Topic owner
What I am trying to achieve is:

To send email to administrator when smsd fires up FAILED event and move the file to FAILED Folder. So that at least, someone knows there is a failed sms in SMS Server.

Thanks in advanced.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
alexanderfuture wrote
- Validity from SMS FILE FORMAT is used in SMSD or ISP SERVER? It is used in which area?

It is used in Service Center, smsd just include this value in the PDU, but does not do anything with it. If SMS is not delivered to the recipient during the validity period, Service Center stops trying and rejects a message. In this case the sender may receive a status report with a status 70, "Error,SM validity period expired". Also, sender does not receive a status report which tells "Ok,short message received by the SME".

alexanderfuture wrote
- When smsd is moving the file around (Outgoing -> Checked -> Sent), will smsd overwrite the files in CHECKED and SENT folders? (Uniqueness of File name is measured by the whole SMS File related folders or only at the outgoing folder only?)

By default files are overwritten. There is a global setting available: keep_filename = no. With this setting an unique name is created every time when a file is moved.

alexanderfuture wrote
- How to interact with java programs when there is an event? Is there any sample for it?
(For  eventhandler  attribute in smsd.conf)

I do not have any samples with Java. However, any language can be used with eventhandler and checkhandler. Just define eventhandler = /path/to/your/Java.program and it's called every time when SMS is received, sent, or failed to send. This tells what are the command line arguments for the program.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
alexanderfuture wrote
To send email to administrator when smsd fires up FAILED event and move the file to FAILED Folder. So that at least, someone knows there is a failed sms in SMS Server.

If you define failed = /var/spool/sms/failed in the global part of smsd.conf, failed messages are stored.

If using Bash, this kind of eventhandler can send the email:

#!/bin/bash
 
EMAIL="sms@domain.com"
 
if [ "$1" == "FAILED" ]; then
 
  if [ -n "$EMAIL" ]; then
    TO=`formail -zx To: < $2`
    sms=`cat $2`
    message="From: sms@localhost
To: $EMAIL
Subject: Sending SMS to $TO failed
 
${sms}"

 
    echo -n "$message" | /usr/sbin/sendmail "$EMAIL"
  fi
fi

# Other actions here...

 
'bash' Syntax Highlight powered by GeSHi


If your eventhandler is written using Java, just include this kind of functionality in your code. Also, you can define this Bash script as an eventhandler, and call Java from the script. In this case remember to include arguments, like:
/path/to/your/Java.program "$1" "$2" "$3"

  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.