/** * Call another IVR, current one is placed on the stack * @param $ivrname Name of the IVR to call to * @param $state Desired initial state of the new IVR * @return True if called to a new IVR, false if it doesn't exist */ static function Call($ivrname, $state = null) { global $yate_ivr_current; global $yate_ivr_stack; $obj = IVR::CreateIVR($ivrname); if ($obj === null) { return false; } if ($yate_ivr_current !== null) { array_unshift($yate_ivr_stack, $yate_ivr_current); } $yate_ivr_current = $obj; $yate_ivr_current->OnEnter($state); return true; }