From e1cb134fa87a2a526694eca3fa862f262c916f56 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Wed, 12 Jul 2017 15:17:37 -0700 Subject: [PATCH] correctly parse error response from e911 provisioning, RT#76262 --- FS/FS/part_export/vitelity.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/FS/FS/part_export/vitelity.pm b/FS/FS/part_export/vitelity.pm index f80ef6d6d..332e45712 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? -- 2.11.0