]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fine tuning
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 5 Jan 2012 23:08:09 +0000 (17:08 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 5 Jan 2012 23:08:17 +0000 (17:08 -0600)
src/mod/applications/mod_httapi/examples/perl/ext_pin.cgi
src/mod/applications/mod_httapi/mod_httapi.c

index 0ffbc3fc43f2e268919f6d9c117c29a1794b535b..7b5afd2755463c9f0cf5f86866216c032509048a 100755 (executable)
@@ -33,6 +33,12 @@ if ($pin) {
 }
 $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");
@@ -58,6 +64,7 @@ if ($exten && $pin) {
   $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");
 
index 08ef37d4464f1f18ccc79c42436a4e8a412be4cd..ae4782b9bc085f7e1537ea24f5ce35e5deef76f5 100644 (file)
@@ -447,6 +447,8 @@ static switch_status_t parse_playback(const char *tag_name, client_t *client, sw
                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) {