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. Wed Apr 24, 2024 15:30
SMSTools3 Community » Help and support Bottom

[answered] when an incoming call, hang up the phone, send SMS that contact you.

Admin comment: Contains an eventhandler script for handling missed calls.

  This topic is locked

Page:  1

Author Post
Member
Registered:
Mar 2010
Location: Ukraine
Operating system name and version: altlinux 2.4
Version of smsd: 3-3.1.7beta4
Smsd installed from: sources
Name and model of a modem / phone: sim300,sim300
Interface: serial,serial

What are you aware of phones / modems, which support command delete missed calls at the team.
those that I delzhal in the hands of none does not support, advise accessible model

I need to do a project that will do the following
when an incoming call, hang up the phone, send SMS that contact you.

could still be a way to solve AT + CLIP = 1, but the program does not support this option, what would an alternative way to do that.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
nm11 wrote
What are you aware of phones / modems, which support command delete missed calls at the team.
those that I delzhal in the hands of none does not support, advise accessible model

Devices based on the Wavecom chip are working well. Also Telit GM862-QUAD-PY works, and many other devices work too. I do not have a complete list about devices with their features.

nm11 wrote
I need to do a project that will do the following
when an incoming call, hang up the phone, send SMS that contact you.

Use the modem setting phonecalls = yes.

Test how it works, and use voicecall_hangup_ath = yes if necessary.

You could store files of phonecalls to their own directory (global setting): phonecalls = /var/spool/sms/phonecalls, but incoming can be used as well, and it's a default.

Define an eventhandler: eventhandler = /usr/local/bin/smsd_eventhandler.sh.

Create this script with the following content and make it executable for smsd:

#!/bin/bash

COUNTRY_CODE="380"
ADMIN_TO="380441234567" # Change this number!

send_sms()
{
        # $1 = To
        # $2 = Message
        # $3 = Provider (optional)

        FILE=`mktemp /tmp/send_XXXXXX`
        echo "To: $1" >> $FILE
        if [ "x$3" != "x" ]; then
                echo "Provider: $3" >> $FILE
        fi
        echo "Comment: smsd eventhandler auto-answer" >> $FILE
        echo "" >> $FILE
        echo -n "$2" >> $FILE
        FILE2=`mktemp /var/spool/sms/outgoing/send_XXXXXX`
        mv $FILE $FILE2
}

DATE=`date +"%Y-%m-%d %H:%M:%S"`
FROM=`formail -zx From: < $2`
FROM_TOA=`formail -zx From_TOA: < $2`
MODEM=`formail -zx Modem: < $2`
TEXT=`sed -e '1,/^$/ d' < $2`

if [ "$1" = "CALL" ]; then
        if [ "x$FROM" != "x" ]; then
                if [ "${FROM:0:1}" = "0" ]; then
                        FROM="$COUNTRY_CODE${FROM:1}"
                fi

                send_sms "$FROM" "Be aware, I'll call you back later... :)"

                if [ "x$ADMIN_TO" != "x" ]; then
                        send_sms "$ADMIN_TO" "Got a call from $FROM at $DATE"
                fi
        fi
fi

exit 0
 
 
'bash' Syntax Highlight powered by GeSHi


The script is published as an example. When a call was received and the number of caller is known, the caller will get an SMS. Also an SMS is sent to the administrator, if it's defined.

nm11 wrote
could still be a way to solve AT + CLIP = 1, but the program does not support this option, what would an alternative way to do that.

Check the new version 3.1.7beta6 which is now available. This version has support for +CLIP Calling line identification report. 8)

  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.