Skip to main content

SIPREC start

POST 
/calls/:call_control_id/actions/siprec_start

Start siprec session to configured in SIPREC connector SRS.

Expected Webhooks:

  • siprec.started
  • siprec.stopped
  • siprec.failed

Request

Path Parameters

    call_control_id stringrequired

    Unique identifier and token for controlling the call

Body

required

Start siprec session to configured in SIPREC connector SRS.

    connector_name string

    Name of configured SIPREC connector to be used.

    siprec_track string

    Possible values: [inbound_track, outbound_track, both_tracks]

    Default value: both_tracks

    Specifies which track should be sent on siprec session.

    include_metadata_custom_headers boolean

    Possible values: [true, false]

    When set, custom parameters will be added as metadata (recording.session.ExtensionParameters). Otherwise, they’ll be added to sip headers.

    secure boolean

    Possible values: [true, false]

    Controls whether to encrypt media sent to your SRS using SRTP and TLS. When set you need to configure SRS port in your connector to 5061.

    session_timeout_secs integer

    Default value: 1800

    Sets Session-Expires header to the INVITE. A reinvite is sent every half the value set. Usefull for session keep alive. Minimum value is 90, set to 0 to disable.

    client_state string

    Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.

Responses

200: Successful response upon making a call control command.

default: Unexpected error

Callbacks

Request samples


curl -L 'https://api.telnyx.com/v2/calls/:call_control_id/actions/siprec_start' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"connector_name": "my-siprec-connector",
"siprec_track": "both_tracks",
"client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d",
"command_id": "891510ac-f3e4-11e8-af5b-de00688a4901"
}'

Response samples


{
"data": {
"result": "ok"
}
}