[asterisk-addons-commits] branch 1.2 r201 - in /branches/1.2/asterisk-ooh323c: ./ ooh323c/src/ src/

asterisk-addons-commits at lists.digium.com asterisk-addons-commits at lists.digium.com
Thu Mar 2 15:21:23 MST 2006


Author: objsys
Date: Thu Mar  2 16:21:17 2006
New Revision: 201

URL: http://svn.digium.com/view/asterisk-addons?rev=201&view=rev
Log:
trunk version changes

Modified:
    branches/1.2/asterisk-ooh323c/ChangeLog
    branches/1.2/asterisk-ooh323c/README
    branches/1.2/asterisk-ooh323c/ooh323c/src/eventHandler.c
    branches/1.2/asterisk-ooh323c/ooh323c/src/ooCalls.c
    branches/1.2/asterisk-ooh323c/ooh323c/src/ooCalls.h
    branches/1.2/asterisk-ooh323c/ooh323c/src/ooCapability.c
    branches/1.2/asterisk-ooh323c/ooh323c/src/ooCapability.h
    branches/1.2/asterisk-ooh323c/ooh323c/src/ooCmdChannel.c
    branches/1.2/asterisk-ooh323c/ooh323c/src/ooGkClient.c
    branches/1.2/asterisk-ooh323c/ooh323c/src/ooGkClient.h
    branches/1.2/asterisk-ooh323c/ooh323c/src/ooLogChan.c
    branches/1.2/asterisk-ooh323c/ooh323c/src/ooSocket.c
    branches/1.2/asterisk-ooh323c/ooh323c/src/ooSocket.h
    branches/1.2/asterisk-ooh323c/ooh323c/src/ooStackCmds.c
    branches/1.2/asterisk-ooh323c/ooh323c/src/ooTimer.c
    branches/1.2/asterisk-ooh323c/ooh323c/src/ooTimer.h
    branches/1.2/asterisk-ooh323c/ooh323c/src/ooUtils.c
    branches/1.2/asterisk-ooh323c/ooh323c/src/ooUtils.h
    branches/1.2/asterisk-ooh323c/ooh323c/src/oochannels.c
    branches/1.2/asterisk-ooh323c/ooh323c/src/ooh245.c
    branches/1.2/asterisk-ooh323c/ooh323c/src/ooh245.h
    branches/1.2/asterisk-ooh323c/ooh323c/src/ooh323.c
    branches/1.2/asterisk-ooh323c/ooh323c/src/ooh323ep.c
    branches/1.2/asterisk-ooh323c/ooh323c/src/ooh323ep.h
    branches/1.2/asterisk-ooh323c/ooh323c/src/ooports.c
    branches/1.2/asterisk-ooh323c/ooh323c/src/ooq931.c
    branches/1.2/asterisk-ooh323c/ooh323c/src/ootrace.c
    branches/1.2/asterisk-ooh323c/ooh323c/src/ootypes.h
    branches/1.2/asterisk-ooh323c/ooh323c/src/printHandler.c
    branches/1.2/asterisk-ooh323c/ooh323c/src/printHandler.h
    branches/1.2/asterisk-ooh323c/src/chan_h323.c
    branches/1.2/asterisk-ooh323c/src/ooh323cDriver.c
    branches/1.2/asterisk-ooh323c/src/ooh323cDriver.h

Modified: branches/1.2/asterisk-ooh323c/ChangeLog
URL: http://svn.digium.com/view/asterisk-addons/branches/1.2/asterisk-ooh323c/ChangeLog?rev=201&r1=200&r2=201&view=diff
==============================================================================
--- branches/1.2/asterisk-ooh323c/ChangeLog (original)
+++ branches/1.2/asterisk-ooh323c/ChangeLog Thu Mar  2 16:21:17 2006
@@ -1,3 +1,10 @@
+Release 0.4
+* Fixed 4 deadlocks conditions in onAlerting, onReceivedDigit and 
+  onCallExstablished funtions
+* Added Thread/Mutex debugging option, for debug build
+* Fixed bug causing dialed digits alias being set as a char string
+
+
 Release 0.2
 Added support for gsm, g729a, g723.1
 Added call end cause conversion logic from H323 cause to asterisk cause

Modified: branches/1.2/asterisk-ooh323c/README
URL: http://svn.digium.com/view/asterisk-addons/branches/1.2/asterisk-ooh323c/README?rev=201&r1=200&r2=201&view=diff
==============================================================================
--- branches/1.2/asterisk-ooh323c/README (original)
+++ branches/1.2/asterisk-ooh323c/README Thu Mar  2 16:21:17 2006
@@ -8,11 +8,11 @@
  H.323 stack from Objective Systems(www.obj-sys.com/open), to be used with 
  asterisk, an open source IP-PBX solution, from Digium, Inc.(www.asterisk.org)
 
- Capabilities supported: ulaw, gsm, g729a, g723.1, rfc2833
+ Capabilities supported: ulaw, gsm, g729, g729a, g723.1, rfc2833
 
  Package Contents:
 
-    asterisk-ooh323c-0.3
+    asterisk-ooh323c-0.4
     |
     |-src [H323 channel driver code]
     |
@@ -20,54 +20,67 @@
 
 
  How to build:
- 1. To build this package successfully, you have to have latest cvs version of 
-    asterisk installed on your system.
-       To get asterisk sources from cvs:
-       cvs -d:pserver:anoncvs at cvs.digium.com:/usr/cvsroot login
-       CVS Password:anoncvs
+ -------------
+ 1. If you hadn't installed asterisk yet, To build this package successfully, 
+    you have to have latest version of asterisk installed on your system. 
+    You can skip to step 2, if you have already installed the asterisk.
 
-       cvs -d:pserver:anoncvs at cvs.digium.com:/usr/cvsroot co asterisk
+      Following precedure help you download and install asterisk
 
-       To install asterisk.(You will have to be in super user mode for this)
-       >cd asterisk
-       >make install
-       >make samples
+      To get latest asterisk sources from svn:
+      >svn checkout http://svn.digium.com/svn/asterisk/trunk asterisk
 
- 2. To build asterisk-ooh323c-0.3
-      >cd asterisk-oh323c-0.3
+      To install asterisk.(You will have to be in 'super user' mode for this)
+      >cd asterisk
+      >make install
+      >make samples
+
+ 2. To build asterisk-ooh323c addons
+
+      To update or if you hadn't downloaded the asterisk-ooh323c channel driver
+      code, you can do so using following command (To get the latest 
+      asterisk-addons source from svn):
+      >svn checkout http://svn.digium.com/svn/asterisk-addons/trunk asterisk-addons
+
+      To build & install:
+      >cd asterisk-addons/asterisk-ooh323c
       >./configure
       >make
+
+      For debugging purpose, instead of "make", run "make debug"
+
+      The library will be generated at 
+      asterisk-addons/asterisk-ooh323c/.libs/libchan_h323.so.1.0.1 
  
- 3. To install chan_h323.so in /usr/libs/modules/ change to super user mode
-    and then run:
-
+      To install libchan_h323.so in /usr/libs/modules/ directory, change to 
+      'super user' mode and then run:
       >make install
 
- 4. Open h323.conf.sample in asterisk-ooh323c-0.3 directory. Under [general] 
-    you will see global configuration setting. Modify ip addresses of asterisk 
+ 3. Open h323.conf.sample in asterisk-ooh323c-0.4 directory. Under [general] 
+    you will see global configuration setting. Modify IP addresses of asterisk 
     server "bindaddr" to match your configuration.
 
- 5. To install sample h323.conf in /etc/asterisk
+ 4. To install sample h323.conf in /etc/asterisk
       >make sample
 
- 6. Now run asterisk as
-    /usr/sbin/asterisk -vvvc
+ 5. Now run asterisk as
+      >/usr/sbin/asterisk -vvvc
 
- 7. From asterisk console
+ 6. From asterisk console
     To check whether H323 channel is registered properly
        CLI>show channeltypes
 
     To see all the defined H323 users.
-       CLI>h323 show users
+       CLI>ooh323 show users
    
     To see details of a specific user
-       CLI>h323 show user myuser1
+       CLI>ooh323 show user myuser1
 
     To see all the defined peers
-       CLI>h323 show peers
+       CLI>ooh323 show peers
     
     To see details of a specific peer
-       CLI>h323 show peer mypeer1
+       CLI>ooh323 show peer mypeer1
 
 
 Getting Started with some simple examples:
@@ -76,7 +89,7 @@
       CLI>stop now
 
  Now to run tests, you will have to copy extensions.conf.sample in 
- asterisk-ooh323c-0.3 directory to /etc/asterisk as extensions.conf. Make
+ asterisk-ooh323c-0.4 directory to /etc/asterisk as extensions.conf. Make
  sure to save a backup copy of your existing extensions.conf. Now restart
  the pbx as follows:
       >/usr/sbin/asterisk -vvvc
@@ -136,7 +149,7 @@
 
  6. Check details of peer for ip/port
     
-     CLI>h323 show peer mypeer1
+     CLI>ooh323 show peer mypeer1
 
  7. Now use phone1 to make a call to asterisk at extension 101 as follows.
 

Modified: branches/1.2/asterisk-ooh323c/ooh323c/src/eventHandler.c
URL: http://svn.digium.com/view/asterisk-addons/branches/1.2/asterisk-ooh323c/ooh323c/src/eventHandler.c?rev=201&r1=200&r2=201&view=diff
==============================================================================
--- branches/1.2/asterisk-ooh323c/ooh323c/src/eventHandler.c (original)
+++ branches/1.2/asterisk-ooh323c/ooh323c/src/eventHandler.c Thu Mar  2 16:21:17 2006
@@ -62,7 +62,7 @@
 }
 
 void invokeBitStrValue (OOCTXT* pctxt, ASN1UINT numbits, 
-			const ASN1OCTET* data)
+                        const ASN1OCTET* data)
 {
    if (0 != pctxt->pEventHandler) {
       pctxt->pEventHandler->bitStrValue (numbits, data);
@@ -70,7 +70,7 @@
 }
 
 void invokeOctStrValue (OOCTXT* pctxt, ASN1UINT numocts, 
-			const ASN1OCTET* data)
+                        const ASN1OCTET* data)
 {
    if (0 != pctxt->pEventHandler) {
       pctxt->pEventHandler->octStrValue (numocts, data);
@@ -85,7 +85,7 @@
 }
 
 void invokeCharStr16BitValue (OOCTXT* pctxt, ASN1UINT nchars, 
-			      ASN116BITCHAR* data)
+                              ASN116BITCHAR* data)
 {
    if (0 != pctxt->pEventHandler) {
       pctxt->pEventHandler->charStr16BitValue (nchars, data);
@@ -114,7 +114,7 @@
 }
 
 void invokeOpenTypeValue (OOCTXT* pctxt, ASN1UINT numocts, 
-			  const ASN1OCTET* data)
+                          const ASN1OCTET* data)
 {
    if (0 != pctxt->pEventHandler) {
       pctxt->pEventHandler->openTypeValue (numocts, data);

Modified: branches/1.2/asterisk-ooh323c/ooh323c/src/ooCalls.c
URL: http://svn.digium.com/view/asterisk-addons/branches/1.2/asterisk-ooh323c/ooh323c/src/ooCalls.c?rev=201&r1=200&r2=201&view=diff
==============================================================================
--- branches/1.2/asterisk-ooh323c/ooh323c/src/ooCalls.c (original)
+++ branches/1.2/asterisk-ooh323c/ooh323c/src/ooCalls.c Thu Mar  2 16:21:17 2006
@@ -52,11 +52,13 @@
    sprintf(call->callToken, "%s", callToken);
    sprintf(call->callType, "%s", type);
    call->callReference = 0;
-   if(gH323ep.callerid){
+   if(gH323ep.callerid) {
      strncpy(call->ourCallerId, gH323ep.callerid, sizeof(call->ourCallerId)-1);
      call->ourCallerId[sizeof(call->ourCallerId)-1] = '\0';
-   }else
+   }
+   else {
       call->ourCallerId[0] = '\0';
+   }
    
    memset(&call->callIdentifier, 0, sizeof(H225CallIdentifier));
    memset(&call->confIdentifier, 0, sizeof(H225ConferenceIdentifier));
@@ -84,17 +86,20 @@
    if(!strcmp(call->callType, "incoming"))
    {
       call->callingPartyNumber = NULL;
-   }else{      
+   }
+   else{      
       if(ooUtilsIsStrEmpty(gH323ep.callingPartyNumber))
       {
          call->callingPartyNumber = NULL;
-      }else{
+      }
+      else{
          call->callingPartyNumber = (char*) memAlloc(call->pctxt, 
                                          strlen(gH323ep.callingPartyNumber)+1);
          if(call->callingPartyNumber)
          {
             strcpy(call->callingPartyNumber, gH323ep.callingPartyNumber);
-         }else{
+         }
+         else{
             OOTRACEERR3("Error:Memory - ooCreateCall - callingPartyNumber"
                         ".(%s, %s)\n", call->callType, call->callToken);
             freeContext(pctxt);
@@ -199,7 +204,8 @@
    if(!call->pH225Channel || call->pH225Channel->sock ==0)
    {
       call->callState = OO_CALL_CLEARED;
-   }else{
+   }
+   else{
       if(!OO_TESTFLAG(call->flags, OO_M_RELEASE_BUILT))   
       {
          if(call->callState == OO_CALL_CLEAR || 
@@ -243,7 +249,7 @@
    OOCTXT *pctxt;
 
    OOTRACEWARN4 ("Cleaning Call (%s, %s)- reason:%s\n", 
-		 call->callType, call->callToken, 
+                 call->callType, call->callToken, 
                  ooGetReasonCodeText (call->callEndReason));
 
    /* First clean all the logical channels, if not already cleaned. */
@@ -299,7 +305,8 @@
          OOTRACEERR3("Error:Failed to forward call (%s, %s)\n", call->callType,
                      call->callToken);
       }
-   }else {
+   }
+   else {
       if(gH323ep.h323Callbacks.onCallCleared)
          gH323ep.h323Callbacks.onCallCleared(call);
    }
@@ -328,7 +335,8 @@
    if(call->callingPartyNumber)
    {
      strcpy(call->callingPartyNumber, number);
-   }else{
+   }
+   else{
       OOTRACEERR3("Error:Memory - ooCallSetCallingPartyNumber - "
                   "callingPartyNumber.(%s, %s)\n", call->callType, 
                   call->callToken);
@@ -366,7 +374,8 @@
    if(call->calledPartyNumber)
    {
      strcpy(call->calledPartyNumber, number);
-   }else{
+   }
+   else{
       OOTRACEERR3("Error:Memory - ooCallSetCalledPartyNumber - "
                   "calledPartyNumber.(%s, %s)\n", call->callType, 
                   call->callToken);
@@ -424,7 +433,8 @@
    {
       psNewAlias->next = call->ourAliases;
       call->ourAliases = psNewAlias;
-   }else {
+   }
+   else {
      psNewAlias->next = call->remoteAliases;
      call->remoteAliases = psNewAlias;
    }
@@ -686,7 +696,7 @@
          if(call->masterSlaveState == OO_MasterSlave_Master)
             sessionID = call->nextSessionID++;
          else{
-	   OOTRACEDBGC4("Session id for %s channel of type audio has to be "
+            OOTRACEDBGC4("Session id for %s channel of type audio has to be "
                         "provided by remote.(%s, %s)\n", dir, call->callType, 
                          call->callToken);
             sessionID = 0; /* Will be assigned by remote */
@@ -770,6 +780,7 @@
       "OO_CALL_WAITING_ADMISSION",
       "OO_CALL_CONNECTING",
       "OO_CALL_CONNECTED",
+      "OO_CALL_PAUSED",
       "OO_CALL_CLEAR",
       "OO_CALL_CLEAR_RELEASERECVD",
       "OO_CALL_CLEAR_RELEASESENT",

Modified: branches/1.2/asterisk-ooh323c/ooh323c/src/ooCalls.h
URL: http://svn.digium.com/view/asterisk-addons/branches/1.2/asterisk-ooh323c/ooh323c/src/ooCalls.h?rev=201&r1=200&r2=201&view=diff
==============================================================================
--- branches/1.2/asterisk-ooh323c/ooh323c/src/ooCalls.h (original)
+++ branches/1.2/asterisk-ooh323c/ooh323c/src/ooCalls.h Thu Mar  2 16:21:17 2006
@@ -62,6 +62,7 @@
    OO_CALL_WAITING_ADMISSION,     /*!< Call waiting for admission by GK */
    OO_CALL_CONNECTING,            /*!< Call in process of connecting */
    OO_CALL_CONNECTED,             /*!< Call currently connected. */
+   OO_CALL_PAUSED,                /*!< Call Paused for hold/transfer. */
    OO_CALL_CLEAR,                 /*!< Call marked for clearing */
    OO_CALL_CLEAR_RELEASERECVD,    /*!< Release command received. */
    OO_CALL_CLEAR_RELEASESENT,     /*!< Release sent */
@@ -73,6 +74,7 @@
  */
 typedef enum {
    OO_H245SESSION_IDLE,
+   OO_H245SESSION_PAUSED,
    OO_H245SESSION_ACTIVE,
    OO_H245SESSION_ENDSENT, 
    OO_H245SESSION_ENDRECVD,
@@ -111,9 +113,9 @@
  * a particular call.
  */
 typedef struct OOH323Channel {
-   OOSOCKET	sock;      /*!< Socket connection for the channel */
-   int		port;      /*!< Port assigned to the channel */
-   DList	outQueue;  /*!< Output message queue */
+   OOSOCKET sock;      /*!< Socket connection for the channel */
+   int      port;      /*!< Port assigned to the channel */
+   DList    outQueue;  /*!< Output message queue */
 } OOH323Channel;
 
 /**
@@ -142,8 +144,8 @@
    OOMediaInfo          *mediaInfo;
    OOCallFwdData        *pCallFwdData;
    char                 localIP[20];/* Local IP address */
-   OOH323Channel*	pH225Channel;
-   OOH323Channel*	pH245Channel;
+   OOH323Channel*       pH225Channel;
+   OOH323Channel*       pH245Channel;
    OOSOCKET             *h245listener;
    int                  *h245listenport;
    char                 remoteIP[20];/* Remote IP address */
@@ -170,7 +172,7 @@
    int                  logicalChanNoMax;
    int                  logicalChanNoCur;
    unsigned             nextSessionID; /* Note by default 1 is audio session, 2 is video and 3 is data, from 3 onwards master decides*/
-   DList		timerList;
+   DList                timerList;
    ASN1UINT             msdRetries;
    void                 *usrData; /*!<User can set this to user specific data*/
    struct OOH323CallData* next;
@@ -530,7 +532,7 @@
                                   cb_StartReceiveChannel startReceiveChannel,
                                   cb_StartTransmitChannel startTransmitChannel,
                                   cb_StopReceiveChannel stopReceiveChannel,
-				  cb_StopTransmitChannel stopTransmitChannel);
+                                  cb_StopTransmitChannel stopTransmitChannel);
 
 
 

Modified: branches/1.2/asterisk-ooh323c/ooh323c/src/ooCapability.c
URL: http://svn.digium.com/view/asterisk-addons/branches/1.2/asterisk-ooh323c/ooh323c/src/ooCapability.c?rev=201&r1=200&r2=201&view=diff
==============================================================================
--- branches/1.2/asterisk-ooh323c/ooh323c/src/ooCapability.c (original)
+++ branches/1.2/asterisk-ooh323c/ooh323c/src/ooCapability.c Thu Mar  2 16:21:17 2006
@@ -30,7 +30,8 @@
    {
       gH323ep.dtmfmode |= OO_CAP_DTMF_RFC2833;
       OOTRACEINFO1("Enabled RFC2833 DTMF capability for end-point\n");
-   }else{
+   }
+   else{
       call->dtmfmode |= OO_CAP_DTMF_RFC2833;
       OOTRACEINFO3("Enabled RFC2833 DTMF capability for (%s, %s) \n", 
                    call->callType, call->callToken);
@@ -50,7 +51,8 @@
    if(!call){
       gH323ep.dtmfmode ^= OO_CAP_DTMF_RFC2833;
       OOTRACEINFO1("Disabled RFC2833 DTMF capability for end-point\n");
-   }else{
+   }
+   else{
       call->dtmfmode ^= OO_CAP_DTMF_RFC2833;
       OOTRACEINFO3("Disabled RFC2833 DTMF capability for (%s, %s)\n", 
                     call->callType, call->callToken);
@@ -64,7 +66,8 @@
    if(!call){
       gH323ep.dtmfmode |= OO_CAP_DTMF_H245_alphanumeric;
       OOTRACEINFO1("Dtmf mode set to H.245(alphanumeric) for endpoint\n");
-   }else {
+   }
+   else {
       call->dtmfmode |= OO_CAP_DTMF_H245_alphanumeric;
       OOTRACEINFO3("Dtmf mode set to H.245(alphanumeric) for (%s, %s)\n", 
                     call->callType, call->callToken);
@@ -77,7 +80,8 @@
    if(!call){
       gH323ep.dtmfmode ^= OO_CAP_DTMF_H245_alphanumeric;
       OOTRACEINFO1("Dtmf mode H.245(alphanumeric) disabled for endpoint\n");
-   }else {
+   }
+   else {
       call->dtmfmode ^= OO_CAP_DTMF_H245_alphanumeric;
       OOTRACEINFO3("Dtmf mode H.245(alphanumeric) disabled for (%s, %s)\n", 
                     call->callType, call->callToken);
@@ -90,7 +94,8 @@
    if(!call){
       gH323ep.dtmfmode |= OO_CAP_DTMF_H245_signal;
       OOTRACEINFO1("Dtmf mode set to H.245(signal) for endpoint\n");
-   }else {
+   }
+   else {
       call->dtmfmode |= OO_CAP_DTMF_H245_signal;
       OOTRACEINFO3("Dtmf mode set to H.245(signal) for (%s, %s)\n", 
                     call->callType, call->callToken);
@@ -103,7 +108,8 @@
    if(!call){
       gH323ep.dtmfmode ^= OO_CAP_DTMF_H245_signal;
       OOTRACEINFO1("Dtmf mode H.245(signal) disabled for endpoint\n");
-   }else {
+   }
+   else {
       call->dtmfmode ^= OO_CAP_DTMF_H245_signal;
       OOTRACEINFO3("Dtmf mode H.245(signal) disabled for (%s, %s)\n", 
                     call->callType, call->callToken);
@@ -116,7 +122,8 @@
    if(!call){
       gH323ep.dtmfmode |= OO_CAP_DTMF_Q931;
       OOTRACEINFO1("Dtmf mode set to Q.931(keypad) for the endpoint\n");
-   }else {
+   }
+   else {
       call->dtmfmode |= OO_CAP_DTMF_Q931;
       OOTRACEINFO3("Dtmf mode set to Q.931(keypad) for the call (%s, %s)\n", 
                     call->callType, call->callToken);
@@ -129,7 +136,8 @@
    if(!call){
       gH323ep.dtmfmode ^= OO_CAP_DTMF_Q931;
       OOTRACEINFO1("Dtmf mode Q.931(keypad) disabled for the endpoint\n");
-   }else {
+   }
+   else {
       call->dtmfmode ^= OO_CAP_DTMF_Q931;
       OOTRACEINFO3("Dtmf mode Q.931(keypad) disabled for the call (%s, %s)\n", 
                     call->callType, call->callToken);
@@ -280,7 +288,8 @@
    {
       epCap->dir = OORX;
       epCap->dir |= OOTX;
-   }else
+   }
+   else
       epCap->dir = dir;
    
    epCap->cap = OO_H263VIDEO;
@@ -305,18 +314,20 @@
       }
       ooAppendCapToCapPrefs(NULL, cap);
       gH323ep.noOfCaps++;
-   }else{
+   }
+   else{
       if(remote)
       {
          /*Add as remote capability */
          if(!call->remoteCaps)
             call->remoteCaps = epCap;
          else{
-	    cur = call->remoteCaps;
+            cur = call->remoteCaps;
             while(cur->next) cur = cur->next;
             cur->next = epCap;
          }
-     }else{
+     }
+     else{
         /*Add as our capability */
         OOTRACEDBGC4("Adding call specific H263 video capability %s. "
                      "(%s, %s)\n", pictureType, call->callType, 
@@ -326,7 +337,7 @@
            ooResetCapPrefs(call);
         }
         else{
-	   cur = call->ourCaps;
+           cur = call->ourCaps;
            while(cur->next) cur = cur->next;
            cur->next = epCap;
         }
@@ -357,7 +368,7 @@
    params = (OOCapParams*) memAlloc(pctxt, sizeof(OOCapParams));
    if(!epCap || !params)
    {
-      OOTRACEERR1("Error:Memory - ooCapabilityAddSimpleCapability - "
+      OOTRACEERR1("ERROR: Memory - ooCapabilityAddSimpleCapability - "
                   "epCap/params\n");
       return OO_FAILED;
    }
@@ -371,12 +382,13 @@
    else
       params->silenceSuppression = FALSE; /* Set to false for g711 and g729*/
 
-   if(dir & OORXANDTX)
-   {
+   if(dir & OORXANDTX) {
       epCap->dir = OORX;
       epCap->dir |= OOTX;
-   }else
+   }
+   else {
       epCap->dir = dir;
+   }
    
    epCap->cap = cap;
    epCap->capType = OO_CAP_TYPE_AUDIO;
@@ -388,11 +400,13 @@
    epCap->next = NULL;
 
    if(!call)
-   {/*Add as local capability */
+   {
+      /* Add as local capability */
       OOTRACEDBGC2("Adding endpoint capability %s. \n", 
                      ooGetCapTypeText(epCap->cap));
-      if(!gH323ep.myCaps)
+      if(!gH323ep.myCaps) {
          gH323ep.myCaps = epCap;
+      }
       else{
          cur = gH323ep.myCaps;
          while(cur->next) cur = cur->next;
@@ -400,33 +414,36 @@
       }
       ooAppendCapToCapPrefs(NULL, cap);
       gH323ep.noOfCaps++;
-   }else{
+   }
+   else{
       if(remote)
       {
-         /*Add as remote capability */
-         if(!call->remoteCaps)
+         /* Add as remote capability */
+         if(!call->remoteCaps) {
             call->remoteCaps = epCap;
+         }
          else{
-	    cur = call->remoteCaps;
+            cur = call->remoteCaps;
             while(cur->next) cur = cur->next;
             cur->next = epCap;
          }
-     }else{
-        /*Add as our capability */
-        OOTRACEDBGC4("Adding call specific capability %s. (%s, %s)\n", 
-                     ooGetCapTypeText(epCap->cap), call->callType, 
-                     call->callToken);
-        if(!call->ourCaps){
-           call->ourCaps = epCap;
-           ooResetCapPrefs(call);
-        }
-        else{
-	   cur = call->ourCaps;
-           while(cur->next) cur = cur->next;
-           cur->next = epCap;
-        }
-        ooAppendCapToCapPrefs(call, cap);
-     }
+      }
+      else{
+         /* Add as our capability */
+         OOTRACEDBGC4("Adding call specific capability %s. (%s, %s)\n", 
+                      ooGetCapTypeText(epCap->cap), call->callType, 
+                      call->callToken);
+         if(!call->ourCaps){
+            call->ourCaps = epCap;
+            ooResetCapPrefs(call);
+         }
+         else{
+            cur = call->ourCaps;
+            while(cur->next) cur = cur->next;
+            cur->next = epCap;
+         }
+         ooAppendCapToCapPrefs(call, cap);
+      }
    }
            
    return OO_OK;
@@ -468,7 +485,8 @@
    {
       epCap->dir = OORX;
       epCap->dir |= OOTX;
-   }else
+   }
+   else
       epCap->dir = dir;
 
    epCap->cap = cap;
@@ -492,18 +510,20 @@
       }
       ooAppendCapToCapPrefs(NULL, cap);
       gH323ep.noOfCaps++;
-   }else{
+   }
+   else{
       if(remote)
       {
          /*Add as remote capability */
          if(!call->remoteCaps)
             call->remoteCaps = epCap;
          else{
-	    cur = call->remoteCaps;
+            cur = call->remoteCaps;
             while(cur->next) cur = cur->next;
             cur->next = epCap;
          }
-      }else{
+      }
+      else{
          OOTRACEDBGC4("Adding call specific capability %s. (%s, %s)\n", 
                      ooGetCapTypeText(epCap->cap), call->callType, 
                      call->callToken);
@@ -513,7 +533,7 @@
             ooResetCapPrefs(call);
          }
          else{
-	    cur = call->ourCaps;
+            cur = call->ourCaps;
             while(cur->next) cur = cur->next;
             cur->next = epCap;
          }
@@ -558,7 +578,7 @@
    case OO_EXTELEMVIDEO:
    default:
       OOTRACEERR2("ERROR: Don't know how to create video capability %s\n",
-		  ooGetCapTypeText(epCap->cap));
+                  ooGetCapTypeText(epCap->cap));
    }
    return NULL;
 }
@@ -597,7 +617,7 @@
       return ooCapabilityCreateGSMFullRateCapability(epCap, pctxt, dir);
    default:
       OOTRACEERR2("ERROR: Don't know how to create audio capability %d\n",
-		  epCap->cap);
+                  epCap->cap);
    }
    return NULL;
 }
@@ -691,24 +711,23 @@
    pVideo->u.h263VideoCapability = pH263Cap;
 
 
-   if(params->picFormat ==  OO_PICFORMAT_SQCIF)
-   {
+   if(params->picFormat ==  OO_PICFORMAT_SQCIF) {
       pH263Cap->m.sqcifMPIPresent = TRUE;
       pH263Cap->sqcifMPI = params->MPI;
-   }else if(params->picFormat == OO_PICFORMAT_QCIF)
-   {
+   }
+   else if(params->picFormat == OO_PICFORMAT_QCIF) {
       pH263Cap->m.qcifMPIPresent = TRUE;
       pH263Cap->qcifMPI = params->MPI;
-   }else if(params->picFormat == OO_PICFORMAT_CIF)
-   {
+   }
+   else if(params->picFormat == OO_PICFORMAT_CIF) {
       pH263Cap->m.cifMPIPresent = TRUE;
       pH263Cap->cifMPI = params->MPI;
-   }else if(params->picFormat == OO_PICFORMAT_CIF4)
-   {
+   }
+   else if(params->picFormat == OO_PICFORMAT_CIF4) {
       pH263Cap->m.cif4MPIPresent  = TRUE;
       pH263Cap->cif4MPI = params->MPI;
-   }else if(params->picFormat == OO_PICFORMAT_CIF16)
-   {
+   }
+   else if(params->picFormat == OO_PICFORMAT_CIF16) {
       pH263Cap->m.cif16MPIPresent = TRUE;
       pH263Cap->cif16MPI = params->MPI;
    }
@@ -857,7 +876,7 @@
    return NULL;
 }
 
-/*Used for g711 ulaw/alaw, g729, g729a, g7231 */
+/* Used for g711 ulaw/alaw, g729, g729a, g7231 */
 ASN1BOOL ooCapabilityCheckCompatibility_Simple
    (OOH323CallData *call, ooH323EpCapability* epCap, 
     H245AudioCapability* audioCap, int dir)
@@ -897,18 +916,34 @@
       return FALSE;
    }
 
-   /* can we receive this capability */
+   if(cap != epCap->cap) { return FALSE; }
+
+   /* Can we receive this capability */
    if(dir & OORX)
    {
-      if(((OOCapParams*)epCap->params)->rxframes >= noofframes)
+      //if(cap == OO_G7231) {
+      //   if(((OOCapParams*)epCap->params)->rxframes <= noofframes) {
+      //      return TRUE;
+      //   }
+      //}
+      //else
+      if(((OOCapParams*)epCap->params)->rxframes >= noofframes) {
          return TRUE;
+      }
    }
 
    /* Can we transmit compatible stream */
    if(dir & OOTX)
    {
-      if(((OOCapParams*)epCap->params)->txframes <= noofframes)
+      //if(cap == OO_G7231) {
+      //   if(((OOCapParams*)epCap->params)->txframes >= noofframes) {
+      //      return TRUE;
+      //   }
+      //}
+      //else 
+      if(((OOCapParams*)epCap->params)->txframes <= noofframes) {
          return TRUE;
+      }
    }
    return FALSE;
 
@@ -982,10 +1017,11 @@
    {
       if(pH263Cap->m.sqcifMPIPresent)
       {
-	if(params->picFormat != OO_PICFORMAT_SQCIF)
+         if(params->picFormat != OO_PICFORMAT_SQCIF)
          {
             return FALSE;
-         }else{
+         }
+         else{
             if(pH263Cap->sqcifMPI >= params->MPI)
                return TRUE;
             else
@@ -997,7 +1033,8 @@
          if(params->picFormat != OO_PICFORMAT_QCIF)
          {
             return FALSE;
-         }else{
+         }
+         else{
             if(pH263Cap->qcifMPI >= params->MPI)
                return TRUE;
             else
@@ -1009,7 +1046,8 @@
          if(params->picFormat != OO_PICFORMAT_CIF)
          {
             return FALSE;
-         }else{
+         }
+         else{
             if(pH263Cap->cifMPI >= params->MPI)
                return TRUE;
             else
@@ -1021,7 +1059,8 @@
          if(params->picFormat != OO_PICFORMAT_CIF4)
          {
             return FALSE;
-         }else{
+         }
+         else{
             if(pH263Cap->cif4MPI >= params->MPI)
                return TRUE;
             else
@@ -1033,7 +1072,8 @@
          if(params->picFormat != OO_PICFORMAT_CIF16)
          {
             return FALSE;
-         }else{
+         }
+         else{
             if(pH263Cap->cif16MPI >= params->MPI)
                return TRUE;
             else
@@ -1050,7 +1090,8 @@
          if(params->picFormat != OO_PICFORMAT_SQCIF)
          {
             return FALSE;
-         }else{
+         }
+         else{
             if(pH263Cap->sqcifMPI <= params->MPI)
                return TRUE;
             else
@@ -1062,7 +1103,8 @@
          if(params->picFormat != OO_PICFORMAT_QCIF)
          {
             return FALSE;
-         }else{
+         }
+         else{
             if(pH263Cap->qcifMPI <= params->MPI)
                return TRUE;
             else
@@ -1074,7 +1116,8 @@
          if(params->picFormat != OO_PICFORMAT_CIF)
          {
             return FALSE;
-         }else{
+         }
+         else{
             if(pH263Cap->cifMPI <= params->MPI)
                return TRUE;
             else
@@ -1086,7 +1129,8 @@
          if(params->picFormat != OO_PICFORMAT_CIF4)
          {
             return FALSE;
-         }else{
+         }
+         else{
             if(pH263Cap->cif4MPI <= params->MPI)
                return TRUE;
             else
@@ -1098,7 +1142,8 @@
          if(params->picFormat != OO_PICFORMAT_CIF16)
          {
             return FALSE;
-         }else{
+         }
+         else{
             if(pH263Cap->cif16MPI <= params->MPI)
                return TRUE;
             else
@@ -1154,7 +1199,7 @@
 /*
    Note: In faststart if we sent transmit rate (x>y) and remote
          can receive only y, then we can't reduce our transmit rate
- */
+*/
 OOBOOL ooCapabilityCheckCompatibility
    (struct OOH323CallData *call, ooH323EpCapability* epCap, 
     H245DataType* dataType, int dir)
@@ -1400,7 +1445,7 @@
          cap = OO_G7231;
          break;
       default:
-	return NULL;
+         return NULL;
    }
 
    OOTRACEDBGC4("Determined Simple audio data type to be of type %s. Searching"
@@ -1418,7 +1463,7 @@
    while(cur)
    {
       OOTRACEDBGC4("Local cap being compared %s. (%s, %s)\n", 
-              ooGetCapTypeText(cur->cap),call->callType, call->callToken);
+         ooGetCapTypeText(cur->cap),call->callType, call->callToken);
       
       if(cur->cap == cap && (cur->dir & dir))
          break;
@@ -1593,8 +1638,8 @@
       
       if(cur->cap == cap && (cur->dir & dir))
       {
-	 if(((OOH263CapParams*)cur->params)->picFormat == picFormat)
-           break;
+         if(((OOH263CapParams*)cur->params)->picFormat == picFormat)
+            break;
       }
       cur = cur->next;
    }
@@ -1609,16 +1654,16 @@
       if(mpi < ((OOH263CapParams*)cur->params)->MPI)
          return NULL;
       else{
-	 epCap = (ooH323EpCapability*)memAlloc(call->pctxt, 
+         epCap = (ooH323EpCapability*)memAlloc(call->pctxt, 
                                                    sizeof(ooH323EpCapability));
          params = (OOH263CapParams*) memAlloc(call->pctxt, 
                                                       sizeof(OOH263CapParams));
          if(!epCap || !params)
          {
-	   OOTRACEERR3("Error:Memory - ooIsVideoDataTypeH263Supported - "
+            OOTRACEERR3("Error:Memory - ooIsVideoDataTypeH263Supported - "
                        "epCap/params. (%s, %s)\n", call->callType, 
                         call->callToken);
-           return NULL;
+            return NULL;
          }
          epCap->params = params;
          epCap->cap = cur->cap;
@@ -1734,7 +1779,7 @@
       return ooIsVideoDataTypeSupported(call, data->u.videoData, dir);
    case T_H245DataType_audioData:
       OOTRACEDBGC3("Looking for audio dataType support. (%s, %s)\n",
-		   call->callType, call->callToken);
+                    call->callType, call->callToken);
       return ooIsAudioDataTypeSupported(call, data->u.audioData, dir);
    case T_H245DataType_data:
      OOTRACEDBGC3("Data type not supported.(%s, %s)\n", 
@@ -1888,7 +1933,7 @@
 }
 
 int ooAddRemoteAudioCapability(OOH323CallData *call, 
-			       H245AudioCapability *audioCap,
+                               H245AudioCapability *audioCap,
                                int dir)
 {
    int rxframes=0, txframes=0;
@@ -2025,9 +2070,10 @@
       {
          call->jointDtmfMode |= OO_CAP_DTMF_H245_alphanumeric;
          return OO_OK;
-      }else if((cap->u.receiveUserInputCapability->t ==
-                                         T_H245UserInputCapability_dtmf) &&
-	       (call->dtmfmode & OO_CAP_DTMF_H245_signal))
+      }
+      else if((cap->u.receiveUserInputCapability->t ==
+               T_H245UserInputCapability_dtmf) &&
+               (call->dtmfmode & OO_CAP_DTMF_H245_signal))
       {
          call->jointDtmfMode |= OO_CAP_DTMF_H245_signal;
          return OO_OK;
@@ -2055,7 +2101,7 @@
    }
 
    OOTRACEDBGC3("Not adding to joint capabilities. (%s, %s)\n", call->callType,
-		call->callToken);
+                call->callToken);
    return OO_OK;
 }
 

Modified: branches/1.2/asterisk-ooh323c/ooh323c/src/ooCapability.h
URL: http://svn.digium.com/view/asterisk-addons/branches/1.2/asterisk-ooh323c/ooh323c/src/ooCapability.h?rev=201&r1=200&r2=201&view=diff
==============================================================================
--- branches/1.2/asterisk-ooh323c/ooh323c/src/ooCapability.h (original)
+++ branches/1.2/asterisk-ooh323c/ooh323c/src/ooCapability.h Thu Mar  2 16:21:17 2006
@@ -37,12 +37,27 @@
    OO_G711ALAW56K         = 3,
    OO_G711ULAW64K         = 4,
    OO_G711ULAW56K         = 5,
+   OO_G722_64k            = 6,
+   OO_G722_56k            = 7,
+   OO_G722_48k            = 8,
    OO_G7231               = 9,
+   OO_G728                = 10,
    OO_G729                = 11,
    OO_G729A               = 12,
+   OO_IS11172_AUDIO       = 13,
+   OO_IS13818_AUDIO       = 14,
+   OO_G729B               = 15,
+   OO_G729AB              = 16,
+   OO_G7231C              = 17,
    OO_GSMFULLRATE         = 18,
    OO_GSMHALFRATE         = 19,
    OO_GSMENHANCEDFULLRATE = 20,
+   OO_GENERICAUDIO        = 21,
+   OO_G729EXT             = 22,
+   OO_AUDIO_VBD           = 23,
+   OO_AUDIOTELEPHONYEVENT = 24,
+   OO_AUDIO_TONE          = 25,
+   OO_EXTELEM1            = 26,
    OO_CAP_VIDEO_BASE      = 27,
    OO_NONSTDVIDEO         = 28,
    OO_H261VIDEO           = 29,
@@ -487,8 +502,8 @@
  */
 
 ASN1BOOL ooCapabilityCheckCompatibility(struct OOH323CallData *call, 
-				ooH323EpCapability *epCap, 
-				H245DataType *dataType, int dir);
+                                        ooH323EpCapability *epCap, 
+                                        H245DataType *dataType, int dir);
 
 
 /**

Modified: branches/1.2/asterisk-ooh323c/ooh323c/src/ooCmdChannel.c
URL: http://svn.digium.com/view/asterisk-addons/branches/1.2/asterisk-ooh323c/ooh323c/src/ooCmdChannel.c?rev=201&r1=200&r2=201&view=diff
==============================================================================
--- branches/1.2/asterisk-ooh323c/ooh323c/src/ooCmdChannel.c (original)
+++ branches/1.2/asterisk-ooh323c/ooh323c/src/ooCmdChannel.c Thu Mar  2 16:21:17 2006
@@ -68,9 +68,6 @@
    }
    else
    {
-
-     //TODO:Need to add support for multihomed to work with channel driver
-
       /*
          bind socket to a port before connecting. Thus avoiding
          implicit bind done by a connect call. Avoided on windows as 
@@ -156,14 +153,15 @@
       {
          OOTRACEINFO1("Ignoring stack command as Gk Client is not registered"
                       " yet\n");
-      }else {
+      }
+      else {
          switch(cmd.type) {
             case OO_CMD_MAKECALL: 
                OOTRACEINFO2("Processing MakeCall command %s\n", 
                                     (char*)cmd.param2);
  
                ooH323MakeCall ((char*)cmd.param1, (char*)cmd.param2, 
-                                                 (ooCallOptions*)cmd.param3);
+                               (ooCallOptions*)cmd.param3);
                break;
 
             case OO_CMD_MANUALRINGBACK:

Modified: branches/1.2/asterisk-ooh323c/ooh323c/src/ooGkClient.c
URL: http://svn.digium.com/view/asterisk-addons/branches/1.2/asterisk-ooh323c/ooh323c/src/ooGkClient.c?rev=201&r1=200&r2=201&view=diff
==============================================================================
--- branches/1.2/asterisk-ooh323c/ooh323c/src/ooGkClient.c (original)
+++ branches/1.2/asterisk-ooh323c/ooh323c/src/ooGkClient.c Thu Mar  2 16:21:17 2006
@@ -87,7 +87,8 @@
       {
          OOTRACEINFO2("Using local RAS Ip address %s\n", cur->addr);
          strcpy(pGkClient->localRASIP, cur->addr);
-      }else{
+      }
+      else{
          OOTRACEERR1("Error:Failed to assign a local RAS IP address\n");
          return OO_FAILED;
       }
@@ -153,10 +154,11 @@
       OOTRACEINFO1("\tGatekeeper mode - UseSpecificGatekeeper\n");
       OOTRACEINFO3("\tGatekeeper To Use - %s:%d\n", pGkClient->gkRasIP, 
                                                     pGkClient->gkRasPort);
-   }else if(pGkClient->gkMode == RasDiscoverGatekeeper)
-   {
+   }
+   else if(pGkClient->gkMode == RasDiscoverGatekeeper) {
       OOTRACEINFO1("\tGatekeeper mode - UseSpecificGatekeeper\n");
-   }else{
+   }
+   else {
       OOTRACEERR1("Invalid GatekeeperMode\n");
    }
 }
@@ -213,7 +215,7 @@
       OOTRACEINFO1("Gatekeeper Mode - RasUseSpecificGatekeeper\n");
       if(szGkAddr)
       {
-	 if(strlen(szGkAddr)>MAX_IP_LEN)
+         if(strlen(szGkAddr)>MAX_IP_LEN)
          { 
             OOTRACEERR2("Error:Invalid IP address specified - %s\n", szGkAddr);
             return OO_FAILED;
@@ -227,11 +229,11 @@
 
       OOTRACEINFO3("Gatekeeper IP:port set to - %s:%d\n", 
                     szGkAddr,  pGkClient->gkRasPort);
-   }else if(eGkMode == RasDiscoverGatekeeper)
-   {
+   }
+   else if(eGkMode == RasDiscoverGatekeeper) {
       OOTRACEINFO1("Gatekeeper Mode - RasDiscoverGatekeeper\n");
-   }else if(eGkMode == RasNoGatekeeper)
-   {
+   }
+   else if(eGkMode == RasNoGatekeeper) {
       OOTRACEINFO1("Gatekeeper Mode - RasNoGatekeeper\n");
    }
    return OO_OK;
@@ -412,7 +414,7 @@
       if(iRet != OO_OK)
       {
          OOTRACEERR1("Error: Failed to handle received RAS message\n");
-	 //pGkClient->state = GkClientFailed;
+         //pGkClient->state = GkClientFailed;
       }
       memReset(pctxt);
    }
@@ -567,16 +569,17 @@
          OOTRACEERR1("Error sending RAS message\n");
          return OO_FAILED;
       }
-   }else if(pGkClient->gkMode == RasDiscoverGatekeeper && 
-            !pGkClient->discoveryComplete)
-   { 
+   }
+   else if(pGkClient->gkMode == RasDiscoverGatekeeper && 
+           !pGkClient->discoveryComplete) { 
       if(ASN_OK != ooSocketSendTo(pGkClient->rasSocket, msgPtr, iLen, 
                                        MULTICAST_GKADDRESS, MULTICAST_GKPORT))
       {
          OOTRACEERR1("Error sending multicast RAS message\n" );
          return OO_FAILED;
       }
-   }else {/* should never go here */ 
+   }
+   else {/* should never go here */ 
       OOTRACEERR1("Error: GkClient in invalid state.\n");
       return OO_FAILED;
    }
@@ -1072,7 +1075,8 @@
    {
       ooGkClientUpdateRegisteredAliases(pGkClient, 
                                    &pRegistrationConfirm->terminalAlias, TRUE);
-   }else{/* Everything registered*/
+   }
+   else{/* Everything registered*/
      ooGkClientUpdateRegisteredAliases(pGkClient, NULL, TRUE);
    }
 
@@ -1109,7 +1113,8 @@
          return OO_FAILED;
       }    
       
-   }else{
+   }
+   else{
       pGkClient->regTimeout = 0;
       OOTRACEINFO1("Gatekeeper does not support KeepAlive.\n");
    }
@@ -1379,7 +1384,8 @@
       OOTRACEINFO1("Gatekeeper requested a list of aliases be unregistered\n");
       ooGkClientUpdateRegisteredAliases(pGkClient, 

[... 4275 lines stripped ...]


More information about the asterisk-addons-commits mailing list