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> |
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 | |
require_once('../Services/Twilio.php'); // Loads the library | |
$sid = "ACxxxxxxxx"; | |
$token = "yyyyyyyyyyyyyy"; | |
$client = new Services_Twilio($sid, $token); | |
$call = $client->account->calls->get("CAxxxxxxxxxxxx"); | |
$call->update(array( | |
"Url" => "http://xxx.xxx.xxx.xxx/twiml-hangup.xml", |
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 | |
// Download the library and copy into the folder containing this file. | |
require('../../Services/Twilio.php'); | |
$account_sid = "ACxxxxxxxxxxxxx"; // Your Twilio account sid | |
$auth_token = "yyyyyyyyyyyyyyy"; // Your Twilio auth token | |
$client = new Services_Twilio($account_sid, $auth_token); | |
$call = $client->account->calls->create( |
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> | |
<?PHP if ($recording_url != null): ?> | |
<Say language="ja-jp">録音ファイルを再生します。</Say> | |
<Play><?php echo $recording_url; ?></Play> |
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> | |
<Say language="ja-jp">少々お待ちください。</Say> | |
<Enqueue waitUrl="twiml-play.xml">supportRoom</Enqueue> | |
</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> | |
<Say language="ja-jp">supportRoomにお繋ぎします。</Say> | |
<Dial> | |
<Queue>supportRoom</Queue> | |
</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
<?php | |
require_once('../Services/Twilio.php'); // Loads the library | |
$sid = "ACxxxxxxxxxxxxxxx"; // Twilio Account Sid | |
$token = "yyyyyyyyyyyyyyy"; // Twilio Auth Token | |
$client = new Services_Twilio($sid, $token); | |
$call = $client->account->calls->get("CAxxxxxxxxxyyyyyyyyyy"); // Call Sid | |
$call->update(array( | |
"Url" => "http://xxx.xxx.xxx.xxx/twiml-enqueue.xml", |
OlderNewer