[asterisk-commits] kmoore: testsuite/asterisk/trunk r3938 - /asterisk/trunk/tests/apps/confbridg...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 22 10:28:46 CDT 2013


Author: kmoore
Date: Mon Jul 22 10:28:44 2013
New Revision: 3938

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=3938
Log:
Adjust confbridge_recording test now that CBRec channels are hidden from AMI

Modified:
    asterisk/trunk/tests/apps/confbridge/confbridge_recording/run-test

Modified: asterisk/trunk/tests/apps/confbridge/confbridge_recording/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/confbridge/confbridge_recording/run-test?view=diff&rev=3938&r1=3937&r2=3938
==============================================================================
--- asterisk/trunk/tests/apps/confbridge/confbridge_recording/run-test (original)
+++ asterisk/trunk/tests/apps/confbridge/confbridge_recording/run-test Mon Jul 22 10:28:44 2013
@@ -44,17 +44,17 @@
 
         self._ami = ami
         ami.registerEvent('ConfbridgeJoin', self.handle_confbridge_join_event)
-        ami.registerEvent('VarSet', self.handle_varset_event)
-
-    def handle_varset_event(self, ami, event):
-        """ VarSet event handler """
-
-        if 'variable' not in event or 'value' not in event:
-            return
-        if event['variable'] != 'MIXMONITOR_FILENAME':
-            return
-        logger.debug("Detected variable MIXMONITOR_FILENAME: %s" % event['value'])
-        self.testCase.set_recording_file(event['value'])
+        ami.registerEvent('TestEvent', self.handle_testevent_event)
+
+    def handle_testevent_event(self, ami, event):
+        """ TestEvent event handler """
+
+        if event['state'] != "MIXMONITOR_END":
+            return
+        if 'file' not in event:
+            return
+        logger.debug("Detected variable MIXMONITOR_FILENAME: %s" % event['file'])
+        self.testCase.set_recording_file("%s.wav" % event['file'])
 
     def handle_confbridge_join_event(self, ami, event):
         """ ConfBridgeJoin event handler """




More information about the asterisk-commits mailing list