[Astpp-commit] SF.net SVN: astpp:[2315] trunk
Brought to you by:
darrenkw
|
From: <dar...@us...> - 2010-09-01 03:26:07
|
Revision: 2315
http://astpp.svn.sourceforge.net/astpp/?rev=2315&view=rev
Author: darrenkw
Date: 2010-09-01 03:26:00 +0000 (Wed, 01 Sep 2010)
Log Message:
-----------
Fix a few more issues. Makefile was installing files in wrong location.
Modified Paths:
--------------
trunk/Makefile
trunk/freeswitch/astpp-callingcards.pl
trunk/modules/ASTPP/lib/ASTPP.pm
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2010-09-01 01:25:12 UTC (rev 2314)
+++ trunk/Makefile 2010-09-01 03:26:00 UTC (rev 2315)
@@ -92,7 +92,7 @@
done
install_sounds_freeswitch:
- for x in sounds/GSM/*.GSM; do \
+ for x in sounds/gsm/*.gsm; do \
echo $$x;\
install -m 644 $$x $(DESTDIR)$(FS_SOUNDSDIR); \
done
Modified: trunk/freeswitch/astpp-callingcards.pl
===================================================================
--- trunk/freeswitch/astpp-callingcards.pl 2010-09-01 01:25:12 UTC (rev 2314)
+++ trunk/freeswitch/astpp-callingcards.pl 2010-09-01 03:26:00 UTC (rev 2315)
@@ -9,7 +9,7 @@
# This program is Free Software and is distributed under the
# terms of the GNU General Public License version 2.
#############################################################################
-use DBI;
+#use DBI;
use POSIX qw(ceil floor);
use POSIX qw(strftime);
use Time::HiRes qw( gettimeofday tv_interval );
@@ -47,7 +47,7 @@
}
$cdr_db = &cdr_connect_db( $config, @output );
$ASTPP->set_cdr_db($cdr_db);
- $sound = &define_sounds($astpp_db,$config->{freeswitch_sound_files});
+ $sound = &define_sounds($astpp_db);
}
sub set_in_use()
@@ -228,7 +228,7 @@
);
}
elsif ( $cc == 1 ) {
- $balance = $ASTPP->accountbalance( $cardinfo->{number} );
+ $balance = &accountbalance( $astpp_db, $cardinfo->{number} );
$balance = ( $balance * -1 ) + ( $cardinfo->{credit_limit} );
$available = ( $balance - $numberinfo->{connectfee} ) / 100;
}
@@ -428,12 +428,13 @@
trunk_name => $route->{trunk}
);
my ( $dialedtime, $uniqueid, $answeredtime, $clid );
+ $session->execute( "export", "CALLINGCARDS=1" );
if ( $cc == 1 ) {
- $session->execute( "export", "accountcode=$cardinfo->{number}" );
+ $session->execute( "export", "ACCOUNTCODE=CC:$cardinfo->{number}" );
}
else {
$session->execute( "export",
- "callingcard=$cardinfo->{cardnumber}" );
+ "ACCOUNTCODE=CC:$cardinfo->{cardnumber}" );
}
$session->execute( "bridge", "$data_string" );
return 1;
@@ -471,13 +472,11 @@
$session->execute( "export", "NEWCALL=1" );
$session->execute( "export", "DESTINATION=$stats{destination}" );
&exit_program();
- return 1;
}
elsif ( $whatnow == 2 ) {
$session->execute( "export", "NEWCALL=1" );
$session->execute( "export", "DESTINATION=" );
&exit_program();
- return 1;
}
elsif ( $whatnow == 3 ) {
$session->streamFile( $sound->{goodbye} );
@@ -501,8 +500,7 @@
. $astpp_db->quote( $stats{answered_time} )
. ")" );
$stats{total_time} = tv_interval( $stats{start_time} );
-# exit(1);
- return 1;
+ return 1;
}
sub print_console() #Dump string to the console
@@ -586,9 +584,8 @@
}
if ( $cardinfo->{status} != 1 ) {
$session->streamFile( $sound->{goodbye} );
- $session->hangup();
-# exit(1);
- return 1;
+# $session->hangup();
+ return 1;
}
}
@@ -609,8 +606,7 @@
if ( $pin != $cardinfo->{pin} ) {
$session->streamFile( $sound->{pin_incorrect} );
$session->streamFile( $sound->{goodbye} );
-# exit(1);
- return 1;
+ return 1;
}
}
&check_card($cardinfo) if $cc == 0;
@@ -661,7 +657,7 @@
if ( !$numberinfo->{pattern} ) {
$session->streamFile( $sound->{destination_incorrect} );
$session->streamFile( $sound->{goodbye} );
- $session->hangup();
+# $session->hangup();
&leave($cardinfo);
}
@@ -678,4 +674,3 @@
);
1;
-
Modified: trunk/modules/ASTPP/lib/ASTPP.pm
===================================================================
--- trunk/modules/ASTPP/lib/ASTPP.pm 2010-09-01 01:25:12 UTC (rev 2314)
+++ trunk/modules/ASTPP/lib/ASTPP.pm 2010-09-01 03:26:00 UTC (rev 2315)
@@ -803,7 +803,8 @@
$arg{xml} .= "</user>\n";
}
}
- my ($count,@ip_users) = &ip_address_authenticate($self,%arg);
+ my @ip_users;
+ ($count,@ip_users) = &ip_address_authenticate($self,%arg);
print STDERR "COUNT: $count\n";
if ($count > 0) {
foreach my $record (@ip_users) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|