Start Gather
The StartGather verb is used to get asynchronous notifications of DTMF digits collected in the call while other verbs are executed.
It can, for instance, listen for DTMF digits while a call is in a <Conference>
,
in a <Transfer>
, in a <Bridge>
, or while executing other verbs.
It cannot be used with the <Forward>
verb.
It is paused during the execution of a <Gather>
verb; digits pressed during a <Gather>
will not be duplicated as DTMF events.
The StartGather verb can be cancelled by the <StopGather>
verb.
Text Content
There is no text content available to be set for the <StartGather>
verb.
Attributes
Attribute | Description |
---|---|
dtmfUrl | URL to send the DTMF event to. May be a relative URL. |
dtmfMethod | (optional) The HTTP method to use for the request to dtmfUrl . GET or POST. Default value is POST. |
username | (optional) The username to send in the HTTP request to dtmfUrl . |
password | (optional) The password to send in the HTTP request to dtmfUrl . |
tag | (optional) A custom string that will be sent with this and all future callbacks unless overwritten by a future tag attribute or <Tag> verb, or cleared.May be cleared by setting tag="" Max length 256 characters. |
Webhooks Received
Webhook | Can reply with more BXML |
---|---|
dtmf | No |
Examples
Gather Digits During a Conference
- XML
- Java
- C#
- Ruby
- NodeJS
- Python
- PHP
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<StartGather dtmfUrl="https://startgather.url/callback" />
<Conference>my-conference-name</Conference>
</Response>
StartGather startGather = new StartGather().builder()
.dtmfUrl("https://startgather.url/callback")
.build();
Conference conference = new Conference().builder()
.name("my-conference-name")
.build();
Response response = new Response()
.withVerbs(startGather, conference);
System.out.println(response.toBXML());
StartGather startGather = new StartGather
{
DtmfUrl = "https://startgather.url/callback"
};
Conference conference = new Conference
{
Name = "my-conference-name"
};
Response response = new Response();
response.Add(startGather);
response.Add(conference);
Console.WriteLine(response.ToBXML());
start_gather = Bandwidth::Bxml::StartGather.new({ dtmf_url: 'https://startgather.url/callback' })
conference = Bandwidth::Bxml::Conference.new('my-conference-name')
response = Bandwidth::Bxml::Response.new([start_gather, conference])
p response.to_bxml
const startGather = new Bxml.StartGather({
dtmfUrl: 'https://startgather.url/callback'
});
const conference = new Bxml.Conference('my-conference-name');
const response = new Bxml.Response([startGather, conference]);
console.log(response.toBxml());
start_gather = StartGather(
dtmf_url="https://startgather.url/callback"
)
conference = Conference(
name="my-conference-name"
)
response = Response()
response.add_verb(start_gather)
response.add_verb(conference)
print(response.to_bxml())
$startGather = new BandwidthLib\Voice\Bxml\StartGather();
$startGather->dtmfUrl("https://startgather.url/callback");
$conference = new BandwidthLib\Voice\Bxml\Conference("my-conference-name");
$response = new BandwidthLib\Voice\Bxml\Response();
$response->addVerb($startGather);
$response->addVerb($conference);
echo $response->toBxml();