Stop Gather
The StopGather verb is used to stop the DTMF detection that was previously started by a <StartGather>
verb.
Text Content
There is no text content available to be set for the <StopGather>
verb.
Attributes
Attribute | Description |
---|---|
None | None |
Webhooks Received
NThere are no webhooks received after the <StartGather>
verb is executed
Examples
Stop Gathering Digits on a Transfer
- XML
- Java
- C#
- Ruby
- NodeJS
- Python
- PHP
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<StartGather dtmfUrl="https://startgather.url/callback" />
<Transfer>
<PhoneNumber>+19195551234</PhoneNumber>
</Transfer>
<StopGather/>
<SpeakSentence>
Digits are no longer being gathered.
</SpeakSentence>
</Response>
StartGather startGather = new StartGather().builder()
.dtmfUrl("https://startgather.url/callback")
.build();
PhoneNumber number = new PhoneNumber("+19195551234");
Transfer transfer = new Transfer().builder()
.destinations(List.of(number))
.build();
StopGather stopGather = new StopGather();
SpeakSentence speakSentence = new SpeakSentence("Digits are no longer being gathered.");
Response response = new Response()
.withVerbs(startGather, transfer, stopGather, speakSentence);
System.out.println(response.toBXML());
StartGather startGather = new StartGather
{
DtmfUrl = "https://startgather.url/callback"
};
PhoneNumber number = new PhoneNumber
{
Number = "+19195551234"
};
Transfer transfer = new Transfer
{
PhoneNumbers = new PhoneNumber[]{ number }
};
StopGather stopGather = new StopGather();
SpeakSentence speakSentence = new SpeakSentence
{
Sentence = "Digits are no longer being gathered."
};
var response = new Response();
response.Add(startGather);
response.Add(transfer);
response.Add(stopGather);
response.Add(speakSentence);
Console.WriteLine(response.ToBXML());
start_gather = Bandwidth::Bxml::StartGather.new({ dtmf_url: 'https://startgather.url/callback' })
phone_number = Bandwidth::Bxml::PhoneNumber.new('+19195551234')
transfer = Bandwidth::Bxml::Transfer.new([phone_number])
stop_gather = Bandwidth::Bxml::StopGather.new
speak_sentence = Bandwidth::Bxml::SpeakSentence.new('Digits are no longer being gathered.')
response = Bandwidth::Bxml::Response.new([start_gather, transfer, stop_gather, speak_sentence])
p response.to_bxml
const startGather = new Bxml.StartGather({
dtmfUrl: 'https://startgather.url/callback'
});
const number = new Bxml.PhoneNumber('+19195551234');
const transfer = new Bxml.Transfer(undefined, [number]);
const stopGather = new Bxml.StopGather();
const speakSentence = new Bxml.SpeakSentence(
'Digits are no longer being gathered.'
);
const response = new Bxml.Response([
startGather,
transfer,
stopGather,
speakSentence
]);
console.log(response.toBxml());
start_gather = StartGather(
dtmf_url="https://startgather.url/callback"
)
phone_number = PhoneNumber(
number="+19195551234"
)
transfer = Transfer(
phone_numbers=[phone_number]
)
stop_gather = StopGather()
speak_sentence = SpeakSentence(
text="Digits are no longer being gathered."
)
response = Response()
response.add_verb(start_gather)
response.add_verb(transfer)
response.add_verb(stop_gather)
response.add_verb(speak_sentence)
print(response.to_bxml())
$startGather = new BandwidthLib\Voice\Bxml\StartGather();
$startGather->dtmfUrl("https://startgather.url/callback");
$number = new BandwidthLib\Voice\Bxml\PhoneNumber("+19195551234");
$transfer = new BandwidthLib\Voice\Bxml\Transfer();
$transfer->phoneNumbers(array($number));
$stopGather = new BandwidthLib\Voice\Bxml\StopGather();
$speakSentence = new BandwidthLib\Voice\Bxml\SpeakSentence("Digits are no longer being gathered.");
$response = new BandwidthLib\Voice\Bxml\Response();
$response->addVerb($startGather);
$response->addVerb($transfer);
$response->addVerb($stopGather);
$response->addVerb($speakSentence);
echo $response->toBxml();