[asterisk-commits] mjordan: testsuite/asterisk/trunk r2944 - /asterisk/trunk/lib/python/asterisk/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Dec 21 15:02:29 CST 2011
Author: mjordan
Date: Wed Dec 21 15:02:27 2011
New Revision: 2944
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=2944
Log:
Switched voicemail library to use all AMI for sending info to Asterisk instances
Modified:
asterisk/trunk/lib/python/asterisk/voicemail.py
Modified: asterisk/trunk/lib/python/asterisk/voicemail.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/lib/python/asterisk/voicemail.py?view=diff&rev=2944&r1=2943&r2=2944
==============================================================================
--- asterisk/trunk/lib/python/asterisk/voicemail.py (original)
+++ asterisk/trunk/lib/python/asterisk/voicemail.py Wed Dec 21 15:02:27 2011
@@ -53,7 +53,7 @@
if self.__evaluateFunc != None:
self.currentState = self.__evaluateFunc(value, self)
else:
- logger.warn("WARNING: no evaluate function defined, setting currenState to value")
+ logger.warn("no evaluate function defined, setting currentState to value")
self.currentState = value
return
@@ -119,13 +119,8 @@
self.testStateController.changeState(FailureTestState(self.controller))
return
- if self.astSender == None:
- logger.error("Attempting to send DTMF to non-existant Asterisk instance")
- self.testStateController.changeState(FailureTestState(self.controller))
- return
-
if (self.__previous_dtmf != dtmfToSend):
- self.astSender.cli_exec("dialplan set global DTMF_TO_SEND " + dtmfToSend)
+ self.amiSender.setVar(channel = "", variable = "DTMF_TO_SEND", value = dtmfToSend)
self.__previous_dtmf = dtmfToSend
"""
@@ -145,13 +140,8 @@
self.testStateController.changeState(FailureTestState(self.controller))
return
- if self.astSender == None:
- logger.error("Attempting to send sound file to non-existant Asterisk instance")
- self.testStateController.changeState(FailureTestState(self.controller))
- return
-
if (self.__previous_audio != audioFile):
- self.astSender.cli_exec("dialplan set global TALK_AUDIO " + audioFile)
+ self.amiSender.setVar(channel = "", variable = "TALK_AUDIO", value = audioFile)
self.__previous_audio = audioFile
"""
@@ -175,16 +165,11 @@
TestCase.testStateController.changeState(FailureTestState(self.controller))
return
- if self.astSender == None:
- logger.error("Attempting to send sound file / DTMF to non-existant Asterisk instance")
- TestCase.testStateController.changeState(FailureTestState(self.controller))
- return
-
if (self.__previous_audio != audioFile):
- self.astSender.cli_exec("dialplan set global TALK_AUDIO " + audioFile)
+ self.amiSender.setVar(channel = "", variable = "TALK_AUDIO", value = audioFile)
self.__previous_audio = audioFile
if (self.__previous_dtmf != dtmfToSend):
- self.astSender.cli_exec("dialplan set global DTMF_TO_SEND " + dtmfToSend)
+ self.amiSender.setVar(channel = "", variable = "DTMF_TO_SEND", value = dtmfToSend)
self.__previous_dtmf = dtmfToSend
"""
More information about the asterisk-commits
mailing list