| Previous | Next |
| RTC_E_POLICY_NOT_ALLOW | RTC_E_PORT_MAPPING_FAILED |
RTC_E_PORT_MAPPING_UNAVAILABLE
Protocol boundary: RTC_E_PORT_MAPPING_UNAVAILABLE
The operational meaning of this result is tied to registering listening sockets and supplying internal/external media mappings before session establishment: the port manager cannot provide a usable internal/external mapping for the requested media flow.
Log this result as 0x80EE0045 in the RTC interface facility 0xEE, not only as a signed decimal; for this HRESULT, the facility distinguishes local RTC validation from a response status mapped by the stack.
The first useful check for this HRESULT is to record media type, requested local port, NAT state, mapping lifetime, and callback timing; The result must be separated from nearby conditions because unavailable mapping can be a capability or timing result before any packet is sent.
Minimum incident record
Correlate this result at source: the method or callback, the owning object generation, and the active protocol transition; for this HRESULT, this keeps later retries from obscuring causality.
- Code-specific proof for this HRESULT: record media type, requested local port, NAT state, mapping lifetime, and callback timing.
- Owning object for this HRESULT: listen registration state.
- Wire evidence for this HRESULT:
SDPaddress derived from mapping. - Lifecycle generation for this HRESULT: local and external address/port.
A useful this result trace does not require communication content or secrets; in the result record, keep structural metadata and correlation identifiers while removing passwords, authorization material, complete numbers, and private presence data.
Protocol and object boundary
| RTC area | RTC listening and NAT port-mapping boundary |
|---|---|
| Objects to correlate | IRTCClientPortManagement, IRTCSessionPortManagement, IRTCPortManager, address/port range and mapping lifetime |
| Condition to prove | the port manager cannot provide a usable internal/external mapping for the requested media flow |
| Safe corrective direction | obtain a current mapping before participant addition or use a supported direct topology |
The surrounding protocol rule for this HRESULT is that For outgoing sessions the port manager must be set before adding the participant; for incoming sessions it must be set before acceptance; in addition, the path requires that The address advertised in SDP and the local socket receiving media are different values when NAT mapping is involved.
Correct application response
Resolve it at its producing layer: obtain a current mapping before participant addition or use a supported direct topology; after it, a separate UI or watchdog retry must wait until that layer reports a final state.
Do not turn it into an immediate unconditional retry; for this HRESULT, first determine whether the peer could have accepted the prior request and whether RTC still owns a live transaction.
Example for this HRESULT: A NAT mapping service has no external allocation ready when RTC builds the SDP offer.
How to prove the condition
- Record it and
0x80EE0045at the first RTC method or event that returns it. - Place it in its exact phase: parsing, discovery, transport, authentication, profile validation, dialog control, media, roaming, registration, redirection, or final response handling.
- Identify the client, profile, session, participant, presence object, terminal, or port manager that owns this it occurrence.
- prove the condition by ensuring the trace can record media type, requested local port, NAT state, mapping lifetime, and callback timing.
- Apply one controlled change for this HRESULT: obtain a current mapping before participant addition or use a supported direct topology; then verify the result return value and resulting RTC state.
Use RTC event state to interpret the protocol trace for this HRESULT, and use the trace to verify what left or reached the host; for this HRESULT, this two-sided correlation identifies the producing layer.
Nearby failure modes
The practical separator for this HRESULT is this: it is tied to the condition “the port manager cannot provide a usable internal/external mapping for the requested media flow”; preserve that producing boundary before choosing recovery; for this HRESULT, compare that boundary with these related RTC values.
RTC_E_PORT_MANAGER_ALREADY_SET | the session already has a port-manager callback and RTC forbids replacing it at this stage |
|---|---|
RTC_E_INVALID_LISTEN_SOCKET | the address and port supplied for RTC listening cannot be bound or accepted as a valid listen tuple |
RTC_E_PORT_MAPPING_FAILED | the port manager returned a concrete failure while creating or retrieving a mapping |
Telemetry for this HRESULT should retain these distinctions even when several outcomes share HRESULT severity.
Actions that do not address this condition
- With it, do not set or replace the port manager after session initiation has consumed the mapping.
- also do not advertise an external mapping before confirming that it belongs to the current local socket.
- Do not translate it into a broad “connection failed” label before preserving the RTC symbol and producing phase.
Verification after a fix
A useful it regression does more than expect an exception; the result test constructs “the port manager cannot provide a usable internal/external mapping for the requested media flow”, checks the exact HRESULT at the producing RTC boundary, and verifies state ownership before and after the targeted correction.
Technical references
- IRTCClientPortManagement — API or protocol rules used to interpret it.
- RTC address mapping — authoritative context for the boundary.
- Microsoft RTC return constants — definitions relevant when reproducing it.
- SDP syntax — API or protocol rules used to interpret it.
Looking for a different code? Search another status or error code.
