dect
/
asterisk
Archived
13
0
Fork 0

Fix recording the agent's calls by default

git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2160 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
martinp 2004-02-12 22:28:35 +00:00
parent 89201083ba
commit bea18a5764
1 changed files with 9 additions and 8 deletions

View File

@ -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;