WCS 5.3.502 — safely confirming SIP/RTMP cleanup before creating a replacement stream

awv

New Member
We are testing WCS 5.3.502 with this workflow:

SIP audio call → published stream → outgoing RTMP push

Our application needs to terminate an old call and its RTMP push, then safely allow a replacement. The replacement has a different callId and push mediaSessionId, but may reuse the same stream name and RTMP destination.

The difficult case is an uncertain cleanup result:

  1. Our application sends call/terminate or push/terminate.
  2. WCS may receive and begin processing the request.
  3. The HTTP response is lost, times out, or our application restarts.
  4. A later lookup may return 404, but we need to establish whether any old teardown, callback or automatic retry could still affect a replacement.
We currently defer replacement when cleanup is uncertain. This protects active streams, but we need a supported way to recover safely without restarting the shared WCS service or interrupting unrelated streams.

Could you clarify the following for this version?

  • Completion semantics: Does HTTP 200 from either termination endpoint mean teardown is fully complete, or can asynchronous cleanup continue afterward? What does a subsequent 404 establish?
  • Supported completion mechanism: Is there an operation status, event, callback, Java API or other supported mechanism that confirms the original cleanup has finished—including relevant delayed callbacks and push-restoration activity?
  • Replacement safety: What prevents delayed work associated with the old call/push from removing or interfering with a replacement that reuses the same stream name or RTMP destination? Are unique call and push identifiers sufficient, or is additional coordination required?
  • Recovery after uncertainty: What is the recommended sequence after a lost response or application restart? We need to avoid blindly retrying a destructive operation or treating a fixed waiting period as proof of completion.
  • Testing: Is there a supported way to delay teardown or its callbacks in a non-production installation so we can verify replacement safety and confirm that another active stream remains unaffected?
We have verified ordinary SIP-to-RTMP audio delivery in an isolated test environment. We are now seeking the documented lifecycle guarantees and recommended integration approach for these failure cases.

If this requires a newer WCS version, an extension, or a different stream lifecycle design, please identify the supported option.

Thank you.
 
Good day.
Completion semantics: Does HTTP 200 from either termination endpoint mean teardown is fully complete, or can asynchronous cleanup continue afterward?
All the termination requests are synchronous. HTTP 200 response means RTMP republishing is terminated.
What does a subsequent 404 establish?
404 means there no the republishing session with this mediaSessioId. This confirms the session is terminated
Replacement safety: What prevents delayed work associated with the old call/push from removing or interfering with a replacement that reuses the same stream name or RTMP destination? Are unique call and push identifiers sufficient, or is additional coordination required?
The stream replacement is not implemented: the old stream should be terminated before publishing/republishing a new one with the same name.
Recovery after uncertainty: What is the recommended sequence after a lost response or application restart? We need to avoid blindly retrying a destructive operation or treating a fixed waiting period as proof of completion.
There is the query /rest-api/v3/push/rtmp/find_all to list all active republishing sessions. You could check if the republished stream still active.
Testing: Is there a supported way to delay teardown or its callbacks in a non-production installation so we can verify replacement safety and confirm that another active stream remains unaffected?
The only supported way to delay any stream operation is to delay its REST hooks responses if you're using REST hooks.
 
  • Like
Reactions: awv
Thank you for clarifying the synchronous termination behaviour and HTTP 200/404 responses.

We have two remaining questions:

  1. Replacement-session safety: If a termination request targeting a specific mediaSessionId is delayed, retried, or its response is lost, could it affect a new session using the same stream name and RTMP destination but a different mediaSessionId? Or is termination strictly limited to the original session?
  2. Legacy versus v3 API: Our current implementation uses legacy REST termination endpoints. Do the same completion and session-isolation guarantees apply to both legacy and v3? If v3 offers stronger protection, would you recommend migrating?
We want to use the safest supported API without unnecessary custom WCS modifications.
 
Last edited:
Replacement-session safety: If a termination request targeting a specific mediaSessionId is delayed, retried, or its response is lost, could it affect a new session using the same stream name and RTMP destination but a different mediaSessionId? Or is termination strictly limited to the original session?
The mediaSessionId is unique, so the termination query affects only one session
Legacy versus v3 API: Our current implementation uses legacy REST termination endpoints. Do the same completion and session-isolation guarantees apply to both legacy and v3? If v3 offers stronger protection, would you recommend migrating?
Both APIs do the same operations under the hoods. But REST API v3 offers more correct asynchronous operations handling and auto-generated API documentation based on OpenAPI specification.
 
We reviewed the official WCS 5.3 documentation and matching bundled OpenAPI. Legacy/v3 call/terminate accepts only callId; v3 documents 200/404 responses but no 202 or job receipt. The Jobs documentation includes SIP startup, but not termination. Call inventory exposes current signaling state, without documenting completion of delayed downstream teardown.

Our exact question is:

After a SIP termination’s HTTP response is lost, which supported API observation permits safe replacement admission?

With a permanently retired, never-reused callId, does confirmed call absence guarantee that all delayed termination effects remain confined to the old lifecycle—including when a replacement reuses its stream name and RTMP destination?

If not, is there a supported original-operation completion receipt or reconciliation API? Please specify how its identifier is recovered after response loss, its downstream-effect coverage, and its retention/restart semantics.

We understand your session-confinement guarantee applies to MID-scoped RTMP termination; we need confirmation specifically for SIP.
 
After a SIP termination’s HTTP response is lost, which supported API observation permits safe replacement admission?
You could use /rest-api/v3/call/find query to check if the SIP call is active or not. If callId is unique and never reused after completion, you may be sure the call is successfully terminated if you cannot find any call with this callId.
 
Top