Fix building that was broken by recent monitor.h changes. Thanks Russell for pointin...
authorJason Parker <jparker@digium.com>
Tue, 10 Jul 2007 15:07:25 +0000 (15:07 +0000)
committerJason Parker <jparker@digium.com>
Tue, 10 Jul 2007 15:07:25 +0000 (15:07 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@74272 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_queue.c
channels/chan_agent.c
include/asterisk/monitor.h
res/res_monitor.c

index 1efc353..f348dd4 100644 (file)
@@ -2649,13 +2649,13 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
                                else
                                        which = peer;
                                if (monitorfilename)
-                                       ast_monitor_start(which, qe->parent->monfmt, monitorfilename, 1 );
+                                       ast_monitor_start(which, qe->parent->monfmt, monitorfilename, 1, X_REC_IN | X_REC_OUT);
                                else if (qe->chan->cdr)
-                                       ast_monitor_start(which, qe->parent->monfmt, qe->chan->cdr->uniqueid, 1 );
+                                       ast_monitor_start(which, qe->parent->monfmt, qe->chan->cdr->uniqueid, 1, X_REC_IN | X_REC_OUT);
                                else {
                                        /* Last ditch effort -- no CDR, make up something */
                                        snprintf(tmpid, sizeof(tmpid), "chan-%lx", ast_random());
-                                       ast_monitor_start(which, qe->parent->monfmt, tmpid, 1 );
+                                       ast_monitor_start(which, qe->parent->monfmt, tmpid, 1, X_REC_IN | X_REC_OUT);
                                }
                                if (qe->parent->monjoin)
                                        ast_monitor_setjoinfiles(which, 1);
index 128cd53..2bf1841 100644 (file)
@@ -391,7 +391,7 @@ static int __agent_start_monitoring(struct ast_channel *ast, struct agent_pvt *p
                if ((pointer = strchr(filename, '.')))
                        *pointer = '-';
                snprintf(tmp, sizeof(tmp), "%s%s",savecallsin ? savecallsin : "", filename);
-               ast_monitor_start(ast, recordformat, tmp, needlock);
+               ast_monitor_start(ast, recordformat, tmp, needlock, X_REC_IN | X_REC_OUT);
                ast_monitor_setjoinfiles(ast, 1);
                snprintf(tmp2, sizeof(tmp2), "%s%s.%s", urlprefix ? urlprefix : "", filename, recordformatext);
 #if 0
index cefb891..7f32b69 100644 (file)
@@ -30,6 +30,11 @@ enum AST_MONITORING_STATE {
        AST_MONITOR_PAUSED
 };
 
+/* Streams recording control */
+#define X_REC_IN       1
+#define X_REC_OUT      2
+#define X_JOIN         4
+
 /*! Responsible for channel monitoring data */
 struct ast_channel_monitor {
        struct ast_filestream *read_stream;
index 38d465b..cc47010 100644 (file)
@@ -61,11 +61,6 @@ AST_MUTEX_DEFINE_STATIC(monitorlock);
                ast_channel_unlock(lock); \
        } while (0)
 
-/* Streams recording control */
-#define X_REC_IN       1
-#define X_REC_OUT      2
-#define X_JOIN         4
-
 static unsigned long seq = 0;
 
 static char *monitor_synopsis = "Monitor a channel";
@@ -132,7 +127,14 @@ static int ast_monitor_set_state(struct ast_channel *chan, int state)
        return 0;
 }
 
-/* Start monitoring a channel */
+/*! \brief Start monitoring a channel
+ * \param chan ast_channel struct to record
+ * \param format_spec file format to use for recording
+ * \param fname_base filename base to record to
+ * \param need_lock whether to lock the channel mutex
+ * \param stream_action whether to record the input and/or output streams.  X_REC_IN | X_REC_OUT is most often used
+ * \returns 0 on success, -1 on failure
+ */
 int ast_monitor_start( struct ast_channel *chan, const char *format_spec,
                const char *fname_base, int need_lock, int stream_action)
 {