[freeside-commits] freeside/FS/FS/part_pkg voip_cdr.pm, 1.3.2.13, 1.3.2.14
Ivan,,,
ivan at wavetail.420.am
Fri Sep 12 14:56:52 PDT 2008
Update of /home/cvs/cvsroot/freeside/FS/FS/part_pkg
In directory wavetail.420.am:/tmp/cvs-serv17470
Modified Files:
Tag: FREESIDE_1_7_BRANCH
voip_cdr.pm
Log Message:
support multiple internal_prefixen, RT#3985
Index: voip_cdr.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/voip_cdr.pm,v
retrieving revision 1.3.2.13
retrieving revision 1.3.2.14
diff -u -d -r1.3.2.13 -r1.3.2.14
--- voip_cdr.pm 12 Sep 2008 07:08:08 -0000 1.3.2.13
+++ voip_cdr.pm 12 Sep 2008 21:56:49 -0000 1.3.2.14
@@ -79,7 +79,7 @@
# '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',
},
@@ -219,10 +219,16 @@
# $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+)$/
)
{
More information about the freeside-commits
mailing list