[asterisk-commits] mjordan: branch mjordan/udptl r350362 - /team/mjordan/udptl/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jan 11 10:26:40 CST 2012


Author: mjordan
Date: Wed Jan 11 10:26:36 2012
New Revision: 350362

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=350362
Log:
Fix dumb mistake

Modified:
    team/mjordan/udptl/channels/chan_sip.c

Modified: team/mjordan/udptl/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/udptl/channels/chan_sip.c?view=diff&rev=350362&r1=350361&r2=350362
==============================================================================
--- team/mjordan/udptl/channels/chan_sip.c (original)
+++ team/mjordan/udptl/channels/chan_sip.c Wed Jan 11 10:26:36 2012
@@ -6726,6 +6726,35 @@
 	return res;
 }
 
+static int initialize_udptl(struct sip_pvt *p)
+{
+	if (!ast_test_flag(&p->flags[1], SIP_PAGE2_T38SUPPORT)) {
+		return 1;
+	}
+
+	/* If we've already initialized T38, don't take any further action */
+	if (p->udptl) {
+		return 0;
+	}
+
+	/* If T38 could be supported by this dialog, create it now */
+	if ((p->udptl = ast_udptl_new_with_bindaddr(sched, io, 0, &bindaddr))) {
+		ast_udptl_setqos(p->udptl, global_tos_audio, global_cos_audio);
+		/* Since the udptl session probably didn't exist when check_user_full was called,
+		 * apply the peer's T38 information here if one exists
+		 */
+		p->t38_maxdatagram = p->relatedpeer ? p->relatedpeer->t38_maxdatagram : global_t38_maxdatagram;
+		set_t38_capabilities(p);
+	} else {
+		/* udptl creation failed, T38 can not be supported on this dialog */
+		ast_log(AST_LOG_WARNING, "UDPTL creation failed - disabling T38 for this dialog\n");
+		ast_clear_flag(&p->flags[1], SIP_PAGE2_T38SUPPORT);
+		return 1;
+	}
+
+	return 0;
+}
+
 /*! \brief Play indication to user
  * With SIP a lot of indications is sent as messages, letting the device play
    the indication - busy signal, congestion etc
@@ -8648,35 +8677,6 @@
 static int sockaddr_is_null_or_any(const struct ast_sockaddr *addr)
 {
 	return ast_sockaddr_isnull(addr) || ast_sockaddr_is_any(addr);
-}
-
-static int initialize_udptl(struct sip_pvt *p)
-{
-	if (!ast_test_flag(&p->flags[1], SIP_PAGE2_T38SUPPORT)) {
-		return 1;
-	}
-
-	/* If we've already initialized T38, don't take any further action */
-	if (p->udptl) {
-		return 0;
-	}
-
-	/* If T38 could be supported by this dialog, create it now */
-	if ((p->udptl = ast_udptl_new_with_bindaddr(sched, io, 0, &bindaddr))) {
-		ast_udptl_setqos(p->udptl, global_tos_audio, global_cos_audio);
-		/* Since the udptl session probably didn't exist when check_user_full was called,
-		 * apply the peer's T38 information here if one exists
-		 */
-		p->t38_maxdatagram = p->relatedpeer ? p->relatedpeer->t38_maxdatagram : global_t38_maxdatagram;
-		set_t38_capabilities(p);
-	} else {
-		/* udptl creation failed, T38 can not be supported on this dialog */
-		ast_log(AST_LOG_WARNING, "UDPTL creation failed - disabling T38 for this dialog\n");
-		ast_clear_flag(&p->flags[1], SIP_PAGE2_T38SUPPORT);
-		return 1;
-	}
-
-	return 0;
 }
 
 /*! \brief Process SIP SDP offer, select formats and activate RTP channels




More information about the asterisk-commits mailing list