MT#9941 Add cloud_pbx_hunt_* fields to api.

So can be specified without old pbx_hunt_[policy|timeout]
changes/52/552/1
Irina Peshinskaya 11 years ago
parent 8b09bd0777
commit 59bfbeb401

@ -115,6 +115,27 @@ has_field 'pbx_hunt_timeout' => (
title => ['Hunting Timeout'], title => ['Hunting Timeout'],
}, },
); );
has_field 'cloud_pbx_hunt_policy' => (
type => 'Select',
options => [
{ value => 'serial', label => 'serial'},
{ value => 'parallel', label => 'parallel'},
{ value => 'random', label => 'random'},
{ value => 'circular', label => 'circular'},
],
element_attr => {
rel => ['tooltip'],
title => ["Hunting policy, one of serial, parallel, random, circular."],
},
);
has_field 'cloud_pbx_hunt_timeout' => (
type => '+NGCP::Panel::Field::PosInteger',
element_attr => {
rel => ['tooltip'],
title => ['Hunting Timeout'],
},
);
has_field 'profile' => ( has_field 'profile' => (
type => '+NGCP::Panel::Field::SubscriberProfile', type => '+NGCP::Panel::Field::SubscriberProfile',

@ -43,7 +43,9 @@ sub resource_from_item {
} }
unless($self->is_true($resource{is_pbx_group})) { unless($self->is_true($resource{is_pbx_group})) {
delete $resource{pbx_hunt_policy}; delete $resource{pbx_hunt_policy};
delete $resource{cloud_pbx_hunt_policy};
delete $resource{pbx_hunt_timeout}; delete $resource{pbx_hunt_timeout};
delete $resource{cloud_pbx_hunt_timeout};
} }
delete $resource{contact_id}; delete $resource{contact_id};
if($item->contact) { if($item->contact) {

Loading…
Cancel
Save