[Asterisk-cvs] asterisk-addons/asterisk-ooh323c/src chan_h323.c, 1.1, 1.2 ooh323cDriver.c, 1.1, 1.2

vphirke at lists.digium.com vphirke at lists.digium.com
Fri Jun 3 10:51:09 CDT 2005


Update of /usr/cvsroot/asterisk-addons/asterisk-ooh323c/src
In directory mongoose.digium.com:/tmp/cvs-serv8768/src

Modified Files:
	chan_h323.c ooh323cDriver.c 
Log Message:
Updated stack source

Index: chan_h323.c
===================================================================
RCS file: /usr/cvsroot/asterisk-addons/asterisk-ooh323c/src/chan_h323.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- chan_h323.c	23 May 2005 20:55:43 -0000	1.1
+++ chan_h323.c	3 Jun 2005 14:54:07 -0000	1.2
@@ -191,7 +191,7 @@
 /* stack callbacks */
 int onAlerting(ooCallData *call);
 int onIncomingCall(ooCallData *call);
-int onOutgoingCallAdmitted(ooCallData *call);
+int onNewCallCreated(ooCallData *call);
 int onCallEstablished(ooCallData *call);
 int onCallCleared(ooCallData *call);
 
@@ -1275,55 +1275,58 @@
 }
 
 
-int onOutgoingCallAdmitted(ooCallData *call)
+int onNewCallCreated(ooCallData *call)
 {
    struct h323_pvt *p = NULL;
 
    if(gH323Debug)
-      ast_verbose("---   onOutgoingCallAdmitted %s\n", call->callToken);
+      ast_verbose("---   onNewCallCreated %s\n", call->callToken);
 
-   p = find_call(call);
-   if(!p)
-   {
-      ast_log(LOG_ERROR, "No matching call found for outgoing call\n");
-      return -1;
-   }
-   ast_mutex_lock(&p->lock);
-   if(p->callerid_name){
-      ooCallSetCallerId(call, p->callerid_name);
-   }
-   if(p->callerid_num)
+   if(!strcmp(call->callType, "outgoing"))
    {
-      ooCallSetCallingPartyNumber(call, p->callerid_num);
-   }
-   if(!ast_strlen_zero(p->caller_h323id))
-      ooCallAddAliasH323ID(call, p->caller_h323id);
-   if(!ast_strlen_zero(p->caller_dialedDigits)){
-      ooCallAddAliasDialedDigits(call, p->caller_dialedDigits);
-   }
-  if(!ast_strlen_zero(p->caller_email))
-      ooCallAddAliasEmailID(call, p->caller_h323id);
-  if(!ast_strlen_zero(p->caller_url))
-      ooCallAddAliasURLID(call, p->caller_url);
+      p = find_call(call);
+      if(!p)
+      {
+         ast_log(LOG_ERROR, "No matching call found for outgoing call\n");
+         return -1;
+      }
+      ast_mutex_lock(&p->lock);
+      if(p->callerid_name){
+         ooCallSetCallerId(call, p->callerid_name);
+      }
+      if(p->callerid_num)
+      {
+         ooCallSetCallingPartyNumber(call, p->callerid_num);
+      }
+      if(!ast_strlen_zero(p->caller_h323id))
+         ooCallAddAliasH323ID(call, p->caller_h323id);
+      if(!ast_strlen_zero(p->caller_dialedDigits)){
+         ooCallAddAliasDialedDigits(call, p->caller_dialedDigits);
+      }
+     if(!ast_strlen_zero(p->caller_email))
+        ooCallAddAliasEmailID(call, p->caller_h323id);
+     if(!ast_strlen_zero(p->caller_url))
+        ooCallAddAliasURLID(call, p->caller_url);
   
-  if(!ast_strlen_zero(p->exten))  
-     ooCallAddRemoteAliasH323ID(call, p->exten);
+     if(!ast_strlen_zero(p->exten))  
+        ooCallAddRemoteAliasH323ID(call, p->exten);
 
-  if(gH323Debug)
-  {
-    char prefsBuf[256];
-    ast_codec_pref_string(&p->prefs, prefsBuf, 256);
-    ast_verbose(" Outgoing call %s(%s) - Codec prefs - %s\n", 
+     if(gH323Debug)
+     {
+       char prefsBuf[256];
+       ast_codec_pref_string(&p->prefs, prefsBuf, 256);
+       ast_verbose(" Outgoing call %s(%s) - Codec prefs - %s\n", 
                     p->username?p->username:"NULL", call->callToken, prefsBuf);
-  }
+     }
 
-  ooh323c_set_capability_for_call(call, &p->prefs, p->capability, p->dtmfmode);
+     ooh323c_set_capability_for_call(call, &p->prefs, p->capability, 
+                                     p->dtmfmode);
    
-   configure_local_rtp(p, call);
-   ast_mutex_unlock(&p->lock);
-
+      configure_local_rtp(p, call);
+      ast_mutex_unlock(&p->lock);
+   }
    if(gH323Debug)
-      ast_verbose("+++   onOutgoingCallAdmitted %s\n", call->callToken);
+      ast_verbose("+++   onNewCallCreated %s\n", call->callToken);
 
    return OO_OK;
 }
@@ -2219,13 +2222,11 @@
 
    h225Callbacks.onReceivedSetup = &h323_onReceivedSetup;
    OOH323CALLBACKS h323Callbacks ={
-     .onNewCallCreated = NULL,
+     .onNewCallCreated = onNewCallCreated,
      .onAlerting = onAlerting,
      .onIncomingCall = onIncomingCall,
      .onOutgoingCall = NULL,
-     .onCallAnswered = NULL,
      .onCallEstablished = onCallEstablished,
-     .onOutgoingCallAdmitted = onOutgoingCallAdmitted,
      .onCallCleared = onCallCleared,
      .openLogicalChannels=NULL
    };

Index: ooh323cDriver.c
===================================================================
RCS file: /usr/cvsroot/asterisk-addons/asterisk-ooh323c/src/ooh323cDriver.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ooh323cDriver.c	23 May 2005 20:55:43 -0000	1.1
+++ ooh323cDriver.c	3 Jun 2005 14:54:07 -0000	1.2
@@ -24,7 +24,7 @@
 static pthread_t ooh323c_thread = AST_PTHREADT_NULL;
 static int grxframes = 240;
 
-static int gtxframes = 30;
+static int gtxframes = 20;
 
 int ooh323c_start_receive_channel(ooCallData *call, ooLogicalChannel *pChannel);
 int ooh323c_start_transmit_channel(ooCallData *call, ooLogicalChannel *pChannel);
@@ -261,7 +261,7 @@
                                                           call->callToken);
       return -1;
    }
-   setup_rtp_connection(call, call->remoteIP, pChannel->mediaPort);
+   setup_rtp_connection(call, call->remoteIP, pChannel->remoteMediaPort);
     return 1;
 }
 




More information about the svn-commits mailing list