---
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

## Changes

- **2026-06-15** `41268cfc6143` — 1 info
  - added the new `AMR-NB` enum value to the request property `codec`
- **2026-06-12** `dee6706a7730` — 1 info
  - added the new `AMR-WB` enum value to the request property `codec`
- **2026-05-08** `20957badcc90` — 1 breaking, 3 info
  - removed the success response with the status `200`
  - added optional request body
  - removed the non-success response with the status `500`
  - added the success response with the status `202`

[Change history](https://skmtc.dev/voiceblender/apis/voiceblender-api/changes/legs/:id/early-media/post.md)

---

[API](https://skmtc.dev/voiceblender/apis/voiceblender-api.md) · [All operations](https://skmtc.dev/voiceblender/apis/voiceblender-api/llms.txt) · [OpenAPI document](https://skmtc.dev/voiceblender/apis/voiceblender-api/revisions/9b0a18aea1e2?raw)
