case "*": // hang up the IVR channel and possibly the incoming call IVR::Hangup(); break; case "#": // return to calling IVR with value 'Got #' IVR::Leave("Got {$tone}"); break; case "0": case "1": case "2": $this->Output("Got {$tone}"); break; default: return false; } return true; } } // initialize the Yate PHP library with default values, enable output to rmanager and debugging Yate::Init(); Yate::Output(true); Yate::Debug(true); // register the two IVR classes with some names IVR::Register("ivr1", "IVR1"); IVR::Register("ivr2", "TheIVR_2"); // and start running by entering the 1st IVR IVR::Run("ivr1"); // if we reach here the IVR is terminated Yate::Output("PHP: bye!"); /* vi: set ts=8 sw=4 sts=4 noet: */