[asterisk-commits] branch oej/t38passthrough r13623 - /team/oej/t38passthrough/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sun Mar 19 09:53:56 MST 2006


Author: oej
Date: Sun Mar 19 10:53:54 2006
New Revision: 13623

URL: http://svn.digium.com/view/asterisk?rev=13623&view=rev
Log:
Re-instate normal RTP bridge behaviour

Modified:
    team/oej/t38passthrough/channels/chan_sip.c

Modified: team/oej/t38passthrough/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/t38passthrough/channels/chan_sip.c?rev=13623&r1=13622&r2=13623&view=diff
==============================================================================
--- team/oej/t38passthrough/channels/chan_sip.c (original)
+++ team/oej/t38passthrough/channels/chan_sip.c Sun Mar 19 10:53:54 2006
@@ -36,6 +36,12 @@
  * \ingroup channel_drivers
  *
  */
+
+/* Optional DEFINE's -------------------- */
+/* #define T38_DEBUG 1
+	Will disable the rtp bridge and make sure media stays with Asterisk for debugging
+	of T38
+*/
 
 #include <stdio.h>
 #include <ctype.h>
@@ -1034,7 +1040,9 @@
 static struct sip_peer *temp_peer(const char *name);
 
 /*------ T38 Support --------- */
+#ifdef T38_DEBUG
 static int sip_bridge(struct ast_channel *c0, struct ast_channel *c1, int flags, struct ast_frame **fo,struct ast_channel **rc, int timeoutms);	/*!< Function to bridge to SIP channels if NOT T.38 enabled */
+#endif
 static int sip_handle_t38_reinvite(struct ast_channel *chan, struct sip_pvt *pvt, int reinvite); /*!< T38 negotiation helper function */
 static int transmit_response_with_t38_sdp(struct sip_pvt *p, char *msg, struct sip_request *req, int retrans);
 static int transmit_reinvite_with_t38_sdp(struct sip_pvt *p);
@@ -1065,7 +1073,11 @@
 	.transfer = sip_transfer,
 	.fixup = sip_fixup,
 	.send_digit = sip_senddigit,
+#ifdef T38_DEBUG
 	.bridge = sip_bridge,
+#else
+	.bridge = ast_rtp_bridge,
+#endif
 	.send_text = sip_sendtext,
 };
 
@@ -2985,7 +2997,8 @@
 	return res;
 }
 
-/*! \brief SIP bridge
+#ifdef T38_DBEUG
+/*! \brief SIP bridge for T.38 debugging
 \note	Because attempt to do a native RTP bridge between peers happens before T38 re-invites
         and that one time only, and at that moment neither peers have T38 enabled, this will
         lead to the native RTP bridge always (if canreinvite is set to yes). 
@@ -3006,6 +3019,7 @@
 	/* We can't do T38 passthrough, so go ahead with RTP bridge and possibly reinvites */
 	return ast_rtp_bridge(c0, c1, flags, fo, rc, timeoutms);
 }
+#endif
 
 /*! \brief Initiate a call in the SIP channel
 	called from sip_request_call (calls from the pbx ) */



More information about the asterisk-commits mailing list