当前位置: 首页>>代码示例>>PHP>>正文


PHP astercrm::insertNewDialedlist方法代码示例

本文整理汇总了PHP中astercrm::insertNewDialedlist方法的典型用法代码示例。如果您正苦于以下问题:PHP astercrm::insertNewDialedlist方法的具体用法?PHP astercrm::insertNewDialedlist怎么用?PHP astercrm::insertNewDialedlist使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在astercrm的用法示例。


在下文中一共展示了astercrm::insertNewDialedlist方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: placeCall

function placeCall($campaignid)
{
    global $config;
    $myAsterisk = new Asterisk();
    $row =& astercrm::getDialNumber($campaignid);
    // 待拨号码为空
    if (!$row) {
        return false;
    }
    //print_r($row);
    $id = $row['id'];
    $groupid = $row['groupid'];
    $campaignid = $row['campaignid'];
    $phoneNum = $row['dialnumber'];
    $trytime = $row['trytime'];
    $assign = $row['assign'];
    $pdcontext = $row['incontext'];
    $outcontext = $row['outcontext'];
    if ($row['inexten'] != "") {
        $pdextension = $row['inexten'];
    } else {
        if ($row['assign'] != "") {
            $pdextension = $row['assign'];
        } else {
            $pdextension = $row['dialnumber'];
        }
    }
    $res = astercrm::deleteRecord($id, "diallist");
    $f['dialednumber'] = $phoneNum;
    $f['dialedby'] = $_SESSION['curuser']['username'];
    $f['groupid'] = $groupid;
    $f['trytime'] = $trytime + 1;
    $f['assign'] = $assign;
    $f['campaignid'] = $campaignid;
    $res = astercrm::insertNewDialedlist($f);
    $actionid = md5(uniqid(""));
    $strChannel = "local/" . $phoneNum . "@" . $outcontext . "/n";
    if ($config['system']['allow_dropcall'] == true) {
        $myAsterisk->dropCall($actionid, array('Channel' => "{$strChannel}", 'WaitTime' => 30, 'Exten' => $pdextension, 'Context' => $pdcontext, 'Variable' => "{$strVariable}", 'Priority' => 1, 'MaxRetries' => 0, 'CallerID' => $phoneNum));
    } else {
        $myAsterisk->config['asmanager'] = $config['asterisk'];
        $res = $myAsterisk->connect();
        $myAsterisk->sendCall($strChannel, $pdextension, $pdcontext, 1, NULL, NULL, 30, $phoneNum, NULL, NULL, NULL, $actionid);
    }
    return true;
}
开发者ID:ljhcj,项目名称:IRISCC,代码行数:46,代码来源:predictivedialer.server.php

示例2: skipDiallist

function skipDiallist($dialnumber, $diallistid)
{
    global $locate;
    $objResponse = new xajaxResponse();
    $row = astercrm::getRecordByID($diallistid, 'diallist');
    if ($row['dialnumber'] != '') {
        $row['callresult'] = 'skip';
        astercrm::deleteRecord($row['id'], "diallist");
        $row['dialednumber'] = $phoneNum;
        $row['dialedby'] = $_SESSION['curuser']['extension'];
        $row['trytime'] = $row['trytime'] + 1;
        astercrm::insertNewDialedlist($row);
    } else {
        $objResponse->addAlert($locate->translate("Option failed"));
        return $objResponse;
    }
    $objResponse->addScript("xajax_clearPopup()");
    $objResponse->loadXML(getPrivateDialListNumber($_SESSION['curuser']['extension']));
    return $objResponse;
}
开发者ID:ljhcj,项目名称:IRISCC,代码行数:20,代码来源:portal.server.php


注:本文中的astercrm::insertNewDialedlist方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。