/** * 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; }
/** * @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; }