[asterisk-commits] mnicholson: branch irroot/t38gateway-trunk r325810 - in /team/irroot/t38gatew...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jun 30 11:10:24 CDT 2011


Author: mnicholson
Date: Thu Jun 30 11:10:20 2011
New Revision: 325810

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=325810
Log:
documentation changes and fixes

Modified:
    team/irroot/t38gateway-trunk/CHANGES
    team/irroot/t38gateway-trunk/res/res_fax.c

Modified: team/irroot/t38gateway-trunk/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-trunk/CHANGES?view=diff&rev=325810&r1=325809&r2=325810
==============================================================================
--- team/irroot/t38gateway-trunk/CHANGES (original)
+++ team/irroot/t38gateway-trunk/CHANGES Thu Jun 30 11:10:20 2011
@@ -155,6 +155,10 @@
  * The ReceiveFAXStatus and SendFAXStatus manager events have been consolidated
    into a FAXStatus event with an 'Operation' header that will be either
    'send', 'receive', and 'gateway'.
+ * T.38 gateway functionality has been added to res_fax (and res_fax_spandsp).
+   Set FAXOPT(faxgateway)=yes to enable this functionality on a channel. This
+   feature will handle converting a fax call between an audio T.30 fax terminal
+   and an IFP T.38 fax terminal.
 
 ------------------------------------------------------------------------------
 --- Functionality changes from Asterisk 1.6.2 to Asterisk 1.8 ----------------
@@ -675,9 +679,6 @@
    applications will be lost, and that if the 'fax' logger level is directed to
    the console, the 'core set verbose' and 'core set debug' CLI commands will
    have no effect on whether the messages appear on the console or not.
- * FAXOPT(faxgateway) will enable a framehook that will take care of T.38
-   negotiation on reciving a CED tone on a channel. this gateway is to allow
-   translation of Audio T.30 [alaw/ulaw] to IFP T.38 terminals.
 
 Miscellaneous
 -------------

Modified: team/irroot/t38gateway-trunk/res/res_fax.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-trunk/res/res_fax.c?view=diff&rev=325810&r1=325809&r2=325810
==============================================================================
--- team/irroot/t38gateway-trunk/res/res_fax.c (original)
+++ team/irroot/t38gateway-trunk/res/res_fax.c Thu Jun 30 11:10:20 2011
@@ -254,22 +254,22 @@
 
 /*! \brief used for gateway framehook */
 struct fax_gateway {
-	/*! FAX Session*/
+	/*! \brief FAX Session */
 	struct ast_fax_session *s;
-	/*! reserved fax session token */
+	/*! \brief reserved fax session token */
 	struct ast_fax_tech_token *token;
-	/*! the start of our timeout counter */
+	/*! \brief the start of our timeout counter */
 	struct timeval timeout_start;
-	/*! DSP Processor*/
+	/*! \brief DSP Processor */
 	struct ast_dsp *chan_dsp;
 	struct ast_dsp *peer_dsp;
-	/*! framehook used in gateway mode */
+	/*! \brief framehook used in gateway mode */
 	int framehook;
-	/*! bridged*/
+	/*! \brief bridged */
 	int bridged:1;
-	/*! a flag to track the state of our negotiation */
+	/*! \brief a flag to track the state of our negotiation */
 	enum ast_t38_state t38_state;
-	/*Original audio formats*/
+	/*! \brief original audio formats */
 	struct ast_format chan_read_format;
 	struct ast_format chan_write_format;
 	struct ast_format peer_read_format;
@@ -516,7 +516,7 @@
 	/* add the datastore to the channel and increment the refcount */
 	datastore->data = details;
 
-	/*init default T38 paramaters*/
+	/* initialize default T.38 parameters */
 	t38_parameters_ast_to_fax(&details->our_t38_parameters, &our_t38_parameters);
 	t38_parameters_ast_to_fax(&details->their_t38_parameters, &our_t38_parameters);
 
@@ -1125,7 +1125,7 @@
 		details->caps |= AST_FAX_TECH_AUDIO;
 		break;
 	case T38_STATE_NEGOTIATED:
-		/* i am already T.38 have i been answered already and switched to T.38 ?? */
+		/* already in T.38 mode? This should not happen. */
 	case T38_STATE_NEGOTIATING: {
 		/* the other end already sent us a T.38 reinvite, so we need to prod the channel
 		 * driver into resending their parameters to us if it supports doing so... if
@@ -2790,16 +2790,19 @@
 	ao2_ref(gateway, -1);
 }
 
-/*! \brief T.30<->T.38 gateway frame hook
- * \details intercept packets on bridged channels and determine if a T.38 gateway is required.
- * when a CED faxtone is detected send a T.38 negotiate from the non T.38 channel.
- * all T.38 negotiation needs to be handled where one channel is not T.38 capable.
- * the gateway object will transmit frames i need to read native frames from both channels.
- * \param chan channel im attached too
+/*! \brief T.30<->T.38 gateway framehook.
+ *
+ * Intercept packets on bridged channels and determine if a T.38 gateway is
+ * required. If a gateway is required, start a gateway and handle T.38
+ * negotiation if necessary.
+ *
+ * \param chan channel running the gateway
  * \param f frame to handle may be NULL
  * \param event framehook event
- * \param data framehook data (gateway)
- * \return processed frame or NULL when f is NULL or a null frame*/
+ * \param data framehook data (struct fax_gateway *)
+ *
+ * \return processed frame or NULL when f is NULL or a null frame
+ */
 static struct ast_frame *fax_gateway_framehook(struct ast_channel *chan, struct ast_frame *f, enum ast_framehook_event event, void *data) {
 	struct fax_gateway *gateway = data;
 	struct ast_channel *peer, *active;
@@ -2958,6 +2961,9 @@
 
 /*! \brief Attach a gateway framehook object to a channel.
  * \param chan the channel to attach to
+ * \param details fax session details
+ * \return the framehook id of the attached framehook or -1 on error
+ * \retval -1 error
  */
 static int fax_gateway_attach(struct ast_channel *chan, struct ast_fax_session_details *details)
 {




More information about the asterisk-commits mailing list