diff --git a/lib/NGCP/Panel/Form/Subscriber/AutoAttendantAPI.pm b/lib/NGCP/Panel/Form/Subscriber/AutoAttendantAPI.pm index 43efb7962e..4a69db8ff8 100644 --- a/lib/NGCP/Panel/Form/Subscriber/AutoAttendantAPI.pm +++ b/lib/NGCP/Panel/Form/Subscriber/AutoAttendantAPI.pm @@ -16,6 +16,11 @@ has_field 'slots' => ( }, ); +has_field 'slots.id' => ( + type => '+NGCP::Panel::Field::PosInteger', + readonly => 1, +); + has_field 'slots.slot' => ( type => 'Select', label => 'Key', diff --git a/lib/NGCP/Panel/Role/API/AutoAttendants.pm b/lib/NGCP/Panel/Role/API/AutoAttendants.pm index 5481a72cf5..35f59a23c9 100644 --- a/lib/NGCP/Panel/Role/API/AutoAttendants.pm +++ b/lib/NGCP/Panel/Role/API/AutoAttendants.pm @@ -138,7 +138,7 @@ sub _autoattendants_from_subscriber { my @aas; for my $s ($prov_subscriber->voip_pbx_autoattendants->all) { - push @aas, {destination => $s->destination, slot => $s->choice}; + push @aas, {destination => $s->destination, slot => $s->choice, id => $s->id}; } return \@aas; }