Skip to main content

Enums & Constants

This reference documents all enums and constants used throughout the SFVoPI API.

App Status

Controls whether an SFVoPI application is active and can receive calls.

ValueDescriptionUsed In
ACTIVEApplication is active and can receive inbound callsApps, Numbers
INACTIVEApplication is inactive and will not receive callsApps
tip

Set app status to INACTIVE to temporarily disable call routing without deleting the app configuration.

HTTP Method

Specifies the HTTP method used for webhook callbacks.

ValueDescriptionUsed In
POSTSend webhook as HTTP POST request with JSON bodyApps, Outbound Calls
GETSend webhook as HTTP GET request with query parametersApps, Outbound Calls
info

POST is recommended for webhooks as it supports larger payloads and is more secure.

Call Direction

Indicates whether a call is inbound (to your number) or outbound (from your number).

ValueDescriptionUsed In
INBOUNDCall received on your VoIP numberWebhooks
OUTBOUNDCall initiated from your VoIP numberOutbound Calls, Webhooks

Call Status

Represents the current state of a call throughout its lifecycle.

ValueDescriptionUsed In
RINGINGCall is ringing at the destinationWebhooks
IN_PROGRESSCall has been answered and is activeWebhooks
COMPLETEDCall ended normallyWebhooks
BUSYDestination was busyWebhooks
FAILEDCall failed to connectWebhooks
NO_ANSWERDestination did not answer within timeoutWebhooks
CANCELEDCall was canceled before completionWebhooks
tip

Monitor call status in webhook payloads to track call outcomes and implement retry logic for failed calls.

Audio Codec

Specifies the audio codec used for streaming audio during calls.

ValueDescriptionUsed In
PCMUG.711 µ-law codec (North America, Japan)Stream Response
PCMAG.711 A-law codec (Europe, most of world)Stream Response
info

PCMU is standard in North America and Japan. PCMA is standard in Europe and most other regions. Choose based on your deployment region.

Stream Direction

Controls the direction of audio streaming for real-time audio processing.

ValueDescriptionUsed In
INBOUNDReceive audio from the caller onlyStream Response
OUTBOUNDSend audio to the caller onlyStream Response
BOTHBidirectional audio (send and receive)Stream Response
tip

Use BOTH for interactive voice applications. Use INBOUND or OUTBOUND for one-way streaming scenarios.

Sample Rate

Audio sample rate in Hz for streaming audio.

ValueDescriptionUsed In
80008 kHz sample rate (standard for telephony)Stream Response
1600016 kHz sample rate (wideband audio)Stream Response
info

8000 Hz is the standard for VoIP and telephony. 16000 Hz provides higher quality audio but requires more bandwidth.