mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
chan_ooh323: Fixes to work right with Cisco devices
Changed output packets queue processing algo to one read-one write instead of all read-all send Remove h.245 tunneling parameter from ReleaseComplete packet ASTERISK-24400 #close Reported by: Dmitry Melekhov Tested by: Dmitry Melekhov Change-Id: I0b31933b062a21011dbac9a82b8bcfe345f406f6
This commit is contained in:
@@ -224,7 +224,8 @@ int ooEndCall(OOH323CallData *call)
|
||||
call->callState = OO_CALL_CLEARED;
|
||||
}
|
||||
|
||||
if(call->callState == OO_CALL_CLEARED || call->callState == OO_CALL_CLEAR_RELEASESENT)
|
||||
if(call->callState == OO_CALL_CLEARED || ((strcmp(call->callType, "incoming")) &&
|
||||
call->callState == OO_CALL_CLEAR_RELEASESENT))
|
||||
{
|
||||
ooCleanCall(call);
|
||||
call->callState = OO_CALL_REMOVED;
|
||||
|
@@ -679,9 +679,9 @@ int ooProcessCallFDSETsAndTimers
|
||||
if (0 != call->pH245Channel && 0 != call->pH245Channel->sock)
|
||||
{
|
||||
if(ooPDWrite(pfds, nfds, call->pH245Channel->sock)) {
|
||||
while (call->pH245Channel->outQueue.count>0) {
|
||||
if (call->pH245Channel->outQueue.count>0) {
|
||||
if (ooSendMsg(call, OOH245MSG) != OO_OK)
|
||||
break;
|
||||
OOTRACEERR1("Error in sending h245 message\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -699,26 +699,24 @@ int ooProcessCallFDSETsAndTimers
|
||||
{
|
||||
if(ooPDWrite(pfds, nfds, call->pH225Channel->sock))
|
||||
{
|
||||
while (call->pH225Channel->outQueue.count>0)
|
||||
if (call->pH225Channel->outQueue.count>0)
|
||||
{
|
||||
OOTRACEDBGC3("Sending H225 message (%s, %s)\n",
|
||||
call->callType, call->callToken);
|
||||
if (ooSendMsg(call, OOQ931MSG) != OO_OK)
|
||||
break;
|
||||
OOTRACEERR1("Error in sending h225 message\n");
|
||||
}
|
||||
if(call->pH245Channel &&
|
||||
call->pH245Channel->outQueue.count>0 &&
|
||||
OO_TESTFLAG (call->flags, OO_M_TUNNELING)) {
|
||||
while (call->pH245Channel->outQueue.count>0) {
|
||||
OOTRACEDBGC3("H245 message needs to be tunneled. "
|
||||
"(%s, %s)\n", call->callType,
|
||||
call->callToken);
|
||||
if (ooSendMsg(call, OOH245MSG) != OO_OK)
|
||||
break;
|
||||
OOTRACEERR1("Error in sending h245 message\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(ooTimerNextTimeout(&call->timerList, &toNext))
|
||||
{
|
||||
|
@@ -2124,9 +2124,6 @@ int ooSendReleaseComplete(OOH323CallData *call)
|
||||
return OO_FAILED;
|
||||
}
|
||||
memset(releaseComplete, 0, sizeof(H225ReleaseComplete_UUIE));
|
||||
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_releaseComplete;
|
||||
|
||||
@@ -2143,8 +2140,6 @@ int ooSendReleaseComplete(OOH323CallData *call)
|
||||
releaseComplete->reason.t = h225ReasonCode;
|
||||
|
||||
/* Add user-user ie */
|
||||
q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=TRUE;
|
||||
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_releaseComplete;
|
||||
|
||||
|
Reference in New Issue
Block a user