This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Response> | |
<Say language="ja-jp">Twilioカンファレンスへようこそ!</Say> | |
<Dial> | |
<Conference>twilioConferenceRoom</Conference> | |
</Dial> | |
</Response> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Response> | |
<Say language="ja-jp">Twilioカンファレンスへようこそ!</Say> | |
<Dial> | |
<Conference waitUrl="https://api.twilio.com/Cowbwell.mp3">twilioConferenceRoom</Conference> | |
</Dial> | |
</Response> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<Response> | |
<Gather action="room-check.php" numDigits="4"> | |
<Say language="ja-jp">ルーム番号を4桁で入力してください。</Say> | |
</Gather> | |
<!-- 入力に間違いがあるとリトライします。 --> | |
<Redirect /> | |
</Response> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header('Content-type: text/xml'); | |
echo '<?xml version="1.0" encoding="UTF-8" ?>'; | |
$key = $_REQUEST['Digits']; | |
?> | |
<Response> | |
<?php | |
if ($key == '1234') | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header("content-type: text/xml"); | |
?> | |
<Response> | |
<?PHP if (empty($_POST["Digits"])): ?> | |
<Say language="ja-jp">サンタさんにメッセージをおくるには 1を, メッセージの再生は 2を, 押してください。</Say> | |
<Gather numDigits="1" timeout="30" /> | |
<?PHP elseif ($_POST["Digits"] == "1"): ?> | |
<Say language="ja-jp">録音完了後, 電話器のボタンをどれか 押してください。</Say> | |
<Record action="santa.php" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header("content-type: text/xml"); | |
// Connect to MySQL, and connect to the Database | |
mysql_connect('DB URL', 'ID', 'PWD') or die(mysql_error()); | |
mysql_select_db('database') or die(mysql_error()); | |
// 発信者番号を取得します。 | |
$tel_from = $_POST['From']; | |
// 録音ファイルのURLを取得します。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header("content-type: text/xml"); | |
print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; | |
?> | |
<Response> | |
<Say language="ja-jp">部署めいと名前を発話し、シャープを押してください</Say> | |
<Record maxLength="30" action="recorded.php" /> | |
</Response> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header("content-type: text/xml"); | |
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; | |
require_once(dirname(__FILE__) . '/../lib/AmiDSRHTTP.class.php'); | |
$buff = file_get_contents($_REQUEST['RecordingUrl']); | |
$amiVoice = new AmiDSRHTTP("http://Amivoice API URL/recognize","http://Amivoice API URL/Twilio/dialer/dialer.gram"); | |
$result = $amiVoice->speechRecognition($buff); | |
if(!$result === false) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# JSGF V1.0 UTF-8; | |
grammar dialer; | |
public <dialer> = ( <kanri> | <kaihatu> | <eigyou> ) [さん|くん|さま]; | |
<kanri> = 管理本部 [の] ( 佐々木 | 佐藤 | 河野 ) ; | |
<kaihatu> = 開発本部 [の] (佐々木 | 田中 | 中村); | |
<eigyou> = 営業本部 [の] (西岡 | 山下 | 小林); | |
//addWord 管理本部 かんりほんぶ | |
//addWord 管理本部 かんりぶ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header("content-type: text/xml"); | |
// 録音ファイルのURLを取得します。 | |
$recording_url = $_POST['RecordingUrl']; | |
?> | |
<Response> | |
<Say language="ja-jp">録音ファイルを再生します。</Say> | |
<Play><?PHP echo $recording_url; ?></Play> | |
</Response> |
OlderNewer