aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-11 20:37:09 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-11 20:37:09 +0000
commite4f5db2844b84a7acd8ede330e8572ffa46359d4 (patch)
treee99ac533aef0719c8c6e173839d0df35ea0622c2 /apps
parent1c3fb0443b22db7cead03b5db51b3de5f47ec515 (diff)
Merged revisions 107710 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r107710 | file | 2008-03-11 17:36:14 -0300 (Tue, 11 Mar 2008) | 6 lines Dial a device even if it's state is unknown. (closes issue #12184) Reported by: bluecrow76 Patches: asterisk-svn-app_page.c.devicestate_unknown.diff uploaded by bluecrow76 (license 270) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@107711 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_page.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/app_page.c b/apps/app_page.c
index 2ea367edd..5db858ce9 100644
--- a/apps/app_page.c
+++ b/apps/app_page.c
@@ -124,9 +124,14 @@ static int page_exec(struct ast_channel *chan, void *data)
}
/* Ensure device is not in use if skip option is enabled */
- if (ast_test_flag(&flags, PAGE_SKIP) && (state = ast_device_state(tech)) != AST_DEVICE_NOT_INUSE) {
- ast_log(LOG_WARNING, "Destination '%s' has device state '%s'.\n", tech, devstate2str(state));
- continue;
+ if (ast_test_flag(&flags, PAGE_SKIP)) {
+ state = ast_device_state(tech);
+ if (state == AST_DEVICE_UNKNOWN) {
+ ast_log(LOG_WARNING, "Destination '%s' has device state '%s'. Paging anyway.\n", tech, devstate2str(state));
+ } else if (state != AST_DEVICE_NOT_INUSE) {
+ ast_log(LOG_WARNING, "Destination '%s' has device state '%s'.\n", tech, devstate2str(state));
+ continue;
+ }
}
*resource++ = '\0';