import torrus 1.0.9
[freeside.git] / fs_selfservice / FS-SelfService / SelfService / FreeRadiusVoip.pm
index c52a97f..0df24f7 100644 (file)
@@ -36,16 +36,16 @@ use constant RLM_MODULE_NUMCODES=> 9; #How many return codes there are
 
 sub authorize {
 
-  #my $src = $RAD_REQUEST{'User-Name'};
+  #&log_request_attributes();
 
   my $response = call_time( 'src' => $RAD_REQUEST{'Calling-Station-Id'},
                             'dst' => $RAD_REQUEST{'Called-Station-Id'},  );
 
-  if ( $response->{$error} ) {
-    $RAD_REPLY{'Access-Reject'} = $response->{'error'};
+  if ( $response->{'error'} ) {
+    $RAD_REPLY{'Reply-Message'} = $response->{'error'};
     return RLM_MODULE_REJECT;
   } else {
-    $RAD_REPLY{'Session-Timeout'} = $response->{'seconds'}
+    $RAD_REPLY{'Session-Timeout'} = $response->{'seconds'};
     return RLM_MODULE_OK;
   }