public class SipMangler
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static char |
ESC
Escape char.
|
protected static java.lang.String |
escaped_AT
Escaped sequence for '@' char (without the leading ESC).
|
protected static java.lang.String |
escaped_ESC
Escaped sequence for ESC.
|
protected static java.lang.String |
escaped_PORT
Escaped sequence for ':' char (without the leading ESC).
|
static java.lang.String |
magic_cookie
Magic cookie that distinguishes mangled SIP URIs.
|
protected static java.lang.String |
startof_URI
Start sequence for mangled URI (without the leading ESC).
|
Constructor and Description |
---|
SipMangler() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isRequestLineMangled(SipMessage msg)
Whether request-uri has been mangled.
|
static SipMessage |
mangleBody(SipMessage msg,
java.lang.String masq_addr,
java.lang.String[] media,
int[] masq_port)
Mangles the body
|
static SipMessage |
mangleContact(SipMessage msg,
java.lang.String host,
int port)
Mangles Contact address in automatic and reversible manner.
|
protected static SdpMessage |
mangleSdpConnection(SdpMessage sdp,
java.lang.String masq_addr)
Mangles the Via address
|
protected static SdpMessage |
mangleSdpMediaPort(SdpMessage sdp,
java.lang.String media,
int masq_port)
Mangles the sdp media port
|
static SipMessage |
unmangleContact(SipMessage msg)
Unmangles Contact address.
|
static SipMessage |
unmangleRequestLine(SipMessage msg)
Unmangles request-uri
|
protected static final char ESC
protected static final java.lang.String escaped_ESC
protected static final java.lang.String startof_URI
protected static final java.lang.String escaped_AT
protected static final java.lang.String escaped_PORT
public static final java.lang.String magic_cookie
It is equal to the start sequence, formed as ESC+startof_URI.
public static boolean isRequestLineMangled(SipMessage msg)
public static SipMessage unmangleRequestLine(SipMessage msg)
public static SipMessage mangleContact(SipMessage msg, java.lang.String host, int port)
public static SipMessage unmangleContact(SipMessage msg)
protected static SdpMessage mangleSdpConnection(SdpMessage sdp, java.lang.String masq_addr)
protected static SdpMessage mangleSdpMediaPort(SdpMessage sdp, java.lang.String media, int masq_port)
public static SipMessage mangleBody(SipMessage msg, java.lang.String masq_addr, java.lang.String[] media, int[] masq_port)