<param name="ext-voicemail" value="voicemail">
<param name="ext-redial" value="redial">
<param name="ext-meetme" value="conference">
+ <param name="ext-autodial" value="operator">
-->
<!-- if you define an extension that runs 'pickup' application with 'key' as the data
channel = switch_core_session_get_channel(session);
tech_pvt = switch_core_session_get_private(session);
- if (!dest) {
+ // get listener profile setting for ringdown/autodial
+ // if initial offhook - and we have a ringdown/autodial configured, just dial it in one shot
+ if (!dest && append_dest == '\0' && listener->ext_autodial ) {
+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING,
+ "triggering auto dial to (%s)\n", listener->ext_autodial);
+
+ tech_pvt->caller_profile->destination_number = switch_core_strdup(tech_pvt->caller_profile->pool, listener->ext_autodial);
+ switch_set_flag_locked(tech_pvt, TFLAG_FORCE_ROUTE);
+ } else if (!dest) {
if (strlen(tech_pvt->caller_profile->destination_number) == 0) {/* no digit yet */
send_start_tone(listener, SKINNY_TONE_DIALTONE, 0, line_instance, tech_pvt->call_id);
}
if (!listener->ext_cfwdall || strcmp(value,listener->ext_cfwdall)) {
listener->ext_cfwdall = switch_core_strdup(profile->pool, value);
}
+ } else if (!strcasecmp(name, "ext-autodial")) {
+ if (!listener->ext_autodial || strcmp(value,listener->ext_autodial)) {
+ listener->ext_autodial = switch_core_strdup(profile->pool, value);
+ }
}
}
}