[asterisk-commits] pcadach: branch pcadach/chan_h323-live r42718 - in /team/pcadach/chan_h323-li...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Sep 11 09:52:19 MST 2006


Author: pcadach
Date: Mon Sep 11 11:52:18 2006
New Revision: 42718

URL: http://svn.digium.com/view/asterisk?rev=42718&view=rev
Log:
Remove <no> prefix from options

Modified:
    team/pcadach/chan_h323-live/channels/chan_h323.c
    team/pcadach/chan_h323-live/channels/h323/ast_h323.cpp
    team/pcadach/chan_h323-live/channels/h323/chan_h323.h
    team/pcadach/chan_h323-live/configs/h323.conf.sample

Modified: team/pcadach/chan_h323-live/channels/chan_h323.c
URL: http://svn.digium.com/view/asterisk/team/pcadach/chan_h323-live/channels/chan_h323.c?rev=42718&r1=42717&r2=42718&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/channels/chan_h323.c (original)
+++ team/pcadach/chan_h323-live/channels/chan_h323.c Mon Sep 11 11:52:18 2006
@@ -1189,6 +1189,9 @@
 	return a;
 }
 
+#define DEPRECATED(_v, _new_opt) \
+	ast_log(LOG_WARNING, "Option %s found at line %d has beed deprecated. Use %s instead.\n", (_v)->name, (_v)->lineno, (_new_opt))
+
 static int update_common_options(struct ast_variable *v, struct call_options *options)
 {
 	int tmp;
@@ -1217,11 +1220,20 @@
 	} else if (!strcasecmp(v->name, "nat")) {
 		options->nat = ast_true(v->value);
 	} else if (!strcasecmp(v->name, "noFastStart")) {
-		options->noFastStart = ast_true(v->value);
+		DEPRECATED(v, "fastStart");
+		options->fastStart = !ast_true(v->value);
+	} else if (!strcasecmp(v->name, "fastStart")) {
+		options->fastStart = ast_true(v->value);
 	} else if (!strcasecmp(v->name, "noH245Tunneling")) {
-		options->noH245Tunneling = ast_true(v->value);
+		DEPRECATED(v, "h245Tunneling");
+		options->h245Tunneling = !ast_true(v->value);
+	} else if (!strcasecmp(v->name, "h245Tunneling")) {
+		options->h245Tunneling = ast_true(v->value);
 	} else if (!strcasecmp(v->name, "noSilenceSuppression")) {
-		options->noSilenceSuppression = ast_true(v->value);
+		DEPRECATED(v, "silenceSuppression");
+		options->silenceSuppression = !ast_true(v->value);
+	} else if (!strcasecmp(v->name, "silenceSuppression")) {
+		options->silenceSuppression = ast_true(v->value);
 	} else if (!strcasecmp(v->name, "progress_setup")) {
 		tmp = atoi(v->value);
 		if ((tmp != 0) && (tmp != 1) && (tmp != 3) && (tmp != 8)) {
@@ -1243,6 +1255,7 @@
 
 	return 0;
 }
+#undef DEPRECATED
 
 static struct oh323_user *build_user(char *name, struct ast_variable *v, int realtime)
 {
@@ -2546,6 +2559,8 @@
 	gk_disable = gatekeeper_disable;
 	memset(&bindaddr, 0, sizeof(bindaddr));
 	memset(&global_options, 0, sizeof(global_options));
+	global_options.fastStart = 1;
+	global_options.h245Tunneling = 1;
 	global_options.dtmfcodec = 101;
 	global_options.dtmfmode = H323_DTMF_RFC2833;
 	global_options.capability = GLOBAL_CAPABILITY;

Modified: team/pcadach/chan_h323-live/channels/h323/ast_h323.cpp
URL: http://svn.digium.com/view/asterisk/team/pcadach/chan_h323-live/channels/h323/ast_h323.cpp?rev=42718&r1=42717&r2=42718&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/channels/h323/ast_h323.cpp (original)
+++ team/pcadach/chan_h323-live/channels/h323/ast_h323.cpp Mon Sep 11 11:52:18 2006
@@ -650,22 +650,22 @@
 	call_options_t *opts = (call_options_t *)userData;
 	MyH323Connection *conn;
 
-	if (opts && opts->noFastStart) {
+	if (opts && opts->fastStart) {
+		options |= H323Connection::FastStartOptionEnable;
+	} else {
 		options |= H323Connection::FastStartOptionDisable;
+	}
+	if (opts && opts->h245Tunneling) {
+		options |= H323Connection::H245TunnelingOptionEnable;
 	} else {
-		options |= H323Connection::FastStartOptionEnable;
-	}
-	if (opts && opts->noH245Tunneling) {
 		options |= H323Connection::H245TunnelingOptionDisable;
-	} else {
-		options |= H323Connection::H245TunnelingOptionEnable;
 	}
 /* Disable until I can figure out the proper way to deal with this */
 #if 0
-	if (opts->noSilenceSuppression) {
-		options |= H323Connection::SilenceSuppresionOptionDisable;
+	if (opts->silenceSuppression) {
+		options |= H323Connection::SilenceSuppresionOptionEnable;
 	} else {
-		options |= H323Connection::SilenceSUppressionOptionEnable;
+		options |= H323Connection::SilenceSUppressionOptionDisable;
 	}
 #endif
 	conn = new MyH323Connection(*this, callReference, options);
@@ -805,15 +805,15 @@
 	dtmfMode = opts->dtmfmode;
 
 	if (isIncoming) {
-		if (opts->noFastStart)
+		if (opts->fastStart)
+			fastStartState = FastStartInitiate;
+		else
 			fastStartState = FastStartDisabled;
+
+		if (opts->h245Tunneling)
+			h245Tunneling = TRUE;
 		else
-			fastStartState = FastStartInitiate;
-
-		if (opts->noH245Tunneling)
 			h245Tunneling = FALSE;
-		else
-			h245Tunneling = TRUE;
 	}
 
 	if (opts->cid_num) {

Modified: team/pcadach/chan_h323-live/channels/h323/chan_h323.h
URL: http://svn.digium.com/view/asterisk/team/pcadach/chan_h323-live/channels/h323/chan_h323.h?rev=42718&r1=42717&r2=42718&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/channels/h323/chan_h323.h (original)
+++ team/pcadach/chan_h323-live/channels/h323/chan_h323.h Mon Sep 11 11:52:18 2006
@@ -33,9 +33,9 @@
 typedef struct call_options {
 	char			cid_num[80];
 	char			cid_name[80];
-	int				noFastStart;
-	int				noH245Tunneling;
-	int				noSilenceSuppression;
+	int				fastStart;
+	int				h245Tunneling;
+	int				silenceSuppression;
 	int				progress_setup;
 	int				progress_alert;
 	int				progress_audio;

Modified: team/pcadach/chan_h323-live/configs/h323.conf.sample
URL: http://svn.digium.com/view/asterisk/team/pcadach/chan_h323-live/configs/h323.conf.sample?rev=42718&r1=42717&r2=42718&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/configs/h323.conf.sample (original)
+++ team/pcadach/chan_h323-live/configs/h323.conf.sample Mon Sep 11 11:52:18 2006
@@ -160,6 +160,7 @@
 ;host=192.168.1.1
 ;context=incoming
 ;incominglimit=4
+;h245Tunneling=no
 ;
 ;
 ; Outbound H.323 call to Larry using SlowStart
@@ -167,7 +168,7 @@
 ;[Larry]
 ;type=peer
 ;host=192.168.2.1
-;noFastStart=yes
+;fastStart=no
 
 
 



More information about the asterisk-commits mailing list