Yate
|
An MGCP endpoint. More...
#include <yatemgcp.h>
Public Member Functions | |
MGCPEndpoint (MGCPEngine *engine, const char *user, const char *host, int port, bool addPort=true) | |
virtual | ~MGCPEndpoint () |
virtual const String & | toString () const |
MGCPEngine * | engine () |
MGCPEpInfo * | append (const char *endpoint, const char *host, int port=0) |
void | clear () |
MGCPEpInfo * | find (const String &epId) |
MGCPEpInfo * | findAlias (const String &alias) |
MGCPEpInfo * | peer () |
An MGCP endpoint.
This class holds a local MGCP endpoint (either gateway or call agent) along with its remote peer(s). If the engine owning this endpoint is an MGCP gateway, only 1 remote peer (Call Agent) is allowed
MGCPEndpoint | ( | MGCPEngine * | engine, |
const char * | user, | ||
const char * | host, | ||
int | port, | ||
bool | addPort = true |
||
) |
Constructor. Construct this endpoint. Append itself to the engine's list. The endpoint's id will be created from the received user and engine's address
engine | The engine owning this endpoint |
user | The user part of the endpoint's id |
host | The host part of the endpoint's id |
port | The port part of the endpoint's id |
addPort | Add :port at end of id only if port is not zero |
virtual ~MGCPEndpoint | ( | ) | [virtual] |
Destructor. Remove itself from engine's list
MGCPEpInfo* append | ( | const char * | endpoint, |
const char * | host, | ||
int | port = 0 |
||
) |
Append info about a remote endpoint controlled by or controlling this endpoint. If the engine owning this endpoint is an MGCP gateway, only 1 remote peer (Call Agent) is allowed
endpoint | The endpoint part of the remote endpoint's id |
host | The IP address of the remote endpoint |
port | The port used to send data to this endpoint. Set to 0 to set it to the default port defined by the protocol and the opposite of the engine's mode A value of -1 uses the default but doesn't add :port at end of ID Other negative values use specified port but don't add :port at end |
void clear | ( | ) | [inline] |
Clear the list or remote endpoints
MGCPEngine* engine | ( | ) | [inline] |
Get the engine owning this endpoint
MGCPEpInfo* find | ( | const String & | epId | ) |
Find the info object associated with a remote peer
epId | The remote endpoint's id to find |
MGCPEpInfo* findAlias | ( | const String & | alias | ) |
Find an info object by remote peer alias
alias | Alias of the remote endpoint's id to find |
MGCPEpInfo* peer | ( | ) |
Find the info object associated with an unique remote peer
Get a string representation of this endpoint
Reimplemented from GenObject.
References MGCPEndpointId::id().