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?

Replies are listed 'Best First'.
Re: VoiceXML::Server problems
by trs80 (Priest) on Sep 12, 2002 at 05:17 UTC
    Well I can safely say it isn't you :)

    I installed the module out of curiosity and followed all the instructions setup my cgi script, add the correct port to the firewall and thought I was in business.

    Things you must do to at least get started:
    - Register at TellMe
    - Put your Application URL into the appropriate box and DO not change tabs while you are calling. If you switch to the scratch pad tab it will attempt to run that code instead.
    - The script will spawn a proxy server on port 7500, make sure that port is available to outside traffic.

    After looking through the error logs ( available through the TellMe web interface ) I saw that I was not sending 2.0 in my xml tags. I hacked the Server.pm to include the 2.0 version. Again I tried to run my app (after an update ) and now it was saying that the content being sent was invalid due to certain characters and tags that are not 2.0 compliant. At this point I stopped trying because it seemed without an updated module it was useless at this point.
    (version 1.13 from CPAN is what I tested with)
Re: VoiceXML::Server problems
by valdez (Monsignor) on Sep 11, 2002 at 22:10 UTC

    I installed the module and all is working here. I stopped before creating an account on the site mentioned in the manual: I can't call a toll free number from outside USA :(

    Have you tried runnning the example on command line as suggested?

    I think that it is not correct to invoke directly the cgi-bin script; it should be invoked by some other server. BTW, I also dumped the output of this script using lynx:

    HTTP/1.1 200 OK Date: Wed, 11 Sep 2002 21:53:16 GMT Server: Apache/1.3.26 (Unix) mod_perl/1.27 Cache-Control: no-cache Connection: close Content-Type: text/vxml <?xml version="1.0"?> <!DOCTYPE vxml PUBLIC "-//Tellme Networks//Voice Markup Language 1.0// +EN" "http://resources.tellme.com/toolbox/vxml-tellme.dtd"> <vxml application="http://resources.tellme.com/lib/universals.vxml"> <form><block> <goto next="http://kinotrope.linuxasylum.net/cgi-bin/voicer?proxyfor +=7500&amp;x=y"/> </block></form> </vxml>

    Good luck :) Ciao, Valerio

Re: VoiceXML::Server problems
by Mr. Muskrat (Canon) on Sep 12, 2002 at 14:15 UTC

    On the win98 box it runs fine at a command prompt. I can't telnet into my hosted site to test that but I suspect that one of the modules didn't install correctly there.

    I have an account with Tellme Studio. I signed up for it shortly after installing the module.

    I have gotten the VXML Perl Module to work (it also uses the 1.0 standard). So if this one doesn't work, it's okay. Perhaps the next version will work with the servers that I have access to.

    Update:(how could I have forgetten this?) Thank you for trying!