提交 14275814 authored 作者: Łukasz Zwierko's avatar Łukasz Zwierko

1. added Tuyan fix/simplification for Opal engine starting

2. some progress in call control implementation

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6138 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 cd6a8d99
...@@ -36,6 +36,35 @@ ...@@ -36,6 +36,35 @@
#include <opal/manager.h> #include <opal/manager.h>
#include <h323/h323ep.h> #include <h323/h323ep.h>
/**
* Helper class for mutex use
*
**/
class SLock
{
public:
SLock(switch_mutex_t* i_mutex) :
m_mutex(NULL)
{
assert(i_mutex);
m_mutex = i_mutex;
switch_mutex_lock(m_mutex);
}
~SLock()
{
switch_mutex_unlock(m_mutex);
}
private:
switch_mutex_t* m_mutex;
};
/** This class is OpalManager implementation /** This class is OpalManager implementation
* for FreeSWITCH OpalH323 module. * for FreeSWITCH OpalH323 module.
* All methods are inherited from base OpalManagerClass. * All methods are inherited from base OpalManagerClass.
...@@ -94,6 +123,13 @@ public: ...@@ -94,6 +123,13 @@ public:
switch_status_t io_read_video_frame(switch_core_session_t *, switch_frame_t **, int, switch_io_flag_t, int); switch_status_t io_read_video_frame(switch_core_session_t *, switch_frame_t **, int, switch_io_flag_t, int);
switch_status_t io_write_video_frame(switch_core_session_t *, switch_frame_t *, int, switch_io_flag_t, int); switch_status_t io_write_video_frame(switch_core_session_t *, switch_frame_t *, int, switch_io_flag_t, int);
/**
* Following OnIncomingConnection functions
* have been overriden for serving
* connections comming from H323 network
* They are called on receiving SETUP
*/
virtual BOOL OnIncomingConnection( virtual BOOL OnIncomingConnection(
OpalConnection & connection, ///< Connection that is calling OpalConnection & connection, ///< Connection that is calling
unsigned options, ///< options for new connection (can't use default as overrides will fail) unsigned options, ///< options for new connection (can't use default as overrides will fail)
...@@ -107,6 +143,16 @@ public: ...@@ -107,6 +143,16 @@ public:
virtual BOOL OnIncomingConnection( virtual BOOL OnIncomingConnection(
OpalConnection & connection ///< Connection that is calling OpalConnection & connection ///< Connection that is calling
); );
/**
* OnAnswerCall function is overriden for
* serving a situation where H323 driver has send
* CALL PROCEEDING message
*/
virtual OpalConnection::AnswerCallResponse OnAnswerCall(
OpalConnection &connection,
const PString &caller);
...@@ -116,6 +162,9 @@ private: ...@@ -116,6 +162,9 @@ private:
switch_core_session_t* getSessionToken(const PString &i_token); switch_core_session_t* getSessionToken(const PString &i_token);
void deleteSessionToken(const PString &i_token); void deleteSessionToken(const PString &i_token);
switch_call_cause_t causeH323ToOpal(OpalConnection::CallEndReason i_cause);
OpalConnection::CallEndReason causeOpalToH323(switch_call_cause_t i_cause);
const char *m_pModuleName; /* name of this module */ const char *m_pModuleName; /* name of this module */
bool m_isInitialized; /* true if module has been initialized properly */ bool m_isInitialized; /* true if module has been initialized properly */
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论