my $e911_error = $self->e911_send($svc_phone);
- if ( $e911_error =~ /^(missingdata|invalid)/i ) {
+ if ( $e911_error =~ /status=(missingdata|invalid)/i ) {
+
+ my $status = $1;
+ if ( $e911_error =~ /error=(.*)/ ) {
+ $e911_error = "status=$status, error=$1";
+ }
+
#but we already provisioned the DID, so:
$self->vitelity_command('removedid', 'did'=> $svc_phone->phonenum,);
#and check the results? if it failed, then what?
return '' if $self->option('disable_e911');
my %location = $svc_phone->location_hash;
+ $location{'zip'} =~ s/\-\d{4}$//;
my %e911send = (
'did' => $svc_phone->phonenum,
'name' => $svc_phone->phone_name_or_cust,
my $e911_result = $self->vitelity_command('e911send', %e911send);
- unless ( $e911_result =~ /^(missingdata|invalid)/i ) {
+ unless ( $e911_result =~ /status=(missingdata|invalid)/i ) {
warn "Vitelity response: $e911_result" if $self->option('debug');
return '';
}