mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 04:11:08 +00:00
Fix recording the agent's calls by default
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2160 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -96,12 +96,12 @@ static ast_mutex_t usecnt_lock = AST_MUTEX_INITIALIZER;
|
||||
/* 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];
|
||||
|
||||
#define GETAGENTBYCALLERID "AGENTBYCALLERID"
|
||||
|
||||
@@ -354,7 +354,7 @@ static struct ast_frame *agent_read(struct ast_channel *ast)
|
||||
}
|
||||
CLEANUP(ast,p);
|
||||
ast_mutex_unlock(&p->lock);
|
||||
if (f == &answer_frame)
|
||||
if (recordagentcalls && f == &answer_frame)
|
||||
agent_start_monitoring(ast,0);
|
||||
return f;
|
||||
}
|
||||
@@ -484,7 +484,8 @@ static int agent_call(struct ast_channel *ast, char *dest, int timeout)
|
||||
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;
|
||||
|
Reference in New Issue
Block a user