[asterisk-commits] chan ooh323: Fixes to work right with Cisco devices (asterisk[14])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Nov 8 04:58:30 CST 2016


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/4333 )

Change subject: chan_ooh323: Fixes to work right with Cisco devices
......................................................................


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
---
M addons/ooh323c/src/ooCalls.c
M addons/ooh323c/src/oochannels.c
M addons/ooh323c/src/ooq931.c
3 files changed, 9 insertions(+), 15 deletions(-)

Approvals:
  Anonymous Coward #1000019: Verified
  Matt Jordan: Looks good to me, approved
  Joshua Colp: Looks good to me, but someone else must approve



diff --git a/addons/ooh323c/src/ooCalls.c b/addons/ooh323c/src/ooCalls.c
index 2eefb46..26dc63e 100644
--- a/addons/ooh323c/src/ooCalls.c
+++ b/addons/ooh323c/src/ooCalls.c
@@ -224,7 +224,8 @@
       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;
diff --git a/addons/ooh323c/src/oochannels.c b/addons/ooh323c/src/oochannels.c
index 76f8422..fa63d47 100644
--- a/addons/ooh323c/src/oochannels.c
+++ b/addons/ooh323c/src/oochannels.c
@@ -679,9 +679,9 @@
     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 @@
     {
      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))
      {
diff --git a/addons/ooh323c/src/ooq931.c b/addons/ooh323c/src/ooq931.c
index cbc4afb..4d6d993 100644
--- a/addons/ooh323c/src/ooq931.c
+++ b/addons/ooh323c/src/ooq931.c
@@ -2124,9 +2124,6 @@
       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 @@
    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;
    

-- 
To view, visit https://gerrit.asterisk.org/4333
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I0b31933b062a21011dbac9a82b8bcfe345f406f6
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Alexander Anikin <may213 at yandex.ru>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>



More information about the asterisk-commits mailing list