X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fvitelity.pm;h=51bb0aab161813fd8e878a7133a6b6c9ba23e306;hb=cbfeb5f6b7490f78361318ce6290bfb442dbfcbe;hp=f80ef6d6dfe125b9b1e3f0c71eeb5052dc0b8a58;hpb=9fa1bf13b76c0177a3aa12d70aabe5358a9fa3e5;p=freeside.git diff --git a/FS/FS/part_export/vitelity.pm b/FS/FS/part_export/vitelity.pm index f80ef6d6d..51bb0aab1 100644 --- a/FS/FS/part_export/vitelity.pm +++ b/FS/FS/part_export/vitelity.pm @@ -387,7 +387,13 @@ sub _export_insert { 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? @@ -419,7 +425,7 @@ sub e911_send { 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 ''; }