[asterisk-commits] may: trunk r299715 - /trunk/addons/ooh323c/src/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Dec 25 16:35:12 UTC 2010


Author: may
Date: Sat Dec 25 10:35:09 2010
New Revision: 299715

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=299715
Log:
Change order of sending TCS and MSD packets

Change order of sending Terminal Capability Set and MasterSlave
Determination packets, MSD send when TCS exchange procedure is done
(we send tcs ack to remote and we have remote tcs ack already
or we receive tcs ack from remote and we have send our tcs ack to
remote  already). Some endpoints can work in this sequence only,
i suggest they can't work with both (tcs and msd) exchange procedures
simultaneously.

Also changed StartH245 facility message sending. It send on
incoming calls only due to some endpoints can't proccess properly
this facility messages on their incoming calls.

(closes issue #18433)
Reported by: MrHanMan
Patches:
      tcs-msd-h245-3.patch uploaded by may213 (license 454)
Tested by: MrHanMan, may213

Modified:
    trunk/addons/ooh323c/src/oochannels.c
    trunk/addons/ooh323c/src/ooh245.c
    trunk/addons/ooh323c/src/ooh323.c
    trunk/addons/ooh323c/src/ooq931.c

Modified: trunk/addons/ooh323c/src/oochannels.c
URL: http://svnview.digium.com/svn/asterisk/trunk/addons/ooh323c/src/oochannels.c?view=diff&rev=299715&r1=299714&r2=299715
==============================================================================
--- trunk/addons/ooh323c/src/oochannels.c (original)
+++ trunk/addons/ooh323c/src/oochannels.c Sat Dec 25 10:35:09 2010
@@ -144,13 +144,6 @@
          {
             OOTRACEERR3("ERROR:Sending Terminal capability message (%s, %s)\n",
                          call->callType, call->callToken);
-            return ret;
-         }
-         ret = ooSendMasterSlaveDetermination(call);
-         if(ret != OO_OK)
-         {
-            OOTRACEERR3("ERROR:Sending Master-slave determination message "
-                        "(%s, %s)\n", call->callType, call->callToken);
             return ret;
          }
       }
@@ -489,13 +482,6 @@
                    call->callType, call->callToken);
       return ret;
    }
-   ret = ooSendMasterSlaveDetermination(call);
-   if(ret != OO_OK)
-   {
-      OOTRACEERR3("ERROR:Sending Master-slave determination message "
-                  "(%s, %s)\n", call->callType, call->callToken);
-      return ret;
-   }   
    return OO_OK;
 }
 

Modified: trunk/addons/ooh323c/src/ooh245.c
URL: http://svnview.digium.com/svn/asterisk/trunk/addons/ooh323c/src/ooh245.c?view=diff&rev=299715&r1=299714&r2=299715
==============================================================================
--- trunk/addons/ooh323c/src/ooh245.c (original)
+++ trunk/addons/ooh323c/src/ooh245.c Sat Dec 25 10:35:09 2010
@@ -2102,10 +2102,20 @@
 
 int ooOnReceivedTerminalCapabilitySetAck(OOH323CallData* call)
 {
+   int ret = OO_OK;
    call->localTermCapState = OO_LocalTermCapSetAckRecvd;
    if(call->remoteTermCapState != OO_RemoteTermCapSetAckSent)
       return OO_OK;
    
+   if(call->masterSlaveState == OO_MasterSlave_Idle) {
+      ret = ooSendMasterSlaveDetermination(call);
+      if(ret != OO_OK) {
+                OOTRACEERR3("ERROR:Sending Master-slave determination message "
+                            "(%s, %s)\n", call->callType, call->callToken);
+                return ret;
+      }
+   } 
+
    if((call->masterSlaveState == OO_MasterSlave_Master ||
        call->masterSlaveState == OO_MasterSlave_Slave) &&
        (call->msAckStatus == OO_msAck_remoteReceived))
@@ -3127,6 +3137,16 @@
       call->localTermCapState  != OO_LocalTermCapSetAckRecvd)
       return OO_OK;
 
+   if(call->masterSlaveState == OO_MasterSlave_Idle) {
+      ret = ooSendMasterSlaveDetermination(call);
+      if(ret != OO_OK) {
+                OOTRACEERR3("ERROR:Sending Master-slave determination message "
+                            "(%s, %s)\n", call->callType, call->callToken);
+                return ret;
+      }
+   } 
+
+
    /* Check MasterSlave procedure has finished */
    if(call->masterSlaveState != OO_MasterSlave_Master &&
       call->masterSlaveState != OO_MasterSlave_Slave)

Modified: trunk/addons/ooh323c/src/ooh323.c
URL: http://svnview.digium.com/svn/asterisk/trunk/addons/ooh323c/src/ooh323.c?view=diff&rev=299715&r1=299714&r2=299715
==============================================================================
--- trunk/addons/ooh323c/src/ooh323.c (original)
+++ trunk/addons/ooh323c/src/ooh323.c Sat Dec 25 10:35:09 2010
@@ -1040,10 +1040,6 @@
          return OO_FAILED;
        }
       }
-   } else if (!call->pH245Channel && !call->h245listener) {
-	ret = ooSendStartH245Facility(call);
-	if (ret != OO_OK)
-		return ret;
    }
 
    return OO_OK;
@@ -1274,10 +1270,6 @@
          return OO_FAILED;
        }
       }
-   } else if (!call->pH245Channel && !call->h245listener) {
-	ret = ooSendStartH245Facility(call);
-	if (ret != OO_OK)
-		return ret;
    }
 
    return OO_OK;
@@ -1571,16 +1563,6 @@
                          call->callType, call->callToken);
             return ret;
          }
-      }
-      if(call->masterSlaveState == OO_MasterSlave_Idle)
-      {
-         ret = ooSendMasterSlaveDetermination(call);
-         if(ret != OO_OK)
-         {
-            OOTRACEERR3("ERROR:Sending Master-slave determination message "
-                     "(%s, %s)\n", call->callType, call->callToken);
-            return ret;
-         }   
       }
 
    }
@@ -1986,12 +1968,17 @@
    OO_CLRFLAG (call->flags, OO_M_TUNNELING);
 
    /*Establish an H.245 connection */
-   ret = ooCreateH245Connection(call);
-   if(ret != OO_OK)
-   {
+   if (!call->pH245Channel) {
+    ret = ooCreateH245Connection(call);
+    if(ret != OO_OK)
+    {
       OOTRACEERR3("ERROR: Failed to establish an H.245 connection with remote"
                   " endpoint (%s, %s)\n", call->callType, call->callToken);
       return ret;
+    }
+   } else {
+     OOTRACEINFO3("INFO: H.245 connection already established with remote"
+                  " endpoint (%s, %s)\n", call->callType, call->callToken);
    }
    return OO_OK;
 }

Modified: trunk/addons/ooh323c/src/ooq931.c
URL: http://svnview.digium.com/svn/asterisk/trunk/addons/ooh323c/src/ooq931.c?view=diff&rev=299715&r1=299714&r2=299715
==============================================================================
--- trunk/addons/ooh323c/src/ooq931.c (original)
+++ trunk/addons/ooh323c/src/ooq931.c Sat Dec 25 10:35:09 2010
@@ -1213,14 +1213,6 @@
 			return ret;
 		}
 	}
-	if(call->masterSlaveState == OO_MasterSlave_Idle) {
-		ret = ooSendMasterSlaveDetermination(call);
-		if(ret != OO_OK) {
-			OOTRACEERR3("ERROR:Sending Master-slave determination message "
-				"(%s, %s)\n", call->callType, call->callToken);
-			return ret;
-		}
-	}
 
 	return OO_OK;
 }
@@ -1592,6 +1584,9 @@
    {
       OOTRACEERR3("Error: Failed to enqueue Alerting message to outbound queue. (%s, %s)\n", call->callType, call->callToken);
    }
+
+   if (!OO_TESTFLAG(call->flags, OO_M_TUNNELING) && call->h245listener)
+      ooSendStartH245Facility(call);
 
    ooSendTCSandMSD(call);
    memReset (call->msgctxt);




More information about the asterisk-commits mailing list