bandwidth-go

module
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2024 License: MIT

README

bandwidth-go

This is a Go client library for Bandwidth's Communication APIs.

At the time of writing, Bandwidth does not provide an official Go SDK for their APIs. Please check the official Brandwidth SDKs page for updates and a possible release of an official Go SDK in the future.

For now, this library only contains a package for generating BXML.

⚠️ WARNING! ⚠️

This library is still in active development. Be aware that not all BXML verbs and nouns have been fully implemented yet. Please see below for a full list of the completed verbs and nouns. If you would like to contribute, please see feel free to submit a pull request.

Installation

The recommended way to install bandwidth-go is by using Go modules.

If you already have an initialized project, you can run the command below from your terminal in the project directory to install the library:

go get github.com/andersryanc/bandwidth-go

If you are starting from scratch in a new directory, you will first need to create a go.mod file for tracking dependencies such as bandwidth-go. This is similar to using package.json in a Node.js project or requirements.txt in a Python project. You can read more about mod files in the Go documentation. To create the file, run the following command in your terminal:

go mod init bandwidth-example

Once the module is initialized, you may run the installation command from above, which will update your go.mod file to include bandwidth-go.

Completed Verbs and Nouns

  • <Conference> The Conference verb is used to add a call to a conference.
  • <Bridge> The Bridge verb is used to bridge two calls.
  • <Pause> The Pause verb is used to delay verb execution for a period of time.
  • <Forward> The Forward verb is used to forward an unanswered incoming call to another number.
  • <Transfer> The Transfer verb is used to transfer the call to another number.
    • <PhoneNumber> A phone number to transfer the call to. Value must be in E.164 format (e.g. +15555555555).
    • <SipUri> A SIP URI to transfer the call to (e.g. sip:user@server.com).
  • <Ring> The Ring verb is used to play ringing audio on a call.
  • <Hangup> The Hangup verb is used to hang up or reject a call.
  • <Redirect> The Redirect verb is used to redirect the current XML execution to another URL.
  • <PlayAudio> The PlayAudio verb is used to play an audio file in the call.
  • <SpeakSentence> The SpeakSentence verb converts text into audible speech.
  • <Record> The Record verb allows a segment of audio to be recorded during a call.
  • <StartRecording> The StartRecording verb allows a segment of a call to be recorded while other verbs are executing.
  • <PauseRecording> The PauseRecording verb is used to pause a recording previously started by a verb.
  • <ResumeRecording> The ResumeRecording verb is used to resume a recording previously paused by a verb.
  • <StopRecording> The StopRecording verb stops a recording that was previously started by a .
  • <Gather> The Gather verb is used to collect DTMF digits.
  • <StartGather> The StartGather verb is used to collect DTMF digits during the execution of other verbs.
  • <StopGather> The StopGather verb stops the DTMF collection initiated by .
  • <StartStream> The StartStream verb allows a segment of a call to be streamed to an external destination.
  • <StopStream> The StopStream verb is used to stop a stream previously started by a verb.
    • <StreamParam> These elements define optional user specified parameters that will be sent to the destination URL when the stream is first started.
  • <StartTranscription> The StartTranscription verb allows a segment of a call to be transcribed during the execution of other verbs.
  • <StopTranscription> The StopTranscription verb is used to stop a transcription previously started by a verb.
  • <SendDtmf> The SendDtmf verb is used to play DTMF digits in the call.
  • <Tag> The Tag verb is used to set a new tag value without executing a webhook.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL