[asterisk-commits] mjordan: trunk r351235 - in /trunk: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jan 17 10:08:48 CST 2012


Author: mjordan
Date: Tue Jan 17 10:08:43 2012
New Revision: 351235

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=351235
Log:
Fix udptl issue with initial INVITE introduced by r351027

When an inital INVITE occurs that contains image media, a channel
is not yet associated with the SIP dialog.  The file descriptor
associated with the udptl session needs to be set in
initialize_udptl or in sip_new to account for this scenario.
........

Merged revisions 351233 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 351234 from http://svn.asterisk.org/svn/asterisk/branches/10

Modified:
    trunk/   (props changed)
    trunk/channels/chan_sip.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=351235&r1=351234&r2=351235
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Jan 17 10:08:43 2012
@@ -6814,12 +6814,6 @@
 		return 1;
 	}
 
-	if (!p->owner) {
-		ast_log(AST_LOG_WARNING, "Attempted to create UDPTL for dialog with no channel - disabling T38 for this dialog\n");
-		ast_clear_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;
@@ -6827,7 +6821,9 @@
 
 	/* T38 can be supported by this dialog, create it and set the derived properties */
 	if ((p->udptl = ast_udptl_new_with_bindaddr(sched, io, 0, &bindaddr))) {
-		ast_channel_set_fd(p->owner, 5, ast_udptl_fd(p->udptl));
+		if (p->owner) {
+			ast_channel_set_fd(p->owner, 5, ast_udptl_fd(p->udptl));
+		}
 
 		ast_udptl_setqos(p->udptl, global_tos_audio, global_cos_audio);
 		p->t38_maxdatagram = p->relatedpeer ? p->relatedpeer->t38_maxdatagram : global_t38_maxdatagram;
@@ -7146,6 +7142,9 @@
 	}
 	if (needtext && i->trtp) {
 		ast_channel_set_fd(tmp, 4, ast_rtp_instance_fd(i->trtp, 0));
+	}
+	if (i->udptl) {
+		ast_channel_set_fd(tmp, 5, ast_udptl_fd(i->udptl));
 	}
 
 	if (state == AST_STATE_RING) {




More information about the asterisk-commits mailing list