Ejemplo n.º 1
0
            }
            printf("\t<DirectoryEntry>");
            printf("\t<Name>%s</Name>", $values['name']);
            printf("\t<Telephone>%s</Telephone>", $number);
            printf("\t<Email>%s</Email>", $values['email']);
            printf("\t<Outcid>%s</Outcid>", $values['outcid']);
            printf("\t</DirectoryEntry>");
        }
    }
    print "\t</SnomIPPhoneDirectory>";
}
header("Content-Type: text/xml");
print '<?xml version="1.0" encoding="UTF-8"?>';
switch ($_REQUEST['action']) {
    case "menu":
        snom_menu();
        die;
        break;
    case "global":
        snom_phonebook('cidname', $exten, _("Global Phonebook"));
        die;
        break;
    case "privat":
        snom_phonebook('pb', $exten, _("Privat Phonebook"));
        die;
        break;
    case "internal":
        snom_internal('AMPUSER', $exten);
        die;
        break;
}
Ejemplo n.º 2
0
    $output = "<SnomIPPhoneText>\n";
    $output .= "<Title>" . _("Presence Switch") . "</Title>\n";
    $output .= "<Prompt>Prompt Text</Prompt>\n";
    $output .= "<Text>" . $title . "</Text>\n";
    $output .= "</SnomIPPhoneText>\n";
    header("Content-Length: " . strlen($output));
    echo $output;
}
if (preg_match("/300|320|360|370|720|760|820|870|m3|m9|snom/", $model)) {
    //error_log("$exten--$ext--$model--".$_REQUEST['action'],3,"error.log");
    if ($_REQUEST['action']) {
        header("Content-Type: text/xml");
        print '<?xml version="1.0" encoding="UTF-8"?>';
        switch ($_REQUEST['action']) {
            case "menu":
                snom_menu($mac);
                die;
                break;
            case "offline":
                ps_switch('0', $exten, $ext);
                die;
                break;
            case "online":
                ps_switch('1', $exten, $ext);
                die;
                break;
            case "dndoff":
                ps_switch('2', $exten, $ext);
                die;
                break;
            case "dndon":