[freeside-commits] freeside/FS/FS Conf.pm, 1.496, 1.497 svc_phone.pm, 1.41, 1.42

Mark Wells mark at wavetail.420.am
Mon Dec 19 13:27:46 PST 2011


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv29232/FS/FS

Modified Files:
	Conf.pm svc_phone.pm 
Log Message:
more options for netsapiens export, #14958

Index: svc_phone.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_phone.pm,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -w -d -r1.41 -r1.42
--- svc_phone.pm	13 Dec 2011 20:40:28 -0000	1.41
+++ svc_phone.pm	19 Dec 2011 21:27:43 -0000	1.42
@@ -503,7 +503,16 @@
 
   $self->countrycode(1) unless $self->countrycode;
 
-  unless ( length($self->sip_password) ) {
+  unless ( length($self->pin) ) {
+    my $random_pin = $conf->config('svc_phone-random_pin');
+    if ( $random_pin =~ /^\d+$/ ) {
+      $self->pin(
+        join('', map int(rand(10)), 0..($random_pin-1))
+      );
+    }
+  }
+
+  unless ( length($self->sip_password) ) { # option for this?
 
     $self->sip_password(
       join('', map $pw_set[ int(rand $#pw_set) ], (0..16) )

Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.496
retrieving revision 1.497
diff -u -w -d -r1.496 -r1.497
--- Conf.pm	19 Dec 2011 01:59:14 -0000	1.496
+++ Conf.pm	19 Dec 2011 21:27:43 -0000	1.497
@@ -4149,6 +4149,13 @@
   },
   
   {
+    'key'         => 'svc_phone-random_pin',
+    'section'     => 'telephony',
+    'description' => 'Number of random digits to generate in the "PIN" field, if empty.',
+    'type'        => 'text',
+  },
+
+  {
     'key'         => 'svc_phone-lnp',
     'section'     => 'telephony',
     'description' => 'Enables Number Portability features for svc_phone',



More information about the freeside-commits mailing list