Update to latest UniMRCP version. MRCP requests can no timeout if there is no server response.

This commit is contained in:
Christopher Rienzo committed 2011-06-16 16:25:00 +00:00
1 parent 0555b702db
commit 17099473a3
441 files changed
+17430 -17071

No files matched your search

@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* Copyright 2008-2010 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -12,10 +12,12 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: dtmfscenario.h 1474 2010-02-07 20:51:47Z achaloyan $
*/
#ifndef __DTMF_SCENARIO_H__
#define __DTMF_SCENARIO_H__
#ifndef DTMF_SCENARIO_H
#define DTMF_SCENARIO_H
/**
* @file dtmfscenario.h
@@ -72,4 +74,4 @@ inline const char* DtmfScenario::GetDigits() const
}
#endif /*__DTMF_SCENARIO_H__*/
#endif /* DTMF_SCENARIO_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* Copyright 2008-2010 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -12,10 +12,12 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: dtmfsession.h 1474 2010-02-07 20:51:47Z achaloyan $
*/
#ifndef __DTMF_SESSION_H__
#define __DTMF_SESSION_H__
#ifndef DTMF_SESSION_H
#define DTMF_SESSION_H
/**
* @file dtmfsession.h
@@ -65,4 +67,4 @@ inline const DtmfScenario* DtmfSession::GetScenario() const
return (DtmfScenario*)m_pScenario;
}
#endif /*__DTMF_SESSION_H__*/
#endif /* DTMF_SESSION_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* Copyright 2008-2010 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -12,10 +12,12 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: recogscenario.h 1474 2010-02-07 20:51:47Z achaloyan $
*/
#ifndef __RECOG_SCENARIO_H__
#define __RECOG_SCENARIO_H__
#ifndef RECOG_SCENARIO_H
#define RECOG_SCENARIO_H
/**
* @file recogscenario.h
@@ -85,4 +87,4 @@ inline bool RecogScenario::IsRecognizeEnabled() const
return m_Recognize;
}
#endif /*__RECOG_SCENARIO_H__*/
#endif /* RECOG_SCENARIO_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* Copyright 2008-2010 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -12,10 +12,12 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: recogsession.h 1587 2010-03-12 19:40:02Z achaloyan $
*/
#ifndef __RECOG_SESSION_H__
#define __RECOG_SESSION_H__
#ifndef RECOG_SESSION_H
#define RECOG_SESSION_H
/**
* @file recogsession.h
@@ -37,6 +39,7 @@ public:
protected:
/* ============================ MANIPULATORS =============================== */
virtual bool Start();
virtual bool Stop();
RecogChannel* CreateRecogChannel();
bool StartRecognition(mrcp_channel_t* pMrcpChannel);
@@ -69,4 +72,4 @@ inline const RecogScenario* RecogSession::GetScenario() const
return (RecogScenario*)m_pScenario;
}
#endif /*__RECOG_SESSION_H__*/
#endif /* RECOG_SESSION_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* Copyright 2008-2010 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -12,10 +12,12 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: recorderscenario.h 1474 2010-02-07 20:51:47Z achaloyan $
*/
#ifndef __RECORDER_SCENARIO_H__
#define __RECORDER_SCENARIO_H__
#ifndef RECORDER_SCENARIO_H
#define RECORDER_SCENARIO_H
/**
* @file recorderscenario.h
@@ -63,4 +65,4 @@ inline bool RecorderScenario::IsRecordEnabled() const
return m_Record;
}
#endif /*__RECORDER_SCENARIO_H__*/
#endif /* RECORDER_SCENARIO_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* Copyright 2008-2010 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -12,10 +12,12 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: recordersession.h 1474 2010-02-07 20:51:47Z achaloyan $
*/
#ifndef __RECORDER_SESSION_H__
#define __RECORDER_SESSION_H__
#ifndef RECORDER_SESSION_H
#define RECORDER_SESSION_H
/**
* @file recordersession.h
@@ -65,4 +67,4 @@ inline const RecorderScenario* RecorderSession::GetScenario() const
return (RecorderScenario*)m_pScenario;
}
#endif /*__RECORDER_SESSION_H__*/
#endif /* RECORDER_SESSION_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* Copyright 2008-2010 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -12,10 +12,12 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: setparamscenario.h 1474 2010-02-07 20:51:47Z achaloyan $
*/
#ifndef __SETPARAM_SCENARIO_H__
#define __SETPARAM_SCENARIO_H__
#ifndef SETPARAM_SCENARIO_H
#define SETPARAM_SCENARIO_H
/**
* @file setaparamscenario.h
@@ -44,4 +46,4 @@ protected:
/* ============================ INLINE METHODS ============================= */
#endif /*__SETPARAM_SCENARIO_H__*/
#endif /* SETPARAM_SCENARIO_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* Copyright 2008-2010 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -12,10 +12,12 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: setparamsession.h 1474 2010-02-07 20:51:47Z achaloyan $
*/
#ifndef __SETPARAM_SESSION_H__
#define __SETPARAM_SESSION_H__
#ifndef SETPARAM_SESSION_H
#define SETPARAM_SESSION_H
/**
* @file setparamsession.h
@@ -73,4 +75,4 @@ inline const SetParamScenario* SetParamSession::GetScenario() const
return (SetParamScenario*)m_pScenario;
}
#endif /*__SETPARAM_SESSION_H__*/
#endif /* SETPARAM_SESSION_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* Copyright 2008-2010 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -12,10 +12,12 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: synthscenario.h 1474 2010-02-07 20:51:47Z achaloyan $
*/
#ifndef __SYNTH_SCENARIO_H__
#define __SYNTH_SCENARIO_H__
#ifndef SYNTH_SCENARIO_H
#define SYNTH_SCENARIO_H
/**
* @file synthscenario.h
@@ -71,4 +73,4 @@ inline bool SynthScenario::IsSpeakEnabled() const
return m_Speak;
}
#endif /*__SYNTH_SCENARIO_H__*/
#endif /* SYNTH_SCENARIO_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* Copyright 2008-2010 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -12,10 +12,12 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: synthsession.h 1586 2010-03-12 19:39:02Z achaloyan $
*/
#ifndef __SYNTH_SESSION_H__
#define __SYNTH_SESSION_H__
#ifndef SYNTH_SESSION_H
#define SYNTH_SESSION_H
/**
* @file synthsession.h
@@ -37,6 +39,7 @@ public:
protected:
/* ============================ MANIPULATORS =============================== */
virtual bool Start();
virtual bool Stop();
SynthChannel* CreateSynthChannel();
@@ -50,7 +53,7 @@ protected:
/* ============================ ACCESSORS ================================== */
const SynthScenario* GetScenario() const;
private:
/* ============================ DATA ======================================= */
SynthChannel* m_pSynthChannel;
@@ -63,4 +66,4 @@ inline const SynthScenario* SynthSession::GetScenario() const
return (SynthScenario*)m_pScenario;
}
#endif /*__SYNTH_SESSION_H__*/
#endif /* SYNTH_SESSION_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* Copyright 2008-2010 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -12,10 +12,12 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: umcconsole.h 1525 2010-02-16 14:58:56Z achaloyan $
*/
#ifndef __UMC_CONSOLE_H__
#define __UMC_CONSOLE_H__
#ifndef UMC_CONSOLE_H
#define UMC_CONSOLE_H
/**
* @file umcconsole.h
@@ -47,12 +49,12 @@ private:
struct UmcOptions
{
const char* m_RootDirPath;
apt_log_priority_e m_LogPriority;
apt_log_output_e m_LogOutput;
const char* m_LogPriority;
const char* m_LogOutput;
};
UmcOptions m_Options;
UmcFramework* m_pFramework;
};
#endif /*__UMC_CONSOLE_H__*/
#endif /* UMC_CONSOLE_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* Copyright 2008-2010 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -12,10 +12,12 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: umcframework.h 1585 2010-03-12 19:12:05Z achaloyan $
*/
#ifndef __UMC_FRAMEWORK_H__
#define __UMC_FRAMEWORK_H__
#ifndef UMC_FRAMEWORK_H
#define UMC_FRAMEWORK_H
/**
* @file umcframework.h
@@ -42,6 +44,7 @@ public:
void Destroy();
void RunSession(const char* pScenarioName, const char* pProfileName);
void StopSession(const char* id);
void KillSession(const char* id);
void ShowScenarios();
@@ -61,6 +64,7 @@ protected:
void DestroyScenarios();
bool ProcessRunRequest(const char* pScenarioName, const char* pProfileName);
void ProcessStopRequest(const char* id);
void ProcessKillRequest(const char* id);
void ProcessShowScenarios();
void ProcessShowSessions();
@@ -89,4 +93,4 @@ private:
apr_hash_t* m_pSessionTable;
};
#endif /*__UMC_FRAMEWORK_H__*/
#endif /* UMC_FRAMEWORK_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* Copyright 2008-2010 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -12,10 +12,12 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: umcscenario.h 1474 2010-02-07 20:51:47Z achaloyan $
*/
#ifndef __UMC_SCENARIO_H__
#define __UMC_SCENARIO_H__
#ifndef UMC_SCENARIO_H
#define UMC_SCENARIO_H
/**
* @file umcscenario.h
@@ -117,4 +119,4 @@ inline bool UmcScenario::IsDiscoveryEnabled() const
}
#endif /*__UMC_SCENARIO_H__*/
#endif /* UMC_SCENARIO_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* Copyright 2008-2010 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -12,10 +12,12 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: umcsession.h 1585 2010-03-12 19:12:05Z achaloyan $
*/
#ifndef __UMC_SESSION_H__
#define __UMC_SESSION_H__
#ifndef UMC_SESSION_H
#define UMC_SESSION_H
/**
* @file umcsession.h
@@ -35,6 +37,7 @@ public:
/* ============================ MANIPULATORS =============================== */
virtual bool Run();
virtual bool Stop();
virtual bool Terminate();
void SetMrcpProfile(const char* pMrcpProfile);
@@ -82,6 +85,7 @@ protected:
/* ============================ ACCESSORS ================================== */
apr_pool_t* GetSessionPool() const;
const char* GetMrcpSessionId() const;
mrcp_message_t* GetMrcpMessage() const;
/* ============================ DATA ======================================= */
const UmcScenario* m_pScenario;
@@ -92,6 +96,7 @@ private:
/* ============================ DATA ======================================= */
mrcp_application_t* m_pMrcpApplication;
mrcp_session_t* m_pMrcpSession;
mrcp_message_t* m_pMrcpMessage; /* last message sent */
bool m_Running;
bool m_Terminating;
};
@@ -118,4 +123,9 @@ inline void UmcSession::SetMrcpProfile(const char* pMrcpProfile)
m_pMrcpProfile = pMrcpProfile;
}
#endif /*__UMC_SESSION_H__*/
inline mrcp_message_t* UmcSession::GetMrcpMessage() const
{
return m_pMrcpMessage;
}
#endif /* UMC_SESSION_H */
@@ -0,0 +1,75 @@
/*
* Copyright 2008-2010 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: verifierscenario.h 1775 2010-08-26 18:23:38Z achaloyan $
*/
#ifndef VERIFIER_SCENARIO_H
#define VERIFIER_SCENARIO_H
/**
* @file verifierscenario.h
* @brief Verifier Scenario
*/
#include "umcscenario.h"
class VerifierScenario : public UmcScenario
{
public:
/* ============================ CREATORS =================================== */
VerifierScenario();
virtual ~VerifierScenario();
/* ============================ MANIPULATORS =============================== */
virtual void Destroy();
virtual UmcSession* CreateSession();
/* ============================ ACCESSORS ================================== */
const char* GetRepositoryURI() const;
const char* GetVerificationMode() const;
const char* GetVoiceprintIdentifier() const;
/* ============================ INQUIRIES ================================== */
protected:
/* ============================ MANIPULATORS =============================== */
virtual bool LoadElement(const apr_xml_elem* pElem, apr_pool_t* pool);
bool LoadVerify(const apr_xml_elem* pElem, apr_pool_t* pool);
/* ============================ DATA ======================================= */
const char* m_RepositoryURI;
const char* m_VerificationMode;
const char* m_VoiceprintIdentifier;
};
/* ============================ INLINE METHODS ============================= */
inline const char* VerifierScenario::GetRepositoryURI() const
{
return m_RepositoryURI;
}
inline const char* VerifierScenario::GetVerificationMode() const
{
return m_VerificationMode;
}
inline const char* VerifierScenario::GetVoiceprintIdentifier() const
{
return m_VoiceprintIdentifier;
}
#endif /* VERIFIER_SCENARIO_H */
@@ -0,0 +1,74 @@
/*
* Copyright 2008-2010 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: verifiersession.h 1776 2010-08-27 16:36:38Z achaloyan $
*/
#ifndef VERIFIER_SESSION_H
#define VERIFIER_SESSION_H
/**
* @file verifiersession.h
* @brief Verifier Session
*/
#include "umcsession.h"
class VerifierScenario;
struct VerifierChannel;
class VerifierSession : public UmcSession
{
public:
/* ============================ CREATORS =================================== */
VerifierSession(const VerifierScenario* pScenario);
virtual ~VerifierSession();
protected:
/* ============================ MANIPULATORS =============================== */
virtual bool Start();
virtual bool Stop();
VerifierChannel* CreateVerifierChannel();
bool StartVerification(mrcp_channel_t* pMrcpChannel);
mrcp_message_t* CreateStartSessionRequest(mrcp_channel_t* pMrcpChannel);
mrcp_message_t* CreateEndSessionRequest(mrcp_channel_t* pMrcpChannel);
mrcp_message_t* CreateVerificationRequest(mrcp_channel_t* pMrcpChannel);
FILE* GetAudioIn(const mpf_codec_descriptor_t* pDescriptor, apr_pool_t* pool) const;
/* ============================ HANDLERS =================================== */
virtual bool OnSessionTerminate(mrcp_sig_status_code_e status);
virtual bool OnChannelAdd(mrcp_channel_t* channel, mrcp_sig_status_code_e status);
virtual bool OnMessageReceive(mrcp_channel_t* channel, mrcp_message_t* message);
/* ============================ ACCESSORS ================================== */
const VerifierScenario* GetScenario() const;
private:
/* ============================ DATA ======================================= */
VerifierChannel* m_pVerifierChannel;
const char* m_ContentId;
};
/* ============================ INLINE METHODS ============================= */
inline const VerifierScenario* VerifierSession::GetScenario() const
{
return (VerifierScenario*)m_pScenario;
}
#endif /* VERIFIER_SESSION_H */