Ejemplo n.º 1
0
function aastra_push_statusline($phone_ip, $text, $index = 0, $type = '', $timeout = 3, $beep = false)
{
    $xml = '<AastraIPPhoneStatus Beep="' . ($beep ? 'yes' : 'no') . '">' . "\n";
    $xml .= '	<Session>gemeinschaft</Session>' . "\n";
    $xml .= '	<Message index="' . $index . '"' . ($type != '' ? ' type="' . $type . '"' : '') . ' timeout="' . $timeout . '">' . $text . '</Message>' . "\n";
    $xml .= '</AastraIPPhoneStatus>' . "\n";
    return aastra_push_str($phone_ip, $xml);
}
Ejemplo n.º 2
0
        $xml .= '</MenuItem>' . "\n";
    }
    $xml .= '<SoftKey index="1">' . "\n";
    $xml .= '	<Label>' . __('OK') . '</Label>' . "\n";
    $xml .= '	<URI>SoftKey:Select</URI>' . "\n";
    $xml .= '</SoftKey>' . "\n";
    $xml .= '<SoftKey index="4">' . "\n";
    $xml .= '	<Label>' . __('Abbrechen') . '</Label>' . "\n";
    $xml .= '	<URI>SoftKey:Exit</URI>' . "\n";
    $xml .= '</SoftKey>' . "\n";
    $xml .= '</AastraIPPhoneTextMenu>' . "\n";
} elseif ($type === 'out' || $type === 'in' || $type === 'missed' || $type == 'queue') {
    if ($type === 'missed') {
        $xml = "<AastraIPPhoneExecute>\n" . "  <ExecuteItem URI=\"Command: ClearCallersList\"/>\n" . "</AastraIPPhoneExecute>\n";
        $phone_ip = @$_SERVER['REMOTE_ADDR'];
        aastra_push_str($phone_ip, $xml);
    }
    if ($type == 'queue') {
        $query = 'SELECT
			`timestamp` `ts`, `number`, `remote_name`, `remote_user_id`
		FROM `dial_log`
		WHERE
			`user_id`=' . $user_id . ' AND
			`type`=\'' . $type . '\'
		ORDER BY `ts` DESC
		LIMIT ' . $num_results;
    } else {
        $query = 'SELECT
			MAX(`timestamp`) `ts`, `number`, `remote_name`, `remote_user_id`,
			COUNT(*) `num_calls`
		FROM `dial_log`