mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 19:16:15 +00:00
allows for configurable answer timeout on attended transfer
patch 0006763 with minor changes. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29766 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
2
CREDITS
2
CREDITS
@@ -79,6 +79,8 @@ Constantine Filin - major contributions to the Asterisk Realtime Architecture
|
|||||||
Steve Murphy - privacy support, $[ ] parser upgrade, AEL2 parser upgrade
|
Steve Murphy - privacy support, $[ ] parser upgrade, AEL2 parser upgrade
|
||||||
Claude Patry - bug fixes, feature enhancements, and bug marshalling
|
Claude Patry - bug fixes, feature enhancements, and bug marshalling
|
||||||
cpatry@gmail.com
|
cpatry@gmail.com
|
||||||
|
Miroslav Nachev, miro@space-comm.com COSMOS Software Enterprises, Ltd.
|
||||||
|
- for Variable for No Answer Timeout for Attended Transfer
|
||||||
|
|
||||||
=== OTHER CONTRIBUTIONS ===
|
=== OTHER CONTRIBUTIONS ===
|
||||||
John Todd - Monkey sounds and associated teletorture prompt
|
John Todd - Monkey sounds and associated teletorture prompt
|
||||||
|
@@ -26,6 +26,7 @@ context => parkedcalls ; Which context parked calls are in
|
|||||||
;pickupexten = *8 ; Configure the pickup extension. (default is *8)
|
;pickupexten = *8 ; Configure the pickup extension. (default is *8)
|
||||||
;featuredigittimeout = 500 ; Max time (ms) between digits for
|
;featuredigittimeout = 500 ; Max time (ms) between digits for
|
||||||
; feature activation (default is 500 ms)
|
; feature activation (default is 500 ms)
|
||||||
|
;atxfernoanswertimeout = 15 ; Timeout for answer on attended transfer default is 15 seconds.
|
||||||
|
|
||||||
[featuremap]
|
[featuremap]
|
||||||
;blindxfer => #1 ; Blind transfer (default is #)
|
;blindxfer => #1 ; Blind transfer (default is #)
|
||||||
|
@@ -70,6 +70,7 @@ static void FREE(void *ptr)
|
|||||||
#define DEFAULT_PARK_TIME 45000
|
#define DEFAULT_PARK_TIME 45000
|
||||||
#define DEFAULT_TRANSFER_DIGIT_TIMEOUT 3000
|
#define DEFAULT_TRANSFER_DIGIT_TIMEOUT 3000
|
||||||
#define DEFAULT_FEATURE_DIGIT_TIMEOUT 500
|
#define DEFAULT_FEATURE_DIGIT_TIMEOUT 500
|
||||||
|
#define DEFAULT_NOANSWER_TIMEOUT_ATTENDED_TRANSFER 15000
|
||||||
|
|
||||||
#define AST_MAX_WATCHERS 256
|
#define AST_MAX_WATCHERS 256
|
||||||
|
|
||||||
@@ -96,6 +97,8 @@ static int adsipark;
|
|||||||
static int transferdigittimeout;
|
static int transferdigittimeout;
|
||||||
static int featuredigittimeout;
|
static int featuredigittimeout;
|
||||||
|
|
||||||
|
static int atxfernoanswertimeout;
|
||||||
|
|
||||||
static char *registrar = "res_features"; /*!< Registrar for operations */
|
static char *registrar = "res_features"; /*!< Registrar for operations */
|
||||||
|
|
||||||
/* module and CLI command definitions */
|
/* module and CLI command definitions */
|
||||||
@@ -722,7 +725,7 @@ static int builtin_atxfer(struct ast_channel *chan, struct ast_channel *peer, st
|
|||||||
l = strlen(xferto);
|
l = strlen(xferto);
|
||||||
snprintf(xferto + l, sizeof(xferto) - l, "@%s/n", transferer_real_context); /* append context */
|
snprintf(xferto + l, sizeof(xferto) - l, "@%s/n", transferer_real_context); /* append context */
|
||||||
newchan = ast_feature_request_and_dial(transferer, "Local", ast_best_codec(transferer->nativeformats),
|
newchan = ast_feature_request_and_dial(transferer, "Local", ast_best_codec(transferer->nativeformats),
|
||||||
xferto, 15000, &outstate, transferer->cid.cid_num, transferer->cid.cid_name);
|
xferto, atxfernoanswertimeout, &outstate, transferer->cid.cid_num, transferer->cid.cid_name);
|
||||||
ast_indicate(transferer, -1);
|
ast_indicate(transferer, -1);
|
||||||
if (!newchan) {
|
if (!newchan) {
|
||||||
finishup(transferee);
|
finishup(transferee);
|
||||||
@@ -1986,6 +1989,7 @@ static int load_config(void)
|
|||||||
|
|
||||||
transferdigittimeout = DEFAULT_TRANSFER_DIGIT_TIMEOUT;
|
transferdigittimeout = DEFAULT_TRANSFER_DIGIT_TIMEOUT;
|
||||||
featuredigittimeout = DEFAULT_FEATURE_DIGIT_TIMEOUT;
|
featuredigittimeout = DEFAULT_FEATURE_DIGIT_TIMEOUT;
|
||||||
|
atxfernoanswertimeout = DEFAULT_NOANSWER_TIMEOUT_ATTENDED_TRANSFER;
|
||||||
|
|
||||||
cfg = ast_config_load("features.conf");
|
cfg = ast_config_load("features.conf");
|
||||||
if (cfg) {
|
if (cfg) {
|
||||||
@@ -2022,6 +2026,12 @@ static int load_config(void)
|
|||||||
ast_log(LOG_WARNING, "%s is not a valid featuredigittimeout\n", var->value);
|
ast_log(LOG_WARNING, "%s is not a valid featuredigittimeout\n", var->value);
|
||||||
featuredigittimeout = DEFAULT_FEATURE_DIGIT_TIMEOUT;
|
featuredigittimeout = DEFAULT_FEATURE_DIGIT_TIMEOUT;
|
||||||
}
|
}
|
||||||
|
} else if (!strcasecmp(var->name, "atxfernoanswertimeout")) {
|
||||||
|
if ((sscanf(var->value, "%d", &atxfernoanswertimeout) != 1) || (atxfernoanswertimeout < 1)) {
|
||||||
|
ast_log(LOG_WARNING, "%s is not a valid atxfernoanswertimeout\n", var->value);
|
||||||
|
atxfernoanswertimeout = DEFAULT_NOANSWER_TIMEOUT_ATTENDED_TRANSFER;
|
||||||
|
} else
|
||||||
|
atxfernoanswertimeout = atxfernoanswertimeout * 1000;
|
||||||
} else if (!strcasecmp(var->name, "courtesytone")) {
|
} else if (!strcasecmp(var->name, "courtesytone")) {
|
||||||
ast_copy_string(courtesytone, var->value, sizeof(courtesytone));
|
ast_copy_string(courtesytone, var->value, sizeof(courtesytone));
|
||||||
} else if (!strcasecmp(var->name, "parkedplay")) {
|
} else if (!strcasecmp(var->name, "parkedplay")) {
|
||||||
|
Reference in New Issue
Block a user