[Asterisk-cvs] asterisk/channels/h323 ast_h323.h,1.22,1.23 ast_h323.cpp,1.48,1.49

jeremy at lists.digium.com jeremy at lists.digium.com
Mon May 24 22:14:00 CDT 2004


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

Modified Files:
	ast_h323.h ast_h323.cpp 
Log Message:
optmize call setup process

Index: ast_h323.h
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/h323/ast_h323.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- ast_h323.h	20 May 2004 09:00:04 -0000	1.22
+++ ast_h323.h	25 May 2004 02:27:59 -0000	1.23
@@ -248,9 +248,7 @@
 	PString destE164;
 
 	PIPSocket::Address externalIpAddress;	
-    	PIPSocket::Address remoteIpAddress;	
 	WORD externalPort;
-	WORD remotePort;		
 	WORD sessionId;
 	BOOL bridging;			
 };
@@ -289,9 +287,7 @@
      	BOOL OnReceivedAckPDU(const H245_H2250LogicalChannelAckParameters & param);
 
      	PIPSocket::Address externalIpAddress;   
-     	PIPSocket::Address remoteIpAddress;             
      	WORD externalPort;               
-     	WORD remotePort;
 }; 
 
 /**

Index: ast_h323.cpp
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/h323/ast_h323.cpp,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- ast_h323.cpp	20 May 2004 21:56:12 -0000	1.48
+++ ast_h323.cpp	25 May 2004 02:27:59 -0000	1.49
@@ -471,9 +471,6 @@
 							unsigned options)
 	: H323Connection(ep, callReference, options)
 {
-    	remoteIpAddress = 0; 	// IP Address of remote endpoint
-	remotePort      = 0;	// remote endpoint Data port (control is dataPort+1)
-
 	if (h323debug) {
 		cout << "	== New H.323 Connection created." << endl;
 	}
@@ -722,23 +719,13 @@
 		cout << ((channel.GetDirection()==H323Channel::IsTransmitter)?"sending ":((channel.GetDirection()==H323Channel::IsReceiver)?"receiving ":" ")); 
 		cout << (const char *)(channel.GetCapability()).GetFormatName() << endl;
 	}
-	// adjust the count of channels we have open
-	channelsOpen++;
-	if (h323debug) {
-		cout <<  "		-- channelsOpen = " << channelsOpen << endl;
-	}
 
-	H323_ExternalRTPChannel & external = (H323_ExternalRTPChannel &)channel;
- 	external.GetRemoteAddress(remoteIpAddress, remotePort); 
+	/* adjust the count of channels we have open */
+	channelsOpen++;
 
 	if (h323debug) {
-		if (channel.GetDirection()==H323Channel::IsReceiver) {
-			cout << "		-- remoteIpAddress: " << remoteIpAddress << endl;
-			cout << "		-- remotePort: " << remotePort << endl;
-		}
+		cout <<  "		-- channelsOpen = " << channelsOpen << endl;
 	}
-	/* Notify Asterisk of remote RTP information */
-	on_start_logical_channel(GetCallReference(), (const char *)remoteIpAddress.AsString(), remotePort);
 
 	return TRUE;	
 }
@@ -752,10 +739,6 @@
 		  				     WORD dataPort)
 	: H323_ExternalRTPChannel(connection, capability, direction, sessionID, ip, dataPort)
 {
-	if (h323debug) {
-		cout << "	== New H.323 ExternalRTPChannel created." << endl;
-	}
-	return;
 }
 
 MyH323_ExternalRTPChannel::MyH323_ExternalRTPChannel(MyH323Connection & connection,
@@ -778,32 +761,29 @@
 
 MyH323_ExternalRTPChannel::~MyH323_ExternalRTPChannel()
 {
-	if (h323debug) {
-		cout << "	== H.323 ExternalRTPChannel deleted." << endl;
-	}
-	return;
 }
 
 BOOL MyH323_ExternalRTPChannel::OnReceivedAckPDU(const H245_H2250LogicalChannelAckParameters & param)
 {
-	PIPSocket::Address remoteIpAddress;
-	WORD remotePort;
+       PIPSocket::Address remoteIpAddress;
+       WORD remotePort;
 
-	if (H323_ExternalRTPChannel::OnReceivedAckPDU(param)) {
-		H323_ExternalRTPChannel::GetRemoteAddress(remoteIpAddress, remotePort);
-		/* Notify Asterisk of remote RTP information */
-		on_start_logical_channel(connection.GetCallReference(), (const char *)remoteIpAddress.AsString(), remotePort);
-		return TRUE;
-	}
-	return FALSE;
-}
+        if (H323_ExternalRTPChannel::OnReceivedAckPDU(param)) {
+               H323_ExternalRTPChannel::GetRemoteAddress(remoteIpAddress, remotePort);
+               /* Notify Asterisk of remote RTP information */
+               on_start_logical_channel(connection.GetCallReference(), (const char *)remoteIpAddress.AsString(), remotePort);
+                return TRUE;
+        }
+        return FALSE;
 
+}
 /** IMPLEMENTATION OF C FUNCTIONS */
 
 /**
  * The extern "C" directive takes care for 
  * the ANSI-C representation of linkable symbols 
  */
+
 extern "C" {
 
 int h323_end_point_exist(void)




More information about the svn-commits mailing list