# \<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

| <p><strong>Attribute</strong><br></p> | <p><strong>Value</strong><br></p> | <p><strong>Default</strong><br></p> |
| ------------------------------------- | --------------------------------- | ----------------------------------- |
| loop                                  | integer value                     | 1                                   |

#### Simple play example.

```
<?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.

```
<?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>
```

Once the user enters the response. It will call <http://yourserver/handle-key.php>

```
<?php
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; 
echo "<Response><Say>You entered ".$_REQUEST['Digits']. "</Say></Response>"; ?>
```

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cebodtelecom.com/api/didml-reference-doc/didml-verbs/less-than-play-greater-than.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
