if ($features_module) { $xml->reg->addAttribute("reg.{$i}.serverFeatureControl.dnd", polycomphones_getvalue('serverFeatureControl_dnd', $line, $general)); $xml->reg->addAttribute("reg.{$i}.serverFeatureControl.cf", polycomphones_getvalue('serverFeatureControl_cf', $line, $general)); } $exchangevm = null; if ($exchange_module) { $exchangevm = sql("SELECT user FROM exchangeum_users \n\t\t\t\tWHERE user = '******'user']) . "'\n\t\t\t\t\tAND umenabled = 'true'", 'getOne'); } $fcc = new featurecode($exchangevm != null ? 'exchangeum' : 'voicemail', 'myvoicemail'); $code = $fcc->getCodeActive(); unset($fcc); if ($code != '') { $xml->msg->mwi->addAttribute("msg.mwi.{$i}.callBack", $code); } } elseif ($line['externalid'] != null) { $details = polycomphones_get_externallines_edit($line['externalid']); $xml->reg->addAttribute("reg.{$i}.displayName", $details['name']); $xml->reg->addAttribute("reg.{$i}.address", $details['settings']['user']); $xml->reg->addAttribute("reg.{$i}.label", $details['settings']['label']); $xml->reg->addAttribute("reg.{$i}.auth.userId", $details['settings']['user']); $xml->reg->addAttribute("reg.{$i}.auth.password", $details['settings']['secret']); $xml->reg->addAttribute("reg.{$i}.server.1.address", $details['settings']['address']); $xml->reg->addAttribute("reg.{$i}.server.1.port", $details['settings']['port']); $xml->reg->addAttribute("reg.{$i}.server.1.transport", $details['settings']['transport']); $xml->reg->addAttribute("reg.{$i}.server.1.register", $details['settings']['register']); $xml->reg->addAttribute("reg.{$i}.lineKeys", polycomphones_getvalue('lineKeys', $line, $general)); $xml->reg->addAttribute("reg.{$i}.ringType", polycomphones_getvalue('ringType', $line, $general)); $xml->call->missedCallTracking->addAttribute("call.missedCallTracking.{$i}.enabled", polycomphones_getvalue('missedCallTracking', $line, $general)); $xml->msg->mwi->addAttribute("msg.mwi.{$i}.subscribe", $details['settings']['user']); $xml->msg->mwi->addAttribute("msg.mwi.{$i}.callBackMode", polycomphones_getvalue('callBackMode', $line, $general)); $xml->msg->mwi->addAttribute("msg.mwi.{$i}.callBack", $details['settings']['mwicallback']);
redirect_standard('polycomphones_form'); } $lines = polycomphones_get_externallines_list(); require 'modules/polycomphones/views/polycomphones_externallines.php'; break; case 'externallines_edit': if (isset($_POST['action']) && $_POST['action'] == 'edit') { $line['name'] = $_POST['name']; $fields = array('label', 'user', 'secret', 'address', 'port', 'transport', 'register', 'mwicallback'); foreach ($fields as $field) { $line['settings'][$field] = $_POST[$field]; } polycomphones_save_externallines_edit($_GET['edit'], $line); redirect('config.php?type=setup&display=polycomphones&polycomphones_form=externallines_list'); } $line = polycomphones_get_externallines_edit($_GET['edit']); require 'modules/polycomphones/views/polycomphones_externallines_edit.php'; break; case 'alertinfo_list': $alerts = polycomphones_get_alertinfo_list(); require 'modules/polycomphones/views/polycomphones_alertinfo.php'; break; case 'alertinfo_edit': if (isset($_POST['action']) && $_POST['action'] == 'edit') { $fields = array('name', 'callwait', 'micmute', 'ringer', 'type', 'alertinfo'); foreach ($fields as $field) { $alert[$field] = $_POST[$field]; } polycomphones_save_alertinfo_edit($_GET['edit'], $alert); redirect('config.php?type=setup&display=polycomphones&polycomphones_form=alertinfo_list'); }