[asterisk-addons-commits] trunk r220 - in /trunk/asterisk-ooh323c: ./ ooh323c/src/ src/

asterisk-addons-commits at lists.digium.com asterisk-addons-commits at lists.digium.com
Fri Jun 9 15:39:00 MST 2006


Author: objsys
Date: Fri Jun  9 17:38:59 2006
New Revision: 220

URL: http://svn.digium.com/view/asterisk-addons?rev=220&view=rev
Log:
Added MediaWaitForConnect configurable

Modified:
    trunk/asterisk-ooh323c/config.h
    trunk/asterisk-ooh323c/h323.conf.sample
    trunk/asterisk-ooh323c/ooh323c/src/ooCalls.c
    trunk/asterisk-ooh323c/ooh323c/src/ooCalls.h
    trunk/asterisk-ooh323c/ooh323c/src/ooh323ep.c
    trunk/asterisk-ooh323c/ooh323c/src/ooh323ep.h
    trunk/asterisk-ooh323c/ooh323c/src/ooq931.c
    trunk/asterisk-ooh323c/ooh323c/src/ootypes.h
    trunk/asterisk-ooh323c/src/chan_h323.c

Modified: trunk/asterisk-ooh323c/config.h
URL: http://svn.digium.com/view/asterisk-addons/trunk/asterisk-ooh323c/config.h?rev=220&r1=219&r2=220&view=diff
==============================================================================
--- trunk/asterisk-ooh323c/config.h (original)
+++ trunk/asterisk-ooh323c/config.h Fri Jun  9 17:38:59 2006
@@ -108,13 +108,13 @@
 #define PACKAGE_NAME "ASTERISK-OOH323C"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "ASTERISK-OOH323C 0.4"
+#define PACKAGE_STRING "ASTERISK-OOH323C 0.5"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "asterisk-ooh323c"
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "0.4"
+#define PACKAGE_VERSION "0.5"
 
 /* Define to the type of arg 1 for `select'. */
 #define SELECT_TYPE_ARG1 int
@@ -135,7 +135,7 @@
 /* #undef TM_IN_SYS_TIME */
 
 /* Version number of package */
-#define VERSION "0.4"
+#define VERSION "0.5"
 
 /* Define to empty if `const' does not conform to ANSI C. */
 /* #undef const */

Modified: trunk/asterisk-ooh323c/h323.conf.sample
URL: http://svn.digium.com/view/asterisk-addons/trunk/asterisk-ooh323c/h323.conf.sample?rev=220&r1=219&r2=220&view=diff
==============================================================================
--- trunk/asterisk-ooh323c/h323.conf.sample (original)
+++ trunk/asterisk-ooh323c/h323.conf.sample Fri Jun  9 17:38:59 2006
@@ -52,6 +52,9 @@
 ;faststart=no
 ;h245tunneling=no
 
+;Whether media wait for connect
+;Default - No
+;mediawaitforconnect=yes
 
 ;H323-ID to be used for asterisk server
 ;Default - Asterisk PBX

Modified: trunk/asterisk-ooh323c/ooh323c/src/ooCalls.c
URL: http://svn.digium.com/view/asterisk-addons/trunk/asterisk-ooh323c/ooh323c/src/ooCalls.c?rev=220&r1=219&r2=220&view=diff
==============================================================================
--- trunk/asterisk-ooh323c/ooh323c/src/ooCalls.c (original)
+++ trunk/asterisk-ooh323c/ooh323c/src/ooCalls.c Fri Jun  9 17:38:59 2006
@@ -78,6 +78,8 @@
    if (OO_TESTFLAG(gH323ep.flags, OO_M_FASTSTART))
       OO_SETFLAG (call->flags, OO_M_FASTSTART);
 
+   if (OO_TESTFLAG(gH323ep.flags, OO_M_MEDIAWAITFORCONN))
+      OO_SETFLAG (call->flags, OO_M_MEDIAWAITFORCONN);
    
    call->callState = OO_CALL_CREATED;
    call->callEndReason = OO_REASON_UNKNOWN;

Modified: trunk/asterisk-ooh323c/ooh323c/src/ooCalls.h
URL: http://svn.digium.com/view/asterisk-addons/trunk/asterisk-ooh323c/ooh323c/src/ooCalls.h?rev=220&r1=219&r2=220&view=diff
==============================================================================
--- trunk/asterisk-ooh323c/ooh323c/src/ooCalls.h (original)
+++ trunk/asterisk-ooh323c/ooh323c/src/ooCalls.h Fri Jun  9 17:38:59 2006
@@ -49,6 +49,7 @@
 #define OO_M_AUTOANSWER         0x00100000
 #define OO_M_TUNNELING	        0x08000000
 #define OO_M_FASTSTARTANSWERED  0x04000000
+#define OO_M_MEDIAWAITFORCONN   0x03000000 
 #define OO_M_FASTSTART	        0x02000000 
 #define OO_M_DISABLEGK          0x01000000
 #define OO_M_MANUALRINGBACK     0x10000000

Modified: trunk/asterisk-ooh323c/ooh323c/src/ooh323ep.c
URL: http://svn.digium.com/view/asterisk-addons/trunk/asterisk-ooh323c/ooh323c/src/ooh323ep.c?rev=220&r1=219&r2=220&view=diff
==============================================================================
--- trunk/asterisk-ooh323c/ooh323c/src/ooh323ep.c (original)
+++ trunk/asterisk-ooh323c/ooh323c/src/ooh323ep.c Fri Jun  9 17:38:59 2006
@@ -431,6 +431,18 @@
    return OO_OK;
 }
 
+int ooH323EpEnableMediaWaitForConnect(void)
+{
+   OO_SETFLAG(gH323ep.flags, OO_M_MEDIAWAITFORCONN);
+   return OO_OK;
+}
+
+int ooH323EpDisableMediaWaitForConnect(void)
+{
+   OO_CLRFLAG(gH323ep.flags, OO_M_MEDIAWAITFORCONN);
+   return OO_OK;
+}
+
 int ooH323EpEnableFastStart(void)
 {
    OO_SETFLAG(gH323ep.flags, OO_M_FASTSTART);
@@ -539,6 +551,14 @@
    }
    else{
       OOTRACEINFO1("\tH245 Tunneling - enabled\n");
+   }
+
+   if(!OO_TESTFLAG(gH323ep.flags, OO_M_MEDIAWAITFORCONN))
+   {
+      OOTRACEINFO1("\tMediaWaitForConnect - disabled\n");
+   }
+   else{
+      OOTRACEINFO1("\tMediaWaitForConnect - enabled\n");
    }
 
    if(OO_TESTFLAG(gH323ep.flags, OO_M_AUTOANSWER))

Modified: trunk/asterisk-ooh323c/ooh323c/src/ooh323ep.h
URL: http://svn.digium.com/view/asterisk-addons/trunk/asterisk-ooh323c/ooh323c/src/ooh323ep.h?rev=220&r1=219&r2=220&view=diff
==============================================================================
--- trunk/asterisk-ooh323c/ooh323c/src/ooh323ep.h (original)
+++ trunk/asterisk-ooh323c/ooh323c/src/ooh323ep.h Fri Jun  9 17:38:59 2006
@@ -349,6 +349,20 @@
  * @return          OO_OK on success, OO_FAILED on failure
  */
 EXTERN int ooH323EpDisableManualRingback(void);
+
+/**
+ * This function is used to enable MediaWaitForConnect.
+ *
+ * @return            OO_OK, on success. OO_FAILED, on failure.
+ */
+EXTERN int ooH323EpDisableMediaWaitForConnect(void);
+
+/**
+ * This function is used to disable MediaWaitForConnect.
+ *
+ * @return            OO_OK, on success. OO_FAILED, on failure.
+ */
+EXTERN int ooH323EpDisableMediaWaitForConnect(void);
 
 /**
  * This function is used to enable faststart.

Modified: trunk/asterisk-ooh323c/ooh323c/src/ooq931.c
URL: http://svn.digium.com/view/asterisk-addons/trunk/asterisk-ooh323c/ooh323c/src/ooq931.c?rev=220&r1=219&r2=220&view=diff
==============================================================================
--- trunk/asterisk-ooh323c/ooh323c/src/ooq931.c (original)
+++ trunk/asterisk-ooh323c/ooh323c/src/ooq931.c Fri Jun  9 17:38:59 2006
@@ -2317,7 +2317,13 @@
                                call->callIdentifier.guid.numocts);
    
    setup->m.mediaWaitForConnectPresent = TRUE;
-   setup->mediaWaitForConnect = FALSE;
+   if(OO_TESTFLAG(call->flags, OO_M_MEDIAWAITFORCONN)) {
+      setup->mediaWaitForConnect = TRUE;
+   }
+   else {
+      setup->mediaWaitForConnect = FALSE;
+   }
+   //setup->mediaWaitForConnect = FALSE;
    setup->m.canOverlapSendPresent = TRUE;
    setup->canOverlapSend = FALSE;
 

Modified: trunk/asterisk-ooh323c/ooh323c/src/ootypes.h
URL: http://svn.digium.com/view/asterisk-addons/trunk/asterisk-ooh323c/ooh323c/src/ootypes.h?rev=220&r1=219&r2=220&view=diff
==============================================================================
--- trunk/asterisk-ooh323c/ooh323c/src/ootypes.h (original)
+++ trunk/asterisk-ooh323c/ooh323c/src/ootypes.h Fri Jun  9 17:38:59 2006
@@ -61,7 +61,7 @@
 
 
 
-#define OOH323C_VERSION "v0.8.1"
+#define OOH323C_VERSION "v0.8.2"
 
 #ifndef EXTERN
 #ifdef MAKE_DLL

Modified: trunk/asterisk-ooh323c/src/chan_h323.c
URL: http://svn.digium.com/view/asterisk-addons/trunk/asterisk-ooh323c/src/chan_h323.c?rev=220&r1=219&r2=220&view=diff
==============================================================================
--- trunk/asterisk-ooh323c/src/chan_h323.c (original)
+++ trunk/asterisk-ooh323c/src/chan_h323.c Fri Jun  9 17:38:59 2006
@@ -207,6 +207,7 @@
 static int  gIsGateway = 0;
 static int  gFastStart = 1;
 static int  gTunneling = 1;
+static int  gMediaWaitForConnect = 0;
 static int  gTOS = 0;
 static int  gRTPTimeout = 60;
 static char gAccountcode[80] = DEFAULT_H323ACCNT;
@@ -1790,6 +1791,9 @@
       else if (!strcasecmp(v->name, "faststart")) {
          gFastStart = ast_true(v->value);
       } 
+      else if (!strcasecmp(v->name, "mediawaitforconnect")) {
+         gMediaWaitForConnect = ast_true(v->value);
+      } 
       else if (!strcasecmp(v->name, "h245tunneling")) {
          gTunneling = ast_true(v->value);
       }
@@ -2188,6 +2192,8 @@
    ast_cli(fd, "%-15s%s\n", "FastStart", gFastStart?"yes":"no");
    ast_cli(fd, "%-15s%s\n", "Tunneling", gTunneling?"yes":"no");
    ast_cli(fd, "%-15s%s\n", "CallerId", gCallerID);
+   ast_cli(fd, "%-15s%s\n", "MediaWaitForConnect", 
+      gMediaWaitForConnect?"yes":"no");
 
    if(gRasGkMode == RasNoGatekeeper)
       sprintf(value, "%s", "No Gatekeeper");
@@ -2397,6 +2403,11 @@
       ast_mutex_unlock(&peerl.lock);
    
 
+      if(gMediaWaitForConnect)
+         ooH323EpEnableMediaWaitForConnect();
+      else 
+         ooH323EpDisableMediaWaitForConnect();
+
       /* Fast start and tunneling options */
       if(!gFastStart)
          ooH323EpDisableFastStart();



More information about the asterisk-addons-commits mailing list