summaryrefslogtreecommitdiffstats
path: root/clients/ivamVoiceBox.py
diff options
context:
space:
mode:
Diffstat (limited to 'clients/ivamVoiceBox.py')
-rw-r--r--clients/ivamVoiceBox.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/clients/ivamVoiceBox.py b/clients/ivamVoiceBox.py
index 252ce98..9dc84f9 100644
--- a/clients/ivamVoiceBox.py
+++ b/clients/ivamVoiceBox.py
@@ -216,7 +216,7 @@ class VoiceBox(ivamApi.Processor):
self.currentState = self.STATE_FINISH
c.hangup()
- def onRecordFinish(self, c, fname):
+ def onRecordFinish(self, c, fname, length):
if ivamCore.DEBUG:
ivamCore.log("onRecordFinish(%s)" % fname)
@@ -224,6 +224,9 @@ class VoiceBox(ivamApi.Processor):
ivamCore.log("Sucessfully recorded new message '%s' from %s for MSN %s." % (fname, self.callerNumber, self.ringNumber))
os.environ["SPOOLDIR"] = self.directory
+ os.environ["LENGTH"] = `c.recordLength`
+ os.environ["SEC_LENGTH"] = "%0.1f" % (c.recordLength/8000.0)
+
ivamCore.log("Starting new message notification program.")
r=os.spawnvp(os.P_WAIT, self.messageProgram, (self.messageProgram, fname))
ivamCore.log("Program finished (return value is %i)." % r)