mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-20 08:40:16 +00:00
automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@8172 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -175,7 +175,8 @@ static int send_waveform_to_channel(struct ast_channel *chan, char *waveform, in
|
|||||||
if (chan->_state != AST_STATE_UP)
|
if (chan->_state != AST_STATE_UP)
|
||||||
ast_answer(chan);
|
ast_answer(chan);
|
||||||
ast_stopstream(chan);
|
ast_stopstream(chan);
|
||||||
|
ast_indicate(chan, -1);
|
||||||
|
|
||||||
owriteformat = chan->writeformat;
|
owriteformat = chan->writeformat;
|
||||||
res = ast_set_write_format(chan, AST_FORMAT_SLINEAR);
|
res = ast_set_write_format(chan, AST_FORMAT_SLINEAR);
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
|
|||||||
10
asterisk.c
10
asterisk.c
@@ -127,7 +127,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
|
|
||||||
/*! \brief Welcome message when starting a CLI interface */
|
/*! \brief Welcome message when starting a CLI interface */
|
||||||
#define WELCOME_MESSAGE \
|
#define WELCOME_MESSAGE \
|
||||||
ast_verbose("Asterisk " ASTERISK_VERSION ", Copyright (C) 1999 - 2005 Digium, Inc. and others.\n"); \
|
ast_verbose("Asterisk " ASTERISK_VERSION ", Copyright (C) 1999 - 2006 Digium, Inc. and others.\n"); \
|
||||||
ast_verbose("Created by Mark Spencer <markster@digium.com>\n"); \
|
ast_verbose("Created by Mark Spencer <markster@digium.com>\n"); \
|
||||||
ast_verbose("Asterisk comes with ABSOLUTELY NO WARRANTY; type 'show warranty' for details.\n"); \
|
ast_verbose("Asterisk comes with ABSOLUTELY NO WARRANTY; type 'show warranty' for details.\n"); \
|
||||||
ast_verbose("This is free software, with components licensed under the GNU General Public\n"); \
|
ast_verbose("This is free software, with components licensed under the GNU General Public\n"); \
|
||||||
@@ -2138,6 +2138,10 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (option_console && !option_verbose)
|
||||||
|
ast_verbose("[ Reading Master Configuration ]");
|
||||||
|
ast_readconfig();
|
||||||
|
|
||||||
if (option_dumpcore) {
|
if (option_dumpcore) {
|
||||||
struct rlimit l;
|
struct rlimit l;
|
||||||
memset(&l, 0, sizeof(l));
|
memset(&l, 0, sizeof(l));
|
||||||
@@ -2148,10 +2152,6 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (option_console && !option_verbose)
|
|
||||||
ast_verbose("[ Reading Master Configuration ]");
|
|
||||||
ast_readconfig();
|
|
||||||
|
|
||||||
if ((!rungroup) && !ast_strlen_zero(ast_config_AST_RUN_GROUP))
|
if ((!rungroup) && !ast_strlen_zero(ast_config_AST_RUN_GROUP))
|
||||||
rungroup = ast_config_AST_RUN_GROUP;
|
rungroup = ast_config_AST_RUN_GROUP;
|
||||||
if ((!runuser) && !ast_strlen_zero(ast_config_AST_RUN_USER))
|
if ((!runuser) && !ast_strlen_zero(ast_config_AST_RUN_USER))
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ static const char descrip2[] =
|
|||||||
static const char descrip3[] =
|
static const char descrip3[] =
|
||||||
" AgentMonitorOutgoing([options]):\n"
|
" AgentMonitorOutgoing([options]):\n"
|
||||||
"Tries to figure out the id of the agent who is placing outgoing call based on\n"
|
"Tries to figure out the id of the agent who is placing outgoing call based on\n"
|
||||||
"comparision of the callerid of the current interface and the global variable \n"
|
"comparison of the callerid of the current interface and the global variable \n"
|
||||||
"placed by the AgentCallbackLogin application. That's why it should be used only\n"
|
"placed by the AgentCallbackLogin application. That's why it should be used only\n"
|
||||||
"with the AgentCallbackLogin app. Uses the monitoring functions in chan_agent \n"
|
"with the AgentCallbackLogin app. Uses the monitoring functions in chan_agent \n"
|
||||||
"instead of Monitor application. That have to be configured in the agents.conf file.\n"
|
"instead of Monitor application. That have to be configured in the agents.conf file.\n"
|
||||||
@@ -144,7 +144,7 @@ static char moh[80] = "default";
|
|||||||
|
|
||||||
/** Persistent Agents astdb family */
|
/** Persistent Agents astdb family */
|
||||||
static const char pa_family[] = "/Agents";
|
static const char pa_family[] = "/Agents";
|
||||||
/** The maximum lengh of each persistent member agent database entry */
|
/** The maximum length of each persistent member agent database entry */
|
||||||
#define PA_MAX_LEN 2048
|
#define PA_MAX_LEN 2048
|
||||||
/** queues.conf [general] option */
|
/** queues.conf [general] option */
|
||||||
static int persistent_agents = 0;
|
static int persistent_agents = 0;
|
||||||
@@ -1051,7 +1051,7 @@ static int read_agent_config(void)
|
|||||||
urlprefix[0] = '\0';
|
urlprefix[0] = '\0';
|
||||||
savecallsin[0] = '\0';
|
savecallsin[0] = '\0';
|
||||||
|
|
||||||
/* Read in [general] section for persistance */
|
/* Read in [general] section for persistence */
|
||||||
if ((general_val = ast_variable_retrieve(cfg, "general", "persistentagents")))
|
if ((general_val = ast_variable_retrieve(cfg, "general", "persistentagents")))
|
||||||
persistent_agents = ast_true(general_val);
|
persistent_agents = ast_true(general_val);
|
||||||
|
|
||||||
@@ -1791,7 +1791,7 @@ static int __login_exec(struct ast_channel *chan, void *data, int callbackmode)
|
|||||||
gettimeofday(&p->lastdisc, NULL);
|
gettimeofday(&p->lastdisc, NULL);
|
||||||
p->lastdisc.tv_sec++;
|
p->lastdisc.tv_sec++;
|
||||||
|
|
||||||
/* Set Channel Specific Agent Overides */
|
/* Set Channel Specific Agent Overrides */
|
||||||
if (pbx_builtin_getvar_helper(chan, "AGENTACKCALL") && strlen(pbx_builtin_getvar_helper(chan, "AGENTACKCALL"))) {
|
if (pbx_builtin_getvar_helper(chan, "AGENTACKCALL") && strlen(pbx_builtin_getvar_helper(chan, "AGENTACKCALL"))) {
|
||||||
if (!strcasecmp(pbx_builtin_getvar_helper(chan, "AGENTACKCALL"), "always"))
|
if (!strcasecmp(pbx_builtin_getvar_helper(chan, "AGENTACKCALL"), "always"))
|
||||||
p->ackcall = 2;
|
p->ackcall = 2;
|
||||||
@@ -1819,7 +1819,7 @@ static int __login_exec(struct ast_channel *chan, void *data, int callbackmode)
|
|||||||
if (option_verbose > 2)
|
if (option_verbose > 2)
|
||||||
ast_verbose(VERBOSE_PREFIX_3 "Saw variable AGENTWRAPUPTIME=%s, setting wrapuptime to: %d for Agent '%s'.\n",tmpoptions,p->wrapuptime,p->agent);
|
ast_verbose(VERBOSE_PREFIX_3 "Saw variable AGENTWRAPUPTIME=%s, setting wrapuptime to: %d for Agent '%s'.\n",tmpoptions,p->wrapuptime,p->agent);
|
||||||
}
|
}
|
||||||
/* End Channel Specific Agent Overides */
|
/* End Channel Specific Agent Overrides */
|
||||||
if (!p->chan) {
|
if (!p->chan) {
|
||||||
char last_loginchan[80] = "";
|
char last_loginchan[80] = "";
|
||||||
long logintime;
|
long logintime;
|
||||||
@@ -2360,7 +2360,7 @@ static void reload_agents(void)
|
|||||||
}
|
}
|
||||||
ast_mutex_unlock(&agentlock);
|
ast_mutex_unlock(&agentlock);
|
||||||
if (db_tree) {
|
if (db_tree) {
|
||||||
ast_log(LOG_NOTICE, "Agents sucessfully reloaded from database.\n");
|
ast_log(LOG_NOTICE, "Agents successfully reloaded from database.\n");
|
||||||
ast_db_freetree(db_tree);
|
ast_db_freetree(db_tree);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2417,7 +2417,7 @@ static int agent_devicestate(void *data)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the Agents module.
|
* Initialize the Agents module.
|
||||||
* This funcion is being called by Asterisk when loading the module. Among other thing it registers applications, cli commands and reads the cofiguration file.
|
* This function is being called by Asterisk when loading the module. Among other thing it registers applications, cli commands and reads the cofiguration file.
|
||||||
*
|
*
|
||||||
* @returns int Always 0.
|
* @returns int Always 0.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -48,8 +48,12 @@ static char *function_fieldqty(struct ast_channel *chan, char *cmd, char *data,
|
|||||||
if (delim) {
|
if (delim) {
|
||||||
varname = strsep(&delim, "|");
|
varname = strsep(&delim, "|");
|
||||||
pbx_retrieve_variable(chan, varname, &varval, workspace, sizeof(workspace), NULL);
|
pbx_retrieve_variable(chan, varname, &varval, workspace, sizeof(workspace), NULL);
|
||||||
while (strsep(&varval, delim))
|
if (delim) {
|
||||||
fieldcount++;
|
while (strsep(&varval, delim))
|
||||||
|
fieldcount++;
|
||||||
|
} else if (!ast_strlen_zero(varval)) {
|
||||||
|
fieldcount = 1;
|
||||||
|
}
|
||||||
snprintf(buf, len, "%d", fieldcount);
|
snprintf(buf, len, "%d", fieldcount);
|
||||||
} else {
|
} else {
|
||||||
ast_log(LOG_ERROR, "Out of memory\n");
|
ast_log(LOG_ERROR, "Out of memory\n");
|
||||||
|
|||||||
2
loader.c
2
loader.c
@@ -457,8 +457,8 @@ static int ast_resource_exists(char *resource)
|
|||||||
static const char *loadorder[] =
|
static const char *loadorder[] =
|
||||||
{
|
{
|
||||||
"res_",
|
"res_",
|
||||||
"chan_",
|
|
||||||
"pbx_",
|
"pbx_",
|
||||||
|
"chan_",
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
8
logger.c
8
logger.c
@@ -461,8 +461,8 @@ int reload_logger(int rotate)
|
|||||||
|
|
||||||
filesize_reload_needed = 0;
|
filesize_reload_needed = 0;
|
||||||
|
|
||||||
queue_log_init();
|
|
||||||
init_logger_chain();
|
init_logger_chain();
|
||||||
|
queue_log_init();
|
||||||
|
|
||||||
if (logfiles.event_log) {
|
if (logfiles.event_log) {
|
||||||
if (eventlog) {
|
if (eventlog) {
|
||||||
@@ -589,12 +589,12 @@ int init_logger(void)
|
|||||||
ast_cli_register(&rotate_logger_cli);
|
ast_cli_register(&rotate_logger_cli);
|
||||||
ast_cli_register(&logger_show_channels_cli);
|
ast_cli_register(&logger_show_channels_cli);
|
||||||
|
|
||||||
/* initialize queue logger */
|
|
||||||
queue_log_init();
|
|
||||||
|
|
||||||
/* create log channels */
|
/* create log channels */
|
||||||
init_logger_chain();
|
init_logger_chain();
|
||||||
|
|
||||||
|
/* initialize queue logger */
|
||||||
|
queue_log_init();
|
||||||
|
|
||||||
/* create the eventlog */
|
/* create the eventlog */
|
||||||
if (logfiles.event_log) {
|
if (logfiles.event_log) {
|
||||||
mkdir((char *)ast_config_AST_LOG_DIR, 0755);
|
mkdir((char *)ast_config_AST_LOG_DIR, 0755);
|
||||||
|
|||||||
@@ -1280,10 +1280,12 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast
|
|||||||
if (!(monitor_app = pbx_findapp("Monitor")))
|
if (!(monitor_app = pbx_findapp("Monitor")))
|
||||||
monitor_ok=0;
|
monitor_ok=0;
|
||||||
}
|
}
|
||||||
if ((monitor_exec = pbx_builtin_getvar_helper(chan, "AUTO_MONITOR")))
|
if (monitor_app) {
|
||||||
pbx_exec(chan, monitor_app, monitor_exec, 1);
|
if ((monitor_exec = pbx_builtin_getvar_helper(chan, "AUTO_MONITOR")))
|
||||||
else if ((monitor_exec = pbx_builtin_getvar_helper(peer, "AUTO_MONITOR")))
|
pbx_exec(chan, monitor_app, monitor_exec, 1);
|
||||||
pbx_exec(peer, monitor_app, monitor_exec, 1);
|
else if ((monitor_exec = pbx_builtin_getvar_helper(peer, "AUTO_MONITOR")))
|
||||||
|
pbx_exec(peer, monitor_app, monitor_exec, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
set_config_flags(chan, peer, config);
|
set_config_flags(chan, peer, config);
|
||||||
|
|||||||
Reference in New Issue
Block a user