芝麻web文件管理V1.00
编辑当前文件:/home/royashxg/bit-alphas-ltd.com/user/project/vendor/vonage/client-core/src/Voice/Call/Call.php
params['answer_url'] = $url; $this->params['to'] = $to; if (!is_null($from)) { $this->params['from'] = $from; } } /** * @param $url * @param $method * * @return $this */ public function setAnswer($url, $method = null): Call { $this->params['answer_url'] = $url; if (!is_null($method)) { $this->params['answer_method'] = $method; } else { unset($this->params['answer_method']); } return $this; } /** * @param $url * @param $method * * @return $this */ public function setError($url, $method = null): Call { $this->params['error_url'] = $url; if (!is_null($method)) { $this->params['error_method'] = $method; } else { unset($this->params['error_method']); } return $this; } /** * @param $url * @param $method * * @return $this */ public function setStatus($url, $method = null): Call { $this->params['status_url'] = $url; if (!is_null($method)) { $this->params['status_method'] = $method; } else { unset($this->params['status_method']); } return $this; } /** * @param bool $hangup * @param $timeout * * @return $this */ public function setMachineDetection($hangup = true, $timeout = null): Call { $this->params['machine_detection'] = ($hangup ? 'hangup' : 'true'); if (!is_null($timeout)) { $this->params['machine_timeout'] = (int)$timeout; } else { unset($this->params['machine_timeout']); } return $this; } public function getURI(): string { return '/call/json'; } }