public class MgcpRemoteConnection extends AbstractMgcpConnection implements RtpListener
state, stateLock| Constructor and Description |
|---|
MgcpRemoteConnection(int identifier,
MediaChannelProvider 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 |
onRtcpFailure(String e) |
void |
onRtcpFailure(Throwable e) |
void |
onRtpFailure(String message) |
void |
onRtpFailure(Throwable e) |
String |
open(String sdp)
Moves the connection to an open state.
|
void |
setConnectionListener(MgcpConnectionListener connectionListener) |
void |
setMode(ConnectionMode mode)
Sets the mode of the connection.
|
getHexIdentifier, getIdentifier, getMode, getStatepublic MgcpRemoteConnection(int identifier,
MediaChannelProvider channelProvider)
public void setConnectionListener(MgcpConnectionListener connectionListener)
public boolean isLocal()
MgcpConnectionisLocal in interface MgcpConnectiontrue if connection is local; false if it is remote.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 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.
halfOpen in interface MgcpConnectionoptions - 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.
open in interface MgcpConnectionsdp - The SDP description of the remote peer.null if call is outbound.MgcpConnectionException - If connection state is not closed nor half-open.public void close()
throws MgcpConnectionException
MgcpConnectionclose in interface MgcpConnectionMgcpConnectionException - If connection state is not half-open nor open.public AudioComponent getAudioComponent()
MgcpConnectiongetAudioComponent in interface MgcpConnectiongetAudioComponent in class AbstractMgcpConnectionpublic OOBComponent getOutOfBandComponent()
MgcpConnectiongetOutOfBandComponent in interface MgcpConnectiongetOutOfBandComponent in class AbstractMgcpConnectionpublic void onRtpFailure(Throwable e)
onRtpFailure in interface RtpListenerpublic void onRtpFailure(String message)
onRtpFailure in interface RtpListenerpublic void onRtcpFailure(Throwable e)
onRtcpFailure in interface RtpListenerpublic void onRtcpFailure(String e)
onRtcpFailure in interface RtpListenerCopyright © 2017 TeleStax, Inc.. All Rights Reserved.