diff --git a/lib/NGCP/Panel/Form/Subscriber/SubscriberAPI.pm b/lib/NGCP/Panel/Form/Subscriber/SubscriberAPI.pm index 94e1ff7f76..eb3cd745f0 100644 --- a/lib/NGCP/Panel/Form/Subscriber/SubscriberAPI.pm +++ b/lib/NGCP/Panel/Form/Subscriber/SubscriberAPI.pm @@ -115,6 +115,27 @@ has_field 'pbx_hunt_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' => ( type => '+NGCP::Panel::Field::SubscriberProfile', diff --git a/lib/NGCP/Panel/Role/API/Subscribers.pm b/lib/NGCP/Panel/Role/API/Subscribers.pm index 818f338640..825d5c1b2d 100644 --- a/lib/NGCP/Panel/Role/API/Subscribers.pm +++ b/lib/NGCP/Panel/Role/API/Subscribers.pm @@ -43,7 +43,9 @@ sub resource_from_item { } unless($self->is_true($resource{is_pbx_group})) { delete $resource{pbx_hunt_policy}; + delete $resource{cloud_pbx_hunt_policy}; delete $resource{pbx_hunt_timeout}; + delete $resource{cloud_pbx_hunt_timeout}; } delete $resource{contact_id}; if($item->contact) {