aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-29 17:53:32 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-29 17:53:32 +0000
commit893f06eee0369146899121d58e5955eb8f423c51 (patch)
treed564287ae0830a4f61063440cbed476979e080bb
parent91df49dd46d7cbceb5eb7080a4b374ab024876f9 (diff)
Added the option s to the Park application which will silence the announcement of the parking space number. Also, fixes the bug of just clearing the flags instead of actually parsing the arguments to Park.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@140491 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--CHANGES1
-rw-r--r--main/features.c8
2 files changed, 7 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index c032471d0..6cdf26b35 100644
--- a/CHANGES
+++ b/CHANGES
@@ -112,6 +112,7 @@ Application Changes
status variable SENDIMAGESTATUS to one of 'SUCCESS', 'FAILURE', or
'UNSUPPORTED'. This change makes SendImage() more consistent with other
applications.
+ * Park has a new option, 's', which silences the announcement of the parking space number.
SIP Changes
-----------
diff --git a/main/features.c b/main/features.c
index 9d228acc2..6aa717aec 100644
--- a/main/features.c
+++ b/main/features.c
@@ -182,6 +182,7 @@ static char *descrip2 =
" options - A list of options for this parked call. Valid options are:\n"
" 'r' - Send ringing instead of MOH to the parked call.\n"
" 'R' - Randomize the selection of a parking space.\n"
+" 's' - Silence announcement of the parking space number.\n"
"";
static struct ast_app *monitor_app = NULL;
@@ -431,6 +432,8 @@ enum ast_park_call_options {
/*! Randomly choose a parking spot for the caller instead of choosing
* the first one that is available. */
AST_PARK_OPT_RANDOMIZE = (1 << 1),
+ /*! Do not announce the parking number */
+ AST_PARK_OPT_SILENCE = (1 << 2),
};
struct ast_park_call_args {
@@ -625,7 +628,7 @@ static int ast_park_call_full(struct ast_channel *chan, struct ast_channel *peer
if (!con) /* Still no context? Bad */
ast_log(LOG_ERROR, "Parking context '%s' does not exist and unable to create\n", parkinglot->parking_con);
/* Tell the peer channel the number of the parking space */
- if (peer && (ast_strlen_zero(args->orig_chan_name) || !strcasecmp(peer->name, args->orig_chan_name))) { /* Only say number if it's a number and the channel hasn't been masqueraded away */
+ if (peer && !ast_test_flag(args, AST_PARK_OPT_SILENCE) && (ast_strlen_zero(args->orig_chan_name) || !strcasecmp(peer->name, args->orig_chan_name))) { /* Only say number if it's a number and the channel hasn't been masqueraded away */
/* If a channel is masqueraded into peer while playing back the parking slot number do not continue playing it back. This is the case if an attended transfer occurs. */
ast_set_flag(peer, AST_FLAG_MASQ_NOSTREAM);
ast_say_digits(peer, pu->parkingnum, "", peer->language);
@@ -2602,6 +2605,7 @@ struct ast_parkinglot *find_parkinglot(const char *name)
AST_APP_OPTIONS(park_call_options, BEGIN_OPTIONS
AST_APP_OPTION('r', AST_PARK_OPT_RINGING),
AST_APP_OPTION('R', AST_PARK_OPT_RANDOMIZE),
+ AST_APP_OPTION('s', AST_PARK_OPT_SILENCE),
END_OPTIONS );
/*! \brief Park a call */
@@ -2670,7 +2674,7 @@ static int park_call_exec(struct ast_channel *chan, void *data)
}
}
- ast_app_parse_options(park_call_options, &flags, NULL, NULL);
+ ast_app_parse_options(park_call_options, &flags, NULL, app_args.options);
args.flags = flags.flags;
res = ast_park_call_full(chan, chan, &args);