<Queue> noun
<Dial>
verb's <Queue>
noun specifies what queue to dial.
Noun Attributes
Attribute | |
---|---|
url optional | A specified URL for a document that runs on the caller's end before the call is connected. This allows the caller to inform the dialed number that the call will be connected to an agent or that the call may be monitored or recorded. See below for request parameters. |
method optional | The method attribute specifies whether the request to action is a GET or a POST . Valid values are GET or POST . Default value is POST . |
Request parameters for url
The url
request contains the Standard Request Parameters as well as:
Parameter | |
---|---|
QueueSid string | The unique identifier for the Queue. |
CallSid string | The unique identifier for the dequeued call. |
QueueTime string | The time, in seconds, spent waiting in a queue. |
DequeingCallSid string | The unique identifier for the call dequeueing the caller. |
Examples
Dialing a Queue
- XML
- JavaScript
- PHP
- C#
- Python
- Ruby
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Dial>
<Queue url="https://example.com/about_to_connect.xml">support</Queue>
</Dial>
</Response>
const { RestClient } = require("@signalwire/compatibility-api");
const response = new RestClient.LaML.VoiceResponse();
dial = response.dial();
dial.queue({ url: "https://example.com/about_to_connect.xml" }, "support");
console.log(response.toString());
<?php
use SignalWire\LaML;
$response = new LaML;
$dial = $response->dial();
$dial->queue('support', array( 'url' => 'https://example.com/about_to_connect.xml' ));
echo $response;
?>
using Twilio.TwiML;
using Twilio.TwiML.Voice;
using System;
class Example
{
static void Main()
{
var response = new VoiceResponse();
var dial = new Dial();
dial.Queue("support", url: new Uri("https://example.com/about_to_connect.xml"));
response.Append(dial);
Console.WriteLine(response.ToString());;
}
}
from signalwire.voice_response import VoiceResponse, Dial, Queue
response = VoiceResponse()
dial = Dial()
dial.queue('support', url='https://example.com/about_to_connect.xml')
response.append(dial)
print(response)
require 'signalwire/sdk'
response = Signalwire::Sdk::VoiceResponse.new do |response|
response.dial do |dial|
dial.queue('support', url: 'https://example.com/about_to_connect.xml')
end
end
puts response.to_s
This is an example of a caller in the 'support' queue waiting to be dequeued.
Bridging Out of a Queue
- XML
- JavaScript
- PHP
- C#
- Python
- Ruby
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Say>You will now be connected to an agent.</Say>
</Response>
const { RestClient } = require("@signalwire/compatibility-api");
const response = new RestClient.LaML.VoiceResponse();
response.say("You will now be connected to an agent.");
console.log(response.toString());
<?php
use SignalWire\LaML;
$response = new LaML;
$response->say('You will now be connected to an agent.');
echo $response;
?>
using Twilio.TwiML;
using System;
class Example
{
static void Main()
{
var response = new VoiceResponse();
response.Say("You will now be connected to an agent.");
Console.WriteLine(response.ToString());;
}
}
from signalwire.voice_response import VoiceResponse, Say
response = VoiceResponse()
response.say('You will now be connected to an agent.')
print(response)
require 'signalwire/sdk'
response = Signalwire::Sdk::VoiceResponse.new do |response|
response.say(message: 'You will now be connected to an agent.')
end
puts response.to_s
Once a caller is first in line in the queue and ready to be bridged, they will be informed of the connection to an agent.