public class MgcpCall extends Object
The concept of Call has little semantic meaning in the MGCP protocol. However, it can be used to identify calls for reporting and accounting purposes. It does not affect the handling of connections by the gateway.
Calls are identified by unique identifiers, independent of the underlying platforms or agents.
Call identifiers are hexadecimal strings, which are created by the Call Agent. The maximum length of call identifiers is 32
characters.
| Constructor and Description |
|---|
MgcpCall(int callId) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addConnection(String endpointId,
int connectionId)
Registers a connection in the call.
|
int |
getCallId()
Gets the call identifier.
|
String |
getCallIdHex()
Gets the call identifier.
|
Set<Integer> |
getConnections(String endpointId)
Gets the list of currently registered connections in the Call.
|
Set<String> |
getEndpoints()
Gets the list of currently registered endpoints that own the connections in the Call.
|
boolean |
removeConnection(String endpointId,
int connectionId)
Unregisters a connection from the call.
|
Set<Integer> |
removeConnections(String endpointId)
Unregisters all connections that belong to an endpoint.
|
public int getCallId()
public String getCallIdHex()
public Set<String> getEndpoints()
public Set<Integer> getConnections(String endpointId)
public boolean addConnection(String endpointId, int connectionId)
endpointId - The identifier of the endpoint that owns the connection.connectionId - The connection identifier.true if connection was successfully registered. Returns false otherwise.public boolean removeConnection(String endpointId, int connectionId)
endpointId - The identifier of the endpoint that owns the connection.connectionId - The connection identifier.true if connection was removed successfully. Returns false otherwise.public Set<Integer> removeConnections(String endpointId)
endpointId - The identifier of the endpoint that owns the connections.Copyright © 2017 TeleStax, Inc.. All Rights Reserved.