Skip to main content

Initiate an outbound call

POST 
/texml/calls/:application_id

Initiate an outbound TeXML call. Telnyx will request TeXML from the XML Request URL configured for the connection in the Mission Control Portal.

Request

Path Parameters

    application_id stringrequired

    The ID of the TeXML application used for the call.

Body

required

Iniatiate Call request object

    To stringrequired

    The phone number of the called party. Phone numbers are formatted with a + and country code.

    From stringrequired

    The phone number of the party that initiated the call. Phone numbers are formatted with a + and country code.

    Url string

    The URL from which Telnyx will retrieve the TeXML call instructions.

    UrlMethod string

    Possible values: [GET, POST]

    Default value: POST

    HTTP request type used for Url. The default value is inherited from TeXML Application setting.

    FallbackUrl string

    A failover URL for which Telnyx will retrieve the TeXML call instructions if the Url is not responding.

    StatusCallback string

    URL destination for Telnyx to send status callback events to for the call.

    StatusCallbackMethod string

    Possible values: [GET, POST]

    Default value: POST

    HTTP request type used for StatusCallback.

    StatusCallbackEvent string

    Possible values: [initiated, ringing, answered, completed]

    Default value: completed

    The call events for which Telnyx should send a webhook. Multiple events can be defined when separated by a space.

    MachineDetection string

    Possible values: [Enable, Disable, DetectMessageEnd]

    Default value: Disable

    Enables Answering Machine Detection.

    DetectionMode string

    Possible values: [Premium, Regular]

    Default value: Regular

    Allows you to chose between Premium and Standard detections.

    AsyncAmd boolean

    Select whether to perform answering machine detection in the background. By default execution is blocked until Answering Machine Detection is completed.

    AsyncAmdStatusCallback string

    URL destination for Telnyx to send AMD callback events to for the call.

    AsyncAmdStatusCallbackMethod string

    Possible values: [GET, POST]

    Default value: POST

    HTTP request type used for AsyncAmdStatusCallback. The default value is inherited from TeXML Application setting.

    MachineDetectionTimeout integer

    Possible values: >= 500 and <= 60000

    Default value: 30000

    Maximum timeout threshold in milliseconds for overall detection.

    MachineDetectionSpeechThreshold integer

    Default value: 3500

    Maximum threshold of a human greeting. If greeting longer than this value, considered machine. Ignored when premium detection is used.

    MachineDetectionSpeechEndThreshold integer

    Default value: 800

    Silence duration threshold after a greeting message or voice for it be considered human. Ignored when premium detection is used.

    MachineDetectionSilenceTimeout integer

    Default value: 3500

    If initial silence duration is greater than this value, consider it a machine. Ignored when premium detection is used.

    CancelPlaybackOnMachineDetection boolean

    Default value: true

    Whether to cancel ongoing playback on machine detection. Defaults to true.

    CancelPlaybackOnDetectMessageEnd boolean

    Default value: true

    Whether to cancel ongoing playback on greeting ended detection. Defaults to true.

    PreferredCodecs string

    The list of comma-separated codecs to be offered on a call.

    Record boolean

    Whether to record the entire participant's call leg. Defaults to false.

    RecordingChannels string

    Possible values: [mono, dual]

    The number of channels in the final recording. Defaults to mono.

    RecordingStatusCallback string

    The URL the recording callbacks will be sent to.

    RecordingStatusCallbackMethod string

    Possible values: [GET, POST]

    HTTP request type used for RecordingStatusCallback. Defaults to POST.

    RecordingStatusCallbackEvent string

    The changes to the recording's state that should generate a call to RecoridngStatusCallback. Can be: in-progress, completed and absent. Separate multiple values with a space. Defaults to completed.

    RecordingTimeout integer

    Default value: 0

    The number of seconds that Telnyx will wait for the recording to be stopped if silence is detected. The timer only starts when the speech is detected. Please note that the transcription is used to detect silence and the related charge will be applied. The minimum value is 0. The default value is 0 (infinite)

    RecordingTrack string

    Possible values: [inbound, outbound, both]

    The audio track to record for the call. The default is both.

    SipAuthPassword string

    The password to use for SIP authentication.

    SipAuthUsername string

    The username to use for SIP authentication.

    Trim string

    Possible values: [trim-silence, do-not-trim]

    Whether to trim any leading and trailing silence from the recording. Defaults to trim-silence.

Responses

200: Successful response upon initiating a TeXML call.

Loading...