Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tools/automation/code-sample-formatter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"author": "",
"license": "ISC",
"dependencies": {
"argparse": "1.0.9",
"node-find-files": "0.0.4",
"recursive-readdir": "^2.2.1",
"argparse": "1.0.9"
"recursive-readdir": "^2.2.1"
},
"devDependencies": {
"jasmine": "^2.6.0"
Expand Down
2 changes: 1 addition & 1 deletion tools/automation/twiml-generator/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
'java': '8.x',
'csharp': '5.x',
'node': '3.x',
'php': '5.x',
'php': '6.x',
'ruby': '5.x'
}

Expand Down
8 changes: 8 additions & 0 deletions twiml/message/message/message-1/message-1.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\MessagingResponse;

$response = new MessagingResponse();
$response->message('Store Location: 123 Easy St.');

echo $response;
10 changes: 10 additions & 0 deletions twiml/message/message/message-2/message-2.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\MessagingResponse;

$response = new MessagingResponse();
$message = $response->message('');
$message->body('Store Location: 123 Easy St.');
$message->media('https://demo.twilio.com/owl.png');

echo $response;
9 changes: 9 additions & 0 deletions twiml/message/message/message-3/message-3.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\MessagingResponse;

$response = new MessagingResponse();
$response->message('Store Location: 123 Easy St.',
['action' => '/SmsHandler.php', 'method' => 'POST']);

echo $response;
10 changes: 10 additions & 0 deletions twiml/message/message/message-4/message-4.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\MessagingResponse;

$response = new MessagingResponse();
$message = $response->message('');
$message->body('Hello friend');
$message->media('https://demo.twilio.com/owl.png');

echo $response;
8 changes: 8 additions & 0 deletions twiml/message/redirect/redirect-1/redirect-1.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$response->redirect('http://www.foo.com/nextInstructions');

echo $response;
8 changes: 8 additions & 0 deletions twiml/message/redirect/redirect-2/redirect-2.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$response->redirect('../nextInstructions');

echo $response;
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\MessagingResponse;

$response = new MessagingResponse();
$message = $response->message('');
$message->body('Hello World!');
$response->redirect('https://demo.twilio.com/welcome/sms/');

echo $response;
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\MessagingResponse;

$response = new MessagingResponse();
$response->message('This is message 1 of 2.');
$response->message('This is message 2 of 2.');

echo $response;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\MessagingResponse;

$response = new MessagingResponse();
$response->message('I\'m hungry!');

echo $response;
9 changes: 9 additions & 0 deletions twiml/voice/client/client-1/client-1.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$dial = $response->dial('');
$dial->client('joey');

echo $response;
11 changes: 11 additions & 0 deletions twiml/voice/client/client-2/client-2.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$dial = $response->dial('', ['callerId' => '+1888XXXXXXX']);
$dial->number('858-987-6543');
$dial->client('joey');
$dial->client('charlie');

echo $response;
12 changes: 12 additions & 0 deletions twiml/voice/client/client-3/client-3.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$dial = $response->dial('');
$dial->client('joey',
['statusCallbackEvent' => 'initiated ringing answered completed',
'statusCallback' => 'https://myapp.com/calls/events',
'statusCallbackMethod' => 'POST']);

echo $response;
9 changes: 9 additions & 0 deletions twiml/voice/conference/conference-1/conference-1.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$dial = $response->dial('');
$dial->conference('Room 1234');

echo $response;
10 changes: 10 additions & 0 deletions twiml/voice/conference/conference-10/conference-10.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$dial = $response->dial('');
$dial->conference('LoveTwilio', ['record' => 'record-from-start',
'recordingStatusCallback' => 'www.myexample.com']);

echo $response;
10 changes: 10 additions & 0 deletions twiml/voice/conference/conference-2/conference-2.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$dial = $response->dial('');
$dial->conference('moderated-conference-room',
['startConferenceOnEnter' => 'false']);

echo $response;
10 changes: 10 additions & 0 deletions twiml/voice/conference/conference-3/conference-3.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$dial = $response->dial('');
$dial->conference('moderated-conference-room',
['startConferenceOnEnter' => 'true', 'endConferenceOnExit' => 'true']);

echo $response;
11 changes: 11 additions & 0 deletions twiml/voice/conference/conference-4/conference-4.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$dial = $response->dial('');
$dial->conference('EventedConf',
['statusCallback' => 'https://myapp.com/events',
'statusCallbackEvent' => 'start end join leave mute hold']);

echo $response;
9 changes: 9 additions & 0 deletions twiml/voice/conference/conference-5/conference-5.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$dial = $response->dial('');
$dial->conference('SimpleRoom', ['muted' => 'true']);

echo $response;
11 changes: 11 additions & 0 deletions twiml/voice/conference/conference-6/conference-6.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$dial = $response->dial('');
$dial->conference('NoMusicNoBeepRoom', ['beep' => 'false',
'waitUrl' => 'http://your-webhook-host.com',
'startConferenceOnEnter' => 'true', 'endConferenceOnExit' => 'true']);

echo $response;
9 changes: 9 additions & 0 deletions twiml/voice/conference/conference-7/conference-7.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$dial = $response->dial('');
$dial->conference('Customer Waiting Room', ['beep' => 'false']);

echo $response;
10 changes: 10 additions & 0 deletions twiml/voice/conference/conference-8/conference-8.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$dial = $response->dial('');
$dial->conference('Customer Waiting Room', ['beep' => 'false',
'endConferenceOnExit' => 'true']);

echo $response;
10 changes: 10 additions & 0 deletions twiml/voice/conference/conference-9/conference-9.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$dial = $response->dial('', ['action' => 'handleLeaveConference.php',
'method' => 'POST', 'hangupOnStar' => 'true', 'timeLimit' => 30]);
$dial->conference('LoveTwilio');

echo $response;
9 changes: 9 additions & 0 deletions twiml/voice/connect/autopilot/autopilot.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$connect = $response->connect();
$connect->autopilot('UAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX');

echo $response;
9 changes: 9 additions & 0 deletions twiml/voice/connect/connect-1/connect-1.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$connect = $response->connect();
$connect->room('DailyStandup');

echo $response;
9 changes: 9 additions & 0 deletions twiml/voice/connect/stream/stream.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$connect = $response->connect();
$connect->stream(['url' => 'wss://mystream.ngrok.io/audiostream']);

echo $response;
10 changes: 10 additions & 0 deletions twiml/voice/connect/virtualagent-1/virtualagent-1.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$connect = $response->connect(['action' => 'https://myactionurl.com/twiml']);
$connect->virtualagent(['connectorName' => 'project',
'statusCallback' => 'https://mycallbackurl.com']);

echo $response;
11 changes: 11 additions & 0 deletions twiml/voice/connect/virtualagent-2/virtualagent-2.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$response->say('Hello! You will be now be connected to a virtual agent.');
$connect = $response->connect(['action' => 'https://myactionurl.com/virtualagent_ended']);
$connect->virtualagent(['connectorName' => 'project',
'statusCallback' => 'https://mycallbackurl.com']);

echo $response;
9 changes: 9 additions & 0 deletions twiml/voice/connect/virtualagent-3/virtualagent-3.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$connect = $response->connect();
$connect->virtualagent(['connectorName' => 'project', 'language' => 'fr']);

echo $response;
10 changes: 10 additions & 0 deletions twiml/voice/connect/virtualagent-4/virtualagent-4.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$connect = $response->connect();
$connect->virtualagent(['connectorName' => 'project',
'sentimentAnalysis' => 'true']);

echo $response;
9 changes: 9 additions & 0 deletions twiml/voice/dial/dial-1/dial-1.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$dial = $response->dial('');
$dial->number('415-123-4567');

echo $response;
9 changes: 9 additions & 0 deletions twiml/voice/dial/dial-2/dial-2.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$response->dial('415-123-4567');
$response->say('Goodbye');

echo $response;
10 changes: 10 additions & 0 deletions twiml/voice/dial/dial-3/dial-3.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$response->dial('415-123-4567', ['action' => '/handleDialCallStatus',
'method' => 'GET']);
$response->say('I am unreachable');

echo $response;
9 changes: 9 additions & 0 deletions twiml/voice/dial/dial-4/dial-4.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$dial = $response->dial('', ['callerId' => '+15551112222']);
$dial->number('+15558675310');

echo $response;
10 changes: 10 additions & 0 deletions twiml/voice/dial/dial-5/dial-5.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$dial = $response->dial('', ['record' => 'record-from-ringing-dual',
'recordingStatusCallback' => 'www.myexample.com']);
$dial->number('+15558675310');

echo $response;
10 changes: 10 additions & 0 deletions twiml/voice/dial/dial-6/dial-6.6.x.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$dial = $response->dial('', ['record' => 'record-from-ringing-dual',
'recordingStatusCallback' => 'www.myexample.com']);
$dial->conference('myteamroom');

echo $response;
Loading