class MGCPEndpoint

An MGCP endpoint. More...

Full nameTelEngine::MGCPEndpoint
Definition#include <libs/ymgcp/yatemgcp.h>
InheritsTelEngine::MGCPEndpointId [public ], TelEngine::Mutex [public ], TelEngine::RefObject [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

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)

MGCPEndpoint

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

Parameters:
engineThe engine owning this endpoint
userThe user part of the endpoint's id
hostThe host part of the endpoint's id
portThe port part of the endpoint's id
addPortAdd :port at end of id only if port is not zero

 ~MGCPEndpoint ()

~MGCPEndpoint

[virtual]

Destructor. Remove itself from engine's list

const String&  toString ()

toString

[const virtual]

Get a string representation of this endpoint

Returns: A string representation of this endpoint

Reimplemented from GenObject.

inline MGCPEngine*  engine ()

engine

Get the engine owning this endpoint

Returns: The engine owning this endpoint

MGCPEpInfo*  append (const char* endpoint, const char* host, int port = 0)

append

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

Parameters:
endpointThe endpoint part of the remote endpoint's id
hostThe IP address of the remote endpoint
portThe 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

Returns: Valid MGCPEpInfo pointer or 0 if the data wasn't added

inline void  clear ()

clear

Clear the list or remote endpoints

MGCPEpInfo*  find (const String& epId)

find

Find the info object associated with a remote peer

Parameters:
epIdThe remote endpoint's id to find

Returns: MGCPEpInfo pointer or 0 if not found

MGCPEpInfo*  findAlias (const String& alias)

findAlias

Find an info object by remote peer alias

Parameters:
aliasAlias of the remote endpoint's id to find

Returns: MGCPEpInfo pointer or 0 if not found

MGCPEpInfo*  peer ()

peer

Find the info object associated with an unique remote peer

Returns: MGCPEpInfo pointer or 0 if not exactly one peer


Generated by: paulc on bussard on Mon Feb 10 13:15:47 2014, using kdoc 2.0a54.