X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=bin%2Fconvert-477-options;h=be37b4133b7bb9f799ade56b6b53d9a0dcaf5ba9;hp=cce87bb0b284e101d0050f514c347ef7b1073be4;hb=949a80c148a8bbeeeec54c5a0be5d73b292423a5;hpb=ac8cf8d53dffe9c8237d01bf83c98c1998cbf23e diff --git a/bin/convert-477-options b/bin/convert-477-options index cce87bb0b..be37b4133 100755 --- a/bin/convert-477-options +++ b/bin/convert-477-options @@ -114,23 +114,25 @@ for my $part_pkg (qsearch('part_pkg', { freq => {op => '!=', value => '0'}})) { # other special stuff: # FCC voice class (VoIP OTT, VoIP + broadband, Wholesale VoIP, Local # Exchange) and DS0 equivalent lines - my $sessions = $part_pkg->fcc_ds0s || 1; + my $sessions = $part_pkg->fcc_ds0s; - if ($part_pkg->fcc_voip_class == 1) { - # VoIP OTT (connection not included) - push @fcc_opts, 'is_voip' => 1, 'voip_ott' => 1, - 'voip_sessions' => $sessions; - } elsif ( $part_pkg->fcc_voip_class == 2) { - # VoIP non-OTT; do not set is_broadband since the connection is not - # necessarily general Internet access - push @fcc_opts, 'is_voip' => 1, - 'voip_sessions' => $sessions; - } elsif ( $part_pkg->fcc_voip_class == 3 ) { - # wholesale VoIP; apparently no longer reportable? - } else { - # local exchange telephone - push @fcc_opts, 'is_phone' => 1, - 'phone_lines' => $sessions; + if ( $sessions ) { # then this is a voice package of some kind + if ($part_pkg->fcc_voip_class == 1) { + # VoIP OTT (connection not included) + push @fcc_opts, 'is_voip' => 1, 'voip_ott' => 1, + 'voip_sessions' => $sessions; + } elsif ( $part_pkg->fcc_voip_class == 2) { + # VoIP non-OTT; do not set is_broadband since the connection is not + # necessarily general Internet access + push @fcc_opts, 'is_voip' => 1, + 'voip_sessions' => $sessions; + } elsif ( $part_pkg->fcc_voip_class == 3 ) { + # wholesale VoIP; apparently no longer reportable? + } else { + # local exchange telephone + push @fcc_opts, 'is_phone' => 1, + 'phone_lines' => $sessions; + } } my %fcc_opts = @fcc_opts;