[Astpp-commit] SF.net SVN: astpp:[2223] trunk/freeswitch/astpp-fs-xml.pl
Brought to you by:
darrenkw
From: <dar...@us...> - 2009-01-24 20:56:11
|
Revision: 2223 http://astpp.svn.sourceforge.net/astpp/?rev=2223&view=rev Author: darrenkw Date: 2009-01-24 20:56:05 +0000 (Sat, 24 Jan 2009) Log Message: ----------- Corrected code so that if ASTPP can't find a route it will fail back to the freeswitch dialplan. Modified Paths: -------------- trunk/freeswitch/astpp-fs-xml.pl Modified: trunk/freeswitch/astpp-fs-xml.pl =================================================================== --- trunk/freeswitch/astpp-fs-xml.pl 2009-01-17 17:42:06 UTC (rev 2222) +++ trunk/freeswitch/astpp-fs-xml.pl 2009-01-24 20:56:05 UTC (rev 2223) @@ -126,6 +126,7 @@ ( $callstatus, $maxlength ) = &max_length( $astpp_db, $config, $carddata, $params->{'Caller-Destination-Number'} ); + my $routeinfo = &get_route( $astpp_db, $config, $params->{'Caller-Destination-Number'}, @@ -136,6 +137,11 @@ my $minimumcharge = $routeinfo->{cost}; my @reseller_list; $ASTPP->debug( debug => "CALLSTATUS: $callstatus MAX_LENGTH: $maxlength" ); + + if (!$routeinfo->{cost} && !$routeinfo->{pricelist}) { + $ASTPP->debug( debug => "COULD NOT FIND ROUTE. EXITING SO DIALPLAN CAN TAKE OVER" ); + exit(0); + } while ( $carddata->{reseller} && $maxlength > 1 && $callstatus == 1 ) { $ASTPP->debug( debug => "FINDING LIMIT FOR: $carddata->{reseller}" ); $carddata = &get_account( $astpp_db, $carddata->{reseller} ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |