From 13ec428cc6f3e88a54dfdac89a79a4ee94268c26 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 4 Mar 2009 21:22:41 +0000 Subject: [PATCH] make yes no on and off all work in privacy app git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12424 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/applications/mod_dptools/mod_dptools.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/mod/applications/mod_dptools/mod_dptools.c b/src/mod/applications/mod_dptools/mod_dptools.c index b81b961689..12e2f01a5e 100644 --- a/src/mod/applications/mod_dptools/mod_dptools.c +++ b/src/mod/applications/mod_dptools/mod_dptools.c @@ -968,17 +968,18 @@ SWITCH_STANDARD_APP(privacy_function) } else { switch_set_flag(caller_profile, SWITCH_CPF_SCREEN); - if (!strcasecmp(data, "no")) { - switch_clear_flag(caller_profile, SWITCH_CPF_HIDE_NAME); - switch_clear_flag(caller_profile, SWITCH_CPF_HIDE_NUMBER); - } else if (!strcasecmp(data, "yes")) { - switch_set_flag(caller_profile, SWITCH_CPF_HIDE_NAME | SWITCH_CPF_HIDE_NUMBER); - } else if (!strcasecmp(data, "full")) { + + if (!strcasecmp(data, "full")) { switch_set_flag(caller_profile, SWITCH_CPF_HIDE_NAME | SWITCH_CPF_HIDE_NUMBER); } else if (!strcasecmp(data, "name")) { switch_set_flag(caller_profile, SWITCH_CPF_HIDE_NAME); } else if (!strcasecmp(data, "number")) { switch_set_flag(caller_profile, SWITCH_CPF_HIDE_NUMBER); + } else if (switch_true(data)) { + switch_set_flag(caller_profile, SWITCH_CPF_HIDE_NAME | SWITCH_CPF_HIDE_NUMBER); + } else if (switch_false(data)) { + switch_clear_flag(caller_profile, SWITCH_CPF_HIDE_NAME); + switch_clear_flag(caller_profile, SWITCH_CPF_HIDE_NUMBER); } else { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "INVALID privacy mode specified. Use a valid mode [no|yes|name|full|number].\n"); }