4 use base qw( FS::svc_Domain_Mixin FS::location_Mixin FS::svc_Common );
5 use vars qw( $DEBUG $me @pw_set $conf $phone_name_max
6 $passwordmin $passwordmax
9 use Scalar::Util qw( blessed );
10 use List::Util qw( min );
13 use FS::Record qw( qsearch qsearchs dbh );
14 use FS::PagedSearch qw( psearch );
15 use FS::Msgcat qw(gettext);
20 use FS::cust_location;
23 $me = '[' . __PACKAGE__ . ']';
27 @pw_set = ( 'a'..'k', 'm','n', 'p-z', 'A'..'N', 'P'..'Z' , '2'..'9' );
29 #ask FS::UID to run this stuff for us later
30 FS::UID->install_callback( sub {
32 $phone_name_max = $conf->config('svc_phone-phone_name-max_length');
33 $passwordmin = $conf->config('sip_passwordmin') || 0;
34 $passwordmax = $conf->config('sip_passwordmax') || 80;
40 FS::svc_phone - Object methods for svc_phone records
46 $record = new FS::svc_phone \%hash;
47 $record = new FS::svc_phone { 'column' => 'value' };
49 $error = $record->insert;
51 $error = $new_record->replace($old_record);
53 $error = $record->delete;
55 $error = $record->check;
57 $error = $record->suspend;
59 $error = $record->unsuspend;
61 $error = $record->cancel;
65 An FS::svc_phone object represents a phone number. FS::svc_phone inherits
66 from FS::Record. The following fields are currently supported:
80 SIM IMSI (http://en.wikipedia.org/wiki/International_mobile_subscriber_identity)
92 Optional svcnum from svc_pbx
96 Forwarding destination
100 Email address for virtual fax (fax-to-email) services
104 LNP Status (can be null, native, portedin, portingin, portin-reject,
105 portingout, portout-reject)
111 =item lnp_desired_due_date
115 =item lnp_other_provider
117 If porting the number in or out, name of the losing or winning provider,
120 =item lnp_other_provider_account
122 Account number of other provider. See lnp_other_provider.
124 =item lnp_reject_reason
126 See lnp_status. If lnp_status is portin-reject or portout-reject, this is an
127 optional reject reason.
131 Class of Service for E911 service (per the NENA 2.1 standard).
135 Type of Service for E911 service.
139 The L<FS::svc_circuit> record for the physical circuit that transports this
144 The hostname of the SIP server that this phone number is routed to.
154 Creates a new phone number. To add the number to the database, see L<"insert">.
156 Note that this stores the hash reference, not a distinct copy of the hash it
157 points to. You can ask the object for a copy with the I<hash> method.
161 # the new method can be inherited from FS::Record, if a table method is defined
164 my %dis2 = ( disable_inventory=>1, disable_select=>1 );
166 'name' => 'Phone number',
167 'sorts' => 'phonenum',
168 'display_weight' => 60,
169 'cancel_weight' => 80,
171 'svcnum' => 'Service',
172 'countrycode' => { label => 'Country code',
174 disable_inventory => 1,
177 'phonenum' => 'Phone number',
178 'sim_imsi' => 'IMSI', #http://en.wikipedia.org/wiki/International_mobile_subscriber_identity
179 'pin' => { label => 'Voicemail PIN', #'Personal Identification Number',
181 disable_inventory => 1,
184 'sip_password' => 'SIP password',
185 'phone_name' => 'Name',
186 'pbxsvc' => { label => 'PBX',
187 type => 'select-svc_pbx.html',
188 disable_inventory => 1,
189 disable_select => 1, #UI wonky, pry works otherwise
194 select_table => 'svc_domain',
195 select_key => 'svcnum',
196 select_label => 'domain',
197 select_allow_empty => 1,
198 disable_inventory => 1,
200 'circuit_svcnum' => { label => 'Circuit',
202 select_table => 'svc_domain',
203 select_key => 'svcnum',
204 select_label => 'circuit_label',
205 disable_inventory => 1,
208 'sms_carrierid' => { label => 'SMS Carrier',
210 select_table => 'cdr_carrier',
211 select_key => 'carrierid',
212 select_label => 'carriername',
213 disable_inventory => 1,
215 'sms_account' => { label => 'SMS Carrier Account', },
216 'max_simultaneous' => { label=>'Maximum number of simultaneous users' },
218 label => 'E911 location',
219 disable_inventory => 1,
222 'forwarddst' => { label => 'Forward Destination',
225 'email' => { label => 'Email',
228 'lnp_status' => { label => 'LNP Status',
229 type => 'select-lnp_status.html',
232 'lnp_reject_reason' => {
233 label => 'LNP Reject Reason',
236 'portable' => { label => 'Portable?', %dis2, },
237 'lrn' => { label => 'LRN',
238 disable_inventory => 1,
240 'lnp_desired_due_date' =>
241 { label => 'LNP Desired Due Date', %dis2 },
243 { label => 'LNP Due Date', %dis2 },
244 'lnp_other_provider' =>
245 { label => 'LNP Other Provider',
246 disable_inventory => 1,
248 'lnp_other_provider_account' =>
249 { label => 'LNP Other Provider Account #',
253 label => 'E911 Service Class',
254 type => 'select-e911_class',
255 disable_inventory => 1,
259 label => 'E911 Service Type',
260 type => 'select-e911_type',
261 disable_inventory => 1,
272 sub table { 'svc_phone'; }
274 sub table_dupcheck_fields { ( 'countrycode', 'phonenum' ); }
276 =item search_sql STRING
278 Class method which returns an SQL fragment to search for the given string.
283 my( $class, $string ) = @_;
285 #my $conf = new FS::Conf;
287 if ( $conf->exists('svc_phone-allow_alpha_phonenum') ) {
293 my $ccode = ( $conf->exists('default_phone_countrycode')
294 && $conf->config('default_phone_countrycode')
296 ? $conf->config('default_phone_countrycode')
299 $string =~ s/^$ccode//;
301 $class->search_sql_field('phonenum', $string );
306 Returns the phone number.
312 my $phonenum = $self->phonenum; #XXX format it better
313 my $label = $phonenum;
314 $label .= '@'.$self->domain if $self->domsvc;
315 $label .= ' ('.$self->phone_name.')' if $self->phone_name;
321 Adds this phone number to the database. If there is an error, returns the
322 error, otherwise returns false.
326 sub preinsert_hook_first {
327 my( $self, %options ) = @_;
329 return '' unless $options{'cust_location'};
331 #false laziness w/cust_pkg.pm... move this to location_Mixin? that would
332 #make it more of a base class than a mixin... :)
333 $options{'cust_location'}->custnum( $self->cust_svc->cust_pkg->custnum );
334 my $error = $options{'cust_location'}->find_or_insert;
335 return "inserting cust_location (transaction rolled back): $error"
337 $self->locationnum( $options{'cust_location'}->locationnum );
338 #what about on-the-fly edits? if the ui supports it?
346 Delete this record from the database.
353 local $SIG{HUP} = 'IGNORE';
354 local $SIG{INT} = 'IGNORE';
355 local $SIG{QUIT} = 'IGNORE';
356 local $SIG{TERM} = 'IGNORE';
357 local $SIG{TSTP} = 'IGNORE';
358 local $SIG{PIPE} = 'IGNORE';
360 my $oldAutoCommit = $FS::UID::AutoCommit;
361 local $FS::UID::AutoCommit = 0;
364 foreach my $phone_device ( $self->phone_device ) {
365 my $error = $phone_device->delete;
367 $dbh->rollback if $oldAutoCommit;
372 my @phone_avail = qsearch('phone_avail', { 'svcnum' => $self->svcnum } );
373 foreach my $phone_avail ( @phone_avail ) {
374 $phone_avail->svcnum('');
375 my $error = $phone_avail->replace;
377 $dbh->rollback if $oldAutoCommit;
382 my $error = $self->SUPER::delete;
384 $dbh->rollback if $oldAutoCommit;
388 $dbh->commit or die $dbh->errstr if $oldAutoCommit;
393 # the delete method can be inherited from FS::Record
395 =item replace OLD_RECORD
397 Replaces the OLD_RECORD with this one in the database. If there is an error,
398 returns the error, otherwise returns false.
405 my $old = ( blessed($_[0]) && $_[0]->isa('FS::Record') )
412 warn "[$me] replacing $old with $new\n".
413 "\nwith options: ". Dumper(%options);
416 local $SIG{HUP} = 'IGNORE';
417 local $SIG{INT} = 'IGNORE';
418 local $SIG{QUIT} = 'IGNORE';
419 local $SIG{TERM} = 'IGNORE';
420 local $SIG{TSTP} = 'IGNORE';
421 local $SIG{PIPE} = 'IGNORE';
423 my $oldAutoCommit = $FS::UID::AutoCommit;
424 local $FS::UID::AutoCommit = 0;
427 #false laziness w/cust_pkg.pm... move this to location_Mixin? that would
428 #make it more of a base class than a mixin... :)
429 if ( $options{'cust_location'}
430 && ( ! $new->locationnum || $new->locationnum == -1 ) ) {
431 my $error = $options{'cust_location'}->insert;
433 $dbh->rollback if $oldAutoCommit;
434 return "inserting cust_location (transaction rolled back): $error";
436 $new->locationnum( $options{'cust_location'}->locationnum );
438 #what about on-the-fly edits? if the ui supports it?
440 # LNP data validation
441 return 'Invalid LNP status' # if someone does really stupid stuff
442 if ( ($old->lnp_status eq 'portingout' && $new->lnp_status eq 'portingin')
443 || ($old->lnp_status eq 'portout-reject' && $new->lnp_status eq 'portingin')
444 || ($old->lnp_status eq 'portin-reject' && $new->lnp_status eq 'portingout')
445 || ($old->lnp_status eq 'portingin' && $new->lnp_status eq 'native')
446 || ($old->lnp_status eq 'portin-reject' && $new->lnp_status eq 'native')
447 || ($old->lnp_status eq 'portingin' && $new->lnp_status eq 'portingout')
448 || ($old->lnp_status eq 'portingout' && $new->lnp_status eq 'portin-reject')
451 my $error = $new->SUPER::replace($old, %options);
453 # if this changed the e911 location, notify exports
454 if ($new->locationnum ne $old->locationnum) {
455 my $new_location = $new->cust_location_or_main;
456 my $old_location = $new->cust_location_or_main;
457 $error ||= $new->export('relocate', $new_location, $old_location);
461 $dbh->rollback if $oldAutoCommit;
462 return $error if $error;
466 $dbh->commit or die $dbh->errstr if $oldAutoCommit;
472 Called by the suspend method of FS::cust_pkg (see L<FS::cust_pkg>).
476 Called by the unsuspend method of FS::cust_pkg (see L<FS::cust_pkg>).
480 Called by the cancel method of FS::cust_pkg (see L<FS::cust_pkg>).
484 Checks all fields to make sure this is a valid phone number. If there is
485 an error, returns the error, otherwise returns false. Called by the insert
490 # the check method should currently be supplied - FS::Record contains some
491 # data checking routines
496 #my $conf = new FS::Conf;
498 my $x = $self->setfixed;
499 return $x unless ref($x);
502 my $phonenum = $self->phonenum;
503 my $phonenum_check_method;
504 if ( $conf->exists('svc_phone-allow_alpha_phonenum') ) {
505 $phonenum =~ s/\W//g;
506 $phonenum_check_method = 'ut_alpha';
508 $phonenum =~ s/\D//g;
509 $phonenum_check_method = 'ut_number';
511 $self->phonenum($phonenum);
513 $self->locationnum('') if !$self->locationnum || $self->locationnum == -1;
516 $self->ut_numbern('svcnum')
517 || $self->ut_numbern('countrycode')
518 || $self->$phonenum_check_method('phonenum')
519 || $self->ut_numbern('sim_imsi')
520 || $self->ut_anything('sip_password')
521 || $self->ut_numbern('pin')
522 || $self->ut_textn('phone_name')
523 || $self->ut_foreign_keyn('pbxsvc', 'svc_pbx', 'svcnum' )
524 || $self->ut_foreign_keyn('domsvc', 'svc_domain', 'svcnum' )
525 || $self->ut_foreign_keyn('sms_carrierid', 'cdr_carrier', 'carrierid' )
526 || $self->ut_alphan('sms_account')
527 || $self->ut_numbern('max_simultaneous')
528 || $self->ut_foreign_keyn('locationnum', 'cust_location', 'locationnum')
529 || $self->ut_numbern('forwarddst')
530 || $self->ut_textn('email')
531 || $self->ut_numbern('lrn')
532 || $self->ut_numbern('lnp_desired_due_date')
533 || $self->ut_numbern('lnp_due_date')
534 || $self->ut_textn('lnp_other_provider')
535 || $self->ut_textn('lnp_other_provider_account')
536 || $self->ut_enumn('lnp_status', ['','portingin','portingout','portedin',
537 'native', 'portin-reject', 'portout-reject'])
538 || $self->ut_enumn('portable', ['','Y'])
539 || $self->ut_textn('lnp_reject_reason')
540 || $self->ut_domainn('sip_server')
542 return $error if $error;
544 return 'Illegal IMSI (not 14-15 digits)' #shorter?
545 if length($self->sim_imsi)
546 && ( length($self->sim_imsi) < 14 || length($self->sim_imsi) > 15 );
548 # LNP data validation
549 return 'Cannot set LNP fields: no LNP in progress'
550 if ( ($self->lnp_desired_due_date || $self->lnp_due_date
551 || $self->lnp_other_provider || $self->lnp_other_provider_account
552 || $self->lnp_reject_reason)
553 && (!$self->lnp_status || $self->lnp_status eq 'native') );
554 return 'Cannot set LNP reject reason: no LNP in progress or status is not reject'
555 if ($self->lnp_reject_reason && (!$self->lnp_status
556 || $self->lnp_status !~ /^port(in|out)-reject$/) );
557 return 'Cannot port-out a non-portable number'
558 if (!$self->portable && $self->lnp_status eq 'portingout');
561 return 'Name ('. $self->phone_name.
562 ") is longer than $phone_name_max characters"
563 if $phone_name_max && length($self->phone_name) > $phone_name_max;
565 $self->countrycode(1) unless $self->countrycode;
567 unless ( length($self->pin) ) {
568 my $random_pin = $conf->config('svc_phone-random_pin');
569 if ( defined($random_pin) && $random_pin =~ /^\d+$/ ) {
571 join('', map int(rand(10)), 0..($random_pin-1))
576 if ( length($self->sip_password) ) {
578 return "SIP password must be longer than $passwordmin characters"
579 if length($self->sip_password) < $passwordmin;
580 return "SIP password must be shorter than $passwordmax characters"
581 if length($self->sip_password) > $passwordmax;
583 } elsif ( $part_svc->part_svc_column('sip_password')->columnflag ne 'F' ) {
587 join('', map $pw_set[ int(rand $#pw_set) ], (1..min($passwordmax,16)) )
592 if ($self->e911_class and !exists(e911_classes()->{$self->e911_class})) {
593 return "undefined e911 class '".$self->e911_class."'";
595 if ($self->e911_type and !exists(e911_types()->{$self->e911_type})) {
596 return "undefined e911 type '".$self->e911_type."'";
602 =item _check duplicate
604 Internal method to check for duplicate phone numers.
608 #false laziness w/svc_acct.pm's _check_duplicate.
609 sub _check_duplicate {
612 my $global_unique = $conf->config('global_unique-phonenum') || 'none';
613 return '' if $global_unique eq 'disabled';
618 grep { !$self->svcnum || $_->svcnum != $self->svcnum }
619 qsearch( 'svc_phone', {
620 'countrycode' => $self->countrycode,
621 'phonenum' => $self->phonenum,
624 return gettext('phonenum_in_use')
625 if $global_unique eq 'countrycode+phonenum' && @dup_ccphonenum;
627 my $part_svc = qsearchs('part_svc', { 'svcpart' => $self->svcpart } );
628 unless ( $part_svc ) {
629 return 'unknown svcpart '. $self->svcpart;
632 if ( @dup_ccphonenum ) {
634 my $exports = FS::part_export::export_info('svc_phone');
635 my %conflict_ccphonenum_svcpart = ( $self->svcpart => 'SELF', );
637 foreach my $part_export ( $part_svc->part_export ) {
639 #this will catch to the same exact export
640 my @svcparts = map { $_->svcpart } $part_export->export_svc;
642 $conflict_ccphonenum_svcpart{$_} = $part_export->exportnum
647 foreach my $dup_ccphonenum ( @dup_ccphonenum ) {
648 my $dup_svcpart = $dup_ccphonenum->cust_svc->svcpart;
649 if ( exists($conflict_ccphonenum_svcpart{$dup_svcpart}) ) {
650 return "duplicate phone number ".
651 $self->countrycode. ' '. $self->phonenum.
652 ": conflicts with svcnum ". $dup_ccphonenum->svcnum.
653 " via exportnum ". $conflict_ccphonenum_svcpart{$dup_svcpart};
665 Checks the supplied PIN against the PIN in the database. Returns true for a
666 sucessful authentication, false if no match.
671 my($self, $check_pin) = @_;
672 length($self->pin) && $check_pin eq $self->pin;
681 #XXX Session-Timeout! holy shit, need rlm_perl to ask for this in realtime
693 #my $conf = new FS::Conf;
696 if ( $conf->config('svc_phone-radius-password') eq 'countrycode_phonenum' ) {
697 $password = $self->countrycode. $self->phonenum;
699 $password = $conf->config('svc_phone-radius-default_password');
701 $check{'User-Password'} = $password;
710 =item sms_cdr_carrier
712 Returns the L<FS::cdr_carrier> assigned as the SMS carrier for this phone.
716 sub sms_cdr_carrier {
718 return '' unless $self->sms_carrierid;
719 qsearchs('cdr_carrier', { 'carrierid' => $self->sms_carrierid } );
722 =item sms_carriername
724 Returns the name of the SMS carrier, or an empty string if there isn't one.
728 sub sms_carriername {
730 my $cdr_carrier = $self->sms_cdr_carrier or return '';
731 $cdr_carrier->carriername;
736 Returns the L<FS::svc_circuit> assigned as the trunk for this phone line.
740 Returns the label of the circuit (the part_svc label followed by the
741 circuit ID), or an empty string if there isn't one.
747 my $svcnum = $self->get('circuit_svcnum') or return '';
748 return FS::svc_circuit->by_key($svcnum);
753 my $svc_circuit = $self->svc_circuit or return '';
754 return join(' ', $svc_circuit->part_svc->svc, $svc_circuit->circuit_id);
759 Returns any FS::phone_device records associated with this service.
765 qsearch('phone_device', { 'svcnum' => $self->svcnum } );
768 #override location_Mixin version cause we want to try the cust_pkg location
769 #in between us and cust_main
770 # XXX what to do in the unlinked case??? return a pseudo-object that returns
772 sub cust_location_or_main {
774 return $self->cust_location if $self->locationnum;
775 my $cust_pkg = $self->cust_svc->cust_pkg;
776 $cust_pkg ? $cust_pkg->cust_location_or_main : '';
779 =item phone_name_or_cust
781 Returns the C<phone_name> field if it has a value, or the package contact
782 name if there is one, or the customer contact name.
786 sub phone_name_or_cust {
788 if ( $self->phone_name ) {
789 return $self->phone_name;
791 my $cust_pkg = $self->cust_svc->cust_pkg or return '';
792 if ( $cust_pkg->contactnum ) {
793 return $cust_pkg->contact->firstlast;
795 return $cust_pkg->cust_main->name_short;
799 =item psearch_cdrs OPTIONS
801 Returns a paged search (L<FS::PagedSearch>) for Call Detail Records
802 associated with this service. By default, "associated with" means that
803 either the "src" or the "charged_party" field of the CDR matches the
804 "phonenum" field of the service. To access the CDRs themselves, call
805 "->fetch" on the resulting object.
809 Accepts the following options:
811 =item for_update => 1: SELECT the CDRs "FOR UPDATE".
813 =item status => "" (or "processing-tiered", "done"): Return only CDRs with that processing status.
815 =item inbound => 1: Return CDRs for inbound calls (that is, those that match
816 on 'dst'). With "status", will filter on inbound processing status.
818 =item default_prefix => "XXX": Also accept the phone number of the service prepended
819 with the chosen prefix.
821 =item begin, end: Start and end of a date range, as unix timestamp.
823 =item cdrtypenum: Only return CDRs with this type.
825 =item calltypenum: Only return CDRs with this call type.
827 =item disable_src => 1: Only match on 'charged_party', not 'src'.
829 =item disable_charged_party => 1: Only match on 'src', not 'charged_party'.
831 =item nonzero: Only return CDRs where duration > 0.
833 =item by_svcnum: not supported for svc_phone
835 =item billsec_sum: Instead of returning all of the CDRs, return a single
836 record (as an L<FS::cdr> object) with the sum of the 'billsec' field over
837 the entire result set.
845 my($self, %options) = @_;
850 if ( $options{'inbound'} ) {
853 if ( exists($options{'status'}) ) {
854 my $status = $options{'status'};
856 push @where, 'EXISTS ( SELECT 1 FROM cdr_termination '.
857 'WHERE cdr.acctid = cdr_termination.acctid '.
858 "AND cdr_termination.status = '$status' ". #quoting kludge
859 'AND cdr_termination.termpart = 1 )';
861 push @where, 'NOT EXISTS ( SELECT 1 FROM cdr_termination '.
862 'WHERE cdr.acctid = cdr_termination.acctid '.
863 'AND cdr_termination.termpart = 1 )';
869 push @fields, 'charged_party' unless $options{'disable_charged_party'};
870 push @fields, 'src' unless $options{'disable_src'};
871 $hash{'freesidestatus'} = $options{'status'}
872 if exists($options{'status'});
875 if ($options{'cdrtypenum'}) {
876 $hash{'cdrtypenum'} = $options{'cdrtypenum'};
878 if ($options{'calltypenum'}) {
879 $hash{'calltypenum'} = $options{'calltypenum'};
882 my $for_update = $options{'for_update'} ? 'FOR UPDATE' : '';
884 my $number = $self->phonenum;
886 my $prefix = $options{'default_prefix'};
888 my @orwhere = map " $_ = '$number' ", @fields;
889 push @orwhere, map " $_ = '$prefix$number' ", @fields
890 if defined($prefix) && length($prefix);
891 if ( $prefix && $prefix =~ /^\+(\d+)$/ ) {
892 push @orwhere, map " $_ = '$1$number' ", @fields
895 push @where, ' ( '. join(' OR ', @orwhere ). ' ) ';
897 if ( $options{'begin'} ) {
898 push @where, 'startdate >= '. $options{'begin'};
900 if ( $options{'end'} ) {
901 push @where, 'startdate < '. $options{'end'};
903 if ( $options{'nonzero'} ) {
904 push @where, 'duration > 0';
907 my $extra_sql = ( keys(%hash) ? ' AND ' : ' WHERE ' ). join(' AND ', @where );
912 'extra_sql' => $extra_sql,
913 'order_by' => $options{'billsec_sum'} ? '' : "ORDER BY startdate $for_update",
914 'select' => $options{'billsec_sum'} ? 'sum(billsec) as billsec_sum' : '*',
918 =item get_cdrs (DEPRECATED)
920 Like psearch_cdrs, but returns all the L<FS::cdr> objects at once, in a
921 single list. Arguments are the same as for psearch_cdrs. This can take
922 an unreasonably large amount of memory and is best avoided.
928 my $psearch = $self->psearch_cdrs(@_);
929 qsearch ( $psearch->{query} )
934 Takes the same options as psearch_cdrs, but returns a single row containing
935 "count" (the number of CDRs) and the sums of the following fields: duration,
936 billsec, rated_price, rated_seconds, rated_minutes.
938 Note that if any calls are not rated, their rated_* fields will be null.
939 If you want to use those fields, pass the 'status' option to limit to
940 calls that have been rated. This is intentional; please don't "fix" it.
946 my $psearch = $self->psearch_cdrs(@_);
947 $psearch->{query}->{'select'} = join(',',
949 map { "SUM($_) AS $_" }
950 qw(duration billsec rated_price rated_seconds rated_minutes)
953 $psearch->{query}->{'extra_sql'} =~ s/ ORDER BY.*$//;
954 qsearchs ( $psearch->{query} );
965 Returns a hashref of allowed values and descriptions for the C<e911_class>
970 Returns a hashref of allowed values and descriptions for the C<e911_type>
976 tie my %x, 'Tie::IxHash', (
979 3 => 'Residence PBX',
982 6 => 'Coin 1 Way out',
985 9 => 'Residence OPX',
987 A => 'Customer Operated Coin Telephone',
989 G => 'Wireless Phase I',
990 H => 'Wireless Phase II',
991 I => 'Wireless Phase II with Phase I information',
992 V => 'VoIP Services Default',
993 C => 'VoIP Residence',
994 D => 'VoIP Business',
995 E => 'VoIP Coin/Pay Phone',
996 F => 'VoIP Wireless',
998 K => 'VoIP Enterprise Services',
1005 tie my %x, 'Tie::IxHash', (
1006 0 => 'Not FX nor Non-Published',
1007 1 => 'FX in 911 serving area',
1008 2 => 'FX outside 911 serving area',
1009 3 => 'Non-Published',
1010 4 => 'Non-Published FX in serving area',
1011 5 => 'Non-Published FX outside serving area',
1012 6 => 'Local Ported Number',
1013 7 => 'Interim Ported Number',
1024 L<FS::svc_Common>, L<FS::Record>, L<FS::cust_svc>, L<FS::part_svc>,
1025 L<FS::cust_pkg>, schema.html from the base documentation.