public function inputToInt($sound, $maxDigits = 1, $repetitions = 3)
{
for ($ok = 0; $ok < $repetitions; $ok++) {
$input = $this->agi->get_data($sound, 3000, $maxDigits)[‘result’];
if ($input) {
return $input;
} elseif ($ok == 2) {
$this->agi->stream_file($this->path . ‘akasha-error’);
exit();
}
$this->agi->stream_file($this->path . ‘maharehet-mamtina-le-phira’);
}
}
