summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2006-04-15 22:32:23 +0000
committerRussell Bryant <russell@russellbryant.com>2006-04-15 22:32:23 +0000
commit717445c1d842424a200714dfb5ef795ff5e149c7 (patch)
tree1d45c96bd18f6ac095fb871067c98e0e5dd87ef7 /channels
parent825d6d7c99fdcba913120c98a5cc3014b30636b2 (diff)
add the ability to turn off the feature that allows agents to end calls
by pressing '*'. This is still on by default. (issue #6897) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_agent.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/channels/chan_agent.c b/channels/chan_agent.c
index 46cce1f87..c36be2d7a 100644
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -156,6 +156,7 @@ static ast_group_t group;
static int autologoff;
static int wrapuptime;
static int ackcall;
+static int endcall;
static int multiplelogin = 1;
static int autologoffunavail = 0;
@@ -498,7 +499,7 @@ static struct ast_frame *agent_read(struct ast_channel *ast)
p->acknowledged = 1;
ast_frfree(f);
f = &answer_frame;
- } else if (f->subclass == '*') {
+ } else if (f->subclass == '*' && endcall) {
/* terminates call */
ast_frfree(f);
f = NULL;
@@ -988,6 +989,7 @@ static int read_agent_config(void)
autologoff = 0;
wrapuptime = 0;
ackcall = 0;
+ endcall = 1;
cfg = ast_config_load(config);
if (!cfg) {
ast_log(LOG_NOTICE, "No agent configuration found -- agent support disabled\n");
@@ -1032,6 +1034,8 @@ static int read_agent_config(void)
ackcall = 1;
else
ackcall = 0;
+ } else if (!strcasecmp(v->name, "endcall")) {
+ endcall = ast_true(v->value);
} else if (!strcasecmp(v->name, "wrapuptime")) {
wrapuptime = atoi(v->value);
if (wrapuptime < 0)