[asterisk-commits] irroot: branch irroot/distrotech-customers-1.8 r321553 - in /team/irroot/dist...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jun 2 06:51:45 CDT 2011


Author: irroot
Date: Thu Jun  2 06:51:39 2011
New Revision: 321553

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=321553
Log:
Merge Changes Made by mnicholson T.38 Gw

Modified:
    team/irroot/distrotech-customers-1.8/   (props changed)
    team/irroot/distrotech-customers-1.8/cel/cel_odbc.c   (props changed)
    team/irroot/distrotech-customers-1.8/configs/cel_odbc.conf.sample   (props changed)
    team/irroot/distrotech-customers-1.8/contrib/realtime/mysql/iaxfriends.sql   (props changed)
    team/irroot/distrotech-customers-1.8/contrib/realtime/mysql/meetme.sql   (props changed)
    team/irroot/distrotech-customers-1.8/contrib/realtime/mysql/sipfriends.sql   (props changed)
    team/irroot/distrotech-customers-1.8/contrib/realtime/mysql/voicemail.sql   (props changed)
    team/irroot/distrotech-customers-1.8/contrib/realtime/postgresql/realtime.sql   (props changed)
    team/irroot/distrotech-customers-1.8/include/asterisk/res_fax.h
    team/irroot/distrotech-customers-1.8/main/frame.c
    team/irroot/distrotech-customers-1.8/res/res_fax.c
    team/irroot/distrotech-customers-1.8/res/res_fax_spandsp.c
    team/irroot/distrotech-customers-1.8/sounds/Makefile   (props changed)

Propchange: team/irroot/distrotech-customers-1.8/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jun  2 06:51:39 2011
@@ -1,5 +1,5 @@
 /be/branches/C.3:256426
 /team/irroot/distrotech-customers-1.8:319067
-/team/irroot/distrotech-customers-trunk:320619,320821-320822,321099
+/team/irroot/distrotech-customers-trunk:320619,320821-320822,321099,321552
 /team/irroot/t38gateway-1.8:318979-319017,319357,321514
 /team/irroot/t38gateway-trunk:318977-319016,319067,319071,320879

Propchange: team/irroot/distrotech-customers-1.8/cel/cel_odbc.c
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jun  2 06:51:39 2011
@@ -1,5 +1,5 @@
 /be/branches/C.3/cel/cel_adaptive_odbc.c:256426
 /team/irroot/distrotech-customers-1.8/cel/cel_odbc.c:319067
-/team/irroot/distrotech-customers-trunk/cel/cel_odbc.c:320619,320821-320822,321099
+/team/irroot/distrotech-customers-trunk/cel/cel_odbc.c:320619,320821-320822,321099,321552
 /team/irroot/t38gateway-1.8/cel/cel_odbc.c:318979-319017,319357,321514
-/team/irroot/t38gateway-trunk/cel/cel_odbc.c:318977-319016,319067,319071,320879
+/team/irroot/t38gateway-trunk/cel/cel_odbc.c:318977-319016,319067,319071,320879-321512,321514-321541

Propchange: team/irroot/distrotech-customers-1.8/configs/cel_odbc.conf.sample
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jun  2 06:51:39 2011
@@ -1,5 +1,5 @@
 /be/branches/C.3/configs/cel_adaptive_odbc.conf.sample:256426
 /team/irroot/distrotech-customers-1.8/configs/cel_odbc.conf.sample:319067
-/team/irroot/distrotech-customers-trunk/configs/cel_odbc.conf.sample:320619,320821-320822,321099
+/team/irroot/distrotech-customers-trunk/configs/cel_odbc.conf.sample:320619,320821-320822,321099,321552
 /team/irroot/t38gateway-1.8/configs/cel_odbc.conf.sample:318979-319017,319357,321514
-/team/irroot/t38gateway-trunk/configs/cel_odbc.conf.sample:318977-319016,319067,319071,320879
+/team/irroot/t38gateway-trunk/configs/cel_odbc.conf.sample:318977-319016,319067,319071,320879-321512,321514-321541

Propchange: team/irroot/distrotech-customers-1.8/contrib/realtime/mysql/iaxfriends.sql
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jun  2 06:51:39 2011
@@ -1,4 +1,4 @@
 /team/irroot/distrotech-customers-1.8/contrib/realtime/mysql/iaxfriends.sql:319067
-/team/irroot/distrotech-customers-trunk/contrib/realtime/mysql/iaxfriends.sql:320619,320821-320822,321099
+/team/irroot/distrotech-customers-trunk/contrib/realtime/mysql/iaxfriends.sql:320619,320821-320822,321099,321552
 /team/irroot/t38gateway-1.8/contrib/realtime/mysql/iaxfriends.sql:318979-319017,319357,321514
 /team/irroot/t38gateway-trunk/contrib/realtime/mysql/iaxfriends.sql:318977-319016,319067,319071,320879

Propchange: team/irroot/distrotech-customers-1.8/contrib/realtime/mysql/meetme.sql
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jun  2 06:51:39 2011
@@ -1,4 +1,4 @@
 /team/irroot/distrotech-customers-1.8/contrib/realtime/mysql/meetme.sql:319067
-/team/irroot/distrotech-customers-trunk/contrib/realtime/mysql/meetme.sql:320619,320821-320822,321099
+/team/irroot/distrotech-customers-trunk/contrib/realtime/mysql/meetme.sql:320619,320821-320822,321099,321552
 /team/irroot/t38gateway-1.8/contrib/realtime/mysql/meetme.sql:318979-319017,319357,321514
 /team/irroot/t38gateway-trunk/contrib/realtime/mysql/meetme.sql:318977-319016,319067,319071,320879

Propchange: team/irroot/distrotech-customers-1.8/contrib/realtime/mysql/sipfriends.sql
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jun  2 06:51:39 2011
@@ -1,4 +1,4 @@
 /team/irroot/distrotech-customers-1.8/contrib/realtime/mysql/sipfriends.sql:319067
-/team/irroot/distrotech-customers-trunk/contrib/realtime/mysql/sipfriends.sql:320619,320821-320822,321099
+/team/irroot/distrotech-customers-trunk/contrib/realtime/mysql/sipfriends.sql:320619,320821-320822,321099,321552
 /team/irroot/t38gateway-1.8/contrib/realtime/mysql/sipfriends.sql:318979-319017,319357,321514
 /team/irroot/t38gateway-trunk/contrib/realtime/mysql/sipfriends.sql:318977-319016,319067,319071,320879

Propchange: team/irroot/distrotech-customers-1.8/contrib/realtime/mysql/voicemail.sql
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jun  2 06:51:39 2011
@@ -1,4 +1,4 @@
 /team/irroot/distrotech-customers-1.8/contrib/realtime/mysql/voicemail.sql:319067
-/team/irroot/distrotech-customers-trunk/contrib/realtime/mysql/voicemail.sql:320619,320821-320822,321099
+/team/irroot/distrotech-customers-trunk/contrib/realtime/mysql/voicemail.sql:320619,320821-320822,321099,321552
 /team/irroot/t38gateway-1.8/contrib/realtime/mysql/voicemail.sql:318979-319017,319357,321514
 /team/irroot/t38gateway-trunk/contrib/realtime/mysql/voicemail.sql:318977-319016,319067,319071,320879

Propchange: team/irroot/distrotech-customers-1.8/contrib/realtime/postgresql/realtime.sql
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jun  2 06:51:39 2011
@@ -1,4 +1,4 @@
 /team/irroot/distrotech-customers-1.8/contrib/realtime/postgresql/realtime.sql:319067
-/team/irroot/distrotech-customers-trunk/contrib/realtime/postgresql/realtime.sql:320619,320821-320822,321099
+/team/irroot/distrotech-customers-trunk/contrib/realtime/postgresql/realtime.sql:320619,320821-320822,321099,321552
 /team/irroot/t38gateway-1.8/contrib/realtime/postgresql/realtime.sql:318979-319017,319357,321514
 /team/irroot/t38gateway-trunk/contrib/realtime/postgresql/realtime.sql:318977-319016,319067,319071,320879

Modified: team/irroot/distrotech-customers-1.8/include/asterisk/res_fax.h
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-1.8/include/asterisk/res_fax.h?view=diff&rev=321553&r1=321552&r2=321553
==============================================================================
--- team/irroot/distrotech-customers-1.8/include/asterisk/res_fax.h (original)
+++ team/irroot/distrotech-customers-1.8/include/asterisk/res_fax.h Thu Jun  2 06:51:39 2011
@@ -208,7 +208,8 @@
 	struct ast_smoother *smoother;
 };
 
-#define AST_GW_GEN_SRC		"T38_FAX_GATEWAY"
+/* if this overlaps with any AST_FRFLAG_* values, problems will occur */
+#define AST_FAX_FRFLAG_GATEWAY (1 << 13)
 
 /*! \brief used for gateway framehook */
 struct ast_fax_session_gateway {

Modified: team/irroot/distrotech-customers-1.8/main/frame.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-1.8/main/frame.c?view=diff&rev=321553&r1=321552&r2=321553
==============================================================================
--- team/irroot/distrotech-customers-1.8/main/frame.c (original)
+++ team/irroot/distrotech-customers-1.8/main/frame.c Thu Jun  2 06:51:39 2011
@@ -413,7 +413,7 @@
 		out->samples = fr->samples;
 		out->offset = fr->offset;
 		/* Copy the timing data */
-		ast_copy_flags(out, fr, AST_FRFLAG_HAS_TIMING_INFO);
+		ast_copy_flags(out, fr, AST_FLAGS_ALL);
 		if (ast_test_flag(fr, AST_FRFLAG_HAS_TIMING_INFO)) {
 			out->ts = fr->ts;
 			out->len = fr->len;
@@ -537,7 +537,7 @@
 		/* Must have space since we allocated for it */
 		strcpy(src, f->src);
 	}
-	ast_copy_flags(out, f, AST_FRFLAG_HAS_TIMING_INFO);
+	ast_copy_flags(out, f, AST_FLAGS_ALL);
 	out->ts = f->ts;
 	out->len = f->len;
 	out->seqno = f->seqno;

Modified: team/irroot/distrotech-customers-1.8/res/res_fax.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-1.8/res/res_fax.c?view=diff&rev=321553&r1=321552&r2=321553
==============================================================================
--- team/irroot/distrotech-customers-1.8/res/res_fax.c (original)
+++ team/irroot/distrotech-customers-1.8/res/res_fax.c Thu Jun  2 06:51:39 2011
@@ -2573,15 +2573,16 @@
 		return f;
 	}
 
+	/* this frame was generated by the fax gateway, pass it on */
+	if (ast_test_flag(f, AST_FAX_FRFLAG_GATEWAY)) {
+		return f;
+	}
+
 	peer = ast_bridged_channel(chan);
 	s = gateway->s;
 
 	switch (event) {
 		case AST_FRAMEHOOK_EVENT_WRITE:
-			/* If i have been written by the GW gen i must pass it on*/
-			if (f->src && !strcmp(f->src, AST_GW_GEN_SRC)) {
-				return f;
-			}
 			/* when we become active change the formats to SLIN for CED detect and T.30*/
 			if (peer && !gateway->bridged) {
 				gateway->chan_read_format = chan->readformat;

Modified: team/irroot/distrotech-customers-1.8/res/res_fax_spandsp.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-1.8/res/res_fax_spandsp.c?view=diff&rev=321553&r1=321552&r2=321553
==============================================================================
--- team/irroot/distrotech-customers-1.8/res/res_fax_spandsp.c (original)
+++ team/irroot/distrotech-customers-1.8/res/res_fax_spandsp.c Thu Jun  2 06:51:39 2011
@@ -144,7 +144,6 @@
 
 	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;
@@ -183,7 +182,8 @@
  */
 static int t38_tx_packet_handler(t38_core_state_t *t38_core_state, void *data, const uint8_t *buf, int len, int count)
 {
-	struct spandsp_pvt *p = data;
+	struct ast_fax_session *s = data;
+	struct spandsp_pvt *p = s->tech_pvt;
 	struct ast_frame fax_frame = {
 		.frametype = AST_FRAME_MODEM,
 		.subclass.integer = AST_MODEM_T38,
@@ -202,9 +202,15 @@
 		return -1;
 	}
 
-	if (p->t38_gw_chan) {
-		f->src = AST_GW_GEN_SRC;
-		return ast_write(p->t38_gw_chan, f);
+	if (s->details->caps & AST_FAX_TECH_GATEWAY) {
+		ast_set_flag(f, AST_FAX_FRFLAG_GATEWAY);
+		if (ast_channel_get_t38_state(s->chan) == T38_STATE_NEGOTIATED) {
+			return ast_write(s->chan, f);
+		} else {
+			int res = ast_queue_frame(s->chan, f);
+			ast_frfree(f);
+			return res;
+		}
 	}
 
 	/* no need to lock, this all runs in the same thread */
@@ -453,7 +459,6 @@
 	}
 
 	AST_LIST_HEAD_INIT(&p->read_frames);
-	p->t38_gw_chan = NULL;
 
 	if (s->details->caps & AST_FAX_TECH_RECEIVE) {
 		caller_mode = 0;
@@ -483,7 +488,7 @@
 		}
 
 		/* init t38 stuff */
-		t38_terminal_init(&p->t38_state, caller_mode, t38_tx_packet_handler, p);
+		t38_terminal_init(&p->t38_state, caller_mode, t38_tx_packet_handler, s);
 		set_logging(&p->t38_state.logging, s->details);
 	}
 
@@ -607,8 +612,9 @@
 	struct ast_frame t30_frame = {
 		.frametype = AST_FRAME_VOICE,
 		.subclass.codec = AST_FORMAT_SLINEAR,
-		.src = AST_GW_GEN_SRC,
+		.src = "res_fax_spandsp_g711",
 		.samples = samples,
+		.flags = AST_FAX_FRFLAG_GATEWAY,
 	};
 
 	AST_FRAME_SET_BUFFER(&t30_frame, buffer, AST_FRIENDLY_OFFSET, t30_frame.samples * sizeof(int16_t));
@@ -657,7 +663,7 @@
 	p->t38_core_state=&p->t38_gw_state.t38;
 #endif
 
-	if (! t38_gateway_init(&p->t38_gw_state, t38_tx_packet_handler, p)) {
+	if (! t38_gateway_init(&p->t38_gw_state, t38_tx_packet_handler, s)) {
 		return -1;
 	}
 
@@ -668,7 +674,6 @@
 		ast_channel_unlock(s->chan);
 		return -1;
 	}
-	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);
 

Propchange: team/irroot/distrotech-customers-1.8/sounds/Makefile
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Thu Jun  2 06:51:39 2011
@@ -1,0 +1,1 @@
+/team/irroot/t38gateway-trunk/sounds/Makefile:320880-321512,321514-321541




More information about the asterisk-commits mailing list