From 0bc3be529d0fee2a0e3d6b2a030de7ab2fdd8d6a Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 2 Nov 2007 21:58:04 +0000 Subject: [PATCH] add patchfrom MODAPP-42 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6153 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- conf/voicemail.conf.xml | 5 ++++ .../mod_voicemail/mod_voicemail.c | 26 ++++++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/conf/voicemail.conf.xml b/conf/voicemail.conf.xml index 43335ce1ae..c91affe6e9 100644 --- a/conf/voicemail.conf.xml +++ b/conf/voicemail.conf.xml @@ -29,6 +29,11 @@ + + + ff_key = *ff_key; *profile->rew_key = *rew_key; *profile->urgent_key = *urgent_key; + *profile->operator_key = *operator_key; + profile->operator_ext = switch_core_strdup(globals.pool, operator_ext); profile->storage_dir = switch_core_strdup(globals.pool, storage_dir); profile->tone_spec = switch_core_strdup(globals.pool, tone_spec); profile->callback_dialplan = switch_core_strdup(globals.pool, callback_dialplan); @@ -1665,6 +1675,20 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, cons if (*buf != '\0') { if (!strcasecmp(buf, profile->main_menu_key)) { voicemail_check_main(session, profile_name, domain_name, id, 0); + } else if(!strcasecmp(buf, profile->operator_key) && !switch_strlen_zero(profile->operator_key)) { + int argc; + char *argv[4]; + char *mycmd; + + if (!switch_strlen_zero(profile->operator_ext) && (mycmd = switch_core_session_strdup(session, profile->operator_ext))) { + argc = switch_separate_string(mycmd, ' ', argv, (sizeof(argv) / sizeof(argv[0]))); + if(argc >= 1 && argc <= 4) { + switch_ivr_session_transfer(session, argv[0], argv[1], argv[2]); + /* the application still runs after we leave it so we need to make sure that we dont do anything evil */ + send_mail=0; + goto end; + } + } } else { goto greet; }