TwiML™ Voice: <Leave>
<Leave> verb is used in conjunction with <Enqueue> to manage control of a call that is in a queue.
When Twilio executes the
<Leave> verb on a call, the call is removed from the queue and Twilio executes the next TwiML verb after the the original <Enqueue>.
<Leave> verb doesn't support any attributes.
Example: Leaving a Queue
Consider the following scenario: There are several calls waiting in a call queue for a customer support agent. The customer support line closes at 9PM and the callers must be notified that they have been removed from the queue and will have to try again tomorrow.
The original call TwiML might look like this:
Configure wait.xml to play hold music before 9pm:
After 9PM, wait.xml dequeues the call and returns call control to the
block in the original call TwiML:
Need some help?
We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.