# 'type' => 'checkbox',
# },
- 'international_prefix' => { 'name' => 'Destination prefix for international CDR records',
+ 'international_prefix' => { 'name' => 'Destination prefix(es) for international CDR records. Separate multiple options with commas.',
'default' => '011',
},
my $last_bill = $cust_pkg->get('last_bill'); #->last_bill falls back to setup
return 0
- if $self->option('recur_temporality') eq 'preceding' && $last_bill == 0;
+ if $self->option('recur_temporality', 1) eq 'preceding' && $last_bill == 0;
my $ratenum = $cust_pkg->part_pkg->option('ratenum');
# $dest =~ s/\@(.*)$// and $siphost = $1; # @10.54.32.1, @sip.example.com
my $intl = $self->option('international_prefix') || '011';
+ my @intl = ();
+ if ( $intl =~ /,/ ) {
+ @intl = split(/\s*,\s*/, $intl);
+ } else {
+ @intl = ($intl);
+ }
#determine the country code
my $countrycode;
- if ( $number =~ /^$intl(((\d)(\d))(\d))(\d+)$/
+ if ( ( grep { $number =~ /^$_(((\d)(\d))(\d))(\d+)$/ } @intl )
|| $number =~ /^\+(((\d)(\d))(\d))(\d+)$/
)
{