FS-5178 --resolve
This commit is contained in:
parent
0f4f0e71c3
commit
0fa438a748
|
@ -131,7 +131,9 @@ switch_status_t skinny_profile_dump(const skinny_profile_t *profile, switch_stre
|
|||
stream->write_function(stream, "CALLS-OUT \t%d\n", profile->ob_calls);
|
||||
stream->write_function(stream, "FAILED-CALLS-OUT \t%d\n", profile->ob_failed_calls);
|
||||
/* listener */
|
||||
stream->write_function(stream, "Listener-Threads \t%d\n", profile->listener_threads);
|
||||
stream->write_function(stream, "Listener-Threads \t%d\n", profile->listener_threads);
|
||||
stream->write_function(stream, "Ext-Voicemail \t%s\n", profile->ext_voicemail);
|
||||
stream->write_function(stream, "Ext-Redial \t%s\n", profile->ext_redial);
|
||||
stream->write_function(stream, "%s\n", line);
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
@ -1727,6 +1729,14 @@ switch_status_t skinny_profile_set(skinny_profile_t *profile, const char *var, c
|
|||
profile->debug = atoi(val);
|
||||
} else if (!strcasecmp(var, "auto-restart")) {
|
||||
profile->auto_restart = switch_true(val);
|
||||
} else if (!strcasecmp(var, "ext-voicemail")) {
|
||||
if (!profile->ext_voicemail || strcmp(val, profile->ext_voicemail)) {
|
||||
profile->ext_voicemail = switch_core_strdup(profile->pool, val);
|
||||
}
|
||||
} else if (!strcasecmp(var, "ext-redial")) {
|
||||
if (!profile->ext_redial || strcmp(val, profile->ext_redial)) {
|
||||
profile->ext_redial = switch_core_strdup(profile->pool, val);
|
||||
}
|
||||
} else {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
@ -1811,6 +1821,14 @@ static switch_status_t load_skinny_config(void)
|
|||
skinny_profile_set(profile, "patterns-context","skinny-patterns");
|
||||
}
|
||||
|
||||
if (!profile->ext_voicemail) {
|
||||
skinny_profile_set(profile, "ext-voicemail", "vmain");
|
||||
}
|
||||
|
||||
if (!profile->ext_redial) {
|
||||
skinny_profile_set(profile, "ext-redial", "redial");
|
||||
}
|
||||
|
||||
if (profile->port == 0) {
|
||||
profile->port = 2000;
|
||||
}
|
||||
|
|
|
@ -84,6 +84,9 @@ struct skinny_profile {
|
|||
int auto_restart;
|
||||
switch_hash_t *soft_key_set_sets_hash;
|
||||
switch_hash_t *device_type_params_hash;
|
||||
/* extensions */
|
||||
char *ext_voicemail;
|
||||
char *ext_redial;
|
||||
/* db */
|
||||
char *dbname;
|
||||
char *odbc_dsn;
|
||||
|
|
|
@ -231,6 +231,8 @@ static switch_status_t skinny_api_list_settings(const char *line, const char *cu
|
|||
switch_console_push_match(&my_matches, "odbc-dsn");
|
||||
switch_console_push_match(&my_matches, "debug");
|
||||
switch_console_push_match(&my_matches, "auto-restart");
|
||||
switch_console_push_match(&my_matches, "ext-voicemail");
|
||||
switch_console_push_match(&my_matches, "ext-redial");
|
||||
|
||||
if (my_matches) {
|
||||
*matches = my_matches;
|
||||
|
|
|
@ -1214,7 +1214,7 @@ switch_status_t skinny_handle_stimulus_message(listener_t *listener, skinny_mess
|
|||
switch(request->data.stimulus.instance_type) {
|
||||
case SKINNY_BUTTON_LAST_NUMBER_REDIAL:
|
||||
skinny_create_incoming_session(listener, &line_instance, &session);
|
||||
skinny_session_process_dest(session, listener, line_instance, "redial", '\0', 0);
|
||||
skinny_session_process_dest(session, listener, line_instance, listener->profile->ext_redial, '\0', 0);
|
||||
break;
|
||||
case SKINNY_BUTTON_SPEED_DIAL:
|
||||
skinny_speed_dial_get(listener, request->data.stimulus.instance, &button_speed_dial);
|
||||
|
@ -1239,7 +1239,7 @@ switch_status_t skinny_handle_stimulus_message(listener_t *listener, skinny_mess
|
|||
break;
|
||||
case SKINNY_BUTTON_VOICEMAIL:
|
||||
skinny_create_incoming_session(listener, &line_instance, &session);
|
||||
skinny_session_process_dest(session, listener, line_instance, "vmain", '\0', 0);
|
||||
skinny_session_process_dest(session, listener, line_instance, listener->profile->ext_voicemail, '\0', 0);
|
||||
break;
|
||||
|
||||
case SKINNY_BUTTON_LINE:
|
||||
|
@ -1791,7 +1791,7 @@ switch_status_t skinny_handle_soft_key_event_message(listener_t *listener, skinn
|
|||
switch(request->data.soft_key_event.event) {
|
||||
case SOFTKEY_REDIAL:
|
||||
status = skinny_create_incoming_session(listener, &line_instance, &session);
|
||||
skinny_session_process_dest(session, listener, line_instance, "redial", '\0', 0);
|
||||
skinny_session_process_dest(session, listener, line_instance, listener->profile->ext_redial, '\0', 0);
|
||||
break;
|
||||
case SOFTKEY_NEWCALL:
|
||||
status = skinny_create_incoming_session(listener, &line_instance, &session);
|
||||
|
|
Loading…
Reference in New Issue