mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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
This commit is contained in:
@@ -156,6 +156,7 @@ static ast_group_t group;
|
|||||||
static int autologoff;
|
static int autologoff;
|
||||||
static int wrapuptime;
|
static int wrapuptime;
|
||||||
static int ackcall;
|
static int ackcall;
|
||||||
|
static int endcall;
|
||||||
static int multiplelogin = 1;
|
static int multiplelogin = 1;
|
||||||
static int autologoffunavail = 0;
|
static int autologoffunavail = 0;
|
||||||
|
|
||||||
@@ -498,7 +499,7 @@ static struct ast_frame *agent_read(struct ast_channel *ast)
|
|||||||
p->acknowledged = 1;
|
p->acknowledged = 1;
|
||||||
ast_frfree(f);
|
ast_frfree(f);
|
||||||
f = &answer_frame;
|
f = &answer_frame;
|
||||||
} else if (f->subclass == '*') {
|
} else if (f->subclass == '*' && endcall) {
|
||||||
/* terminates call */
|
/* terminates call */
|
||||||
ast_frfree(f);
|
ast_frfree(f);
|
||||||
f = NULL;
|
f = NULL;
|
||||||
@@ -988,6 +989,7 @@ static int read_agent_config(void)
|
|||||||
autologoff = 0;
|
autologoff = 0;
|
||||||
wrapuptime = 0;
|
wrapuptime = 0;
|
||||||
ackcall = 0;
|
ackcall = 0;
|
||||||
|
endcall = 1;
|
||||||
cfg = ast_config_load(config);
|
cfg = ast_config_load(config);
|
||||||
if (!cfg) {
|
if (!cfg) {
|
||||||
ast_log(LOG_NOTICE, "No agent configuration found -- agent support disabled\n");
|
ast_log(LOG_NOTICE, "No agent configuration found -- agent support disabled\n");
|
||||||
@@ -1032,6 +1034,8 @@ static int read_agent_config(void)
|
|||||||
ackcall = 1;
|
ackcall = 1;
|
||||||
else
|
else
|
||||||
ackcall = 0;
|
ackcall = 0;
|
||||||
|
} else if (!strcasecmp(v->name, "endcall")) {
|
||||||
|
endcall = ast_true(v->value);
|
||||||
} else if (!strcasecmp(v->name, "wrapuptime")) {
|
} else if (!strcasecmp(v->name, "wrapuptime")) {
|
||||||
wrapuptime = atoi(v->value);
|
wrapuptime = atoi(v->value);
|
||||||
if (wrapuptime < 0)
|
if (wrapuptime < 0)
|
||||||
|
@@ -41,6 +41,11 @@ persistentagents=yes
|
|||||||
;
|
;
|
||||||
;ackcall=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
|
; Define wrapuptime. This is the minimum amount of time when
|
||||||
; after disconnecting before the caller can receive a new call
|
; after disconnecting before the caller can receive a new call
|
||||||
; note this is in milliseconds.
|
; note this is in milliseconds.
|
||||||
|
Reference in New Issue
Block a user