error_log($_SERVER['SCRIPT_NAME'] . " STATUSCHECK-1: " . $msg['err_small'] . " return={$return} mac=" . $mac . " ext=" . $extension . " \n", 3, "/tmp/yealink_startup.log"); } $output = "<YealinkIPPhoneTextScreen LockIn=\"yes\" destroyOnExit=\"yes\">\n"; $output .= "<Title>" . _("Error") . "</Title>\n"; $output .= "<Text>" . $msg['err_small'] . "</Text>\n"; $output .= "</YealinkIPPhoneTextScreen>\n"; output($output); exit; } else { // Display others will Logout! $text = "Logout old extension"; if ($debug) { error_log($_SERVER['SCRIPT_NAME'] . " LOGOUT-OLD-1: " . $msg['err_small'] . " return={$return} mac=" . $mac . " ext=" . $extension . " \n", 3, "/tmp/yealink_startup.log"); } yealink_error_check(phone_logout($return)); yealink_error_check(delete_update_config_file($return)); pbx_manage('logout', $return); } } else { $text = "logged in"; } if ($prov_mode == 'new') { if (!preg_match("#:#", $ip)) { $ip .= ":80"; } if ($debug) { error_log($_SERVER['SCRIPT_NAME'] . " INFO-4: " . $msg['err_small'] . " mac=" . $mac . " ext=" . $extension . " mod={$model} \n", 3, "/tmp/yealink_startup.log"); } if (!file_exists('../../modules/phoneprovision/yealink/' . $model . '.cfg')) { $output = "<YealinkIPPhoneTextScreen LockIn=\"yes\" destroyOnExit=\"yes\">\n"; $output .= "<Title>" . _("Error") . "</Title>\n";
error_log($_SERVER['SCRIPT_NAME'] . " STATUSCHECK-1: " . $msg['err_small'] . " return={$return} mac=" . $mac . " ext=" . $extension . " \n", 3, "/tmp/aastra_startup.log"); } $output = "<AastraIPPhoneTextScreen LockIn=\"yes\" destroyOnExit=\"yes\">\n"; $output .= "<Title>" . _("Error") . "</Title>\n"; $output .= "<Text>" . $msg['err_small'] . "</Text>\n"; $output .= "</AastraIPPhoneTextScreen>\n"; output($output); exit; } else { // Display others will Logout! $text = "Logout old extension"; if ($debug) { error_log($_SERVER['SCRIPT_NAME'] . " LOGOUT-OLD-1: " . $msg['err_small'] . " return={$return} mac=" . $mac . " ext=" . $extension . " \n", 3, "/tmp/aastra_startup.log"); } aastra_error_check(phone_logout($return)); aastra_error_check(delete_update_config_file($return)); pbx_manage('logout', $return); } } else { $text = "logged in"; } if ($prov_mode == 'new') { if (!preg_match("#:#", $ip)) { $ip .= ":80"; } if ($debug) { error_log($_SERVER['SCRIPT_NAME'] . " INFO-4: " . $msg['err_small'] . " mac=" . $mac . " ext=" . $extension . " mod={$model} \n", 3, "/tmp/aastra_startup.log"); } if (!file_exists('../../modules/phoneprovision/aastra/' . $model . '.cfg')) { $output = "<AastraIPPhoneTextScreen LockIn=\"yes\" destroyOnExit=\"yes\">\n"; $output .= "<Title>" . _("Error") . "</Title>\n";