From 763d4dcabb3cfc39623651db08e41e4729e8bff9 Mon Sep 17 00:00:00 2001 From: Mark Michelson Date: Mon, 15 Dec 2008 20:07:03 +0000 Subject: [PATCH] Add an 'i' option to app_page. This option works the same as the 'i' options for app_dial and app_queue, in that they will ignore any attempts by phones to forward the call. (closes issue #13977) Reported by: putnopvut Patches: page_ignore_forwards.patch uploaded by putnopvut (license 60) Tested by: putnopvut, acunningham git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164428 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_page.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/app_page.c b/apps/app_page.c index 7d1dca447b..1884f4347f 100644 --- a/apps/app_page.c +++ b/apps/app_page.c @@ -68,6 +68,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") + @@ -103,6 +106,7 @@ enum { PAGE_QUIET = (1 << 1), PAGE_RECORD = (1 << 2), PAGE_SKIP = (1 << 3), + PAGE_IGNORE_FORWARDS = (1 << 4), } page_opt_flags; AST_APP_OPTIONS(page_opts, { @@ -110,6 +114,7 @@ AST_APP_OPTIONS(page_opts, { AST_APP_OPTION('q', PAGE_QUIET), AST_APP_OPTION('r', PAGE_RECORD), AST_APP_OPTION('s', PAGE_SKIP), + AST_APP_OPTION('i', PAGE_IGNORE_FORWARDS), }); #define MAX_DIALS 128 @@ -209,6 +214,10 @@ static int page_exec(struct ast_channel *chan, void *data) ast_dial_set_global_timeout(dial, timeout * 1000); } + if (ast_test_flag(&flags, PAGE_IGNORE_FORWARDS)) { + ast_dial_option_global_enable(dial, AST_DIAL_OPTION_DISABLE_CALL_FORWARDING, NULL); + } + /* Run this dial in async mode */ ast_dial_run(dial, chan, 1);