K, I removed all the verbose statements and it now grabs the data and waits
correctly. However, when the script enters this block of code:
-- snip --
if($correct eq 1) {
$AGI->exec('Playback','auth-thankyou');
&validate_pin($pin, $account_code, $userid, $MAC);
if($return_code eq 100) {
# $query = "update associations set PIN = '$pin' where userid =
'$userid' and MAC = '$MAC'";
# $stah = $dbh->query($query);
$AGI->exec('Playback', 'pin-number-accepted');
$AGI->hangup();
}
}
else {
$attempts = $attempts - 1; # Don't count this attempt against them
&get_pin($account_code, $userid, $MAC);
}
-- snap --
The script plays back "Thank You" and hangs up the channel. Any clues?
On Monday 22 November 2004 06:14 pm, duncan wrote:
> On Mon, 22 Nov 2004, Brian Wilkins wrote:
> > I don't know if this is a problem with streaming files and playback,
> > but I have posted my code below and hopefully someone can give me a
> > solution. The script is supposed to play the file "Please enter your"
> > then playback "card number" and wait for data via DTMF from a device
> > after the script plays back "then press pound". However, the script does
> > not wait and instead continues on to the next portion of code. During the
> > confirmation phase, where it asks if this is the correct PIN number, if
> > you press 2, you can hear the "Please enter your" prior to the playing of
> > the "card number" file. If I do press the number 1, the script hangs up
> > the channel. However, I want it to go and validate the PIN while the user
> > waits. Any suggestions? Thanks -
>
> i had similar strange problems when using "" inside agi functions
>
> always use '' and never use $agi->verbose (as this always gave me strange
> behaviour as well).
>
> hope this helps
>
>
>
>
> duncan
--
Brian Wilkins
Software Engineer
[EMAIL PROTECTED]
Heritage Communications Corporation
Melbourne, FL USA 32935
321.308.4000 x33
http://www.hcc.net