/** * Set the connector that will reconnect the call legs in case the transfer fails * * @param Streamwide_Engine_Call_Leg_Connector $connector * @return void */ public function setReconnector(Streamwide_Engine_Call_Leg_Connector $reconnector) { if ($this->_transferSourceLink instanceof Streamwide_Engine_Sip_Call_Leg) { $expectedConnectorType = Streamwide_Engine_Call_Leg_Connector::CONNECTOR_SIPSIP; } else { $expectedConnectorType = Streamwide_Engine_Call_Leg_Connector::CONNECTOR_SIPMS; } if ($reconnector->getType() !== $expectedConnectorType) { throw new InvalidArgumentException(sprintf('%s expects parameter 1 to be a %s connector', __METHOD__, $expectedConnectorType)); } $this->_reconnector = $reconnector; }