[svn-commits] irroot: branch irroot/distrotech-customers-trunk r319018 - in /team/irroot/di...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun May 15 05:35:06 CDT 2011


Author: irroot
Date: Sun May 15 05:35:02 2011
New Revision: 319018

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=319018
Log:
Merge Changes from T38 gateway


Modified:
    team/irroot/distrotech-customers-trunk/   (props changed)
    team/irroot/distrotech-customers-trunk/addons/chan_ooh323.c
    team/irroot/distrotech-customers-trunk/cel/cel_odbc.c   (props changed)
    team/irroot/distrotech-customers-trunk/configs/cel_odbc.conf.sample   (props changed)
    team/irroot/distrotech-customers-trunk/res/res_fax_spandsp.c
    team/irroot/distrotech-customers-trunk/sounds/Makefile   (props changed)

Propchange: team/irroot/distrotech-customers-trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun May 15 05:35:02 2011
@@ -1,3 +1,3 @@
 /team/irroot/app_queue-trunk:318983-319002
 /team/irroot/distrotech-customers:318992-318995,318997-319000
-/team/irroot/t38gateway-trunk:318974-319002
+/team/irroot/t38gateway-trunk:318974-319016

Modified: team/irroot/distrotech-customers-trunk/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/addons/chan_ooh323.c?view=diff&rev=319018&r1=319017&r2=319018
==============================================================================
--- team/irroot/distrotech-customers-trunk/addons/chan_ooh323.c (original)
+++ team/irroot/distrotech-customers-trunk/addons/chan_ooh323.c Sun May 15 05:35:02 2011
@@ -4497,7 +4497,7 @@
 		f = &null_frame;
 	}
 
-	if (p->owner && (f->frametype == AST_FRAME_VOICE)) {
+	if (p->owner && !p->faxmode && (f->frametype == AST_FRAME_VOICE)) {
 		/* We already hold the channel lock */
 		if (!(ast_format_cap_iscompatible(p->owner->nativeformats, &f->subclass.format))) {
 			ast_debug(1, "Oooh, voice format changed to %s\n", ast_getformatname(&f->subclass.format));

Propchange: team/irroot/distrotech-customers-trunk/cel/cel_odbc.c
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun May 15 05:35:02 2011
@@ -1,4 +1,4 @@
 /be/branches/C.3/cel/cel_adaptive_odbc.c:256426
 /team/irroot/app_queue-trunk/cel/cel_odbc.c:318983-319002
 /team/irroot/distrotech-customers/cel/cel_odbc.c:318992-319000
-/team/irroot/t38gateway-trunk/cel/cel_odbc.c:318974-319002
+/team/irroot/t38gateway-trunk/cel/cel_odbc.c:318974-319016

Propchange: team/irroot/distrotech-customers-trunk/configs/cel_odbc.conf.sample
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun May 15 05:35:02 2011
@@ -1,4 +1,4 @@
 /be/branches/C.3/configs/cel_adaptive_odbc.conf.sample:256426
 /team/irroot/app_queue-trunk/configs/cel_odbc.conf.sample:318983-319002
 /team/irroot/distrotech-customers/configs/cel_odbc.conf.sample:318992-319000
-/team/irroot/t38gateway-trunk/configs/cel_odbc.conf.sample:318974-319002
+/team/irroot/t38gateway-trunk/configs/cel_odbc.conf.sample:318974-319016

Modified: team/irroot/distrotech-customers-trunk/res/res_fax_spandsp.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/res/res_fax_spandsp.c?view=diff&rev=319018&r1=319017&r2=319018
==============================================================================
--- team/irroot/distrotech-customers-trunk/res/res_fax_spandsp.c (original)
+++ team/irroot/distrotech-customers-trunk/res/res_fax_spandsp.c Sun May 15 05:35:02 2011
@@ -144,6 +144,7 @@
 
 	struct spandsp_fax_gw_stats *t38stats;
 	t38_gateway_state_t t38_gw_state;
+	struct ast_channel *t38_gw_chan;
 
 	struct ast_timer *timer;
 	AST_LIST_HEAD(frame_queue, ast_frame) read_frames;
@@ -199,6 +200,11 @@
 
 	if (!(f = ast_frisolate(f))) {
 		return -1;
+	}
+
+	if (p->t38_gw_chan) {
+		f->src = AST_GW_GEN_SRC;
+		return ast_write(p->t38_gw_chan, f);
 	}
 
 	/* no need to lock, this all runs in the same thread */
@@ -447,6 +453,7 @@
 	}
 
 	AST_LIST_HEAD_INIT(&p->read_frames);
+	p->t38_gw_chan = NULL;
 
 	if (s->details->caps & AST_FAX_TECH_RECEIVE) {
 		caller_mode = 0;
@@ -584,29 +591,6 @@
 	}
 }
 
-/*! \brief generate T.38 packets sent to the T.38 leg of gateway
- * \param chan T.38 channel
- * \param data fax session structure
- * \param len not used
- * \param samples not used
- * \return -1 on failure or 0 on sucess*/
-static int spandsp_fax_gw_t38_gen(struct ast_channel *chan, void *data, int len, int samples)
-{
-	struct ast_frame *f;
-	struct ast_fax_session *s = data;
-	struct spandsp_pvt *p = s->tech_pvt;
-
-	if ((f = AST_LIST_REMOVE_HEAD(&p->read_frames, frame_list))) {
-		f->src = AST_GW_GEN_SRC;
-		if (ast_write(chan, f) < 0) {
-			ast_frfree(f);
-			return -1;
-		}
-		return 0;
-	}
-	return 0;
-}
-
 /*! \brief generate T.30 packets sent to the T.30 leg of gateway
  * \param chan T.30 channel
  * \param data fax session structure
@@ -659,10 +643,6 @@
 	int i;
 	enum ast_t38_state t38state;
 	struct ast_channel *peer;
-	static struct ast_generator t38_gen = {
-		alloc: spandsp_fax_gw_gen_alloc,
-		generate: spandsp_fax_gw_t38_gen,
-	};
 	static struct ast_generator t30_gen = {
 		alloc: spandsp_fax_gw_gen_alloc,
 		generate: spandsp_fax_gw_t30_gen,
@@ -687,8 +667,8 @@
 		ast_channel_unlock(s->chan);
 		return -1;
 	}
-	ast_activate_generator((t38state == T38_STATE_NEGOTIATED)? s->chan : peer, &t38_gen , s);
-	ast_activate_generator((t38state == T38_STATE_NEGOTIATED)? peer : s->chan, &t30_gen , s);
+	p->t38_gw_chan = (t38state == T38_STATE_NEGOTIATED) ? s->chan : peer;
+	ast_activate_generator((t38state == T38_STATE_NEGOTIATED) ? peer : s->chan, &t30_gen , s);
 	ast_channel_unlock(s->chan);
 
 	span_log_set_message_handler(&p->t38_gw_state.logging, spandsp_log);
@@ -707,7 +687,7 @@
 			(t38_param->rate_management == AST_T38_RATE_MANAGEMENT_TRANSFERRED_TCF)? 1 : 2);
 
 	/* need to be configrable FAXOPT ??*/
-	t38_gateway_set_transmit_on_idle(&p->t38_gw_state, TRUE);
+	t38_gateway_set_transmit_on_idle(&p->t38_gw_state, FALSE);
 	t38_set_sequence_number_handling(p->t38_core_state, TRUE);
 	t38_gateway_set_supported_modems(&p->t38_gw_state, T30_SUPPORT_V27TER | T30_SUPPORT_V17 | T30_SUPPORT_V29);
 

Propchange: team/irroot/distrotech-customers-trunk/sounds/Makefile
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun May 15 05:35:02 2011
@@ -1,5 +1,5 @@
 /be/branches/C.3/sounds/Makefile:256426
 /team/irroot/app_queue-trunk/sounds/Makefile:318983-319002
 /team/irroot/distrotech-customers/sounds/Makefile:318992-319000
-/team/irroot/t38gateway-trunk/sounds/Makefile:318974-319002
+/team/irroot/t38gateway-trunk/sounds/Makefile:318974-319016
 /trunk/sounds/Makefile:270974




More information about the svn-commits mailing list