Index: addons/ooh323c/src/ooh323.c =================================================================== --- addons/ooh323c/src/ooh323.c (revision 343275) +++ addons/ooh323c/src/ooh323.c (working copy) @@ -1792,6 +1792,7 @@ int ooHandleH2250Message(OOH323CallData *call, Q93 case Q931StatusEnquiryMsg: OOTRACEINFO3("H.225 Status Inquiry message Received (%s, %s)\n", call->callType, call->callToken); + ooSendStatus(call); ooFreeQ931Message(call->msgctxt, q931Msg); break; case Q931SetupAckMsg: Index: addons/ooh323c/src/ooq931.c =================================================================== --- addons/ooh323c/src/ooq931.c (revision 343275) +++ addons/ooh323c/src/ooq931.c (working copy) @@ -1703,6 +1703,72 @@ int ooSendStartH245Facility(OOH323CallData *call) return ret; } +/* + +*/ + +int ooSendStatus(OOH323CallData *call) +{ + int ret; + H225Status_UUIE *status; + Q931Message *q931msg=NULL; + /* OOCTXT *pctxt = &gH323ep.msgctxt; */ + OOCTXT *pctxt = call->msgctxt; + + OOTRACEDBGC3("Building StatusMsg (%s, %s)\n", call->callType, + call->callToken); + ret = ooCreateQ931Message(pctxt, &q931msg, Q931StatusMsg); + if(ret != OO_OK) + { + OOTRACEERR1("Error: In allocating memory for - H225 Status " + "message\n"); + return OO_FAILED; + } + + q931msg->callReference = call->callReference; + + q931msg->userInfo = (H225H323_UserInformation*)memAllocZ(pctxt, + sizeof(H225H323_UserInformation)); + if(!q931msg->userInfo) + { + OOTRACEERR1("ERROR:Memory - ooSendStatus - userInfo\n"); + return OO_FAILED; + } + q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1; + q931msg->userInfo->h323_uu_pdu.h245Tunneling = + OO_TESTFLAG(call->flags, OO_M_TUNNELING); + q931msg->userInfo->h323_uu_pdu.h323_message_body.t = + T_H225H323_UU_PDU_h323_message_body_status; + + status = (H225Status_UUIE*)memAllocZ(pctxt, + sizeof(H225Status_UUIE)); + if(!status) + { + OOTRACEERR1("ERROR:Memory - ooSendStatus \n"); + return OO_FAILED; + } + q931msg->userInfo->h323_uu_pdu.h323_message_body.u.status = status; + + status->callIdentifier.guid.numocts = + call->callIdentifier.guid.numocts; + memcpy(status->callIdentifier.guid.data, + call->callIdentifier.guid.data, + call->callIdentifier.guid.numocts); + status->protocolIdentifier = gProtocolID; + + OOTRACEDBGA3("Built Status (%s, %s)\n", call->callType, + call->callToken); + ret = ooSendH225Msg(call, q931msg); + if(ret != OO_OK) + { + OOTRACEERR3("Error:Failed to enqueue Status message to outbound queue.(%s, %s)\n", call->callType, call->callToken); + } + + /* memReset(&gH323ep.msgctxt); */ + memReset(call->msgctxt); + + return ret; +} int ooSendReleaseComplete(OOH323CallData *call) { int ret; Index: addons/ooh323c/src/ooq931.h =================================================================== --- addons/ooh323c/src/ooq931.h (revision 343275) +++ addons/ooh323c/src/ooq931.h (working copy) @@ -469,6 +469,8 @@ EXTERN int ooSendAlerting(struct OOH323CallData *c EXTERN int ooSendProgress(struct OOH323CallData *call); +EXTERN int ooSendStatus(struct OOH323CallData *call); + /** * This function is invoked to send Facility message. *