Bandwidth.Resources.Calls.DTMF.Gather
Manage or create a DTMF Gather.
Summary↑
create(client, call_id, gather) | Gather the DTMF digits pressed |
results(client, call_id, gather_id) | Get the gather DTMF parameters and results |
update(client, call_id, gather_id, gather) | Update the gather |
Functions
Specs:
- create(Client.t, binary, Map.t) :: Client.response
Gather the DTMF digits pressed.
Collects a series of DTMF digits from a phone call with an optional prompt. This request returns immediately. When gather finishes, an event with the results will be posted to the callback URL.
Example:
case Bandwidth.Resources.Calls.DTMF.Gather.create(client, "some-call-id", %{ dtmfOut: "1234" }) do
{:ok, {201, _, _}} -> IO.puts "Gather created"
{:error, reason} -> IO.puts "Error: #{reason}"
end
Specs:
- results(Client.t, binary, binary) :: Client.response
Get the gather DTMF parameters and results.
Example:
case Bandwidth.Resources.Calls.DTMF.Gather.results(client, "some-call-id", "some-gather-id") do
{:ok, {200, gather, _}} -> IO.inspect gather
{:error, reason} -> IO.puts "Error: #{reason}"
end
Specs:
- update(Client.t, binary, binary, Map.t) :: Client.response
Update the gather.
The only update allowed is %{ state: “completed” } to stop the gather.
Example:
case Bandwidth.Resources.Calls.DTMF.Gather.update(client, "some-call-id", "some-gather-id", %{ state: "completed"}) do
{:ok, {200, gather, _}} -> IO.puts "Gather updated"
{:error, reason} -> IO.puts "Error: #{reason}"
end