from getpass import getpass
from skpy import SkypeEventLoop
from skpy import SkypeCallMsg
from skpy import Skype
class MySkype(SkypeEventLoop):
def onEvent(self, event):
print('Проверка...')
try:
print(event.msg.content)
if event.type == 'NewMessage':
print(event.msg.content)
check_for_call = event.msg.content[:6]
if check_for_call == """{"cp":""":
print("Входящий звонок")
except:
pass
if __name__ == "__main__":
sk = MySkype("email", 'password', autoAck=True)
sk.subscribePresence() # Only if you need contact presence events.
sk.loop()
That code uses event event.msg.content, and receives incoming calls of my Skype, but how I can't get outgoing calls, probably outgoing calls receive with another method, I looked in documentation SkPy was class "SkypeCallMsg", maybe it help?
Get outgoing calls from Skype in Python with SkPy
I was trying to find an answer for the same question, but I think currently there's no solution for listening to outgoing Skype calls. You receive an event update only if someone accepts an outgoing call, not when you start it.