---
title: "Get a SIPREC recording session"
method: GET
path: "/legs/{id}/siprec"
tags: ["Legs"]
---

# Get a SIPREC recording session

`GET /legs/{id}/siprec`

Returns the RFC 7865 recording metadata of an inbound SIPREC session (leg type `siprec_in`): every recorded participant, every negotiated media stream, and the binding between them. A stream's `a=label` is what ties the m= section to a participant, so the `streams` entries carry both the leg stream ID and the participant identity. The raw metadata document is returned verbatim in `metadata`.

## Response `200`

Recording session state

- SIPRECSessionView
  - `leg_id` string, required — Leg carrying the recording session.
  - `session_id` string — Communication session being recorded, from the metadata's sessionrecordingassoc.
  - `data_mode` 'complete' | 'partial' — Data mode of the most recently applied metadata document (RFC 7865 §6.1).
  - `room_id` string — Room this session's streams were attached to, when SIPREC_ROOM_MODE placed them in one.
  - `participants` SIPRECParticipantView[], required — Every party currently recorded by this session.
    - `participant_id` string, required — The participant_id attribute from the recording metadata document.
    - `aor` string — The participant's address of record, e.g. "sip:alice@example.com".
    - `name` string — The participant's display name, when the metadata carries one.
  - `streams` SIPRECStreamView[], required — Every negotiated media stream, joined to the participant it carries.
    - `leg_stream_id` string, required — Identifier of the leg stream carrying this recorded media, as used by /v1/legs/{id}/streams.
    - `mid` string — The stream's SDP a=mid token (RFC 5888).
    - `label` string — The stream's a=label value (RFC 4574). This is the key that binds the m= section to the recording metadata.
    - `direction` 'recvonly' | 'inactive' — Negotiated media direction. Always recvonly or inactive: a recording server never transmits.
    - `codec` string — Codec negotiated for this stream.
    - `room_id` string — Room this stream's audio is mixed into, when it has been attached to one.
    - `role` string — Routing role of this stream within its room. Defaults to the participant's identity.
    - `participant_id` string — Participant whose audio arrives on this stream, from the metadata's participantstreamassoc send binding.
    - `participant_aor` string — Address of record of the participant sending on this stream.
    - `participant_name` string — Display name of the participant sending on this stream.
  - `metadata` string — The raw rs-metadata XML document as most recently received.

## Other responses

- `400` — Leg is not a SIPREC recording session
- `404` — Leg or recording session state not found

---

[API](https://skmtc.net/voiceblender/apis/voiceblender-api.md) · [All operations](https://skmtc.net/voiceblender/apis/voiceblender-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/voiceblender/voiceblender-api/revisions/c951ca5dcd08/schema)
