예제 #1
0
 function reload()
 {
     $input = Input::instance();
     if (is_array($input->post('submit'))) {
         $this->exitQtipAjaxForm();
         exit;
     }
     $ccm = new CallCenterManager();
     $this->template->content = new View('callcenter_core/commandresponse');
     try {
         $this->view->commandresponse = $ccm->reload();
     } catch (ESLException $e) {
         $this->view->commandresponse = '<div class="error">An Error has occured: ' . $e->getMessage() . '</div>';
     }
 }
예제 #2
0
 public static function updateRealtime()
 {
     if (self::$settings == null) {
         self::$settings = Doctrine_Query::create()->from('callcenter_settings')->limit(1)->execute();
     }
     if (self::$settings->cc_update_mode = 'realtime') {
         return true;
     }
     return false;
 }
예제 #3
0
파일: agent.php 프로젝트: swk/bluebox
 public static function delete($ccData)
 {
     $xml = Telephony::getDriver()->xml;
     $locationRec = Doctrine::getTable('Location')->find($ccData->cca_locationid);
     $root = '//document/section[@name="configuration"]/configuration[@name="callcenter.conf"][@description="CallCenter"]/agents/agent[@bluebox="' . $ccData->cca_id . '"]';
     $xml->setXmlRoot($root);
     $xml->deleteNode();
     if (CallCenterManager::updateRealtime() == 'realtime') {
         $agentname = $ccData->cca_loginid . '@' . $ccData->agentLocation->domain;
         self::removeRunning($agentname);
     }
 }
예제 #4
0
파일: tier.php 프로젝트: swk/bluebox
 public static function delete($ccData)
 {
     $xml = Telephony::getDriver()->xml;
     $agentRec = Doctrine::getTable('callcenter_agent')->find($ccData->cct_cca_id);
     $queueRec = Doctrine::getTable('callcenter_queue')->find($ccData->cct_ccq_id);
     $locationRec = Doctrine::getTable('Location')->find($agentRec->cca_location_id);
     $root = '//document/section[@name="configuration"]/configuration[@name="callcenter.conf"][@description="CallCenter"]/tiers/tier[@agent="' . $agentRec->cca_loginid . '\\@' . $locationRec->domain . '"][@queue="' . $queueRec->ccq_name . '\\@' . $locationRec->domain . '"]';
     $xml->setXmlRoot($root);
     $xml->deleteNode();
     if (CallCenterManager::updateRealtime()) {
         self::removeRunning($ccData);
     }
 }
예제 #5
0
파일: configure.php 프로젝트: swk/bluebox
 public function finalizeInstall($identifier)
 {
     CallCenterManager::installFeatures();
     message::set('Default Features Installed', 'alert');
 }
예제 #6
0
 function installFeatures()
 {
     CallCenterManager::installFeatures();
     message::set('Default Features Installed', 'alert');
     url::redirect(Router_Core::$controller);
 }
예제 #7
0
 public function changeagentstatus($agentid = 0)
 {
     $input = Input::instance();
     if (is_array($input->post('submit'))) {
         if ($input->post('agentid') == '' || current($input->post('submit')) == 'cancel') {
             $this->exitQtipAjaxForm();
             exit;
         }
         $this->template->content = new View('callcenter_supervisor/commandresponse');
         try {
             $callcenter_manager_obj = new CallCenterManager();
             $commandresponse = $callcenter_manager_obj->setAgentStatus($input->post('agentid'), $input->post('status'));
             if (trim($commandresponse) == '+OK') {
                 $this->view->commandresponse = 'The status was sucessfully changed.<script language="javascript">getAgentStatus();</script>';
             } else {
                 $this->view->commandresponse = 'An Error Has Occurred: <br>' . $commandrepsonse;
             }
         } catch (Exception $e) {
             $this->view->commandresponse = 'An error has occured: ' . $e->getMessage() . '<br>';
             if (strpos($e->getMessage(), 'Not connected')) {
                 $this->view->commandresponse = 'This indicates that Freeswitch is not running, mod_event_socket is not configured, or the system is unable to log in.';
             }
         }
     } else {
         $agentObj = Doctrine::getTable('callcenter_agent')->find($agentid);
         $this->template->content = new View('callcenter_supervisor/changestatus');
         $this->view->agentid = $agentid;
         $this->view->agentlogindomain = $agentObj->cca_loginid . '@' . $agentObj->agentLocation->domain;
         $this->view->agentdisplayname = $agentObj->cca_displayname;
     }
 }
예제 #8
0
파일: queue.php 프로젝트: swk/bluebox
 public static function delete($ccData)
 {
     $xml = Telephony::getDriver()->xml;
     $locationRec = Doctrine::getTable('Location')->find($ccData->ccq_locationid);
     $root = '//document/section[@name="configuration"]/configuration[@name="callcenter.conf"][@description="CallCenter"]/queues/queue[@name="' . $ccData->ccq_name . '\\@' . $locationRec->domain . '"]';
     $xml->setXmlRoot($root);
     $xml->deleteNode();
     if (CallCenterManager::updateRealtime()) {
         $queuename = $ccData->ccq_name . '@' . $ccData->queueLocation->domain;
         self::removeRunning($queuename);
     }
 }