Commits

Anonymous committed f491438

Updates. Slow start and no h245 tunnelling options.

Comments (0)

Files changed (4)

 			AddAliasName(progConf.userAliases[i]); 
 	} 
 	
-	//DisableFastStart(true);	
-	//DisableH245Tunneling(true);
+	DisableFastStart(!progConf.fastStart);	
+	DisableH245Tunneling(!progConf.h245Tunnell);
 	//DisableH245inSetup(true);	
 		
 	// Codecs
 void OH323Tut::printHelp() 
 {
 	PError << "Available options:\n"
-			"-f <file> --file <file>        the name of the sound file\n"
-			"-c <number> --call <number>    the number to call\n"
-			"-g <addr> --gatekeeper <addr>  the IP address or DNS name of the gatekeeper\n"
-			"-G <id> --gatekeeper-id <id>   gatekeeper identifier\n"
-			"-h --help                      print this message and exit\n"
-			"-n --no-gatekeeper             do not register with gatekeeper\n"
+	  "-f <file> --file <file>        the name of the sound file\n"
+	  "-c <number> --call <number>    the number to call\n"
+	  "-g <addr> --gatekeeper <addr>  the IP address or DNS name of the gatekeeper\n"
+	  "-G <id> --gatekeeper-id <id>   gatekeeper identifier\n"
+	  "-h --help                      print this message and exit\n"
+	  "-n --no-gatekeeper             do not register with gatekeeper\n"
 #if PTRACING
-			"-o <file> --output <file>      send trace output to <file>\n"
+	  "-o <file> --output <file>      send trace output to <file>\n"
+	  "-t --trace                     enable trace, use multiple times for more detail\n"
 #endif
-			"-p <port> --port <port>        TCP port to listen at\n"
-#if PTRACING
-			"-t --trace                     enable trace, use multiple times for more detail\n"
-#endif
-			"-u <user> --user <user>        user name or number (can be used multiple times)\n";
+	  "-p <port> --port <port>        TCP port to listen at\n"
+	  "-u <user> --user <user>        user name or number (can be used multiple times)\n"
+	  "-F --fast-disable              Disable fast start\n"
+	  "-T --h245tunneldisable         Disable H245 tunnelling.\n";
 } 
 
 
 			"G-gatekeeper-id:"
 			"h-help."
 			"n-no-gatekeeper."
+                        "F-fast-disable."      
+                        "T-h245tunneldisable." 
 #if PTRACING
 			"o-output:"
+			"t-trace."
 #endif
 			"p-port:"
-#if PTRACING
-			"t-trace."
-#endif
 			"u-user:"
 		);
 
 		PTrace::Blocks | PTrace::Timestamp | PTrace::Thread | PTrace::FileAndLine);
 #endif 
 
-	ProgConf progConf; 
-
 	progConf.gkMode = ProgConf::RegisterWithGatekeeper; 
+	progConf.fastStart = !args.HasOption('F');
+	progConf.h245Tunnell = !args.HasOption('T');
 
 	if (args.HasOption('n')) 
 		progConf.gkMode = ProgConf::NoGatekeeper;
 	PTRACE(1, "H323 Auto Caller shutting down...");
 } 
 
+
+//////////////////////////////////////////////////////////////////////
+ProgConf::ProgConf()
+{
+  port = DEFAULT_PORT;
+  fastStart = TRUE;
+  h245Tunnell = TRUE;
+
+}
 // ***********************************************************************
 
 
 #include <ptlib.h>
 
+#include "pconf.h"
+
 
 // ***********************************************************************
 
 
 	virtual void Main(); 
 	void printHelp();  
+ protected:
+	ProgConf progConf; 
 };  
 
 
 
 #define DEFAULT_PORT 1820
 
-struct ProgConf 
+class  ProgConf 
 {
-	enum GkMode { 
-		NoGatekeeper,
-		RegisterWithGatekeeper
-	}; 
-
-	GkMode       gkMode;
-	PString      gkAddr;
-	PString      gkId;
-	WORD         port;
-	PString      fileName;
-	PString      callingNumber;
-	PStringArray userAliases;
-
-	ProgConf() { port = DEFAULT_PORT; };
+ public:
+  ProgConf();
+  enum GkMode { 
+    NoGatekeeper,
+    RegisterWithGatekeeper
+  }; 
+  
+  GkMode       gkMode;
+  PString      gkAddr;
+  PString      gkId;
+  WORD         port;
+  PString      fileName;
+  PString      callingNumber;
+  PStringArray userAliases;
+  BOOL         fastStart;
+  BOOL         h245Tunnell;
 };