aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_parkandannounce.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-26 15:49:18 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-26 15:49:18 +0000
commit4f3c4dc7f238b64a21172be86266311c9c645c77 (patch)
treede4bd130dafa592858306d2ac6bcc5f85fd51cc8 /apps/app_parkandannounce.c
parent07772bc9e3ef6636a3e99e07d2aea3a06988f0c9 (diff)
Do a massive conversion for using the ast_verb() macro
(closes issue #10277, patches by mvanbaak) Basically, this changes ... if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3, "Something\n"); to ... ast_verb(3, "Something\n"); git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77299 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_parkandannounce.c')
-rw-r--r--apps/app_parkandannounce.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/apps/app_parkandannounce.c b/apps/app_parkandannounce.c
index d7d5fc787..235bde926 100644
--- a/apps/app_parkandannounce.c
+++ b/apps/app_parkandannounce.c
@@ -109,26 +109,22 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data)
}
dialtech = strsep(&args.dial, "/");
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Dial Tech,String: (%s,%s)\n", dialtech, args.dial);
+ ast_verb(3, "Dial Tech,String: (%s,%s)\n", dialtech, args.dial);
if (!ast_strlen_zero(args.return_context))
ast_parseable_goto(chan, args.return_context);
- if (option_verbose > 2) {
- ast_verbose(VERBOSE_PREFIX_3 "Return Context: (%s,%s,%d) ID: %s\n", chan->context, chan->exten, chan->priority, chan->cid.cid_num);
+ ast_verb(3, "Return Context: (%s,%s,%d) ID: %s\n", chan->context, chan->exten, chan->priority, chan->cid.cid_num);
if (!ast_exists_extension(chan, chan->context, chan->exten, chan->priority, chan->cid.cid_num)) {
- ast_verbose(VERBOSE_PREFIX_3 "Warning: Return Context Invalid, call will return to default|s\n");
+ ast_verb(3, "Warning: Return Context Invalid, call will return to default|s\n");
}
- }
/* we are using masq_park here to protect * from touching the channel once we park it. If the channel comes out of timeout
before we are done announcing and the channel is messed with, Kablooeee. So we use Masq to prevent this. */
ast_masq_park_call(chan, NULL, timeout, &lot);
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Call Parking Called, lot: %d, timeout: %d, context: %s\n", lot, timeout, args.return_context);
+ ast_verb(3, "Call Parking Called, lot: %d, timeout: %d, context: %s\n", lot, timeout, args.return_context);
/* Now place the call to the extension */
@@ -139,11 +135,9 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data)
if (dchan) {
if (dchan->_state == AST_STATE_UP) {
- if (option_verbose > 3)
- ast_verbose(VERBOSE_PREFIX_4 "Channel %s was answered.\n", dchan->name);
+ ast_verb(4, "Channel %s was answered.\n", dchan->name);
} else {
- if (option_verbose > 3)
- ast_verbose(VERBOSE_PREFIX_4 "Channel %s was never answered.\n", dchan->name);
+ ast_verb(4, "Channel %s was never answered.\n", dchan->name);
ast_log(LOG_WARNING, "PARK: Channel %s was never answered for the announce.\n", dchan->name);
ast_hangup(dchan);
return -1;
@@ -157,16 +151,14 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data)
/* now we have the call placed and are ready to play stuff to it */
- if (option_verbose > 3)
- ast_verbose(VERBOSE_PREFIX_4 "Announce Template:%s\n", args.template);
+ ast_verb(4, "Announce Template:%s\n", args.template);
for (looptemp = 0, tmp[looptemp++] = strsep(&args.template, ":");
looptemp < sizeof(tmp) / sizeof(tmp[0]);
tmp[looptemp++] = strsep(&args.template, ":"));
for (i = 0; i < looptemp; i++) {
- if (option_verbose > 3)
- ast_verbose(VERBOSE_PREFIX_4 "Announce:%s\n", tmp[i]);
+ ast_verb(4, "Announce:%s\n", tmp[i]);
if (!strcmp(tmp[i], "PARKED")) {
ast_say_digits(dchan, lot, "", dchan->language);
} else {