voice

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKey takes an APIKey as authentication for the request
	ContextAPIKey = contextKey("apikey")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

Types

type APIClient

type APIClient struct {
	CallsApi *CallsApiService

	PlayDTMFApi *PlayDTMFApiService

	PlayTTSApi *PlayTTSApiService

	StreamAudioApi *StreamAudioApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the Voice API API v1.3.2 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) ChangeBasePath

func (c *APIClient) ChangeBasePath(path string)

ChangeBasePath changes base path to allow switching to mocks

func (*APIClient) GetConfig

func (c *APIClient) GetConfig() *Configuration

Allow modification of underlying config for alternate implementations and testing Caution: modifying the configuration while live can cause data races and potentially unwanted behavior

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the OpenAPI operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

APIResponse stores the API response returned by the server.

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

NewAPIResponse returns a new APIResonse object.

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

NewAPIResponseWithError returns a new APIResponse object with the provided error message.

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type CallsApiService

type CallsApiService service

CallsApiService CallsApi service

func (*CallsApiService) CreateCall

func (a *CallsApiService) CreateCall(ctx _context.Context, localVarOptionals *CreateCallOpts) (CreateCallResponse, *_nethttp.Response, error)

CreateCall Create an outbound call Create an outbound Call

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *CreateCallOpts - Optional Parameters:
  • @param "UNKNOWNBASETYPE" (optional.Interface of UNKNOWN_BASE_TYPE) - Call Details

@return CreateCallResponse

func (*CallsApiService) GetCall

GetCall Get detail of a specific call Get detail of a specific call

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param uuid UUID of the Call

@return GetCallResponse

func (*CallsApiService) GetCalls

func (a *CallsApiService) GetCalls(ctx _context.Context, localVarOptionals *GetCallsOpts) (GetCallsResponse, *_nethttp.Response, error)

GetCalls Get details of your calls Get details of your calls

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *GetCallsOpts - Optional Parameters:
  • @param "Status" (optional.String) - Filter by call status
  • @param "DateStart" (optional.Time) - Return the records that occurred after this point in time
  • @param "DateEnd" (optional.Time) - Return the records that occurred before this point in time
  • @param "PageSize" (optional.Int32) - Return this amount of records in the response
  • @param "RecordIndex" (optional.Int32) - Return calls from this index in the response
  • @param "Order" (optional.String) - Either ascending or descending order.
  • @param "ConversationUuid" (optional.Interface of string) - Return all the records associated with a specific conversation.

@return GetCallsResponse

func (*CallsApiService) UpdateCall

func (a *CallsApiService) UpdateCall(ctx _context.Context, uuid string, localVarOptionals *ModifyCallOpts) (*_nethttp.Response, error)

UpdateCall Modify an in progress call Modify an in progress call

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param uuid UUID of the Call
  • @param uNKNOWNBASETYPE

type Configuration

type Configuration struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	Debug         bool              `json:"debug,omitempty"`
	Servers       []ServerConfiguration
	HTTPClient    *http.Client
}

Configuration stores the configuration of the API client

func NewConfiguration

func NewConfiguration() *Configuration

NewConfiguration returns a new Configuration object

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

AddDefaultHeader adds a new HTTP header to the default header in the request

func (*Configuration) ServerUrl

func (c *Configuration) ServerUrl(index int, variables map[string]string) (string, error)

ServerUrl returns URL based on server settings

type CreateCallOpts

type CreateCallOpts struct {
	Opts optional.Interface
}

CreateCallOpts Optional parameters for the method 'CreateCall'

type CreateCallRequestAnswerUrl

type CreateCallRequestAnswerUrl struct {
	// The webhook endpoint where you provide the [Nexmo Call Control Object](/voice/voice-api/ncco-reference) that governs this call.
	AnswerUrl []string `json:"answer_url"`
	// The HTTP method used to send event information to answer_url.
	AnswerMethod string            `json:"answer_method,omitempty"`
	To           []EndpointPhoneTo `json:"to"`
	From         EndpointPhoneFrom `json:"from"`
	// **Required** unless `event_url` is configured at the application level, see [Create an Application](/api/application.v2#createApplication)  The webhook endpoint where call progress events are sent to. For more information about the values sent, see [Event webhook](/voice/voice-api/webhook-reference#event-webhook).
	EventUrl []string `json:"event_url,omitempty"`
	// The HTTP method used to send event information to event_url.
	EventMethod string `json:"event_method,omitempty"`
	// Configure the behavior when Nexmo detects that the call is answered by voicemail. If Continue Nexmo sends an HTTP request to event_url with the Call event machine. hangup  end the call
	MachineDetection string `json:"machine_detection,omitempty"`
	// Set the number of seconds that elapse before Nexmo hangs up after the call state changes to answered.
	LengthTimer int32 `json:"length_timer,omitempty"`
	// Set the number of seconds that elapse before Nexmo hangs up after the call state changes to ‘ringing’.
	RingingTimer int32 `json:"ringing_timer,omitempty"`
}

CreateCallRequestAnswerUrl struct for CreateCallRequestAnswerUrl

type CreateCallRequestAnswerUrlAllOf

type CreateCallRequestAnswerUrlAllOf struct {
	// The webhook endpoint where you provide the [Nexmo Call Control Object](/voice/voice-api/ncco-reference) that governs this call.
	AnswerUrl []string `json:"answer_url,omitempty"`
	// The HTTP method used to send event information to answer_url.
	AnswerMethod string `json:"answer_method,omitempty"`
}

CreateCallRequestAnswerUrlAllOf struct for CreateCallRequestAnswerUrlAllOf

type CreateCallRequestBase

type CreateCallRequestBase struct {
	To   []EndpointPhoneTo `json:"to"`
	From EndpointPhoneFrom `json:"from"`
	// **Required** unless `event_url` is configured at the application level, see [Create an Application](/api/application.v2#createApplication)  The webhook endpoint where call progress events are sent to. For more information about the values sent, see [Event webhook](/voice/voice-api/webhook-reference#event-webhook).
	EventUrl []string `json:"event_url,omitempty"`
	// The HTTP method used to send event information to event_url.
	EventMethod string `json:"event_method,omitempty"`
	// Configure the behavior when Nexmo detects that the call is answered by voicemail. If Continue Nexmo sends an HTTP request to event_url with the Call event machine. hangup  end the call
	MachineDetection string `json:"machine_detection,omitempty"`
	// Set the number of seconds that elapse before Nexmo hangs up after the call state changes to answered.
	LengthTimer int32 `json:"length_timer,omitempty"`
	// Set the number of seconds that elapse before Nexmo hangs up after the call state changes to ‘ringing’.
	RingingTimer int32 `json:"ringing_timer,omitempty"`
}

CreateCallRequestBase struct for CreateCallRequestBase

type CreateCallRequestNcco

type CreateCallRequestNcco struct {
	// The [Nexmo Call Control Object](/voice/voice-api/ncco-reference) to use for this call.
	Ncco []interface{}     `json:"ncco"`
	To   []EndpointPhoneTo `json:"to"`
	From EndpointPhoneFrom `json:"from"`
	// **Required** unless `event_url` is configured at the application level, see [Create an Application](/api/application.v2#createApplication)  The webhook endpoint where call progress events are sent to. For more information about the values sent, see [Event webhook](/voice/voice-api/webhook-reference#event-webhook).
	EventUrl []string `json:"event_url,omitempty"`
	// The HTTP method used to send event information to event_url.
	EventMethod string `json:"event_method,omitempty"`
	// Configure the behavior when Nexmo detects that the call is answered by voicemail. If Continue Nexmo sends an HTTP request to event_url with the Call event machine. hangup  end the call
	MachineDetection string `json:"machine_detection,omitempty"`
	// Set the number of seconds that elapse before Nexmo hangs up after the call state changes to answered.
	LengthTimer int32 `json:"length_timer,omitempty"`
	// Set the number of seconds that elapse before Nexmo hangs up after the call state changes to ‘ringing’.
	RingingTimer int32 `json:"ringing_timer,omitempty"`
}

CreateCallRequestNcco struct for CreateCallRequestNcco

type CreateCallRequestNccoAllOf

type CreateCallRequestNccoAllOf struct {
	// The [Nexmo Call Control Object](/voice/voice-api/ncco-reference) to use for this call.
	Ncco []map[string]interface{} `json:"ncco,omitempty"`
}

CreateCallRequestNccoAllOf struct for CreateCallRequestNccoAllOf

type CreateCallResponse

type CreateCallResponse struct {
	// The unique identifier for this call leg. The UUID is created when your call request is accepted by Nexmo. You use the UUID in all requests for individual live calls
	Uuid string `json:"uuid,omitempty"`
	// The status of the call. [See possible values](https://developer.nexmo.com/voice/voice-api/guides/call-flow#event-objects)
	Status    string    `json:"status,omitempty"`
	Direction Direction `json:"direction,omitempty"`
	// The unique identifier for the conversation this call leg is part of.
	ConversationUuid string `json:"conversation_uuid,omitempty"`
}

CreateCallResponse struct for CreateCallResponse

type Direction

type Direction string

Direction Possible values are `outbound` or `inbound`

const (
	OUTBOUND Direction = "outbound"
	INBOUND  Direction = "inbound"
)

List of direction

type DtmfRequest

type DtmfRequest struct {
	// The digits to send
	Digits string `json:"digits,omitempty"`
}

DtmfRequest struct for DtmfRequest

type DtmfResponse

type DtmfResponse struct {
	// Description of the action taken
	Message string `json:"message,omitempty"`
	// The unique identifier for this call leg. The UUID is created when your call request is accepted by Nexmo. You use the UUID in all requests for individual live calls
	Uuid string `json:"uuid,omitempty"`
}

DtmfResponse struct for DtmfResponse

type EndpointApp

type EndpointApp struct {
	// The type of connection. Must be `app`
	Type string `json:"type"`
	// The username to connect to
	User string `json:"user"`
}

EndpointApp Connect to an App User

type EndpointPhoneFrom

type EndpointPhoneFrom struct {
	// The type of connection. Must be `phone`
	Type string `json:"type"`
	// The phone number to connect to
	Number string `json:"number"`
}

EndpointPhoneFrom Connect to a Phone (PSTN) number

type EndpointPhoneTo

type EndpointPhoneTo struct {
	// The type of connection. Must be `phone`
	Type string `json:"type"`
	// The phone number to connect to
	Number string `json:"number"`
	// Provide [DTMF digits](https://developer.nexmo.com/voice/voice-api/guides/dtmf) to send when the call is answered
	DtmfAnswer string `json:"dtmfAnswer,omitempty"`
}

EndpointPhoneTo Connect to a Phone (PSTN) number

type EndpointSip

type EndpointSip struct {
	// The type of connection. Must be `sip`
	Type string `json:"type"`
	// The SIP URI to connect to
	Uri string `json:"uri,omitempty"`
}

EndpointSip Connect to a SIP Endpoint

type EndpointVbcExtension

type EndpointVbcExtension struct {
	// The type of connection. Must be `vbc`
	Type      string `json:"type"`
	Extension string `json:"extension"`
}

EndpointVbcExtension Connect to a VBC extension

type EndpointWebsocket

type EndpointWebsocket struct {
	// The type of connection. Must be `websocket`
	Type        string                   `json:"type"`
	Uri         string                   `json:"uri,omitempty"`
	ContentType string                   `json:"content-type"`
	Headers     EndpointWebsocketHeaders `json:"headers,omitempty"`
}

EndpointWebsocket Connect to a Websocket

type EndpointWebsocketHeaders

type EndpointWebsocketHeaders struct {
	// This is an example header. You can provide any headers you may need
	CustomerId string `json:"customer_id,omitempty"`
}

EndpointWebsocketHeaders Details of the Websocket you want to connect to

type From

type From struct {
	Type   string `json:"type,omitempty"`
	Number string `json:"number,omitempty"`
}

From The endpoint you called from. Possible values are the same as `to`.

type GenericOpenAPIError

type GenericOpenAPIError struct {
	// contains filtered or unexported fields
}

GenericOpenAPIError Provides access to the body, error and model on returned errors.

func (GenericOpenAPIError) Body

func (e GenericOpenAPIError) Body() []byte

Body returns the raw bytes of the response

func (GenericOpenAPIError) Error

func (e GenericOpenAPIError) Error() string

Error returns non-empty string if there was an error.

func (GenericOpenAPIError) Model

func (e GenericOpenAPIError) Model() interface{}

Model returns the unpacked model of the error

type GetCallResponse

type GetCallResponse struct {
	Links GetCallResponseLinks `json:"_links,omitempty"`
	// The unique identifier for this call leg. The UUID is created when your call request is accepted by Nexmo. You use the UUID in all requests for individual live calls
	Uuid string `json:"uuid,omitempty"`
	// The unique identifier for the conversation this call leg is part of.
	ConversationUuid string `json:"conversation_uuid,omitempty"`
	To               To     `json:"to,omitempty"`
	From             From   `json:"from,omitempty"`
	// The status of the call. [See possible values](https://developer.nexmo.com/voice/voice-api/guides/call-flow#event-objects)
	Status    string    `json:"status,omitempty"`
	Direction Direction `json:"direction,omitempty"`
	// The price per minute for this call. This is only sent if `status` is `completed`.
	Rate string `json:"rate,omitempty"`
	// The total price charged for this call. This is only sent if `status` is `completed`.
	Price string `json:"price,omitempty"`
	// The time elapsed for the call to take place in seconds. This is only sent if `status` is `completed`.
	Duration string `json:"duration,omitempty"`
	// The time the call started in the following format: `YYYY-MM-DD HH:MM:SS`. For example, `2020-01-01 12:00:00`. This is only sent if `status` is `completed`.
	StartTime string `json:"start_time,omitempty"`
	// The time the call started in the following format: `YYYY-MM-DD HH:MM:SS`. For xample, `2020-01-01 12:00:00`. This is only sent if `status` is `completed`.
	EndTime string `json:"end_time,omitempty"`
	// The Mobile Country Code Mobile Network Code ([MCCMNC](https://en.wikipedia.org/wiki/Mobile_country_code)) for the carrier network used to make this call.
	Network string `json:"network,omitempty"`
}

GetCallResponse struct for GetCallResponse

type GetCallResponseLinks struct {
	Self GetCallResponseLinksSelf `json:"self,omitempty"`
}

GetCallResponseLinks struct for GetCallResponseLinks

type GetCallResponseLinksSelf

type GetCallResponseLinksSelf struct {
	Href string `json:"href,omitempty"`
}

GetCallResponseLinksSelf struct for GetCallResponseLinksSelf

type GetCallsOpts

type GetCallsOpts struct {
	Status           optional.String
	DateStart        optional.Time
	DateEnd          optional.Time
	PageSize         optional.Int32
	RecordIndex      optional.Int32
	Order            optional.String
	ConversationUuid optional.Interface
}

GetCallsOpts Optional parameters for the method 'GetCalls'

type GetCallsResponse

type GetCallsResponse struct {
	Count       int32                    `json:"count,omitempty"`
	PageSize    int32                    `json:"page_size,omitempty"`
	RecordIndex int32                    `json:"record_index,omitempty"`
	Links       GetCallsResponseLinks    `json:"_links,omitempty"`
	Embedded    GetCallsResponseEmbedded `json:"_embedded,omitempty"`
}

GetCallsResponse struct for GetCallsResponse

type GetCallsResponseEmbedded

type GetCallsResponseEmbedded struct {
	Calls []GetCallResponse `json:"calls,omitempty"`
}

GetCallsResponseEmbedded A list of call objects. See the [get details of a specific call](#getCall) response fields for a description of the nested objects

type GetCallsResponseLinks struct {
	Self GetCallsResponseLinksSelf `json:"self,omitempty"`
}

GetCallsResponseLinks struct for GetCallsResponseLinks

type GetCallsResponseLinksSelf

type GetCallsResponseLinksSelf struct {
	Href string `json:"href,omitempty"`
}

GetCallsResponseLinksSelf struct for GetCallsResponseLinksSelf

type ModifyCallOpts

type ModifyCallOpts struct {
	Opts optional.Interface
}

ModifyCallOpts Optional parameters for the method 'ModifyCall'

type PlayDTMFApiService

type PlayDTMFApiService service

PlayDTMFApiService PlayDTMFApi service

func (*PlayDTMFApiService) StartDTMF

func (a *PlayDTMFApiService) StartDTMF(ctx _context.Context, uuid string, dtmfRequest DtmfRequest) (DtmfResponse, *_nethttp.Response, error)

StartDTMF Play DTMF tones into a call Play DTMF tones into a call

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param uuid UUID of the Call Leg
  • @param dtmfRequest action to perform

@return DtmfResponse

type PlayTTSApiService

type PlayTTSApiService service

PlayTTSApiService PlayTTSApi service

func (*PlayTTSApiService) StartTalk

func (a *PlayTTSApiService) StartTalk(ctx _context.Context, uuid string, localVarOptionals *StartTalkOpts) (StartTalkResponse, *_nethttp.Response, error)

StartTalk Play text to speech into a call Play text to speech into a call

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param uuid UUID of the Call Leg
  • @param optional nil or *StartTalkOpts - Optional Parameters:
  • @param "StartTalkRequest" (optional.Interface of StartTalkRequest) - Action to perform

@return StartTalkResponse

func (*PlayTTSApiService) StopTalk

StopTalk Stop text to speech in a call Stop text to speech in a call

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param uuid UUID of the Call Leg

@return StopTalkResponse

type RequestTransferActionParam

type RequestTransferActionParam string

RequestTransferActionParam Transfer the call to a new NCCO

const (
	TRANSFER RequestTransferActionParam = "transfer"
)

List of RequestTransferActionParam

type ServerConfiguration

type ServerConfiguration struct {
	Url         string
	Description string
	Variables   map[string]ServerVariable
}

ServerConfiguration stores the information about a server

type ServerVariable

type ServerVariable struct {
	Description  string
	DefaultValue string
	EnumValues   []string
}

ServerVariable stores the information about a server variable

type StartStreamRequest

type StartStreamRequest struct {
	StreamUrl []string `json:"stream_url"`
	// the number of times to play the file, 0 for infinite
	Loop int32 `json:"loop,omitempty"`
	// Set the audio level of the stream in the range `-1 >= level <= 1` with a precision of 0.1. The default value is 0.
	Level string `json:"level,omitempty"`
}

StartStreamRequest struct for StartStreamRequest

type StartStreamResponse

type StartStreamResponse struct {
	// Description of the action taken
	Message string `json:"message,omitempty"`
	// The unique identifier for this call leg. The UUID is created when your call request is accepted by Nexmo. You use the UUID in all requests for individual live calls
	Uuid string `json:"uuid,omitempty"`
}

StartStreamResponse struct for StartStreamResponse

type StartTalkOpts

type StartTalkOpts struct {
	StartTalkRequest optional.Interface
}

StartTalkOpts Optional parameters for the method 'StartTalk'

type StartTalkRequest

type StartTalkRequest struct {
	// The text to read
	Text      string    `json:"text"`
	VoiceName VoiceName `json:"voice_name,omitempty"`
	// The number of times to repeat the text the file, 0 for infinite
	Loop int32 `json:"loop,omitempty"`
	// The volume level that the speech is played. This can be any value between `-1` to `1` in `0.1` increments, with `0` being the default.
	Level string `json:"level,omitempty"`
}

StartTalkRequest struct for StartTalkRequest

type StartTalkResponse

type StartTalkResponse struct {
	// Description of the action taken
	Message string `json:"message,omitempty"`
	// The unique identifier for this call leg. The UUID is created when your call request is accepted by Nexmo. You use the UUID in all requests for individual live calls
	Uuid string `json:"uuid,omitempty"`
}

StartTalkResponse struct for StartTalkResponse

type StopStreamResponse

type StopStreamResponse struct {
	// Description of the action taken
	Message string `json:"message,omitempty"`
	// The unique identifier for this call leg. The UUID is created when your call request is accepted by Nexmo. You use the UUID in all requests for individual live calls
	Uuid string `json:"uuid,omitempty"`
}

StopStreamResponse struct for StopStreamResponse

type StopTalkResponse

type StopTalkResponse struct {
	// Description of the action taken
	Message string `json:"message,omitempty"`
	// The unique identifier for this call leg. The UUID is created when your call request is accepted by Nexmo. You use the UUID in all requests for individual live calls
	Uuid string `json:"uuid,omitempty"`
}

StopTalkResponse struct for StopTalkResponse

type StreamAudioApiService

type StreamAudioApiService service

StreamAudioApiService StreamAudioApi service

func (*StreamAudioApiService) StartStream

func (a *StreamAudioApiService) StartStream(ctx _context.Context, uuid string, startStreamRequest StartStreamRequest) (StartStreamResponse, *_nethttp.Response, error)

StartStream Play an audio file into a call Play an audio file into a call

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param uuid UUID of the Call Leg
  • @param startStreamRequest action to perform

@return StartStreamResponse

func (*StreamAudioApiService) StopStream

StopStream Stop playing an audio file into a call Stop playing an audio file into a call

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param uuid UUID of the Call Leg

@return StopStreamResponse

type To

type To struct {
	Type   string `json:"type,omitempty"`
	Number string `json:"number,omitempty"`
}

To The single or mixed collection of endpoint types you connected to

type UpdateCallRequestEarmuff

type UpdateCallRequestEarmuff struct {
	// Prevent the specified UUID from hearing audio
	Action string `json:"action,omitempty"`
}

UpdateCallRequestEarmuff struct for UpdateCallRequestEarmuff

type UpdateCallRequestHangup

type UpdateCallRequestHangup struct {
	// End the call for the specified UUID
	Action string `json:"action,omitempty"`
}

UpdateCallRequestHangup struct for UpdateCallRequestHangup

type UpdateCallRequestMute

type UpdateCallRequestMute struct {
	// Mute the specified UUID
	Action string `json:"action,omitempty"`
}

UpdateCallRequestMute struct for UpdateCallRequestMute

type UpdateCallRequestTransferAnswerUrl

type UpdateCallRequestTransferAnswerUrl struct {
	Action      RequestTransferActionParam                    `json:"action"`
	Destination UpdateCallRequestTransferAnswerUrlDestination `json:"destination"`
}

UpdateCallRequestTransferAnswerUrl struct for UpdateCallRequestTransferAnswerUrl

type UpdateCallRequestTransferAnswerUrlDestination

type UpdateCallRequestTransferAnswerUrlDestination struct {
	Type string `json:"type"`
	// The URL that Nexmo makes a request to. Must return an NCCO.
	Url []string `json:"url"`
}

UpdateCallRequestTransferAnswerUrlDestination struct for UpdateCallRequestTransferAnswerUrlDestination

type UpdateCallRequestTransferNcco

type UpdateCallRequestTransferNcco struct {
	Action      RequestTransferActionParam               `json:"action"`
	Destination UpdateCallRequestTransferNccoDestination `json:"destination"`
}

UpdateCallRequestTransferNcco struct for UpdateCallRequestTransferNcco

type UpdateCallRequestTransferNccoDestination

type UpdateCallRequestTransferNccoDestination struct {
	// Always `ncco`
	Type string `json:"type"`
	// Refer to the [NCCO Guide](https://developer.nexmo.com/voice/voice-api/ncco-reference) for a description of possible NCCO parameters.
	Ncco []map[string]interface{} `json:"ncco"`
}

UpdateCallRequestTransferNccoDestination struct for UpdateCallRequestTransferNccoDestination

type UpdateCallRequestUnearmuff

type UpdateCallRequestUnearmuff struct {
	// Allow the specified UUID to hear audio
	Action string `json:"action,omitempty"`
}

UpdateCallRequestUnearmuff struct for UpdateCallRequestUnearmuff

type UpdateCallRequestUnmute

type UpdateCallRequestUnmute struct {
	// Unmute the specified UUID
	Action string `json:"action,omitempty"`
}

UpdateCallRequestUnmute struct for UpdateCallRequestUnmute

type VoiceName

type VoiceName string

VoiceName The voice & language to use

const (
	ADITI      VoiceName = "Aditi"
	AGNIESZKA  VoiceName = "Agnieszka"
	ALVA       VoiceName = "Alva"
	AMY        VoiceName = "Amy"
	ASTRID     VoiceName = "Astrid"
	BIANCA     VoiceName = "Bianca"
	BRIAN      VoiceName = "Brian"
	CARLA      VoiceName = "Carla"
	CARMEN     VoiceName = "Carmen"
	CARMIT     VoiceName = "Carmit"
	CATARINA   VoiceName = "Catarina"
	CELINE     VoiceName = "Celine"
	CEM        VoiceName = "Cem"
	CHANTAL    VoiceName = "Chantal"
	CHIPMUNK   VoiceName = "Chipmunk"
	CONCHITA   VoiceName = "Conchita"
	CRISTIANO  VoiceName = "Cristiano"
	DAMAYANTI  VoiceName = "Damayanti"
	DORA       VoiceName = "Dora"
	EMMA       VoiceName = "Emma"
	EMPAR      VoiceName = "Empar"
	ENRIQUE    VoiceName = "Enrique"
	ERIC       VoiceName = "Eric"
	EWA        VoiceName = "Ewa"
	FELIPE     VoiceName = "Felipe"
	FILIZ      VoiceName = "Filiz"
	GERAINT    VoiceName = "Geraint"
	GIORGIO    VoiceName = "Giorgio"
	GWYNETH    VoiceName = "Gwyneth"
	HANS       VoiceName = "Hans"
	HENRIK     VoiceName = "Henrik"
	INES       VoiceName = "Ines"
	IOANA      VoiceName = "Ioana"
	IVETA      VoiceName = "Iveta"
	IVY        VoiceName = "Ivy"
	JACEK      VoiceName = "Jacek"
	JAN        VoiceName = "Jan"
	JENNIFER   VoiceName = "Jennifer"
	JOANA      VoiceName = "Joana"
	JOANNA     VoiceName = "Joanna"
	JOEY       VoiceName = "Joey"
	JORDI      VoiceName = "Jordi"
	JUSTIN     VoiceName = "Justin"
	KANYA      VoiceName = "Kanya"
	KARL       VoiceName = "Karl"
	KENDRA     VoiceName = "Kendra"
	KIMBERLY   VoiceName = "Kimberly"
	LAILA      VoiceName = "Laila"
	LAURA      VoiceName = "Laura"
	LEA        VoiceName = "Lea"
	LEKHA      VoiceName = "Lekha"
	LIV        VoiceName = "Liv"
	LOTTE      VoiceName = "Lotte"
	LUCIA      VoiceName = "Lucia"
	LUCIANA    VoiceName = "Luciana"
	MADS       VoiceName = "Mads"
	MAGED      VoiceName = "Maged"
	MAJA       VoiceName = "Maja"
	MARISKA    VoiceName = "Mariska"
	MARLENE    VoiceName = "Marlene"
	MATHIEU    VoiceName = "Mathieu"
	MATTHEW    VoiceName = "Matthew"
	MAXIM      VoiceName = "Maxim"
	MEI_JIA    VoiceName = "Mei-Jia"
	MELINA     VoiceName = "Melina"
	MIA        VoiceName = "Mia"
	MIGUEL     VoiceName = "Miguel"
	MIREN      VoiceName = "Miren"
	MIZUKI     VoiceName = "Mizuki"
	MONTSERRAT VoiceName = "Montserrat"
	NAJA       VoiceName = "Naja"
	NICOLE     VoiceName = "Nicole"
	NIKOS      VoiceName = "Nikos"
	NORA       VoiceName = "Nora"
	OSKAR      VoiceName = "Oskar"
	PENELOPE   VoiceName = "Penelope"
	RAVEENA    VoiceName = "Raveena"
	RICARDO    VoiceName = "Ricardo"
	RUBEN      VoiceName = "Ruben"
	RUSSELL    VoiceName = "Russell"
	SALLI      VoiceName = "Salli"
	SATU       VoiceName = "Satu"
	SEOYEON    VoiceName = "Seoyeon"
	SIN_JI     VoiceName = "Sin-Ji"
	SORA       VoiceName = "Sora"
	TAKUMI     VoiceName = "Takumi"
	TARIK      VoiceName = "Tarik"
	TATYANA    VoiceName = "Tatyana"
	TESSA      VoiceName = "Tessa"
	TIAN_TIAN  VoiceName = "Tian-Tian"
	VICKI      VoiceName = "Vicki"
	VITORIA    VoiceName = "Vitoria"
	YELDA      VoiceName = "Yelda"
	ZEINA      VoiceName = "Zeina"
	ZHIYU      VoiceName = "Zhiyu"
	ZUZANA     VoiceName = "Zuzana"
)

List of voice_name

Source Files

Jump to

Keyboard shortcuts

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