Update destinations.php

This commit is contained in:
FusionPBX
2020-01-29 23:45:55 -07:00
committed by GitHub
parent 469798ad36
commit d7ac761b4e

View File

@@ -500,6 +500,23 @@ if (!class_exists('destinations')) {
return $array;
}
/**
* valid destination
*/
public function valid($destination) {
$destinations = $this->all('dialplan');
foreach($destinations as $category => $array) {
if (is_array($array)) {
foreach ($array as $key => $value) {
if ($destination == $value) {
return true;
}
}
}
}
return false;
}
/**
* delete records
*/