[svn-commits] oej: branch 1.4 r47507 - /branches/1.4/channels/chan_sip.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Sun Nov 12 08:10:53 MST 2006


Author: oej
Date: Sun Nov 12 09:10:53 2006
New Revision: 47507

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47507
Log:
-Remove blocking of ptime: parsing in sdp
-Add some comments to t.38 code


Modified:
    branches/1.4/channels/chan_sip.c

Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=47507&r1=47506&r2=47507
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Sun Nov 12 09:10:53 2006
@@ -4832,10 +4832,6 @@
 				/* SRTP stuff, not yet supported */
 				if (debug)
 					ast_verbose("Got unsupported a:crypto in SDP offer \n");
-				breakout = TRUE;
-			} else if (!strncasecmp(a, "ptime:", (size_t) 6)) {
-				if (debug)
-					ast_verbose("Got unsupported a:ptime in SDP offer \n");
 				breakout = TRUE;
 			}
 			if (breakout)	/* We have a match, skip to next header */
@@ -16337,6 +16333,11 @@
 	return 0;
 }
 
+/*! \brief Handle T38 reinvite 
+	\todo Make sure we don't destroy the call if we can't handle the re-invite. 
+	Nothing should be changed until we have processed the SDP and know that we
+	can handle it.
+*/
 static int sip_handle_t38_reinvite(struct ast_channel *chan, struct sip_pvt *pvt, int reinvite)
 {
 	struct sip_pvt *p;
@@ -16348,12 +16349,21 @@
 	
 	/* Setup everything on the other side like offered/responded from first side */
 	ast_mutex_lock(&p->lock);
+
+	/*! \todo check if this is not set earlier when setting up the PVT. If not
+		maybe it should move there. */
 	p->t38.jointcapability = p->t38.peercapability = pvt->t38.jointcapability;
+
 	ast_udptl_set_far_max_datagram(p->udptl, ast_udptl_get_local_max_datagram(pvt->udptl));
 	ast_udptl_set_local_max_datagram(p->udptl, ast_udptl_get_local_max_datagram(pvt->udptl));
 	ast_udptl_set_error_correction_scheme(p->udptl, ast_udptl_get_error_correction_scheme(pvt->udptl));
 	
 	if (reinvite) {		/* If we are handling sending re-invite to the other side of the bridge */
+		/*! \note The SIP_CAN_REINVITE flag is for RTP media redirects,
+			not really T38 re-invites which are different. In this
+			case it's used properly, to see if we can reinvite over
+			NAT 
+		*/
 		if (ast_test_flag(&p->flags[0], SIP_CAN_REINVITE) && ast_test_flag(&pvt->flags[0], SIP_CAN_REINVITE)) {
 			ast_udptl_get_peer(pvt->udptl, &p->udptlredirip);
 			flag =1;



More information about the svn-commits mailing list