- Logging clean up

- Whitespace removed and added, formatting fixed


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8136 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.4
Olle Johansson 20 years ago
parent 242a478023
commit 95144f75a5

@ -425,7 +425,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
ast_goto_if_exists(in, in->context, in->exten, in->priority + 101);
} else {
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_2 "No one is available to answer at this time (%d:%d/%d/%d)\n", numlines, numbusy, numcongestion, numnochan);
ast_verbose(VERBOSE_PREFIX_3 "No one is available to answer at this time (%d:%d/%d/%d)\n", numlines, numbusy, numcongestion, numnochan);
}
*to = 0;
return NULL;
@ -631,22 +631,24 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
}
break;
default:
if (option_debug)
ast_log(LOG_DEBUG, "Dunno what to do with control type %d\n", f->subclass);
}
} else if (single && (f->frametype == AST_FRAME_VOICE) &&
!(ast_test_flag(outgoing, OPT_RINGBACK|OPT_MUSICBACK))) {
if (ast_write(in, f))
ast_log(LOG_DEBUG, "Unable to forward frame\n");
ast_log(LOG_WARNING, "Unable to forward voice frame\n");
} else if (single && (f->frametype == AST_FRAME_IMAGE) &&
!(ast_test_flag(outgoing, OPT_RINGBACK|OPT_MUSICBACK))) {
if (ast_write(in, f))
ast_log(LOG_DEBUG, "Unable to forward image\n");
ast_log(LOG_WARNING, "Unable to forward image\n");
} else if (single && (f->frametype == AST_FRAME_TEXT) &&
!(ast_test_flag(outgoing, OPT_RINGBACK|OPT_MUSICBACK))) {
if (ast_write(in, f))
ast_log(LOG_DEBUG, "Unable to text\n");
ast_log(LOG_WARNING, "Unable to send text\n");
} else if (single && (f->frametype == AST_FRAME_HTML) && !ast_test_flag(outgoing, DIAL_NOFORWARDHTML))
ast_channel_sendhtml(in, f->subclass, f->data, f->datalen);
if(ast_channel_sendhtml(in, f->subclass, f->data, f->datalen) == -1)
ast_log(LOG_WARNING, "Unable to send URL\n");
ast_frfree(f);
} else {
@ -679,7 +681,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
if (ast_test_flag(peerflags, OPT_DTMF_EXIT)) {
context = pbx_builtin_getvar_helper(in, "EXITCONTEXT");
if (onedigit_goto(in, context, (char) f->subclass, 1)) {
if (option_verbose > 3)
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "User hit %c to disconnect call.\n", f->subclass);
*to=0;
*result = f->subclass;
@ -690,8 +692,8 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
}
if (ast_test_flag(peerflags, OPT_CALLER_HANGUP) &&
(f->subclass == '*')) { /* hmm it it not guarenteed to be '*' anymore. */
if (option_verbose > 3)
(f->subclass == '*')) { /* hmm it it not guaranteed to be '*' anymore. */
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "User hit %c to disconnect call.\n", f->subclass);
*to=0;
strcpy(status, "CANCEL");
@ -702,7 +704,8 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
/* Forward HTML stuff */
if (single && f && (f->frametype == AST_FRAME_HTML) && !ast_test_flag(outgoing, DIAL_NOFORWARDHTML))
ast_channel_sendhtml(outgoing->chan, f->subclass, f->data, f->datalen);
if(ast_channel_sendhtml(outgoing->chan, f->subclass, f->data, f->datalen) == -1)
ast_log(LOG_WARNING, "Unable to send URL\n");
if (single && ((f->frametype == AST_FRAME_VOICE) || (f->frametype == AST_FRAME_DTMF))) {
@ -922,6 +925,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
}
if(privdb_val == AST_PRIVACY_DENY ) {
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "Privacy DB reports PRIVACY_DENY for this callerid. Dial reports unavailable\n");
res=0;
goto out;
@ -1011,7 +1015,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
tmp->chan = ast_request(tech, chan->nativeformats, numsubst, &cause);
if (!tmp->chan) {
/* If we can't, just go on to the next call */
ast_log(LOG_NOTICE, "Unable to create channel of type '%s' (cause %d - %s)\n", tech, cause, ast_cause2str(cause));
ast_log(LOG_WARNING, "Unable to create channel of type '%s' (cause %d - %s)\n", tech, cause, ast_cause2str(cause));
HANDLE_CAUSE(cause, chan);
cur = rest;
if (!cur)
@ -1202,6 +1206,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
number = numsubst;
pbx_builtin_setvar_helper(chan, "DIALEDPEERNUMBER", number);
if (!ast_strlen_zero(args.url) && ast_channel_supports_html(peer) ) {
if (option_debug)
ast_log(LOG_DEBUG, "app_dial: sendurl=%s.\n", args.url);
ast_channel_sendurl( peer, args.url );
}
@ -1250,7 +1255,8 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
if( ast_test_flag(&opts, OPT_SCREENING) )
res2 = ast_play_and_wait(peer,"screen-callee-options");
}
/* priv-callee-options script:
/*! \page DialPrivacy Dial Privacy scripts
\par priv-callee-options script:
"Dial 1 if you wish this caller to reach you directly in the future,
and immediately connect to their incoming call
Dial 2 if you wish to send this caller to voicemail now and
@ -1259,9 +1265,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
Dial 4 to send this caller to a simple "go away" menu, now and forevermore.
Dial 5 to allow this caller to come straight thru to you in the future,
but right now, just this once, send them to voicemail."
*/
/* screen-callee-options script:
\par screen-callee-options script:
"Dial 1 if you wish to immediately connect to the incoming call
Dial 2 if you wish to send this caller to voicemail.
Dial 3 to send this callerr to the torture menus.
@ -1361,7 +1365,6 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
/* well, there seems basically two choices. Just patch the caller thru immediately,
or,... put 'em thru to voicemail. */
/* since the callee may have hung up, let's do the voicemail thing, no database decision */
if (option_verbose > 2)
ast_log(LOG_NOTICE, "privacy: no valid response from the callee. Sending the caller to voicemail, the callee isn't responding\n");
if (ast_test_flag(&opts, OPT_MUSICBACK)) {
ast_moh_stop(chan);
@ -1590,6 +1593,7 @@ out:
}
hanguptree(outgoing, NULL);
pbx_builtin_setvar_helper(chan, "DIALSTATUS", status);
if (option_debug)
ast_log(LOG_DEBUG, "Exiting with DIALSTATUS=%s.\n", status);
if ((ast_test_flag(peerflags, OPT_GO_ON)) && (!chan->_softhangup) && (res != AST_PBX_KEEPALIVE))

Loading…
Cancel
Save