[freeside-commits] branch FREESIDE_3_BRANCH updated. d74e4b0b18b90a6f34b09a153c5e8e64b9977773

Ivan ivan at 420.am
Sun Nov 10 21:45:05 PST 2013


The branch, FREESIDE_3_BRANCH has been updated
       via  d74e4b0b18b90a6f34b09a153c5e8e64b9977773 (commit)
      from  b2ada4b93cf7a87fa6869ae9d741bf522d5ed7c4 (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 d74e4b0b18b90a6f34b09a153c5e8e64b9977773
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sun Nov 10 21:45:04 2013 -0800

    add svc_phone-radius-password config, RT#21445

diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index ee69889..2d79909 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -4766,6 +4766,17 @@ and customer address. Include units.',
   },
 
   {
+    'key'         => 'svc_phone-radius-password',
+    'section'     => 'telephony',
+    'description' => 'Password when exporting svc_phone records to RADIUS',
+    'type'        => 'select',
+    'select_hash' => [
+      '' => 'Use default from svc_phone-radius-default_password config',
+      'countrycode_phonenum' => 'Phone number (with country code)',
+    ],
+  },
+
+  {
     'key'         => 'svc_phone-radius-default_password',
     'section'     => 'telephony',
     'description' => 'Default password when exporting svc_phone records to RADIUS',
diff --git a/FS/FS/svc_phone.pm b/FS/FS/svc_phone.pm
index ed0ec09..4b7638a 100644
--- a/FS/FS/svc_phone.pm
+++ b/FS/FS/svc_phone.pm
@@ -652,7 +652,13 @@ sub radius_check {
 
   my $conf = new FS::Conf;
 
-  $check{'User-Password'} = $conf->config('svc_phone-radius-default_password');
+  my $password;
+  if ( $conf->config('svc_phone-radius-password') eq 'countrycode_phonenum' ) {
+    $password = $self->countrycode. $self->phonenum;
+  } else {
+    $password = $conf->config('svc_phone-radius-default_password');
+  }
+  $check{'User-Password'} = $password;
 
   %check;
 }

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

Summary of changes:
 FS/FS/Conf.pm      |   11 +++++++++++
 FS/FS/svc_phone.pm |    8 +++++++-
 2 files changed, 18 insertions(+), 1 deletions(-)




More information about the freeside-commits mailing list