Ejemplo n.º 1
0
            case 'Hangup':
                $response->addHangup();
                break;
            case 'Say':
            default:
                $response->Say($json['msg']);
                $response->Redirect($next);
                break;
        }
    } elseif ($json && $json['status'] != 'success') {
        switch ($json['type']) {
            case 'Play':
                $response->Gather(array('numDigits' => $numDigits, 'timeout' => 60))->Play($json['msg']);
                break;
            case 'Hangup':
                $response->Hangup();
                break;
            case 'Say':
            default:
                $response->Gather(array('numDigits' => $numDigits, 'timeout' => 60))->Say($json['msg']);
                break;
        }
    } else {
        $response->redirect();
    }
} else {
    $gather = $response->gather(array('numDigits' => $numDigits, 'timeout' => 60));
    // $verb = AudioSpeechPickerWidget::getVerbForValue($prompt, null);
    AudioSpeechPickerWidget::setVerbForValue($prompt, $gather);
    // $gather->append($verb);
}