InboundCallApplication

interface InboundCallApplication : CommonCallbacks

Properties

Link copied to clipboard
abstract var serverPath: String

Defaults to "/vapi4k"

Link copied to clipboard
abstract var serverSecret: String

The server secret in Vapi is a security feature that allows you to authenticate requests sent from Vapi to your server. It will be sent with every request from Vapi to your server.

Functions

Link copied to clipboard
abstract fun onAllRequests(block: suspend (requestContext: RequestContext) -> Unit)

Whenever a request is made, the contents of the onAllRequests{} block will be executed.

Link copied to clipboard
abstract fun onAllResponses(block: suspend (responseContext: ResponseContext) -> Unit)

Whenever a response is received, the contents of the onAllResponses{} block will be executed.

Link copied to clipboard
abstract fun onAssistantRequest(block: suspend InboundCallAssistantResponse.(RequestContext) -> Unit)

Whenever an AssistantRequest is made, the contents of the onAssistantRequest{} block will be executed.

Link copied to clipboard
abstract fun onRequest(requestType: ServerRequestType, vararg requestTypes: ServerRequestType, block: suspend (requestContext: RequestContext) -> Unit)

Whenever a request is made for the specified type(s), the contents of the onRequest{} block will be executed.

Link copied to clipboard
abstract fun onResponse(requestType: ServerRequestType, vararg requestTypes: ServerRequestType, block: suspend (responseContext: ResponseContext) -> Unit)

Whenever a response of the specified type(s) is received, the contents of the onResponse{} block will be executed.

Link copied to clipboard

Whenever a TransferDestinationRequest is made, the contents of the onTransferDestinationRequest{} block will be executed.