public class SDPBuilder
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
SDPBuilder.mediaType |
Constructor and Description |
---|
SDPBuilder() |
Modifier and Type | Method and Description |
---|---|
static android.javax.sip.message.Message |
addSDPContentAndHeader(android.javax.sip.message.Message message,
int preferredT140Map,
int preferredRedMap,
int port)
Creates a copy of message and adds SDP content and header for RTT, according to the other params.
|
static java.lang.String |
getRemoteIP(android.javax.sip.message.Message otherPartySDP)
Get the remote IP address where the other party expects to receive text RTP
|
static int |
getT140MapNum(android.javax.sip.message.Message incomingRequestResponse,
SDPBuilder.mediaType mediaType)
Get the mediatype from the other party's SDP, to know which stream is the primary T.140 and
which is the redundant stream
|
static int |
getT140PortNum(android.javax.sip.message.Message otherPartySDP)
Get the remote port number where the other party expects to receive text RTP
|
public static android.javax.sip.message.Message addSDPContentAndHeader(android.javax.sip.message.Message message, int preferredT140Map, int preferredRedMap, int port)
message
- the message-in-progress that needs the SDP added. This message MUST already contain
a Contact header that specifies the SIP user and local IP sending this message. It will
likely throw a NPE if not present.preferredT140Map
- if this is a response to a request that proposed a T140 rtpmap, use that.
Otherwise, use 0 for the default rtpmap numpreferredRedMap
- if this is a response to a request that proposed a T140red rtpmap, use that.
Otherwise:
-Use 0 for the default T140red rtpmap num
-Use -1 to not use redundancy at allport
- the local UDP port where the other party should send RTTpublic static int getT140MapNum(android.javax.sip.message.Message incomingRequestResponse, SDPBuilder.mediaType mediaType)
incomingRequestResponse
- the incoming message containing the other party's SDPmediaType
- either T140 or T140red, for the redundant streampublic static int getT140PortNum(android.javax.sip.message.Message otherPartySDP)
otherPartySDP
- the message containing the other party's preferred session descriptionpublic static java.lang.String getRemoteIP(android.javax.sip.message.Message otherPartySDP)
otherPartySDP
- the message containing the other party's preferred session description