The Following User Says Thank You to pichlo For This Useful Post: | ||
|
2015-07-19
, 05:58
|
Posts: 959 |
Thanked: 3,427 times |
Joined on Apr 2012
|
#2
|
The Following 4 Users Say Thank You to taixzo For This Useful Post: | ||
|
2015-07-19
, 07:31
|
|
Posts: 6,447 |
Thanked: 20,981 times |
Joined on Sep 2012
@ UK
|
#3
|
|
2015-07-19
, 08:08
|
|
Posts: 4,118 |
Thanked: 8,901 times |
Joined on Aug 2010
@ Ruhrgebiet, Germany
|
#4
|
~ $ cat /etc/dbus-scripts.d/call
# This file was generated by dbus-scripts-settings
# If you edit it by hand you might confuse the program,
# and you might lose your changes next time the program runs.
#:call_start
/opt/scripts/call_start.sh * * com.nokia.mce.signal sig_call_state_ind active normal
#:call_end
/opt/scripts/call_end.sh * * com.nokia.mce.signal sig_call_state_ind none normal
|
2015-07-19
, 12:44
|
|
Posts: 435 |
Thanked: 684 times |
Joined on Apr 2012
@ Netherlands 020
|
#5
|
The Following 2 Users Say Thank You to jellyroll For This Useful Post: | ||
|
2015-07-19
, 16:05
|
Posts: 1,100 |
Thanked: 2,797 times |
Joined on Apr 2011
@ Netherlands
|
#6
|
import gobject, dbus from dbus.mainloop.glib import DBusGMainLoop def handle_sms(pdu, msgcenter, somestring, sendernumber): print 'New message from %s' % sendernumber DBusGMainLoop(set_as_default=True) bus = dbus.SystemBus() bus.add_signal_receiver(handle_sms, path='/com/nokia/phone/SMS', dbus_interface='Phone.SMS', signal_name='IncomingSegment') gobject.MainLoop().run()
The Following 3 Users Say Thank You to ade For This Useful Post: | ||
|
2015-07-19
, 17:33
|
|
Posts: 4,118 |
Thanked: 8,901 times |
Joined on Aug 2010
@ Ruhrgebiet, Germany
|
#7
|
I have not tested this, but I used to have a similar script to act on incoming phonecalls.HTML Code:DBusGMainLoop(set_as_default=True) bus = dbus.SystemBus() bus.add_signal_receiver(handle_sms, path='/com/nokia/phone/SMS', dbus_interface='Phone.SMS', signal_name='IncomingSegment') gobject.MainLoop().run()
|
2015-07-19
, 18:26
|
Posts: 1,038 |
Thanked: 3,980 times |
Joined on Nov 2010
@ USA
|
#8
|
The code can be literally found on the related wiki page (https://wiki.maemo.org/PyMaemo/Phone...d_SMS_examples)
I have not tested this, but I used to have a similar script to act on incoming phonecalls.
The Following User Says Thank You to robthebold For This Useful Post: | ||
|
2015-07-19
, 18:47
|
Posts: 1,038 |
Thanked: 3,980 times |
Joined on Nov 2010
@ USA
|
#9
|
See this for sending an SMS from a script; but I don't know how to trigger a script on an incoming message.
So I concocted a plan to update my voicemail prompt with something like, "this number is no longer valid, please call XYZ instead".
However, the vast majority of my mobile communication by far - about 99.95% - is by SMS.
So my idea is, setting up one of my spare N900s with my old SIM and some app or a script or whatever that would automatically reply to any incoming SMS with a prompt to update their address book - and leaving it running for a year or so, or until the credit runs out, whichever comes sooner.
Now, I am aware of SMSCON but have no experience with it. Having read its wiki, I am not entirely convinced it is cut out for the job. I do not want to set up a master number and definitely cannot expect people sending me messages to include special codes in them. I just want it to autoreply to any incoming message with a predefined text. Kinda like an SMS equivalent of an "out of the office" email.
Any ideas? Before I take the SMSCON code and start hacking it into shape