OpalConnection*m_opalConnection;/** pointer to OpalConnection object */
switch_mutex_t*m_mutex;/** mutex for synchonizing access to session object */
}OpalH323Private_t;
/** Default constructor
*
*/
FSOpalManager::FSOpalManager():
m_isInitialized(false),
m_pH323Endpoint(NULL);
m_pMemoryPool(NULL)
{
}
/** Destructor
*
*/
~FSOpalManager::FSOpalManager()
{
/**
*Destroyallallocatedresources,ifany
*/
if(m_isInitialized)
{
deletem_pH323Endpoint;
m_pH323Endpoint=NULL;
m_isInitialized=false;
}
}
/**
*Methoddoesrealinitializationofthemanager
*/
boolFSOpalManager::initialize(
switch_memory_pool_t*i_memoryPool,
switch_endpoint_interface_t*i_endpointInterface
)
{
boolresult=true;
/* check if everything is not initialized */
assert(m_isInitialized);
assert(!m_pH323Endpoint);
assert(!m_pMemoryPool)
/* check input parameters */
assert(i_memoryPool);
assert(i_endpointInterface);
m_pMemoryPool=i_memoryPool;
m_pEndpointInterface=i_endpointInterface;
/* create h323 endpoint */
m_pH323Endpoint=newH323EndPoint(this);///TODO, replace prefix and signaling port by values from configuration
if(!m_pH323Endpoint)
{
assert(0);
returnfalse;
}
/**
*Todo->addcodecstocapabilities(forcallcontol)
*m_pH323Endpoint->AddCapability();
*/
m_pH323Endpoint->DisableFastStart(false);///TODO this should be configurable
m_pH323Endpoint->DisableH245Tunneling(false);///TODO this should be configurable
///TODO gatekeeper use should be configurable, I think that sevral options should be implemented in config file: use, dont use, use one of specified with priorities, try to reconnect to the topmost...