|
|
@ -82,7 +82,7 @@ static char *descrip =
|
|
|
|
" ANSWEREDTIME - This is the amount of time for actual call.\n"
|
|
|
|
" ANSWEREDTIME - This is the amount of time for actual call.\n"
|
|
|
|
" DIALSTATUS - This is the status of the call:\n"
|
|
|
|
" DIALSTATUS - This is the status of the call:\n"
|
|
|
|
" CHANUNAVAIL | CONGESTION | NOANSWER | BUSY | ANSWER | CANCEL\n"
|
|
|
|
" CHANUNAVAIL | CONGESTION | NOANSWER | BUSY | ANSWER | CANCEL\n"
|
|
|
|
" DONTCALL | TORTURE\n"
|
|
|
|
" DONTCALL | TORTURE | INVALIDARGS\n"
|
|
|
|
" For the Privacy and Screening Modes, the DIALSTATUS variable will be set to\n"
|
|
|
|
" For the Privacy and Screening Modes, the DIALSTATUS variable will be set to\n"
|
|
|
|
"DONTCALL if the called party chooses to send the calling party to the 'Go Away'\n"
|
|
|
|
"DONTCALL if the called party chooses to send the calling party to the 'Go Away'\n"
|
|
|
|
"script. The DIALSTATUS variable will be set to TORTURE if the called party\n"
|
|
|
|
"script. The DIALSTATUS variable will be set to TORTURE if the called party\n"
|
|
|
@ -1183,6 +1183,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
|
|
|
|
struct privacy_args pa = {
|
|
|
|
struct privacy_args pa = {
|
|
|
|
.sentringing = 0,
|
|
|
|
.sentringing = 0,
|
|
|
|
.privdb_val = 0,
|
|
|
|
.privdb_val = 0,
|
|
|
|
|
|
|
|
.status = "INVALIDARGS",
|
|
|
|
};
|
|
|
|
};
|
|
|
|
int sentringing = 0, moh = 0;
|
|
|
|
int sentringing = 0, moh = 0;
|
|
|
|
const char *outbound_group = NULL;
|
|
|
|
const char *outbound_group = NULL;
|
|
|
@ -1201,6 +1202,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
|
|
|
|
|
|
|
|
|
|
|
|
if (ast_strlen_zero(data)) {
|
|
|
|
if (ast_strlen_zero(data)) {
|
|
|
|
ast_log(LOG_WARNING, "Dial requires an argument (technology/number)\n");
|
|
|
|
ast_log(LOG_WARNING, "Dial requires an argument (technology/number)\n");
|
|
|
|
|
|
|
|
pbx_builtin_setvar_helper(chan, "DIALSTATUS", pa.status);
|
|
|
|
return -1;
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1213,11 +1215,14 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
|
|
|
|
memset(&config,0,sizeof(struct ast_bridge_config));
|
|
|
|
memset(&config,0,sizeof(struct ast_bridge_config));
|
|
|
|
|
|
|
|
|
|
|
|
if (!ast_strlen_zero(args.options) &&
|
|
|
|
if (!ast_strlen_zero(args.options) &&
|
|
|
|
ast_app_parse_options(dial_exec_options, &opts, opt_args, args.options))
|
|
|
|
ast_app_parse_options(dial_exec_options, &opts, opt_args, args.options)) {
|
|
|
|
|
|
|
|
pbx_builtin_setvar_helper(chan, "DIALSTATUS", pa.status);
|
|
|
|
goto done;
|
|
|
|
goto done;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (ast_strlen_zero(args.peers)) {
|
|
|
|
if (ast_strlen_zero(args.peers)) {
|
|
|
|
ast_log(LOG_WARNING, "Dial requires an argument (technology/number)\n");
|
|
|
|
ast_log(LOG_WARNING, "Dial requires an argument (technology/number)\n");
|
|
|
|
|
|
|
|
pbx_builtin_setvar_helper(chan, "DIALSTATUS", pa.status);
|
|
|
|
goto done;
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1231,6 +1236,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
|
|
|
|
calldurationlimit = atoi(opt_args[OPT_ARG_DURATION_STOP]);
|
|
|
|
calldurationlimit = atoi(opt_args[OPT_ARG_DURATION_STOP]);
|
|
|
|
if (!calldurationlimit) {
|
|
|
|
if (!calldurationlimit) {
|
|
|
|
ast_log(LOG_WARNING, "Dial does not accept S(%s), hanging up.\n", opt_args[OPT_ARG_DURATION_STOP]);
|
|
|
|
ast_log(LOG_WARNING, "Dial does not accept S(%s), hanging up.\n", opt_args[OPT_ARG_DURATION_STOP]);
|
|
|
|
|
|
|
|
pbx_builtin_setvar_helper(chan, "DIALSTATUS", pa.status);
|
|
|
|
goto done;
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (option_verbose > 2)
|
|
|
|
if (option_verbose > 2)
|
|
|
|