[Asterisk-cvs] asterisk/channels/h323 Makefile, 1.17, 1.18 ast_h323.cpp, 1.59, 1.60 chan_h323.h, 1.27, 1.28

jeremy at lists.digium.com jeremy at lists.digium.com
Thu Sep 30 15:28:36 CDT 2004


Update of /usr/cvsroot/asterisk/channels/h323
In directory mongoose.digium.com:/tmp/cvs-serv23152/h323

Modified Files:
	Makefile ast_h323.cpp chan_h323.h 
Log Message:
massive changes, very broken, do not use (from airport)

Index: Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/h323/Makefile,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- Makefile	31 Aug 2004 13:32:11 -0000	1.17
+++ Makefile	30 Sep 2004 19:30:49 -0000	1.18
@@ -37,32 +37,32 @@
 #
 #
 # Janus release directives, comment below if your brave enough for Janus
-#OSARCH=$(shell uname -s)
-#CFLAGS += -DNDEBUG -DDO_CRASH -DDEBUG_THREADS
-#CFLAGS += -pipe -Wall -fPIC -Wmissing-prototypes -Wmissing-declarations 
-#CFLAGS += -D_REENTRANT -D_GNU_SOURCE
-#CFLAGS += -I../../include
-#CFLAGS += -I$(PWLIBDIR)/include 
-#CFLAGS += -I$(OPENH323DIR)/include -Wno-missing-prototypes -Wno-missing-declarations
-
-# Pre Janus release directives
+OSARCH=$(shell uname -s)
 CFLAGS += -DNDEBUG -DDO_CRASH -DDEBUG_THREADS
-CFLAGS += -pipe -Wall -fPIC
-ifeq (${OSARCH},Linux)
-CFLAGS += -DP_LINUX
-LIBS+=-lpthread
-endif
-ifeq ($(findstring BSD,${OSARCH}),BSD)
-CFLAGS += -pthread
-endif
+CFLAGS += -pipe -Wall -fPIC -Wmissing-prototypes -Wmissing-declarations 
 CFLAGS += -D_REENTRANT -D_GNU_SOURCE
-CFLAGS += -DP_HAS_SEMAPHORES -DP_SSL -DP_PTHREADS
-CFLAGS += -DPHAS_TEMPLATES -DPTRACING -DP_USE_PRAGMA
 CFLAGS += -I../../include
-CFLAGS += -I$(PWLIBDIR)/include/ptlib/unix -I$(PWLIBDIR)/include
-CFLAGS += -I$(OPENH323DIR)/include
-CFLAGS += -Wno-missing-prototypes -Wno-missing-declarations
-LIBS+= -lcrypto -lssl -lexpat
+CFLAGS += -I$(PWLIBDIR)/include 
+CFLAGS += -I$(OPENH323DIR)/include -Wno-missing-prototypes -Wno-missing-declarations
+
+# Pre Janus release directives
+#CFLAGS += -DNDEBUG -DDO_CRASH -DDEBUG_THREADS
+#CFLAGS += -pipe -Wall -fPIC
+#ifeq (${OSARCH},Linux)
+#CFLAGS += -DP_LINUX
+#LIBS+=-lpthread
+#endif
+#ifeq ($(findstring BSD,${OSARCH}),BSD)
+#CFLAGS += -pthread
+#endif
+#CFLAGS += -D_REENTRANT -D_GNU_SOURCE
+#CFLAGS += -DP_HAS_SEMAPHORES -DP_SSL -DP_PTHREADS
+#CFLAGS += -DPHAS_TEMPLATES -DPTRACING -DP_USE_PRAGMA
+#CFLAGS += -I../../include
+#CFLAGS += -I$(PWLIBDIR)/include/ptlib/unix -I$(PWLIBDIR)/include
+#CFLAGS += -I$(OPENH323DIR)/include
+#CFLAGS += -Wno-missing-prototypes -Wno-missing-declarations
+#LIBS+= -lcrypto -lssl -lexpat
 
 all:   	libchanh323.a
 
@@ -74,7 +74,11 @@
  
 
 ast_h323.o:	ast_h323.cpp
-	$(CXX) -g -c -fno-rtti -o $@ $(CFLAGS) $<
+	$(CXX) -g -c -o $@ $(CFLAGS) $<
+
+#ast_h323.o:	ast_h323.cpp
+#	$(CXX) -g -c -fno-rtti -o $@ $(CFLAGS) $<
+
 
 libchanh323.a:	ast_h323.o
 	ar cr libchanh323.a ast_h323.o

Index: ast_h323.cpp
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/h323/ast_h323.cpp,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- ast_h323.cpp	21 Sep 2004 18:42:37 -0000	1.59
+++ ast_h323.cpp	30 Sep 2004 19:30:49 -0000	1.60
@@ -5,8 +5,8 @@
  *			By  Jeremy McNamara
  *			For The NuFone Network
  * 
- * This code has been derived from code created by
- *              Michael Manousos and Mark Spencer
+ * chan_h323 has been derived from code created by
+ *               Michael Manousos and Mark Spencer
  *
  * This file is part of the chan_h323 driver for Asterisk
  *
@@ -60,11 +60,6 @@
 /* DTMF Mode */
 int mode = H323_DTMF_RFC2833;
 
-/** Options for connections creation */
-BOOL	noFastStart = TRUE;
-BOOL	noH245Tunneling;
-BOOL	noSilenceSuppression;
-
 /**
  * We assume that only one endPoint should exist.
  * The application cannot run the h323_end_point_create() more than once
@@ -243,26 +238,27 @@
 	MyH323Connection * connection;
 
 	/* Determine whether we are using a gatekeeper or not. */
-	if (GetGatekeeper() != NULL) {
+	if (!GetGatekeeper()) {
 		fullAddress = dest;
-		if (h323debug)
+		if (h323debug) {
 			cout << " -- Making call to " << fullAddress << " using gatekeeper." << endl;
+		}
 	} else {
-			fullAddress = dest; /* host */
-			if (h323debug)
-				cout << " -- Making call to " << fullAddress << "." << endl;
+		fullAddress = dest; 
+		if (h323debug) {
+			cout << " -- Making call to " << fullAddress << "." << endl;
+		}
 	}
-
 	if (!(connection = (MyH323Connection *)H323EndPoint::MakeCallLocked(fullAddress, token))) {
-		if (h323debug)
+		if (h323debug) {
 			cout << "Error making call to \"" << fullAddress << '"' << endl;
+		}
 		return 1;
 	}
-	
-	*callReference = connection->GetCallReference();
-	
-	if (callerid)
+	*callReference = connection->GetCallReference();	
+	if (callerid) {
 		connection->SetLocalPartyName(PString(callerid));
+	}
 	if (callername) {
                 localAliasNames.RemoveAll();
 		connection->SetLocalPartyName(PString(callername));
@@ -272,16 +268,14 @@
                 localAliasNames.RemoveAll();
                 connection->SetLocalPartyName(PString(callerid));
         }
-        
         connection->AST_Outgoing = TRUE;
 
-	connection->Unlock(); 	
-
 	if (h323debug) {
 		cout << "	-- " << GetLocalUserName() << " is calling host " << fullAddress << endl;
 		cout << "	-- " << "Call token is " << (const char *)token << endl;
 		cout << "	-- Call reference is " << *callReference << endl;
 	}
+	connection->Unlock(); 	
 	return 0;
 }
 
@@ -994,6 +988,7 @@
 	} else {
 		endPoint->SetSendUserInputMode(H323Connection::SendUserInputAsInlineRFC2833);
 	}
+#if 0
 	if (cap & AST_FORMAT_SPEEX) {
 		/* Not real sure if Asterisk acutally supports all
 		   of the various different bit rates so add them 
@@ -1005,7 +1000,7 @@
 		endPoint->SetCapability(0, 0, new SpeexNarrow5AudioCapability());
 		endPoint->SetCapability(0, 0, new SpeexNarrow6AudioCapability());
 	}
-
+#endif 
 	if (cap & AST_FORMAT_G729A) {
 		AST_G729ACapability *g729aCap;
 		AST_G729Capability *g729Cap;
@@ -1017,13 +1012,13 @@
 		H323_G7231Capability *g7231Cap;
 		endPoint->SetCapability(0, 0, g7231Cap = new H323_G7231Capability);
 	} 
-
+#if 0
 	if (cap & AST_FORMAT_GSM) {
 		H323_GSM0610Capability *gsmCap;
 	    	endPoint->SetCapability(0, 0, gsmCap = new H323_GSM0610Capability);
 	    	gsmCap->SetTxFramesInPacket(gsmFrames);
 	} 
-
+#endif
 	if (cap & AST_FORMAT_ULAW) {
 		H323_G711Capability *g711uCap;
 	    	endPoint->SetCapability(0, 0, g711uCap = new H323_G711Capability(H323_G711Capability::muLaw));
@@ -1203,13 +1198,8 @@
 	if (!h323_end_point_exist()) {
 		return 1;
 	}
-	
-	noFastStart = 	call_options.noFastStart;
-	noH245Tunneling = call_options.noH245Tunneling;
-
 	res = endPoint->MakeCall(dest, token, &cd->call_reference, call_options.port, call_options.callerid, call_options.callername);
 	memcpy((char *)(cd->call_token), (const unsigned char *)token, token.GetLength());
-	
 	return res;
 };
 

Index: chan_h323.h
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/h323/chan_h323.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- chan_h323.h	21 Sep 2004 18:42:37 -0000	1.27
+++ chan_h323.h	30 Sep 2004 19:30:49 -0000	1.28
@@ -56,17 +56,19 @@
    All peers are registered to a GK if there is one */
 struct oh323_peer {
 	char name[80];
-	char context[80];
-	int  noFastStart;
-	int  noH245Tunneling;
-	int  noSilenceSuppression;
-	int  inUse;
-	int  outgoinglimit;
-	int  bridge;
-	int  nat;
-	int  dtmfmode;
+	char mailbox[AST_MAX_EXTENSION];
+	int capability;
+	int noFastStart;
+	int noH245Tunneling;
+	int noSilenceSuppression;
+	int inUse;
+	int outgoinglimit;
+	int bridge;
+	int nat;
+	int dtmfmode;
 	int delme;
 	struct sockaddr_in addr;
+	struct ast_ha *ha;
 	struct oh323_peer *next;
 };
 
@@ -114,7 +116,7 @@
 
 /* This is a callback prototype function, called pass
    DTMF down the RTP. */
-typedef int (*send_digit_cb)(unsigned, char);
+typedef int (*send_digit_cb)(unsigned, char, const char *);
 extern send_digit_cb	on_send_digit; 
 
 /* This is a callback prototype function, called to collect




More information about the svn-commits mailing list