-
Notifications
You must be signed in to change notification settings - Fork 1
Integration: WHIP to WHEP with SMB
This guide explains how to wire the SMB WHIP Gateway and the SMB WHEP Gateway into a complete WebRTC distribution pipeline. The WHIP gateway ingests media from a WHIP-compatible client into a Symphony Media Bridge (SMB) conference. The WHEP gateway pulls that same conference stream out for any WHEP-compatible player. SMB handles the routing in the middle.
- A running Symphony Media Bridge instance on OSC
- A running SMB WHIP Gateway instance pointed at that SMB instance
- A running SMB WHEP Gateway instance pointed at the same SMB instance
Both gateways must use the same SmbUrl (and the same SmbApiKey if your SMB instance requires authentication). If they point to different SMB instances the WHEP subscriber will not find the conference that the WHIP client created.
Use a WHIP-compatible client (for example web.whip.eyevinn.technology) to push media to your WHIP gateway endpoint:
https://{tenant}-{name}.eyevinn-smb-whip-bridge.auto.prod.osaas.io/api/v2/whip/sfu-broadcaster
Replace {tenant} with your OSC tenant name and {name} with the name you gave your WHIP gateway instance.
A successful WHIP session causes SMB to create a conference with an endpoint whose id is ingest. Nothing exists on SMB until a WHIP client is actively streaming; a WHEP subscriber that connects before the WHIP client starts will receive a 400 error.
Once the WHIP client is streaming, point a WHEP-compatible player at:
https://{name}.eyevinn-wrtc-egress.auto.prod.osaas.io/api/v2/whep/ingest
Replace {name} with your WHEP gateway instance name. The endpoint id ingest is the one that SMB creates when the WHIP client publishes. Use exactly ingest here, not any other value.
| Component | URL pattern |
|---|---|
| WHIP ingest | https://{tenant}-{name}.eyevinn-smb-whip-bridge.auto.prod.osaas.io/api/v2/whip/sfu-broadcaster |
| WHEP playback | https://{name}.eyevinn-wrtc-egress.auto.prod.osaas.io/api/v2/whep/ingest |
The conference endpoint id created by the WHIP gateway (ingest) is the value used in the WHEP URL.
Both gateways surface most configuration and sequencing problems as HTTP 400 responses. The error body may not distinguish between the different root causes, so work through the checklist below in order.
Symptom: 400 on the first WHIP or WHEP request, immediately after creating the gateway.
Cause: The SmbUrl configured on the gateway contains a typo, is missing a trailing slash, or points to the wrong SMB instance.
Fix: Verify the URL is correct and reachable. SMB URLs typically end with a trailing slash, for example https://mysmb.eyevinn-docker-wrtc-sfu.auto.prod.osaas.io/. Update the instance configuration and restart.
Symptom: 400 on WHIP or WHEP requests even though the SmbUrl is correct.
Cause: Your SMB instance requires an API key but the gateway was created without SmbApiKey, or the key value does not match.
Fix: Check the SMB instance configuration. Add or correct the SmbApiKey on the gateway instance.
Symptom: 400 on the WHEP request; the WHIP gateway appears healthy.
Cause: SMB only creates the conference and the ingest endpoint when a WHIP client is actively publishing. If the WHEP player connects before that, the conference does not exist and SMB returns 400.
Fix: Start the WHIP client and confirm it is streaming before opening the WHEP connection. Look for the WHIP resource URL response in your WHIP client as confirmation that SMB accepted the session.
Symptom: 400 on the WHEP request even though the WHIP client is streaming successfully.
Cause: The endpoint id in the WHEP URL does not match the one created by SMB. The WHIP gateway creates an endpoint with id ingest. Using a different value (for example sfu-broadcaster or a conference UUID) will result in 400.
Fix: Use exactly ingest as the endpoint id in the WHEP URL: .../api/v2/whep/ingest.
Symptom: 400 on the WHIP request from a custom client; the web-based WHIP client works.
Cause: The WHIP request body must be a valid SDP offer. Missing or malformed SDP is rejected by the gateway before it reaches SMB.
Fix: Ensure the Content-Type: application/sdp header is set and the request body contains a valid SDP offer.
Instance logs show which downstream call failed and why. You can access logs two ways:
Via MCP (AI agent): Use the get-logs-for-instance tool with the service id and instance name. For example:
- WHIP gateway: service
eyevinn-smb-whip-bridge, instance{name} - WHEP gateway: service
eyevinn-wrtc-egress, instance{name}
Via OSC dashboard: Open the instance detail page and click Logs.
Log lines reference the SMB URL that was called and the HTTP status returned by SMB. A line showing a 400 from the SMB URL confirms the gateway is reachable but the request to SMB was rejected. A connection error or timeout instead of a 400 points to a misconfigured SmbUrl.