Hi all,
sorry for the first post but the format was wrong.
i am new in ser and sems.
i have running sersasi with sems 1.0.0
i have a ivr python scrip that record my voice for e.g. 5 seconds and
save it as a wave file on my harddisc.
my problem is that the wave file is finaly saved only if i hang up (send
bye) but the wave file should be saved directly after the 5 seconds
without hang up the phone.
Can someone help me?
here my script:
from log import *
from ivr import *
hallo = "/usr/audio/hallo_1oder2.wav"
record = "/usr/audio/record.wav"
class IvrDialog(IvrDialogBase) :
def onSessionStart(self,hdrs):
self.audio_play = IvrAudioFile()
self.audio_play.open(hallo, AUDIO_READ)
self.enqueue(self.audio_play,None)
def onDtmf(self,event,duration):
if event ==1:
self.audio_rec = None
self.audio_rec = IvrAudioFile()
self.audio_rec.open("/usr/audio/record.wav", AUDIO_WRITE,)
self.audio_rec.setRecordTime(5*1000)
self.enqueue(None,self.audio_rec)
if event ==2:
self.audio_play = None
self.audio_play = IvrAudioFile()
self.audio_play.open(record, AUDIO_READ)
self.enqueue(self.audio_play,None)
def onBye(self):
self.bye()
self.stopSession()
regards
rafael
_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems