Om2008.8: execute script on incoming call

Michael 'Mickey' Lauer mickey at
Thu Aug 28 01:10:25 CEST 2008

If it doesn't need to be 2008.8, then you might want to give the frameworkd a 
try, which has been written for exactly these things. There, it would be as 
simple as (python example, but works with all kinds of languages of course):

import dbus, dbus.mainloop, gobject

actions = { \
  "+491003":"/usr/bin/foo3" }

def onCallStatus( index, status, properties ):
    if status == "incoming":
             action = actions[properties["number"]]
        except KeyError:
              subprocess.Popen( action, shell=True )

dbus.mainloop.glib.DBusGMainLoop( set_as_default=True )
mainloop = gobject.MainLoop()
bus = dbus.SystemBus()
onCallStatus, "CallStatus", "org.freesmartphone.GSM.Call", "org.freesmartphone.ogsmd", "/org/freesmartphone/GSM/Device" )


More information about the community mailing list