Thread: [Astpp-commit] SF.net SVN: astpp: [2132] trunk/astpp-refill.agi
Brought to you by:
darrenkw
From: <dar...@us...> - 2007-09-22 06:11:49
|
Revision: 2132 http://astpp.svn.sourceforge.net/astpp/?rev=2132&view=rev Author: darrenkw Date: 2007-09-21 23:11:53 -0700 (Fri, 21 Sep 2007) Log Message: ----------- Resolved an error that would have not allowed calling cards to be refilled. Modified Paths: -------------- trunk/astpp-refill.agi Modified: trunk/astpp-refill.agi =================================================================== --- trunk/astpp-refill.agi 2007-09-22 06:11:10 UTC (rev 2131) +++ trunk/astpp-refill.agi 2007-09-22 06:11:53 UTC (rev 2132) @@ -142,7 +142,7 @@ while ( $destcardinfo->{status} != 1 && $retries < $config->{card_retries} ) { my $cardnum = $AGI->get_data( $sound->{card_to_refill}, $input_timeout ); $destcardinfo = &get_callingcard( $astpp_db, $cardnum, $config ); - $destcardinfo = &get_account( $astpp_db, $cardnum ); + $destcardinfo = &get_account( $astpp_db, $cardnum ) if !$destcardinfo; $cc = 1 if $destcardinfo->{cc}; $AGI->verbose( "ASTPP Number: $cardnum ", $verbosity ) if $config->{debug} == 1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dar...@us...> - 2007-11-17 22:28:24
|
Revision: 2159 http://astpp.svn.sourceforge.net/astpp/?rev=2159&view=rev Author: darrenkw Date: 2007-11-17 14:28:28 -0800 (Sat, 17 Nov 2007) Log Message: ----------- Cleaned up some duplicated code. Modified Paths: -------------- trunk/astpp-refill.agi Modified: trunk/astpp-refill.agi =================================================================== --- trunk/astpp-refill.agi 2007-11-17 21:42:32 UTC (rev 2158) +++ trunk/astpp-refill.agi 2007-11-17 22:28:28 UTC (rev 2159) @@ -207,21 +207,6 @@ $retries++; } } -$cardstatus = &check_card_status( $astpp_db, $sourcecardinfo ); -# This subroutine returns the status of the card: -if ( $cardstatus == 1 ) { - $AGI->stream_file($sound->{card_inuse}); - $AGI->stream_file($sound->{goodbye}); - exit(0); -} elsif ( $cardstatus == 2 ) { - $AGI->stream_file($sound->{card_has_expired}); - $AGI->stream_file($sound->{goodbye}); - exit(0) -} elsif ( $cardstatus == 3 ) { - $AGI->stream_file($sound->{card_is_empty}); - $AGI->stream_file($sound->{goodbye}); - exit(0) -} $retries = 0; while ( $sourcecardinfo->{pin} != $sourcepin && $retries < $config->{pin_retries} ) { $sourcepin = $AGI->get_data( $sound->{astpp_please_pin_card_empty}, $input_timeout ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dar...@us...> - 2007-11-19 10:12:05
|
Revision: 2169 http://astpp.svn.sourceforge.net/astpp/?rev=2169&view=rev Author: darrenkw Date: 2007-11-19 02:12:08 -0800 (Mon, 19 Nov 2007) Log Message: ----------- Mostly resolve the issues in astpp-refill.agi. There are a few little cosmetic issues left. Modified Paths: -------------- trunk/astpp-refill.agi Modified: trunk/astpp-refill.agi =================================================================== --- trunk/astpp-refill.agi 2007-11-19 10:00:21 UTC (rev 2168) +++ trunk/astpp-refill.agi 2007-11-19 10:12:08 UTC (rev 2169) @@ -140,7 +140,7 @@ my $destcardinfo = &get_callingcard( $astpp_db, $destcardnumber, $config ) if $destcardnumber; my $retries = 0; while ( $destcardinfo->{status} != 1 && $retries < $config->{card_retries} ) { - my $cardnum = $AGI->get_data( $sound->{card_to_refill}, $input_timeout ); + my $cardnum = $AGI->get_data( $sound->{card_to_refill}, $config->{calling_cards_number_input_timeout}, $config->{cardlength}); $destcardinfo = &get_callingcard( $astpp_db, $cardnum, $config ); $destcardinfo = &get_account( $astpp_db, $cardnum ) if !$destcardinfo; $cc = 1 if $destcardinfo->{cc}; @@ -163,7 +163,7 @@ $config = &load_config_db_brand($astpp_db,$config,$destcardinfo->{brand}); $retries = 0; while ( $destcardinfo->{pin} != $destpin && $retries < $config->{pin_retries} ) { - $destpin = $AGI->get_data( $sound->{pin}, $input_timeout ); + $destpin = $AGI->get_data( $sound->{pin}, $config->{calling_cards_pin_input_timeout}, $config->{pinlength} ); if ( $destcardinfo->{pin} != $destpin ) { $AGI->stream_file($sound->{pin_incorrect}); } @@ -196,7 +196,7 @@ my $sourcecardinfo = &get_callingcard( $astpp_db, $sourcecardnumber, $config ) if $sourcecardnumber; $retries = 0; while ( $sourcecardinfo->{status} != 1 && $retries < $config->{card_retries} ) { - my $cardnum = $AGI->get_data( $sound->{card_to_empty}, $input_timeout ); + my $cardnum = $AGI->get_data( $sound->{card_to_empty}, $config->{calling_cards_number_input_timeout}, $config->{cardlength} ); $sourcecardinfo = &get_callingcard( $astpp_db, $cardnum, $config ); $AGI->verbose( "ASTPP Number: $cardnum ", $verbosity ) if $config->{debug} == 1; @@ -209,7 +209,7 @@ } $retries = 0; while ( $sourcecardinfo->{pin} != $sourcepin && $retries < $config->{pin_retries} ) { - $sourcepin = $AGI->get_data( $sound->{astpp_please_pin_card_empty}, $input_timeout ); + $sourcepin = $AGI->get_data( $sound->{pin}, $config->{calling_cards_number_input_timeout}, $config->{cardlength} ); if ( $sourcecardinfo->{pin} != $sourcepin ) { $AGI->stream_file($sound->{pin_incorrect}); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |