[freeside-commits] branch FREESIDE_3_BRANCH updated. b8201540654e1e785a00d2f60f5fcae5f0cd6ddc

Ivan ivan at 420.am
Sun Nov 10 22:21:18 PST 2013


The branch, FREESIDE_3_BRANCH has been updated
       via  b8201540654e1e785a00d2f60f5fcae5f0cd6ddc (commit)
      from  d74e4b0b18b90a6f34b09a153c5e8e64b9977773 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b8201540654e1e785a00d2f60f5fcae5f0cd6ddc
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sun Nov 10 22:21:17 2013 -0800

    if the called number is free, put 1 in the Termination-Action attribute, RT#21337

diff --git a/fs_selfservice/FS-SelfService/SelfService/FreeRadiusVoip.pm b/fs_selfservice/FS-SelfService/SelfService/FreeRadiusVoip.pm
index 0df24f7..6086717 100644
--- a/fs_selfservice/FS-SelfService/SelfService/FreeRadiusVoip.pm
+++ b/fs_selfservice/FS-SelfService/SelfService/FreeRadiusVoip.pm
@@ -1,8 +1,13 @@
 #Add this to the modules section of radiusd.conf
 # perl {
 #   #path to this module
-#   module=/usr/local/share/perl/5.8.8/FS/SelfService/FreeRadiusVoip.pm
+#   # deb 6 example
+#   #module=/usr/local/share/perl/5.10.1/FS/SelfService/FreeRadiusVoip.pm
+#   # deb 7 example
+#   module=/usr/local/share/perl/5.14.2/FS/SelfService/FreeRadiusVoip.pm
+#
 #   func_authorize = authorize;
+#
 # }
 #
 #In the Authorize section 
@@ -11,9 +16,9 @@
 #
 # #N/A# Add a line containing 'perl' to the Accounting section. 
 # 
-# and on debian systems, add this to /etc/init.d/freeradius, with the
+# and on debian 6 systems, add this to /etc/init.d/freeradius, with the
 # correct path (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=416266)
-#               LD_PRELOAD=/usr/lib/libperl.so.5.8.8
+#               LD_PRELOAD=/usr/lib/libperl.so.5.10
 #               export LD_PRELOAD
 
 BEGIN { $FS::SelfService::skip_uid_check = 1; } 
@@ -44,9 +49,13 @@ sub authorize {
   if ( $response->{'error'} ) {
     $RAD_REPLY{'Reply-Message'} = $response->{'error'};
     return RLM_MODULE_REJECT;
-  } else {
+  } elsif ( $response->{'seconds'} ) {
     $RAD_REPLY{'Session-Timeout'} = $response->{'seconds'};
     return RLM_MODULE_OK;
+  } else {
+    # if the called number is free, put 1 in the Termination-Action attribute
+    $RAD_REPLY{'Termination-Action'} = 1;
+    return RLM_MODULE_OK;
   }
 
 }

-----------------------------------------------------------------------

Summary of changes:
 .../FS-SelfService/SelfService/FreeRadiusVoip.pm   |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)




More information about the freeside-commits mailing list