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;
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;
}
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;
}
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;
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;
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);
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:
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);