resolve merge

This commit is contained in:
Rat Bajno-Atkinson 2025-01-06 10:34:18 -08:00
commit ff76318a8a
No known key found for this signature in database
4 changed files with 32 additions and 6 deletions

View File

@ -124,10 +124,12 @@
<action function="execute" data="sleep(100)"/>
<!-- To choose greeting -->
<!--
<action function="play-file" data="voicemail/vm-choose_greeting.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$2" method="pronounced" type="name_spelled"/>
<action function="execute" data="sleep(100)"/>
-->
<!-- To record your name -->
<action function="play-file" data="voicemail/vm-record_name2.wav"/>

View File

@ -49,7 +49,7 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_voicemail_shutdown);
SWITCH_MODULE_DEFINITION(mod_voicemail, mod_voicemail_load, mod_voicemail_shutdown, NULL);
#define VM_EVENT_MAINT "vm::maintenance"
#define VM_MAX_GREETINGS 9
#define VM_MAX_GREETINGS 1 // Cytracom only support greeting_1 now
#define VM_EVENT_QUEUE_SIZE 50000
static switch_status_t voicemail_inject(const char *data, switch_core_session_t *session);
@ -156,6 +156,7 @@ struct vm_profile {
char *tone_spec;
char *storage_dir;
switch_bool_t storage_dir_shared;
char *name_file_path_prefix;
char *callback_dialplan;
char *callback_context;
char *email_body;
@ -633,6 +634,8 @@ vm_profile_t *profile_set_config(vm_profile_t *profile)
&profile->storage_dir, "", &profile->config_str_pool, NULL, NULL);
SWITCH_CONFIG_SET_ITEM(profile->config[i++], "storage-dir-shared", SWITCH_CONFIG_BOOL, CONFIG_RELOADABLE,
&profile->storage_dir_shared, SWITCH_FALSE, NULL, NULL, NULL);
SWITCH_CONFIG_SET_ITEM(profile->config[i++], "name-file-path-prefix", SWITCH_CONFIG_STRING, CONFIG_RELOADABLE,
&profile->name_file_path_prefix, "/var/media/fs_voicemail", &profile->config_str_pool, NULL, NULL);
SWITCH_CONFIG_SET_ITEM(profile->config[i++], "callback-dialplan", SWITCH_CONFIG_STRING, CONFIG_RELOADABLE,
&profile->callback_dialplan, "XML", &profile->config_str_pool, NULL, NULL);
SWITCH_CONFIG_SET_ITEM(profile->config[i++], "callback-context", SWITCH_CONFIG_STRING, CONFIG_RELOADABLE,
@ -2210,7 +2213,7 @@ static void voicemail_check_main(switch_core_session_t *session, vm_profile_t *p
if (!strcmp(input, profile->main_menu_key)) {
vm_check_state = VM_CHECK_MENU;
} else if (!strcmp(input, profile->choose_greeting_key)) {
} else if (!strcmp(input, profile->choose_greeting_key) && (VM_MAX_GREETINGS > 1)) { // Cytracom only supports greeting_1 now
int num;
switch_input_args_t greeting_args = { 0 };
greeting_args.input_callback = cancel_on_dtmf;
@ -2267,9 +2270,13 @@ static void voicemail_check_main(switch_core_session_t *session, vm_profile_t *p
switch_safe_free(file_path);
} else if (!strcmp(input, profile->record_greeting_key)) {
int num;
TRY_CODE(vm_macro_get(session, VM_CHOOSE_GREETING_MACRO, key_buf, input, sizeof(input), 1, "", &term, timeout));
if (VM_MAX_GREETINGS > 1) { // Cytracom only support greeting_1 now
TRY_CODE(vm_macro_get(session, VM_CHOOSE_GREETING_MACRO, key_buf, input, sizeof(input), 1, "", &term, timeout));
num = atoi(input);
} else {
num = 1;
}
num = atoi(input);
if (num < 1 || num > VM_MAX_GREETINGS) {
TRY_CODE(switch_ivr_phrase_macro(session, VM_CHOOSE_GREETING_FAIL_MACRO, NULL, NULL, NULL));
} else {
@ -3498,6 +3505,9 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p
switch_snprintfv(sql, sizeof(sql), "select * from voicemail_prefs where username='%q' and domain='%q'", id, domain_name);
vm_execute_sql_callback(profile, profile->mutex, sql, prefs_callback, &cbt);
// Cytracom change - Override the name_path from SQL voicemail_prefs with the name_path from the voicemail.conf.xml file, because SQL isn't always synced.
switch_snprintf(cbt.name_path, sizeof(cbt.name_path), "%s/%s/%s/recorded_name.wav", profile->name_file_path_prefix, domain_name, id);
if (!vm_ext) {
vm_ext = profile->file_ext;
}

View File

@ -373,8 +373,11 @@ static void process_cdr(cdr_data_t *data)
if (cur_try > 0) {
switch_yield(globals.delay * 1000000);
}
destUrl = switch_mprintf("%s?uuid=%s", globals.urls[globals.url_index], data->uuid);
//<<--- cytracom change to support elastic 5.6 ----
//destUrl = switch_mprintf("%s?uuid=%s", globals.urls[globals.url_index], data->uuid);
destUrl = switch_mprintf("%s/%s", globals.urls[globals.url_index], data->uuid);
// --- cytracom change --->>
switch_curl_easy_setopt(curl_handle, CURLOPT_URL, destUrl);
if (!strncasecmp(destUrl, "https", 5)) {

View File

@ -2706,6 +2706,17 @@ SWITCH_DECLARE(void) switch_channel_event_set_basic_data(switch_channel_t *chann
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Channel-Call-UUID", switch_core_session_get_uuid(channel->session));
}
//<<--- cyracom changes for -- cliq and tenfold
if ((v = switch_channel_get_variable_dup(channel, "c_linked_id", SWITCH_FALSE, -1))) {
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Linked-Id", v);
}
if ((v = switch_channel_get_variable_dup(channel, "c_direction", SWITCH_FALSE, -1))) {
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Actual-Caller-Direction", v);
}
// ----- cytracom changes ---->>
if (switch_channel_down_nosig(channel)) {
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Answer-State", "hangup");
} else if (switch_channel_test_flag(channel, CF_ANSWERED)) {