# \<queue>

**Role:** \<queue> keyword can be used to pick up calls waiting in the queue. Every time you send the agent to new queue, it will automatically pickup the call waiting for longest period of the time.

**Use:**&#x20;

* *Call Center:* Want  build a call center type of application. You can use queue and [enqueue](https://www.didforsale.com/didml-reference/enqueue) to put the caller in the queue and queue to connect the agents with the callers waiting.

While there are no limitation on where \<queue> can be used, there are set of attributes to use with \<queue>. Below is a list of attributes to be used with \<queue>, each attribute has a specific function and can use certain values.

### Attributes

| <p><strong>Attribute</strong><br></p> | <p><strong>Value</strong><br></p> | <p><strong>Default</strong><br></p> |
| ------------------------------------- | --------------------------------- | ----------------------------------- |
| url                                   | web URL                           | none                                |
| Method                                | POST/GET                          | POST                                |

#### Here is an example of how \<queue> is used within code.

```
<?xml version="1.0" encoding="UTF-8"?> 
<Response>
     <dial>
         <queue>support</queue>
     </dial>
 </Response>
```

In the above example, caller waiting in queue will be connect the agent. If you want to make an announcement to the caller. Follow the example below.<br>

```
<?xml version="1.0" encoding="UTF-8"?> 
<Response>
     <dial>
         <queue url="connectionnow.xml">support</queue>
     </dial>
 </Response>
```

System will pull connectingnow\.xml and execute the instructions before connecting the caller to the agent. Here is sample example file for connectingnow\.xml

```
<?xml version="1.0" encoding="UTF-8"?> 
<Response>
         <say>Thank you for your patience, now you will be connected to support specialist</say>
 </Response>
```

### Troubleshooting

* Make sure attributes inside the nodes are in quotes " ".


---

# 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.didforsale.com/voice-and-sms-apis/voice-and-sms/didml-verbs/dial/queue.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.
