public interface MgcpConnection
Each connection will be designated locally by an endpoint unique connection identifier, and will be characterized by connection attributes.
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the connection.
|
AudioComponent |
getAudioComponent()
Gets the in-band audio component of the connection.
|
String |
getHexIdentifier()
Gets the connection identifier in hexadecimal base.
|
int |
getIdentifier()
Gets the connection identifier
|
ConnectionMode |
getMode()
Gets the current mode of the connection.
|
OOBComponent |
getOutOfBandComponent()
Gets the out-of-band audio component of the connection.
|
MgcpConnectionState |
getState()
Gets the current state 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.
|
String |
open(String sdp)
Moves the connection to an open state.
|
void |
setMode(ConnectionMode mode)
Sets the mode of the connection.
|
int getIdentifier()
String getHexIdentifier()
boolean isLocal()
true if connection is local; false if it is remote.ConnectionMode getMode()
MgcpConnectionState getState()
void setMode(ConnectionMode mode) throws IllegalStateException
mode - The new mode of the connectionIllegalStateException - Cannot update mode of closed connectionsString halfOpen(LocalConnectionOptions options) throws MgcpConnectionException
The 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.MgcpConnectionException - If connection could not bind required resourcesString open(String sdp) throws MgcpConnectionException
If 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.MgcpConnectionException - If connection fails to open properlyvoid close()
throws MgcpConnectionException
MgcpConnectionException - If connection state is not half-open nor open.AudioComponent getAudioComponent()
OOBComponent getOutOfBandComponent()
Copyright © 2017 TeleStax, Inc.. All Rights Reserved.