Methods
CompleteSendingStateChange | (u: State) | → | nothing | |
ReportSendingFailure | (u: Reason, s: Error, s: Message) | → | nothing | |
CompleteReceivingStateChange | (u: State) | → | nothing | |
ReportReceivingFailure | (u: Reason, s: Error, s: Message) | → | nothing | |
SetCredentials | (s: Username, s: Password) | → | nothing | |
AddCandidates | (a(usua{sv}): Candidates) | → | nothing | |
FinishInitialCandidates | () | → | nothing | |
Fail | ((uuss): Reason) | → | nothing |
Signals
SendingStateChanged | (u: State) | |
ReceivingStateChanged | (u: State) | |
LocalCandidatesAdded | (a(usua{sv}): Candidates) | |
LocalCredentialsChanged | (s: Username, s: Password) | |
RelayInfoChanged | (aa{sv}: Relay_Info) | |
STUNServersChanged | (a(sq): Servers) | |
ServerInfoRetrieved | () | |
EndpointsChanged | (ao: Endpoints_Added, ao: Endpoints_Removed) | |
ICERestartRequested | () |
Properties
SendingState | u ( Stream_Flow_State) | Read only | ||
ReceivingState | u ( Stream_Flow_State) | Read only | ||
Transport | u ( Stream_Transport_Type) | Read only | Immutable | |
LocalCandidates | a(usua{sv}) ( Candidate_List) | Read only | ||
LocalCredentials | (ss) ( Stream_Credentials) | Read only | ||
STUNServers | a(sq) ( Socket_Address_IP_List) | Read only | ||
RelayInfo | aa{sv} ( String_Variant_Map_List) | Read only | ||
HasServerInfo | b | Read only | ||
Endpoints | ao | Read only | ||
ICERestartPending | b | Read only |
Types
Stream_Flow_State | Enum | u | |
Call_Stream_Candidate_Type | Enum | u | |
Stream_Component | Enum | u | |
Stream_Transport_Type | Enum | u | |
Candidate_Info | Mapping | a{sv} | |
Candidate | Struct | (usua{sv}) | |
Stream_Credentials | Struct | (ss) |
Description
This interface deals with how to connect a stream to an endpoint. It contains all that is required to describe the local endpoint, to succesfully establish a connection. While a call is established, one may try to connect to multiple remote endpoints at the same time. This is called forking in the SIP jargon. Informations related to the connections are on the Endpoint objects. Once the call is established, there MUST be a single endpoint left.
ICE restarts
If the CM wants to do an ICE restart, then the ICERestartPending property is set, and the ICERestartRequested signal is emitted. The streaming implementation should then call SetCredentials again. This will trigger the actual ICE restart, and cause LocalCandidates to be cleared.
For more information on ICE restarts see RFC 5245 section 9.1.1.1
Methods
CompleteSendingStateChange (u: State) → nothing
Parameters
- State — u (Stream_Flow_State)
Called in response to SendingStateChanged(Pending_*, *) to indicate that the media state has successfully progressed from Pending_{Start, Stop, Pause} to the corresponding non-pending state.
Possible Errors
- Invalid Argument
ReportSendingFailure (u: Reason, s: Error, s: Message) → nothing
Parameters
- Reason — u (Call_State_Change_Reason)
- Error — s (DBus_Error_Name)
- Message — s
CompleteReceivingStateChange (u: State) → nothing
Parameters
- State — u (Stream_Flow_State)
Called in response to ReceivingStateChanged(Pending_*, *) to indicate that the media state has successfully progressed from Pending_{Start, Stop, Pause} to the corresponding non-pending state.
Possible Errors
- Invalid Argument
ReportReceivingFailure (u: Reason, s: Error, s: Message) → nothing
Parameters
- Reason — u (Call_State_Change_Reason)
- Error — s (DBus_Error_Name)
- Message — s
SetCredentials (s: Username, s: Password) → nothing
Parameters
- Username — s
- Password — s
Used to set the username fragment and password for streams that have global credentials.
AddCandidates (a(usua{sv}): Candidates) → nothing
Parameters
- Candidates — a(usua{sv}) (Candidate_List)
FinishInitialCandidates () → nothing
Rationale:
Possible Errors
- Not Available
Fail ((uuss): Reason) → nothing
Parameters
- Reason — (uuss) (Call_State_Reason)
Signals
SendingStateChanged (u: State)
Parameters
- State — u (Stream_Flow_State)
ReceivingStateChanged (u: State)
Parameters
- State — u (Stream_Flow_State)
LocalCandidatesAdded (a(usua{sv}): Candidates)
Parameters
- Candidates — a(usua{sv}) (Candidate_List)
LocalCredentialsChanged (s: Username, s: Password)
Parameters
- Username — s
- Password — s
RelayInfoChanged (aa{sv}: Relay_Info)
Parameters
- Relay_Info — aa{sv} (String_Variant_Map_List)
STUNServersChanged (a(sq): Servers)
Parameters
- Servers — a(sq) (Socket_Address_IP_List)
ServerInfoRetrieved ()
Signals that the initial information about STUN and Relay servers has been retrieved, i.e. the HasServerInfo property is now true.
EndpointsChanged (ao: Endpoints_Added, ao: Endpoints_Removed)
Parameters
- Endpoints_Added — ao
- Endpoints_Removed — ao
ICERestartRequested ()
Properties
SendingState — u (Stream_Flow_State)
ReceivingState — u (Stream_Flow_State)
Transport — u (Stream_Transport_Type)
LocalCandidates — a(usua{sv}) (Candidate_List)
LocalCredentials — (ss) (Stream_Credentials)
STUNServers — a(sq) (Socket_Address_IP_List)
The IP addresses of possible STUN servers to use for NAT traversal, as dotted-quad IPv4 address literals or RFC2373 IPv6 address literals. Change notification is via the STUNServersChanged signal. The IP addresses MUST NOT be given as DNS hostnames.
Rationale:
RelayInfo — aa{sv} (String_Variant_Map_List)
A list of mappings describing TURN or Google relay servers available for the client to use in its candidate gathering, as determined from the protocol. Well-known map keys are:
ip
- s- The IP address of the relay server as a dotted-quad IPv4
address literal or an RFC2373 IPv6 address literal. This MUST NOT
be a DNS hostname.
Rationale:
High-quality connection managers already need an asynchronous DNS resolver, so they might as well resolve this name to an IP and make life easier for streaming implementations. type
- s-
Either
udp
for UDP (UDP MUST be assumed if this key is omitted),tcp
for TCP, ortls
.The precise meaning of this key depends on the Transport property: if Transport is ICE,
tls
means TLS over TCP as referenced by ICE draft 19, and if Transport is GTalk_P2P,tls
means a fake SSL session over TCP as implemented by libjingle. port
- q- The UDP or TCP port of the relay server as an ASCII unsigned integer
unique-id
- s- A string identifying the relay server. If two RelayInfo entries
have the same unique-id, but different
type
s, there is usually little point in connecting to both. Usepriority
to determine which version to prefer in this case. Can also be used by the streaming implementation to avoid connecting to the same relay multiple times if relaying is required for both audio and video. priority
- u- A number determining which version of a server to prefer (if
multiple are present with the same
unique-id
, the one with the highest priority should be used, or the streaming implementation should use the one whosetype
has the most desirable properties) username
- s- The username to use
password
- s- The password to use
component
- u- The component number to use this relay server for, as an
ASCII unsigned integer; if not included, this relay server
may be used for any or all components.
Rationale:
In ICE draft 6, as used by Google Talk, credentials are only valid once, so each component needs relaying separately.
Rationale:
An equivalent of the gtalk-p2p-relay-token property on MediaSignalling channels is not included here. The connection manager should be responsible for making the necessary HTTP requests to turn the token into a username and password.
The type of relay server that this represents depends on the value of the Transport property. If Transport is ICE, this is a TURN server; if Transport is GTalk_P2P, this is a Google relay server; otherwise, the meaning of RelayInfo is undefined.
If relaying is not possible for this stream, the list is empty.
Change notification is given via the RelayInfoChanged signal.
HasServerInfo — b
True if all the initial information about STUN servers and Relay servers has been retrieved. Change notification is via the ServerInfoRetrieved signal.
Rationale:
Endpoints — ao
The list of Endpoint objects that exist for this stream.
Change notification is via the EndpointsChanged signal.
ICERestartPending — b
Types
Stream_Flow_State — u
- Stopped (0)
- Pending_Start (1)
- Pending_Stop (2)
- Started (3)
Call_Stream_Candidate_Type — u
- None (0)
- Host (1)
- Server_Reflexive (2)
- Peer_Reflexive (3)
- Relay (4)
- Multicast (5)
Stream_Component — u
- Unknown (0)
- Data (1)
- Control (2)
Stream_Transport_Type — u
- Unknown (0)
- Raw_UDP (1)
- ICE (2)
- GTalk_P2P (3)
- WLM_2009 (4)
- SHM (5)
- Multicast (6)
Candidate_Info — a{sv}
Extra information about the candidate. Allowed and mandatory keys depend on the transport protocol used. The following keys are commenly used:
type
- u- The type of candidate (Call_Stream_Candidate_Type)
foundation
- s- The foundation of this candidate
protocol
- u- Underlying protocol of the candidate (Media_Stream_Base_Proto)
priority
- u- Priority of the candidate (should be a number between 0 and 65535). Most ICE implementations will prefer the highest priority candidate pair that manages to connect. For backwards compatibility with non-ICE SIP clients, the lowest priority candidate may be sent as a raw UDP fallback candidate. It is recommended that a relay candidate is used as the lowest priority candidate if possible. If both IPv4 and IPv6 raw udp fallback candidates are available, they should be set to the same priority and advertised to the CM at the same time. The CM will decide which to advertise to the remote end.
base-ip
- s- The underlying Host address where media sent to this (non-host-type) candidate will eventually arrive.
base-port
- u- The underlying Host port where media sent to this (non-host-type) candidate will eventually arrive.
username
- s- Username of this candidate (only if credentials are per candidate)
password
- s- Password of this candidate (only if credentials are per candidate)
ttl
- u- The TTL mandated for RTP/RTCP packets sent to a multicast group (only valid for Multicast Streams)
- Key — s
- Value — v
Candidate — (usua{sv})
- Component — u (Stream_Component)
- IP — s
- Port — u
- Info — a{sv} (Candidate_Info)
Stream_Credentials — (ss)
- Username — s
- Password — s