summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2013-02-24 15:45:29 +0000
committerMatthew Jordan <mjordan@digium.com>2013-02-24 15:45:29 +0000
commit2df01ab32b74ec4fee194295969eaadc6c4189c6 (patch)
treedf3b82e577af99809f13c97718a7ddaa1c3c2ae5
parente9bcf9826a71854b9a4df5b328d638d197dd0647 (diff)
Make ParkAndAnnounce return to priority + 1 when return context is not defined
The ParkAndAnnounce application documentation for the optional return_context parameter states the following: return_context The goto-style label to jump the call back into after timeout. Default 'priority+1'. Unfortunately, the application was sending the channel back into the dialplan at 'priority', which is the ParkAndAnnounce application call. This causes an infinite loop of the channel constantly being parked, announced, timed out, parked, announced, timed out... while fun, especially for those callers you wish to drive to the end of madness, this was not the intent of the application. (closes issue ASTERISK-20113) Reported by: serginuez patches: app_parkandannounce.diff uploaded by serginuez (License 6405) ........ Merged revisions 381916 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 381917 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381918 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--apps/app_parkandannounce.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/app_parkandannounce.c b/apps/app_parkandannounce.c
index 172f0236c..6d6ccae26 100644
--- a/apps/app_parkandannounce.c
+++ b/apps/app_parkandannounce.c
@@ -139,6 +139,8 @@ static int parkandannounce_exec(struct ast_channel *chan, const char *data)
if (!ast_strlen_zero(args.return_context)) {
ast_clear_flag(ast_channel_flags(chan), AST_FLAG_IN_AUTOLOOP);
ast_parseable_goto(chan, args.return_context);
+ } else {
+ ast_channel_priority_set(chan, ast_channel_priority(chan) + 1);
}
ast_verb(3, "Return Context: (%s,%s,%d) ID: %s\n", ast_channel_context(chan), ast_channel_exten(chan),