# Play

## Play Attributes

| Name     | Allowed Values | Default Value |
| -------- | -------------- | ------------- |
| **Loop** | integer > 1    | 1             |

{% hint style="info" %}
&#x20;**loop.** The 'loop' attribute specifies how many times you’d like the audio file to be repeated. Specifying '0' will cause the the \<Play> verb to loop until the call is hung up.
{% endhint %}

## Supported Audio Formats

| MIME type   | Description      |
| ----------- | ---------------- |
| audio/wav   | wav format audio |
| audio/mp3   | mp3 format audio |
| audio/wave  | wav format audio |
| audio/x-wav | wav format audio |

\
Media Server Audio File Format
------------------------------

### Technical Specification and Capacity

#### The callapi Media Server is capable of:

{% hint style="info" %}
Media and Codecs:

* G711 (a-Law, u-Law);
* GSM;
* Linear PCM(L16);
* G729;
* DTMF(RFC 2833, INBAND)

Media Files:

* Wav (Sample rate 8000Hz, bit rate of 16, Mono);
* mp3 (Any sample rate)
* GSM
  {% endhint %}

## How to Convert a Wav File to the Correct Bitrate

{% hint style="info" %}
You can use a software call ffmpeg as follows:
{% endhint %}

```
ffmpeg -i source_file.wav -acodec pcm_s16le -ac 1 -ar 8000 result_file.wav
```

### Nesting

The  verb can not have any other verbs or nouns nested. Only a URL.

## Examples

{% hint style="info" %}
Example of how to use the  verb:
{% endhint %}

```xml
<Response>
    <Play>http://foobar.com/demo.wav</Play>
</Response>
<Response>
    <Play>http://foobar.com/demo.mp4</Play>
</Response>
```


---

# 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://apidocs.api19.com/call-api-markup/api-call-markup-language/play.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.
