}
$writer->endTag('params');
+if ($exten eq "invalid" || $pin eq "invalid") {
+ $writer->startTag('work');
+ $writer->emptyTag('hangup', cause => "destination_out_of_order");
+ $writer->endTag('work');
+}
+
if ($exten && $pin) {
$writer->startTag('work');
$writer->dataElement("playback", "http://sidious.freeswitch.org/sounds/ext_num.wav");
$writer->startTag('playback',
name => "exten",
file => "http://sidious.freeswitch.org/sounds/exten.wav",
+ loops => "3",
'error-file' => "http://sidious.freeswitch.org/sounds/invalid.wav",
'input-timeout' => "5000");
if (status == SWITCH_STATUS_BREAK) {
if (error_file) {
switch_ivr_play_file(client->session, NULL, error_file, &nullargs);
+ switch_event_add_header_string(client->one_time_params, SWITCH_STACK_BOTTOM, name, "invalid");
+ switch_event_add_header_string(client->one_time_params, SWITCH_STACK_BOTTOM, "input_type", "invalid");
status = SWITCH_STATUS_SUCCESS;
}
} else if (status == SWITCH_STATUS_FOUND) {