예제 #1
0
파일: Handler.php 프로젝트: cwcw/cms
 /**
  * Start the transfer
  *
  * @return void
  */
 protected function _startTransfer()
 {
     $this->_connector->reset();
     $this->_connector->setConnectionParams($this->_transferParams);
     if ($this->_transferSourceLink instanceof Streamwide_Engine_Media_Server_Call_Leg) {
         $this->_connector->setLeftCallLeg($this->_transferDestination);
         $this->_connector->setRightCallLeg($this->_transferSourceLink);
     } else {
         $this->_connector->setLeftCallLeg($this->_transferSourceLink);
         $this->_connector->setRightCallLeg($this->_transferDestination);
     }
     $this->_connector->addEventListener(Streamwide_Engine_Events_Event::CONNECTED, array('callback' => array($this, 'onTransferSuccess'), 'options' => array('autoRemove' => 'before')));
     $this->_connector->addEventListener(Streamwide_Engine_Events_Event::ERROR, array('callback' => array($this, 'onTransferFailure'), 'options' => array('autoRemove' => 'before')));
     $this->_connector->addEventListener(Streamwide_Engine_Events_Event::RINGING, array('callback' => array($this, 'onTransferProgress')));
     $this->_connector->addEventListener(Streamwide_Engine_Events_Event::PROGRESS, array('callback' => array($this, 'onTransferProgress')));
     $this->_connector->connect();
 }
예제 #2
0
파일: Factory.php 프로젝트: cwcw/cms
 /**
  * Provide the connector with all needed dependencies to do its job
  *
  * @param Streamwide_Engine_Call_Leg_Connector $connector
  * @return void
  */
 protected function _setConnectorDependencies(Streamwide_Engine_Call_Leg_Connector $connector)
 {
     if (isset($this->_params['leftCallLeg'])) {
         $connector->setLeftCallLeg($this->_params['leftCallLeg']);
     }
     if (isset($this->_params['rightCallLeg'])) {
         $connector->setRightCallLeg($this->_params['rightCallLeg']);
     }
     if (isset($this->_params['connectionParams'])) {
         $connector->setConnectionParams($this->_params['connectionParams']);
     }
     if (isset($this->_params['options'])) {
         $connector->setOptions($this->_params['options']);
     }
 }