Bandwidth.Resources.Calls.Audio

Perform audio-related actions for a specific call.

Summary

play(client, call_id, audio)

Play an audio file or speak a sentence in a phone call

Functions

play(client, call_id, audio)

Specs:

  • play(Client.t, binary, Map.t) :: Client.response

Play an audio file or speak a sentence in a phone call.

Example:

audio = %{ sentence: "Hello Bandwidth API user" }
case Bandwidth.Resources.Calls.Audio.play(client, "some-call-id", audio) do
  {:ok, {200, _, _}} -> IO.puts "Audio played"
  {:error, reason}   -> IO.puts "Error: #{reason}"
end

Bandwidth Docs