const char *short_greeting_sound,
const char *invalid_sound,
const char *exit_sound,
+ const char *transfer_sound,
const char *confirm_macro,
const char *confirm_key,
const char *tts_engine,
*\param short_greeting_sound Optional pointer to a shorter main sound for subsequent loops.
*\param invalid_sound Optional pointer to a sound to play after invalid input.
*\param exit_sound Optional pointer to a sound to play upon exiting the menu.
+ *\param transfer_sound Optional pointer to a sound to play upon transfer away from the menu.
*\param confirm_macro phrase macro name to confirm input
*\param confirm_key the dtmf key required for positive confirmation
*\param tts_engine the tts engine to use for this menu
const char *short_greeting_sound,
const char *invalid_sound,
const char *exit_sound,
+ const char *transfer_sound,
const char *confirm_macro,
const char *confirm_key,
const char *tts_engine,
const char *short_greeting_sound,
const char *invalid_sound,
const char *exit_sound,
+ const char *transfer_sound,
const char *confirm_macro,
const char *confirm_key,
const char *tts_engine,
}
switch_ivr_menu_init(&menu, main ? main->menu : NULL, name, greeting_sound, short_greeting_sound, invalid_sound,
- exit_sound, confirm_macro, confirm_key, tts_engine, tts_voice, confirm_attempts, inter_timeout,
+ exit_sound, transfer_sound, confirm_macro, confirm_key, tts_engine, tts_voice, confirm_attempts, inter_timeout,
digit_len, timeout, max_failures, max_timeouts, pool);
char *short_greeting_sound;
char *invalid_sound;
char *exit_sound;
+ char *transfer_sound;
char *buf;
char *ptr;
char *confirm_macro;
const char *short_greeting_sound,
const char *invalid_sound,
const char *exit_sound,
+ const char *transfer_sound,
const char *confirm_macro,
const char *confirm_key,
const char *tts_engine,
menu->invalid_sound = switch_core_strdup(menu->pool, invalid_sound);
}
+ if (!zstr(transfer_sound)) {
+ menu->transfer_sound = switch_core_strdup(menu->pool, transfer_sound);
+ }
+
if (!zstr(exit_sound)) {
menu->exit_sound = switch_core_strdup(menu->pool, exit_sound);
}
}
if ((application_interface = switch_loadable_module_get_application_interface(app_name))) {
+ if (!zstr(menu->transfer_sound) && !strcmp(app_name, "transfer")) {
+ status = play_and_collect(session, menu, menu->transfer_sound, 0);
+ }
+
switch_core_session_exec(session, application_interface, app_arg);
UNPROTECT_INTERFACE(application_interface);
status = SWITCH_STATUS_SUCCESS;
const char *greet_short = switch_xml_attr(xml_menu, "greet-short"); /* if the attr doesn't exist, return NULL */
const char *invalid_sound = switch_xml_attr(xml_menu, "invalid-sound"); /* if the attr doesn't exist, return NULL */
const char *exit_sound = switch_xml_attr(xml_menu, "exit-sound"); /* if the attr doesn't exist, return NULL */
+ const char *transfer_sound = switch_xml_attr(xml_menu, "transfer-sound"); /* if the attr doesn't exist, return NULL */
const char *timeout = switch_xml_attr_soft(xml_menu, "timeout"); /* if the attr doesn't exist, return "" */
const char *max_failures = switch_xml_attr_soft(xml_menu, "max-failures"); /* if the attr doesn't exist, return "" */
const char *max_timeouts = switch_xml_attr_soft(xml_menu, "max-timeouts");
greet_short,
invalid_sound,
exit_sound,
+ transfer_sound,
confirm_macro,
confirm_key,
tts_engine,