Beispiel #1
0
function core_trunks_getTrunkRegister($trunknum)
{
    $tech = core_trunks_getTrunkTech($trunknum);
    if (!core_trunk_has_registrations($tech)) {
        return '';
    }
    $results = sql("SELECT `keyword`, `data` FROM {$tech} WHERE `id` = 'tr-reg-{$trunknum}'", "getAll");
    foreach ($results as $result) {
        $register = $result[1];
    }
    return isset($register) ? $register : null;
}
Beispiel #2
0
function core_trunks_getTrunkRegister($trunknum)
{
    $tech = core_trunks_getTrunkTech($trunknum);
    if ($tech == "zap" || $tech == "dahdi" || $tech == "") {
        return "";
    }
    // zap has no register
    $results = sql("SELECT `keyword`, `data` FROM {$tech} WHERE `id` = 'tr-reg-{$trunknum}'", "getAll");
    foreach ($results as $result) {
        $register = $result[1];
    }
    return isset($register) ? $register : null;
}