|
@@ -60,11 +60,11 @@ ErrorCodeEnum CCounterConnectorEntity ::__OnStart(ErrorCodeEnum preOperationErro
|
|
|
m_bIsPadType = FALSE;
|
|
|
}
|
|
|
|
|
|
- m_IsStandType = TRUE;
|
|
|
+ m_IsStand2SType = TRUE;
|
|
|
|
|
|
DeviceTypeEnum eDeviceType = RvcGetDeviceType();
|
|
|
if (eStand1SPlusType != eDeviceType && eStand2sType != eDeviceType) {
|
|
|
- m_IsStandType = FALSE;
|
|
|
+ m_IsStand2SType = FALSE;
|
|
|
}
|
|
|
|
|
|
m_fsm.Init(this);
|
|
@@ -72,7 +72,7 @@ ErrorCodeEnum CCounterConnectorEntity ::__OnStart(ErrorCodeEnum preOperationErro
|
|
|
|
|
|
int i = 0;
|
|
|
|
|
|
- m_arrListener.Init(22);
|
|
|
+ m_arrListener.Init(23);
|
|
|
spFunction->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_None, Error_IgnoreAll, EVENT_MOD_CONNECT_PICKUP_CALL,NULL,false);
|
|
|
spFunction->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_None, Error_IgnoreAll, EVENT_MOD_CONNECT_HANDFREE_CALL,NULL,false);
|
|
|
spFunction->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_None, Error_IgnoreAll, EVENT_MOD_CONNECT_HANDFREE_TO_PICKUP);
|
|
@@ -95,6 +95,7 @@ ErrorCodeEnum CCounterConnectorEntity ::__OnStart(ErrorCodeEnum preOperationErro
|
|
|
spFunction->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_None, Error_IgnoreAll, LOG_EVT_UI_STARTREMOTERECORD,NULL,false);
|
|
|
spFunction->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_None, Error_IgnoreAll, LOG_EVT_UI_STOPREMOTERECORD,NULL,false);
|
|
|
spFunction->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_None, Error_IgnoreAll, LOG_EVT_UI_STARTRECORDPREVIEW,NULL,false);
|
|
|
+ spFunction->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_None, Error_IgnoreAll, EVENT_MOD_SIP_GET_VIDEO_FAILED, NULL, false);
|
|
|
|
|
|
spFunction->RegistSysVarEvent("UIState", this);
|
|
|
|
|
@@ -298,6 +299,37 @@ void CCounterConnectorEntity::HandlePickUpCallEvent()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+void CCounterConnectorEntity::HandleGetVideoFailedEvent()
|
|
|
+{
|
|
|
+ MediaService_ClientBase* pMSClient = new MediaService_ClientBase(this);
|
|
|
+
|
|
|
+ CSimpleStringA strCustomerBeing;
|
|
|
+ GetFunction()->GetSysVar("CustomerBeing", strCustomerBeing);
|
|
|
+ CSimpleStringA strCustomerHandle;
|
|
|
+ GetFunction()->GetSysVar("CustomerHandle", strCustomerHandle);
|
|
|
+ CSimpleStringA strCameraState;
|
|
|
+ GetFunction()->GetSysVar("CameraState", strCameraState);
|
|
|
+ char strmsg[MAX_PATH] = { 0 };
|
|
|
+ char strinfo[MAX_PATH] = { 0 };
|
|
|
+
|
|
|
+ if (pMSClient->Connect() != Error_Succeed){
|
|
|
+ _snprintf(strmsg, MAX_PATH, "%s", "connect mediacontroller entity failed");
|
|
|
+ pMSClient->SafeDelete();
|
|
|
+ pMSClient = NULL;
|
|
|
+
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ _snprintf(strmsg, MAX_PATH, "%s", "connect mediacontroller entity success");
|
|
|
+ pMSClient->GetFunction()->CloseSession();
|
|
|
+ pMSClient->SafeDelete();
|
|
|
+ pMSClient = NULL;
|
|
|
+ }
|
|
|
+
|
|
|
+ _snprintf(strinfo, MAX_PATH, "%s, and CustomerBeing is %s, CustomerHandle is %s, CameraState is %s.", strmsg, strCustomerBeing.GetData(), strCustomerHandle.GetData(), strCameraState.GetData());
|
|
|
+ LogWarn(Severity_Low, Error_Debug, LOG_WARN_COUNTERCONNECT_GET_VIDEO_FAILED_INFO, strinfo);
|
|
|
+}
|
|
|
+
|
|
|
ErrorCodeEnum CCounterConnectorEntity ::__OnClose(ErrorCodeEnum preOperationError)
|
|
|
{
|
|
|
if (preOperationError != Error_Succeed) {
|
|
@@ -365,10 +397,6 @@ void CCounterConnectorEntity ::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUI
|
|
|
{
|
|
|
LogEvent(Severity_Middle,EVENT_MOD_CONNECT_SLV_HANDFREECALL,"handfree call");
|
|
|
DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("界面拨号,免提呼叫");
|
|
|
-
|
|
|
- if (pszMessage && strlen(pszMessage) > 0) {
|
|
|
- LogWarn(Severity_Low, Error_Unexpect, EVENT_MOD_CONNECT_SLV_PICKUPCALL_HAS_CMD, pszMessage);
|
|
|
- }
|
|
|
if (pszMessage && strlen(pszMessage) > 0 && isdigit(pszMessage[0]))
|
|
|
{
|
|
|
char tmp[32];
|
|
@@ -561,6 +589,9 @@ void CCounterConnectorEntity ::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUI
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("offline state,ignore UI_STARTPHOTOGRAPH hangup event");
|
|
|
}
|
|
|
break;
|
|
|
+ case EVENT_MOD_SIP_GET_VIDEO_FAILED:
|
|
|
+ HandleGetVideoFailedEvent();
|
|
|
+ break;
|
|
|
|
|
|
default:
|
|
|
break;
|
|
@@ -789,7 +820,7 @@ void CCounterConnectorEntity::Handle_StartRemoteRecord(const char* pszMessage)
|
|
|
void CCounterConnectorEntity::StopRemoteRecordSpeakerAudioCapture()
|
|
|
{
|
|
|
if(DOUBLERECORD_CALLTYPE == m_fsm.m_CallingParam.nCallType){
|
|
|
- if (TRUE == m_IsStandType){
|
|
|
+ if (TRUE == m_IsStand2SType){
|
|
|
if (FALSE == m_bIsRemoteRecordStopSpeakerCapture){
|
|
|
if (Error_Succeed == m_fsm.StopSpeakerAudioCapture()){
|
|
|
m_bIsRemoteRecordStopSpeakerCapture = TRUE;
|
|
@@ -928,7 +959,7 @@ void ChannelCounterConnectorClient::OnMessage(ErrorCodeEnum Error, ChannelServic
|
|
|
if (Msg.state == eChannelState_Idle)
|
|
|
{
|
|
|
pEntity->m_fsm.m_bIsAgentControl = FALSE;
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("ChannelState is eChannelState_Idle");
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("ChannelState is eChannelState_Idle");
|
|
|
|
|
|
if (eChannelState_Connected == m_eLastState){
|
|
|
char strmsg[MAX_PATH] = {0};
|
|
@@ -944,14 +975,14 @@ void ChannelCounterConnectorClient::OnMessage(ErrorCodeEnum Error, ChannelServic
|
|
|
{
|
|
|
pEntity->m_fsm.m_bIsAgentControl = TRUE;
|
|
|
pEntity->SendCurAudioDevice();
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("ChannelState is eChannelState_Connected");
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("ChannelState is eChannelState_Connected");
|
|
|
m_uConnectTime = y2k_time_now();
|
|
|
}
|
|
|
else if (eChannelState_Connecting == Msg.state){
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("ChannelState is eChannelState_Connecting");
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("ChannelState is eChannelState_Connecting");
|
|
|
}
|
|
|
else if(eChannelState_Closing == Msg.state){
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("ChannelState is eChannelState_Closing");
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("ChannelState is eChannelState_Closing");
|
|
|
if (eChannelState_Connecting == m_eLastState){
|
|
|
LogWarn(Severity_Low, Error_Debug, LOG_WARN_COUNTERCONNECT_ASSIST_CONNECT_FAILED,"make call failed for assistant channel closed.");
|
|
|
}
|
|
@@ -972,6 +1003,7 @@ void ChannelCounterConnectorClient::OnMessage( ErrorCodeEnum Error, ChannelServi
|
|
|
|
|
|
void CCounterConnectorSession::Handle_StartCall(SpReqAnsContext<ConnectService_StartCall_Req, ConnectService_StartCall_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
ErrorCodeEnum rc = Error_Succeed;
|
|
|
m_pEntity->m_fsm.m_CallingParam.connect_ip = ctx->Req.connect_ip;
|
|
|
m_pEntity->m_fsm.m_CallingParam.connect_port = ctx->Req.connect_port;
|
|
@@ -986,6 +1018,7 @@ void CCounterConnectorSession::Handle_StartCall(SpReqAnsContext<ConnectService_S
|
|
|
|
|
|
void CCounterConnectorSession::Handle_StartCallExternal(SpReqAnsContext<ConnectService_StartCallExternal_Req, ConnectService_StartCallExternal_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
ErrorCodeEnum rc = Error_Succeed;
|
|
|
RVCCallingParam* callparam = (RVCCallingParam*)ctx->Req.CommandParam.m_pData;
|
|
|
|
|
@@ -1009,6 +1042,7 @@ void CCounterConnectorSession::Handle_StartCallExternal(SpReqAnsContext<ConnectS
|
|
|
|
|
|
void CCounterConnectorSession::Handle_StopCall(SpReqAnsContext<ConnectService_StopCall_Req, ConnectService_StopCall_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
ErrorCodeEnum rc = Error_Succeed;
|
|
|
RVCCallingParam* callparam = (RVCCallingParam*)ctx->Req.SessionParam.m_pData;
|
|
|
|
|
@@ -1030,6 +1064,7 @@ void CCounterConnectorSession::Handle_StopCall(SpReqAnsContext<ConnectService_St
|
|
|
|
|
|
void CCounterConnectorSession::Handle_GetCallRouteType(SpReqAnsContext<ConnectService_GetCallRouteType_Req, ConnectService_GetCallRouteType_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Get Call Route Type is %d.", m_pEntity->m_iRouteType);
|
|
|
ctx->Ans.RouteType = m_pEntity->m_iRouteType;
|
|
|
ctx->Answer(Error_Succeed);
|
|
@@ -1038,6 +1073,7 @@ void CCounterConnectorSession::Handle_GetCallRouteType(SpReqAnsContext<ConnectSe
|
|
|
|
|
|
void CCounterConnectorSession::Handle_SetVideoCallRouteParams(SpReqAnsContext<ConnectService_SetVideoCallRouteParams_Req, ConnectService_SetVideoCallRouteParams_Ans>::Pointer ctx)
|
|
|
{
|
|
|
+ DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
if (m_pEntity->m_iRouteType) {
|
|
|
m_pEntity->SetCallRouteParams(ctx->Req.BusinessName, ctx->Req.CallPriority);
|
|
|
ctx->Ans.ErrorCode = Error_Succeed;
|