| Previous | Next |
| RTC_E_POLICY_NOT_ALLOW | RTC_E_PORT_MAPPING_FAILED |
RTC_E_PORT_MAPPING_UNAVAILABLE
What RTC_E_PORT_MAPPING_UNAVAILABLE means in RTC
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; the facility distinguishes local RTC validation from a response status mapped by the stack.
The first useful check 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
- Code-specific proof: record media type, requested local port, NAT state, mapping lifetime, and callback timing.
- Owning object: listen registration state.
- Wire evidence:
SDPaddress derived from mapping. - Lifecycle state: local and external address/port.
Protocol and object state
| RTC area | RTC listening and NAT port-mapping |
|---|---|
| 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 |
For outgoing sessions the port manager must be set before adding the participant; for incoming sessions it must be set before acceptance. 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.
Example: 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. - Apply one controlled change: obtain a current mapping before participant addition or use a supported direct topology; then verify the result return value and resulting RTC state.
Nearby failure modes
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 |
Actions that do not address this condition
- Do not set or replace the port manager after session initiation has consumed the mapping.
- Do not advertise an external mapping before confirming that it belongs to the current local socket.
Technical references
Looking for a different code? Search another status or error code.