Example #1
0
            }
        }
        break;
        # Configuration
    # Configuration
    case 'configuration':
        # 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']);
        if (isset($array_temp['']['action uri registered'])) {
            $array_reg = array('action uri registered' => $array_temp['']['action uri registered']);
            unset($array_temp['']['action uri registered']);
            $array_temp[''] = array_merge($array_reg, $array_temp['']);
        }
        # Configuration XML object
        $object = new AastraIPPhoneConfiguration();
        # Send the partial configuration
        $index = 1;
        # Bug 3.2.1 send all the configuration twice
        $page = intval(($page - 1) / 2) + 1;
        foreach ($array_temp[''] as $key => $value) {
            if ($index >= ($page - 1) * AASTRA_MAXCONFIGURATIONS + 1 and $index <= $page * AASTRA_MAXCONFIGURATIONS) {
                $object->addEntry($key, preg_replace('/"/', '', $value));
            }
            $index++;
        }
        break;
}
# Display XML Object
$object->output();
exit;
Example #2
0
     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();
     $ftext->setDestroyOnExit();
     $ftext->addLine('Formatted Screen', 'double', 'center', 'red');
     $ftext->setScrollStart();
     $ftext->addLine('Scrolled text1');
     $ftext->addLine('Scrolled text2');
     $ftext->addLine('Scrolled text3');
     $ftext->addLine('Scrolled text4');
     $ftext->addLine('Scrolled text5');
     $ftext->setScrollEnd();
     $ftext->addLine('Footer', NULL, 'center');
     $ftext->addSoftkey('10', 'Exit', 'SoftKey:Exit');