mod_voicemail: Add ability to skip greeting and instructions when leaving voicemail (MODAPP-331)
Add 1 or 2 of these variable in your user directory : skip_greeting = Will skip the user greeting or generated greeting skip_instructions = Will skip the system standards instructions to record message git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14990 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
c8de5ee105
commit
940536c8ba
|
@ -2826,6 +2826,11 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p
|
||||||
switch_event_t *vars = NULL;
|
switch_event_t *vars = NULL;
|
||||||
const char *vm_cc = NULL, *vtmp, *vm_ext = NULL;
|
const char *vm_cc = NULL, *vtmp, *vm_ext = NULL;
|
||||||
int disk_quota = 0;
|
int disk_quota = 0;
|
||||||
|
switch_bool_t skip_greeting = switch_true(switch_channel_get_variable(channel, "skip_greeting"));
|
||||||
|
switch_bool_t skip_instructions = switch_true(switch_channel_get_variable(channel, "skip_instructions"));
|
||||||
|
|
||||||
|
switch_channel_set_variable(channel, "skip_greeting", NULL);
|
||||||
|
switch_channel_set_variable(channel, "skip_instructions", NULL);
|
||||||
|
|
||||||
if (!(caller_id_name = switch_channel_get_variable(channel, "effective_caller_id_name"))) {
|
if (!(caller_id_name = switch_channel_get_variable(channel, "effective_caller_id_name"))) {
|
||||||
caller_id_name = caller_profile->caller_id_name;
|
caller_id_name = caller_profile->caller_id_name;
|
||||||
|
@ -2950,6 +2955,7 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p
|
||||||
}
|
}
|
||||||
|
|
||||||
greet:
|
greet:
|
||||||
|
if (!skip_greeting) {
|
||||||
memset(buf, 0, sizeof(buf));
|
memset(buf, 0, sizeof(buf));
|
||||||
args.input_callback = cancel_on_dtmf;
|
args.input_callback = cancel_on_dtmf;
|
||||||
args.buf = buf;
|
args.buf = buf;
|
||||||
|
@ -3009,11 +3015,16 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (*profile->skip_greet_key && !strcasecmp(buf, profile->skip_greet_key)) {
|
} else if (*profile->skip_greet_key && !strcasecmp(buf, profile->skip_greet_key)) {
|
||||||
record_macro = NULL;
|
skip_instructions = SWITCH_TRUE;
|
||||||
} else {
|
} else {
|
||||||
goto greet;
|
goto greet;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (skip_instructions) {
|
||||||
|
record_macro = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (disk_quota) {
|
if (disk_quota) {
|
||||||
callback_t callback = { 0 };
|
callback_t callback = { 0 };
|
||||||
|
|
Loading…
Reference in New Issue