$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) )
=item default_prefix => "XXX": Also accept the phone number of the service prepended
with the chosen prefix.
+=item begin, end: Start and end of a date range, as unix timestamp.
+
+=item cdrtypenum: Only return CDRs with this type number.
+
=item disable_src => 1: Only match on "charged_party", not "src".
=item by_svcnum: not supported for svc_phone
$hash{'freesidestatus'} = $options{'status'}
if exists($options{'status'});
}
+
+ if ($options{'cdrtypenum'}) {
+ $hash{'cdrtypenum'} = $options{'cdrtypenum'};
+ }
my $for_update = $options{'for_update'} ? 'FOR UPDATE' : '';