VOS_VOID TAF_CALL_ProcOrigReq(SPM_IMSA_CALL_ORIG_REQ_STRU *pstOrigReq) { MN_CALL_APP_REQ_MSG_STRU *pstDstMsg = VOS_NULL_PTR; /* 申请消息内存 */ pstDstMsg = (MN_CALL_APP_REQ_MSG_STRU *)PS_ALLOC_MSG_WITH_HEADER_LEN( WUEPS_PID_TAF, sizeof(MN_CALL_APP_REQ_MSG_STRU)); if (VOS_NULL_PTR == pstDstMsg) { TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_CALL_ProcOrigReq: ERROR:Memory Alloc is fail!"); return; } PS_MEM_SET(pstDstMsg, 0, sizeof(MN_CALL_APP_REQ_MSG_STRU)); /* 首先转换消息类型到call可处理的内部消息 */ TAF_CALL_ConvertOrigReqMsg(pstOrigReq, pstDstMsg); /* 调用call模块Orig Req消息处理函数 */ MN_CALL_CallOrigReqProc(pstDstMsg->clientId, pstDstMsg->opId, pstDstMsg->callId, (MN_CALL_ORIG_PARAM_STRU*)&(pstDstMsg->unParm)); /* 释放分配的内存空间 */ PS_FREE_MSG(WUEPS_PID_TAF, pstDstMsg); }
VOS_VOID MN_CALL_ProcAppReqMsg( const VOS_VOID *pstMsg ) { MN_CALL_APP_REQ_MSG_STRU *pstCallMsg; pstCallMsg = (MN_CALL_APP_REQ_MSG_STRU*)pstMsg; MN_NORM_LOG1("MN_CALL_ProcAppReqMsg: enAppReq:", (VOS_INT32)pstCallMsg->enReq); /* 根据消息中的应用请求类型,将消息交给相应的请求处理函数处理 */ /*回放工程恢复全局变量*/ #ifdef __PS_WIN32_RECUR__ if ( VOS_TRUE == NAS_CALL_RestoreContextData((struct MsgCB*)pstMsg)) { return; } #endif switch (pstCallMsg->enReq) { case MN_CALL_APP_ORIG_REQ: /*PC回放导出全局变量使用*/ #ifndef __PS_WIN32_RECUR__ NAS_CALL_SndOutsideContextData(); #endif MN_CALL_CallOrigReqProc(pstCallMsg->clientId, pstCallMsg->opId, pstCallMsg->callId, (MN_CALL_ORIG_PARAM_STRU*)&pstCallMsg->unParm); break; case MN_CALL_APP_END_REQ: MN_CALL_CallEndReqProc(pstCallMsg->clientId, pstCallMsg->opId, pstCallMsg->callId, (MN_CALL_END_PARAM_STRU*)&pstCallMsg->unParm); break; case MN_CALL_APP_ANSWER_REQ: MN_CALL_CallAnswerReqProc(pstCallMsg->clientId, pstCallMsg->opId, pstCallMsg->callId, (MN_CALL_ANS_PARAM_STRU*)&pstCallMsg->unParm); break; case MN_CALL_APP_START_DTMF_REQ: TAF_CALL_RcvStartDtmfReq((struct MsgCB *)pstCallMsg); break; case MN_CALL_APP_STOP_DTMF_REQ: TAF_CALL_RcvStopDtmfReq((struct MsgCB *)pstCallMsg); break; case MN_CALL_APP_SUPS_CMD_REQ: MN_CALL_CallSupsCmdReqProc((struct MsgCB *)pstCallMsg); break; case MN_CALL_APP_GET_INFO_REQ: MN_CALL_CallInfoReqProc(pstCallMsg->clientId, pstCallMsg->opId); break; case MN_CALL_APP_GET_CDUR_REQ: MN_CALL_GetCdur(pstCallMsg->clientId, pstCallMsg->opId, pstCallMsg->callId); break; case MN_CALL_APP_SET_UUSINFO_REQ: MN_CALL_SetUus1Info(pstCallMsg->clientId, pstCallMsg->opId, (MN_CALL_UUS1_PARAM_STRU*)&pstCallMsg->unParm); break; case MN_CALL_APP_QRY_UUSINFO_REQ: MN_CALL_QryUus1Info(pstCallMsg->clientId, pstCallMsg->opId); break; case MN_CALL_APP_SET_ALS_REQ: MN_CALL_SetAls(pstCallMsg->clientId, pstCallMsg->opId, (MN_CALL_SET_ALS_PARAM_STRU*)&pstCallMsg->unParm); break; case MN_CALL_APP_QRY_ALS_REQ: MN_CALL_QryAls(pstCallMsg->clientId, pstCallMsg->opId); break; /*AT获取CALLINFO的同步API消息处理*/ case ID_TAFAGENT_MN_GET_CALL_INFO_REQ: MN_CALL_RcvTafAgentGetCallInfo(); break; case MN_CALL_APP_CUSTOM_ECC_NUM_REQ: MN_CALL_RcvTafEccNumReq((MN_CALL_APP_CUSTOM_ECC_NUM_REQ_STRU*)&pstCallMsg->unParm); break; case MN_CALL_APP_CLPR_GET_REQ: MN_CALL_RcvAtClprGetReq(pstCallMsg); break; case MN_CALL_APP_SET_CSSN_REQ: MN_CALL_RcvAtCssnSetReq(pstCallMsg->clientId, pstCallMsg->opId, (MN_CALL_SET_CSSN_REQ_STRU*)&pstCallMsg->unParm); break; case MN_CALL_APP_XLEMA_REQ: MN_CALL_RcvAtXlemaReq(pstCallMsg); break; default: MN_WARN_LOG("MN_CALL_ProcAppReqMsg:Invalid Msg Name"); break; } }