mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 13:12:03 +00:00
tweak defaults
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5879 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -1031,6 +1031,7 @@ static void voicemail_check_main(switch_core_session_t *session, char *profile_n
|
||||
break;
|
||||
case VM_CHECK_FOLDER_SUMMARY:
|
||||
{
|
||||
int informed = 0;
|
||||
char msg_count[80] = "";
|
||||
switch_channel_set_variable(channel, "voicemail_current_folder", myfolder);
|
||||
message_count(profile, myid, domain_name, myfolder, &total_new_messages, &total_saved_messages,
|
||||
@@ -1038,15 +1039,13 @@ static void voicemail_check_main(switch_core_session_t *session, char *profile_n
|
||||
|
||||
if (total_new_urgent_messages > 0) {
|
||||
snprintf(msg_count, sizeof(msg_count), "%d:urgent-new:%s", total_new_urgent_messages, total_new_urgent_messages == 1 ? "" : "s");
|
||||
if ((status = switch_ivr_phrase_macro(session, VM_MESSAGE_COUNT_MACRO, msg_count, NULL, NULL)) != SWITCH_STATUS_SUCCESS) {
|
||||
goto end;
|
||||
}
|
||||
TRY_CODE(switch_ivr_phrase_macro(session, VM_MESSAGE_COUNT_MACRO, msg_count, NULL, NULL));
|
||||
informed++;
|
||||
}
|
||||
if (total_new_messages > 0) {
|
||||
snprintf(msg_count, sizeof(msg_count), "%d:new:%s", total_new_messages, total_new_messages == 1 ? "" : "s");
|
||||
if ((status = switch_ivr_phrase_macro(session, VM_MESSAGE_COUNT_MACRO, msg_count, NULL, NULL)) != SWITCH_STATUS_SUCCESS) {
|
||||
goto end;
|
||||
}
|
||||
TRY_CODE(switch_ivr_phrase_macro(session, VM_MESSAGE_COUNT_MACRO, msg_count, NULL, NULL));
|
||||
informed++;
|
||||
}
|
||||
|
||||
if (!heard_auto_new && total_new_messages > 0) {
|
||||
@@ -1058,16 +1057,14 @@ static void voicemail_check_main(switch_core_session_t *session, char *profile_n
|
||||
|
||||
if (total_saved_urgent_messages > 0) {
|
||||
snprintf(msg_count, sizeof(msg_count), "%d:urgent-saved:%s", total_saved_urgent_messages, total_saved_urgent_messages == 1 ? "" : "s");
|
||||
if ((status = switch_ivr_phrase_macro(session, VM_MESSAGE_COUNT_MACRO, msg_count, NULL, NULL)) != SWITCH_STATUS_SUCCESS) {
|
||||
goto end;
|
||||
}
|
||||
TRY_CODE(switch_ivr_phrase_macro(session, VM_MESSAGE_COUNT_MACRO, msg_count, NULL, NULL));
|
||||
informed++;
|
||||
}
|
||||
|
||||
if (total_saved_messages > 0) {
|
||||
snprintf(msg_count, sizeof(msg_count), "%d:saved:%s", total_saved_messages, total_saved_messages == 1 ? "" : "s");
|
||||
if ((status = switch_ivr_phrase_macro(session, VM_MESSAGE_COUNT_MACRO, msg_count, NULL, NULL)) != SWITCH_STATUS_SUCCESS) {
|
||||
goto end;
|
||||
}
|
||||
TRY_CODE(switch_ivr_phrase_macro(session, VM_MESSAGE_COUNT_MACRO, msg_count, NULL, NULL));
|
||||
informed++;
|
||||
}
|
||||
|
||||
if (!heard_auto_saved && total_saved_messages > 0) {
|
||||
@@ -1077,6 +1074,13 @@ static void voicemail_check_main(switch_core_session_t *session, char *profile_n
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!informed) {
|
||||
snprintf(msg_count, sizeof(msg_count), "0:new:s");
|
||||
TRY_CODE(switch_ivr_phrase_macro(session, VM_MESSAGE_COUNT_MACRO, msg_count, NULL, NULL));
|
||||
informed++;
|
||||
}
|
||||
|
||||
|
||||
vm_check_state = VM_CHECK_MENU;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user