Update a Queue Member
Use this endpoint for the Queue Members method to modify the properties of a queue member that is actively waiting in a call queue.
Parameters
Parameter | Description |
---|---|
call_sid string | The unique identifier for the call that is enqueued. |
date_enqueued datetime | The date, in RFC 2822 format, the queue member was enqueued. |
position integer | The member's current place in the queue. |
wait_time integer | The time, in seconds, a member is waiting in a queue. |
Examples
Request
- cURL
- Node.js
- C#
- Python
- Ruby
curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members/{CallSid}.json \
-X POST \
-u "YourProjectID:YourAuthToken"
const { RestClient } = require('@signalwire/compatibility-api')
const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
client.queues('QueueSid')
.members('CallSid')
.update()
.then(member => console.log(member.callSid))
.done();
using System;
using System.Collections.Generic;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Queue;
class Program
{
static void Main(string[] args)
{
TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "{SPACE}.signalwire.com" });
var member = MemberResource.Update(
pathQueueSid: "QueueSid",
pathCallSid: "CallSid"
);
Console.WriteLine(member.CallSid);
}
}
from signalwire.rest import Client as signalwire_client
client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
member = client.queues('QueueSid') \
.members('CallSid') \
.update()
print(member.call_sid)
require 'signalwire/sdk'
@client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
member = @client.queues('QueueSid')
.members('CallSid')
.update()
puts member.call_sid
Request: Dequeue From Front of Queue
Dequeue the member that is waiting at the front of the queue.
- cURL
- Node.js
- C#
- Python
- Ruby
curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members/Front.json \
-X POST \
--data-urlencode "Url=http://your-application.com/docs/voice.xml" \
--data-urlencode "Method=POST" \
-u "YourProjectID:YourAuthToken"
const { RestClient } = require('@signalwire/compatibility-api')
const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
client.queues('QueueSid')
.members('Front')
.update({url: 'http://your-application.com/docs/voice.xml', method: 'POST'})
.then(member => console.log(member.callSid))
.done();
using System;
using System.Collections.Generic;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Queue;
class Program
{
static void Main(string[] args)
{
TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "{SPACE}.signalwire.com" });
var member = MemberResource.Update(
url: new Uri("http://your-application.com/docs/voice.xml"),
method: Twilio.Http.HttpMethod.Post,
pathQueueSid: "QueueSid",
pathCallSid: "Front"
);
Console.WriteLine(member.CallSid);
}
}
from signalwire.rest import Client as signalwire_client
client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
member = client.queues('QueueSid') \
.members('Front') \
.update(
url='http://your-application.com/docs/voice.xml',
method='POST'
)
print(member.call_sid)
require 'signalwire/sdk'
@client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
member = @client.queues('QueueSid')
.members('Front')
.update(
url: 'http://your-application.com/docs/voice.xml',
method: 'POST'
)
puts member.call_sid
Responses
200 OK
{
"call_sid": "b3877c40-da60-4998-90ad-b792e98472ca",
"date_enqueued": "Wed, 26 Sept 2018 22:00:00 +0000",
"position": 1,
"uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Queues/b3877c40-da60-4998-90ad-b792e98472qu/Members/b3877c40-da60-4998-90ad-b792e98472ca.json",
"wait_time": 143,
"account_sid": "b3877c40-da60-4998-90ad-b792e98472ac",
"method": "POST",
"queue_sid": "b3877c40-da60-4998-90ad-b792e98472qu",
"url": "http://your-application.com/docs/voice.xml"
}
Request: Dequeue Particular Member
Dequeue a particular member by specifying their CallSid
.
Only the initial dequeue request will return a 200 response.
All other dequeue requests on the same CallSid
will result in a 400 response.
- cURL
- Node.js
- C#
- Python
- Ruby
curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members/{CallSid}.json \
-X POST \
--data-urlencode "Url=http://your-application.com/docs/voice.xml" \
--data-urlencode "Method=POST" \
-u "YourProjectID:YourAuthToken"
const { RestClient } = require('@signalwire/compatibility-api')
const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
client.queues('QueueSid')
.members('CallSid')
.update({url: 'http://your-application.com/docs/voice.xml', method: 'POST'})
.then(member => console.log(member.callSid))
.done();
using System;
using System.Collections.Generic;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Queue;
class Program
{
static void Main(string[] args)
{
TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "{SPACE}.signalwire.com" });
var member = MemberResource.Update(
url: new Uri("http://your-application.com/docs/voice.xml"),
method: Twilio.Http.HttpMethod.Post,
pathQueueSid: "QueueSid",
pathCallSid: "CallSid"
);
Console.WriteLine(member.CallSid);
}
}
from signalwire.rest import Client as signalwire_client
client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
member = client.queues('QueueSid') \
.members('CallSid') \
.update(
url='http://your-application.com/docs/voice.xml',
method='POST'
)
print(member.call_sid)
require 'signalwire/sdk'
@client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
member = @client.queues('QueueSid')
.members('CallSid')
.update(
url: 'http://your-application.com/docs/voice.xml',
method: 'POST'
)
puts member.call_sid
Responses
200 OK
{
"call_sid": "b3877c40-da60-4998-90ad-b792e98472ca",
"date_enqueued": "Wed, 26 Sept 2018 22:00:00 +0000",
"position": 1,
"uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Queues/b3877c40-da60-4998-90ad-b792e98472qu/Members/b3877c40-da60-4998-90ad-b792e98472ca.json",
"wait_time": 143,
"account_sid": "b3877c40-da60-4998-90ad-b792e98472ac",
"method": "POST",
"queue_sid": "b3877c40-da60-4998-90ad-b792e98472qu",
"url": "http://your-application.com/docs/voice.xml"
}