[asterisk-commits] file: branch file/gulp_fax r394439 - in /team/file/gulp_fax: include/asterisk...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 16 09:43:01 CDT 2013


Author: file
Date: Tue Jul 16 09:43:00 2013
New Revision: 394439

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=394439
Log:
Add a configuration option to control NAT support on T.38 UDPTL sessions.

Modified:
    team/file/gulp_fax/include/asterisk/res_sip.h
    team/file/gulp_fax/res/res_sip.c
    team/file/gulp_fax/res/res_sip/sip_configuration.c
    team/file/gulp_fax/res/res_sip_t38.c

Modified: team/file/gulp_fax/include/asterisk/res_sip.h
URL: http://svnview.digium.com/svn/asterisk/team/file/gulp_fax/include/asterisk/res_sip.h?view=diff&rev=394439&r1=394438&r2=394439
==============================================================================
--- team/file/gulp_fax/include/asterisk/res_sip.h (original)
+++ team/file/gulp_fax/include/asterisk/res_sip.h Tue Jul 16 09:43:00 2013
@@ -418,6 +418,8 @@
 	unsigned int t38udptl_maxdatagram;
 	/*! Whether fax detection is enabled or not (CNG tone detection) */
 	unsigned int faxdetect;
+	/*! Whether NAT Support is enabled for T.38 UDPTL sessions or not */
+	unsigned int t38udptl_nat;
 };
 
 /*!

Modified: team/file/gulp_fax/res/res_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/file/gulp_fax/res/res_sip.c?view=diff&rev=394439&r1=394438&r2=394439
==============================================================================
--- team/file/gulp_fax/res/res_sip.c (original)
+++ team/file/gulp_fax/res/res_sip.c Tue Jul 16 09:43:00 2013
@@ -423,6 +423,13 @@
 						detected.
 					</para></description>
 				</configOption>
+				<configOption name="t38udptl_nat" default="no">
+					<synopsis>Whether NAT support is enabled on UDPTL sessions</synopsis>
+					<description><para>
+						When enabled the UDPTL stack will send UDPTL packets to the source address of
+						received packets.
+					</para></description>
+				</configOption>
 			</configObject>
 			<configObject name="auth">
 				<synopsis>Authentication type</synopsis>

Modified: team/file/gulp_fax/res/res_sip/sip_configuration.c
URL: http://svnview.digium.com/svn/asterisk/team/file/gulp_fax/res/res_sip/sip_configuration.c?view=diff&rev=394439&r1=394438&r2=394439
==============================================================================
--- team/file/gulp_fax/res/res_sip/sip_configuration.c (original)
+++ team/file/gulp_fax/res/res_sip/sip_configuration.c Tue Jul 16 09:43:00 2013
@@ -680,6 +680,7 @@
 	ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "t38udptl_ec", "none", t38udptl_ec_handler, NULL, 0, 0);
 	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "t38udptl_maxdatagram", "0", OPT_UINT_T, 0, FLDSET(struct ast_sip_endpoint, t38udptl_maxdatagram));
 	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "faxdetect", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, faxdetect));
+	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "t38udptl_nat", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, t38udptl_nat));
 
 	if (ast_sip_initialize_sorcery_transport(sip_sorcery)) {
 		ast_log(LOG_ERROR, "Failed to register SIP transport support with sorcery\n");

Modified: team/file/gulp_fax/res/res_sip_t38.c
URL: http://svnview.digium.com/svn/asterisk/team/file/gulp_fax/res/res_sip_t38.c?view=diff&rev=394439&r1=394438&r2=394439
==============================================================================
--- team/file/gulp_fax/res/res_sip_t38.c (original)
+++ team/file/gulp_fax/res/res_sip_t38.c Tue Jul 16 09:43:00 2013
@@ -214,8 +214,8 @@
 
 	ast_channel_set_fd(session->channel, 5, ast_udptl_fd(session_media->udptl));
 	ast_udptl_set_error_correction_scheme(session_media->udptl, session->endpoint->t38udptl_ec);
-
-	/* XXX Need to set NAT */
+	ast_udptl_setnat(session_media->udptl, session->endpoint->t38udptl_nat);
+
 	return 0;
 }
 




More information about the asterisk-commits mailing list