| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | # basic test of VoiceXML::Client using the VXML at | ||
| 4 | # http://voicexml.psychogenic.com/vocp.cgi | ||
| 5 | # Copyright (C) 2008, Pat Deegan Psychogenic.com | ||
| 6 | |||
| 7 | use VoiceXML::Client; | ||
| 8 | |||
| 9 | use strict; | ||
| 10 | |||
| 11 | # debug defaults to 0 but it's here so you know and may easily change it... 1 is debug, > 1 is verbose | ||
| 12 | $VoiceXML::Client::Debug = 0; | ||
| 13 | |||
| 14 | # basic info for VoiceXML source | ||
| 15 | my $sourceSite = 'voicexml.psychogenic.com'; | ||
| 16 | my $startURL = '/vocp.cgi'; | ||
| 17 | |||
| 18 | |||
| 19 | # using dummy device here, to get started | ||
| 20 | my $telephonyDevice = VoiceXML::Client::Device::Dummy->new(); | ||
| 21 | $telephonyDevice->connect(); | ||
| 22 | |||
| 23 | # our workhorse: the user agent | ||
| 24 | my $vxmlUserAgent = VoiceXML::Client::UserAgent->new($sourceSite); | ||
| 25 | |||
| 26 | # go for it: | ||
| 27 | $vxmlUserAgent->runApplication($startURL, $telephonyDevice); | ||
| 28 | |||
| 29 | # done. Insert gleeful hand wringing here.. | ||
| 30 |