communigate provisioning phase 2: Domain:Account Defaults:Settings: RulesAllowed...
[freeside.git] / FS / FS / rate.pm
index 257278a..6430ff0 100644 (file)
@@ -284,13 +284,13 @@ sub dest_detail {
   my $regionnum;
   if ( ref($_[0]) eq 'HASH' ) {
 
-    my $countrycode = $_->{'countrycode'};
-    my $phonenum    = $_->{'phonenum'};
+    my $countrycode = $_[0]->{'countrycode'};
+    my $phonenum    = $_[0]->{'phonenum'};
 
     #find a rate prefix, first look at most specific (4 digits) then 3, etc.,
     # finally trying the country code only
     my $rate_prefix = '';
-    for my $len ( reverse(1..6) ) {
+    for my $len ( reverse(1..10) ) {
       $rate_prefix = qsearchs('rate_prefix', {
         'countrycode' => $countrycode,
         #'npa'         => { op=> 'LIKE', value=> substr($number, 0, $len) }