[asterisk-commits] trunk r20328 - in /trunk: channels/chan_agent.c
configs/agents.conf.sample
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sat Apr 15 15:32:25 MST 2006
Author: russell
Date: Sat Apr 15 17:32:23 2006
New Revision: 20328
URL: http://svn.digium.com/view/asterisk?rev=20328&view=rev
Log:
add the ability to turn off the feature that allows agents to end calls
by pressing '*'. This is still on by default. (issue #6897)
Modified:
trunk/channels/chan_agent.c
trunk/configs/agents.conf.sample
Modified: trunk/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_agent.c?rev=20328&r1=20327&r2=20328&view=diff
==============================================================================
--- trunk/channels/chan_agent.c (original)
+++ trunk/channels/chan_agent.c Sat Apr 15 17:32:23 2006
@@ -156,6 +156,7 @@
static int autologoff;
static int wrapuptime;
static int ackcall;
+static int endcall;
static int multiplelogin = 1;
static int autologoffunavail = 0;
@@ -498,7 +499,7 @@
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 @@
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 @@
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)
Modified: trunk/configs/agents.conf.sample
URL: http://svn.digium.com/view/asterisk/trunk/configs/agents.conf.sample?rev=20328&r1=20327&r2=20328&view=diff
==============================================================================
--- trunk/configs/agents.conf.sample (original)
+++ trunk/configs/agents.conf.sample Sat Apr 15 17:32:23 2006
@@ -40,6 +40,11 @@
; an agent logs in using agentcallbacklogin. Default is "no".
;
;ackcall=no
+;
+; Define endcall to allow an agent to hangup a call by '*'.
+; Default is "yes". Set this to "no" to ignore '*'.
+;
+;endcall=yes
;
; Define wrapuptime. This is the minimum amount of time when
; after disconnecting before the caller can receive a new call
More information about the asterisk-commits
mailing list