예제 #1
0
파일: Transferrer.php 프로젝트: cwcw/cms
 /**
  * Set the call leg to be transferred
  *
  * @param Streamwide_Engine_Sip_Call_Leg $callLeg
  * @return void
  * @throws InvalidArgumentException
  */
 public function setSipCallLeg(Streamwide_Engine_Sip_Call_Leg $callLeg)
 {
     if (!$callLeg->isAlive()) {
         throw new InvalidArgumentException(__METHOD__ . ' requires parameter 1 to be an alive SIP call leg');
     }
     if (!$callLeg->hasSentOrReceivedOk()) {
         throw new InvalidArgumentException(__METHOD__ . ' requires parameter 1 to be an alive SIP call leg that has received the OK signal');
     }
     $this->_sipCallLeg = $callLeg;
 }
예제 #2
0
파일: Forwarder.php 프로젝트: cwcw/cms
 /**
  * @param Streamwide_Engine_Sip_Call_Leg $rightCallLeg
  * @return void
  * @throws InvalidArgumentException
  */
 public function setRightCallLeg(Streamwide_Engine_Sip_Call_Leg $rightCallLeg)
 {
     if (!$rightCallLeg->isAlive()) {
         throw new InvalidArgumentException(__METHOD__ . ' expects parameter 1 to be an alive SIP call leg');
     }
     if (!$rightCallLeg->hasSentOrReceivedOk()) {
         throw new InvalidArgumentException(__METHOD__ . ' expects parameter 1 to be an alive SIP that has sent or received the OK signal');
     }
     $this->_rightCallLeg = $rightCallLeg;
 }