# Cancel recording
 # Cancel recording
 case 'cancel_greetings':
     # Cancel recording
     require_once 'AastraIPPhoneExecute.class.php';
     $object = new AastraIPPhoneExecute();
     $object->addEntry('Key:Goodbye');
     $object->setTriggerDestroyonExit();
     break;
     # Callback
 # Callback
 case 'callback':
     # Input Screen
     require_once 'AastraIPPhoneInputScreen.class.php';
     $object = new AastraIPPhoneInputScreen();
     $object->setDestroyOnExit();
     # Input number
     $object->setTitle(Aastra_get_label('Edit Number', $language));
     $object->setType('number');
     $object->setPrompt(Aastra_get_label('Number to dial', $language));
     $object->setParameter('paused');
     $object->setURL($XML_SERVER . '&action=dial&msg=' . $msg . '&cause=' . $cause);
     $object->setDefault($cause);
     # Common Softkeys
     $object->addSoftkey('1', Aastra_get_label('Backspace', $language), 'SoftKey:BackSpace');
     $object->addSoftkey('5', Aastra_get_label('Dial', $language), 'SoftKey:Submit');
     $object->addSoftkey('6', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=detail&msg=' . $msg);
     break;
     # Dial
 # Dial
 case 'dial':
//step 1&2: ensure that the search term hasnt been entered yet, and promt for it. If
//we dont have a search method either, return default to prompt for method
if (!$search) {
    switch ($searchmethod) {
        case 't9':
            $sql = 'DELETE FROM contactdir_details WHERE extension = ? and type = ?';
            $db->query($sql, array($user, 'searchmethod'));
            $sql = 'INSERT INTO contactdir_details (extension, type, val) VALUES (?, ?, ?)';
            $db->query($sql, array($user, 'searchmethod', 't9'));
            $input->setTitle('Contact Directory');
            $input->setPrompt('Enter first three chars.');
            $input->setType('string');
            $input->setParameter('search');
            $input->setDefault($searchterm);
            $input->setURL($XML_SERVER_PATH . 'contactdir.php?searchmethod=t9');
            $input->setDestroyOnExit();
            $input->addSoftkey('1', 'One-Touch', $XML_SERVER_PATH . 'contactdir.php?user='******'&searchmethod=onetouch');
            $input->addSoftkey('5', 'Back', $XML_SERVER_PATH . 'contactdir.php');
            $input->addSoftkey('4', 'Search', 'SoftKey:Submit');
            $input->addSoftkey('6', 'BKSpace', 'SoftKey:BackSpace');
            $input->addSoftkey('3', 'Exit', 'SoftKey:Exit');
            $input->output();
            break;
        case 'onetouch':
            $sql = 'DELETE FROM contactdir_details WHERE extension = ? and type = ?';
            $db->query($sql, array($user, 'searchmethod'));
            $sql = 'INSERT INTO contactdir_details (extension, type, val) VALUES (?, ?, ?)';
            $db->query($sql, array($user, 'searchmethod', 'onetouch'));
            $input->setTitle('Contact Directory');
            $input->setPrompt('Enter first three chars.');
            $input->setType('number');