Initiate Call
on Answer, play wav
hang up
I can dial and process events as expected but for some reason it doesn't accept me changing the InputDevice to a file. I am using version 2.6 of skype on the mac. I was just guessing on this application so if there is a best practice that I should follow please advise. From the example code, that is what I have been able to deduce.
CODE
import Skype4Py
import sys
import time
flag = 1
class CallEvents:
def CallInputStatusChanged(self,call,status):
print call.InputDevice()
print "Input",call,status
def CallStatus(self,call,status):
print "Status",call,status
if status == "INPROGRESS":
print "change to file input"
print call.InputDevice(Skype4Py.callIoDeviceTypeFile,'a.wav')
elif status == "FINISHED":
print "DIE"
flag = 0
sys.exit(1)
print "WHY",status
skype = Skype4Py.Skype(Events=CallEvents())
skype.Attach()
print skype.PlaceCall("anybody")
while flag == 1:
time.sleep(1)
import sys
import time
flag = 1
class CallEvents:
def CallInputStatusChanged(self,call,status):
print call.InputDevice()
print "Input",call,status
def CallStatus(self,call,status):
print "Status",call,status
if status == "INPROGRESS":
print "change to file input"
print call.InputDevice(Skype4Py.callIoDeviceTypeFile,'a.wav')
elif status == "FINISHED":
print "DIE"
flag = 0
sys.exit(1)
print "WHY",status
skype = Skype4Py.Skype(Events=CallEvents())
skype.Attach()
print skype.PlaceCall("anybody")
while flag == 1:
time.sleep(1)