[svn-commits] file: branch file/gulp_fax r395397 - in /team/file/gulp_fax: channels/ includ...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jul 25 08:42:17 CDT 2013


Author: file
Date: Thu Jul 25 08:42:15 2013
New Revision: 395397

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=395397
Log:
Incorporate review feedback.

Modified:
    team/file/gulp_fax/channels/chan_gulp.c
    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/channels/chan_gulp.c
URL: http://svnview.digium.com/svn/asterisk/team/file/gulp_fax/channels/chan_gulp.c?view=diff&rev=395397&r1=395396&r2=395397
==============================================================================
--- team/file/gulp_fax/channels/chan_gulp.c (original)
+++ team/file/gulp_fax/channels/chan_gulp.c Thu Jul 25 08:42:15 2013
@@ -679,7 +679,7 @@
 
 	target_context = S_OR(ast_channel_macrocontext(session->channel), ast_channel_context(session->channel));
 
-	/* We need to luck the channel here because ast_exists_extension has the
+	/* We need to unlock the channel here because ast_exists_extension has the
 	 * potential to start and stop an autoservice on the channel. Such action
 	 * is prone to deadlock if the channel is locked.
 	 */

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=395397&r1=395396&r2=395397
==============================================================================
--- team/file/gulp_fax/include/asterisk/res_sip.h (original)
+++ team/file/gulp_fax/include/asterisk/res_sip.h Thu Jul 25 08:42:15 2013
@@ -444,6 +444,8 @@
 	unsigned int faxdetect;
 	/*! Whether NAT Support is enabled for T.38 UDPTL sessions or not */
 	unsigned int t38udptl_nat;
+	/*! Whether to use IPv6 for UDPTL or not */
+	unsigned int t38udptl_ipv6;
 	/*! Determines if transfers (using REFER) are allowed by this endpoint */
 	unsigned int allowtransfer;
 	/*! DSCP TOS bits for audio streams */

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=395397&r1=395396&r2=395397
==============================================================================
--- team/file/gulp_fax/res/res_sip.c (original)
+++ team/file/gulp_fax/res/res_sip.c Thu Jul 25 08:42:15 2013
@@ -430,6 +430,12 @@
 						received packets.
 					</para></description>
 				</configOption>
+				<configOption name="t38udptl_ipv6" default="no">
+					<synopsis>Whether IPv6 is used for UDPTL Sessions</synopsis>
+					<description><para>
+						When enabled the UDPTL stack will use IPv6.
+					</para></description>
+				</configOption>
 				<configOption name="tonezone">
 					<synopsis>Set which country's indications to use for channels created for this endpoint.</synopsis>
 				</configOption>

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=395397&r1=395396&r2=395397
==============================================================================
--- team/file/gulp_fax/res/res_sip/sip_configuration.c (original)
+++ team/file/gulp_fax/res/res_sip/sip_configuration.c Thu Jul 25 08:42:15 2013
@@ -681,6 +681,7 @@
 	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));
+	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "t38udptl_ipv6", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, t38udptl_ipv6));
 	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "rtpengine", "asterisk", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, rtp_engine));
 	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "tonezone", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, zone));
 	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "language", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, language));

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=395397&r1=395396&r2=395397
==============================================================================
--- team/file/gulp_fax/res/res_sip_t38.c (original)
+++ team/file/gulp_fax/res/res_sip_t38.c Thu Jul 25 08:42:15 2013
@@ -54,6 +54,9 @@
 /*! \brief Address for IPv4 UDPTL */
 static struct ast_sockaddr address_ipv4;
 
+/*! \brief Address for IPv6 UDPTL */
+static struct ast_sockaddr address_ipv6;
+
 /*! \brief T.38 state information */
 struct t38_state {
 	/*! \brief Current state */
@@ -244,7 +247,8 @@
 		return 0;
 	}
 
-	if (!(session_media->udptl = ast_udptl_new_with_bindaddr(NULL, NULL, 0, &address_ipv4))) {
+	if (!(session_media->udptl = ast_udptl_new_with_bindaddr(NULL, NULL, 0,
+		session->endpoint->t38udptl_ipv6 ? &address_ipv6 : &address_ipv4))) {
 		return -1;
 	}
 
@@ -627,6 +631,7 @@
 	pj_pool_t *pool = session->inv_session->pool_prov;
 	static const pj_str_t STR_IN = { "IN", 2 };
 	static const pj_str_t STR_IP4 = { "IP4", 3};
+	static const pj_str_t STR_IP6 = { "IP6", 3};
 	static const pj_str_t STR_UDPTL = { "udptl", 5 };
 	static const pj_str_t STR_T38 = { "t38", 3 };
 	static const pj_str_t STR_TRANSFERREDTCF = { "transferredTCF", 14 };
@@ -662,7 +667,7 @@
 	if (ast_strlen_zero(session->endpoint->external_media_address)) {
 		pj_sockaddr localaddr;
 
-		if (pj_gethostip(pj_AF_INET(), &localaddr)) {
+		if (pj_gethostip(session->endpoint->t38udptl_ipv6 ? pj_AF_INET6() : pj_AF_INET(), &localaddr)) {
 			return -1;
 		}
 		pj_sockaddr_print(&localaddr, hostip, sizeof(hostip), 2);
@@ -671,7 +676,7 @@
 	}
 
 	media->conn->net_type = STR_IN;
-	media->conn->addr_type = STR_IP4;
+	media->conn->addr_type = session->endpoint->t38udptl_ipv6 ? STR_IP6 : STR_IP4;
 	pj_strdup2(pool, &media->conn->addr, hostip);
 	ast_udptl_get_us(session_media->udptl, &addr);
 	media->desc.port = (pj_uint16_t) ast_sockaddr_port(&addr);
@@ -815,6 +820,7 @@
 static int load_module(void)
 {
 	ast_sockaddr_parse(&address_ipv4, "0.0.0.0", 0);
+	ast_sockaddr_parse(&address_ipv6, "::", 0);
 
 	if (ast_sip_session_register_supplement(&t38_supplement)) {
 		ast_log(LOG_ERROR, "Unable to register T.38 session supplement\n");




More information about the svn-commits mailing list