SMS Server Tools 3
 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. The forum is currently read-only, but will open soon. Wed Nov 06, 2024 02:37
SMSTools3 Community » Help and support Bottom

[answered] sending voicecall's

  This topic is locked

Page:  1

Author Post
Member
Registered:
Dec 2009
Location: Switzerland
OpenSuSE 11.1:
Smsd v3.1.6:
Siemens TC35i Terminal :

Hi
I would like to send voicecall trough or with nagios.
Sending sms works fine.

If I try to send voicecalls, the cellphone receive only sms.

Here is my config-file :


So, what did I miss, or what did I wrong ?

Kind regards
azubi

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Please check the syntax of a message file. There should be Voicecall: yes header included, for example:

To: 358401234567
Voicecall: yes

TONE: 5 #,#,#

Note that there must not be empty line before a line containing Voicecall header.


« Last edit by keke on Fri Dec 04, 2009 08:42, 181 months ago. »
Member
Registered:
Dec 2009
Location: Switzerland
Topic owner
Hi keke

I tried as you suggested.
here is the code which I'm using for sending :


and here is the output from the logfile :



unfortunally, I recive only a sms.

kind regards
azubi


« Last edit by azubi on Fri Dec 04, 2009 08:46, 181 months ago. »
Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
You should create outgoing file with some editor, or modify sendsms to add Voicecall: yes header. It does not work in the begin of a text, unless checkhandler with necessary code is defined.

Note that headers are all lines until an empty line exists in the message file. After that empty line, the remaining is a text.

Do you know if Nagios can be defined to add header?

Member
Registered:
Dec 2009
Location: Switzerland
Topic owner
Hi keke

thank you for your hint. Now I understand how it works.
This was the solution:


Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
The checkhandler I mentioned, could be the following:

In the global part of smsd.conf, define:
checkhandler = /usr/local/bin/smsd_checkhandler

Create this file and make it executable for smsd. Content:

#!/bin/bash

# Sample checkhandler.

# If message body starts with a "key", remove key from message body
# and store it as a header line.

TEXT=`sed -e '1,/^$/ d' < $1`
key='Voicecall: yes '
if [[ "$TEXT" == $key* ]]; then
  TEXT=${TEXT:${#key}}
  HEADERS=`formail -fX "" < $1`
  echo "$HEADERS" > $1
  echo "$key" >> $1
  echo "" >> $1
  echo -n "$TEXT" >> $1
fi
 
'bash' Syntax Highlight powered by GeSHi


This might be useful if the application which creates an SMS file cannot create additional headers.

Smsd must be restarted after smsd.conf is changed.

Member
Registered:
Dec 2009
Location: Switzerland
Topic owner
I would like to add my script for nagios monitoring.
this script is used as an escalationhanlder and create a call to the standby-guy's to wake them up if they didn't hear the last few SMS. :twisted:

Here we go (quick and dirty as usual):


  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.