mixmonitor: Add a test event
authorJonathan Rose <jrose@digium.com>
Tue, 30 Oct 2012 19:20:33 +0000 (19:20 +0000)
committerJonathan Rose <jrose@digium.com>
Tue, 30 Oct 2012 19:20:33 +0000 (19:20 +0000)
This test event is being used to fix the  mixmonitor_audiohook_inherit
test.
........

Merged revisions 375484 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 375485 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 375486 from http://svn.asterisk.org/svn/asterisk/branches/11

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375498 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_mixmonitor.c

index 50da593..fa13dcb 100644 (file)
@@ -55,6 +55,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #include "asterisk/callerid.h"
 #include "asterisk/mod_format.h"
 #include "asterisk/linkedlists.h"
+#include "asterisk/test.h"
 
 /*** DOCUMENTATION
        <application name="MixMonitor" language="en_US">
@@ -689,6 +690,13 @@ static void *mixmonitor_thread(void *obj)
 
                ast_audiohook_lock(&mixmonitor->audiohook);
        }
+
+       /* Test Event */
+       ast_test_suite_event_notify("MIXMONITOR_END", "Channel: %s\r\n"
+                                                                       "File: %s\r\n",
+                                                                       ast_channel_name(mixmonitor->autochan->chan),
+                                                                       mixmonitor->filename);
+
        ast_audiohook_unlock(&mixmonitor->audiohook);
 
        ast_autochan_destroy(mixmonitor->autochan);