My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?
require_once(dirname(__FILE__) . '/../TwilioResponse.php');

$response = new TwilioResponse();

$response->Say('this is a test, my friend',
array('voice' => 'woman', 'loop' => 2)
);

// Gather, with the alternate method of doing verbs (as a "get" that can be passed as sub-verbs)
$response->Gather(
array(
$response->GetVerb(TwilioResponse::V_SAY, 'Thank you for calling. Please press 1 for more options'),
$response->GetVerb(TwilioResponse::V_PAUSE),
$response->GetVerb(TwilioResponse::V_SAY, 'Go on. Press something')
),
array(
'action' => '/handle-response.php?a=b&c=d', // note that the & here must be encoded... the library takes care of it!
'numDigits' => 1
)
);
$response->Respond();

?>

Change log

r7 by ledjon on Mar 12, 2009   Diff
update
Go to: 
Project members, sign in to write a code review

Older revisions

r6 by ledjon on Mar 12, 2009   Diff
updated to include some samples
All revisions of this file

File info

Size: 732 bytes, 24 lines

File properties

svn:executable
*
Powered by Google Project Hosting