diff options
author | mark <mark> | 2011-12-19 21:27:44 +0000 |
---|---|---|
committer | mark <mark> | 2011-12-19 21:27:44 +0000 |
commit | 13a91fbae5cfab0f868149267f817807ddcb8216 (patch) | |
tree | d53d2e1d50e4e6bddc561b30ec253e026d912753 /FS/FS/svc_phone.pm | |
parent | fc2bc78541d1c8c0f1f0570b55e41ac032d03e65 (diff) |
more options for netsapiens export, #14958
Diffstat (limited to 'FS/FS/svc_phone.pm')
-rw-r--r-- | FS/FS/svc_phone.pm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/FS/FS/svc_phone.pm b/FS/FS/svc_phone.pm index e8b0d0a..118748e 100644 --- a/FS/FS/svc_phone.pm +++ b/FS/FS/svc_phone.pm @@ -503,7 +503,16 @@ sub check { $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) ) |