---
title: "Enable early media on a ringing inbound SIP leg (asynchronous)"
method: POST
path: "/legs/{id}/early-media"
tags: ["Legs"]
---

# Enable early media on a ringing inbound SIP leg (asynchronous)

`POST /legs/{id}/early-media`

Queues a SIP 183 Session Progress with SDP and the RTP/codec setup. The HTTP call returns 202 as soon as the request is validated; the leg transitions to `early_media` state asynchronously, observable via `leg.early_media`. Setup failures surface as `leg.command_failed` with `command="early_media"`.

## Request body

- EarlyMediaLegRequest
  - `codec` 'PCMU' | 'PCMA' | 'G722' | 'opus' | 'AMR-WB' | 'AMR-NB' — Explicit codec for the 183 Session Progress SDP. Must appear in the remote offer's offered_codecs list. Omit to use the server's default preference order.

## Response `202`

Early media queued

## Other responses

- `400` — Not a SIP inbound leg or codec not in offer
- `404` — Leg not found
- `409` — Leg is not in ringing state

---

[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/bd583fca5230/schema)
