[Asterisk-cvs] asterisk/channels chan_agent.c,1.61,1.61.2.1
martinp at lists.digium.com
martinp at lists.digium.com
Thu Feb 12 16:20:19 CST 2004
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv28535/channels
Modified Files:
Tag: v1-0_stable
chan_agent.c
Log Message:
Fix recording the agent's calls by default
Index: chan_agent.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_agent.c,v
retrieving revision 1.61
retrieving revision 1.61.2.1
diff -u -d -r1.61 -r1.61.2.1
--- chan_agent.c 3 Feb 2004 16:57:00 -0000 1.61
+++ chan_agent.c 12 Feb 2004 22:29:02 -0000 1.61.2.1
@@ -87,12 +87,12 @@
/* Protect the interface list (of sip_pvt's) */
static ast_mutex_t agentlock = AST_MUTEX_INITIALIZER;
-int recordagentcalls = 0;
-char recordformat[AST_MAX_BUF];
-char recordformatext[AST_MAX_BUF];
-int createlink = 0;
-char urlprefix[AST_MAX_BUF];
-char savecallsin[AST_MAX_BUF];
+static int recordagentcalls = 0;
+static char recordformat[AST_MAX_BUF];
+static char recordformatext[AST_MAX_BUF];
+static int createlink = 0;
+static char urlprefix[AST_MAX_BUF];
+static char savecallsin[AST_MAX_BUF];
static struct agent_pvt {
ast_mutex_t lock; /* Channel private lock */
@@ -337,7 +337,7 @@
}
CLEANUP(ast,p);
ast_mutex_unlock(&p->lock);
- if (f == &answer_frame)
+ if (recordagentcalls && f == &answer_frame)
agent_start_monitoring(ast,0);
return f;
}
@@ -467,7 +467,8 @@
ast_setstate(ast, AST_STATE_RINGING);
else {
ast_setstate(ast, AST_STATE_UP);
- agent_start_monitoring(ast,0);
+ if (recordagentcalls)
+ agent_start_monitoring(ast,0);
p->acknowledged = 1;
}
res = 0;
More information about the svn-commits
mailing list