summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Parker <jparker@digium.com>2007-07-10 15:07:25 +0000
committerJason Parker <jparker@digium.com>2007-07-10 15:07:25 +0000
commit76e2e39f77606f4bbc82994cc715cc249f421fc5 (patch)
tree754d9e2c408680bac409a7e1b6e47bb3f661d848
parent14580951919ebb0aad1a4fb257657870260c6042 (diff)
Fix building that was broken by recent monitor.h changes. Thanks Russell for pointing this out (and pointing out what I probably did to prevent gcc from fixing it - don't ctrl-C builds)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@74272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--apps/app_queue.c6
-rw-r--r--channels/chan_agent.c2
-rw-r--r--include/asterisk/monitor.h5
-rw-r--r--res/res_monitor.c14
4 files changed, 17 insertions, 10 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 1efc3531c..f348dd4d7 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -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);
diff --git a/channels/chan_agent.c b/channels/chan_agent.c
index 128cd53a4..2bf18417c 100644
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -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
diff --git a/include/asterisk/monitor.h b/include/asterisk/monitor.h
index cefb89180..7f32b6994 100644
--- a/include/asterisk/monitor.h
+++ b/include/asterisk/monitor.h
@@ -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;
diff --git a/res/res_monitor.c b/res/res_monitor.c
index 38d465b27..cc4701049 100644
--- a/res/res_monitor.c
+++ b/res/res_monitor.c
@@ -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)
{