public class MgcpLocalConnection extends AbstractMgcpConnection
state, stateLock| Constructor and Description |
|---|
MgcpLocalConnection(int identifier,
ChannelsManager channelProvider) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the connection.
|
AudioComponent |
getAudioComponent()
Gets the in-band audio component of the connection.
|
OOBComponent |
getOutOfBandComponent()
Gets the out-of-band audio component of the connection.
|
String |
halfOpen(LocalConnectionOptions options)
The connection allocates resources and becomes half-open, sending an SDP offer to the remote peer.
|
boolean |
isLocal()
Gets whether the connection is local or remote.
|
void |
join(MgcpLocalConnection otherConnection) |
String |
open(String sdp)
Moves the connection to an open state.
|
void |
setMode(ConnectionMode mode)
Sets the mode of the connection.
|
getHexIdentifier, getIdentifier, getMode, getStatepublic MgcpLocalConnection(int identifier,
ChannelsManager channelProvider)
public boolean isLocal()
MgcpConnectiontrue if connection is local; false if it is remote.public String halfOpen(LocalConnectionOptions options) throws MgcpConnectionException
MgcpConnectionThe connection must then wait for the remote peer to reply with MDCX request containing an SDP answer or for a DLCX request that terminates the connection. description.
options - The options that configure the connection.MgcpConnectionException - If connection state is not closed.public String open(String sdp) throws MgcpConnectionException
MgcpConnectionIf the call is inbound, then the remote peer will provide an SDP offer and the connection will allocate resources and provide and SDP answer right away.
If the call is outbound, the connection MUST move from an half-open state. In this case, the remote peer provides the MGCP answer and the connection can be established between both peers.
sdp - The SDP description of the remote peer.null if call is outbound.MgcpConnectionException - If connection state is not closed nor half-open.public void join(MgcpLocalConnection otherConnection) throws MgcpConnectionException
MgcpConnectionExceptionpublic void close()
throws MgcpConnectionException
MgcpConnectionMgcpConnectionException - If connection state is not half-open nor open.public void setMode(ConnectionMode mode) throws IllegalStateException
MgcpConnectionsetMode in interface MgcpConnectionsetMode in class AbstractMgcpConnectionmode - The new mode of the connectionIllegalStateException - Cannot update mode of closed connectionspublic AudioComponent getAudioComponent()
MgcpConnectiongetAudioComponent in interface MgcpConnectiongetAudioComponent in class AbstractMgcpConnectionpublic OOBComponent getOutOfBandComponent()
MgcpConnectiongetOutOfBandComponent in interface MgcpConnectiongetOutOfBandComponent in class AbstractMgcpConnectionCopyright © 2017 TeleStax, Inc.. All Rights Reserved.