mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-14 16:33:34 +00:00
automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@61752 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -90,7 +90,10 @@ static char *descrip =
|
||||
"ends the call.\n"
|
||||
" The optional URL will be sent to the called party if the channel supports it.\n"
|
||||
" If the OUTBOUND_GROUP variable is set, all peer channels created by this\n"
|
||||
"application will be put into that group (as in Set(GROUP()=...).\n\n"
|
||||
"application will be put into that group (as in Set(GROUP()=...).\n"
|
||||
" If the OUTBOUND_GROUP_ONCE variable is set, all peer channels created by this\n"
|
||||
"application will be put into that group (as in Set(GROUP()=...). Unlike OUTBOUND_GROUP,\n"
|
||||
"however, the variable will be unset after use.\n\n"
|
||||
" Options:\n"
|
||||
" A(x) - Play an announcement to the called party, using 'x' as the file.\n"
|
||||
" C - Reset the CDR for this call.\n"
|
||||
@@ -1011,7 +1014,12 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
|
||||
*continue_exec = 0;
|
||||
|
||||
/* If a channel group has been specified, get it for use when we create peer channels */
|
||||
if ((outbound_group = pbx_builtin_getvar_helper(chan, "OUTBOUND_GROUP_ONCE"))) {
|
||||
outbound_group = ast_strdupa(outbound_group);
|
||||
pbx_builtin_setvar_helper(chan, "OUTBOUND_GROUP_ONCE", NULL);
|
||||
} else {
|
||||
outbound_group = pbx_builtin_getvar_helper(chan, "OUTBOUND_GROUP");
|
||||
}
|
||||
|
||||
ast_copy_flags(peerflags, &opts, OPT_DTMF_EXIT | OPT_GO_ON | OPT_ORIGINAL_CLID | OPT_CALLER_HANGUP);
|
||||
cur = args.peers;
|
||||
|
@@ -1990,7 +1990,7 @@ static struct localuser *wait_for_answer(struct queue_ent *qe, struct localuser
|
||||
ast_frfree(f);
|
||||
return NULL;
|
||||
}
|
||||
if ((f->frametype == AST_FRAME_DTMF) && (f->subclass != '*') && valid_exit(qe, f->subclass)) {
|
||||
if ((f->frametype == AST_FRAME_DTMF) && valid_exit(qe, f->subclass)) {
|
||||
if (option_verbose > 3)
|
||||
ast_verbose(VERBOSE_PREFIX_3 "User pressed digit: %c\n", f->subclass);
|
||||
*to=0;
|
||||
|
@@ -10298,6 +10298,7 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
|
||||
if ((resp >= 300) && (resp < 700)) {
|
||||
if ((option_verbose > 2) && (resp != 487))
|
||||
ast_verbose(VERBOSE_PREFIX_3 "Got SIP response %d \"%s\" back from %s\n", resp, rest, ast_inet_ntoa(iabuf, sizeof(iabuf), p->sa.sin_addr));
|
||||
if (sipmethod == SIP_INVITE) {
|
||||
if (p->rtp) {
|
||||
/* Immediately stop RTP */
|
||||
ast_rtp_stop(p->rtp);
|
||||
@@ -10306,6 +10307,7 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
|
||||
/* Immediately stop VRTP */
|
||||
ast_rtp_stop(p->vrtp);
|
||||
}
|
||||
}
|
||||
/* XXX Locking issues?? XXX */
|
||||
switch(resp) {
|
||||
case 300: /* Multiple Choices */
|
||||
@@ -10348,6 +10350,7 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
|
||||
/* ACK on invite */
|
||||
if (sipmethod == SIP_INVITE)
|
||||
transmit_request(p, SIP_ACK, seqno, 0, 0);
|
||||
if (sipmethod != SIP_MESSAGE && sipmethod != SIP_INFO)
|
||||
ast_set_flag(p, SIP_ALREADYGONE);
|
||||
if (!p->owner)
|
||||
ast_set_flag(p, SIP_NEEDDESTROY);
|
||||
@@ -11175,6 +11178,10 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req,
|
||||
ast_copy_string(p->context, p->subscribecontext, sizeof(p->context));
|
||||
else if (ast_strlen_zero(p->context))
|
||||
strcpy(p->context, default_context);
|
||||
|
||||
/* Get full contact header - this needs to be used as a request URI in NOTIFY's */
|
||||
parse_ok_contact(p, req);
|
||||
|
||||
/* Get destination right away */
|
||||
build_contact(p);
|
||||
if (gotdest) {
|
||||
|
@@ -42,6 +42,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
|
||||
static char *callerid_read(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
|
||||
{
|
||||
if (!chan)
|
||||
return "";
|
||||
|
||||
if (!strncasecmp("all", data, 3)) {
|
||||
snprintf(buf, len, "\"%s\" <%s>", chan->cid.cid_name ? chan->cid.cid_name : "", chan->cid.cid_num ? chan->cid.cid_num : "");
|
||||
} else if (!strncasecmp("name", data, 4)) {
|
||||
@@ -73,7 +76,7 @@ static char *callerid_read(struct ast_channel *chan, char *cmd, char *data, char
|
||||
|
||||
static void callerid_write(struct ast_channel *chan, char *cmd, char *data, const char *value)
|
||||
{
|
||||
if (!value)
|
||||
if (!value || !chan)
|
||||
return;
|
||||
|
||||
if (!strncasecmp("all", data, 3)) {
|
||||
|
@@ -44,7 +44,7 @@ static char *builtin_function_cdr_read(struct ast_channel *chan, char *cmd, char
|
||||
int argc;
|
||||
char *argv[2];
|
||||
int recursive = 0;
|
||||
struct ast_cdr *cdr = chan->cdr;
|
||||
struct ast_cdr *cdr = chan ? chan->cdr : NULL;
|
||||
|
||||
if (ast_strlen_zero(data))
|
||||
return NULL;
|
||||
@@ -78,7 +78,7 @@ static void builtin_function_cdr_write(struct ast_channel *chan, char *cmd, char
|
||||
char *argv[2];
|
||||
int recursive = 0;
|
||||
|
||||
if (ast_strlen_zero(data) || !value)
|
||||
if (ast_strlen_zero(data) || !value || !chan)
|
||||
return;
|
||||
|
||||
mydata = ast_strdupa(data);
|
||||
|
@@ -149,6 +149,9 @@ static char *group_list_function_read(struct ast_channel *chan, char *cmd, char
|
||||
char tmp1[1024] = "";
|
||||
char tmp2[1024] = "";
|
||||
|
||||
if (!chan)
|
||||
return "";
|
||||
|
||||
headp=&chan->varshead;
|
||||
AST_LIST_TRAVERSE(headp,current,entries) {
|
||||
if (!strncmp(ast_var_name(current), GROUP_CATEGORY_PREFIX "_", strlen(GROUP_CATEGORY_PREFIX) + 1)) {
|
||||
|
@@ -36,14 +36,14 @@
|
||||
|
||||
static char *builtin_function_language_read(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
|
||||
{
|
||||
ast_copy_string(buf, chan->language, len);
|
||||
ast_copy_string(buf, chan ? chan->language : "", len);
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
static void builtin_function_language_write(struct ast_channel *chan, char *cmd, char *data, const char *value)
|
||||
{
|
||||
if (value)
|
||||
if (chan && value)
|
||||
ast_copy_string(chan->language, value, sizeof(chan->language));
|
||||
}
|
||||
|
||||
|
@@ -32,13 +32,14 @@
|
||||
|
||||
static char *function_moh_read(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
|
||||
{
|
||||
ast_copy_string(buf, chan->musicclass, len);
|
||||
ast_copy_string(buf, chan ? chan->musicclass : "", len);
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
static void function_moh_write(struct ast_channel *chan, char *cmd, char *data, const char *value)
|
||||
{
|
||||
if (chan)
|
||||
ast_copy_string(chan->musicclass, value, sizeof(chan->musicclass));
|
||||
}
|
||||
|
||||
|
@@ -42,6 +42,9 @@ static char *builtin_function_timeout_read(struct ast_channel *chan, char *cmd,
|
||||
{
|
||||
time_t myt;
|
||||
|
||||
if (!chan)
|
||||
return "";
|
||||
|
||||
if (!data) {
|
||||
ast_log(LOG_ERROR, "Must specify type of timeout to get.\n");
|
||||
return NULL;
|
||||
@@ -86,6 +89,9 @@ static void builtin_function_timeout_write(struct ast_channel *chan, char *cmd,
|
||||
char timestr[64];
|
||||
struct tm myt;
|
||||
|
||||
if (!chan)
|
||||
return;
|
||||
|
||||
if (!data) {
|
||||
ast_log(LOG_ERROR, "Must specify type of timeout to set.\n");
|
||||
return;
|
||||
|
3
loader.c
3
loader.c
@@ -215,6 +215,8 @@ int ast_module_reload(const char *name)
|
||||
ast_verbose("The previous reload command didn't finish yet\n");
|
||||
return -1;
|
||||
}
|
||||
time(&ast_lastreloadtime);
|
||||
|
||||
if (!name || !strcasecmp(name, "extconfig")) {
|
||||
read_config_maps();
|
||||
reloaded = 2;
|
||||
@@ -239,7 +241,6 @@ int ast_module_reload(const char *name)
|
||||
dnsmgr_reload();
|
||||
reloaded = 2;
|
||||
}
|
||||
time(&ast_lastreloadtime);
|
||||
|
||||
ast_mutex_lock(&modlock);
|
||||
oldversion = modlistver;
|
||||
|
Reference in New Issue
Block a user