allow vendord
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m3s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Successful in 32s
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 1s
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m3s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Successful in 32s
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 1s
This commit is contained in:
43
vendor/twilio/sdk/example/twiML.php
vendored
Normal file
43
vendor/twilio/sdk/example/twiML.php
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
require(__DIR__ . '/../vendor/autoload.php');
|
||||
|
||||
use Twilio\TwiML\VoiceResponse;
|
||||
|
||||
// TwiML Say and Play
|
||||
$say = new \Twilio\TwiML\Voice\Say('Hello World!', [
|
||||
'voice' => 'woman'
|
||||
]);
|
||||
|
||||
$play = new \Twilio\TwiML\Voice\Play("https://api.twilio.com/cowbell.mp3", [
|
||||
'loop' => 5
|
||||
]);
|
||||
|
||||
$twiml = new VoiceResponse();
|
||||
$twiml->append($say);
|
||||
$twiml->append($play);
|
||||
|
||||
print("TwiML Say and Play: \n{$twiml->asXML()}\n");
|
||||
|
||||
|
||||
// Gather, Redirect
|
||||
$twimlResponse = new VoiceResponse();
|
||||
$gather = $twimlResponse->gather();
|
||||
$gather->setNumDigits(10);
|
||||
$gather->say("Press 1");
|
||||
$twimlResponse->redirect("https://example.com");
|
||||
print("TwiML Gather and Redirect: \n{$twimlResponse->asXML()}\n");
|
||||
|
||||
|
||||
// Dial
|
||||
$twimlResponse = new VoiceResponse();
|
||||
|
||||
// A valid phone number formatted with a '+' and a country code (e.g., +16175551212)
|
||||
$callerID = '+XXXXXXXX';
|
||||
$dial = $twimlResponse->dial('', [
|
||||
'callerId' => $callerID,
|
||||
'action' => 'https:///example.com',
|
||||
'hangupOnStar' => true,
|
||||
]);
|
||||
|
||||
$dial->conference("My Room", ["beep" => "true"]);
|
||||
print("TwiML Dial: \n{$twimlResponse->asXML()}\n");
|
||||
Reference in New Issue
Block a user