MMCT TEAM
Server IP : 103.191.208.50  /  Your IP : 216.73.216.53
Web Server : LiteSpeed
System : Linux orion.herosite.pro 4.18.0-553.53.1.lve.el8.x86_64 #1 SMP Wed May 28 17:01:02 UTC 2025 x86_64
User : celkcksm ( 1031)
PHP Version : 7.4.33
Disable Function : show_source, system, shell_exec, passthru, popen, exec
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/celkcksm/cms.ncriptech.com/vendor/twilio/sdk/example/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/celkcksm/cms.ncriptech.com/vendor/twilio/sdk/example/twiML.php
<?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");

MMCT - 2023