<play>
Role: <play> This verb plays the audio file back to the call.
Use: Announcement: Playing an announcement.
- Play can be used by itself or it can be nested in gather keyword.
- Here is an example of an announcement that can be played to prompt the user to press keys:-
- Press 1 for Support
- Press 2 for Sales
- Press 3 if your know your parties extension
Attributes
Attribute |
Value |
Default |
loop | integer value | 1 |
Simple play example.
1 2 3 4 |
<?xml version="1.0" encoding="UTF-8"?> <Response> <play>http://www.example.com/welcomemessage.mp3.</play> </Response> |
Here is an example of how <play> can be nested with <gather> within code.
1 2 3 4 5 6 |
<?xml version="1.0" encoding="UTF-8"?> <Response> <Gather timeout="10" finishOnKey="*" action=”handle-key.xml> <play>http://www.example.com/welcomemessage.mp3.</play> </Gather> </Response> |
1 2 3 |
<?php echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; echo "<Response><Say>You entered ".$_REQUEST['Digits']. "</Say></Response>"; ?> |