} exit; } // Display error $output = "<YealinkIPPhoneTextScreen LockIn=\"no\" destroyOnExit=\"yes\">\n"; $output .= "<Title>" . _("Auth. faild") . "</Title>\n"; $output .= "<Text>" . _("Wrong credentials") . "</Text>\n"; $output .= "</YealinkIPPhoneTextScreen>\n"; } else { // Update config file $output = "<YealinkIPPhoneTextScreen destroyOnExit=\"yes\">\n"; $output .= "<Title>" . _("Logged out") . "</Title>\n"; $output .= "<Text>" . _("Reboot") . "</Text>\n"; $output .= "</YealinkIPPhoneTextScreen>\n"; header("Refresh: 3; url=" . $XML_SERVER . "?action=reboot"); yealink_error_check(delete_update_config_file_mac($mac)); sleep(2); // Logout phone and reboot pbx_manage('logout', $extension); output($output); yealink_error_check(phone_logout($ip)); if ($debug) { error_log($_SERVER['SCRIPT_NAME'] . " LOGOUT-2: " . $msg[err_small] . " mac=" . $mac . " ext=" . $extension . " ext=" . $username . " name={$name} pass="******" callerid=" . $callerid_name . " model=" . $phone['model'] . " type=" . $phone['type'] . " lang=" . $language . " ip=" . $ip . " did=" . $did . " mobilecid=" . $mobilecid . "\n", 3, "/tmp/yealink_startup.log"); } exit; } } output($output); exit; } // Input Extension
} exit; } // Display error $output = "<AastraIPPhoneTextScreen LockIn=\"no\" destroyOnExit=\"yes\">\n"; $output .= "<Title>" . _("Auth. faild") . "</Title>\n"; $output .= "<Text>" . _("Wrong credentials") . "</Text>\n"; $output .= "</AastraIPPhoneTextScreen>\n"; } else { // Update config file $output = "<AastraIPPhoneTextScreen destroyOnExit=\"yes\">\n"; $output .= "<Title>" . _("Logged out") . "</Title>\n"; $output .= "<Text>" . _("Reboot") . "</Text>\n"; $output .= "</AastraIPPhoneTextScreen>\n"; header("Refresh: 3; url=" . $XML_SERVER . "?action=reboot"); aastra_error_check(delete_update_config_file_mac($mac)); sleep(2); // Logout phone and reboot pbx_manage('logout', $extension); output($output); aastra_error_check(phone_logout($ip)); if ($debug) { error_log($_SERVER['SCRIPT_NAME'] . " LOGOUT-2: " . $msg[err_small] . " mac=" . $mac . " ext=" . $extension . " ext=" . $username . " name={$name} pass="******" callerid=" . $callerid_name . " model=" . $phone['model'] . " type=" . $phone['type'] . " lang=" . $language . " ip=" . $ip . " did=" . $did . " mobilecid=" . $mobilecid . "\n", 3, "/tmp/aastra_startup.log"); } exit; } } output($output); exit; } // Input Extension