http://qs321.pair.com?node_id=197078

Mr. Muskrat has asked for the wisdom of the Perl Monks concerning the following question:

Fellow Monks lend me your ears!

I was browsing the CPAN modules available and came across one that I have missed until now. VoiceXML::Server

I did a quick read of the docs and decided to try the example.

#!/usr/bin/perl -w use diagnostics; use strict; require VoiceXML::Server; my $server = VoiceXML::Server->new(); # it says not use avoidfirewall if you can help it, so I removed that +part $server->Audio("Pick a number between 1 and 99."); my $num = int(rand(99)) + 1; while (1) { my $guess = $server->Listen(grammar => "NATURAL_NUMBER_THRU_99"); if ($guess < $num) { $server->Audio("No, $guess is too low. Try again."); } elsif ($guess > $num) { $server->Audio("No, $guess is too high. Try again."); } else { $server->Audio("That's right, my number was $num. OK, " . "let's play again. I'm thinking of a " . "different number."); $num = int(rand(99)) + 1; } }
I have tried it with two different webservers with two different results. On this win98 machine running the most recent ActiveState Perl and using the Xitami webserver, it gives a 502 Service temporarily overloaded. On my hosted site, I get "Premature end of script headers".

The debug option does not seem to do anything on either.

Has anyone had any luck with this thing?