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> | |
<Dial><Queue>queue_01</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'); | |
$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/join_queue.xml", | |
"Method" => "POST" |
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> | |
<Enqueue>queue_02</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
<?php | |
require_once('../Services/Twilio.php'); | |
$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/create_enqueue.xml", | |
"Method" => "POST" |
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> | |
<Dial callerId="+8150xxxxyyyy">+813xxxxyyyy</Dial> | |
<Enqueue waitUrl="http://xxx.xxx.xxx.xxx/hold_bgm.xml">queue_01</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> | |
<Dial callerId="+8150xxxxyyyy" timeout="10">+813xxxxyyyy</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> | |
<Say language="ko-KR">반갑습니다.Twilio는전화를 이용한 최강의 커뮤니케이션 API입니다.</Say> | |
</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"); | |
// 録音ファイルのURLを取得します。 | |
$recording_url = $_POST['RecordingUrl']; | |
?> | |
<Response> | |
<?php if (isset($recording_url)) { ?> | |
<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
curl -XPOST https://api.twilio.com/2010-04-01/Accounts/[Account Sid]/IncomingPhoneNumbers/[電話番号Sid(PNから始まる34桁)].json \ | |
-d "VoiceUrl=http://[変更するTwiML URL]" \ | |
-u '[Account Sid]:[Auth Token]' |
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("../Services/Twilio.php"); | |
$response = new Services_Twilio_Twiml(); | |
if (empty($_POST["Digits"])) { | |
$gather = $response->gather(array('numDigits' => 1, 'timeout' => 30)); | |
$gather->say("許可するには1を拒否は2を押してください。", array('language' => 'ja-jp')); | |
} elseif ($_POST["Digits"] == "1") { | |
$response->say("許可を選びました。", array('language' => 'ja-jp')); |