nest(new Voice\Dial($number, $attributes)); } /** * Add Echo child. * * @return TwiML Child element. */ public function echo_() { return $this->nest(new Voice\Echo_()); } /** * Add Enqueue child. * * @param string $name Friendly name * @param array $attributes Optional attributes * @return TwiML Child element. */ public function enqueue($name = null, $attributes = array()) { return $this->nest(new Voice\Enqueue($name, $attributes)); } /** * Add Gather child. * * @param array $attributes Optional attributes * @return TwiML Child element. */ public function gather($attributes = array()) { return $this->nest(new Voice\Gather($attributes)); } /** * Add Hangup child. * * @return TwiML Child element. */ public function hangup() { return $this->nest(new Voice\Hangup()); } /** * Add Leave child. * * @return TwiML Child element. */ public function leave() { return $this->nest(new Voice\Leave()); } /** * Add Pause child. * * @param array $attributes Optional attributes * @return TwiML Child element. */ public function pause($attributes = array()) { return $this->nest(new Voice\Pause($attributes)); } /** * Add Play child. * * @param url $url Media URL * @param array $attributes Optional attributes * @return TwiML Child element. */ public function play($url = null, $attributes = array()) { return $this->nest(new Voice\Play($url, $attributes)); } /** * Add Queue child. * * @param string $name Queue name * @param array $attributes Optional attributes * @return TwiML Child element. */ public function queue($name, $attributes = array()) { return $this->nest(new Voice\Queue($name, $attributes)); } /** * Add Record child. * * @param array $attributes Optional attributes * @return TwiML Child element. */ public function record($attributes = array()) { return $this->nest(new Voice\Record($attributes)); } /** * Add Redirect child. * * @param url $url Redirect URL * @param array $attributes Optional attributes * @return TwiML Child element. */ public function redirect($url, $attributes = array()) { return $this->nest(new Voice\Redirect($url, $attributes)); } /** * Add Reject child. * * @param array $attributes Optional attributes * @return TwiML Child element. */ public function reject($attributes = array()) { return $this->nest(new Voice\Reject($attributes)); } /** * Add Say child. * * @param string $message Message to say * @param array $attributes Optional attributes * @return TwiML Child element. */ public function say($message, $attributes = array()) { return $this->nest(new Voice\Say($message, $attributes)); } /** * Add Sms child. * * @param string $message Message body * @param array $attributes Optional attributes * @return TwiML Child element. */ public function sms($message, $attributes = array()) { return $this->nest(new Voice\Sms($message, $attributes)); } }