[asterisk-commits] irroot: branch irroot/t38gateway-1.8 r321554 - in /team/irroot/t38gateway-1.8...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jun 2 07:30:06 CDT 2011
Author: irroot
Date: Thu Jun 2 07:29:59 2011
New Revision: 321554
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=321554
Log:
Merge Changes Made by mnicholson T.38 Gw
Modified:
team/irroot/t38gateway-1.8/cel/cel_odbc.c (props changed)
team/irroot/t38gateway-1.8/configs/cel_odbc.conf.sample (props changed)
team/irroot/t38gateway-1.8/contrib/realtime/mysql/iaxfriends.sql (props changed)
team/irroot/t38gateway-1.8/contrib/realtime/mysql/meetme.sql (props changed)
team/irroot/t38gateway-1.8/contrib/realtime/mysql/sipfriends.sql (props changed)
team/irroot/t38gateway-1.8/contrib/realtime/mysql/voicemail.sql (props changed)
team/irroot/t38gateway-1.8/contrib/realtime/postgresql/realtime.sql (props changed)
team/irroot/t38gateway-1.8/include/asterisk/res_fax.h
team/irroot/t38gateway-1.8/main/frame.c
team/irroot/t38gateway-1.8/res/res_fax.c
team/irroot/t38gateway-1.8/res/res_fax_spandsp.c
team/irroot/t38gateway-1.8/sounds/Makefile (props changed)
Propchange: team/irroot/t38gateway-1.8/cel/cel_odbc.c
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jun 2 07:29:59 2011
@@ -1,3 +1,4 @@
/be/branches/C.3/cel/cel_adaptive_odbc.c:256426
-/team/irroot/distrotech-customers-1.8/cel/cel_odbc.c:319062-319063
-/team/irroot/t38gateway-trunk/cel/cel_odbc.c:318977-319016,319067,319070-319071,320879
+/team/irroot/distrotech-customers-1.8/cel/cel_odbc.c:319062-319063,321553
+/team/irroot/distrotech-customers-trunk/cel/cel_odbc.c:321552
+/team/irroot/t38gateway-trunk/cel/cel_odbc.c:318977-319016,319067,319070-319071,320879-321512,321514-321541
Propchange: team/irroot/t38gateway-1.8/configs/cel_odbc.conf.sample
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jun 2 07:29:59 2011
@@ -1,3 +1,4 @@
/be/branches/C.3/configs/cel_adaptive_odbc.conf.sample:256426
-/team/irroot/distrotech-customers-1.8/configs/cel_odbc.conf.sample:319062-319063
-/team/irroot/t38gateway-trunk/configs/cel_odbc.conf.sample:318977-319016,319067,319070-319071,320879
+/team/irroot/distrotech-customers-1.8/configs/cel_odbc.conf.sample:319062-319063,321553
+/team/irroot/distrotech-customers-trunk/configs/cel_odbc.conf.sample:321552
+/team/irroot/t38gateway-trunk/configs/cel_odbc.conf.sample:318977-319016,319067,319070-319071,320879-321512,321514-321541
Propchange: team/irroot/t38gateway-1.8/contrib/realtime/mysql/iaxfriends.sql
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jun 2 07:29:59 2011
@@ -1,2 +1,3 @@
-/team/irroot/distrotech-customers-1.8/contrib/realtime/mysql/iaxfriends.sql:319062-319063
+/team/irroot/distrotech-customers-1.8/contrib/realtime/mysql/iaxfriends.sql:319062-319063,321553
+/team/irroot/distrotech-customers-trunk/contrib/realtime/mysql/iaxfriends.sql:321552
/team/irroot/t38gateway-trunk/contrib/realtime/mysql/iaxfriends.sql:318977-319016,319067,319070-319071,320879
Propchange: team/irroot/t38gateway-1.8/contrib/realtime/mysql/meetme.sql
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jun 2 07:29:59 2011
@@ -1,2 +1,3 @@
-/team/irroot/distrotech-customers-1.8/contrib/realtime/mysql/meetme.sql:319062-319063
+/team/irroot/distrotech-customers-1.8/contrib/realtime/mysql/meetme.sql:319062-319063,321553
+/team/irroot/distrotech-customers-trunk/contrib/realtime/mysql/meetme.sql:321552
/team/irroot/t38gateway-trunk/contrib/realtime/mysql/meetme.sql:318977-319016,319067,319070-319071,320879
Propchange: team/irroot/t38gateway-1.8/contrib/realtime/mysql/sipfriends.sql
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jun 2 07:29:59 2011
@@ -1,2 +1,3 @@
-/team/irroot/distrotech-customers-1.8/contrib/realtime/mysql/sipfriends.sql:319062-319063
+/team/irroot/distrotech-customers-1.8/contrib/realtime/mysql/sipfriends.sql:319062-319063,321553
+/team/irroot/distrotech-customers-trunk/contrib/realtime/mysql/sipfriends.sql:321552
/team/irroot/t38gateway-trunk/contrib/realtime/mysql/sipfriends.sql:318977-319016,319067,319070-319071,320879
Propchange: team/irroot/t38gateway-1.8/contrib/realtime/mysql/voicemail.sql
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jun 2 07:29:59 2011
@@ -1,2 +1,3 @@
-/team/irroot/distrotech-customers-1.8/contrib/realtime/mysql/voicemail.sql:319062-319063
+/team/irroot/distrotech-customers-1.8/contrib/realtime/mysql/voicemail.sql:319062-319063,321553
+/team/irroot/distrotech-customers-trunk/contrib/realtime/mysql/voicemail.sql:321552
/team/irroot/t38gateway-trunk/contrib/realtime/mysql/voicemail.sql:318977-319016,319067,319070-319071,320879
Propchange: team/irroot/t38gateway-1.8/contrib/realtime/postgresql/realtime.sql
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jun 2 07:29:59 2011
@@ -1,2 +1,3 @@
-/team/irroot/distrotech-customers-1.8/contrib/realtime/postgresql/realtime.sql:319062-319063
+/team/irroot/distrotech-customers-1.8/contrib/realtime/postgresql/realtime.sql:319062-319063,321553
+/team/irroot/distrotech-customers-trunk/contrib/realtime/postgresql/realtime.sql:321552
/team/irroot/t38gateway-trunk/contrib/realtime/postgresql/realtime.sql:318977-319016,319067,319070-319071,320879
Modified: team/irroot/t38gateway-1.8/include/asterisk/res_fax.h
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-1.8/include/asterisk/res_fax.h?view=diff&rev=321554&r1=321553&r2=321554
==============================================================================
--- team/irroot/t38gateway-1.8/include/asterisk/res_fax.h (original)
+++ team/irroot/t38gateway-1.8/include/asterisk/res_fax.h Thu Jun 2 07:29:59 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/t38gateway-1.8/main/frame.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-1.8/main/frame.c?view=diff&rev=321554&r1=321553&r2=321554
==============================================================================
--- team/irroot/t38gateway-1.8/main/frame.c (original)
+++ team/irroot/t38gateway-1.8/main/frame.c Thu Jun 2 07:29:59 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/t38gateway-1.8/res/res_fax.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-1.8/res/res_fax.c?view=diff&rev=321554&r1=321553&r2=321554
==============================================================================
--- team/irroot/t38gateway-1.8/res/res_fax.c (original)
+++ team/irroot/t38gateway-1.8/res/res_fax.c Thu Jun 2 07:29:59 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/t38gateway-1.8/res/res_fax_spandsp.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-1.8/res/res_fax_spandsp.c?view=diff&rev=321554&r1=321553&r2=321554
==============================================================================
--- team/irroot/t38gateway-1.8/res/res_fax_spandsp.c (original)
+++ team/irroot/t38gateway-1.8/res/res_fax_spandsp.c Thu Jun 2 07:29:59 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/t38gateway-1.8/sounds/Makefile
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jun 2 07:29:59 2011
@@ -1,4 +1,5 @@
/be/branches/C.3/sounds/Makefile:256426
-/team/irroot/distrotech-customers-1.8/sounds/Makefile:319062-319063
-/team/irroot/t38gateway-trunk/sounds/Makefile:318977-319016,319067,319070-319071,320879
+/team/irroot/distrotech-customers-1.8/sounds/Makefile:319062-319063,321553
+/team/irroot/distrotech-customers-trunk/sounds/Makefile:321552
+/team/irroot/t38gateway-trunk/sounds/Makefile:318977-319016,319067,319070-319071,320879-321512,321514-321541
/trunk/sounds/Makefile:270974
More information about the asterisk-commits
mailing list