mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-25 15:08:53 +00:00
Completely remove all of the code related to jumping to priority n + 101. yay!
(issue #9926, caio1982) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@68970 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -49,7 +49,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
enum {
|
enum {
|
||||||
OPT_ACCOUNT = (1 << 0),
|
OPT_ACCOUNT = (1 << 0),
|
||||||
OPT_DATABASE = (1 << 1),
|
OPT_DATABASE = (1 << 1),
|
||||||
OPT_JUMP = (1 << 2),
|
|
||||||
OPT_MULTIPLE = (1 << 3),
|
OPT_MULTIPLE = (1 << 3),
|
||||||
OPT_REMOVE = (1 << 4),
|
OPT_REMOVE = (1 << 4),
|
||||||
} auth_option_flags;
|
} auth_option_flags;
|
||||||
@@ -57,7 +56,6 @@ enum {
|
|||||||
AST_APP_OPTIONS(auth_app_options, {
|
AST_APP_OPTIONS(auth_app_options, {
|
||||||
AST_APP_OPTION('a', OPT_ACCOUNT),
|
AST_APP_OPTION('a', OPT_ACCOUNT),
|
||||||
AST_APP_OPTION('d', OPT_DATABASE),
|
AST_APP_OPTION('d', OPT_DATABASE),
|
||||||
AST_APP_OPTION('j', OPT_JUMP),
|
|
||||||
AST_APP_OPTION('m', OPT_MULTIPLE),
|
AST_APP_OPTION('m', OPT_MULTIPLE),
|
||||||
AST_APP_OPTION('r', OPT_REMOVE),
|
AST_APP_OPTION('r', OPT_REMOVE),
|
||||||
});
|
});
|
||||||
@@ -73,13 +71,10 @@ static char *descrip =
|
|||||||
"begins with the '/' character, it is interpreted as a file which contains a list of\n"
|
"begins with the '/' character, it is interpreted as a file which contains a list of\n"
|
||||||
"valid passwords, listed 1 password per line in the file.\n"
|
"valid passwords, listed 1 password per line in the file.\n"
|
||||||
" When using a database key, the value associated with the key can be anything.\n"
|
" When using a database key, the value associated with the key can be anything.\n"
|
||||||
"Users have three attempts to authenticate before the channel is hung up. If the\n"
|
"Users have three attempts to authenticate before the channel is hung up.\n"
|
||||||
"passsword is invalid, the 'j' option is specified, and priority n+101 exists,\n"
|
|
||||||
"dialplan execution will continnue at this location.\n"
|
|
||||||
" Options:\n"
|
" Options:\n"
|
||||||
" a - Set the channels' account code to the password that is entered\n"
|
" a - Set the channels' account code to the password that is entered\n"
|
||||||
" d - Interpret the given path as database key, not a literal file\n"
|
" d - Interpret the given path as database key, not a literal file\n"
|
||||||
" j - Support jumping to n+101 if authentication fails\n"
|
|
||||||
" m - Interpret the given path as a file which contains a list of account\n"
|
" m - Interpret the given path as a file which contains a list of account\n"
|
||||||
" codes and password hashes delimited with ':', listed one per line in\n"
|
" codes and password hashes delimited with ':', listed one per line in\n"
|
||||||
" the file. When one of the passwords is matched, the channel will have\n"
|
" the file. When one of the passwords is matched, the channel will have\n"
|
||||||
@@ -217,15 +212,11 @@ static int auth_exec(struct ast_channel *chan, void *data)
|
|||||||
res = ast_streamfile(chan, "auth-thankyou", chan->language);
|
res = ast_streamfile(chan, "auth-thankyou", chan->language);
|
||||||
if (!res)
|
if (!res)
|
||||||
res = ast_waitstream(chan, "");
|
res = ast_waitstream(chan, "");
|
||||||
} else {
|
|
||||||
if (ast_test_flag(&flags,OPT_JUMP) && ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101) == 0) {
|
|
||||||
res = 0;
|
|
||||||
} else {
|
} else {
|
||||||
if (!ast_streamfile(chan, "vm-goodbye", chan->language))
|
if (!ast_streamfile(chan, "vm-goodbye", chan->language))
|
||||||
res = ast_waitstream(chan, "");
|
res = ast_waitstream(chan, "");
|
||||||
res = -1;
|
res = -1;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
ast_module_user_remove(u);
|
ast_module_user_remove(u);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@@ -62,13 +62,12 @@ static char *descrip =
|
|||||||
" Options:\n"
|
" Options:\n"
|
||||||
" s - Consider the channel unavailable if the channel is in use at all\n"
|
" s - Consider the channel unavailable if the channel is in use at all\n"
|
||||||
" t - Simply checks if specified channels exist in the channel list\n"
|
" t - Simply checks if specified channels exist in the channel list\n"
|
||||||
" (implies option s) \n"
|
" (implies option s) \n";
|
||||||
" j - Support jumping to priority n+101 if no channel is available\n";
|
|
||||||
|
|
||||||
|
|
||||||
static int chanavail_exec(struct ast_channel *chan, void *data)
|
static int chanavail_exec(struct ast_channel *chan, void *data)
|
||||||
{
|
{
|
||||||
int res=-1, inuse=-1, option_state=0, priority_jump=0, string_compare=0;
|
int res=-1, inuse=-1, option_state=0, string_compare=0;
|
||||||
int status;
|
int status;
|
||||||
struct ast_module_user *u;
|
struct ast_module_user *u;
|
||||||
char *info, tmp[512], trychan[512], *peers, *tech, *number, *rest, *cur;
|
char *info, tmp[512], trychan[512], *peers, *tech, *number, *rest, *cur;
|
||||||
@@ -94,8 +93,6 @@ static int chanavail_exec(struct ast_channel *chan, void *data)
|
|||||||
option_state = 1;
|
option_state = 1;
|
||||||
if (strchr(args.options, 't'))
|
if (strchr(args.options, 't'))
|
||||||
string_compare = 1;
|
string_compare = 1;
|
||||||
if (strchr(args.options, 'j'))
|
|
||||||
priority_jump = 1;
|
|
||||||
}
|
}
|
||||||
peers = args.reqchans;
|
peers = args.reqchans;
|
||||||
if (peers) {
|
if (peers) {
|
||||||
@@ -152,12 +149,6 @@ static int chanavail_exec(struct ast_channel *chan, void *data)
|
|||||||
if (res < 1) {
|
if (res < 1) {
|
||||||
pbx_builtin_setvar_helper(chan, "AVAILCHAN", "");
|
pbx_builtin_setvar_helper(chan, "AVAILCHAN", "");
|
||||||
pbx_builtin_setvar_helper(chan, "AVAILORIGCHAN", "");
|
pbx_builtin_setvar_helper(chan, "AVAILORIGCHAN", "");
|
||||||
if (priority_jump || ast_opt_priority_jumping) {
|
|
||||||
if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101)) {
|
|
||||||
ast_module_user_remove(u);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ast_module_user_remove(u);
|
ast_module_user_remove(u);
|
||||||
|
@@ -61,7 +61,6 @@ static const char *descrip =
|
|||||||
" pause - Pause playback when this DTMF digit is received.\n"
|
" pause - Pause playback when this DTMF digit is received.\n"
|
||||||
" restart - Restart playback when this DTMF digit is received.\n"
|
" restart - Restart playback when this DTMF digit is received.\n"
|
||||||
"Options:\n"
|
"Options:\n"
|
||||||
" j - Jump to priority n+101 if the requested file is not found.\n"
|
|
||||||
" o(#) - Start at # ms from the beginning of the file.\n"
|
" o(#) - Start at # ms from the beginning of the file.\n"
|
||||||
"This application sets the following channel variables upon completion:\n"
|
"This application sets the following channel variables upon completion:\n"
|
||||||
" CPLAYBACKSTATUS - This variable contains the status of the attempt as a text\n"
|
" CPLAYBACKSTATUS - This variable contains the status of the attempt as a text\n"
|
||||||
@@ -70,7 +69,6 @@ static const char *descrip =
|
|||||||
" playback was at when it stopped. -1 is end of file.\n";
|
" playback was at when it stopped. -1 is end of file.\n";
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
OPT_JUMP = (1 << 0),
|
|
||||||
OPT_OFFSET = (1 << 1),
|
OPT_OFFSET = (1 << 1),
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -81,7 +79,6 @@ enum {
|
|||||||
};
|
};
|
||||||
|
|
||||||
AST_APP_OPTIONS(cpb_opts, BEGIN_OPTIONS
|
AST_APP_OPTIONS(cpb_opts, BEGIN_OPTIONS
|
||||||
AST_APP_OPTION('j', OPT_JUMP),
|
|
||||||
AST_APP_OPTION_ARG('o', OPT_OFFSET, OPT_ARG_OFFSET),
|
AST_APP_OPTION_ARG('o', OPT_OFFSET, OPT_ARG_OFFSET),
|
||||||
END_OPTIONS );
|
END_OPTIONS );
|
||||||
|
|
||||||
@@ -159,11 +156,6 @@ static int controlplayback_exec(struct ast_channel *chan, void *data)
|
|||||||
pbx_builtin_setvar_helper(chan, "CPLAYBACKSTATUS", "USERSTOPPED");
|
pbx_builtin_setvar_helper(chan, "CPLAYBACKSTATUS", "USERSTOPPED");
|
||||||
} else {
|
} else {
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
if (ast_test_flag(&opts, OPT_JUMP) || ast_opt_priority_jumping) {
|
|
||||||
if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101)) {
|
|
||||||
ast_log(LOG_WARNING, "ControlPlayback tried to jump to priority n+101 as requested, but priority didn't exist\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
res = 0;
|
res = 0;
|
||||||
pbx_builtin_setvar_helper(chan, "CPLAYBACKSTATUS", "ERROR");
|
pbx_builtin_setvar_helper(chan, "CPLAYBACKSTATUS", "ERROR");
|
||||||
} else
|
} else
|
||||||
|
@@ -123,7 +123,6 @@ static char *descrip =
|
|||||||
" H - Allow the calling party to hang up by hitting the '*' DTMF digit.\n"
|
" H - Allow the calling party to hang up by hitting the '*' DTMF digit.\n"
|
||||||
" i - Asterisk will ignore any forwarding requests it may receive on this\n"
|
" i - Asterisk will ignore any forwarding requests it may receive on this\n"
|
||||||
" dial attempt.\n"
|
" dial attempt.\n"
|
||||||
" j - Jump to priority n+101 if all of the requested channels were busy.\n"
|
|
||||||
" L(x[:y][:z]) - Limit the call to 'x' ms. Play a warning when 'y' ms are\n"
|
" L(x[:y][:z]) - Limit the call to 'x' ms. Play a warning when 'y' ms are\n"
|
||||||
" left. Repeat the warning every 'z' ms. The following special\n"
|
" left. Repeat the warning every 'z' ms. The following special\n"
|
||||||
" variables can be used with this option:\n"
|
" variables can be used with this option:\n"
|
||||||
@@ -145,9 +144,7 @@ static char *descrip =
|
|||||||
" finished executing.\n"
|
" finished executing.\n"
|
||||||
" * ABORT Hangup both legs of the call.\n"
|
" * ABORT Hangup both legs of the call.\n"
|
||||||
" * CONGESTION Behave as if line congestion was encountered.\n"
|
" * CONGESTION Behave as if line congestion was encountered.\n"
|
||||||
" * BUSY Behave as if a busy signal was encountered. This will also\n"
|
" * BUSY Behave as if a busy signal was encountered.\n"
|
||||||
" have the application jump to priority n+101 if the\n"
|
|
||||||
" 'j' option is set.\n"
|
|
||||||
" * CONTINUE Hangup the called party and allow the calling party\n"
|
" * CONTINUE Hangup the called party and allow the calling party\n"
|
||||||
" to continue dialplan execution at the next priority.\n"
|
" to continue dialplan execution at the next priority.\n"
|
||||||
" * GOTO:<context>^<exten>^<priority> - Transfer the call to the\n"
|
" * GOTO:<context>^<exten>^<priority> - Transfer the call to the\n"
|
||||||
@@ -221,7 +218,6 @@ enum {
|
|||||||
OPT_GO_ON = (1 << 5),
|
OPT_GO_ON = (1 << 5),
|
||||||
OPT_CALLEE_HANGUP = (1 << 6),
|
OPT_CALLEE_HANGUP = (1 << 6),
|
||||||
OPT_CALLER_HANGUP = (1 << 7),
|
OPT_CALLER_HANGUP = (1 << 7),
|
||||||
OPT_PRIORITY_JUMP = (1 << 8),
|
|
||||||
OPT_DURATION_LIMIT = (1 << 9),
|
OPT_DURATION_LIMIT = (1 << 9),
|
||||||
OPT_MUSICBACK = (1 << 10),
|
OPT_MUSICBACK = (1 << 10),
|
||||||
OPT_CALLEE_MACRO = (1 << 11),
|
OPT_CALLEE_MACRO = (1 << 11),
|
||||||
@@ -271,7 +267,6 @@ AST_APP_OPTIONS(dial_exec_options, {
|
|||||||
AST_APP_OPTION('h', OPT_CALLEE_HANGUP),
|
AST_APP_OPTION('h', OPT_CALLEE_HANGUP),
|
||||||
AST_APP_OPTION('H', OPT_CALLER_HANGUP),
|
AST_APP_OPTION('H', OPT_CALLER_HANGUP),
|
||||||
AST_APP_OPTION('i', OPT_IGNORE_FORWARDING),
|
AST_APP_OPTION('i', OPT_IGNORE_FORWARDING),
|
||||||
AST_APP_OPTION('j', OPT_PRIORITY_JUMP),
|
|
||||||
AST_APP_OPTION_ARG('L', OPT_DURATION_LIMIT, OPT_ARG_DURATION_LIMIT),
|
AST_APP_OPTION_ARG('L', OPT_DURATION_LIMIT, OPT_ARG_DURATION_LIMIT),
|
||||||
AST_APP_OPTION_ARG('m', OPT_MUSICBACK, OPT_ARG_MUSICBACK),
|
AST_APP_OPTION_ARG('m', OPT_MUSICBACK, OPT_ARG_MUSICBACK),
|
||||||
AST_APP_OPTION_ARG('M', OPT_CALLEE_MACRO, OPT_ARG_CALLEE_MACRO),
|
AST_APP_OPTION_ARG('M', OPT_CALLEE_MACRO, OPT_ARG_CALLEE_MACRO),
|
||||||
@@ -532,7 +527,7 @@ struct privacy_args {
|
|||||||
static struct ast_channel *wait_for_answer(struct ast_channel *in,
|
static struct ast_channel *wait_for_answer(struct ast_channel *in,
|
||||||
struct chanlist *outgoing, int *to, struct ast_flags *peerflags,
|
struct chanlist *outgoing, int *to, struct ast_flags *peerflags,
|
||||||
struct privacy_args *pa,
|
struct privacy_args *pa,
|
||||||
const struct cause_args *num_in, int priority_jump, int *result)
|
const struct cause_args *num_in, int *result)
|
||||||
{
|
{
|
||||||
struct cause_args num = *num_in;
|
struct cause_args num = *num_in;
|
||||||
int prestart = num.busy + num.congestion + num.nochan;
|
int prestart = num.busy + num.congestion + num.nochan;
|
||||||
@@ -573,8 +568,6 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
|
|||||||
strcpy(pa->status, "CONGESTION");
|
strcpy(pa->status, "CONGESTION");
|
||||||
else if (num.nochan)
|
else if (num.nochan)
|
||||||
strcpy(pa->status, "CHANUNAVAIL");
|
strcpy(pa->status, "CHANUNAVAIL");
|
||||||
if (ast_opt_priority_jumping || priority_jump)
|
|
||||||
ast_goto_if_exists(in, in->context, in->exten, in->priority + 101);
|
|
||||||
} else {
|
} else {
|
||||||
if (option_verbose > 2)
|
if (option_verbose > 2)
|
||||||
ast_verbose(VERBOSE_PREFIX_3 "No one is available to answer at this time (%d:%d/%d/%d)\n", numlines, num.busy, num.congestion, num.nochan);
|
ast_verbose(VERBOSE_PREFIX_3 "No one is available to answer at this time (%d:%d/%d/%d)\n", numlines, num.busy, num.congestion, num.nochan);
|
||||||
@@ -1125,15 +1118,9 @@ static int setup_privacy_args(struct privacy_args *pa,
|
|||||||
return 0;
|
return 0;
|
||||||
} else if (pa->privdb_val == AST_PRIVACY_KILL ) {
|
} else if (pa->privdb_val == AST_PRIVACY_KILL ) {
|
||||||
ast_copy_string(pa->status, "DONTCALL", sizeof(pa->status));
|
ast_copy_string(pa->status, "DONTCALL", sizeof(pa->status));
|
||||||
if (ast_opt_priority_jumping || ast_test_flag(opts, OPT_PRIORITY_JUMP)) {
|
|
||||||
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 201);
|
|
||||||
}
|
|
||||||
return 0; /* Is this right? */
|
return 0; /* Is this right? */
|
||||||
} else if (pa->privdb_val == AST_PRIVACY_TORTURE ) {
|
} else if (pa->privdb_val == AST_PRIVACY_TORTURE ) {
|
||||||
ast_copy_string(pa->status, "TORTURE", sizeof(pa->status));
|
ast_copy_string(pa->status, "TORTURE", sizeof(pa->status));
|
||||||
if (ast_opt_priority_jumping || ast_test_flag(opts, OPT_PRIORITY_JUMP)) {
|
|
||||||
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 301);
|
|
||||||
}
|
|
||||||
return 0; /* is this right??? */
|
return 0; /* is this right??? */
|
||||||
} else if (pa->privdb_val == AST_PRIVACY_UNKNOWN ) {
|
} else if (pa->privdb_val == AST_PRIVACY_UNKNOWN ) {
|
||||||
/* Get the user's intro, store it in priv-callerintros/$CID,
|
/* Get the user's intro, store it in priv-callerintros/$CID,
|
||||||
@@ -1490,7 +1477,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
|
|||||||
}
|
}
|
||||||
|
|
||||||
time(&start_time);
|
time(&start_time);
|
||||||
peer = wait_for_answer(chan, outgoing, &to, peerflags, &pa, &num, ast_test_flag(&opts, OPT_PRIORITY_JUMP), &result);
|
peer = wait_for_answer(chan, outgoing, &to, peerflags, &pa, &num, &result);
|
||||||
|
|
||||||
if (!peer) {
|
if (!peer) {
|
||||||
if (result) {
|
if (result) {
|
||||||
@@ -1600,11 +1587,6 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
|
|||||||
|
|
||||||
if (!strcasecmp(macro_result, "BUSY")) {
|
if (!strcasecmp(macro_result, "BUSY")) {
|
||||||
ast_copy_string(pa.status, macro_result, sizeof(pa.status));
|
ast_copy_string(pa.status, macro_result, sizeof(pa.status));
|
||||||
if (ast_opt_priority_jumping || ast_test_flag(&opts, OPT_PRIORITY_JUMP)) {
|
|
||||||
if (!ast_goto_if_exists(chan, NULL, NULL, chan->priority + 101)) {
|
|
||||||
ast_set_flag(peerflags, OPT_GO_ON);
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
ast_set_flag(peerflags, OPT_GO_ON);
|
ast_set_flag(peerflags, OPT_GO_ON);
|
||||||
res = -1;
|
res = -1;
|
||||||
} else if (!strcasecmp(macro_result, "CONGESTION") || !strcasecmp(macro_result, "CHANUNAVAIL")) {
|
} else if (!strcasecmp(macro_result, "CONGESTION") || !strcasecmp(macro_result, "CHANUNAVAIL")) {
|
||||||
|
@@ -53,8 +53,6 @@ static char *descrip =
|
|||||||
"If the channel supports image transport but the image send\n"
|
"If the channel supports image transport but the image send\n"
|
||||||
"fails, the channel will be hung up. Otherwise, the dialplan\n"
|
"fails, the channel will be hung up. Otherwise, the dialplan\n"
|
||||||
"continues execution.\n"
|
"continues execution.\n"
|
||||||
"The option string may contain the following character:\n"
|
|
||||||
" 'j' -- jump to priority n+101 if the channel doesn't support image transport\n"
|
|
||||||
"This application sets the following channel variable upon completion:\n"
|
"This application sets the following channel variable upon completion:\n"
|
||||||
" SENDIMAGESTATUS The status is the result of the attempt as a text string, one of\n"
|
" SENDIMAGESTATUS The status is the result of the attempt as a text string, one of\n"
|
||||||
" OK | NOSUPPORT \n";
|
" OK | NOSUPPORT \n";
|
||||||
@@ -65,7 +63,6 @@ static int sendimage_exec(struct ast_channel *chan, void *data)
|
|||||||
int res = 0;
|
int res = 0;
|
||||||
struct ast_module_user *u;
|
struct ast_module_user *u;
|
||||||
char *parse;
|
char *parse;
|
||||||
int priority_jump = 0;
|
|
||||||
AST_DECLARE_APP_ARGS(args,
|
AST_DECLARE_APP_ARGS(args,
|
||||||
AST_APP_ARG(filename);
|
AST_APP_ARG(filename);
|
||||||
AST_APP_ARG(options);
|
AST_APP_ARG(options);
|
||||||
@@ -83,14 +80,10 @@ static int sendimage_exec(struct ast_channel *chan, void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (args.options) {
|
if (args.options) {
|
||||||
if (strchr(args.options, 'j'))
|
|
||||||
priority_jump = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ast_supports_images(chan)) {
|
if (!ast_supports_images(chan)) {
|
||||||
/* Does not support transport */
|
/* Does not support transport */
|
||||||
if (priority_jump || ast_opt_priority_jumping)
|
|
||||||
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
|
|
||||||
pbx_builtin_setvar_helper(chan, "SENDIMAGESTATUS", "NOSUPPORT");
|
pbx_builtin_setvar_helper(chan, "SENDIMAGESTATUS", "NOSUPPORT");
|
||||||
ast_module_user_remove(u);
|
ast_module_user_remove(u);
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -1803,7 +1803,6 @@ static int minivm_record_exec(struct ast_channel *chan, void *data)
|
|||||||
|
|
||||||
if (res == ERROR_LOCK_PATH) {
|
if (res == ERROR_LOCK_PATH) {
|
||||||
ast_log(LOG_ERROR, "Could not leave voicemail. The path is already locked.\n");
|
ast_log(LOG_ERROR, "Could not leave voicemail. The path is already locked.\n");
|
||||||
/* Send the call to n+101 priority, where n is the current priority*/
|
|
||||||
pbx_builtin_setvar_helper(chan, "MINIVM_RECORD_STATUS", "FAILED");
|
pbx_builtin_setvar_helper(chan, "MINIVM_RECORD_STATUS", "FAILED");
|
||||||
res = 0;
|
res = 0;
|
||||||
}
|
}
|
||||||
|
@@ -1316,7 +1316,6 @@ static int ospauth_exec(
|
|||||||
int res;
|
int res;
|
||||||
struct ast_module_user* u;
|
struct ast_module_user* u;
|
||||||
const char* provider = OSP_DEF_PROVIDER;
|
const char* provider = OSP_DEF_PROVIDER;
|
||||||
int priority_jump = 0;
|
|
||||||
struct varshead* headp;
|
struct varshead* headp;
|
||||||
struct ast_var_t* current;
|
struct ast_var_t* current;
|
||||||
const char* source = "";
|
const char* source = "";
|
||||||
@@ -1348,11 +1347,7 @@ static int ospauth_exec(
|
|||||||
if (option_debug)
|
if (option_debug)
|
||||||
ast_log(LOG_DEBUG, "OSPAuth: provider '%s'\n", provider);
|
ast_log(LOG_DEBUG, "OSPAuth: provider '%s'\n", provider);
|
||||||
|
|
||||||
if ((args.options) && (strchr(args.options, 'j'))) {
|
|
||||||
priority_jump = 1;
|
|
||||||
}
|
}
|
||||||
if (option_debug)
|
|
||||||
ast_log(LOG_DEBUG, "OSPAuth: priority jump '%d'\n", priority_jump);
|
|
||||||
|
|
||||||
headp = &chan->varshead;
|
headp = &chan->varshead;
|
||||||
AST_LIST_TRAVERSE(headp, current, entries) {
|
AST_LIST_TRAVERSE(headp, current, entries) {
|
||||||
@@ -1392,12 +1387,7 @@ static int ospauth_exec(
|
|||||||
ast_log(LOG_DEBUG, "OSPAuth: %s\n", status);
|
ast_log(LOG_DEBUG, "OSPAuth: %s\n", status);
|
||||||
|
|
||||||
if(res <= 0) {
|
if(res <= 0) {
|
||||||
if (priority_jump || ast_opt_priority_jumping) {
|
|
||||||
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
|
|
||||||
res = 0;
|
|
||||||
} else {
|
|
||||||
res = -1;
|
res = -1;
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
res = 0;
|
res = 0;
|
||||||
}
|
}
|
||||||
@@ -1420,7 +1410,6 @@ static int osplookup_exec(
|
|||||||
int res, cres;
|
int res, cres;
|
||||||
struct ast_module_user* u;
|
struct ast_module_user* u;
|
||||||
const char* provider = OSP_DEF_PROVIDER;
|
const char* provider = OSP_DEF_PROVIDER;
|
||||||
int priority_jump = 0;
|
|
||||||
struct varshead* headp;
|
struct varshead* headp;
|
||||||
struct ast_var_t* current;
|
struct ast_var_t* current;
|
||||||
const char* srcdev = "";
|
const char* srcdev = "";
|
||||||
@@ -1462,9 +1451,6 @@ static int osplookup_exec(
|
|||||||
ast_log(LOG_DEBUG, "OSPlookup: provider '%s'\n", provider);
|
ast_log(LOG_DEBUG, "OSPlookup: provider '%s'\n", provider);
|
||||||
|
|
||||||
if (args.options) {
|
if (args.options) {
|
||||||
if (strchr(args.options, 'j')) {
|
|
||||||
priority_jump = 1;
|
|
||||||
}
|
|
||||||
if (strchr(args.options, 'h')) {
|
if (strchr(args.options, 'h')) {
|
||||||
callidtypes |= OSP_CALLID_H323;
|
callidtypes |= OSP_CALLID_H323;
|
||||||
}
|
}
|
||||||
@@ -1476,7 +1462,6 @@ static int osplookup_exec(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (option_debug) {
|
if (option_debug) {
|
||||||
ast_log(LOG_DEBUG, "OSPLookup: priority jump '%d'\n", priority_jump);
|
|
||||||
ast_log(LOG_DEBUG, "OSPLookup: call id types '%d'\n", callidtypes);
|
ast_log(LOG_DEBUG, "OSPLookup: call id types '%d'\n", callidtypes);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1595,12 +1580,7 @@ static int osplookup_exec(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(res <= 0) {
|
if(res <= 0) {
|
||||||
if (priority_jump || ast_opt_priority_jumping) {
|
|
||||||
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
|
|
||||||
res = 0;
|
|
||||||
} else {
|
|
||||||
res = -1;
|
res = -1;
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
res = 0;
|
res = 0;
|
||||||
}
|
}
|
||||||
@@ -1623,7 +1603,6 @@ static int ospnext_exec(
|
|||||||
int res;
|
int res;
|
||||||
struct ast_module_user* u;
|
struct ast_module_user* u;
|
||||||
const char* provider = OSP_DEF_PROVIDER;
|
const char* provider = OSP_DEF_PROVIDER;
|
||||||
int priority_jump = 0;
|
|
||||||
int cause = 0;
|
int cause = 0;
|
||||||
struct varshead* headp;
|
struct varshead* headp;
|
||||||
struct ast_var_t* current;
|
struct ast_var_t* current;
|
||||||
@@ -1666,12 +1645,6 @@ static int ospnext_exec(
|
|||||||
if (option_debug)
|
if (option_debug)
|
||||||
ast_log(LOG_DEBUG, "OSPlookup: provider '%s'\n", provider);
|
ast_log(LOG_DEBUG, "OSPlookup: provider '%s'\n", provider);
|
||||||
|
|
||||||
if ((args.options) && (strchr(args.options, 'j'))) {
|
|
||||||
priority_jump = 1;
|
|
||||||
}
|
|
||||||
if (option_debug)
|
|
||||||
ast_log(LOG_DEBUG, "OSPNext: priority jump '%d'\n", priority_jump);
|
|
||||||
|
|
||||||
result.inhandle = OSP_INVALID_HANDLE;
|
result.inhandle = OSP_INVALID_HANDLE;
|
||||||
result.outhandle = OSP_INVALID_HANDLE;
|
result.outhandle = OSP_INVALID_HANDLE;
|
||||||
result.intimelimit = OSP_DEF_TIMELIMIT;
|
result.intimelimit = OSP_DEF_TIMELIMIT;
|
||||||
@@ -1780,12 +1753,7 @@ static int ospnext_exec(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(res <= 0) {
|
if(res <= 0) {
|
||||||
if (priority_jump || ast_opt_priority_jumping) {
|
|
||||||
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
|
|
||||||
res = 0;
|
|
||||||
} else {
|
|
||||||
res = -1;
|
res = -1;
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
res = 0;
|
res = 0;
|
||||||
}
|
}
|
||||||
@@ -1807,7 +1775,6 @@ static int ospfinished_exec(
|
|||||||
{
|
{
|
||||||
int res = 1;
|
int res = 1;
|
||||||
struct ast_module_user* u;
|
struct ast_module_user* u;
|
||||||
int priority_jump = 0;
|
|
||||||
int cause = 0;
|
int cause = 0;
|
||||||
struct varshead* headp;
|
struct varshead* headp;
|
||||||
struct ast_var_t* current;
|
struct ast_var_t* current;
|
||||||
@@ -1835,12 +1802,6 @@ static int ospfinished_exec(
|
|||||||
|
|
||||||
AST_STANDARD_APP_ARGS(args, tmp);
|
AST_STANDARD_APP_ARGS(args, tmp);
|
||||||
|
|
||||||
if ((args.options) && (strchr(args.options, 'j'))) {
|
|
||||||
priority_jump = 1;
|
|
||||||
}
|
|
||||||
if (option_debug)
|
|
||||||
ast_log(LOG_DEBUG, "OSPFinish: priority jump '%d'\n", priority_jump);
|
|
||||||
|
|
||||||
headp = &chan->varshead;
|
headp = &chan->varshead;
|
||||||
AST_LIST_TRAVERSE(headp, current, entries) {
|
AST_LIST_TRAVERSE(headp, current, entries) {
|
||||||
if (!strcasecmp(ast_var_name(current), "OSPINHANDLE")) {
|
if (!strcasecmp(ast_var_name(current), "OSPINHANDLE")) {
|
||||||
@@ -1923,12 +1884,7 @@ static int ospfinished_exec(
|
|||||||
pbx_builtin_setvar_helper(chan, "OSPFINISHSTATUS", status);
|
pbx_builtin_setvar_helper(chan, "OSPFINISHSTATUS", status);
|
||||||
|
|
||||||
if(!res) {
|
if(!res) {
|
||||||
if (priority_jump || ast_opt_priority_jumping) {
|
|
||||||
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
|
|
||||||
res = 0;
|
|
||||||
} else {
|
|
||||||
res = -1;
|
res = -1;
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
res = 0;
|
res = 0;
|
||||||
}
|
}
|
||||||
@@ -2106,8 +2062,6 @@ static const char* descrip1 =
|
|||||||
" ${OSPINHANDLE}: The inbound call transaction handle\n"
|
" ${OSPINHANDLE}: The inbound call transaction handle\n"
|
||||||
" ${OSPINTIMELIMIT}: The inbound call duration limit in seconds\n"
|
" ${OSPINTIMELIMIT}: The inbound call duration limit in seconds\n"
|
||||||
"\n"
|
"\n"
|
||||||
"The option string may contain the following character:\n"
|
|
||||||
" 'j' -- jump to n+101 priority if the authentication was NOT successful\n"
|
|
||||||
"This application sets the following channel variable upon completion:\n"
|
"This application sets the following channel variable upon completion:\n"
|
||||||
" OSPAUTHSTATUS The status of the OSP Auth attempt as a text string, one of\n"
|
" OSPAUTHSTATUS The status of the OSP Auth attempt as a text string, one of\n"
|
||||||
" SUCCESS | FAILED | ERROR\n";
|
" SUCCESS | FAILED | ERROR\n";
|
||||||
@@ -2130,7 +2084,6 @@ static const char* descrip2 =
|
|||||||
" ${OSPRESULTS}: The number of OSP results total remaining\n"
|
" ${OSPRESULTS}: The number of OSP results total remaining\n"
|
||||||
"\n"
|
"\n"
|
||||||
"The option string may contain the following character:\n"
|
"The option string may contain the following character:\n"
|
||||||
" 'j' -- jump to n+101 priority if the lookup was NOT successful\n"
|
|
||||||
" 'h' -- generate H323 call id for the outbound call\n"
|
" 'h' -- generate H323 call id for the outbound call\n"
|
||||||
" 's' -- generate SIP call id for the outbound call. Have not been implemented\n"
|
" 's' -- generate SIP call id for the outbound call. Have not been implemented\n"
|
||||||
" 'i' -- generate IAX call id for the outbound call. Have not been implemented\n"
|
" 'i' -- generate IAX call id for the outbound call. Have not been implemented\n"
|
||||||
@@ -2144,8 +2097,6 @@ static const char* descrip3 =
|
|||||||
" OSPNext(cause[|provider[|options]]): Looks up the next OSP Destination for ${OSPOUTHANDLE}\n"
|
" OSPNext(cause[|provider[|options]]): Looks up the next OSP Destination for ${OSPOUTHANDLE}\n"
|
||||||
"See OSPLookup for more information\n"
|
"See OSPLookup for more information\n"
|
||||||
"\n"
|
"\n"
|
||||||
"The option string may contain the following character:\n"
|
|
||||||
" 'j' -- jump to n+101 priority if the lookup was NOT successful\n"
|
|
||||||
"This application sets the following channel variable upon completion:\n"
|
"This application sets the following channel variable upon completion:\n"
|
||||||
" OSPNEXTSTATUS The status of the OSP Next attempt as a text string, one of\n"
|
" OSPNEXTSTATUS The status of the OSP Next attempt as a text string, one of\n"
|
||||||
" SUCCESS | FAILED | ERROR\n";
|
" SUCCESS | FAILED | ERROR\n";
|
||||||
@@ -2157,8 +2108,6 @@ static const char* descrip4 =
|
|||||||
"status, which should be one of BUSY, CONGESTION, ANSWER, NOANSWER, or CHANUNAVAIL\n"
|
"status, which should be one of BUSY, CONGESTION, ANSWER, NOANSWER, or CHANUNAVAIL\n"
|
||||||
"or coincidentally, just what the Dial application stores in its ${DIALSTATUS}.\n"
|
"or coincidentally, just what the Dial application stores in its ${DIALSTATUS}.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"The option string may contain the following character:\n"
|
|
||||||
" 'j' -- jump to n+101 priority if the finish attempt was NOT successful\n"
|
|
||||||
"This application sets the following channel variable upon completion:\n"
|
"This application sets the following channel variable upon completion:\n"
|
||||||
" OSPFINISHSTATUS The status of the OSP Finish attempt as a text string, one of\n"
|
" OSPFINISHSTATUS The status of the OSP Finish attempt as a text string, one of\n"
|
||||||
" SUCCESS | FAILED | ERROR \n";
|
" SUCCESS | FAILED | ERROR \n";
|
||||||
|
@@ -59,9 +59,7 @@ static char *descrip =
|
|||||||
"specified, the application will return immediately should the channel not be\n"
|
"specified, the application will return immediately should the channel not be\n"
|
||||||
"off hook. Otherwise, unless 'noanswer' is specified, the channel will\n"
|
"off hook. Otherwise, unless 'noanswer' is specified, the channel will\n"
|
||||||
"be answered before the sound is played. Not all channels support playing\n"
|
"be answered before the sound is played. Not all channels support playing\n"
|
||||||
"messages while still on hook. If 'j' is specified, the application\n"
|
"messages while still on hook.\n"
|
||||||
"will jump to priority n+101 if present when a file specified to be played\n"
|
|
||||||
"does not exist.\n"
|
|
||||||
"This application sets the following channel variable upon completion:\n"
|
"This application sets the following channel variable upon completion:\n"
|
||||||
" PLAYBACKSTATUS The status of the playback attempt as a text string, one of\n"
|
" PLAYBACKSTATUS The status of the playback attempt as a text string, one of\n"
|
||||||
" SUCCESS | FAILED\n"
|
" SUCCESS | FAILED\n"
|
||||||
@@ -384,7 +382,6 @@ static int playback_exec(struct ast_channel *chan, void *data)
|
|||||||
int option_skip=0;
|
int option_skip=0;
|
||||||
int option_say=0;
|
int option_say=0;
|
||||||
int option_noanswer = 0;
|
int option_noanswer = 0;
|
||||||
int priority_jump = 0;
|
|
||||||
|
|
||||||
AST_DECLARE_APP_ARGS(args,
|
AST_DECLARE_APP_ARGS(args,
|
||||||
AST_APP_ARG(filenames);
|
AST_APP_ARG(filenames);
|
||||||
@@ -408,10 +405,7 @@ static int playback_exec(struct ast_channel *chan, void *data)
|
|||||||
option_say = 1;
|
option_say = 1;
|
||||||
if (strcasestr(args.options, "noanswer"))
|
if (strcasestr(args.options, "noanswer"))
|
||||||
option_noanswer = 1;
|
option_noanswer = 1;
|
||||||
if (strchr(args.options, 'j'))
|
|
||||||
priority_jump = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chan->_state != AST_STATE_UP) {
|
if (chan->_state != AST_STATE_UP) {
|
||||||
if (option_skip) {
|
if (option_skip) {
|
||||||
/* At the user's option, skip if the line is not up */
|
/* At the user's option, skip if the line is not up */
|
||||||
@@ -435,8 +429,6 @@ static int playback_exec(struct ast_channel *chan, void *data)
|
|||||||
ast_stopstream(chan);
|
ast_stopstream(chan);
|
||||||
} else {
|
} else {
|
||||||
ast_log(LOG_WARNING, "ast_streamfile failed on %s for %s\n", chan->name, (char *)data);
|
ast_log(LOG_WARNING, "ast_streamfile failed on %s for %s\n", chan->name, (char *)data);
|
||||||
if (priority_jump || ast_opt_priority_jumping)
|
|
||||||
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
|
|
||||||
res = 0;
|
res = 0;
|
||||||
mres = 1;
|
mres = 1;
|
||||||
}
|
}
|
||||||
|
@@ -65,9 +65,6 @@ static char *descrip =
|
|||||||
"If you don't want to use the config file and have an i/o operation with\n"
|
"If you don't want to use the config file and have an i/o operation with\n"
|
||||||
"every call, you can also specify maxretries and minlength as application\n"
|
"every call, you can also specify maxretries and minlength as application\n"
|
||||||
"parameters. Doing so supercedes any values set in privacy.conf.\n"
|
"parameters. Doing so supercedes any values set in privacy.conf.\n"
|
||||||
"The option string may contain the following character: \n"
|
|
||||||
" 'j' -- jump to n+101 priority after <maxretries> failed attempts to collect\n"
|
|
||||||
" the minlength number of digits.\n"
|
|
||||||
"The application sets the following channel variable upon completion: \n"
|
"The application sets the following channel variable upon completion: \n"
|
||||||
"PRIVACYMGRSTATUS The status of the privacy manager's attempt to collect \n"
|
"PRIVACYMGRSTATUS The status of the privacy manager's attempt to collect \n"
|
||||||
" a phone number from the user. A text string that is either:\n"
|
" a phone number from the user. A text string that is either:\n"
|
||||||
@@ -87,7 +84,6 @@ static int privacy_exec (struct ast_channel *chan, void *data)
|
|||||||
struct ast_module_user *u;
|
struct ast_module_user *u;
|
||||||
struct ast_config *cfg = NULL;
|
struct ast_config *cfg = NULL;
|
||||||
char *parse = NULL;
|
char *parse = NULL;
|
||||||
int priority_jump = 0;
|
|
||||||
AST_DECLARE_APP_ARGS(args,
|
AST_DECLARE_APP_ARGS(args,
|
||||||
AST_APP_ARG(maxretries);
|
AST_APP_ARG(maxretries);
|
||||||
AST_APP_ARG(minlength);
|
AST_APP_ARG(minlength);
|
||||||
@@ -126,9 +122,6 @@ static int privacy_exec (struct ast_channel *chan, void *data)
|
|||||||
else
|
else
|
||||||
ast_log(LOG_WARNING, "Invalid min length argument\n");
|
ast_log(LOG_WARNING, "Invalid min length argument\n");
|
||||||
}
|
}
|
||||||
if (args.options)
|
|
||||||
if (strchr(args.options, 'j'))
|
|
||||||
priority_jump = 1;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -200,8 +193,6 @@ static int privacy_exec (struct ast_channel *chan, void *data)
|
|||||||
}
|
}
|
||||||
pbx_builtin_setvar_helper(chan, "PRIVACYMGRSTATUS", "SUCCESS");
|
pbx_builtin_setvar_helper(chan, "PRIVACYMGRSTATUS", "SUCCESS");
|
||||||
} else {
|
} else {
|
||||||
if (priority_jump || ast_opt_priority_jumping)
|
|
||||||
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
|
|
||||||
pbx_builtin_setvar_helper(chan, "PRIVACYMGRSTATUS", "FAILED");
|
pbx_builtin_setvar_helper(chan, "PRIVACYMGRSTATUS", "FAILED");
|
||||||
}
|
}
|
||||||
if (cfg)
|
if (cfg)
|
||||||
|
@@ -167,10 +167,7 @@ static char *app_aqm_synopsis = "Dynamically adds queue members" ;
|
|||||||
static char *app_aqm_descrip =
|
static char *app_aqm_descrip =
|
||||||
" AddQueueMember(queuename[|interface[|penalty[|options[|membername]]]]):\n"
|
" AddQueueMember(queuename[|interface[|penalty[|options[|membername]]]]):\n"
|
||||||
"Dynamically adds interface to an existing queue.\n"
|
"Dynamically adds interface to an existing queue.\n"
|
||||||
"If the interface is already in the queue and there exists an n+101 priority\n"
|
"If the interface is already in the queue it will return an error.\n"
|
||||||
"then it will then jump to this priority. Otherwise it will return an error\n"
|
|
||||||
"The option string may contain zero or more of the following characters:\n"
|
|
||||||
" 'j' -- jump to +101 priority when appropriate.\n"
|
|
||||||
" This application sets the following channel variable upon completion:\n"
|
" This application sets the following channel variable upon completion:\n"
|
||||||
" AQMSTATUS The status of the attempt to add a queue member as a \n"
|
" AQMSTATUS The status of the attempt to add a queue member as a \n"
|
||||||
" text string, one of\n"
|
" text string, one of\n"
|
||||||
@@ -183,10 +180,7 @@ static char *app_rqm_synopsis = "Dynamically removes queue members" ;
|
|||||||
static char *app_rqm_descrip =
|
static char *app_rqm_descrip =
|
||||||
" RemoveQueueMember(queuename[|interface[|options]]):\n"
|
" RemoveQueueMember(queuename[|interface[|options]]):\n"
|
||||||
"Dynamically removes interface to an existing queue\n"
|
"Dynamically removes interface to an existing queue\n"
|
||||||
"If the interface is NOT in the queue and there exists an n+101 priority\n"
|
"If the interface is NOT in the queue it will return an error.\n"
|
||||||
"then it will then jump to this priority. Otherwise it will return an error\n"
|
|
||||||
"The option string may contain zero or more of the following characters:\n"
|
|
||||||
" 'j' -- jump to +101 priority when appropriate.\n"
|
|
||||||
" This application sets the following channel variable upon completion:\n"
|
" This application sets the following channel variable upon completion:\n"
|
||||||
" RQMSTATUS The status of the attempt to remove a queue member as a\n"
|
" RQMSTATUS The status of the attempt to remove a queue member as a\n"
|
||||||
" text string, one of\n"
|
" text string, one of\n"
|
||||||
@@ -203,13 +197,7 @@ static char *app_pqm_descrip =
|
|||||||
"any calls from being sent from the queue to the interface until it is\n"
|
"any calls from being sent from the queue to the interface until it is\n"
|
||||||
"unpaused with UnpauseQueueMember or the manager interface. If no\n"
|
"unpaused with UnpauseQueueMember or the manager interface. If no\n"
|
||||||
"queuename is given, the interface is paused in every queue it is a\n"
|
"queuename is given, the interface is paused in every queue it is a\n"
|
||||||
"member of. If the interface is not in the named queue, or if no queue\n"
|
"member of. The application will fail if the interface is not found.\n"
|
||||||
"is given and the interface is not in any queue, it will jump to\n"
|
|
||||||
"priority n+101, if it exists and the appropriate options are set.\n"
|
|
||||||
"The application will fail if the interface is not found and no extension\n"
|
|
||||||
"to jump to exists.\n"
|
|
||||||
"The option string may contain zero or more of the following characters:\n"
|
|
||||||
" 'j' -- jump to +101 priority when appropriate.\n"
|
|
||||||
" This application sets the following channel variable upon completion:\n"
|
" This application sets the following channel variable upon completion:\n"
|
||||||
" PQMSTATUS The status of the attempt to pause a queue member as a\n"
|
" PQMSTATUS The status of the attempt to pause a queue member as a\n"
|
||||||
" text string, one of\n"
|
" text string, one of\n"
|
||||||
@@ -223,8 +211,6 @@ static char *app_upqm_descrip =
|
|||||||
"Unpauses (resumes calls to) a queue member.\n"
|
"Unpauses (resumes calls to) a queue member.\n"
|
||||||
"This is the counterpart to PauseQueueMember and operates exactly the\n"
|
"This is the counterpart to PauseQueueMember and operates exactly the\n"
|
||||||
"same way, except it unpauses instead of pausing the given interface.\n"
|
"same way, except it unpauses instead of pausing the given interface.\n"
|
||||||
"The option string may contain zero or more of the following characters:\n"
|
|
||||||
" 'j' -- jump to +101 priority when appropriate.\n"
|
|
||||||
" This application sets the following channel variable upon completion:\n"
|
" This application sets the following channel variable upon completion:\n"
|
||||||
" UPQMSTATUS The status of the attempt to unpause a queue \n"
|
" UPQMSTATUS The status of the attempt to unpause a queue \n"
|
||||||
" member as a text string, one of\n"
|
" member as a text string, one of\n"
|
||||||
@@ -3180,7 +3166,6 @@ static int pqm_exec(struct ast_channel *chan, void *data)
|
|||||||
{
|
{
|
||||||
struct ast_module_user *lu;
|
struct ast_module_user *lu;
|
||||||
char *parse;
|
char *parse;
|
||||||
int priority_jump = 0;
|
|
||||||
AST_DECLARE_APP_ARGS(args,
|
AST_DECLARE_APP_ARGS(args,
|
||||||
AST_APP_ARG(queuename);
|
AST_APP_ARG(queuename);
|
||||||
AST_APP_ARG(interface);
|
AST_APP_ARG(interface);
|
||||||
@@ -3199,8 +3184,6 @@ static int pqm_exec(struct ast_channel *chan, void *data)
|
|||||||
lu = ast_module_user_add(chan);
|
lu = ast_module_user_add(chan);
|
||||||
|
|
||||||
if (args.options) {
|
if (args.options) {
|
||||||
if (strchr(args.options, 'j'))
|
|
||||||
priority_jump = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ast_strlen_zero(args.interface)) {
|
if (ast_strlen_zero(args.interface)) {
|
||||||
@@ -3211,13 +3194,6 @@ static int pqm_exec(struct ast_channel *chan, void *data)
|
|||||||
|
|
||||||
if (set_member_paused(args.queuename, args.interface, 1)) {
|
if (set_member_paused(args.queuename, args.interface, 1)) {
|
||||||
ast_log(LOG_WARNING, "Attempt to pause interface %s, not found\n", args.interface);
|
ast_log(LOG_WARNING, "Attempt to pause interface %s, not found\n", args.interface);
|
||||||
if (priority_jump || ast_opt_priority_jumping) {
|
|
||||||
if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101)) {
|
|
||||||
pbx_builtin_setvar_helper(chan, "PQMSTATUS", "NOTFOUND");
|
|
||||||
ast_module_user_remove(lu);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ast_module_user_remove(lu);
|
ast_module_user_remove(lu);
|
||||||
pbx_builtin_setvar_helper(chan, "PQMSTATUS", "NOTFOUND");
|
pbx_builtin_setvar_helper(chan, "PQMSTATUS", "NOTFOUND");
|
||||||
return -1;
|
return -1;
|
||||||
@@ -3233,7 +3209,6 @@ static int upqm_exec(struct ast_channel *chan, void *data)
|
|||||||
{
|
{
|
||||||
struct ast_module_user *lu;
|
struct ast_module_user *lu;
|
||||||
char *parse;
|
char *parse;
|
||||||
int priority_jump = 0;
|
|
||||||
AST_DECLARE_APP_ARGS(args,
|
AST_DECLARE_APP_ARGS(args,
|
||||||
AST_APP_ARG(queuename);
|
AST_APP_ARG(queuename);
|
||||||
AST_APP_ARG(interface);
|
AST_APP_ARG(interface);
|
||||||
@@ -3252,8 +3227,6 @@ static int upqm_exec(struct ast_channel *chan, void *data)
|
|||||||
lu = ast_module_user_add(chan);
|
lu = ast_module_user_add(chan);
|
||||||
|
|
||||||
if (args.options) {
|
if (args.options) {
|
||||||
if (strchr(args.options, 'j'))
|
|
||||||
priority_jump = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ast_strlen_zero(args.interface)) {
|
if (ast_strlen_zero(args.interface)) {
|
||||||
@@ -3264,13 +3237,6 @@ static int upqm_exec(struct ast_channel *chan, void *data)
|
|||||||
|
|
||||||
if (set_member_paused(args.queuename, args.interface, 0)) {
|
if (set_member_paused(args.queuename, args.interface, 0)) {
|
||||||
ast_log(LOG_WARNING, "Attempt to unpause interface %s, not found\n", args.interface);
|
ast_log(LOG_WARNING, "Attempt to unpause interface %s, not found\n", args.interface);
|
||||||
if (priority_jump || ast_opt_priority_jumping) {
|
|
||||||
if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101)) {
|
|
||||||
pbx_builtin_setvar_helper(chan, "UPQMSTATUS", "NOTFOUND");
|
|
||||||
ast_module_user_remove(lu);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ast_module_user_remove(lu);
|
ast_module_user_remove(lu);
|
||||||
pbx_builtin_setvar_helper(chan, "UPQMSTATUS", "NOTFOUND");
|
pbx_builtin_setvar_helper(chan, "UPQMSTATUS", "NOTFOUND");
|
||||||
return -1;
|
return -1;
|
||||||
@@ -3287,7 +3253,6 @@ static int rqm_exec(struct ast_channel *chan, void *data)
|
|||||||
int res=-1;
|
int res=-1;
|
||||||
struct ast_module_user *lu;
|
struct ast_module_user *lu;
|
||||||
char *parse, *temppos = NULL;
|
char *parse, *temppos = NULL;
|
||||||
int priority_jump = 0;
|
|
||||||
AST_DECLARE_APP_ARGS(args,
|
AST_DECLARE_APP_ARGS(args,
|
||||||
AST_APP_ARG(queuename);
|
AST_APP_ARG(queuename);
|
||||||
AST_APP_ARG(interface);
|
AST_APP_ARG(interface);
|
||||||
@@ -3314,8 +3279,6 @@ static int rqm_exec(struct ast_channel *chan, void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (args.options) {
|
if (args.options) {
|
||||||
if (strchr(args.options, 'j'))
|
|
||||||
priority_jump = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (remove_from_queue(args.queuename, args.interface)) {
|
switch (remove_from_queue(args.queuename, args.interface)) {
|
||||||
@@ -3328,8 +3291,6 @@ static int rqm_exec(struct ast_channel *chan, void *data)
|
|||||||
case RES_EXISTS:
|
case RES_EXISTS:
|
||||||
if (option_debug)
|
if (option_debug)
|
||||||
ast_log(LOG_DEBUG, "Unable to remove interface '%s' from queue '%s': Not there\n", args.interface, args.queuename);
|
ast_log(LOG_DEBUG, "Unable to remove interface '%s' from queue '%s': Not there\n", args.interface, args.queuename);
|
||||||
if (priority_jump || ast_opt_priority_jumping)
|
|
||||||
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
|
|
||||||
pbx_builtin_setvar_helper(chan, "RQMSTATUS", "NOTINQUEUE");
|
pbx_builtin_setvar_helper(chan, "RQMSTATUS", "NOTINQUEUE");
|
||||||
res = 0;
|
res = 0;
|
||||||
break;
|
break;
|
||||||
@@ -3350,7 +3311,6 @@ static int aqm_exec(struct ast_channel *chan, void *data)
|
|||||||
int res=-1;
|
int res=-1;
|
||||||
struct ast_module_user *lu;
|
struct ast_module_user *lu;
|
||||||
char *parse, *temppos = NULL;
|
char *parse, *temppos = NULL;
|
||||||
int priority_jump = 0;
|
|
||||||
AST_DECLARE_APP_ARGS(args,
|
AST_DECLARE_APP_ARGS(args,
|
||||||
AST_APP_ARG(queuename);
|
AST_APP_ARG(queuename);
|
||||||
AST_APP_ARG(interface);
|
AST_APP_ARG(interface);
|
||||||
@@ -3386,8 +3346,6 @@ static int aqm_exec(struct ast_channel *chan, void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (args.options) {
|
if (args.options) {
|
||||||
if (strchr(args.options, 'j'))
|
|
||||||
priority_jump = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ast_strlen_zero(args.membername))
|
if (ast_strlen_zero(args.membername))
|
||||||
@@ -3403,8 +3361,6 @@ static int aqm_exec(struct ast_channel *chan, void *data)
|
|||||||
break;
|
break;
|
||||||
case RES_EXISTS:
|
case RES_EXISTS:
|
||||||
ast_log(LOG_WARNING, "Unable to add interface '%s' to queue '%s': Already there\n", args.interface, args.queuename);
|
ast_log(LOG_WARNING, "Unable to add interface '%s' to queue '%s': Already there\n", args.interface, args.queuename);
|
||||||
if (priority_jump || ast_opt_priority_jumping)
|
|
||||||
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
|
|
||||||
pbx_builtin_setvar_helper(chan, "AQMSTATUS", "MEMBERALREADY");
|
pbx_builtin_setvar_helper(chan, "AQMSTATUS", "MEMBERALREADY");
|
||||||
res = 0;
|
res = 0;
|
||||||
break;
|
break;
|
||||||
|
@@ -58,11 +58,7 @@ static const char *descrip =
|
|||||||
" FAILURE Transmission failed\n"
|
" FAILURE Transmission failed\n"
|
||||||
" UNSUPPORTED Text transmission not supported by channel\n"
|
" UNSUPPORTED Text transmission not supported by channel\n"
|
||||||
"\n"
|
"\n"
|
||||||
"At this moment, text is supposed to be 7 bit ASCII in most channels.\n"
|
"At this moment, text is supposed to be 7 bit ASCII in most channels.\n";
|
||||||
"The option string many contain the following character:\n"
|
|
||||||
"'j' -- jump to n+101 priority if the channel doesn't support\n"
|
|
||||||
" text transport\n";
|
|
||||||
|
|
||||||
|
|
||||||
static int sendtext_exec(struct ast_channel *chan, void *data)
|
static int sendtext_exec(struct ast_channel *chan, void *data)
|
||||||
{
|
{
|
||||||
@@ -70,7 +66,6 @@ static int sendtext_exec(struct ast_channel *chan, void *data)
|
|||||||
struct ast_module_user *u;
|
struct ast_module_user *u;
|
||||||
char *status = "UNSUPPORTED";
|
char *status = "UNSUPPORTED";
|
||||||
char *parse = NULL;
|
char *parse = NULL;
|
||||||
int priority_jump = 0;
|
|
||||||
AST_DECLARE_APP_ARGS(args,
|
AST_DECLARE_APP_ARGS(args,
|
||||||
AST_APP_ARG(text);
|
AST_APP_ARG(text);
|
||||||
AST_APP_ARG(options);
|
AST_APP_ARG(options);
|
||||||
@@ -88,16 +83,12 @@ static int sendtext_exec(struct ast_channel *chan, void *data)
|
|||||||
AST_STANDARD_APP_ARGS(args, parse);
|
AST_STANDARD_APP_ARGS(args, parse);
|
||||||
|
|
||||||
if (args.options) {
|
if (args.options) {
|
||||||
if (strchr(args.options, 'j'))
|
|
||||||
priority_jump = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ast_channel_lock(chan);
|
ast_channel_lock(chan);
|
||||||
if (!chan->tech->send_text) {
|
if (!chan->tech->send_text) {
|
||||||
ast_channel_unlock(chan);
|
ast_channel_unlock(chan);
|
||||||
/* Does not support transport */
|
/* Does not support transport */
|
||||||
if (priority_jump || ast_opt_priority_jumping)
|
|
||||||
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
|
|
||||||
ast_module_user_remove(u);
|
ast_module_user_remove(u);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -59,14 +59,7 @@ static char *descrip =
|
|||||||
"fails, the console should report a fallthrough. \n"
|
"fails, the console should report a fallthrough. \n"
|
||||||
"Result of execution is returned in the SYSTEMSTATUS channel variable:\n"
|
"Result of execution is returned in the SYSTEMSTATUS channel variable:\n"
|
||||||
" FAILURE Could not execute the specified command\n"
|
" FAILURE Could not execute the specified command\n"
|
||||||
" SUCCESS Specified command successfully executed\n"
|
" SUCCESS Specified command successfully executed\n";
|
||||||
"\n"
|
|
||||||
"Old behaviour:\n"
|
|
||||||
"If the command itself executes but is in error, and if there exists\n"
|
|
||||||
"a priority n + 101, where 'n' is the priority of the current instance,\n"
|
|
||||||
"then the channel will be setup to continue at that priority level.\n"
|
|
||||||
"Note that this jump functionality has been deprecated and will only occur\n"
|
|
||||||
"if the global priority jumping option is enabled in extensions.conf.\n";
|
|
||||||
|
|
||||||
static char *descrip2 =
|
static char *descrip2 =
|
||||||
" TrySystem(command): Executes a command by using system().\n"
|
" TrySystem(command): Executes a command by using system().\n"
|
||||||
@@ -74,13 +67,7 @@ static char *descrip2 =
|
|||||||
"Result of execution is returned in the SYSTEMSTATUS channel variable:\n"
|
"Result of execution is returned in the SYSTEMSTATUS channel variable:\n"
|
||||||
" FAILURE Could not execute the specified command\n"
|
" FAILURE Could not execute the specified command\n"
|
||||||
" SUCCESS Specified command successfully executed\n"
|
" SUCCESS Specified command successfully executed\n"
|
||||||
" APPERROR Specified command successfully executed, but returned error code\n"
|
" APPERROR Specified command successfully executed, but returned error code\n";
|
||||||
"\n"
|
|
||||||
"Old behaviour:\nIf the command itself executes but is in error, and if\n"
|
|
||||||
"there exists a priority n + 101, where 'n' is the priority of the current\n"
|
|
||||||
"instance, then the channel will be setup to continue at that\n"
|
|
||||||
"priority level. Otherwise, System will terminate.\n";
|
|
||||||
|
|
||||||
|
|
||||||
static int system_exec_helper(struct ast_channel *chan, void *data, int failmode)
|
static int system_exec_helper(struct ast_channel *chan, void *data, int failmode)
|
||||||
{
|
{
|
||||||
@@ -108,9 +95,6 @@ static int system_exec_helper(struct ast_channel *chan, void *data, int failmode
|
|||||||
} else {
|
} else {
|
||||||
if (res < 0)
|
if (res < 0)
|
||||||
res = 0;
|
res = 0;
|
||||||
if (ast_opt_priority_jumping && res)
|
|
||||||
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
|
|
||||||
|
|
||||||
if (res != 0)
|
if (res != 0)
|
||||||
pbx_builtin_setvar_helper(chan, chanvar, "APPERROR");
|
pbx_builtin_setvar_helper(chan, chanvar, "APPERROR");
|
||||||
else
|
else
|
||||||
|
@@ -60,10 +60,7 @@ static const char *descrip =
|
|||||||
"channel variable:\n"
|
"channel variable:\n"
|
||||||
" SUCCESS Transfer succeeded\n"
|
" SUCCESS Transfer succeeded\n"
|
||||||
" FAILURE Transfer failed\n"
|
" FAILURE Transfer failed\n"
|
||||||
" UNSUPPORTED Transfer unsupported by channel driver\n"
|
" UNSUPPORTED Transfer unsupported by channel driver\n";
|
||||||
"The option string many contain the following character:\n"
|
|
||||||
"'j' -- jump to n+101 priority if the channel transfer attempt\n"
|
|
||||||
" fails\n";
|
|
||||||
|
|
||||||
static int transfer_exec(struct ast_channel *chan, void *data)
|
static int transfer_exec(struct ast_channel *chan, void *data)
|
||||||
{
|
{
|
||||||
@@ -75,7 +72,6 @@ static int transfer_exec(struct ast_channel *chan, void *data)
|
|||||||
char *dest = NULL;
|
char *dest = NULL;
|
||||||
char *status;
|
char *status;
|
||||||
char *parse;
|
char *parse;
|
||||||
int priority_jump = 0;
|
|
||||||
AST_DECLARE_APP_ARGS(args,
|
AST_DECLARE_APP_ARGS(args,
|
||||||
AST_APP_ARG(dest);
|
AST_APP_ARG(dest);
|
||||||
AST_APP_ARG(options);
|
AST_APP_ARG(options);
|
||||||
@@ -94,8 +90,6 @@ static int transfer_exec(struct ast_channel *chan, void *data)
|
|||||||
AST_STANDARD_APP_ARGS(args, parse);
|
AST_STANDARD_APP_ARGS(args, parse);
|
||||||
|
|
||||||
if (args.options) {
|
if (args.options) {
|
||||||
if (strchr(args.options, 'j'))
|
|
||||||
priority_jump = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dest = args.dest;
|
dest = args.dest;
|
||||||
@@ -122,8 +116,6 @@ static int transfer_exec(struct ast_channel *chan, void *data)
|
|||||||
|
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
status = "FAILURE";
|
status = "FAILURE";
|
||||||
if (priority_jump || ast_opt_priority_jumping)
|
|
||||||
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
|
|
||||||
res = 0;
|
res = 0;
|
||||||
} else {
|
} else {
|
||||||
status = "SUCCESS";
|
status = "SUCCESS";
|
||||||
|
@@ -59,10 +59,6 @@ static char *descrip =
|
|||||||
"If the option 'wait' is specified, execution will wait for an\n"
|
"If the option 'wait' is specified, execution will wait for an\n"
|
||||||
"acknowledgement that the URL has been loaded before continuing\n"
|
"acknowledgement that the URL has been loaded before continuing\n"
|
||||||
"\n"
|
"\n"
|
||||||
"If jumping is specified as an option (the 'j' flag), the client does not\n"
|
|
||||||
"support Asterisk \"html\" transport, and there exists a step with priority\n"
|
|
||||||
"n + 101, then execution will continue at that step.\n"
|
|
||||||
"\n"
|
|
||||||
"SendURL continues normally if the URL was sent correctly or if the channel\n"
|
"SendURL continues normally if the URL was sent correctly or if the channel\n"
|
||||||
"does not support HTML transport. Otherwise, the channel is hung up.\n";
|
"does not support HTML transport. Otherwise, the channel is hung up.\n";
|
||||||
|
|
||||||
@@ -74,7 +70,6 @@ static int sendurl_exec(struct ast_channel *chan, void *data)
|
|||||||
char *tmp;
|
char *tmp;
|
||||||
char *options;
|
char *options;
|
||||||
int local_option_wait=0;
|
int local_option_wait=0;
|
||||||
int local_option_jump = 0;
|
|
||||||
struct ast_frame *f;
|
struct ast_frame *f;
|
||||||
char *stringp=NULL;
|
char *stringp=NULL;
|
||||||
char *status = "FAILURE";
|
char *status = "FAILURE";
|
||||||
@@ -94,13 +89,9 @@ static int sendurl_exec(struct ast_channel *chan, void *data)
|
|||||||
options = strsep(&stringp, "|");
|
options = strsep(&stringp, "|");
|
||||||
if (options && !strcasecmp(options, "wait"))
|
if (options && !strcasecmp(options, "wait"))
|
||||||
local_option_wait = 1;
|
local_option_wait = 1;
|
||||||
if (options && !strcasecmp(options, "j"))
|
|
||||||
local_option_jump = 1;
|
|
||||||
|
|
||||||
if (!ast_channel_supports_html(chan)) {
|
if (!ast_channel_supports_html(chan)) {
|
||||||
/* Does not support transport */
|
/* Does not support transport */
|
||||||
if (local_option_jump || ast_opt_priority_jumping)
|
|
||||||
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
|
|
||||||
pbx_builtin_setvar_helper(chan, "SENDURLSTATUS", "UNSUPPORTED");
|
pbx_builtin_setvar_helper(chan, "SENDURLSTATUS", "UNSUPPORTED");
|
||||||
ast_module_user_remove(u);
|
ast_module_user_remove(u);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -135,8 +126,6 @@ static int sendurl_exec(struct ast_channel *chan, void *data)
|
|||||||
case AST_HTML_NOSUPPORT:
|
case AST_HTML_NOSUPPORT:
|
||||||
/* Does not support transport */
|
/* Does not support transport */
|
||||||
status ="UNSUPPORTED";
|
status ="UNSUPPORTED";
|
||||||
if (local_option_jump || ast_opt_priority_jumping)
|
|
||||||
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
|
|
||||||
res = 0;
|
res = 0;
|
||||||
ast_frfree(f);
|
ast_frfree(f);
|
||||||
goto out;
|
goto out;
|
||||||
|
@@ -211,7 +211,6 @@ enum {
|
|||||||
OPT_UNAVAIL_GREETING = (1 << 2),
|
OPT_UNAVAIL_GREETING = (1 << 2),
|
||||||
OPT_RECORDGAIN = (1 << 3),
|
OPT_RECORDGAIN = (1 << 3),
|
||||||
OPT_PREPEND_MAILBOX = (1 << 4),
|
OPT_PREPEND_MAILBOX = (1 << 4),
|
||||||
OPT_PRIORITY_JUMP = (1 << 5),
|
|
||||||
OPT_AUTOPLAY = (1 << 6),
|
OPT_AUTOPLAY = (1 << 6),
|
||||||
} vm_option_flags;
|
} vm_option_flags;
|
||||||
|
|
||||||
@@ -228,7 +227,6 @@ AST_APP_OPTIONS(vm_app_options, {
|
|||||||
AST_APP_OPTION('u', OPT_UNAVAIL_GREETING),
|
AST_APP_OPTION('u', OPT_UNAVAIL_GREETING),
|
||||||
AST_APP_OPTION_ARG('g', OPT_RECORDGAIN, OPT_ARG_RECORDGAIN),
|
AST_APP_OPTION_ARG('g', OPT_RECORDGAIN, OPT_ARG_RECORDGAIN),
|
||||||
AST_APP_OPTION('p', OPT_PREPEND_MAILBOX),
|
AST_APP_OPTION('p', OPT_PREPEND_MAILBOX),
|
||||||
AST_APP_OPTION('j', OPT_PRIORITY_JUMP),
|
|
||||||
AST_APP_OPTION_ARG('a', OPT_AUTOPLAY, OPT_ARG_PLAYFOLDER),
|
AST_APP_OPTION_ARG('a', OPT_AUTOPLAY, OPT_ARG_PLAYFOLDER),
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -457,9 +455,7 @@ static char *descrip_vm =
|
|||||||
" message. The units are whole-number decibels (dB).\n"
|
" message. The units are whole-number decibels (dB).\n"
|
||||||
" s - Skip the playback of instructions for leaving a message to the\n"
|
" s - Skip the playback of instructions for leaving a message to the\n"
|
||||||
" calling party.\n"
|
" calling party.\n"
|
||||||
" u - Play the 'unavailable greeting.\n"
|
" u - Play the 'unavailable greeting.\n";
|
||||||
" j - Jump to priority n+101 if the mailbox is not found or some other\n"
|
|
||||||
" error occurs.\n";
|
|
||||||
|
|
||||||
static char *synopsis_vmain = "Check Voicemail messages";
|
static char *synopsis_vmain = "Check Voicemail messages";
|
||||||
|
|
||||||
@@ -489,8 +485,7 @@ static char *descrip_vm_box_exists =
|
|||||||
" VMBOXEXISTSSTATUS - This will contain the status of the execution of the\n"
|
" VMBOXEXISTSSTATUS - This will contain the status of the execution of the\n"
|
||||||
" MailboxExists application. Possible values include:\n"
|
" MailboxExists application. Possible values include:\n"
|
||||||
" SUCCESS | FAILED\n\n"
|
" SUCCESS | FAILED\n\n"
|
||||||
" Options:\n"
|
" Options: (none)\n";
|
||||||
" j - Jump to priority n+101 if the mailbox is found.\n";
|
|
||||||
|
|
||||||
static char *synopsis_vmauthenticate = "Authenticate with Voicemail passwords";
|
static char *synopsis_vmauthenticate = "Authenticate with Voicemail passwords";
|
||||||
|
|
||||||
@@ -2995,8 +2990,6 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_
|
|||||||
ast_log(LOG_DEBUG, "Before find_user\n");
|
ast_log(LOG_DEBUG, "Before find_user\n");
|
||||||
if (!(vmu = find_user(&svm, context, ext))) {
|
if (!(vmu = find_user(&svm, context, ext))) {
|
||||||
ast_log(LOG_WARNING, "No entry in voicemail config file for '%s'\n", ext);
|
ast_log(LOG_WARNING, "No entry in voicemail config file for '%s'\n", ext);
|
||||||
if (ast_test_flag(options, OPT_PRIORITY_JUMP) || ast_opt_priority_jumping)
|
|
||||||
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
|
|
||||||
pbx_builtin_setvar_helper(chan, "VMSTATUS", "FAILED");
|
pbx_builtin_setvar_helper(chan, "VMSTATUS", "FAILED");
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@@ -7008,7 +7001,7 @@ static int vm_exec(struct ast_channel *chan, void *data)
|
|||||||
ast_module_user_remove(u);
|
ast_module_user_remove(u);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
ast_copy_flags(&leave_options, &flags, OPT_SILENT | OPT_BUSY_GREETING | OPT_UNAVAIL_GREETING | OPT_PRIORITY_JUMP);
|
ast_copy_flags(&leave_options, &flags, OPT_SILENT | OPT_BUSY_GREETING | OPT_UNAVAIL_GREETING);
|
||||||
if (ast_test_flag(&flags, OPT_RECORDGAIN)) {
|
if (ast_test_flag(&flags, OPT_RECORDGAIN)) {
|
||||||
int gain;
|
int gain;
|
||||||
|
|
||||||
@@ -7039,10 +7032,6 @@ static int vm_exec(struct ast_channel *chan, void *data)
|
|||||||
|
|
||||||
if (res == ERROR_LOCK_PATH) {
|
if (res == ERROR_LOCK_PATH) {
|
||||||
ast_log(LOG_ERROR, "Could not leave voicemail. The path is already locked.\n");
|
ast_log(LOG_ERROR, "Could not leave voicemail. The path is already locked.\n");
|
||||||
/*Send the call to n+101 priority, where n is the current priority*/
|
|
||||||
if (ast_test_flag(&leave_options, OPT_PRIORITY_JUMP) || ast_opt_priority_jumping)
|
|
||||||
if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101))
|
|
||||||
ast_log(LOG_WARNING, "Extension %s, priority %d doesn't exist.\n", chan->exten, chan->priority + 101);
|
|
||||||
pbx_builtin_setvar_helper(chan, "VMSTATUS", "FAILED");
|
pbx_builtin_setvar_helper(chan, "VMSTATUS", "FAILED");
|
||||||
res = 0;
|
res = 0;
|
||||||
}
|
}
|
||||||
@@ -7122,7 +7111,6 @@ static int vm_box_exists(struct ast_channel *chan, void *data)
|
|||||||
struct ast_module_user *u;
|
struct ast_module_user *u;
|
||||||
struct ast_vm_user svm;
|
struct ast_vm_user svm;
|
||||||
char *context, *box;
|
char *context, *box;
|
||||||
int priority_jump = 0;
|
|
||||||
AST_DECLARE_APP_ARGS(args,
|
AST_DECLARE_APP_ARGS(args,
|
||||||
AST_APP_ARG(mbox);
|
AST_APP_ARG(mbox);
|
||||||
AST_APP_ARG(options);
|
AST_APP_ARG(options);
|
||||||
@@ -7146,8 +7134,6 @@ static int vm_box_exists(struct ast_channel *chan, void *data)
|
|||||||
AST_STANDARD_APP_ARGS(args, box);
|
AST_STANDARD_APP_ARGS(args, box);
|
||||||
|
|
||||||
if (args.options) {
|
if (args.options) {
|
||||||
if (strchr(args.options, 'j'))
|
|
||||||
priority_jump = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((context = strchr(args.mbox, '@'))) {
|
if ((context = strchr(args.mbox, '@'))) {
|
||||||
@@ -7157,9 +7143,6 @@ static int vm_box_exists(struct ast_channel *chan, void *data)
|
|||||||
|
|
||||||
if (find_user(&svm, context, args.mbox)) {
|
if (find_user(&svm, context, args.mbox)) {
|
||||||
pbx_builtin_setvar_helper(chan, "VMBOXEXISTSSTATUS", "SUCCESS");
|
pbx_builtin_setvar_helper(chan, "VMBOXEXISTSSTATUS", "SUCCESS");
|
||||||
if (priority_jump || ast_opt_priority_jumping)
|
|
||||||
if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101))
|
|
||||||
ast_log(LOG_WARNING, "VM box %s@%s exists, but extension %s, priority %d doesn't exist\n", box, context, chan->exten, chan->priority + 101);
|
|
||||||
} else
|
} else
|
||||||
pbx_builtin_setvar_helper(chan, "VMBOXEXISTSSTATUS", "FAILED");
|
pbx_builtin_setvar_helper(chan, "VMBOXEXISTSSTATUS", "FAILED");
|
||||||
ast_module_user_remove(u);
|
ast_module_user_remove(u);
|
||||||
|
@@ -99,11 +99,9 @@ static const char descrip3[] =
|
|||||||
"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"
|
||||||
"\nReturn value:\n"
|
"\nReturn value:\n"
|
||||||
"Normally the app returns 0 unless the options are passed. Also if the callerid or\n"
|
"Normally the app returns 0 unless the options are passed.\n"
|
||||||
"the agentid are not specified it'll look for n+101 priority.\n"
|
|
||||||
"\nOptions:\n"
|
"\nOptions:\n"
|
||||||
" 'd' - make the app return -1 if there is an error condition and there is\n"
|
" 'd' - make the app return -1 if there is an error condition"
|
||||||
" no extension n+101\n"
|
|
||||||
" 'c' - change the CDR so that the source of the call is 'Agent/agent_id'\n"
|
" 'c' - change the CDR so that the source of the call is 'Agent/agent_id'\n"
|
||||||
" 'n' - don't generate the warnings when there is no callerid or the\n"
|
" 'n' - don't generate the warnings when there is no callerid or the\n"
|
||||||
" agentid is not known.\n"
|
" agentid is not known.\n"
|
||||||
@@ -2238,14 +2236,8 @@ static int agentmonitoroutgoing_exec(struct ast_channel *chan, void *data)
|
|||||||
if (!nowarnings)
|
if (!nowarnings)
|
||||||
ast_log(LOG_WARNING, "There is no callerid on that call, so I can't figure out which agent (if it's an agent) is placing outgoing call.\n");
|
ast_log(LOG_WARNING, "There is no callerid on that call, so I can't figure out which agent (if it's an agent) is placing outgoing call.\n");
|
||||||
}
|
}
|
||||||
/* check if there is n + 101 priority */
|
|
||||||
/*! \todo XXX Needs to check option priorityjump etc etc */
|
|
||||||
if (res) {
|
if (res) {
|
||||||
if (ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 101, chan->cid.cid_num)) {
|
if (exitifnoagentid)
|
||||||
chan->priority+=100;
|
|
||||||
if (option_verbose > 2)
|
|
||||||
ast_verbose(VERBOSE_PREFIX_3 "Going to %d priority because there is no callerid or the agentid cannot be found.\n",chan->priority);
|
|
||||||
} else if (exitifnoagentid)
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -54,8 +54,6 @@ enum ast_option_flags {
|
|||||||
AST_OPT_FLAG_FULLY_BOOTED = (1 << 9),
|
AST_OPT_FLAG_FULLY_BOOTED = (1 << 9),
|
||||||
/*! Trascode via signed linear */
|
/*! Trascode via signed linear */
|
||||||
AST_OPT_FLAG_TRANSCODE_VIA_SLIN = (1 << 10),
|
AST_OPT_FLAG_TRANSCODE_VIA_SLIN = (1 << 10),
|
||||||
/*! Enable priority jumping in applications */
|
|
||||||
AST_OPT_FLAG_PRIORITY_JUMPING = (1 << 11),
|
|
||||||
/*! Dump core on a seg fault */
|
/*! Dump core on a seg fault */
|
||||||
AST_OPT_FLAG_DUMP_CORE = (1 << 12),
|
AST_OPT_FLAG_DUMP_CORE = (1 << 12),
|
||||||
/*! Cache sound files */
|
/*! Cache sound files */
|
||||||
@@ -94,7 +92,6 @@ enum ast_option_flags {
|
|||||||
#define ast_opt_no_color ast_test_flag(&ast_options, AST_OPT_FLAG_NO_COLOR)
|
#define ast_opt_no_color ast_test_flag(&ast_options, AST_OPT_FLAG_NO_COLOR)
|
||||||
#define ast_fully_booted ast_test_flag(&ast_options, AST_OPT_FLAG_FULLY_BOOTED)
|
#define ast_fully_booted ast_test_flag(&ast_options, AST_OPT_FLAG_FULLY_BOOTED)
|
||||||
#define ast_opt_transcode_via_slin ast_test_flag(&ast_options, AST_OPT_FLAG_TRANSCODE_VIA_SLIN)
|
#define ast_opt_transcode_via_slin ast_test_flag(&ast_options, AST_OPT_FLAG_TRANSCODE_VIA_SLIN)
|
||||||
#define ast_opt_priority_jumping ast_test_flag(&ast_options, AST_OPT_FLAG_PRIORITY_JUMPING)
|
|
||||||
#define ast_opt_dump_core ast_test_flag(&ast_options, AST_OPT_FLAG_DUMP_CORE)
|
#define ast_opt_dump_core ast_test_flag(&ast_options, AST_OPT_FLAG_DUMP_CORE)
|
||||||
#define ast_opt_cache_record_files ast_test_flag(&ast_options, AST_OPT_FLAG_CACHE_RECORD_FILES)
|
#define ast_opt_cache_record_files ast_test_flag(&ast_options, AST_OPT_FLAG_CACHE_RECORD_FILES)
|
||||||
#define ast_opt_timestamp ast_test_flag(&ast_options, AST_OPT_FLAG_TIMESTAMP)
|
#define ast_opt_timestamp ast_test_flag(&ast_options, AST_OPT_FLAG_TIMESTAMP)
|
||||||
|
@@ -782,12 +782,11 @@ static int handle_save_dialplan(int fd, int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* fireout general info */
|
/* fireout general info */
|
||||||
fprintf(output, "[general]\nstatic=%s\nwriteprotect=%s\nautofallthrough=%s\nclearglobalvars=%s\npriorityjumping=%s\n\n",
|
fprintf(output, "[general]\nstatic=%s\nwriteprotect=%s\nautofallthrough=%s\nclearglobalvars=%s\n\n",
|
||||||
static_config ? "yes" : "no",
|
static_config ? "yes" : "no",
|
||||||
write_protect_config ? "yes" : "no",
|
write_protect_config ? "yes" : "no",
|
||||||
autofallthrough_config ? "yes" : "no",
|
autofallthrough_config ? "yes" : "no",
|
||||||
clearglobalvars_config ? "yes" : "no",
|
clearglobalvars_config ? "yes" : "no");
|
||||||
ast_true(ast_variable_retrieve(cfg, "general", "priorityjumping")) ? "yes" : "no");
|
|
||||||
|
|
||||||
if ((v = ast_variable_browse(cfg, "globals"))) {
|
if ((v = ast_variable_browse(cfg, "globals"))) {
|
||||||
fprintf(output, "[globals]\n");
|
fprintf(output, "[globals]\n");
|
||||||
@@ -1362,7 +1361,6 @@ static int pbx_load_config(const char *config_file)
|
|||||||
if ((aft = ast_variable_retrieve(cfg, "general", "autofallthrough")))
|
if ((aft = ast_variable_retrieve(cfg, "general", "autofallthrough")))
|
||||||
autofallthrough_config = ast_true(aft);
|
autofallthrough_config = ast_true(aft);
|
||||||
clearglobalvars_config = ast_true(ast_variable_retrieve(cfg, "general", "clearglobalvars"));
|
clearglobalvars_config = ast_true(ast_variable_retrieve(cfg, "general", "clearglobalvars"));
|
||||||
ast_set2_flag(&ast_options, ast_true(ast_variable_retrieve(cfg, "general", "priorityjumping")), AST_OPT_FLAG_PRIORITY_JUMPING);
|
|
||||||
|
|
||||||
if ((cxt = ast_variable_retrieve(cfg, "general", "userscontext")))
|
if ((cxt = ast_variable_retrieve(cfg, "general", "userscontext")))
|
||||||
ast_copy_string(userscontext, cxt, sizeof(userscontext));
|
ast_copy_string(userscontext, cxt, sizeof(userscontext));
|
||||||
|
Reference in New Issue
Block a user