if ($actual_call) {
    $call = $actual_call;
    $dst = $P;
    $dat = time();
} else {
    if ($I == 1) {
        //	$call=trim($set["src"]);
        list($call, $dst, $voicefile) = explode(",", trim($set["userfield"]));
        if ($set["lastapp"] == "VoiceMail") {
            $dst = $set["dst"];
            $VM = 1;
        } else {
            $dst = $set["dstchannel"];
        }
    } else {
        $call = CALL_DST(trim($set["lastdata"]));
        $dst = $set["channel"];
    }
    //$duration=round($set["duration"]/60);
    if ($set["calldate"] > "") {
        $dat = m2t($set["calldate"]);
    } else {
        $dat = time();
    }
    //$dat=m2t($set["calldate"]);
    $disposition = $set["disposition"];
    $duration = round($set["duration"] / 60);
    $clid_ = $set["clid"];
    $clid_array = explode('"', $clid_);
    $clid = trim($clid_array[1]);
    // CLIPlänge definieren, nur wenn grösser als im config angegeben
Beispiel #2
0
//of the License, or (at your option) any later version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//GNU General Public License for more details.
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
if ($P > 0) {
    CDR_CONN();
    // mysql Connect to asterisk-cdr
    // letzter Anruf holen
    $resultCN = mysql_query("select * from cdr where  channel LIKE 'SIP/{$P}-%'  order by calldate DESC LIMIT 1", $cdr_conn) or die(mysql_error());
    $setCN = mysql_fetch_array($resultCN);
    //$dstCN=$setCN["dst"];
    $dstCN = CALL_DST(trim($setCN["lastdata"]));
    $dstChannel = $setCN["dstchannel"];
    if (ereg("SIP", $dstChannel)) {
        $X5 = "";
    } else {
        $X5 = $X;
    }
    $callnow = $dstCN;
    CONN();
    // mysql Connect to asterisk
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- Source of IPline DialFox, The Open Source Asterisk Phone Directory  -->
<!-- Copyright (C) 2008 A-Enterprise GmbH Switzerland - Claude Fanac  -->
<!-- Icons are from http://www.freeiconsweb.com  -->