[asterisk-commits] branch oej/test-this-branch r15330 - /team/oej/test-this-branch/channels/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Mar 27 14:58:29 MST 2006


Author: oej
Date: Mon Mar 27 15:58:28 2006
New Revision: 15330

URL: http://svn.digium.com/view/asterisk?rev=15330&view=rev
Log:
Update t38 support to use handle_common_options on steroids

Modified:
    team/oej/test-this-branch/channels/chan_sip.c

Modified: team/oej/test-this-branch/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/channels/chan_sip.c?rev=15330&r1=15329&r2=15330&view=diff
==============================================================================
--- team/oej/test-this-branch/channels/chan_sip.c (original)
+++ team/oej/test-this-branch/channels/chan_sip.c Mon Mar 27 15:58:28 2006
@@ -12845,6 +12845,15 @@
 	} else if (!strcasecmp(v->name, "allowsubscribe")) {
 		ast_set_flag(&mask[1], SIP_PAGE2_ALLOWSUBSCRIBE);
 		ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_ALLOWSUBSCRIBE);
+	} else if (!strcasecmp(v->name, "t38pt_udptl")) {
+		ast_set_flag(&mask[1], SIP_PAGE2_T38SUPPORT_UDPTL);
+		ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_T38SUPPORT_UDPTL);
+	} else if (!strcasecmp(v->name, "t38pt_rtp")) {
+		ast_set_flag(&mask[1], SIP_PAGE2_T38SUPPORT_RTP);
+		ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_T38SUPPORT_RTP);
+	} else if (!strcasecmp(v->name, "t38pt_tcp")) {
+		ast_set_flag(&mask[1], SIP_PAGE2_T38SUPPORT_TCP);
+		ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_T38SUPPORT_TCP);
 	}
 
 	return res;
@@ -13127,21 +13136,6 @@
 			user->callingpres = ast_parse_caller_presentation(v->value);
 			if (user->callingpres == -1)
 				user->callingpres = atoi(v->value);
-		} else if (!strcasecmp(v->name, "t38pt_udptl")) {
-			if (ast_true(v->value)) {
-				ast_set_flag(&user->flags[1], SIP_PAGE2_T38SUPPORT_UDPTL);
-			} else
-				ast_clear_flag(&user->flags[1], SIP_PAGE2_T38SUPPORT_UDPTL);
-		} else if (!strcasecmp(v->name, "t38pt_rtp")) {
-			if (ast_true(v->value)) {
-				ast_set_flag(&user->flags[1], SIP_PAGE2_T38SUPPORT_RTP);
-			} else
-				ast_clear_flag(&user->flags[1], SIP_PAGE2_T38SUPPORT_RTP);
-		} else if (!strcasecmp(v->name, "t38pt_tcp")) {
-			if (ast_true(v->value)) {
-				ast_set_flag(&user->flags[1], SIP_PAGE2_T38SUPPORT_TCP);
-			} else
-				ast_clear_flag(&user->flags[1], SIP_PAGE2_T38SUPPORT_TCP);
 		} else if (!strcasecmp(v->name, "maxcallbitrate")) {
 			user->maxcallbitrate = atoi(v->value);
 			if (user->maxcallbitrate < 0)
@@ -13369,21 +13363,6 @@
 				ast_log(LOG_WARNING, "'%s' is not a valid RTP keepalive time at line %d.  Using default.\n", v->value, v->lineno);
 				peer->rtpkeepalive = global_rtpkeepalive;
 			}
-		} else if (!strcasecmp(v->name, "t38pt_udptl")) {
-			if (ast_true(v->value)) {
-				ast_set_flag(&peer->flags[1], SIP_PAGE2_T38SUPPORT_UDPTL);
-			} else
-				ast_clear_flag(&peer->flags[1], SIP_PAGE2_T38SUPPORT_UDPTL);
-		} else if (!strcasecmp(v->name, "t38pt_rtp")) {
-			if (ast_true(v->value)) {
-				ast_set_flag(&peer->flags[1], SIP_PAGE2_T38SUPPORT_RTP);
-			} else
-				ast_clear_flag(&peer->flags[1], SIP_PAGE2_T38SUPPORT_RTP);
-		} else if (!strcasecmp(v->name, "t38pt_tcp")) {
-			if (ast_true(v->value)) {
-				ast_set_flag(&peer->flags[1], SIP_PAGE2_T38SUPPORT_TCP);
-			} else
-				ast_clear_flag(&peer->flags[1], SIP_PAGE2_T38SUPPORT_TCP);
 		} else if (!strcasecmp(v->name, "setvar")) {
 			/* Set peer channel variable */
 			varname = ast_strdupa(v->value);
@@ -13644,18 +13623,6 @@
 			/* Port needs to be after IP */
 			sscanf(v->value, "%d", &format);
 			outboundproxyip.sin_port = htons(format);
-		} else if (!strcasecmp(v->name, "t38pt_udptl")) {
-			if (ast_true(v->value)) {
-				ast_set_flag(&global_flags[1], SIP_PAGE2_T38SUPPORT_UDPTL);
-			}
-		} else if (!strcasecmp(v->name, "t38pt_rtp")) {
-			if (ast_true(v->value)) {
-				ast_set_flag(&global_flags[1], SIP_PAGE2_T38SUPPORT_RTP);
-			}
-		} else if (!strcasecmp(v->name, "t38pt_tcp")) {
-			if (ast_true(v->value)) {
-				ast_set_flag(&global_flags[1], SIP_PAGE2_T38SUPPORT_TCP);
-			}
 		} else if (!strcasecmp(v->name, "autocreatepeer")) {
 			autocreatepeer = ast_true(v->value);
 		} else if (!strcasecmp(v->name, "srvlookup")) {



More information about the asterisk-commits mailing list