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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jan 13 17:27:36 CST 2012


Author: mjordan
Date: Fri Jan 13 17:27:31 2012
New Revision: 350786

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=350786
Log:
Tweaked where we set the fd

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=350786&r1=350785&r2=350786
==============================================================================
--- team/mjordan/udptl/channels/chan_sip.c (original)
+++ team/mjordan/udptl/channels/chan_sip.c Fri Jan 13 17:27:31 2012
@@ -6741,21 +6741,20 @@
 
 	/* 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);
-
-		ast_debug(1, "Setting NAT on UDPTL to %s\n", natflags ? "On" : "Off");
-		ast_udptl_setnat(p->udptl, natflags);
-
 		if (p->owner) {
 			ast_channel_set_fd(p->owner, 5, ast_udptl_fd(p->udptl));
 		} else {
 			ast_log(AST_LOG_WARNING, "UDPTL session %p created for dialog %p with no channel owner\n", p->udptl, p);
-		}
+			ast_clear_flag(&p->flags[1], SIP_PAGE2_T38SUPPORT);
+			return 1;
+		}
+
+		ast_udptl_setqos(p->udptl, global_tos_audio, global_cos_audio);
+		p->t38_maxdatagram = p->relatedpeer ? p->relatedpeer->t38_maxdatagram : global_t38_maxdatagram;
+		set_t38_capabilities(p);
+
+		ast_debug(1, "Setting NAT on UDPTL to %s\n", natflags ? "On" : "Off");
+		ast_udptl_setnat(p->udptl, natflags);
 	} 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");




More information about the asterisk-commits mailing list