} # Depending on dynamic SIP if (Aastra_is_dynamic_sip_supported()) { # Read MAC.cfg $array_temp = Aastra_readCFGfile(AASTRA_TFTP_DIRECTORY . '/' . $header['mac'] . '.cfg', '#', ':'); $array_temp['']['sip line1 password'] = preg_replace('/"/', '', $array_temp['']['sip line1 password']); # How many pages? $last = intval(count($array_temp['']) / AASTRA_MAXCONFIGURATIONS); if (count($array_temp['']) - $last * AASTRA_MAXCONFIGURATIONS != 0) { $last++; } # 3.2.1 bug double all the configuration messages $last = $last * 2; # Prepare the requests for the configuration $object = new AastraIPPhoneExecute(); $object->setTriggerDestroyOnExit(); for ($i = 1; $i <= $last; $i++) { $object->addEntry($XML_SERVER . '&extension=' . $extension . '&action=configuration&page=' . $i); } # Special case for 6739i before 3.2.1 if ($header['model'] == 'Aastra6739i' and !Aastra_test_phone_version('3.2.1,', 1)) { $object->addEntry($XML_SERVER_PATH . '/sync.php?action=register&user='******'&action=display'); if (Aastra_is_fastreboot_supported()) { $object->AddEntry('Command: FastReboot'); } else { $object->AddEntry('Command: Reset');
$input->setFieldSelection('1'); $input->setFieldPrompt('Username:'******'user'); $input->setFieldSelection('1'); $input->addField('number'); $input->setFieldPassword('yes'); $input->setFieldPrompt('Password:'******'password'); $input->setFieldSelection('2'); $input->addSoftkey('10', 'Exit', 'SoftKey:Exit'); $input->output(); break; case 'execute': require_once 'AastraIPPhoneExecute.class.php'; $execute = new AastraIPPhoneExecute(); $execute->setTriggerDestroyOnExit(); $execute->addEntry('Led: softkey1=on'); $execute->addEntry('Dial:7001', 'no'); $execute->output(); break; case 'configuration': require_once 'AastraIPPhoneConfiguration.class.php'; $configuration = new AastraIPPhoneConfiguration(); $configuration->addEntry('softkey1 label', 'Test'); $configuration->addEntry('softkey1 type', 'xml'); $configuration->setTriggerDestroyOnExit(); $configuration->output(); break; case 'formattedtextscreen': require_once 'AastraIPPhoneFormattedTextScreen.class.php'; $ftext = new AastraIPPhoneFormattedTextScreen();