[asterisk-commits] trunk r19350 - in /trunk: ./ apps/app_page.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Apr 11 14:51:18 MST 2006
Author: kpfleming
Date: Tue Apr 11 16:51:17 2006
New Revision: 19350
URL: http://svn.digium.com/view/asterisk?rev=19350&view=rev
Log:
Merged revisions 19348 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r19348 | kpfleming | 2006-04-11 16:50:18 -0500 (Tue, 11 Apr 2006) | 2 lines
don't call the originating device as part of the Page() operation (issue #6932)
........
Modified:
trunk/ (props changed)
trunk/apps/app_page.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Modified: trunk/apps/app_page.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_page.c?rev=19350&r1=19349&r2=19350&view=diff
==============================================================================
--- trunk/apps/app_page.c (original)
+++ trunk/apps/app_page.c Tue Apr 11 16:51:17 2006
@@ -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 at digium.com>
*
@@ -147,6 +147,7 @@
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");
@@ -171,7 +172,16 @@
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);
@@ -179,6 +189,7 @@
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)
More information about the asterisk-commits
mailing list