|
|
|
@ -288,9 +288,7 @@ sub prepare_resource {
|
|
|
|
|
|
|
|
|
|
$resource->{administrative} = $item ? $item->provisioning_voip_subscriber->admin : 0;
|
|
|
|
|
}
|
|
|
|
|
if (exists $resource->{primary_number}) {
|
|
|
|
|
$resource->{e164} = delete $resource->{primary_number};
|
|
|
|
|
}
|
|
|
|
|
$resource->{e164} = delete $resource->{primary_number};
|
|
|
|
|
$resource->{status} //= 'active';
|
|
|
|
|
$resource->{administrative} //= 0;
|
|
|
|
|
$resource->{is_pbx_pilot} //= 0;
|
|
|
|
@ -1545,7 +1543,7 @@ sub update_subscriber_numbers {
|
|
|
|
|
$alias->{e164}->{is_devid} = delete $alias->{is_devid};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (defined $current_primary_number && $current_primary_number == $cli) {
|
|
|
|
|
if ($current_primary_number == $cli) {
|
|
|
|
|
die "alias '" . $c->qs($cli) . "' is already defined as the primary number";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|