aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-11 21:50:18 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-11 21:50:18 +0000
commit1ba459ced6ee4017eb45cb917ace62d4cea3eed2 (patch)
tree41d0196075c0b6fe5763cf420a810c3c04db49b7 /apps
parent0dfd34feb54d4b852b62455a368579b5df0af941 (diff)
don't call the originating device as part of the Page() operation (issue #6932)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@19348 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_page.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/apps/app_page.c b/apps/app_page.c
index 7826d285b..6898bfa27 100644
--- a/apps/app_page.c
+++ b/apps/app_page.c
@@ -1,7 +1,7 @@
/*
* Asterisk -- An open source telephony toolkit.
*
- * Copyright (c) 2004 - 2005 Digium, Inc. All rights reserved.
+ * Copyright (c) 2004 - 2006 Digium, Inc. All rights reserved.
*
* Mark Spencer <markster@digium.com>
*
@@ -149,6 +149,7 @@ static int page_exec(struct ast_channel *chan, void *data)
struct ast_app *app;
char *tmp;
int res=0;
+ char originator[AST_CHANNEL_NAME];
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "This application requires at least one argument (destination(s) to page)\n");
@@ -175,7 +176,16 @@ static int page_exec(struct ast_channel *chan, void *data)
ast_app_parse_options(page_opts, &flags, NULL, options);
snprintf(meetmeopts, sizeof(meetmeopts), "%ud|%sqxdw", confid, ast_test_flag(&flags, PAGE_DUPLEX) ? "" : "m");
+
+ ast_copy_string(originator, chan->name, sizeof(originator));
+ if ((tmp = strchr(originator, '-')))
+ *tmp = '\0';
+
while ((tech = strsep(&tmp, "&"))) {
+ /* don't call the originating device */
+ if (!strcasecmp(tech, originator))
+ continue;
+
if ((resource = strchr(tech, '/'))) {
*resource++ = '\0';
launch_page(chan, meetmeopts, tech, resource);
@@ -183,6 +193,7 @@ static int page_exec(struct ast_channel *chan, void *data)
ast_log(LOG_WARNING, "Incomplete destination '%s' supplied.\n", tech);
}
}
+
if (!ast_test_flag(&flags, PAGE_QUIET)) {
res = ast_streamfile(chan, "beep", chan->language);
if (!res)