[Freeswitch-svn] [commit] r12424 - freeswitch/trunk/src/mod/applications/mod_dptools
FreeSWITCH SVN
anthm at freeswitch.org
Wed Mar 4 13:22:41 PST 2009
Author: anthm
Date: Wed Mar 4 15:22:41 2009
New Revision: 12424
Log:
make yes no on and off all work in privacy app
Modified:
freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
Modified: freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c Wed Mar 4 15:22:41 2009
@@ -968,17 +968,18 @@
} 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");
}
More information about the Freeswitch-svn
mailing list