This page refers to the old SeisComP 3 version, and may no longer be accurate.
See seiscomp.de for the latest version.
Using Skype to send SMS
temporary page ...
Required :
Skype4Py (http://forum.skype.com/index.php?showtopic=233671 (thanks Philippe))
A running Skype instance
Code :
#! /usr/bin/env python # -*- coding: utf-8 -*- import Skype4Py import time import sys skype = Skype4Py.Skype() # Attach to Skype client skype.Attach() print "___ SKYPE USER ___" pro = Skype4Py.profile.Profile(skype) print "User Name :", pro.FullName print "Balance left:", pro.BalanceToText DESTINATION_CELL_PHONE_NUMBER = '+32' sms = skype.CreateSms('OUTGOING',DESTINATION_CELL_PHONE_NUMBER) sms.Body = 'EARTHQUAKE IN BELGIUM' print sms.Body print sms.Id print sms.Targets[0].Number print sms.Targets[0].Status while sms.Targets[0].Status != 'TARGET_ACCEPTABLE': print sms.Targets[0].Status time.sleep(1) print sms.Targets[0].Status print sms._GetPriceToText() sms.ReplyToNumber = '' print sms.Send() while sms.Targets[0].Status != 'TARGET_DELIVERY_SUCCESSFUL': print sms.Targets[0].Status time.sleep(1) print sms.Targets[0].Status
The first time you run this script, you'll have to authorize python to connect to skype (on my windows box, a dialog pops up).