Freeswitch-svn
Threads by month
- ----- 2026 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- 12151 discussions
[commit] r13177 - in freeswitch/trunk/libs/spandsp: src src/spandsp src/spandsp/private tests tests/msvc
by FreeSWITCH SVN 28 Apr '09
by FreeSWITCH SVN 28 Apr '09
28 Apr '09
Author: mikej
Date: Tue Apr 28 09:42:18 2009
New Revision: 13177
Log:
update to snapshot spandsp-20090427
Added:
freeswitch/trunk/libs/spandsp/tests/msvc/
freeswitch/trunk/libs/spandsp/tests/msvc/adsi_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/complex_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/complex_vector_float_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/complex_vector_int_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/dtmf_rx_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/dtmf_tx_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/queue_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/t38_core_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/t38_non_ecm_buffer_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/t38_terminal_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/v22bis_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/v29_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/v80_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/v8_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/vector_float_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/vector_int_tests.vcproj
Modified:
freeswitch/trunk/libs/spandsp/src/async.c
freeswitch/trunk/libs/spandsp/src/at_interpreter.c
freeswitch/trunk/libs/spandsp/src/fax.c
freeswitch/trunk/libs/spandsp/src/g722.c
freeswitch/trunk/libs/spandsp/src/libspandsp.2008.sln
freeswitch/trunk/libs/spandsp/src/make_at_dictionary.c
freeswitch/trunk/libs/spandsp/src/spandsp/async.h
freeswitch/trunk/libs/spandsp/src/spandsp/fax_modems.h
freeswitch/trunk/libs/spandsp/src/spandsp/private/v22bis.h
freeswitch/trunk/libs/spandsp/src/spandsp/v22bis.h
freeswitch/trunk/libs/spandsp/src/spandsp/version.h
freeswitch/trunk/libs/spandsp/src/t30.c
freeswitch/trunk/libs/spandsp/src/v17rx.c
freeswitch/trunk/libs/spandsp/src/v17tx.c
freeswitch/trunk/libs/spandsp/src/v18.c
freeswitch/trunk/libs/spandsp/src/v22bis_rx.c
freeswitch/trunk/libs/spandsp/src/v22bis_tx.c
freeswitch/trunk/libs/spandsp/src/v27ter_rx.c
freeswitch/trunk/libs/spandsp/src/v27ter_tx.c
freeswitch/trunk/libs/spandsp/src/v29rx.c
freeswitch/trunk/libs/spandsp/src/v29tx.c
freeswitch/trunk/libs/spandsp/tests/Makefile.am
freeswitch/trunk/libs/spandsp/tests/adsi_tests.c
freeswitch/trunk/libs/spandsp/tests/at_interpreter_tests.c
freeswitch/trunk/libs/spandsp/tests/complex_vector_float_tests.c
freeswitch/trunk/libs/spandsp/tests/complex_vector_int_tests.c
freeswitch/trunk/libs/spandsp/tests/fax_utils.c
freeswitch/trunk/libs/spandsp/tests/g711_tests.c
freeswitch/trunk/libs/spandsp/tests/g722_tests.c
freeswitch/trunk/libs/spandsp/tests/g726_tests.c
freeswitch/trunk/libs/spandsp/tests/gsm0610_tests.c
freeswitch/trunk/libs/spandsp/tests/t38_core_tests.c
freeswitch/trunk/libs/spandsp/tests/t38_gateway_tests.c
freeswitch/trunk/libs/spandsp/tests/t38_gateway_to_terminal_tests.c
freeswitch/trunk/libs/spandsp/tests/t38_non_ecm_buffer_tests.c
freeswitch/trunk/libs/spandsp/tests/t38_terminal_tests.c
freeswitch/trunk/libs/spandsp/tests/t38_terminal_to_gateway_tests.c
freeswitch/trunk/libs/spandsp/tests/v17_tests.c
freeswitch/trunk/libs/spandsp/tests/v22bis_tests.c
freeswitch/trunk/libs/spandsp/tests/v27ter_tests.c
freeswitch/trunk/libs/spandsp/tests/v29_tests.c
freeswitch/trunk/libs/spandsp/tests/v8_tests.c
freeswitch/trunk/libs/spandsp/tests/vector_float_tests.c
freeswitch/trunk/libs/spandsp/tests/vector_int_tests.c
Modified: freeswitch/trunk/libs/spandsp/src/async.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/async.c (original)
+++ freeswitch/trunk/libs/spandsp/src/async.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: async.c,v 1.18 2009/02/10 13:06:46 steveu Exp $
+ * $Id: async.c,v 1.19 2009/04/23 14:12:34 steveu Exp $
*/
/*! \file */
@@ -67,6 +67,10 @@
return "Shutdown complete";
case SIG_STATUS_OCTET_REPORT:
return "Octet report";
+ case SIG_STATUS_POOR_SIGNAL_QUALITY:
+ return "Poor signal quality";
+ case SIG_STATUS_MODEM_RETRAIN_OCCURRED:
+ return "Modem retrain occurred";
}
return "???";
}
Modified: freeswitch/trunk/libs/spandsp/src/at_interpreter.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/at_interpreter.c (original)
+++ freeswitch/trunk/libs/spandsp/src/at_interpreter.c Tue Apr 28 09:42:18 2009
@@ -25,7 +25,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: at_interpreter.c,v 1.37 2009/03/23 14:17:42 steveu Exp $
+ * $Id: at_interpreter.c,v 1.39 2009/04/24 22:35:25 steveu Exp $
*/
/*! \file */
@@ -519,6 +519,64 @@
}
/*- End of function --------------------------------------------------------*/
+static int parse_n_out(at_state_t *s,
+ const char **t,
+ int *targets[],
+ const int max_values[],
+ int entries,
+ const char *prefix,
+ const char *def)
+{
+ char buf[100];
+ int val;
+ int len;
+ int i;
+
+ switch (*(*t)++)
+ {
+ case '=':
+ switch (**t)
+ {
+ case '?':
+ /* Show possible values */
+ (*t)++;
+ snprintf(buf, sizeof(buf), "%s%s", (prefix) ? prefix : "", def);
+ at_put_response(s, buf);
+ break;
+ default:
+ /* Set value */
+ for (i = 0; i < entries; i++)
+ {
+ if ((val = parse_num(t, max_values[i])) < 0)
+ return FALSE;
+ if (targets[i])
+ *targets[i] = val;
+ if (**t != ',')
+ break;
+ (*t)++;
+ }
+ break;
+ }
+ break;
+ case '?':
+ /* Show current value */
+ len = snprintf(buf, sizeof(buf), "%s", (prefix) ? prefix : "");
+ for (i = 0; i < entries; i++)
+ {
+ if (i > 0)
+ len += snprintf(&buf[len], sizeof(buf) - len, ",");
+ val = (targets[i]) ? *targets[i] : 0;
+ len += snprintf(&buf[len], sizeof(buf) - len, "%d", val);
+ }
+ at_put_response(s, buf);
+ break;
+ default:
+ return FALSE;
+ }
+ return TRUE;
+}
+/*- End of function --------------------------------------------------------*/
+
static int parse_hex_out(at_state_t *s, const char **t, int *target, int max_value, const char *prefix, const char *def)
{
char buf[100];
@@ -3191,9 +3249,76 @@
static const char *at_cmd_plus_ES(at_state_t *s, const char *t)
{
+ static const int maxes[3] =
+ {
+ 7, 4, 9
+ };
+ int *locations[3];
+
/* V.250 6.5.1 - Error control selection */
+
+ /* orig_rqst
+ 0: Direct mode
+ 1: Initiate call with Buffered mode only
+ 2: Initiate V.42 without Detection Phase. If Rec. V.8 is in use, this is a request to disable V.42 Detection Phase
+ 3: Initiate V.42 with Detection Phase
+ 4: Initiate Altemative Protocol
+ 5: Initiate Synchronous Mode when connection is completed, immediately after the entire CONNECT result code
+ is delivered. V.24 circuits 113 and 115 are activated when Data State is entered
+ 6: Initiate Synchronous Access Mode when connection is completed, and Data State is entered
+ 7: Initiate Frame Tunnelling Mode when connection is completed, and Data State is entered
+
+ orig_fbk
+ 0: Error control optional (either LAPM or Alternative acceptable); if error control not established, maintain
+ DTE-DCE data rate and use V.14 buffered mode with flow control during non-error-control operation
+ 1: Error control optional (either LAPM or Alternative acceptable); if error control not established, change
+ DTE-DCE data rate to match line rate and use Direct mode
+ 2: Error control required (either LAPM or Alternative acceptable); if error control not established, disconnect
+ 3: Error control required (only LAPM acceptable); if error control not established, disconnect
+ 4: Error control required (only Altemative protocol acceptable); if error control not established, disconnect
+
+ ans_fbk
+ 0: Direct mode
+ 1: Error control disabled, use Buffered mode
+ 2: Error control optional (either LAPM or Alternative acceptable); if error control not established, maintain
+ DTE-DCE data rate and use local buffering and flow control during non-error-control operation
+ 3: Error control optional (either LAPM or Alternative acceptable); if error control not established, change
+ DTE-DCE data rate to match line rate and use Direct mode
+ 4: Error control required (either LAPM or Alternative acceptable); if error control not established, disconnect
+ 5: Error control required (only LAPM acceptable); if error control not established, disconnect
+ 6: Error control required (only Alternative protocol acceptable); if error control not established, disconnect
+ 7: Initiate Synchronous Mode when connection is completed, immediately after the entire CONNECT result code
+ is delivered. V.24 cicuits 113 and 115 are activated when Data State is entered
+ 8: Initiate Synchronous Access Mode when connection is completed, and Data State is entered
+ 9: Initiate Frame Tunnelling Mode when connection is completed, and Data State is entered */
+
/* TODO: */
t += 3;
+ locations[0] = NULL;
+ locations[1] = NULL;
+ locations[2] = NULL;
+ if (!parse_n_out(s, &t, locations, maxes, 3, "+ES:", "(0-7),(0-4),(0-9)"))
+ return NULL;
+ return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_ESA(at_state_t *s, const char *t)
+{
+ static const int maxes[8] =
+ {
+ 2, 1, 1, 1, 2, 1, 255, 255
+ };
+ int *locations[8];
+ int i;
+
+ /* V.80 8.2 - Synchronous access mode configuration */
+ /* TODO: */
+ t += 4;
+ for (i = 0; i < 8; i++)
+ locations[i] = NULL;
+ if (!parse_n_out(s, &t, locations, maxes, 8, "+ESA:", "(0-2),(0-1),(0-1),(0-1),(0-2),(0-1),(0-255),(0-255)"))
+ return NULL;
return t;
}
/*- End of function --------------------------------------------------------*/
@@ -3800,18 +3925,66 @@
static const char *at_cmd_plus_IBC(at_state_t *s, const char *t)
{
- /* TIA-617 8.3 - Control of in-band control */
+ static const int maxes[13] =
+ {
+ 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
+ };
+ int *locations[13];
+ int i;
+
+ /* V.80 7.9 - Control of in-band control */
/* TODO: */
t += 4;
+ /* 0: In-band control service disabled
+ 1: In-band control service enabled, 7-bit codes allowed, and top bit insignificant
+ 2; In-band control service enabled, 7-bit codes allowed, and 8-bit codes available
+
+ Circuits 105, 106, 107, 108, 109, 110, 125, 132, 133, 135, 142 in that order. For each one:
+ 0: disabled
+ 1: enabled
+
+ DCE line connect status reports:
+ 0: disabled
+ 1: enabled */
+ for (i = 0; i < 13; i++)
+ locations[i] = NULL;
+ if (!parse_n_out(s, &t, locations, maxes, 13, "+IBC:", "(0-2),(0,1),(0,1),(0,1),(0,1),(0,1),(0,1),(0,1),(0,1),(0,1),(0,1),(0.1),(0,1)"))
+ return NULL;
return t;
}
/*- End of function --------------------------------------------------------*/
static const char *at_cmd_plus_IBM(at_state_t *s, const char *t)
{
- /* TIA-617 8.4 - In-Band MARK idle reporting control */
- /* TODO: */
- t += 4;
+ static const int maxes[3] =
+ {
+ 7, 255, 255
+ };
+ int *locations[3];
+
+ /* V.80 7.10 - In-band MARK idle reporting control */
+ /* TODO: */
+ t += 4;
+ /* Report control
+ 0: No reports
+ 1: Report only once when <T1 > expires
+ 2: Report each time <T2> expires
+ 3: Report once when <T1> expires, and then each time <T2> expires
+ 4: Report only when the Mark-ldle Period ends; T3 = the entire interval
+ 5: Report the first time when <T1> is exceeded, and then once more when the mark idle period ends
+ 6: Report each time when <T2> is exceeded, and then once more when the mark idle period ends;
+ T3 = entire interval -- N*T2
+ 7: report the first time when <T1> is exceeded, and then each time <T2> is exceeded, and then once
+ more when the mark idle period ends; T3 = entire mark idle period -- N*T2 - T1
+
+ T1 in units of 10ms
+
+ T2 in units of 10ms */
+ locations[0] = NULL;
+ locations[1] = NULL;
+ locations[2] = NULL;
+ if (!parse_n_out(s, &t, locations, maxes, 3, "+IBM:", "(0-7),(0-255),(0-255)"))
+ return NULL;
return t;
}
/*- End of function --------------------------------------------------------*/
@@ -3821,19 +3994,19 @@
/* V.250 6.2.11 - DTE-DCE character framing */
t += 4;
/* Character format
- 0 auto detect
- 1 8 data 2 stop
- 2 8 data 1 parity 1 stop
- 3 8 data 1 stop
- 4 7 data 2 stop
- 5 7 data 1 parity 1 stop
- 6 7 data 1 stop
+ 0: auto detect
+ 1: 8 data 2 stop
+ 2: 8 data 1 parity 1 stop
+ 3: 8 data 1 stop
+ 4: 7 data 2 stop
+ 5: 7 data 1 parity 1 stop
+ 6: 7 data 1 stop
- parity
- 0 Odd
- 1 Even
- 2 Mark
- 3 Space */
+ Parity
+ 0: Odd
+ 1: Even
+ 2: Mark
+ 3: Space */
if (!parse_2_out(s, &t, &s->dte_char_format, 6, &s->dte_parity, 3, "+ICF:", "(0-6),(0-3)"))
return NULL;
return t;
@@ -3909,6 +4082,15 @@
}
/*- End of function --------------------------------------------------------*/
+static const char *at_cmd_plus_ITF(at_state_t *s, const char *t)
+{
+ /* V.80 8.4 - Transmit flow control thresholds */
+ /* TODO: */
+ t += 5;
+ return t;
+}
+/*- End of function --------------------------------------------------------*/
+
static const char *at_cmd_plus_MA(at_state_t *s, const char *t)
{
/* V.250 6.4.2 - Modulation automode control */
Modified: freeswitch/trunk/libs/spandsp/src/fax.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/fax.c (original)
+++ freeswitch/trunk/libs/spandsp/src/fax.c Tue Apr 28 09:42:18 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: fax.c,v 1.91 2009/04/12 03:29:58 steveu Exp $
+ * $Id: fax.c,v 1.92 2009/04/23 15:48:21 steveu Exp $
*/
/*! \file */
@@ -575,7 +575,7 @@
(void *) s,
fax_send_hdlc,
(void *) s);
- t30_set_supported_modems(&s->t30, T30_SUPPORT_V27TER | T30_SUPPORT_V29);
+ t30_set_supported_modems(&s->t30, T30_SUPPORT_V27TER | T30_SUPPORT_V29 | T30_SUPPORT_V17);
t30_restart(&s->t30);
#if defined(LOG_FAX_AUDIO)
{
Modified: freeswitch/trunk/libs/spandsp/src/g722.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/g722.c (original)
+++ freeswitch/trunk/libs/spandsp/src/g722.c Tue Apr 28 09:42:18 2009
@@ -28,7 +28,7 @@
* Computer Science, Speech Group
* Chengxiang Lu and Alex Hauptmann
*
- * $Id: g722.c,v 1.9 2009/02/21 04:27:46 steveu Exp $
+ * $Id: g722.c,v 1.10 2009/04/22 12:57:40 steveu Exp $
*/
/*! \file */
@@ -415,7 +415,8 @@
{
if (s->eight_k)
{
- amp[outlen++] = (int16_t) rlow;
+ /* We shift by 1 to allow for the 15 bit input to the G.722 algorithm. */
+ amp[outlen++] = (int16_t) (rlow << 1);
}
else
{
@@ -424,8 +425,10 @@
s->y[s->ptr] = (int16_t) (rlow - rhigh);
if (++s->ptr >= 12)
s->ptr = 0;
- amp[outlen++] = (int16_t) (vec_circular_dot_prodi16(s->y, qmf_coeffs_rev, 12, s->ptr) >> 12);
- amp[outlen++] = (int16_t) (vec_circular_dot_prodi16(s->x, qmf_coeffs_fwd, 12, s->ptr) >> 12);
+ /* We shift by 12 to allow for the QMF filters (DC gain = 4096), less 1
+ to allow for the 15 bit input to the G.722 algorithm. */
+ amp[outlen++] = (int16_t) (vec_circular_dot_prodi16(s->y, qmf_coeffs_rev, 12, s->ptr) >> 11);
+ amp[outlen++] = (int16_t) (vec_circular_dot_prodi16(s->x, qmf_coeffs_fwd, 12, s->ptr) >> 11);
}
}
}
@@ -511,7 +514,8 @@
{
if (s->eight_k)
{
- xlow = amp[j++];
+ /* We shift by 1 to allow for the 15 bit input to the G.722 algorithm. */
+ xlow = amp[j++] >> 1;
}
else
{
@@ -522,8 +526,11 @@
s->ptr = 0;
sumodd = vec_circular_dot_prodi16(s->x, qmf_coeffs_fwd, 12, s->ptr);
sumeven = vec_circular_dot_prodi16(s->y, qmf_coeffs_rev, 12, s->ptr);
- xlow = (int16_t) ((sumeven + sumodd) >> 13);
- xhigh = (int16_t) ((sumeven - sumodd) >> 13);
+ /* We shift by 12 to allow for the QMF filters (DC gain = 4096), plus 1
+ to allow for us summing two filters, plus 1 to allow for the 15 bit
+ input to the G.722 algorithm. */
+ xlow = (int16_t) ((sumeven + sumodd) >> 14);
+ xhigh = (int16_t) ((sumeven - sumodd) >> 14);
}
}
/* Block 1L, SUBTRA */
Modified: freeswitch/trunk/libs/spandsp/src/libspandsp.2008.sln
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/libspandsp.2008.sln (original)
+++ freeswitch/trunk/libs/spandsp/src/libspandsp.2008.sln Tue Apr 28 09:42:18 2009
@@ -1,6 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
+# Visual C++ Express 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_at_dictionary", "msvc\make_at_dictionary.2008.vcproj", "{DEE932AB-5911-4700-9EEB-8C7090A0A330}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_modem_filter", "msvc\make_modem_filter.2008.vcproj", "{329A6FA0-0FCC-4435-A950-E670AEFA9838}"
@@ -19,6 +19,41 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download TIFF", "msvc\Download_TIFF.2008.vcproj", "{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "t38_core_tests", "..\tests\msvc\t38_core_tests.vcproj", "{A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}"
+ ProjectSection(ProjectDependencies) = postProject
+ {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "t38_non_ecm_buffer_tests", "..\tests\msvc\t38_non_ecm_buffer_tests.vcproj", "{80A3D9D9-3846-4DA5-8676-F940D725EA62}"
+ ProjectSection(ProjectDependencies) = postProject
+ {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vector_int_tests", "..\tests\msvc\vector_int_tests.vcproj", "{80A60464-29E8-4EE8-BAFA-8708B7C08CC3}"
+ ProjectSection(ProjectDependencies) = postProject
+ {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vector_float_tests", "..\tests\msvc\vector_float_tests.vcproj", "{EA745FF7-9E4B-4C13-BA19-2EE8165A6245}"
+ ProjectSection(ProjectDependencies) = postProject
+ {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "complex_tests", "..\tests\msvc\complex_tests.vcproj", "{A349379F-0FEA-49C8-9535-05F39663337B}"
+ ProjectSection(ProjectDependencies) = postProject
+ {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "complex_vector_float_tests", "..\tests\msvc\complex_vector_float_tests.vcproj", "{2B0D705C-1CF2-401C-BFBC-A43FB806908C}"
+ ProjectSection(ProjectDependencies) = postProject
+ {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "complex_vector_int_tests", "..\tests\msvc\complex_vector_int_tests.vcproj", "{C2E8B4D1-A398-4D57-94F8-B61F20C7D514}"
+ ProjectSection(ProjectDependencies) = postProject
+ {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
All|Win32 = All|Win32
@@ -76,6 +111,69 @@
{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.Release|Win32.ActiveCfg = All|Win32
{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.Release|Win32.Build.0 = All|Win32
{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.Release|x64.ActiveCfg = All|Win32
+ {A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}.All|Win32.ActiveCfg = Release|Win32
+ {A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}.All|Win32.Build.0 = Release|Win32
+ {A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}.All|x64.ActiveCfg = Release|Win32
+ {A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}.Debug|Win32.Build.0 = Debug|Win32
+ {A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}.Debug|x64.ActiveCfg = Debug|Win32
+ {A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}.Release|Win32.ActiveCfg = Release|Win32
+ {A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}.Release|Win32.Build.0 = Release|Win32
+ {A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}.Release|x64.ActiveCfg = Release|Win32
+ {80A3D9D9-3846-4DA5-8676-F940D725EA62}.All|Win32.ActiveCfg = Release|Win32
+ {80A3D9D9-3846-4DA5-8676-F940D725EA62}.All|Win32.Build.0 = Release|Win32
+ {80A3D9D9-3846-4DA5-8676-F940D725EA62}.All|x64.ActiveCfg = Release|Win32
+ {80A3D9D9-3846-4DA5-8676-F940D725EA62}.Debug|Win32.ActiveCfg = Debug|Win32
+ {80A3D9D9-3846-4DA5-8676-F940D725EA62}.Debug|Win32.Build.0 = Debug|Win32
+ {80A3D9D9-3846-4DA5-8676-F940D725EA62}.Debug|x64.ActiveCfg = Debug|Win32
+ {80A3D9D9-3846-4DA5-8676-F940D725EA62}.Release|Win32.ActiveCfg = Release|Win32
+ {80A3D9D9-3846-4DA5-8676-F940D725EA62}.Release|Win32.Build.0 = Release|Win32
+ {80A3D9D9-3846-4DA5-8676-F940D725EA62}.Release|x64.ActiveCfg = Release|Win32
+ {80A60464-29E8-4EE8-BAFA-8708B7C08CC3}.All|Win32.ActiveCfg = Release|Win32
+ {80A60464-29E8-4EE8-BAFA-8708B7C08CC3}.All|Win32.Build.0 = Release|Win32
+ {80A60464-29E8-4EE8-BAFA-8708B7C08CC3}.All|x64.ActiveCfg = Release|Win32
+ {80A60464-29E8-4EE8-BAFA-8708B7C08CC3}.Debug|Win32.ActiveCfg = Debug|Win32
+ {80A60464-29E8-4EE8-BAFA-8708B7C08CC3}.Debug|Win32.Build.0 = Debug|Win32
+ {80A60464-29E8-4EE8-BAFA-8708B7C08CC3}.Debug|x64.ActiveCfg = Debug|Win32
+ {80A60464-29E8-4EE8-BAFA-8708B7C08CC3}.Release|Win32.ActiveCfg = Release|Win32
+ {80A60464-29E8-4EE8-BAFA-8708B7C08CC3}.Release|Win32.Build.0 = Release|Win32
+ {80A60464-29E8-4EE8-BAFA-8708B7C08CC3}.Release|x64.ActiveCfg = Release|Win32
+ {EA745FF7-9E4B-4C13-BA19-2EE8165A6245}.All|Win32.ActiveCfg = Release|Win32
+ {EA745FF7-9E4B-4C13-BA19-2EE8165A6245}.All|Win32.Build.0 = Release|Win32
+ {EA745FF7-9E4B-4C13-BA19-2EE8165A6245}.All|x64.ActiveCfg = Release|Win32
+ {EA745FF7-9E4B-4C13-BA19-2EE8165A6245}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EA745FF7-9E4B-4C13-BA19-2EE8165A6245}.Debug|Win32.Build.0 = Debug|Win32
+ {EA745FF7-9E4B-4C13-BA19-2EE8165A6245}.Debug|x64.ActiveCfg = Debug|Win32
+ {EA745FF7-9E4B-4C13-BA19-2EE8165A6245}.Release|Win32.ActiveCfg = Release|Win32
+ {EA745FF7-9E4B-4C13-BA19-2EE8165A6245}.Release|Win32.Build.0 = Release|Win32
+ {EA745FF7-9E4B-4C13-BA19-2EE8165A6245}.Release|x64.ActiveCfg = Release|Win32
+ {A349379F-0FEA-49C8-9535-05F39663337B}.All|Win32.ActiveCfg = Release|Win32
+ {A349379F-0FEA-49C8-9535-05F39663337B}.All|Win32.Build.0 = Release|Win32
+ {A349379F-0FEA-49C8-9535-05F39663337B}.All|x64.ActiveCfg = Release|Win32
+ {A349379F-0FEA-49C8-9535-05F39663337B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A349379F-0FEA-49C8-9535-05F39663337B}.Debug|Win32.Build.0 = Debug|Win32
+ {A349379F-0FEA-49C8-9535-05F39663337B}.Debug|x64.ActiveCfg = Debug|Win32
+ {A349379F-0FEA-49C8-9535-05F39663337B}.Release|Win32.ActiveCfg = Release|Win32
+ {A349379F-0FEA-49C8-9535-05F39663337B}.Release|Win32.Build.0 = Release|Win32
+ {A349379F-0FEA-49C8-9535-05F39663337B}.Release|x64.ActiveCfg = Release|Win32
+ {2B0D705C-1CF2-401C-BFBC-A43FB806908C}.All|Win32.ActiveCfg = Release|Win32
+ {2B0D705C-1CF2-401C-BFBC-A43FB806908C}.All|Win32.Build.0 = Release|Win32
+ {2B0D705C-1CF2-401C-BFBC-A43FB806908C}.All|x64.ActiveCfg = Release|Win32
+ {2B0D705C-1CF2-401C-BFBC-A43FB806908C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2B0D705C-1CF2-401C-BFBC-A43FB806908C}.Debug|Win32.Build.0 = Debug|Win32
+ {2B0D705C-1CF2-401C-BFBC-A43FB806908C}.Debug|x64.ActiveCfg = Debug|Win32
+ {2B0D705C-1CF2-401C-BFBC-A43FB806908C}.Release|Win32.ActiveCfg = Release|Win32
+ {2B0D705C-1CF2-401C-BFBC-A43FB806908C}.Release|Win32.Build.0 = Release|Win32
+ {2B0D705C-1CF2-401C-BFBC-A43FB806908C}.Release|x64.ActiveCfg = Release|Win32
+ {C2E8B4D1-A398-4D57-94F8-B61F20C7D514}.All|Win32.ActiveCfg = Release|Win32
+ {C2E8B4D1-A398-4D57-94F8-B61F20C7D514}.All|Win32.Build.0 = Release|Win32
+ {C2E8B4D1-A398-4D57-94F8-B61F20C7D514}.All|x64.ActiveCfg = Release|Win32
+ {C2E8B4D1-A398-4D57-94F8-B61F20C7D514}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C2E8B4D1-A398-4D57-94F8-B61F20C7D514}.Debug|Win32.Build.0 = Debug|Win32
+ {C2E8B4D1-A398-4D57-94F8-B61F20C7D514}.Debug|x64.ActiveCfg = Debug|Win32
+ {C2E8B4D1-A398-4D57-94F8-B61F20C7D514}.Release|Win32.ActiveCfg = Release|Win32
+ {C2E8B4D1-A398-4D57-94F8-B61F20C7D514}.Release|Win32.Build.0 = Release|Win32
+ {C2E8B4D1-A398-4D57-94F8-B61F20C7D514}.Release|x64.ActiveCfg = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Modified: freeswitch/trunk/libs/spandsp/src/make_at_dictionary.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/make_at_dictionary.c (original)
+++ freeswitch/trunk/libs/spandsp/src/make_at_dictionary.c Tue Apr 28 09:42:18 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: make_at_dictionary.c,v 1.2 2009/02/10 17:16:57 steveu Exp $
+ * $Id: make_at_dictionary.c,v 1.4 2009/04/24 22:35:25 steveu Exp $
*/
#if defined(HAVE_CONFIG_H)
@@ -228,6 +228,7 @@
"+EFRAM", /* V.250 6.5.8 - Frame length */
"+ER", /* V.250 6.5.5 - Error control reporting */
"+ES", /* V.250 6.5.1 - Error control selection */
+ "+ESA", /* V.80 8.2 - Synchronous access mode configuration */
"+ESR", /* V.250 6.5.3 - Selective repeat */
"+ETBM", /* V.250 6.5.6 - Call termination buffer management */
"+EWIND", /* V.250 6.5.7 - Window size */
@@ -289,8 +290,8 @@
"+GMR", /* V.250 6.1.6 - Request revision identification */
"+GOI", /* V.250 6.1.8 - Request global object identification */
"+GSN", /* V.250 6.1.7 - Request product serial number identification */
- "+IBC", /* TIA-617 8.3 - Control of in-band control */
- "+IBM", /* TIA-617 8.4 - In-Band MARK idle reporting control */
+ "+IBC", /* V.80 7.9 - Control of in-band control */
+ "+IBM", /* V.80 7.10 - In-band MARK idle reporting control */
"+ICF", /* V.250 6.2.11 - DTE-DCE character framing */
"+ICLOK", /* V.250 6.2.14 - Select sync transmit clock source */
"+IDSR", /* V.250 6.2.16 - Select data set ready option */
@@ -299,6 +300,7 @@
"+ILSD", /* V.250 6.2.15 - Select long space disconnect option */
"+IPR", /* V.250 6.2.10 - Fixed DTE rate */
"+IRTS", /* V.250 6.2.17 - Select synchronous mode RTS option */
+ "+ITF", /* V.80 8.4 - Transmit flow control thresholds */
"+MA", /* V.250 6.4.2 - Modulation automode control */
"+MR", /* V.250 6.4.3 - Modulation reporting control */
"+MS", /* V.250 6.4.1 - Modulation selection */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/async.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/async.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/async.h Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: async.h,v 1.24 2009/02/12 12:38:39 steveu Exp $
+ * $Id: async.h,v 1.25 2009/04/23 14:12:34 steveu Exp $
*/
/*! \file */
@@ -78,7 +78,11 @@
/*! \brief A modem has completed its task, and shut down. */
SIG_STATUS_SHUTDOWN_COMPLETE = -10,
/*! \brief Regular octet report for things like HDLC to the MTP standards. */
- SIG_STATUS_OCTET_REPORT = -11
+ SIG_STATUS_OCTET_REPORT = -11,
+ /*! \brief Notification that a modem has detected signal quality degradation. */
+ SIG_STATUS_POOR_SIGNAL_QUALITY = -12,
+ /*! \brief Notification that a modem retrain has occurred. */
+ SIG_STATUS_MODEM_RETRAIN_OCCURRED = -13
};
/*! Message put function for data pumps */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/fax_modems.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/fax_modems.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/fax_modems.h Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: fax_modems.h,v 1.10 2009/02/14 15:21:14 steveu Exp $
+ * $Id: fax_modems.h,v 1.11 2009/04/26 12:55:23 steveu Exp $
*/
/*! \file */
@@ -63,6 +63,10 @@
SPAN_DECLARE(int) fax_modems_v17_v21_rx(void *user_data, const int16_t amp[], int len);
SPAN_DECLARE(int) fax_modems_v27ter_v21_rx(void *user_data, const int16_t amp[], int len);
SPAN_DECLARE(int) fax_modems_v29_v21_rx(void *user_data, const int16_t amp[], int len);
+SPAN_DECLARE(int) fax_modems_v17_v21_rx_fillin(void *user_data, int len);
+SPAN_DECLARE(int) fax_modems_v27ter_v21_rx_fillin(void *user_data, int len);
+SPAN_DECLARE(int) fax_modems_v29_v21_rx_fillin(void *user_data, int len);
+SPAN_DECLARE(void) fax_modems_start_rx_modem(fax_modems_state_t *s, int which);
SPAN_DECLARE(void) fax_modems_set_tep_mode(fax_modems_state_t *s, int use_tep);
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/private/v22bis.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/private/v22bis.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/private/v22bis.h Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v22bis.h,v 1.4 2009/04/17 14:37:53 steveu Exp $
+ * $Id: v22bis.h,v 1.9 2009/04/26 09:50:28 steveu Exp $
*/
#if !defined(_SPANDSP_PRIVATE_V22BIS_H_)
@@ -34,22 +34,26 @@
*/
struct v22bis_state_s
{
- /*! \brief The bit rate of the modem. Valid values are 1200 and 2400. */
+ /*! \brief The maximum permitted bit rate of the modem. Valid values are 1200 and 2400. */
int bit_rate;
/*! \brief TRUE is this is the calling side modem. */
int caller;
- /*! \brief The callback function used to put each bit received. */
- put_bit_func_t put_bit;
/*! \brief The callback function used to get the next bit to be transmitted. */
get_bit_func_t get_bit;
- /*! \brief A user specified opaque pointer passed to the callback routines. */
- void *user_data;
+ /*! \brief A user specified opaque pointer passed to the get_bit callback routine. */
+ void *get_bit_user_data;
+ /*! \brief The callback function used to put each bit received. */
+ put_bit_func_t put_bit;
+ /*! \brief A user specified opaque pointer passed to the put_bit callback routine. */
+ void *put_bit_user_data;
/*! \brief The callback function used to report modem status changes. */
modem_rx_status_func_t status_handler;
/*! \brief A user specified opaque pointer passed to the status function. */
void *status_user_data;
- /* RECEIVE SECTION */
+ int negotiated_bit_rate;
+
+ /* Receive section */
struct
{
/*! \brief The route raised cosine (RRC) pulse shaping filter buffer. */
@@ -84,8 +88,6 @@
/*! \brief The integral part of the carrier tracking filter. */
float carrier_track_i;
- int scrambled_ones_to_date;
-
/*! \brief A callback function which may be enabled to report every symbol's
constellation position. */
qam_report_handler_t qam_report;
@@ -132,12 +134,11 @@
int sixteen_way_decisions;
- int detected_unscrambled_ones;
- int detected_unscrambled_zeros;
- int detected_2400bps_markers;
+ int pattern_repeats;
+ int last_raw_bits;
} rx;
- /* TRANSMIT SECTION */
+ /* Transmit section */
struct
{
/*! \brief The gain factor needed to achieve the specified output power. */
@@ -181,5 +182,22 @@
logging_state_t logging;
};
+#if defined(__cplusplus)
+extern "C"
+{
+#endif
+
+/*! Reinitialise an existing V.22bis modem receive context.
+ \brief Reinitialise an existing V.22bis modem receive context.
+ \param s The modem context.
+ \return 0 for OK, -1 for bad parameter */
+int v22bis_rx_restart(v22bis_state_t *s);
+
+void v22bis_report_status_change(v22bis_state_t *s, int status);
+
+#if defined(__cplusplus)
+}
+#endif
+
#endif
/*- End of file ------------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v22bis.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v22bis.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v22bis.h Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v22bis.h,v 1.39 2009/04/17 14:37:53 steveu Exp $
+ * $Id: v22bis.h,v 1.41 2009/04/25 10:18:50 steveu Exp $
*/
/*! \file */
@@ -81,13 +81,6 @@
{
#endif
-/*! Reinitialise an existing V.22bis modem receive context.
- \brief Reinitialise an existing V.22bis modem receive context.
- \param s The modem context.
- \param bit_rate The bit rate of the modem. Valid values are 1200 and 2400.
- \return 0 for OK, -1 for bad parameter */
-SPAN_DECLARE(int) v22bis_rx_restart(v22bis_state_t *s, int bit_rate);
-
/*! Process a block of received V.22bis modem audio samples.
\brief Process a block of received V.22bis modem audio samples.
\param s The modem context.
@@ -108,7 +101,7 @@
\brief Get a snapshot of the current equalizer coefficients.
\param coeffs The vector of complex coefficients.
\return The number of coefficients in the vector. */
-SPAN_DECLARE(int) v22bis_equalizer_state(v22bis_state_t *s, complexf_t **coeffs);
+SPAN_DECLARE(int) v22bis_rx_equalizer_state(v22bis_state_t *s, complexf_t **coeffs);
/*! Get the current received carrier frequency.
\param s The modem context.
@@ -118,7 +111,7 @@
/*! Get the current symbol timing correction since startup.
\param s The modem context.
\return The correction. */
-SPAN_DECLARE(float) v22bis_symbol_timing_correction(v22bis_state_t *s);
+SPAN_DECLARE(float) v22bis_rx_symbol_timing_correction(v22bis_state_t *s);
/*! Get a current received signal power.
\param s The modem context.
@@ -134,7 +127,7 @@
\param s The modem context.
\param handler The handler routine.
\param user_data An opaque pointer passed to the handler routine. */
-SPAN_DECLARE(void) v22bis_set_qam_report_handler(v22bis_state_t *s, qam_report_handler_t handler, void *user_data);
+SPAN_DECLARE(void) v22bis_rx_set_qam_report_handler(v22bis_state_t *s, qam_report_handler_t handler, void *user_data);
/*! Generate a block of V.22bis modem audio samples.
\brief Generate a block of V.22bis modem audio samples.
@@ -157,6 +150,18 @@
\return 0 for OK, -1 for bad parameter. */
SPAN_DECLARE(int) v22bis_restart(v22bis_state_t *s, int bit_rate);
+/*! Request a retrain for a V.22bis modem context. A rate change may also be resquested.
+ \brief Request a retrain for a V.22bis modem context.
+ \param s The modem context.
+ \param bit_rate The bit rate of the modem. Valid values are 1200 and 2400.
+ \return 0 for OK, -1 for bad parameter. */
+SPAN_DECLARE(int) v22bis_request_retrain(v22bis_state_t *s, int bit_rate);
+
+/*! Report the current operating bit rate of a V.22bis modem context.
+ \brief Report the current operating bit rate of a V.22bis modem context
+ \param s The modem context. */
+SPAN_DECLARE(int) v22bis_current_bit_rate(v22bis_state_t *s);
+
/*! Initialise a V.22bis modem context. This must be called before the first
use of the context, to initialise its contents.
\brief Initialise a V.22bis modem context.
@@ -173,8 +178,9 @@
int guard,
int caller,
get_bit_func_t get_bit,
+ void *get_bit_user_data,
put_bit_func_t put_bit,
- void *user_data);
+ void *put_bit_user_data);
/*! Release a V.22bis modem receive context.
\brief Release a V.22bis modem receive context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/version.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/version.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/version.h Tue Apr 28 09:42:18 2009
@@ -30,9 +30,9 @@
/* The date and time of the version are in UTC form. */
-#define SPANDSP_RELEASE_DATE 20090420
-#define SPANDSP_RELEASE_TIME 163808
-#define SPANDSP_RELEASE_DATETIME_STRING "20090420 163808"
+#define SPANDSP_RELEASE_DATE 20090427
+#define SPANDSP_RELEASE_TIME 151958
+#define SPANDSP_RELEASE_DATETIME_STRING "20090427 151958"
#endif
/*- End of file ------------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/t30.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t30.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t30.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t30.c,v 1.290 2009/04/16 12:11:54 steveu Exp $
+ * $Id: t30.c,v 1.291 2009/04/23 15:40:32 steveu Exp $
*/
/*! \file */
@@ -5914,7 +5914,7 @@
s->send_hdlc_user_data = send_hdlc_user_data;
/* Default to the basic modems. */
- s->supported_modems = T30_SUPPORT_V27TER | T30_SUPPORT_V29;
+ s->supported_modems = T30_SUPPORT_V27TER | T30_SUPPORT_V29 | T30_SUPPORT_V17;
s->supported_compressions = T30_SUPPORT_T4_1D_COMPRESSION | T30_SUPPORT_T4_2D_COMPRESSION;
s->supported_resolutions = T30_SUPPORT_STANDARD_RESOLUTION | T30_SUPPORT_FINE_RESOLUTION | T30_SUPPORT_SUPERFINE_RESOLUTION
| T30_SUPPORT_R8_RESOLUTION;
Modified: freeswitch/trunk/libs/spandsp/src/v17rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v17rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v17rx.c Tue Apr 28 09:42:18 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v17rx.c,v 1.145 2009/04/20 16:36:36 steveu Exp $
+ * $Id: v17rx.c,v 1.146 2009/04/21 13:59:07 steveu Exp $
*/
/*! \file */
@@ -1323,6 +1323,16 @@
SPAN_DECLARE(v17_rx_state_t *) v17_rx_init(v17_rx_state_t *s, int bit_rate, put_bit_func_t put_bit, void *user_data)
{
+ switch (bit_rate)
+ {
+ case 14400:
+ case 12000:
+ case 9600:
+ case 7200:
+ break;
+ default:
+ return NULL;
+ }
if (s == NULL)
{
if ((s = (v17_rx_state_t *) malloc(sizeof(*s))) == NULL)
Modified: freeswitch/trunk/libs/spandsp/src/v17tx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v17tx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v17tx.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v17tx.c,v 1.72 2009/04/12 04:20:01 steveu Exp $
+ * $Id: v17tx.c,v 1.73 2009/04/21 13:59:07 steveu Exp $
*/
/*! \file */
@@ -400,6 +400,16 @@
SPAN_DECLARE(v17_tx_state_t *) v17_tx_init(v17_tx_state_t *s, int bit_rate, int tep, get_bit_func_t get_bit, void *user_data)
{
+ switch (bit_rate)
+ {
+ case 14400:
+ case 12000:
+ case 9600:
+ case 7200:
+ break;
+ default:
+ return NULL;
+ }
if (s == NULL)
{
if ((s = (v17_tx_state_t *) malloc(sizeof(*s))) == NULL)
Modified: freeswitch/trunk/libs/spandsp/src/v18.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v18.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v18.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v18.c,v 1.6 2009/04/20 16:36:36 steveu Exp $
+ * $Id: v18.c,v 1.7 2009/04/26 07:00:38 steveu Exp $
*/
/*! \file */
@@ -113,12 +113,21 @@
{"##8", 'W'},
{"##9", 'Z'},
{"##0", ' '},
+#if defined(WIN32)
+ {"#*1", 'X'}, // (Note 1) 111 1011
+ {"#*2", 'X'}, // (Note 1) 111 1100
+ {"#*3", 'X'}, // (Note 1) 111 1101
+ {"#*4", 'X'}, // (Note 1) 101 1011
+ {"#*5", 'X'}, // (Note 1) 101 1100
+ {"#*6", 'X'}, // (Note 1) 101 1101
+#else
{"#*1", '�'}, // (Note 1) 111 1011
{"#*2", '�'}, // (Note 1) 111 1100
{"#*3", '�'}, // (Note 1) 111 1101
{"#*4", '�'}, // (Note 1) 101 1011
{"#*5", '�'}, // (Note 1) 101 1100
{"#*6", '�'}, // (Note 1) 101 1101
+#endif
{"#0", '?'},
{"#1", 'c'},
{"#2", 'f'},
Modified: freeswitch/trunk/libs/spandsp/src/v22bis_rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v22bis_rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v22bis_rx.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v22bis_rx.c,v 1.56 2009/04/20 12:26:38 steveu Exp $
+ * $Id: v22bis_rx.c,v 1.66 2009/04/27 15:18:52 steveu Exp $
*/
/*! \file */
@@ -47,11 +47,12 @@
#include "spandsp/telephony.h"
#include "spandsp/logging.h"
+#include "spandsp/complex.h"
#include "spandsp/vector_float.h"
+#include "spandsp/complex_vector_float.h"
#include "spandsp/async.h"
#include "spandsp/power_meter.h"
#include "spandsp/arctan2.h"
-#include "spandsp/complex.h"
#include "spandsp/dds.h"
#include "spandsp/complex_filters.h"
@@ -108,10 +109,10 @@
V22BIS_RX_TRAINING_STAGE_SYMBOL_ACQUISITION,
V22BIS_RX_TRAINING_STAGE_LOG_PHASE,
V22BIS_RX_TRAINING_STAGE_UNSCRAMBLED_ONES,
+ V22BIS_RX_TRAINING_STAGE_UNSCRAMBLED_ONES_SUSTAINING,
V22BIS_RX_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200,
V22BIS_RX_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200_SUSTAINING,
- V22BIS_RX_TRAINING_STAGE_WAIT_FOR_START_1,
- V22BIS_RX_TRAINING_STAGE_WAIT_FOR_START_2,
+ V22BIS_RX_TRAINING_STAGE_WAIT_FOR_SCRAMBLED_ONES_AT_2400,
V22BIS_RX_TRAINING_STAGE_PARKED
};
@@ -158,7 +159,7 @@
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(float) v22bis_symbol_timing_correction(v22bis_state_t *s)
+SPAN_DECLARE(float) v22bis_rx_symbol_timing_correction(v22bis_state_t *s)
{
return (float) s->rx.total_baud_timing_correction/((float) PULSESHAPER_COEFF_SETS*40.0f/(3.0f*2.0f));
}
@@ -177,16 +178,16 @@
}
/*- End of function --------------------------------------------------------*/
-static void report_status_change(v22bis_state_t *s, int status)
+void v22bis_report_status_change(v22bis_state_t *s, int status)
{
if (s->status_handler)
s->status_handler(s->status_user_data, status);
else if (s->put_bit)
- s->put_bit(s->user_data, status);
+ s->put_bit(s->put_bit_user_data, status);
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(int) v22bis_equalizer_state(v22bis_state_t *s, complexf_t **coeffs)
+SPAN_DECLARE(int) v22bis_rx_equalizer_state(v22bis_state_t *s, complexf_t **coeffs)
{
*coeffs = s->rx.eq_coeff;
return 2*V22BIS_EQUALIZER_LEN + 1;
@@ -195,31 +196,20 @@
static void equalizer_reset(v22bis_state_t *s)
{
- int i;
-
/* Start with an equalizer based on everything being perfect */
- for (i = 0; i < 2*V22BIS_EQUALIZER_LEN + 1; i++)
- s->rx.eq_coeff[i] = complex_setf(0.0f, 0.0f);
+#if defined(SPANDSP_USE_FIXED_POINTx)
+ cvec_zeroi16(s->rx.eq_coeff, 2*V22BIS_EQUALIZER_LEN + 1);
+ s->rx.eq_coeff[V22BIS_EQUALIZER_LEN] = complex_seti16(3*FP_FACTOR, 0*FP_FACTOR);
+ cvec_zeroi16(s->rx.eq_buf, V22BIS_EQUALIZER_MASK + 1);
+ s->rx.eq_delta = 32768.0f*EQUALIZER_DELTA/(2*V22BIS_EQUALIZER_LEN + 1);
+#else
+ cvec_zerof(s->rx.eq_coeff, 2*V22BIS_EQUALIZER_LEN + 1);
s->rx.eq_coeff[V22BIS_EQUALIZER_LEN] = complex_setf(3.0f, 0.0f);
- for (i = 0; i <= V22BIS_EQUALIZER_MASK; i++)
- s->rx.eq_buf[i] = complex_setf(0.0f, 0.0f);
-
- s->rx.eq_coeff[V22BIS_EQUALIZER_LEN - 6].re = -0.02f;
- s->rx.eq_coeff[V22BIS_EQUALIZER_LEN - 5].re = 0.035f;
- s->rx.eq_coeff[V22BIS_EQUALIZER_LEN - 4].re = 0.08f;
- s->rx.eq_coeff[V22BIS_EQUALIZER_LEN - 3].re = -0.30f;
- s->rx.eq_coeff[V22BIS_EQUALIZER_LEN - 2].re = -0.37f;
- s->rx.eq_coeff[V22BIS_EQUALIZER_LEN - 1].re = 0.09f;
- s->rx.eq_coeff[V22BIS_EQUALIZER_LEN].re = 3.19f;
- s->rx.eq_coeff[V22BIS_EQUALIZER_LEN + 1].re = 0.09f;
- s->rx.eq_coeff[V22BIS_EQUALIZER_LEN + 2].re = -0.37f;
- s->rx.eq_coeff[V22BIS_EQUALIZER_LEN + 3].re = -0.30f;
- s->rx.eq_coeff[V22BIS_EQUALIZER_LEN + 5].re = 0.035f;
- s->rx.eq_coeff[V22BIS_EQUALIZER_LEN + 6].re = -0.02f;
-
+ cvec_zerof(s->rx.eq_buf, V22BIS_EQUALIZER_MASK + 1);
+ s->rx.eq_delta = EQUALIZER_DELTA/(2*V22BIS_EQUALIZER_LEN + 1);
+#endif
s->rx.eq_put_step = 20 - 1;
s->rx.eq_step = 0;
- s->rx.eq_delta = EQUALIZER_DELTA/(2*V22BIS_EQUALIZER_LEN + 1);
}
/*- End of function --------------------------------------------------------*/
@@ -291,7 +281,9 @@
bit &= 1;
/* Descramble the bit */
- out_bit = (bit ^ (s->rx.scramble_reg >> 14) ^ (s->rx.scramble_reg >> 17)) & 1;
+ out_bit = (bit ^ (s->rx.scramble_reg >> 13) ^ (s->rx.scramble_reg >> 16)) & 1;
+ s->rx.scramble_reg = (s->rx.scramble_reg << 1) | bit;
+
if (s->rx.scrambler_pattern_count >= 64)
{
out_bit ^= 1;
@@ -301,7 +293,6 @@
s->rx.scrambler_pattern_count++;
else
s->rx.scrambler_pattern_count = 0;
- s->rx.scramble_reg = (s->rx.scramble_reg << 1) | bit;
return out_bit;
}
/*- End of function --------------------------------------------------------*/
@@ -312,7 +303,7 @@
/* Descramble the bit */
out_bit = descramble(s, bit);
- s->put_bit(s->user_data, out_bit);
+ s->put_bit(s->put_bit_user_data, out_bit);
}
/*- End of function --------------------------------------------------------*/
@@ -321,16 +312,16 @@
int raw_bits;
raw_bits = phase_steps[((nearest >> 2) - (s->rx.constellation_state >> 2)) & 3];
+ s->rx.constellation_state = nearest;
/* The first two bits are the quadrant */
put_bit(s, raw_bits >> 1);
put_bit(s, raw_bits);
- if (s->bit_rate == 2400)
+ if (s->rx.sixteen_way_decisions)
{
/* The other two bits are the position within the quadrant */
put_bit(s, nearest >> 1);
put_bit(s, nearest);
}
- s->rx.constellation_state = nearest;
}
/*- End of function --------------------------------------------------------*/
@@ -340,16 +331,16 @@
int out_bits;
raw_bits = phase_steps[((nearest >> 2) - (s->rx.constellation_state >> 2)) & 3];
+ s->rx.constellation_state = nearest;
/* The first two bits are the quadrant */
out_bits = descramble(s, raw_bits >> 1);
out_bits = (out_bits << 1) | descramble(s, raw_bits);
- if (s->bit_rate == 2400)
+ if (s->rx.sixteen_way_decisions)
{
/* The other two bits are the position within the quadrant */
out_bits = (out_bits << 1) | descramble(s, nearest >> 1);
out_bits = (out_bits << 1) | descramble(s, nearest);
}
- s->rx.constellation_state = nearest;
return out_bits;
}
/*- End of function --------------------------------------------------------*/
@@ -443,7 +434,7 @@
when the true symbol boundary is close to a sample boundary. */
s->rx.eq_put_step += (s->rx.gardner_integrate/16);
s->rx.total_baud_timing_correction += (s->rx.gardner_integrate/16);
-//span_log(&s->logging, SPAN_LOG_FLOW, "Gardner kick %d [total %d]\n", s->rx.gardner_integrate, s->rx.total_baud_timing_correction);
+ //span_log(&s->logging, SPAN_LOG_FLOW, "Gardner kick %d [total %d]\n", s->rx.gardner_integrate, s->rx.total_baud_timing_correction);
if (s->rx.qam_report)
s->rx.qam_report(s->rx.qam_user_data, NULL, NULL, s->rx.gardner_integrate);
s->rx.gardner_integrate = 0;
@@ -451,7 +442,6 @@
z = equalizer_get(s);
-//span_log(&s->logging, SPAN_LOG_FLOW, "VVV %p %d\n", s->user_data, s->rx.training);
if (s->rx.sixteen_way_decisions)
{
re = (int) (z.re + 3.0f);
@@ -468,20 +458,20 @@
}
else
{
- zz = complex_setf(3.0f/sqrtf(10.0f), -1.0f/sqrtf(10.0f));
+ zz = complex_setf(3.0f/3.162278f, -1.0f/3.162278f);
zz = complex_mulf(&z, &zz);
nearest = (find_quadrant(&zz) << 2) | 0x01;
- printf("Trackit rx %p %15.5f %15.5f %15.5f %15.5f %d\n", s, z.re, z.im, zz.re, zz.im, nearest);
}
+ raw_bits = 0;
switch (s->rx.training)
{
case V22BIS_RX_TRAINING_STAGE_NORMAL_OPERATION:
/* Normal operation. */
- track_carrier(s, &z, &v22bis_constellation[nearest]);
- tune_equalizer(s, &z, &v22bis_constellation[nearest]);
+ target = &v22bis_constellation[nearest];
+ track_carrier(s, &z, target);
+ tune_equalizer(s, &z, target);
decode_baud(s, nearest);
- target = &v22bis_constellation[s->rx.constellation_state];
break;
case V22BIS_RX_TRAINING_STAGE_SYMBOL_ACQUISITION:
/* Allow time for the Gardner algorithm to settle the symbol timing. */
@@ -494,13 +484,13 @@
but since we might be off in the opposite direction from the source, the total
error could be higher. */
s->rx.gardner_step = 4;
- s->rx.detected_unscrambled_zeros = 0;
- s->rx.detected_unscrambled_ones = 0;
- s->rx.detected_2400bps_markers = 0;
+ s->rx.pattern_repeats = 0;
if (s->caller)
s->rx.training = V22BIS_RX_TRAINING_STAGE_UNSCRAMBLED_ONES;
else
s->rx.training = V22BIS_RX_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200;
+ /* Be pessimistic and see what the handshake brings */
+ s->negotiated_bit_rate = 1200;
break;
}
/* Once we have pulled in the symbol timing in a coarse way, use finer
@@ -511,29 +501,25 @@
case V22BIS_RX_TRAINING_STAGE_UNSCRAMBLED_ONES:
/* Calling modem only */
/* The calling modem should initially receive unscrambled ones at 1200bps */
- track_carrier(s, &z, &v22bis_constellation[nearest]);
- target = &z;
+ target = &v22bis_constellation[nearest];
+ track_carrier(s, &z, target);
raw_bits = phase_steps[((nearest >> 2) - (s->rx.constellation_state >> 2)) & 3];
s->rx.constellation_state = nearest;
- switch (raw_bits)
- {
- case 0:
- s->rx.detected_unscrambled_zeros++;
- break;
- case 3:
- s->rx.detected_unscrambled_ones++;
- break;
- default:
- s->rx.detected_2400bps_markers++;
- break;
- }
-span_log(&s->logging, SPAN_LOG_FLOW, "TWIDDLING THUMBS - %d %d\n", s->rx.training_count, s->rx.detected_2400bps_markers);
+ if (raw_bits != s->rx.last_raw_bits)
+ s->rx.pattern_repeats = 0;
+ else
+ s->rx.pattern_repeats++;
if (++s->rx.training_count == ms_to_symbols(155 + 456))
{
- if (s->rx.detected_unscrambled_ones >= ms_to_symbols(456)
- ||
- s->rx.detected_unscrambled_zeros >= ms_to_symbols(456))
+ /* After the first 155ms things should have been steady, so check if the last 456ms was
+ steady at 11 or 00. */
+ if (raw_bits == s->rx.last_raw_bits
+ &&
+ (raw_bits == 0x3 || raw_bits == 0x0)
+ &&
+ s->rx.pattern_repeats >= ms_to_symbols(456))
{
+ /* It looks like the answering machine is sending us a clean unscrambled 11 or 00 */
if (s->bit_rate == 2400)
{
/* Try to establish at 2400bps */
@@ -544,127 +530,147 @@
else
{
/* Only try to establish at 1200bps */
- span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting S11 (Caller)\n");
- s->tx.training = V22BIS_TX_TRAINING_STAGE_TIMED_S11;
+ span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting S11 (1200) (Caller)\n");
+ s->tx.training = V22BIS_TX_TRAINING_STAGE_S11;
s->tx.training_count = 0;
}
}
-span_log(&s->logging, SPAN_LOG_FLOW, "unscrambled ones = %d, unscrambled zeros = %d, 2400 markers = %d\n", s->rx.detected_unscrambled_ones, s->rx.detected_unscrambled_zeros, s->rx.detected_2400bps_markers);
+ s->rx.pattern_repeats = 0;
s->rx.training_count = 0;
- s->rx.training = V22BIS_RX_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200;
- s->rx.detected_unscrambled_zeros = 0;
- s->rx.detected_unscrambled_ones = 0;
- s->rx.detected_2400bps_markers = 0;
- s->rx.scrambled_ones_to_date = 0;
+ s->rx.training = V22BIS_RX_TRAINING_STAGE_UNSCRAMBLED_ONES_SUSTAINING;
}
break;
- case V22BIS_RX_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200:
- track_carrier(s, &z, &v22bis_constellation[nearest]);
- tune_equalizer(s, &z, &v22bis_constellation[nearest]);
- target = &z;
+ case V22BIS_RX_TRAINING_STAGE_UNSCRAMBLED_ONES_SUSTAINING:
+ /* Calling modem only */
+ /* Wait for the end of the unscrambled ones at 1200bps */
+ target = &v22bis_constellation[nearest];
+ track_carrier(s, &z, target);
raw_bits = phase_steps[((nearest >> 2) - (s->rx.constellation_state >> 2)) & 3];
- switch (raw_bits)
+ s->rx.constellation_state = nearest;
+ if (raw_bits != s->rx.last_raw_bits)
{
- case 0:
- s->rx.detected_unscrambled_zeros++;
- break;
- case 3:
- s->rx.detected_unscrambled_ones++;
- break;
- default:
- s->rx.detected_2400bps_markers++;
- break;
+ /* This looks like the end of the sustained initial unscrambled 11 or 00 */
+ s->tx.training_count = 0;
+ s->tx.training = V22BIS_TX_TRAINING_STAGE_TIMED_S11;
+ s->rx.training_count = 0;
+ s->rx.training = V22BIS_RX_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200;
+ s->rx.pattern_repeats = 0;
}
+ break;
+ case V22BIS_RX_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200:
+ target = &v22bis_constellation[nearest];
+ track_carrier(s, &z, target);
+ tune_equalizer(s, &z, target);
+ raw_bits = phase_steps[((nearest >> 2) - (s->rx.constellation_state >> 2)) & 3];
bitstream = decode_baudx(s, nearest);
- s->rx.scrambled_ones_to_date += ones[bitstream];
-span_log(&s->logging, SPAN_LOG_FLOW, "S11 0x%02x 0x%02x 0x%X %d %d %d %d %d %d\n", raw_bits, nearest, bitstream, s->rx.scrambled_ones_to_date, s->rx.detected_unscrambled_ones, s->rx.detected_unscrambled_zeros, s->rx.detected_2400bps_markers, s->rx.training_count, s->rx.detected_2400bps_markers);
- if (s->rx.detected_2400bps_markers && ++s->rx.training_count > ms_to_symbols(270))
+ s->rx.training_count++;
+//span_log(&s->logging, SPAN_LOG_FLOW, "S11 0x%02x 0x%02x 0x%X %d %d %d %d %d\n", raw_bits, nearest, bitstream, s->rx.scrambled_ones_to_date, 0, 0, 0, s->rx.training_count);
+ if (s->negotiated_bit_rate == 1200)
{
- if (!s->caller)
+ /* Search for the S1 signal */
+ if ((s->rx.last_raw_bits ^ raw_bits) == 0x3)
+ {
+ s->rx.pattern_repeats++;
+ }
+ else
{
- if (s->bit_rate == 2400 && s->rx.detected_2400bps_markers > 20)
+ if (s->rx.pattern_repeats >= 15 && (s->rx.last_raw_bits == 0x3 || s->rx.last_raw_bits == 0x0))
{
- /* Try to establish at 2400bps */
- span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting U0011 (S1) (Answerer)\n");
- s->tx.training = V22BIS_TX_TRAINING_STAGE_U0011;
+ /* We should get a full run of 00 11 (about 60 bauds) at the calling modem, but only about 20
+ at the answering modem, as the first 40 are TED settling time. */
+ span_log(&s->logging, SPAN_LOG_FLOW, "+++ S1 detected at %d\n", s->rx.pattern_repeats);
+ if (s->bit_rate == 2400)
+ {
+ if (!s->caller)
+ {
+ /* Accept establishment at 2400bps */
+ span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting U0011 (S1) (Answerer)\n");
+ s->tx.training = V22BIS_TX_TRAINING_STAGE_U0011;
+ s->tx.training_count = 0;
+ }
+ s->negotiated_bit_rate = 2400;
+ }
+ }
+ s->rx.pattern_repeats = 0;
+ }
+ if (s->rx.training_count >= ms_to_symbols(270))
+ {
+ /* If we haven't seen the S1 signal by now, we are committed to be in 1200bps mode */
+ if (s->caller)
+ {
+ span_log(&s->logging, SPAN_LOG_FLOW, "+++ Rx normal operation (1200)\n");
+ /* The transmit side needs to sustain the scrambled ones for a timed period */
s->tx.training_count = 0;
+ s->tx.training = V22BIS_TX_TRAINING_STAGE_TIMED_S11;
+ /* Normal reception starts immediately */
+ s->rx.training = V22BIS_RX_TRAINING_STAGE_NORMAL_OPERATION;
+ s->rx.carrier_track_i = 8000.0f;
}
else
{
- /* We are going to work at 1200bps. */
- span_log(&s->logging, SPAN_LOG_FLOW, "+++ [1200] starting S11 (Answerer)\n");
- s->bit_rate = 1200;
- s->tx.training = V22BIS_TX_TRAINING_STAGE_TIMED_S11;
+ span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting S11 (1200) (Answerer)\n");
+ /* The transmit side needs to sustain the scrambled ones for a timed period */
s->tx.training_count = 0;
+ s->tx.training = V22BIS_TX_TRAINING_STAGE_TIMED_S11;
+ /* The receive side needs to wait a timed period, receiving scrambled ones,
+ before entering normal operation. */
+ s->rx.training = V22BIS_RX_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200_SUSTAINING;
}
}
- s->rx.training = V22BIS_RX_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200_SUSTAINING;
- }
- break;
- case V22BIS_RX_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200_SUSTAINING:
- track_carrier(s, &z, &v22bis_constellation[nearest]);
- tune_equalizer(s, &z, &v22bis_constellation[nearest]);
- target = &z;
- raw_bits = phase_steps[((nearest >> 2) - (s->rx.constellation_state >> 2)) & 3];
- switch (raw_bits)
- {
- case 0:
- s->rx.detected_unscrambled_zeros++;
- break;
- case 3:
- s->rx.detected_unscrambled_ones++;
- break;
- default:
- s->rx.detected_2400bps_markers++;
- break;
- }
- bitstream = decode_baudx(s, nearest);
- s->rx.scrambled_ones_to_date += ones[bitstream];
-span_log(&s->logging, SPAN_LOG_FLOW, "S11 0x%02x 0x%02x 0x%X %d %d %d %d %d sustain\n", raw_bits, nearest, bitstream, s->rx.scrambled_ones_to_date, s->rx.detected_unscrambled_ones, s->rx.detected_unscrambled_zeros, s->rx.detected_2400bps_markers, s->rx.training_count);
- if (s->rx.detected_2400bps_markers == 20)
- {
- /* It looks like we have the S1 (Unscrambled 00 11) section, so 2400bps
- operation is possible. */
- s->rx.detected_2400bps_markers++;
- if (s->bit_rate == 2400)
- {
- /* We are allowed to use 2400bps, and the far end is requesting 2400bps. Result: we are going to
- work at 2400bps */
- span_log(&s->logging, SPAN_LOG_FLOW, "+++ [2400] starting U0011 (S1)\n");
- s->tx.training = V22BIS_TX_TRAINING_STAGE_U0011;
- s->tx.training_count = 0;
- }
}
- if (++s->rx.training_count > ms_to_symbols(270 + 765))
+ else
{
if (s->caller)
{
- if (s->bit_rate == 2400)
+ if (s->rx.training_count >= ms_to_symbols(100 + 450))
{
- /* We've continued for a further 756+-10ms. This should have given the other
- side enough time to train its equaliser. */
- span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting S1111 (B)\n");
- s->tx.training = V22BIS_TX_TRAINING_STAGE_S1111;
- s->tx.training_count = 0;
+ span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting 16 way decisions (caller)\n");
+ s->rx.sixteen_way_decisions = TRUE;
+ s->rx.training = V22BIS_RX_TRAINING_STAGE_WAIT_FOR_SCRAMBLED_ONES_AT_2400;
+ s->rx.pattern_repeats = 0;
+ s->rx.carrier_track_i = 8000.0f;
}
- else
+ }
+ else
+ {
+ if (s->rx.training_count >= ms_to_symbols(450))
{
- span_log(&s->logging, SPAN_LOG_FLOW, "+++ Tx normal operation (1200)\n");
- s->tx.training = V22BIS_TX_TRAINING_STAGE_NORMAL_OPERATION;
- s->tx.training_count = 0;
- s->tx.current_get_bit = s->get_bit;
+ span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting 16 way decisions (answerer)\n");
+ s->rx.sixteen_way_decisions = TRUE;
+ s->rx.training = V22BIS_RX_TRAINING_STAGE_WAIT_FOR_SCRAMBLED_ONES_AT_2400;
+ s->rx.pattern_repeats = 0;
}
}
- if (s->bit_rate == 2400)
- span_log(&s->logging, SPAN_LOG_FLOW, "+++ Rx normal operation (2400)\n");
- else
- span_log(&s->logging, SPAN_LOG_FLOW, "+++ Rx normal operation (1200)\n");
+ }
+ break;
+ case V22BIS_RX_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200_SUSTAINING:
+ target = &v22bis_constellation[nearest];
+ track_carrier(s, &z, target);
+ tune_equalizer(s, &z, target);
+ bitstream = decode_baudx(s, nearest);
+ if (++s->rx.training_count > ms_to_symbols(270 + 765))
+ {
+ span_log(&s->logging, SPAN_LOG_FLOW, "+++ Rx normal operation (1200)\n");
s->rx.training = V22BIS_RX_TRAINING_STAGE_NORMAL_OPERATION;
}
- if (s->bit_rate == 2400 && s->rx.training_count == ms_to_symbols(450))
+ break;
+ case V22BIS_RX_TRAINING_STAGE_WAIT_FOR_SCRAMBLED_ONES_AT_2400:
+ target = &v22bis_constellation[nearest];
+ track_carrier(s, &z, target);
+ tune_equalizer(s, &z, target);
+ bitstream = decode_baudx(s, nearest);
+ /* We need 32 sustained 1's to switch into normal operation. */
+ if (bitstream == 0xF)
+ {
+ if (++s->rx.pattern_repeats >= 9)
+ {
+ span_log(&s->logging, SPAN_LOG_FLOW, "+++ Rx normal operation (2400)\n");
+ s->rx.training = V22BIS_RX_TRAINING_STAGE_NORMAL_OPERATION;
+ }
+ }
+ else
{
- span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting 16 way decisions\n");
- s->rx.sixteen_way_decisions = TRUE;
+ s->rx.pattern_repeats = 0;
}
break;
case V22BIS_RX_TRAINING_STAGE_PARKED:
@@ -674,6 +680,7 @@
target = &z;
break;
}
+ s->rx.last_raw_bits = raw_bits;
if (s->rx.qam_report)
s->rx.qam_report(s->rx.qam_user_data, &z, target, s->rx.constellation_state);
}
@@ -721,8 +728,8 @@
/* Look for power below the carrier off point */
if (power < s->rx.carrier_off_power)
{
- v22bis_rx_restart(s, s->bit_rate);
- report_status_change(s, SIG_STATUS_CARRIER_DOWN);
+ v22bis_restart(s, s->bit_rate);
+ v22bis_report_status_change(s, SIG_STATUS_CARRIER_DOWN);
continue;
}
}
@@ -732,7 +739,7 @@
if (power < s->rx.carrier_on_power)
continue;
s->rx.signal_present = TRUE;
- report_status_change(s, SIG_STATUS_CARRIER_UP);
+ v22bis_report_status_change(s, SIG_STATUS_CARRIER_UP);
}
if (s->rx.training != V22BIS_RX_TRAINING_STAGE_PARKED)
{
@@ -813,11 +820,8 @@
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(int) v22bis_rx_restart(v22bis_state_t *s, int bit_rate)
+int v22bis_rx_restart(v22bis_state_t *s)
{
- /* If bit_rate is 2400, the real bit rate is negotiated. If bit_rate
- is 1200, the real bit rate is forced to 1200. */
- s->bit_rate = bit_rate;
vec_zerof(s->rx.rrc_filter, sizeof(s->rx.rrc_filter)/sizeof(s->rx.rrc_filter[0]));
s->rx.rrc_filter_step = 0;
s->rx.scramble_reg = 0;
@@ -837,19 +841,24 @@
equalizer_reset(s);
- s->rx.detected_unscrambled_ones = 0;
- s->rx.detected_unscrambled_zeros = 0;
- s->rx.detected_2400bps_markers = 0;
+ s->rx.pattern_repeats = 0;
+ s->rx.last_raw_bits = 0;
s->rx.gardner_integrate = 0;
s->rx.gardner_step = 256;
s->rx.baud_phase = 0;
- s->rx.carrier_track_i = 8000.0f;
+ s->rx.training_error = 0.0f;
+ s->rx.total_baud_timing_correction = 0;
+ /* We want the carrier to pull in faster on the answerer side, as it has very little time to adapt. */
+ s->rx.carrier_track_i = (s->caller) ? 8000.0f : 40000.0f;
s->rx.carrier_track_p = 8000000.0f;
+
+ s->negotiated_bit_rate = 1200;
+
return 0;
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(void) v22bis_set_qam_report_handler(v22bis_state_t *s, qam_report_handler_t handler, void *user_data)
+SPAN_DECLARE(void) v22bis_rx_set_qam_report_handler(v22bis_state_t *s, qam_report_handler_t handler, void *user_data)
{
s->rx.qam_report = handler;
s->rx.qam_user_data = user_data;
Modified: freeswitch/trunk/libs/spandsp/src/v22bis_tx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v22bis_tx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v22bis_tx.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v22bis_tx.c,v 1.56 2009/04/17 14:37:52 steveu Exp $
+ * $Id: v22bis_tx.c,v 1.61 2009/04/25 10:18:50 steveu Exp $
*/
/*! \file */
@@ -294,12 +294,13 @@
bit ^= 1;
s->tx.scrambler_pattern_count = 0;
}
- out_bit = (bit ^ (s->tx.scramble_reg >> 14) ^ (s->tx.scramble_reg >> 17)) & 1;
+ out_bit = (bit ^ (s->tx.scramble_reg >> 13) ^ (s->tx.scramble_reg >> 16)) & 1;
+ s->tx.scramble_reg = (s->tx.scramble_reg << 1) | out_bit;
+
if (out_bit == 1)
s->tx.scrambler_pattern_count++;
else
s->tx.scrambler_pattern_count = 0;
- s->tx.scramble_reg = (s->tx.scramble_reg << 1) | out_bit;
return out_bit;
}
/*- End of function --------------------------------------------------------*/
@@ -308,7 +309,7 @@
{
int bit;
- if ((bit = s->tx.current_get_bit(s->user_data)) == SIG_STATUS_END_OF_DATA)
+ if ((bit = s->tx.current_get_bit(s->get_bit_user_data)) == SIG_STATUS_END_OF_DATA)
{
/* Fill out this symbol with ones, and prepare to send
the rest of the shutdown sequence. */
@@ -334,8 +335,8 @@
{
/* Initial 75ms of silence is over */
span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting U11 1200\n");
- s->tx.training = V22BIS_TX_TRAINING_STAGE_U11;
s->tx.training_count = 0;
+ s->tx.training = V22BIS_TX_TRAINING_STAGE_U11;
}
/* Fall through */
case V22BIS_TX_TRAINING_STAGE_INITIAL_SILENCE:
@@ -353,37 +354,40 @@
/* Continuous unscrambled double dibit 00 11 at 1200bps. This is termed the S1 segment in
the V.22bis spec. It is only sent to request or accept 2400bps mode, and lasts 100+-3ms. After this
timed burst, we unconditionally change to sending scrambled ones at 1200bps. */
- s->tx.constellation_state = (s->tx.constellation_state + phase_steps[(s->tx.training_count & 1) ? 3 : 0]) & 3;
+ s->tx.constellation_state = (s->tx.constellation_state + phase_steps[3*(s->tx.training_count & 1)]) & 3;
z = v22bis_constellation[(s->tx.constellation_state << 2) | 0x01];
if (++s->tx.training_count >= ms_to_symbols(100))
{
span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting S11 after U0011\n");
if (s->caller)
+ {
+ s->tx.training_count = 0;
s->tx.training = V22BIS_TX_TRAINING_STAGE_S11;
+ }
else
+ {
+ s->tx.training_count = ms_to_symbols(756 - (600 - 100));
s->tx.training = V22BIS_TX_TRAINING_STAGE_TIMED_S11;
- s->tx.training_count = 0;
+ }
}
break;
case V22BIS_TX_TRAINING_STAGE_TIMED_S11:
/* A timed period of scrambled ones at 1200bps. */
- if (!s->caller)
+ if (++s->tx.training_count >= ms_to_symbols(756))
{
- if (++s->tx.training_count >= ms_to_symbols(756))
+ if (s->negotiated_bit_rate == 2400)
{
- if (s->bit_rate == 2400)
- {
- span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting S1111 (C)\n");
- s->tx.training = V22BIS_TX_TRAINING_STAGE_S1111;
- s->tx.training_count = 0;
- }
- else
- {
- span_log(&s->logging, SPAN_LOG_FLOW, "+++ Tx normal operation (1200)\n");
- s->tx.training = V22BIS_TX_TRAINING_STAGE_NORMAL_OPERATION;
- s->tx.training_count = 0;
- s->tx.current_get_bit = s->get_bit;
- }
+ span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting S1111 (C)\n");
+ s->tx.training_count = 0;
+ s->tx.training = V22BIS_TX_TRAINING_STAGE_S1111;
+ }
+ else
+ {
+ span_log(&s->logging, SPAN_LOG_FLOW, "+++ Tx normal operation (1200)\n");
+ s->tx.training_count = 0;
+ s->tx.training = V22BIS_TX_TRAINING_STAGE_NORMAL_OPERATION;
+ v22bis_report_status_change(s, SIG_STATUS_TRAINING_SUCCEEDED);
+ s->tx.current_get_bit = s->get_bit;
}
}
/* Fall through */
@@ -406,8 +410,9 @@
{
/* We have completed training. Now handle some real work. */
span_log(&s->logging, SPAN_LOG_FLOW, "+++ Tx normal operation (2400)\n");
- s->tx.training = V22BIS_TX_TRAINING_STAGE_NORMAL_OPERATION;
s->tx.training_count = 0;
+ s->tx.training = V22BIS_TX_TRAINING_STAGE_NORMAL_OPERATION;
+ v22bis_report_status_change(s, SIG_STATUS_TRAINING_SUCCEEDED);
s->tx.current_get_bit = s->get_bit;
}
break;
@@ -442,7 +447,7 @@
bits = get_scrambled_bit(s);
bits = (bits << 1) | get_scrambled_bit(s);
s->tx.constellation_state = (s->tx.constellation_state + phase_steps[bits]) & 3;
- if (s->bit_rate == 1200)
+ if (s->negotiated_bit_rate == 1200)
{
bits = 0x01;
}
@@ -525,9 +530,8 @@
}
/*- End of function --------------------------------------------------------*/
-static int v22bis_tx_restart(v22bis_state_t *s, int bit_rate)
+static int v22bis_tx_restart(v22bis_state_t *s)
{
- s->bit_rate = bit_rate;
cvec_zerof(s->tx.rrc_filter, sizeof(s->tx.rrc_filter)/sizeof(s->tx.rrc_filter[0]));
s->tx.rrc_filter_step = 0;
s->tx.scramble_reg = 0;
@@ -550,14 +554,14 @@
SPAN_DECLARE(void) v22bis_set_get_bit(v22bis_state_t *s, get_bit_func_t get_bit, void *user_data)
{
s->get_bit = get_bit;
- s->user_data = user_data;
+ s->get_bit_user_data = user_data;
}
/*- End of function --------------------------------------------------------*/
SPAN_DECLARE(void) v22bis_set_put_bit(v22bis_state_t *s, put_bit_func_t put_bit, void *user_data)
{
s->put_bit = put_bit;
- s->user_data = user_data;
+ s->put_bit_user_data = user_data;
}
/*- End of function --------------------------------------------------------*/
@@ -576,11 +580,40 @@
SPAN_DECLARE(int) v22bis_restart(v22bis_state_t *s, int bit_rate)
{
- if (bit_rate != 2400 && bit_rate != 1200)
+ switch (bit_rate)
+ {
+ case 2400:
+ case 1200:
+ break;
+ default:
return -1;
- if (v22bis_tx_restart(s, bit_rate))
+ }
+ s->bit_rate = bit_rate;
+ s->negotiated_bit_rate = 1200;
+ if (v22bis_tx_restart(s))
+ return -1;
+ return v22bis_rx_restart(s);
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) v22bis_request_retrain(v22bis_state_t *s, int bit_rate)
+{
+ switch (bit_rate)
+ {
+ case 2400:
+ case 1200:
+ break;
+ default:
return -1;
- return v22bis_rx_restart(s, bit_rate);
+ }
+ /* TODO: Implement retrain and bit rate change */
+ return -1;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) v22bis_current_bit_rate(v22bis_state_t *s)
+{
+ return s->negotiated_bit_rate;
}
/*- End of function --------------------------------------------------------*/
@@ -589,9 +622,18 @@
int guard,
int caller,
get_bit_func_t get_bit,
+ void *get_bit_user_data,
put_bit_func_t put_bit,
- void *user_data)
+ void *put_bit_user_data)
{
+ switch (bit_rate)
+ {
+ case 2400:
+ case 1200:
+ break;
+ default:
+ return NULL;
+ }
if (s == NULL)
{
if ((s = (v22bis_state_t *) malloc(sizeof(*s))) == NULL)
@@ -604,8 +646,9 @@
s->caller = caller;
s->get_bit = get_bit;
+ s->get_bit_user_data = get_bit_user_data;
s->put_bit = put_bit;
- s->user_data = user_data;
+ s->put_bit_user_data = put_bit_user_data;
if (s->caller)
{
Modified: freeswitch/trunk/libs/spandsp/src/v27ter_rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v27ter_rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v27ter_rx.c Tue Apr 28 09:42:18 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v27ter_rx.c,v 1.125 2009/04/20 16:36:36 steveu Exp $
+ * $Id: v27ter_rx.c,v 1.126 2009/04/21 13:59:07 steveu Exp $
*/
/*! \file */
@@ -1145,6 +1145,14 @@
SPAN_DECLARE(v27ter_rx_state_t *) v27ter_rx_init(v27ter_rx_state_t *s, int bit_rate, put_bit_func_t put_bit, void *user_data)
{
+ switch (bit_rate)
+ {
+ case 4800:
+ case 2400:
+ break;
+ default:
+ return NULL;
+ }
if (s == NULL)
{
if ((s = (v27ter_rx_state_t *) malloc(sizeof(*s))) == NULL)
Modified: freeswitch/trunk/libs/spandsp/src/v27ter_tx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v27ter_tx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v27ter_tx.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v27ter_tx.c,v 1.74 2009/04/12 04:20:01 steveu Exp $
+ * $Id: v27ter_tx.c,v 1.75 2009/04/21 13:59:07 steveu Exp $
*/
/*! \file */
@@ -412,6 +412,14 @@
SPAN_DECLARE(v27ter_tx_state_t *) v27ter_tx_init(v27ter_tx_state_t *s, int bit_rate, int tep, get_bit_func_t get_bit, void *user_data)
{
+ switch (bit_rate)
+ {
+ case 4800:
+ case 2400:
+ break;
+ default:
+ return NULL;
+ }
if (s == NULL)
{
if ((s = (v27ter_tx_state_t *) malloc(sizeof(*s))) == NULL)
Modified: freeswitch/trunk/libs/spandsp/src/v29rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v29rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v29rx.c Tue Apr 28 09:42:18 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v29rx.c,v 1.163 2009/04/20 16:36:36 steveu Exp $
+ * $Id: v29rx.c,v 1.164 2009/04/21 13:59:07 steveu Exp $
*/
/*! \file */
@@ -1156,14 +1156,22 @@
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(v29_rx_state_t *) v29_rx_init(v29_rx_state_t *s, int rate, put_bit_func_t put_bit, void *user_data)
+SPAN_DECLARE(v29_rx_state_t *) v29_rx_init(v29_rx_state_t *s, int bit_rate, put_bit_func_t put_bit, void *user_data)
{
+ switch (bit_rate)
+ {
+ case 9600:
+ case 7200:
+ case 4800:
+ break;
+ default:
+ return NULL;
+ }
if (s == NULL)
{
if ((s = (v29_rx_state_t *) malloc(sizeof(*s))) == NULL)
return NULL;
}
-
memset(s, 0, sizeof(*s));
span_log_init(&s->logging, SPAN_LOG_NONE, NULL);
span_log_set_protocol(&s->logging, "V.29 RX");
@@ -1176,7 +1184,7 @@
/* The thresholds should be on at -26dBm0 and off at -31dBm0 */
v29_rx_signal_cutoff(s, -28.5f);
- v29_rx_restart(s, rate, FALSE);
+ v29_rx_restart(s, bit_rate, FALSE);
return s;
}
/*- End of function --------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/v29tx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v29tx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v29tx.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v29tx.c,v 1.87 2009/04/12 04:20:01 steveu Exp $
+ * $Id: v29tx.c,v 1.88 2009/04/21 13:59:07 steveu Exp $
*/
/*! \file */
@@ -368,6 +368,15 @@
SPAN_DECLARE(v29_tx_state_t *) v29_tx_init(v29_tx_state_t *s, int bit_rate, int tep, get_bit_func_t get_bit, void *user_data)
{
+ switch (bit_rate)
+ {
+ case 9600:
+ case 7200:
+ case 4800:
+ break;
+ default:
+ return NULL;
+ }
if (s == NULL)
{
if ((s = (v29_tx_state_t *) malloc(sizeof(*s))) == NULL)
Modified: freeswitch/trunk/libs/spandsp/tests/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/Makefile.am (original)
+++ freeswitch/trunk/libs/spandsp/tests/Makefile.am Tue Apr 28 09:42:18 2009
@@ -16,7 +16,7 @@
## along with this program; if not, write to the Free Software
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
##
-## $Id: Makefile.am,v 1.112 2009/04/01 13:22:40 steveu Exp $
+## $Id: Makefile.am,v 1.114 2009/04/26 08:25:37 steveu Exp $
AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
AM_LDFLAGS = $(COMP_VENDOR_LDFLAGS)
@@ -25,7 +25,26 @@
noinst_DATA = sound_c1_8k.wav sound_c3_8k.wav
-EXTRA_DIST = regression_tests.sh v42bis_tests.sh fax_tests.sh tsb85_tests.sh
+EXTRA_DIST = regression_tests.sh \
+ v42bis_tests.sh \
+ fax_tests.sh \
+ tsb85_tests.sh \
+ msvc/adsi_tests.vcproj \
+ msvc/complex_tests.vcproj \
+ msvc/complex_vector_float_tests.vcproj \
+ msvc/complex_vector_int_tests.vcproj \
+ msvc/dtmf_rx_tests.vcproj \
+ msvc/dtmf_tx_tests.vcproj \
+ msvc/queue_tests.vcproj \
+ msvc/t38_core_tests.vcproj \
+ msvc/t38_non_ecm_buffer_tests.vcproj \
+ msvc/t38_terminal_tests.vcproj \
+ msvc/v22bis_tests.vcproj \
+ msvc/v29_tests.vcproj \
+ msvc/v8_tests.vcproj \
+ msvc/v80_tests.vcproj \
+ msvc/vector_float_tests.vcproj \
+ msvc/vector_int_tests.vcproj
MAINTAINERCLEANFILES = Makefile.in
Modified: freeswitch/trunk/libs/spandsp/tests/adsi_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/adsi_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/adsi_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: adsi_tests.c,v 1.55 2009/04/11 15:16:14 steveu Exp $
+ * $Id: adsi_tests.c,v 1.56 2009/04/26 07:24:35 steveu Exp $
*/
/*! \page adsi_tests_page ADSI tests
@@ -47,7 +47,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <strings.h>
#include <assert.h>
#include <audiofile.h>
Modified: freeswitch/trunk/libs/spandsp/tests/at_interpreter_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/at_interpreter_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/at_interpreter_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: at_interpreter_tests.c,v 1.20 2008/11/30 05:43:37 steveu Exp $
+ * $Id: at_interpreter_tests.c,v 1.22 2009/04/24 22:35:25 steveu Exp $
*/
/*! \file */
@@ -221,9 +221,14 @@
{"AT+EB=?\r", "\r\n+EB:\r\n\r\nOK\r\n"}, /* V.250 6.5.2 - Break handling in error control operation */
{"AT+EFCS=?\r", "\r\n+EFCS:(0-2)\r\n\r\nOK\r\n"}, /* V.250 6.5.4 - 32-bit frame check sequence */
{"AT+EFCS?\r", "\r\n+EFCS:0\r\n\r\nOK\r\n"},
- {"AT+EFRAM=?\r", "\r\n+EFRAM:(1-65535),(1-65535)\r\n\r\nOK\r\n"}, /* V.250 6.5.8 - Frame length */
+ {"AT+EFRAM=?\r", "\r\n+EFRAM:(1-65535),(1-65535)\r\n\r\nOK\r\n"},
+ /* V.250 6.5.8 - Frame length */
{"AT+ER=?\r", "\r\n+ER:(0,1)\r\n\r\nOK\r\n"}, /* V.250 6.5.5 - Error control reporting */
- {"AT+ES\r", "\r\nOK\r\n"}, /* V.250 6.5.1 - Error control selection */
+ {"AT+ES=?\r", "\r\n+ES:(0-7),(0-4),(0-9)\r\n\r\nOK\r\n"}, /* V.250 6.5.1 - Error control selection */
+ {"AT+ES?\r", "\r\n+ES:0,0,0\r\n\r\nOK\r\n"},
+ {"AT+ESA=?\r", "\r\n+ESA:(0-2),(0-1),(0-1),(0-1),(0-2),(0-1),(0-255),(0-255)\r\n\r\nOK\r\n"},
+ /* V.80 8.2 - Synchronous access mode configuration */
+ {"AT+ESA?\r", "\r\n+ESA:0,0,0,0,0,0,0,0\r\n\r\nOK\r\n"},
{"AT+ESR\r", "\r\nOK\r\n"}, /* V.250 6.5.3 - Selective repeat */
{"AT+ETBM=?\r", "\r\n+ETBM:(0-2),(0-2),(0-30)\r\n\r\nOK\r\n"}, /* T.31 8.5.1 - Adaptive reception control */
{"AT+ETBM?\r", "\r\n+ETBM:0,0\r\n\r\nOK\r\n"},
@@ -264,6 +269,11 @@
{"AT+GMR?\r", "\r\n" VERSION "\r\n\r\nOK\r\n"}, /* V.250 6.1.6 - Request revision identification */
{"AT+GOI\r", "\r\nOK\r\n"}, /* V.250 6.1.8 - Request global object identification */
{"AT+GSN?\r", "\r\n42\r\n\r\nOK\r\n"}, /* V.250 6.1.7 - Request product serial number identification */
+ {"AT+IBC=?\r", "\r\n+IBC:(0-2),(0,1),(0,1),(0,1),(0,1),(0,1),(0,1),(0,1),(0,1),(0,1),(0,1),(0.1),(0,1)\r\n\r\nOK\r\n"},
+ /* V.80 7.9 - Control of in-band control */
+ {"AT+IBC?\r", "\r\n+IBC:0,0,0,0,0,0,0,0,0,0,0,0,0\r\n\r\nOK\r\n"},
+ {"AT+IBM=?\r", "\r\n+IBM:(0-7),(0-255),(0-255)\r\n\r\nOK\r\n"}, /* V.80 7.10 - In-band MARK idle reporting control */
+ {"AT+IBM?\r", "\r\n+IBM:0,0,0\r\n\r\nOK\r\n"},
{"AT+ICF?\r", "\r\n+ICF:0,0\r\n\r\nOK\r\n"}, /* V.250 6.2.11 - DTE-DCE character framing */
{"AT+ICLOK?\r", "\r\n+ICLOK:0\r\n\r\nOK\r\n"}, /* V.250 6.2.14 - Select sync transmit clock source */
{"AT+IDSR?\r", "\r\n+IDSR:0\r\n\r\nOK\r\n"}, /* V.250 6.2.16 - Select data set ready option */
Modified: freeswitch/trunk/libs/spandsp/tests/complex_vector_float_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/complex_vector_float_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/complex_vector_float_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: complex_vector_float_tests.c,v 1.2 2008/10/09 13:25:19 steveu Exp $
+ * $Id: complex_vector_float_tests.c,v 1.3 2009/04/26 07:00:39 steveu Exp $
*/
#if defined(HAVE_CONFIG_H)
@@ -33,7 +33,6 @@
#include <stdio.h>
#include <fcntl.h>
#include <string.h>
-#include <audiofile.h>
#include "spandsp.h"
Modified: freeswitch/trunk/libs/spandsp/tests/complex_vector_int_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/complex_vector_int_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/complex_vector_int_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: complex_vector_int_tests.c,v 1.1 2008/09/18 12:05:35 steveu Exp $
+ * $Id: complex_vector_int_tests.c,v 1.2 2009/04/26 07:00:39 steveu Exp $
*/
#if defined(HAVE_CONFIG_H)
@@ -33,7 +33,6 @@
#include <stdio.h>
#include <fcntl.h>
#include <string.h>
-#include <audiofile.h>
#include "spandsp.h"
Modified: freeswitch/trunk/libs/spandsp/tests/fax_utils.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/fax_utils.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/fax_utils.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: fax_utils.c,v 1.1 2009/02/20 12:34:20 steveu Exp $
+ * $Id: fax_utils.c,v 1.2 2009/04/25 14:17:47 steveu Exp $
*/
#if defined(HAVE_CONFIG_H)
@@ -31,10 +31,8 @@
#include <stdlib.h>
#include <stdio.h>
-#include <unistd.h>
#include <string.h>
#include <assert.h>
-#include <audiofile.h>
//#if defined(WITH_SPANDSP_INTERNALS)
#define SPANDSP_EXPOSE_INTERNAL_STRUCTURES
Modified: freeswitch/trunk/libs/spandsp/tests/g711_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/g711_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/g711_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: g711_tests.c,v 1.15 2008/11/30 10:17:31 steveu Exp $
+ * $Id: g711_tests.c,v 1.16 2009/04/22 12:57:40 steveu Exp $
*/
/*! \page g711_tests_page A-law and u-law conversion tests
@@ -38,6 +38,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
+#include <unistd.h>
#include <string.h>
#include <audiofile.h>
@@ -48,7 +49,11 @@
#include "spandsp.h"
#include "spandsp-sim.h"
-#define OUT_FILE_NAME "g711.wav"
+#define BLOCK_LEN 160
+
+#define IN_FILE_NAME "../test-data/local/short_nb_voice.wav"
+#define ENCODED_FILE_NAME "g711.g711"
+#define OUT_FILE_NAME "post_g711.wav"
int16_t amp[65536];
uint8_t ulaw_data[65536];
@@ -57,7 +62,7 @@
const uint8_t alaw_1khz_sine[] = {0x34, 0x21, 0x21, 0x34, 0xB4, 0xA1, 0xA1, 0xB4};
const uint8_t ulaw_1khz_sine[] = {0x1E, 0x0B, 0x0B, 0x1E, 0x9E, 0x8B, 0x8B, 0x9E};
-int main(int argc, char *argv[])
+static void compliance_tests(int log_audio)
{
AFfilehandle outhandle;
power_meter_t power_meter;
@@ -73,14 +78,18 @@
float worst_ulaw;
float tmp;
int len;
- g711_state_t *encode;
+ g711_state_t *enc_state;
g711_state_t *transcode;
- g711_state_t *decode;
-
- if ((outhandle = afOpenFile_telephony_write(OUT_FILE_NAME, 1)) == AF_NULL_FILEHANDLE)
+ g711_state_t *dec_state;
+
+ outhandle = AF_NULL_FILEHANDLE;
+ if (log_audio)
{
- fprintf(stderr, " Cannot create wave file '%s'\n", OUT_FILE_NAME);
- exit(2);
+ if ((outhandle = afOpenFile_telephony_write(OUT_FILE_NAME, 1)) == AF_NULL_FILEHANDLE)
+ {
+ fprintf(stderr, " Cannot create wave file '%s'\n", OUT_FILE_NAME);
+ exit(2);
+ }
}
printf("Conversion accuracy tests.\n");
@@ -116,14 +125,17 @@
}
amp[i] = post;
}
- outframes = afWriteFrames(outhandle,
- AF_DEFAULT_TRACK,
- amp,
- 65536);
- if (outframes != 65536)
+ if (log_audio)
{
- fprintf(stderr, " Error writing wave file\n");
- exit(2);
+ outframes = afWriteFrames(outhandle,
+ AF_DEFAULT_TRACK,
+ amp,
+ 65536);
+ if (outframes != 65536)
+ {
+ fprintf(stderr, " Error writing wave file\n");
+ exit(2);
+ }
}
for (i = 0; i < 65536; i++)
{
@@ -151,14 +163,17 @@
}
amp[i] = post;
}
- outframes = afWriteFrames(outhandle,
- AF_DEFAULT_TRACK,
- amp,
- 65536);
- if (outframes != 65536)
+ if (log_audio)
{
- fprintf(stderr, " Error writing wave file\n");
- exit(2);
+ outframes = afWriteFrames(outhandle,
+ AF_DEFAULT_TRACK,
+ amp,
+ 65536);
+ if (outframes != 65536)
+ {
+ fprintf(stderr, " Error writing wave file\n");
+ exit(2);
+ }
}
}
printf("Worst A-law error (ignoring small values) %f%%\n", worst_alaw*100.0);
@@ -207,14 +222,17 @@
power_meter_update(&power_meter, amp[i]);
}
printf("Reference u-law 1kHz tone is %fdBm0\n", power_meter_current_dbm0(&power_meter));
- outframes = afWriteFrames(outhandle,
- AF_DEFAULT_TRACK,
- amp,
- 8000);
- if (outframes != 8000)
+ if (log_audio)
{
- fprintf(stderr, " Error writing wave file\n");
- exit(2);
+ outframes = afWriteFrames(outhandle,
+ AF_DEFAULT_TRACK,
+ amp,
+ 8000);
+ if (outframes != 8000)
+ {
+ fprintf(stderr, " Error writing wave file\n");
+ exit(2);
+ }
}
if (0.1f < fabs(power_meter_current_dbm0(&power_meter)))
{
@@ -228,14 +246,17 @@
power_meter_update(&power_meter, amp[i]);
}
printf("Reference A-law 1kHz tone is %fdBm0\n", power_meter_current_dbm0(&power_meter));
- outframes = afWriteFrames(outhandle,
- AF_DEFAULT_TRACK,
- amp,
- 8000);
- if (outframes != 8000)
+ if (log_audio)
{
- fprintf(stderr, " Error writing wave file\n");
- exit(2);
+ outframes = afWriteFrames(outhandle,
+ AF_DEFAULT_TRACK,
+ amp,
+ 8000);
+ if (outframes != 8000)
+ {
+ fprintf(stderr, " Error writing wave file\n");
+ exit(2);
+ }
}
if (0.1f < fabs(power_meter_current_dbm0(&power_meter)))
{
@@ -272,16 +293,16 @@
}
}
- encode = g711_init(NULL, G711_ALAW);
+ enc_state = g711_init(NULL, G711_ALAW);
transcode = g711_init(NULL, G711_ALAW);
- decode = g711_init(NULL, G711_ULAW);
+ dec_state = g711_init(NULL, G711_ULAW);
len = 65536;
for (i = 0; i < len; i++)
amp[i] = i - 32768;
- len = g711_encode(encode, alaw_data, amp, len);
+ len = g711_encode(enc_state, alaw_data, amp, len);
len = g711_transcode(transcode, ulaw_data, alaw_data, len);
- len = g711_decode(decode, amp, ulaw_data, len);
+ len = g711_decode(dec_state, amp, ulaw_data, len);
if (len != 65536)
{
printf("Block coding gave the wrong length - %d instead of %d\n", len, 65536);
@@ -311,17 +332,204 @@
}
}
}
- g711_release(encode);
+ g711_release(enc_state);
g711_release(transcode);
- g711_release(decode);
+ g711_release(dec_state);
- if (afCloseFile(outhandle))
+ if (log_audio)
{
- fprintf(stderr, " Cannot close wave file '%s'\n", OUT_FILE_NAME);
- exit(2);
+ if (afCloseFile(outhandle))
+ {
+ fprintf(stderr, " Cannot close wave file '%s'\n", OUT_FILE_NAME);
+ exit(2);
+ }
}
printf("Tests passed.\n");
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+ AFfilehandle inhandle;
+ AFfilehandle outhandle;
+ int outframes;
+ int opt;
+ int samples;
+ int len2;
+ int len3;
+ int basic_tests;
+ int law;
+ int encode;
+ int decode;
+ int file;
+ const char *in_file;
+ const char *out_file;
+ g711_state_t *enc_state;
+ g711_state_t *dec_state;
+ int16_t indata[BLOCK_LEN];
+ int16_t outdata[BLOCK_LEN];
+ uint8_t g711data[BLOCK_LEN];
+
+ basic_tests = TRUE;
+ law = G711_ALAW;
+ encode = FALSE;
+ decode = FALSE;
+ in_file = NULL;
+ out_file = NULL;
+ while ((opt = getopt(argc, argv, "ad:e:l:u")) != -1)
+ {
+ switch (opt)
+ {
+ case 'a':
+ law = G711_ALAW;
+ basic_tests = FALSE;
+ break;
+ case 'd':
+ in_file = optarg;
+ basic_tests = FALSE;
+ decode = TRUE;
+ break;
+ case 'e':
+ in_file = optarg;
+ basic_tests = FALSE;
+ encode = TRUE;
+ break;
+ case 'l':
+ out_file = optarg;
+ break;
+ case 'u':
+ law = G711_ULAW;
+ basic_tests = FALSE;
+ break;
+ default:
+ //usage();
+ exit(2);
+ }
+ }
+
+ if (basic_tests)
+ {
+ compliance_tests(TRUE);
+ }
+ else
+ {
+ if (!decode && !encode)
+ {
+ decode =
+ encode = TRUE;
+ }
+ if (in_file == NULL)
+ {
+ in_file = (encode) ? IN_FILE_NAME : ENCODED_FILE_NAME;
+ }
+ if (out_file == NULL)
+ {
+ out_file = (decode) ? OUT_FILE_NAME : ENCODED_FILE_NAME;
+ }
+ inhandle = AF_NULL_FILEHANDLE;
+ outhandle = AF_NULL_FILEHANDLE;
+ file = -1;
+ enc_state = NULL;
+ dec_state = NULL;
+ if (encode)
+ {
+ if ((inhandle = afOpenFile_telephony_read(in_file, 1)) == AF_NULL_FILEHANDLE)
+ {
+ fprintf(stderr, " Cannot open wave file '%s'\n", in_file);
+ exit(2);
+ }
+ enc_state = g711_init(NULL, law);
+ }
+ else
+ {
+ if ((file = open(in_file, O_RDONLY)) < 0)
+ {
+ fprintf(stderr, " Failed to open '%s'\n", in_file);
+ exit(2);
+ }
+ }
+ if (decode)
+ {
+ if ((outhandle = afOpenFile_telephony_write(out_file, 1)) == AF_NULL_FILEHANDLE)
+ {
+ fprintf(stderr, " Cannot create wave file '%s'\n", out_file);
+ exit(2);
+ }
+ dec_state = g711_init(NULL, law);
+ }
+ else
+ {
+ if ((file = open(out_file, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0)
+ {
+ fprintf(stderr, " Failed to open '%s'\n", out_file);
+ exit(2);
+ }
+ }
+ for (;;)
+ {
+ if (encode)
+ {
+ samples = afReadFrames(inhandle,
+ AF_DEFAULT_TRACK,
+ indata,
+ BLOCK_LEN);
+ if (samples <= 0)
+ break;
+ len2 = g711_encode(enc_state, g711data, indata, samples);
+ }
+ else
+ {
+ len2 = read(file, g711data, BLOCK_LEN);
+ if (len2 <= 0)
+ break;
+ }
+ if (decode)
+ {
+ len3 = g711_decode(dec_state, outdata, g711data, len2);
+ outframes = afWriteFrames(outhandle,
+ AF_DEFAULT_TRACK,
+ outdata,
+ len3);
+ if (outframes != len3)
+ {
+ fprintf(stderr, " Error writing wave file\n");
+ exit(2);
+ }
+ }
+ else
+ {
+ len3 = write(file, g711data, len2);
+ if (len3 <= 0)
+ break;
+ }
+ }
+ if (encode)
+ {
+ if (afCloseFile(inhandle))
+ {
+ fprintf(stderr, " Cannot close wave file '%s'\n", IN_FILE_NAME);
+ exit(2);
+ }
+ }
+ else
+ {
+ close(file);
+ }
+ if (decode)
+ {
+ if (afCloseFile(outhandle))
+ {
+ fprintf(stderr, " Cannot close wave file '%s'\n", OUT_FILE_NAME);
+ exit(2);
+ }
+ }
+ else
+ {
+ close(file);
+ }
+ printf("'%s' translated to '%s' using %s.\n", in_file, out_file, (law == G711_ALAW) ? "A-law" : "u-law");
+ }
return 0;
}
/*- End of function --------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/tests/g722_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/g722_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/g722_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: g722_tests.c,v 1.29 2009/01/12 17:20:59 steveu Exp $
+ * $Id: g722_tests.c,v 1.30 2009/04/22 12:57:40 steveu Exp $
*/
/*! \file */
@@ -87,6 +87,7 @@
#define EIGHTK_IN_FILE_NAME "../test-data/local/short_nb_voice.wav"
#define IN_FILE_NAME "../test-data/local/short_wb_voice.wav"
+#define ENCODED_FILE_NAME "g722.g722"
#define OUT_FILE_NAME "post_g722.wav"
#if 0
@@ -217,41 +218,178 @@
}
/*- End of function --------------------------------------------------------*/
-int main(int argc, char *argv[])
+static void itu_compliance_tests(void)
{
g722_encode_state_t enc_state;
g722_decode_state_t dec_state;
- int len;
+ int i;
+ int j;
+ int k;
int len_comp;
int len_comp_upper;
int len_data;
+ int len;
+ int len2;
+ int mode;
+ int file;
+
+#if 1
+ /* ITU G.722 encode tests, using configuration 1. The QMF is bypassed */
+ for (file = 0; encode_test_files[file]; file += 2)
+ {
+ printf("Testing %s -> %s\n", encode_test_files[file], encode_test_files[file + 1]);
+
+ /* Get the input data */
+ len_data = get_test_vector(encode_test_files[file], (uint16_t *) itu_data, MAX_TEST_VECTOR_LEN);
+
+ /* Get the reference output data */
+ len_comp = get_test_vector(encode_test_files[file + 1], itu_ref, MAX_TEST_VECTOR_LEN);
+
+ /* Process the input data */
+ /* Skip the reset stuff at each end of the data */
+ for (i = 0; i < len_data; i++)
+ {
+ if ((itu_data[i] & 1) == 0)
+ break;
+ }
+ for (j = i; j < len_data; j++)
+ {
+ if ((itu_data[j] & 1))
+ break;
+ }
+ len = j - i;
+ g722_encode_init(&enc_state, 64000, 0);
+ enc_state.itu_test_mode = TRUE;
+ len2 = g722_encode(&enc_state, compressed, itu_data + i, len);
+
+ /* Check the result against the ITU's reference output data */
+ j = 0;
+ for (k = 0; k < len2; k++)
+ {
+ if ((compressed[k] & 0xFF) != ((itu_ref[k + i] >> 8) & 0xFF))
+ {
+ printf(">>> %6d %4x %4x\n", k, compressed[k] & 0xFF, itu_ref[k + i] & 0xFFFF);
+ j++;
+ }
+ }
+ printf("%d bad samples, out of %d/%d samples\n", j, len, len_data);
+ if (j)
+ {
+ printf("Test failed\n");
+ exit(2);
+ }
+ printf("Test passed\n");
+ }
+#endif
+#if 1
+ /* ITU G.722 decode tests, using configuration 2. The QMF is bypassed */
+ /* Run each of the tests for each of the modes - 48kbps, 56kbps and 64kbps. */
+ for (mode = 1; mode <= 3; mode++)
+ {
+ for (file = 0; decode_test_files[file]; file += 5)
+ {
+ printf("Testing mode %d, %s -> %s + %s\n",
+ mode,
+ decode_test_files[file],
+ decode_test_files[file + mode],
+ decode_test_files[file + 4]);
+
+ /* Get the input data */
+ len_data = get_test_vector(decode_test_files[file], (uint16_t *) itu_data, MAX_TEST_VECTOR_LEN);
+
+ /* Get the lower reference output data */
+ len_comp = get_test_vector(decode_test_files[file + mode], itu_ref, MAX_TEST_VECTOR_LEN);
+
+ /* Get the upper reference output data */
+ len_comp_upper = get_test_vector(decode_test_files[file + 4], itu_ref_upper, MAX_TEST_VECTOR_LEN);
+
+ /* Process the input data */
+ /* Skip the reset stuff at each end of the data */
+ for (i = 0; i < len_data; i++)
+ {
+ if ((itu_data[i] & 1) == 0)
+ break;
+ }
+ for (j = i; j < len_data; j++)
+ {
+ if ((itu_data[j] & 1))
+ break;
+ }
+ len = j - i;
+ for (k = 0; k < len; k++)
+ compressed[k] = itu_data[k + i] >> ((mode == 3) ? 10 : (mode == 2) ? 9 : 8);
+
+ g722_decode_init(&dec_state, (mode == 3) ? 48000 : (mode == 2) ? 56000 : 64000, 0);
+ dec_state.itu_test_mode = TRUE;
+ len2 = g722_decode(&dec_state, decompressed, compressed, len);
+
+ /* Check the result against the ITU's reference output data */
+ j = 0;
+ for (k = 0; k < len2; k += 2)
+ {
+ if ((decompressed[k] & 0xFFFF) != (itu_ref[(k >> 1) + i] & 0xFFFF)
+ ||
+ (decompressed[k + 1] & 0xFFFF) != (itu_ref_upper[(k >> 1) + i] & 0xFFFF))
+ {
+ printf(">>> %6d %4x %4x %4x %4x\n", k >> 1, decompressed[k] & 0xFFFF, decompressed[k + 1] & 0xFFFF, itu_ref[(k >> 1) + i] & 0xFFFF, itu_ref_upper[(k >> 1) + i] & 0xFFFF);
+ j++;
+ }
+ }
+ printf("%d bad samples, out of %d/%d samples\n", j, len, len_data);
+ if (j)
+ {
+ printf("Test failed\n");
+ exit(2);
+ }
+ printf("Test passed\n");
+ }
+ }
+#endif
+ printf("Tests passed.\n");
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+ g722_encode_state_t enc_state;
+ g722_decode_state_t dec_state;
int len2;
int len3;
int i;
- int j;
- int k;
int file;
AFfilehandle inhandle;
AFfilehandle outhandle;
AFfilesetup filesetup;
int outframes;
int samples;
- int mode;
int opt;
int itutests;
int bit_rate;
int eight_k_in;
int eight_k_out;
+ int encode;
+ int decode;
+ int tone_test;
float x;
+ const char *in_file;
+ const char *out_file;
int16_t indata[BLOCK_LEN];
int16_t outdata[BLOCK_LEN];
uint8_t adpcmdata[BLOCK_LEN];
+ float tone_level;
+ uint32_t tone_phase;
+ int32_t tone_phase_rate;
bit_rate = 64000;
eight_k_in = FALSE;
eight_k_out = FALSE;
itutests = TRUE;
- while ((opt = getopt(argc, argv, "b:i:o:")) != -1)
+ encode = FALSE;
+ decode = FALSE;
+ tone_test = FALSE;
+ in_file = NULL;
+ out_file = NULL;
+ while ((opt = getopt(argc, argv, "b:d:e:i:l:o:t")) != -1)
{
switch (opt)
{
@@ -264,6 +402,16 @@
}
itutests = FALSE;
break;
+ case 'd':
+ in_file = optarg;
+ decode = TRUE;
+ itutests = FALSE;
+ break;
+ case 'e':
+ in_file = optarg;
+ encode = TRUE;
+ itutests = FALSE;
+ break;
case 'i':
i = atoi(optarg);
if (i != 8000 && i != 16000)
@@ -271,16 +419,25 @@
fprintf(stderr, "Invalid incoming sample rate. Only 8000 and 16000 are valid.\n");
exit(2);
}
- eight_k_in = (i == 8000);
+ eight_k_in = (i == 8000);
+ if (eight_k_in)
+ in_file = EIGHTK_IN_FILE_NAME;
+ break;
+ case 'l':
+ out_file = optarg;
break;
case 'o':
i = atoi(optarg);
if (i != 8000 && i != 16000)
{
- fprintf(stderr, "Invalid incoming sample rate. Only 8000 and 16000 are valid.\n");
+ fprintf(stderr, "Invalid outgoing sample rate. Only 8000 and 16000 are valid.\n");
exit(2);
}
- eight_k_out = (i == 8000);
+ eight_k_out = (i == 8000);
+ break;
+ case 't':
+ tone_test = TRUE;
+ itutests = FALSE;
break;
default:
//usage();
@@ -290,227 +447,201 @@
if (itutests)
{
-#if 1
- /* ITU G.722 encode tests, using configuration 1. The QMF is bypassed */
- for (file = 0; encode_test_files[file]; file += 2)
+ itu_compliance_tests();
+ }
+ else
+ {
+ tone_level = dds_scaling_dbm0f(2.5f);
+ tone_phase = 0;
+ tone_phase_rate = dds_phase_ratef(1500.0f/2.0f);
+ if (!decode && !encode)
{
- printf("Testing %s -> %s\n", encode_test_files[file], encode_test_files[file + 1]);
-
- /* Get the input data */
- len_data = get_test_vector(encode_test_files[file], (uint16_t *) itu_data, MAX_TEST_VECTOR_LEN);
-
- /* Get the reference output data */
- len_comp = get_test_vector(encode_test_files[file + 1], itu_ref, MAX_TEST_VECTOR_LEN);
-
- /* Process the input data */
- /* Skip the reset stuff at each end of the data */
- for (i = 0; i < len_data; i++)
+ decode =
+ encode = TRUE;
+ }
+ if (in_file == NULL)
+ {
+ if (encode)
{
- if ((itu_data[i] & 1) == 0)
- break;
+ if (eight_k_in)
+ in_file = EIGHTK_IN_FILE_NAME;
+ else
+ in_file = IN_FILE_NAME;
}
- for (j = i; j < len_data; j++)
+ else
{
- if ((itu_data[j] & 1))
- break;
+ in_file = ENCODED_FILE_NAME;
}
- len = j - i;
- g722_encode_init(&enc_state, 64000, 0);
- enc_state.itu_test_mode = TRUE;
- len2 = g722_encode(&enc_state, compressed, itu_data + i, len);
-
- /* Check the result against the ITU's reference output data */
- j = 0;
- for (k = 0; k < len2; k++)
+ }
+ if (out_file == NULL)
+ {
+ out_file = (decode) ? OUT_FILE_NAME : ENCODED_FILE_NAME;
+ }
+ inhandle = AF_NULL_FILEHANDLE;
+ outhandle = AF_NULL_FILEHANDLE;
+ file = -1;
+ if (encode)
+ {
+ if (eight_k_in)
{
- if ((compressed[k] & 0xFF) != ((itu_ref[k + i] >> 8) & 0xFF))
+ if ((inhandle = afOpenFile(in_file, "r", NULL)) == AF_NULL_FILEHANDLE)
{
- printf(">>> %6d %4x %4x\n", k, compressed[k] & 0xFF, itu_ref[k + i] & 0xFFFF);
- j++;
+ fprintf(stderr, " Cannot open wave file '%s'\n", in_file);
+ exit(2);
+ }
+ if ((x = afGetFrameSize(inhandle, AF_DEFAULT_TRACK, 1)) != 2.0)
+ {
+ fprintf(stderr, " Unexpected frame size in wave file '%s'\n", in_file);
+ exit(2);
+ }
+ if ((x = afGetRate(inhandle, AF_DEFAULT_TRACK)) != (float) SAMPLE_RATE)
+ {
+ fprintf(stderr, " Unexpected sample rate %f in wave file '%s'\n", x, in_file);
+ exit(2);
+ }
+ if ((x = afGetChannels(inhandle, AF_DEFAULT_TRACK)) != 1.0)
+ {
+ fprintf(stderr, " Unexpected number of channels in wave file '%s'\n", in_file);
+ exit(2);
}
}
- printf("%d bad samples, out of %d/%d samples\n", j, len, len_data);
- if (j)
+ else
{
- printf("Test failed\n");
- exit(2);
- }
- printf("Test passed\n");
- }
-#endif
-#if 1
- /* ITU G.722 decode tests, using configuration 2. The QMF is bypassed */
- /* Run each of the tests for each of the modes - 48kbps, 56kbps and 64kbps. */
- for (mode = 1; mode <= 3; mode++)
- {
- for (file = 0; decode_test_files[file]; file += 5)
- {
- printf("Testing mode %d, %s -> %s + %s\n",
- mode,
- decode_test_files[file],
- decode_test_files[file + mode],
- decode_test_files[file + 4]);
-
- /* Get the input data */
- len_data = get_test_vector(decode_test_files[file], (uint16_t *) itu_data, MAX_TEST_VECTOR_LEN);
-
- /* Get the lower reference output data */
- len_comp = get_test_vector(decode_test_files[file + mode], itu_ref, MAX_TEST_VECTOR_LEN);
-
- /* Get the upper reference output data */
- len_comp_upper = get_test_vector(decode_test_files[file + 4], itu_ref_upper, MAX_TEST_VECTOR_LEN);
-
- /* Process the input data */
- /* Skip the reset stuff at each end of the data */
- for (i = 0; i < len_data; i++)
+ if ((inhandle = afOpenFile(in_file, "r", NULL)) == AF_NULL_FILEHANDLE)
{
- if ((itu_data[i] & 1) == 0)
- break;
+ fprintf(stderr, " Cannot open wave file '%s'\n", in_file);
+ exit(2);
}
- for (j = i; j < len_data; j++)
+ if ((x = afGetFrameSize(inhandle, AF_DEFAULT_TRACK, 1)) != 2.0)
{
- if ((itu_data[j] & 1))
- break;
- }
- len = j - i;
- for (k = 0; k < len; k++)
- compressed[k] = itu_data[k + i] >> ((mode == 3) ? 10 : (mode == 2) ? 9 : 8);
-
- g722_decode_init(&dec_state, (mode == 3) ? 48000 : (mode == 2) ? 56000 : 64000, 0);
- dec_state.itu_test_mode = TRUE;
- len2 = g722_decode(&dec_state, decompressed, compressed, len);
-
- /* Check the result against the ITU's reference output data */
- j = 0;
- for (k = 0; k < len2; k += 2)
- {
- if ((decompressed[k] & 0xFFFF) != (itu_ref[(k >> 1) + i] & 0xFFFF)
- ||
- (decompressed[k + 1] & 0xFFFF) != (itu_ref_upper[(k >> 1) + i] & 0xFFFF))
- {
- printf(">>> %6d %4x %4x %4x %4x\n", k >> 1, decompressed[k] & 0xFFFF, decompressed[k + 1] & 0xFFFF, itu_ref[(k >> 1) + i] & 0xFFFF, itu_ref_upper[(k >> 1) + i] & 0xFFFF);
- j++;
- }
+ fprintf(stderr, " Unexpected frame size in wave file '%s'\n", in_file);
+ exit(2);
+ }
+ if ((x = afGetRate(inhandle, AF_DEFAULT_TRACK)) != (float) G722_SAMPLE_RATE)
+ {
+ fprintf(stderr, " Unexpected sample rate %f in wave file '%s'\n", x, in_file);
+ exit(2);
}
- printf("%d bad samples, out of %d/%d samples\n", j, len, len_data);
- if (j)
+ if ((x = afGetChannels(inhandle, AF_DEFAULT_TRACK)) != 1.0)
{
- printf("Test failed\n");
+ fprintf(stderr, " Unexpected number of channels in wave file '%s'\n", in_file);
exit(2);
}
- printf("Test passed\n");
}
+ if (eight_k_in)
+ g722_encode_init(&enc_state, bit_rate, G722_PACKED | G722_SAMPLE_RATE_8000);
+ else
+ g722_encode_init(&enc_state, bit_rate, G722_PACKED);
}
-#endif
- printf("Tests passed.\n");
- }
- else
- {
- if (eight_k_in)
+ else
{
- if ((inhandle = afOpenFile(EIGHTK_IN_FILE_NAME, "r", NULL)) == AF_NULL_FILEHANDLE)
+ if ((file = open(in_file, O_RDONLY)) < 0)
{
- fprintf(stderr, " Cannot open wave file '%s'\n", EIGHTK_IN_FILE_NAME);
+ fprintf(stderr, " Failed to open '%s'\n", in_file);
exit(2);
}
- if ((x = afGetFrameSize(inhandle, AF_DEFAULT_TRACK, 1)) != 2.0)
+ }
+ if (decode)
+ {
+ if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
{
- fprintf(stderr, " Unexpected frame size in wave file '%s'\n", EIGHTK_IN_FILE_NAME);
+ fprintf(stderr, " Failed to create file setup\n");
exit(2);
}
- if ((x = afGetRate(inhandle, AF_DEFAULT_TRACK)) != (float) SAMPLE_RATE)
+ afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+ if (eight_k_out)
+ afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+ else
+ afInitRate(filesetup, AF_DEFAULT_TRACK, (float) G722_SAMPLE_RATE);
+ afInitFileFormat(filesetup, AF_FILE_WAVE);
+ afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
+ if ((outhandle = afOpenFile(out_file, "w", filesetup)) == AF_NULL_FILEHANDLE)
{
- fprintf(stderr, " Unexpected sample rate %f in wave file '%s'\n", x, EIGHTK_IN_FILE_NAME);
+ fprintf(stderr, " Cannot create wave file '%s'\n", out_file);
exit(2);
}
- if ((x = afGetChannels(inhandle, AF_DEFAULT_TRACK)) != 1.0)
+ afFreeFileSetup(filesetup);
+ if (eight_k_out)
+ g722_decode_init(&dec_state, bit_rate, G722_PACKED | G722_SAMPLE_RATE_8000);
+ else
+ g722_decode_init(&dec_state, bit_rate, G722_PACKED);
+ }
+ else
+ {
+ if ((file = open(out_file, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0)
{
- fprintf(stderr, " Unexpected number of channels in wave file '%s'\n", EIGHTK_IN_FILE_NAME);
+ fprintf(stderr, " Failed to open '%s'\n", out_file);
exit(2);
}
}
- else
+ for (;;)
{
- if ((inhandle = afOpenFile(IN_FILE_NAME, "r", NULL)) == AF_NULL_FILEHANDLE)
+ if (encode)
{
- fprintf(stderr, " Cannot open wave file '%s'\n", IN_FILE_NAME);
- exit(2);
+ samples = afReadFrames(inhandle,
+ AF_DEFAULT_TRACK,
+ indata,
+ BLOCK_LEN);
+ if (samples <= 0)
+ break;
+ if (tone_test)
+ {
+ for (i = 0; i < samples; i++)
+ indata[i] = dds_modf(&tone_phase, tone_phase_rate, tone_level, 0);
+ }
+ len2 = g722_encode(&enc_state, adpcmdata, indata, samples);
}
- if ((x = afGetFrameSize(inhandle, AF_DEFAULT_TRACK, 1)) != 2.0)
+ else
{
- fprintf(stderr, " Unexpected frame size in wave file '%s'\n", IN_FILE_NAME);
- exit(2);
+ len2 = read(file, adpcmdata, BLOCK_LEN);
+ if (len2 <= 0)
+ break;
}
- if ((x = afGetRate(inhandle, AF_DEFAULT_TRACK)) != (float) G722_SAMPLE_RATE)
+ if (decode)
{
- fprintf(stderr, " Unexpected sample rate %f in wave file '%s'\n", x, IN_FILE_NAME);
- exit(2);
+ len3 = g722_decode(&dec_state, outdata, adpcmdata, len2);
+ outframes = afWriteFrames(outhandle,
+ AF_DEFAULT_TRACK,
+ outdata,
+ len3);
+ if (outframes != len3)
+ {
+ fprintf(stderr, " Error writing wave file\n");
+ exit(2);
+ }
}
- if ((x = afGetChannels(inhandle, AF_DEFAULT_TRACK)) != 1.0)
+ else
{
- fprintf(stderr, " Unexpected number of channels in wave file '%s'\n", IN_FILE_NAME);
- exit(2);
+ len3 = write(file, adpcmdata, len2);
+ if (len3 <= 0)
+ break;
}
}
-
- if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+ if (encode)
{
- fprintf(stderr, " Failed to create file setup\n");
- exit(2);
+ if (afCloseFile(inhandle))
+ {
+ fprintf(stderr, " Cannot close wave file '%s'\n", IN_FILE_NAME);
+ exit(2);
+ }
}
- afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
- if (eight_k_out)
- afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
else
- afInitRate(filesetup, AF_DEFAULT_TRACK, (float) G722_SAMPLE_RATE);
- afInitFileFormat(filesetup, AF_FILE_WAVE);
- afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
- if ((outhandle = afOpenFile(OUT_FILE_NAME, "w", filesetup)) == AF_NULL_FILEHANDLE)
{
- fprintf(stderr, " Cannot create wave file '%s'\n", OUT_FILE_NAME);
- exit(2);
+ close(file);
}
- if (eight_k_in)
- g722_encode_init(&enc_state, bit_rate, G722_PACKED | G722_SAMPLE_RATE_8000);
- else
- g722_encode_init(&enc_state, bit_rate, G722_PACKED);
- if (eight_k_out)
- g722_decode_init(&dec_state, bit_rate, G722_PACKED | G722_SAMPLE_RATE_8000);
- else
- g722_decode_init(&dec_state, bit_rate, G722_PACKED);
- for (;;)
+ if (decode)
{
- samples = afReadFrames(inhandle,
- AF_DEFAULT_TRACK,
- indata,
- BLOCK_LEN);
- if (samples <= 0)
- break;
- len2 = g722_encode(&enc_state, adpcmdata, indata, samples);
- len3 = g722_decode(&dec_state, outdata, adpcmdata, len2);
- outframes = afWriteFrames(outhandle,
- AF_DEFAULT_TRACK,
- outdata,
- len3);
- if (outframes != len3)
+ if (afCloseFile(outhandle))
{
- fprintf(stderr, " Error writing wave file\n");
+ fprintf(stderr, " Cannot close wave file '%s'\n", OUT_FILE_NAME);
exit(2);
}
}
- if (afCloseFile(inhandle))
- {
- fprintf(stderr, " Cannot close wave file '%s'\n", IN_FILE_NAME);
- exit(2);
- }
- if (afCloseFile(outhandle))
+ else
{
- fprintf(stderr, " Cannot close wave file '%s'\n", OUT_FILE_NAME);
- exit(2);
+ close(file);
}
- afFreeFileSetup(filesetup);
-
- printf("'%s' transcoded to '%s' at %dbps.\n", IN_FILE_NAME, OUT_FILE_NAME, bit_rate);
+ printf("'%s' translated to '%s' at %dbps.\n", in_file, out_file, bit_rate);
}
return 0;
}
Modified: freeswitch/trunk/libs/spandsp/tests/g726_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/g726_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/g726_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: g726_tests.c,v 1.31 2009/01/12 17:20:59 steveu Exp $
+ * $Id: g726_tests.c,v 1.32 2009/04/22 12:57:40 steveu Exp $
*/
/*! \file */
@@ -1077,7 +1077,7 @@
}
/*- End of function --------------------------------------------------------*/
-int main(int argc, char *argv[])
+static void itu_compliance_tests(void)
{
g726_state_t enc_state;
g726_state_t dec_state;
@@ -1085,158 +1085,87 @@
int len3;
int i;
int test;
- int opt;
int bits_per_code;
- int itutests;
- int bit_rate;
int bad_samples;
- AFfilehandle inhandle;
- AFfilehandle outhandle;
- int16_t amp[1024];
- int frames;
- int outframes;
int conditioning_samples;
int samples;
int conditioning_adpcm;
int adpcm;
- int packing;
- i = 1;
- bit_rate = 32000;
- itutests = TRUE;
- packing = G726_PACKING_NONE;
- while ((opt = getopt(argc, argv, "b:lr")) != -1)
+ len2 = 0;
+ conditioning_samples = 0;
+ for (test = 0; itu_test_sets[test].rate; test++)
{
- switch (opt)
+ printf("Test %2d: '%s' + '%s'\n"
+ " -> '%s' + '%s'\n"
+ " -> '%s' [%d, %d, %d]\n",
+ test,
+ itu_test_sets[test].conditioning_pcm_file,
+ itu_test_sets[test].pcm_file,
+ itu_test_sets[test].conditioning_adpcm_file,
+ itu_test_sets[test].adpcm_file,
+ itu_test_sets[test].output_file,
+ itu_test_sets[test].rate,
+ itu_test_sets[test].compression_law,
+ itu_test_sets[test].decompression_law);
+ switch (itu_test_sets[test].rate)
{
- case 'b':
- bit_rate = atoi(optarg);
- if (bit_rate != 16000 && bit_rate != 24000 && bit_rate != 32000 && bit_rate != 40000)
- {
- fprintf(stderr, "Invalid bit rate selected. Only 16000, 24000, 32000 and 40000 are valid.\n");
- exit(2);
- }
- itutests = FALSE;
+ case 16000:
+ bits_per_code = 2;
break;
- case 'l':
- packing = G726_PACKING_LEFT;
- break;
- case 'r':
- packing = G726_PACKING_RIGHT;
+ case 24000:
+ bits_per_code = 3;
break;
+ case 32000:
default:
- //usage();
- exit(2);
+ bits_per_code = 4;
+ break;
+ case 40000:
+ bits_per_code = 5;
+ break;
}
- }
-
- len2 = 0;
- conditioning_samples = 0;
- if (itutests)
- {
- for (test = 0; itu_test_sets[test].rate; test++)
+ if (itu_test_sets[test].compression_law != G726_ENCODING_NONE)
{
- printf("Test %2d: '%s' + '%s'\n"
- " -> '%s' + '%s'\n"
- " -> '%s' [%d, %d, %d]\n",
- test,
- itu_test_sets[test].conditioning_pcm_file,
- itu_test_sets[test].pcm_file,
- itu_test_sets[test].conditioning_adpcm_file,
- itu_test_sets[test].adpcm_file,
- itu_test_sets[test].output_file,
- itu_test_sets[test].rate,
- itu_test_sets[test].compression_law,
- itu_test_sets[test].decompression_law);
- switch (itu_test_sets[test].rate)
- {
- case 16000:
- bits_per_code = 2;
- break;
- case 24000:
- bits_per_code = 3;
- break;
- case 32000:
- default:
- bits_per_code = 4;
- break;
- case 40000:
- bits_per_code = 5;
- break;
- }
- if (itu_test_sets[test].compression_law != G726_ENCODING_NONE)
+ /* Test the encode side */
+ g726_init(&enc_state, itu_test_sets[test].rate, itu_test_sets[test].compression_law, G726_PACKING_NONE);
+ if (itu_test_sets[test].conditioning_pcm_file[0])
{
- /* Test the encode side */
- g726_init(&enc_state, itu_test_sets[test].rate, itu_test_sets[test].compression_law, G726_PACKING_NONE);
- if (itu_test_sets[test].conditioning_pcm_file[0])
- {
- conditioning_samples = get_test_vector(itu_test_sets[test].conditioning_pcm_file, xlaw, MAX_TEST_VECTOR_LEN);
- printf("Test %d: Homing %d samples at %dbps\n", test, conditioning_samples, itu_test_sets[test].rate);
- }
- else
- {
- conditioning_samples = 0;
- }
- samples = get_test_vector(itu_test_sets[test].pcm_file, xlaw + conditioning_samples, MAX_TEST_VECTOR_LEN);
- memcpy(itudata, xlaw, samples + conditioning_samples);
- printf("Test %d: Compressing %d samples at %dbps\n", test, samples, itu_test_sets[test].rate);
- len2 = g726_encode(&enc_state, adpcmdata, itudata, conditioning_samples + samples);
- }
- /* Test the decode side */
- g726_init(&dec_state, itu_test_sets[test].rate, itu_test_sets[test].decompression_law, G726_PACKING_NONE);
- if (itu_test_sets[test].conditioning_adpcm_file[0])
- {
- conditioning_adpcm = get_test_vector(itu_test_sets[test].conditioning_adpcm_file, unpacked, MAX_TEST_VECTOR_LEN);
- printf("Test %d: Homing %d octets at %dbps\n", test, conditioning_adpcm, itu_test_sets[test].rate);
+ conditioning_samples = get_test_vector(itu_test_sets[test].conditioning_pcm_file, xlaw, MAX_TEST_VECTOR_LEN);
+ printf("Test %d: Homing %d samples at %dbps\n", test, conditioning_samples, itu_test_sets[test].rate);
}
else
{
- conditioning_adpcm = 0;
+ conditioning_samples = 0;
}
- adpcm = get_test_vector(itu_test_sets[test].adpcm_file, unpacked + conditioning_adpcm, MAX_TEST_VECTOR_LEN);
- if (itu_test_sets[test].compression_law != G726_ENCODING_NONE)
- {
- /* Test our compressed version against the reference compressed version */
- printf("Test %d: Compressed data check - %d/%d octets\n", test, conditioning_adpcm + adpcm, len2);
- if (conditioning_adpcm + adpcm == len2)
- {
- for (bad_samples = 0, i = conditioning_samples; i < len2; i++)
- {
- if (adpcmdata[i] != unpacked[i])
- {
- bad_samples++;
- printf("Test %d: Compressed mismatch %d %x %x\n", test, i, adpcmdata[i], unpacked[i]);
- }
- }
- if (bad_samples > 0)
- {
- printf("Test failed\n");
- exit(2);
- }
- printf("Test passed\n");
- }
- else
- {
- printf("Test %d: Length mismatch - ref = %d, processed = %d\n", test, conditioning_adpcm + adpcm, len2);
- exit(2);
- }
- }
-
- len3 = g726_decode(&dec_state, outdata, unpacked, conditioning_adpcm + adpcm);
-
- /* Get the output reference data */
- samples = get_test_vector(itu_test_sets[test].output_file, xlaw, MAX_TEST_VECTOR_LEN);
- memcpy(itu_ref, xlaw, samples);
- /* Test our decompressed version against the reference decompressed version */
- printf("Test %d: Decompressed data check - %d/%d samples\n", test, samples, len3 - conditioning_adpcm);
- if (samples == len3 - conditioning_adpcm)
+ samples = get_test_vector(itu_test_sets[test].pcm_file, xlaw + conditioning_samples, MAX_TEST_VECTOR_LEN);
+ memcpy(itudata, xlaw, samples + conditioning_samples);
+ printf("Test %d: Compressing %d samples at %dbps\n", test, samples, itu_test_sets[test].rate);
+ len2 = g726_encode(&enc_state, adpcmdata, itudata, conditioning_samples + samples);
+ }
+ /* Test the decode side */
+ g726_init(&dec_state, itu_test_sets[test].rate, itu_test_sets[test].decompression_law, G726_PACKING_NONE);
+ if (itu_test_sets[test].conditioning_adpcm_file[0])
+ {
+ conditioning_adpcm = get_test_vector(itu_test_sets[test].conditioning_adpcm_file, unpacked, MAX_TEST_VECTOR_LEN);
+ printf("Test %d: Homing %d octets at %dbps\n", test, conditioning_adpcm, itu_test_sets[test].rate);
+ }
+ else
+ {
+ conditioning_adpcm = 0;
+ }
+ adpcm = get_test_vector(itu_test_sets[test].adpcm_file, unpacked + conditioning_adpcm, MAX_TEST_VECTOR_LEN);
+ if (itu_test_sets[test].compression_law != G726_ENCODING_NONE)
+ {
+ /* Test our compressed version against the reference compressed version */
+ printf("Test %d: Compressed data check - %d/%d octets\n", test, conditioning_adpcm + adpcm, len2);
+ if (conditioning_adpcm + adpcm == len2)
{
- for (bad_samples = 0, i = 0; i < len3; i++)
+ for (bad_samples = 0, i = conditioning_samples; i < len2; i++)
{
- if (itu_ref[i] != ((uint8_t *) outdata)[i + conditioning_adpcm])
+ if (adpcmdata[i] != unpacked[i])
{
bad_samples++;
- printf("Test %d: Decompressed mismatch %d %x %x\n", test, i, itu_ref[i], ((uint8_t *) outdata)[i + conditioning_adpcm]);
+ printf("Test %d: Compressed mismatch %d %x %x\n", test, i, adpcmdata[i], unpacked[i]);
}
}
if (bad_samples > 0)
@@ -1248,12 +1177,92 @@
}
else
{
- printf("Test %d: Length mismatch - ref = %d, processed = %d\n", test, samples, len3 - conditioning_adpcm);
+ printf("Test %d: Length mismatch - ref = %d, processed = %d\n", test, conditioning_adpcm + adpcm, len2);
+ exit(2);
+ }
+ }
+
+ len3 = g726_decode(&dec_state, outdata, unpacked, conditioning_adpcm + adpcm);
+
+ /* Get the output reference data */
+ samples = get_test_vector(itu_test_sets[test].output_file, xlaw, MAX_TEST_VECTOR_LEN);
+ memcpy(itu_ref, xlaw, samples);
+ /* Test our decompressed version against the reference decompressed version */
+ printf("Test %d: Decompressed data check - %d/%d samples\n", test, samples, len3 - conditioning_adpcm);
+ if (samples == len3 - conditioning_adpcm)
+ {
+ for (bad_samples = 0, i = 0; i < len3; i++)
+ {
+ if (itu_ref[i] != ((uint8_t *) outdata)[i + conditioning_adpcm])
+ {
+ bad_samples++;
+ printf("Test %d: Decompressed mismatch %d %x %x\n", test, i, itu_ref[i], ((uint8_t *) outdata)[i + conditioning_adpcm]);
+ }
+ }
+ if (bad_samples > 0)
+ {
+ printf("Test failed\n");
+ exit(2);
+ }
+ printf("Test passed\n");
+ }
+ else
+ {
+ printf("Test %d: Length mismatch - ref = %d, processed = %d\n", test, samples, len3 - conditioning_adpcm);
+ exit(2);
+ }
+ }
+
+ printf("Tests passed.\n");
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+ g726_state_t enc_state;
+ g726_state_t dec_state;
+ int opt;
+ int itutests;
+ int bit_rate;
+ AFfilehandle inhandle;
+ AFfilehandle outhandle;
+ int16_t amp[1024];
+ int frames;
+ int outframes;
+ int adpcm;
+ int packing;
+
+ bit_rate = 32000;
+ itutests = TRUE;
+ packing = G726_PACKING_NONE;
+ while ((opt = getopt(argc, argv, "b:LR")) != -1)
+ {
+ switch (opt)
+ {
+ case 'b':
+ bit_rate = atoi(optarg);
+ if (bit_rate != 16000 && bit_rate != 24000 && bit_rate != 32000 && bit_rate != 40000)
+ {
+ fprintf(stderr, "Invalid bit rate selected. Only 16000, 24000, 32000 and 40000 are valid.\n");
exit(2);
}
+ itutests = FALSE;
+ break;
+ case 'L':
+ packing = G726_PACKING_LEFT;
+ break;
+ case 'R':
+ packing = G726_PACKING_RIGHT;
+ break;
+ default:
+ //usage();
+ exit(2);
}
+ }
- printf("Tests passed.\n");
+ if (itutests)
+ {
+ itu_compliance_tests();
}
else
{
@@ -1269,8 +1278,6 @@
}
printf("ADPCM packing is %d\n", packing);
- //g726_init(&enc_state, bit_rate, G726_ENCODING_LINEAR, G726_PACKING_LEFT);
- //g726_init(&dec_state, bit_rate, G726_ENCODING_LINEAR, G726_PACKING_RIGHT);
g726_init(&enc_state, bit_rate, G726_ENCODING_LINEAR, packing);
g726_init(&dec_state, bit_rate, G726_ENCODING_LINEAR, packing);
Modified: freeswitch/trunk/libs/spandsp/tests/gsm0610_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/gsm0610_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/gsm0610_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: gsm0610_tests.c,v 1.23 2009/01/12 17:20:59 steveu Exp $
+ * $Id: gsm0610_tests.c,v 1.24 2009/04/22 12:57:40 steveu Exp $
*/
/*! \file */
@@ -516,6 +516,30 @@
}
/*- End of function --------------------------------------------------------*/
+static void etsi_compliance_tests(void)
+{
+ perform_linear_test(TRUE, 1, "Seq01");
+ perform_linear_test(TRUE, 1, "Seq02");
+ perform_linear_test(TRUE, 1, "Seq03");
+ perform_linear_test(TRUE, 1, "Seq04");
+ perform_linear_test(FALSE, 1, "Seq05");
+ perform_law_test(TRUE, 'a', "Seq01");
+ perform_law_test(TRUE, 'a', "Seq02");
+ perform_law_test(TRUE, 'a', "Seq03");
+ perform_law_test(TRUE, 'a', "Seq04");
+ perform_law_test(FALSE, 'a', "Seq05");
+ perform_law_test(TRUE, 'u', "Seq01");
+ perform_law_test(TRUE, 'u', "Seq02");
+ perform_law_test(TRUE, 'u', "Seq03");
+ perform_law_test(TRUE, 'u', "Seq04");
+ perform_law_test(FALSE, 'u', "Seq05");
+ /* This is not actually an ETSI test */
+ perform_pack_unpack_test();
+
+ printf("Tests passed.\n");
+}
+/*- End of function --------------------------------------------------------*/
+
int main(int argc, char *argv[])
{
AFfilehandle inhandle;
@@ -552,25 +576,7 @@
if (etsitests)
{
- perform_linear_test(TRUE, 1, "Seq01");
- perform_linear_test(TRUE, 1, "Seq02");
- perform_linear_test(TRUE, 1, "Seq03");
- perform_linear_test(TRUE, 1, "Seq04");
- perform_linear_test(FALSE, 1, "Seq05");
- perform_law_test(TRUE, 'a', "Seq01");
- perform_law_test(TRUE, 'a', "Seq02");
- perform_law_test(TRUE, 'a', "Seq03");
- perform_law_test(TRUE, 'a', "Seq04");
- perform_law_test(FALSE, 'a', "Seq05");
- perform_law_test(TRUE, 'u', "Seq01");
- perform_law_test(TRUE, 'u', "Seq02");
- perform_law_test(TRUE, 'u', "Seq03");
- perform_law_test(TRUE, 'u', "Seq04");
- perform_law_test(FALSE, 'u', "Seq05");
- /* This is not actually an ETSI test */
- perform_pack_unpack_test();
-
- printf("Tests passed.\n");
+ etsi_compliance_tests();
}
else
{
Added: freeswitch/trunk/libs/spandsp/tests/msvc/adsi_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/adsi_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="adsi_tests"
+ ProjectGUID="{4B3877F1-B3E4-463C-8F39-12231480CC30}"
+ RootNamespace="adsi_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ AdditionalDependencies="..\src\Debug\spandsp.lib ..\spandsp-sim\Debug\spandsp.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ AdditionalDependencies="..\src\Debug\spandsp.lib ..\spandsp-sim\Debug\spandsp.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\adsi_tests.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/complex_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/complex_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="complex_tests"
+ ProjectGUID="{A349379F-0FEA-49C8-9535-05F39663337B}"
+ RootNamespace="complex_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\src\Debug\spandsp.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\complex_tests.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/complex_vector_float_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/complex_vector_float_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="complex_vector_float_tests"
+ ProjectGUID="{2B0D705C-1CF2-401C-BFBC-A43FB806908C}"
+ RootNamespace="complex_vector_float_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\src\Debug\spandsp.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\complex_vector_float_tests.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/complex_vector_int_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/complex_vector_int_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="complex_vector_int_tests"
+ ProjectGUID="{C2E8B4D1-A398-4D57-94F8-B61F20C7D514}"
+ RootNamespace="complex_vector_int_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\src\Debug\spandsp.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\complex_vector_int_tests.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/dtmf_rx_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/dtmf_rx_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="dtmf_rx_tests"
+ ProjectGUID="{A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}"
+ RootNamespace="dtmf_rx_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\src\Debug\spandsp.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\dtmf_rx_tests.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/dtmf_tx_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/dtmf_tx_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="dtmf_tx_tests"
+ ProjectGUID="{A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}"
+ RootNamespace="dtmf_tx_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\src\Debug\spandsp.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\dtmf_tx_tests.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/queue_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/queue_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="queue_tests"
+ ProjectGUID="{80A3D9D9-3846-4DA5-8676-F940D725EA62}"
+ RootNamespace="queue_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\src\Debug\spandsp.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\queue_tests.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/t38_core_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/t38_core_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="t38_core_tests"
+ ProjectGUID="{A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}"
+ RootNamespace="t38_core_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\src\Debug\spandsp.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\t38_core_tests.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/t38_non_ecm_buffer_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/t38_non_ecm_buffer_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="t38_non_ecm_buffer_tests"
+ ProjectGUID="{80A3D9D9-3846-4DA5-8676-F940D725EA62}"
+ RootNamespace="t38_non_ecm_buffer_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\src\Debug\spandsp.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\t38_non_ecm_buffer_tests.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/t38_terminal_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/t38_terminal_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,202 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="t38-terminal-tests"
+ ProjectGUID="{B5DECF33-1D06-459A-AE70-A06404909919}"
+ RootNamespace="t38terminaltests"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""..\src";"..\spandsp-sim";..\..\libtiff\include;"..\src\msvc""
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib ..\spandsp-sim\Debug\spandsp.lib"
+ GenerateDebugInformation="true"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ RuntimeLibrary="2"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ GenerateDebugInformation="true"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="fax_utils.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\msvc\getopt.c"
+ >
+ </File>
+ <File
+ RelativePath="media_monitor.cpp"
+ >
+ </File>
+ <File
+ RelativePath="t38_terminal_tests.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/v22bis_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/v22bis_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="v22bis_tests"
+ ProjectGUID="{A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}"
+ RootNamespace="v22bis_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\src\Debug\spandsp.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\v22bis_tests.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/v29_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/v29_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="v29_tests"
+ ProjectGUID="{A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}"
+ RootNamespace="v29_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\src\Debug\spandsp.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\v29_tests.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/v80_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/v80_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="v80_tests"
+ ProjectGUID="{A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}"
+ RootNamespace="v80_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\src\Debug\spandsp.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\v80_tests.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/v8_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/v8_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="v8_tests"
+ ProjectGUID="{A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}"
+ RootNamespace="v8_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\src\Debug\spandsp.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\v8_tests.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/vector_float_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/vector_float_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="vector_float_tests"
+ ProjectGUID="{EA745FF7-9E4B-4C13-BA19-2EE8165A6245}"
+ RootNamespace="vector_float_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\src\Debug\spandsp.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\vector_float_tests.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/vector_int_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/vector_int_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="vector_int_tests"
+ ProjectGUID="{80A60464-29E8-4EE8-BAFA-8708B7C08CC3}"
+ RootNamespace="vector_int_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\src\Debug\spandsp.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\vector_int_tests.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Modified: freeswitch/trunk/libs/spandsp/tests/t38_core_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/t38_core_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/t38_core_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t38_core_tests.c,v 1.14 2008/11/30 13:44:35 steveu Exp $
+ * $Id: t38_core_tests.c,v 1.15 2009/04/25 14:17:47 steveu Exp $
*/
/*! \file */
@@ -42,16 +42,6 @@
#include <string.h>
#include <assert.h>
#include <errno.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#if !defined(__USE_MISC)
-#define __USE_MISC
-#endif
-#include <arpa/inet.h>
-#include <sys/select.h>
-#include <sys/time.h>
-#include <audiofile.h>
//#if defined(WITH_SPANDSP_INTERNALS)
#define SPANDSP_EXPOSE_INTERNAL_STRUCTURES
Modified: freeswitch/trunk/libs/spandsp/tests/t38_gateway_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/t38_gateway_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/t38_gateway_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t38_gateway_tests.c,v 1.80 2009/02/20 12:34:20 steveu Exp $
+ * $Id: t38_gateway_tests.c,v 1.81 2009/04/25 14:27:18 steveu Exp $
*/
/*! \file */
@@ -48,20 +48,13 @@
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
-#include <unistd.h>
#include <string.h>
#include <assert.h>
#include <errno.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#if !defined(__USE_MISC)
-#define __USE_MISC
-#endif
-#include <arpa/inet.h>
-#include <sys/select.h>
-#include <sys/time.h>
#include <audiofile.h>
+#if !defined(_WIN32)
+#include <unistd.h>
+#endif
//#if defined(WITH_SPANDSP_INTERNALS)
#define SPANDSP_EXPOSE_INTERNAL_STRUCTURES
Modified: freeswitch/trunk/libs/spandsp/tests/t38_gateway_to_terminal_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/t38_gateway_to_terminal_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/t38_gateway_to_terminal_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t38_gateway_to_terminal_tests.c,v 1.64 2009/02/20 12:34:20 steveu Exp $
+ * $Id: t38_gateway_to_terminal_tests.c,v 1.65 2009/04/25 14:27:18 steveu Exp $
*/
/*! \file */
@@ -48,20 +48,13 @@
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
-#include <unistd.h>
#include <string.h>
#include <assert.h>
#include <errno.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#if !defined(__USE_MISC)
-#define __USE_MISC
-#endif
-#include <arpa/inet.h>
-#include <sys/select.h>
-#include <sys/time.h>
#include <audiofile.h>
+#if !defined(_WIN32)
+#include <unistd.h>
+#endif
//#if defined(WITH_SPANDSP_INTERNALS)
#define SPANDSP_EXPOSE_INTERNAL_STRUCTURES
Modified: freeswitch/trunk/libs/spandsp/tests/t38_non_ecm_buffer_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/t38_non_ecm_buffer_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/t38_non_ecm_buffer_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t38_non_ecm_buffer_tests.c,v 1.4 2008/11/30 13:44:35 steveu Exp $
+ * $Id: t38_non_ecm_buffer_tests.c,v 1.5 2009/04/25 14:17:47 steveu Exp $
*/
/*! \file */
@@ -40,20 +40,9 @@
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
-#include <unistd.h>
#include <string.h>
#include <assert.h>
#include <errno.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#if !defined(__USE_MISC)
-#define __USE_MISC
-#endif
-#include <arpa/inet.h>
-#include <sys/select.h>
-#include <sys/time.h>
-#include <audiofile.h>
//#if defined(WITH_SPANDSP_INTERNALS)
#define SPANDSP_EXPOSE_INTERNAL_STRUCTURES
Modified: freeswitch/trunk/libs/spandsp/tests/t38_terminal_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/t38_terminal_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/t38_terminal_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t38_terminal_tests.c,v 1.65 2009/02/20 12:34:20 steveu Exp $
+ * $Id: t38_terminal_tests.c,v 1.67 2009/04/25 14:34:45 steveu Exp $
*/
/*! \file */
@@ -34,7 +34,6 @@
T.38 termination <-> T.38 termination
*/
-/* Enable the following definition to enable direct probing into the FAX structures */
//#define WITH_SPANDSP_INTERNALS
#if defined(HAVE_CONFIG_H)
@@ -48,20 +47,12 @@
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
-#include <unistd.h>
#include <string.h>
#include <assert.h>
#include <errno.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#if !defined(__USE_MISC)
-#define __USE_MISC
+#if !defined(_WIN32)
+#include <unistd.h>
#endif
-#include <arpa/inet.h>
-#include <sys/select.h>
-#include <sys/time.h>
-#include <audiofile.h>
//#if defined(WITH_SPANDSP_INTERNALS)
#define SPANDSP_EXPOSE_INTERNAL_STRUCTURES
Modified: freeswitch/trunk/libs/spandsp/tests/t38_terminal_to_gateway_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/t38_terminal_to_gateway_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/t38_terminal_to_gateway_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t38_terminal_to_gateway_tests.c,v 1.63 2009/02/20 12:34:20 steveu Exp $
+ * $Id: t38_terminal_to_gateway_tests.c,v 1.64 2009/04/25 14:27:19 steveu Exp $
*/
/*! \file */
@@ -48,20 +48,13 @@
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
-#include <unistd.h>
#include <string.h>
#include <assert.h>
#include <errno.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#if !defined(__USE_MISC)
-#define __USE_MISC
-#endif
-#include <arpa/inet.h>
-#include <sys/select.h>
-#include <sys/time.h>
#include <audiofile.h>
+#if !defined(_WIN32)
+#include <unistd.h>
+#endif
//#if defined(WITH_SPANDSP_INTERNALS)
#define SPANDSP_EXPOSE_INTERNAL_STRUCTURES
Modified: freeswitch/trunk/libs/spandsp/tests/v17_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/v17_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/v17_tests.c Tue Apr 28 09:42:18 2009
@@ -23,7 +23,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v17_tests.c,v 1.101 2009/03/15 09:09:21 steveu Exp $
+ * $Id: v17_tests.c,v 1.102 2009/04/25 16:30:52 steveu Exp $
*/
/*! \page v17_tests_page V.17 modem tests
@@ -483,6 +483,14 @@
if (use_gui)
qam_wait_to_end(qam_monitor);
#endif
+ if (decode_test_file)
+ {
+ if (afCloseFile(inhandle))
+ {
+ fprintf(stderr, " Cannot close wave file '%s'\n", decode_test_file);
+ exit(2);
+ }
+ }
if (log_audio)
{
if (afCloseFile(outhandle))
Modified: freeswitch/trunk/libs/spandsp/tests/v22bis_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/v22bis_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/v22bis_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v22bis_tests.c,v 1.58 2009/04/17 14:37:53 steveu Exp $
+ * $Id: v22bis_tests.c,v 1.61 2009/04/25 16:30:52 steveu Exp $
*/
/*! \page v22bis_tests_page V.22bis modem tests
@@ -62,13 +62,13 @@
#define BLOCK_LEN 160
-#define IN_FILE_NAME "v22bis_samp.wav"
#define OUT_FILE_NAME "v22bis.wav"
-int rx_bits = 0;
-
+char *decode_test_file = NULL;
int use_gui = FALSE;
+int rx_bits = 0;
+
both_ways_line_model_state_t *model;
typedef struct
@@ -115,6 +115,7 @@
endpoint_t *s;
int i;
int len;
+ int bit_rate;
complexf_t *coeffs;
s = (endpoint_t *) user_data;
@@ -125,7 +126,9 @@
switch (bit)
{
case SIG_STATUS_TRAINING_SUCCEEDED:
- len = v22bis_equalizer_state(s->v22bis, &coeffs);
+ bit_rate = v22bis_current_bit_rate(s->v22bis);
+ printf("Negotiated bit rate: %d\n", bit_rate);
+ len = v22bis_rx_equalizer_state(s->v22bis, &coeffs);
printf("Equalizer:\n");
for (i = 0; i < len; i++)
printf("%3d (%15.5f, %15.5f) -> %15.5f\n", i, coeffs[i].re, coeffs[i].im, powerf(&coeffs[i]));
@@ -134,8 +137,10 @@
return;
}
- //printf("Rx bit %p - %d\n", user_data, bit);
- bert_put_bit(&s->bert_rx, bit);
+ if (decode_test_file)
+ printf("Rx bit %p-%d - %d\n", user_data, rx_bits++, bit);
+ else
+ bert_put_bit(&s->bert_rx, bit);
}
/*- End of function --------------------------------------------------------*/
@@ -166,7 +171,7 @@
{
qam_monitor_update_constel(s->qam_monitor, constel);
qam_monitor_update_carrier_tracking(s->qam_monitor, v22bis_rx_carrier_frequency(s->v22bis));
- qam_monitor_update_symbol_tracking(s->qam_monitor, v22bis_symbol_timing_correction(s->v22bis));
+ qam_monitor_update_symbol_tracking(s->qam_monitor, v22bis_rx_symbol_timing_correction(s->v22bis));
}
#endif
fpower = (constel->re - target->re)*(constel->re - target->re)
@@ -188,7 +193,7 @@
else
{
printf("Gardner step %d\n", symbol);
- len = v22bis_equalizer_state(s->v22bis, &coeffs);
+ len = v22bis_rx_equalizer_state(s->v22bis, &coeffs);
printf("Equalizer A:\n");
for (i = 0; i < len; i++)
printf("%3d (%15.5f, %15.5f) -> %15.5f\n", i, coeffs[i].re, coeffs[i].im, powerf(&coeffs[i]));
@@ -205,9 +210,11 @@
int16_t amp[2][BLOCK_LEN];
int16_t model_amp[2][BLOCK_LEN];
int16_t out_amp[2*BLOCK_LEN];
+ AFfilehandle inhandle;
AFfilehandle outhandle;
int outframes;
int samples;
+ int samples2;
int i;
int j;
int test_bps;
@@ -222,11 +229,12 @@
channel_codec = MUNGE_CODEC_NONE;
test_bps = 2400;
line_model_no = 0;
+ decode_test_file = NULL;
noise_level = -70;
signal_level = -13;
bits_per_test = 50000;
log_audio = FALSE;
- while ((opt = getopt(argc, argv, "b:B:c:glm:n:s:")) != -1)
+ while ((opt = getopt(argc, argv, "b:B:c:d:glm:n:s:")) != -1)
{
switch (opt)
{
@@ -244,6 +252,9 @@
case 'c':
channel_codec = atoi(optarg);
break;
+ case 'd':
+ decode_test_file = optarg;
+ break;
case 'g':
#if defined(ENABLE_GUI)
use_gui = TRUE;
@@ -270,6 +281,17 @@
break;
}
}
+ inhandle = AF_NULL_FILEHANDLE;
+ if (decode_test_file)
+ {
+ /* We will decode the audio from a wave file. */
+ if ((inhandle = afOpenFile_telephony_read(decode_test_file, 1)) == AF_NULL_FILEHANDLE)
+ {
+ fprintf(stderr, " Cannot open wave file '%s'\n", decode_test_file);
+ exit(2);
+ }
+ }
+
outhandle = AF_NULL_FILEHANDLE;
if (log_audio)
{
@@ -283,11 +305,11 @@
for (i = 0; i < 2; i++)
{
- endpoint[i].v22bis = v22bis_init(NULL, test_bps, V22BIS_GUARD_TONE_1800HZ, (i == 0), v22bis_getbit, v22bis_putbit, &endpoint[i]);
+ endpoint[i].v22bis = v22bis_init(NULL, test_bps, V22BIS_GUARD_TONE_1800HZ, (i == 0), v22bis_getbit, &endpoint[i], v22bis_putbit, &endpoint[i]);
v22bis_tx_power(endpoint[i].v22bis, signal_level);
/* Move the carrier off a bit */
endpoint[i].v22bis->tx.carrier_phase_rate = dds_phase_ratef((i == 0) ? 1207.0f : 2407.0f);
- v22bis_set_qam_report_handler(endpoint[i].v22bis, qam_report, (void *) &endpoint[i]);
+ v22bis_rx_set_qam_report_handler(endpoint[i].v22bis, qam_report, (void *) &endpoint[i]);
span_log_set_level(&endpoint[i].v22bis->logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME | SPAN_LOG_FLOW);
span_log_set_tag(&endpoint[i].v22bis->logging, (i == 0) ? "caller" : "answerer");
endpoint[i].smooth_power = 0.0f;
@@ -334,7 +356,7 @@
}
}
-#if 0
+#if 1
both_ways_line_model(model,
model_amp[0],
amp[0],
@@ -345,6 +367,15 @@
vec_copyi16(model_amp[0], amp[0], samples);
vec_copyi16(model_amp[1], amp[1], samples);
#endif
+ if (decode_test_file)
+ {
+ samples2 = afReadFrames(inhandle,
+ AF_DEFAULT_TRACK,
+ model_amp[0],
+ samples);
+ if (samples2 != samples)
+ break;
+ }
for (i = 0; i < 2; i++)
{
span_log_bump_samples(&endpoint[i].v22bis->logging, samples);
@@ -368,6 +399,18 @@
}
}
}
+#if defined(ENABLE_GUI)
+ if (use_gui)
+ qam_wait_to_end(endpoint[0].qam_monitor);
+#endif
+ if (decode_test_file)
+ {
+ if (afCloseFile(inhandle))
+ {
+ fprintf(stderr, " Cannot close wave file '%s'\n", decode_test_file);
+ exit(2);
+ }
+ }
if (log_audio)
{
if (afCloseFile(outhandle) != 0)
Modified: freeswitch/trunk/libs/spandsp/tests/v27ter_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/v27ter_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/v27ter_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v27ter_tests.c,v 1.103 2009/03/15 09:09:21 steveu Exp $
+ * $Id: v27ter_tests.c,v 1.104 2009/04/25 16:30:52 steveu Exp $
*/
/*! \page v27ter_tests_page V.27ter modem tests
@@ -471,6 +471,14 @@
if (use_gui)
qam_wait_to_end(qam_monitor);
#endif
+ if (decode_test_file)
+ {
+ if (afCloseFile(inhandle))
+ {
+ fprintf(stderr, " Cannot close wave file '%s'\n", decode_test_file);
+ exit(2);
+ }
+ }
if (log_audio)
{
if (afCloseFile(outhandle))
Modified: freeswitch/trunk/libs/spandsp/tests/v29_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/v29_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/v29_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v29_tests.c,v 1.117 2009/03/15 09:09:21 steveu Exp $
+ * $Id: v29_tests.c,v 1.118 2009/04/25 16:30:52 steveu Exp $
*/
/*! \page v29_tests_page V.29 modem tests
@@ -500,6 +500,14 @@
if (use_gui)
qam_wait_to_end(qam_monitor);
#endif
+ if (decode_test_file)
+ {
+ if (afCloseFile(inhandle))
+ {
+ fprintf(stderr, " Cannot close wave file '%s'\n", decode_test_file);
+ exit(2);
+ }
+ }
if (log_audio)
{
if (afCloseFile(outhandle))
Modified: freeswitch/trunk/libs/spandsp/tests/v8_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/v8_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/v8_tests.c Tue Apr 28 09:42:18 2009
@@ -22,14 +22,14 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v8_tests.c,v 1.31 2008/11/30 10:17:31 steveu Exp $
+ * $Id: v8_tests.c,v 1.32 2009/04/24 22:35:25 steveu Exp $
*/
/*! \page v8_tests_page V.8 tests
\section v8_tests_page_sec_1 What does it do?
*/
-/* Enable the following definition to enable direct probing into the FAX structures */
+/* Enable the following definition to enable direct probing into the internal structures */
//#define WITH_SPANDSP_INTERNALS
#if defined(HAVE_CONFIG_H)
Modified: freeswitch/trunk/libs/spandsp/tests/vector_float_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/vector_float_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/vector_float_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: vector_float_tests.c,v 1.12 2008/10/09 13:25:19 steveu Exp $
+ * $Id: vector_float_tests.c,v 1.13 2009/04/26 07:00:39 steveu Exp $
*/
#if defined(HAVE_CONFIG_H)
@@ -33,7 +33,6 @@
#include <stdio.h>
#include <fcntl.h>
#include <string.h>
-#include <audiofile.h>
#include "spandsp.h"
Modified: freeswitch/trunk/libs/spandsp/tests/vector_int_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/vector_int_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/vector_int_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: vector_int_tests.c,v 1.10 2008/09/18 12:05:35 steveu Exp $
+ * $Id: vector_int_tests.c,v 1.11 2009/04/26 07:00:39 steveu Exp $
*/
#if defined(HAVE_CONFIG_H)
@@ -33,7 +33,6 @@
#include <stdio.h>
#include <fcntl.h>
#include <string.h>
-#include <audiofile.h>
#include "spandsp.h"
1
0
Author: anthm
Date: Tue Apr 28 09:13:05 2009
New Revision: 13176
Log:
FSCORE-357
Modified:
freeswitch/trunk/src/include/switch_core.h
freeswitch/trunk/src/include/switch_types.h
freeswitch/trunk/src/switch_core_session.c
freeswitch/trunk/src/switch_core_state_machine.c
freeswitch/trunk/src/switch_ivr_bridge.c
freeswitch/trunk/src/switch_ivr_originate.c
Modified: freeswitch/trunk/src/include/switch_core.h
==============================================================================
--- freeswitch/trunk/src/include/switch_core.h (original)
+++ freeswitch/trunk/src/include/switch_core.h Tue Apr 28 09:13:05 2009
@@ -579,6 +579,7 @@
#define switch_core_session_destroy(session) switch_core_session_perform_destroy(session, __FILE__, __SWITCH_FUNC__, __LINE__)
SWITCH_DECLARE(void) switch_core_session_destroy_state(switch_core_session_t *session);
+SWITCH_DECLARE(void) switch_core_session_reporting_state(switch_core_session_t *session);
/*!
\brief Provide the total number of sessions
@@ -652,6 +653,13 @@
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_locate(_In_z_ const char *uuid_str);
#endif
+
+#ifdef SWITCH_DEBUG_RWLOCKS
+#define switch_core_session_locate(uuid_str) switch_core_session_perform_force_locate(uuid_str, __FILE__, __SWITCH_FUNC__, __LINE__)
+#else
+SWITCH_DECLARE(switch_core_session_t *) switch_core_session_force_locate(_In_z_ const char *uuid_str);
+#endif
+
/*!
\brief Retrieve a global variable from the core
\param varname the name of the variable
Modified: freeswitch/trunk/src/include/switch_types.h
==============================================================================
--- freeswitch/trunk/src/include/switch_types.h (original)
+++ freeswitch/trunk/src/include/switch_types.h Tue Apr 28 09:13:05 2009
@@ -884,6 +884,7 @@
CF_DIVERT_EVENTS,
CF_BLOCK_STATE,
CF_FS_RTP,
+ CF_REPORTING,
/* WARNING: DO NOT ADD ANY FLAGS BELOW THIS LINE */
CF_FLAG_MAX
} switch_channel_flag_t;
Modified: freeswitch/trunk/src/switch_core_session.c
==============================================================================
--- freeswitch/trunk/src/switch_core_session.c (original)
+++ freeswitch/trunk/src/switch_core_session.c Tue Apr 28 09:13:05 2009
@@ -75,13 +75,58 @@
return session;
}
+
+
+
+#ifdef SWITCH_DEBUG_RWLOCKS
+SWITCH_DECLARE(switch_core_session_t *) switch_core_session_perform_force_locate(const char *uuid_str, const char *file, const char *func, int line)
+#else
+SWITCH_DECLARE(switch_core_session_t *) switch_core_session_force_locate(const char *uuid_str)
+#endif
+{
+ switch_core_session_t *session = NULL;
+ switch_status_t status;
+
+ if (uuid_str) {
+ switch_mutex_lock(runtime.session_hash_mutex);
+ if ((session = switch_core_hash_find(session_manager.session_table, uuid_str))) {
+ /* Acquire a read lock on the session */
+
+ if (switch_test_flag(session, SSF_DESTROYED)) {
+ status = SWITCH_STATUS_FALSE;
+#ifdef SWITCH_DEBUG_RWLOCKS
+ switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_ERROR, "%s Read lock FAIL\n",
+ switch_channel_get_name(session->channel));
+#endif
+ } else {
+ status = (switch_status_t) switch_thread_rwlock_tryrdlock(session->rwlock);
+#ifdef SWITCH_DEBUG_RWLOCKS
+ switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_ERROR, "%s Read lock ACQUIRED\n",
+ switch_channel_get_name(session->channel));
+#endif
+ }
+
+ if (status != SWITCH_STATUS_SUCCESS) {
+ /* not available, forget it */
+ session = NULL;
+ }
+ }
+ switch_mutex_unlock(runtime.session_hash_mutex);
+ }
+
+ /* if its not NULL, now it's up to you to rwunlock this */
+ return session;
+}
+
+
SWITCH_DECLARE(switch_status_t) switch_core_session_get_partner(switch_core_session_t *session, switch_core_session_t **partner)
{
const char *uuid;
if ((uuid = switch_channel_get_variable(session->channel, SWITCH_SIGNAL_BOND_VARIABLE))) {
- *partner = switch_core_session_locate(uuid);
- return SWITCH_STATUS_SUCCESS;
+ if ((*partner = switch_core_session_locate(uuid))) {
+ return SWITCH_STATUS_SUCCESS;
+ }
}
*partner = NULL;
Modified: freeswitch/trunk/src/switch_core_state_machine.c
==============================================================================
--- freeswitch/trunk/src/switch_core_state_machine.c (original)
+++ freeswitch/trunk/src/switch_core_state_machine.c Tue Apr 28 09:13:05 2009
@@ -406,24 +406,7 @@
goto done;
case CS_REPORTING: /* Call Detail */
{
- const char *var = switch_channel_get_variable(session->channel, SWITCH_PROCESS_CDR_VARIABLE);
-
- if (!switch_strlen_zero(var)) {
- if (!strcasecmp(var, "a_only")) {
- if (switch_channel_get_originator_caller_profile(session->channel)) {
- do_extra_handlers = 0;
- }
- } else if (!strcasecmp(var, "b_only")) {
- if (switch_channel_get_originatee_caller_profile(session->channel)) {
- do_extra_handlers = 0;
- }
- } else if (!switch_true(var)) {
- do_extra_handlers = 0;
- }
- }
-
- STATE_MACRO(reporting, "REPORTING");
-
+ switch_core_session_reporting_state(session);
switch_channel_set_state(session->channel, CS_DESTROY);
}
goto done;
@@ -578,6 +561,56 @@
return;
}
+
+SWITCH_DECLARE(void) switch_core_session_reporting_state(switch_core_session_t *session)
+{
+ switch_channel_state_t state = switch_channel_get_state(session->channel), midstate = state;
+ const switch_endpoint_interface_t *endpoint_interface;
+ const switch_state_handler_table_t *driver_state_handler = NULL;
+ const switch_state_handler_table_t *application_state_handler = NULL;
+ int proceed = 1;
+ int global_proceed = 1;
+ int do_extra_handlers = 1;
+ int silly = 0;
+ int index = 0;
+
+ if (switch_channel_test_flag(session->channel, CF_REPORTING)) {
+ return;
+ }
+
+ switch_channel_set_flag(session->channel, CF_REPORTING);
+
+ switch_assert(session != NULL);
+
+ session->thread_running = 1;
+ endpoint_interface = session->endpoint_interface;
+ switch_assert(endpoint_interface != NULL);
+
+ driver_state_handler = endpoint_interface->state_handler;
+ switch_assert(driver_state_handler != NULL);
+
+
+ const char *var = switch_channel_get_variable(session->channel, SWITCH_PROCESS_CDR_VARIABLE);
+
+ if (!switch_strlen_zero(var)) {
+ if (!strcasecmp(var, "a_only")) {
+ if (switch_channel_get_originator_caller_profile(session->channel)) {
+ do_extra_handlers = 0;
+ }
+ } else if (!strcasecmp(var, "b_only")) {
+ if (switch_channel_get_originatee_caller_profile(session->channel)) {
+ do_extra_handlers = 0;
+ }
+ } else if (!switch_true(var)) {
+ do_extra_handlers = 0;
+ }
+ }
+
+ STATE_MACRO(reporting, "REPORTING");
+
+ return;
+}
+
/* For Emacs:
* Local Variables:
* mode:c
Modified: freeswitch/trunk/src/switch_ivr_bridge.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_bridge.c (original)
+++ freeswitch/trunk/src/switch_ivr_bridge.c Tue Apr 28 09:13:05 2009
@@ -503,32 +503,9 @@
if (!switch_channel_test_flag(channel, CF_TRANSFER) && !switch_channel_test_flag(channel, CF_REDIRECT) && bd && !bd->clean_exit
&& state != CS_PARK && state != CS_ROUTING && !switch_channel_test_flag(channel, CF_INNER_BRIDGE)) {
switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
- }
- }
-
-
- if (switch_true(switch_channel_get_variable(channel, SWITCH_COPY_XML_CDR_VARIABLE))) {
- switch_core_session_t *other_session;
- switch_channel_t *other_channel;
- switch_xml_t cdr;
- char *xml_text;
-
- if (switch_core_session_get_partner(session, &other_session) == SWITCH_STATUS_SUCCESS) {
- other_channel = switch_core_session_get_channel(other_session);
-
- switch_channel_wait_for_state(channel, other_channel, CS_REPORTING);
-
- if (switch_ivr_generate_xml_cdr(session, &cdr) == SWITCH_STATUS_SUCCESS) {
- if ((xml_text = switch_xml_toxml(cdr, SWITCH_FALSE))) {
- switch_channel_set_variable(other_channel, "b_leg_cdr", xml_text);
- switch_safe_free(xml_text);
- }
- switch_xml_free(cdr);
- }
- switch_core_session_rwunlock(other_session);
}
}
-
+
if (switch_channel_get_state(channel) == CS_EXCHANGE_MEDIA) {
switch_channel_set_state(channel, CS_RESET);
}
@@ -979,6 +956,21 @@
switch_channel_set_variable(caller_channel, SWITCH_BRIDGE_HANGUP_CAUSE_VARIABLE, switch_channel_cause2str(cause));
}
+ if (switch_channel_down(peer_channel) && switch_true(switch_channel_get_variable(peer_channel, SWITCH_COPY_XML_CDR_VARIABLE))) {
+ switch_xml_t cdr;
+ char *xml_text;
+
+ switch_channel_wait_for_state(caller_channel, peer_channel, CS_DESTROY);
+
+ if (switch_ivr_generate_xml_cdr(peer_session, &cdr) == SWITCH_STATUS_SUCCESS) {
+ if ((xml_text = switch_xml_toxml(cdr, SWITCH_FALSE))) {
+ switch_channel_set_variable(caller_channel, "b_leg_cdr", xml_text);
+ switch_safe_free(xml_text);
+ }
+ switch_xml_free(cdr);
+ }
+ }
+
switch_core_session_rwunlock(peer_session);
} else {
Modified: freeswitch/trunk/src/switch_ivr_originate.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_originate.c (original)
+++ freeswitch/trunk/src/switch_ivr_originate.c Tue Apr 28 09:13:05 2009
@@ -2045,6 +2045,8 @@
continue;
}
+ switch_channel_wait_for_state(caller_channel, switch_core_session_get_channel(originate_status[i].peer_session), CS_DESTROY);
+
if (switch_ivr_generate_xml_cdr(originate_status[i].peer_session, &cdr) == SWITCH_STATUS_SUCCESS) {
if ((xml_text = switch_xml_toxml(cdr, SWITCH_FALSE))) {
switch_snprintf(buf, sizeof(buf), "%s_%d", cdr_var, ++cdr_total);
1
0
Author: anthm
Date: Tue Apr 28 07:39:36 2009
New Revision: 13175
Log:
revert
Modified:
freeswitch/trunk/libs/apr/build/config.sub
Modified: freeswitch/trunk/libs/apr/build/config.sub
==============================================================================
--- freeswitch/trunk/libs/apr/build/config.sub (original)
+++ freeswitch/trunk/libs/apr/build/config.sub Tue Apr 28 07:39:36 2009
@@ -1,9 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
-timestamp='2005-12-11'
+timestamp='2006-07-02'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -240,7 +241,7 @@
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
@@ -248,7 +249,8 @@
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
- | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -268,16 +270,17 @@
| mn10200 | mn10300 \
| mt \
| msp430 \
+ | nios | nios2 \
| ns16k | ns32k \
| or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b \
- | strongarm \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
@@ -285,9 +288,6 @@
| z8k)
basic_machine=$basic_machine-unknown
;;
- m32c)
- basic_machine=$basic_machine-unknown
- ;;
m6811 | m68hc11 | m6812 | m68hc12)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
@@ -317,7 +317,7 @@
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* \
+ | avr-* | avr32-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
@@ -328,7 +328,7 @@
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
- | m32r-* | m32rle-* \
+ | m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
@@ -350,17 +350,18 @@
| mmix-* \
| mt-* \
| msp430-* \
+ | nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
@@ -371,8 +372,6 @@
| ymp-* \
| z8k-*)
;;
- m32c-*)
- ;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
@@ -818,6 +817,12 @@
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
@@ -1120,7 +1125,7 @@
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
- sparc | sparcv8 | sparcv9 | sparcv9b)
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
basic_machine=sparc-sun
;;
cydra)
@@ -1193,7 +1198,8 @@
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
@@ -1208,7 +1214,7 @@
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos*)
+ | -skyos* | -haiku* | -rdos* | -toppers*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1360,6 +1366,9 @@
# system, and we'll never get to this point.
case $basic_machine in
+ spu-*)
+ os=-elf
+ ;;
*-acorn)
os=-riscix1.2
;;
@@ -1369,9 +1378,9 @@
arm*-semi)
os=-aout
;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
1
0
[commit] r13174 - in freeswitch/trunk: libs/apr/build src src/mod/endpoints/mod_loopback
by FreeSWITCH SVN 28 Apr '09
by FreeSWITCH SVN 28 Apr '09
28 Apr '09
Author: anthm
Date: Mon Apr 27 22:58:37 2009
New Revision: 13174
Log:
MODENDP-215
Modified:
freeswitch/trunk/libs/apr/build/config.sub
freeswitch/trunk/src/mod/endpoints/mod_loopback/mod_loopback.c
freeswitch/trunk/src/switch_time.c
Modified: freeswitch/trunk/libs/apr/build/config.sub
==============================================================================
--- freeswitch/trunk/libs/apr/build/config.sub (original)
+++ freeswitch/trunk/libs/apr/build/config.sub Mon Apr 27 22:58:37 2009
@@ -1,10 +1,9 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-# Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-timestamp='2006-07-02'
+timestamp='2005-12-11'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -241,7 +240,7 @@
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
@@ -249,8 +248,7 @@
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
- | m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore \
+ | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -270,17 +268,16 @@
| mn10200 | mn10300 \
| mt \
| msp430 \
- | nios | nios2 \
| ns16k | ns32k \
| or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
- | spu | strongarm \
+ | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b \
+ | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
@@ -288,6 +285,9 @@
| z8k)
basic_machine=$basic_machine-unknown
;;
+ m32c)
+ basic_machine=$basic_machine-unknown
+ ;;
m6811 | m68hc11 | m6812 | m68hc12)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
@@ -317,7 +317,7 @@
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* | avr32-* \
+ | avr-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
@@ -328,7 +328,7 @@
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
- | m32c-* | m32r-* | m32rle-* \
+ | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
@@ -350,18 +350,17 @@
| mmix-* \
| mt-* \
| msp430-* \
- | nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
| sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
@@ -372,6 +371,8 @@
| ymp-* \
| z8k-*)
;;
+ m32c-*)
+ ;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
@@ -817,12 +818,6 @@
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
- pc98)
- basic_machine=i386-pc
- ;;
- pc98-*)
- basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
@@ -1125,7 +1120,7 @@
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
- sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ sparc | sparcv8 | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
cydra)
@@ -1198,8 +1193,7 @@
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -openbsd* | -solidbsd* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
@@ -1214,7 +1208,7 @@
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers*)
+ | -skyos* | -haiku* | -rdos*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1366,9 +1360,6 @@
# system, and we'll never get to this point.
case $basic_machine in
- spu-*)
- os=-elf
- ;;
*-acorn)
os=-riscix1.2
;;
@@ -1378,9 +1369,9 @@
arm*-semi)
os=-aout
;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
Modified: freeswitch/trunk/src/mod/endpoints/mod_loopback/mod_loopback.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_loopback/mod_loopback.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_loopback/mod_loopback.c Mon Apr 27 22:58:37 2009
@@ -745,6 +745,9 @@
switch_frame_t *frame = (switch_frame_t *) pop;
switch_frame_free(&frame);
}
+
+ switch_core_timer_sync(&tech_pvt->timer);
+
}
break;
default:
Modified: freeswitch/trunk/src/switch_time.c
==============================================================================
--- freeswitch/trunk/src/switch_time.c (original)
+++ freeswitch/trunk/src/switch_time.c Mon Apr 27 22:58:37 2009
@@ -327,7 +327,7 @@
int delta = (int)(private_info->reference - TIMER_MATRIX[timer->interval].tick);
/* sync up timer if it's not been called for a while otherwise it will return instantly several times until it catches up */
- if (delta < 0) {
+ if (delta < -1) {
private_info->reference = timer->tick = TIMER_MATRIX[timer->interval].tick;
}
timer_step(timer);
1
0
27 Apr '09
Author: anthm
Date: Mon Apr 27 18:36:03 2009
New Revision: 13173
Log:
parse out alert-info and call-info from infos
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Mon Apr 27 18:36:03 2009
@@ -2908,6 +2908,8 @@
const char *to_uri = switch_event_get_header(event, "to-uri");
const char *local_user_full = switch_event_get_header(event, "local-user");
const char *from_uri = switch_event_get_header(event, "from-uri");
+ const char *call_info = switch_event_get_header(event, "call-info");
+ const char *alert_info = switch_event_get_header(event, "alert-info");
const char *body = switch_event_get_body(event);
sofia_profile_t *profile = NULL;
nua_handle_t *nh;
@@ -2972,7 +2974,9 @@
nua_info(nh,
NUTAG_WITH_THIS(profile->nua),
- TAG_IF(ct, SIPTAG_CONTENT_TYPE_STR(ct)),
+ TAG_IF(ct, SIPTAG_CONTENT_TYPE_STR(ct)),
+ TAG_IF(alert_info, SIPTAG_ALERT_INFO_STR(alert_info)),
+ TAG_IF(call_info, SIPTAG_ALERT_INFO_STR(call_info)),
TAG_IF(!switch_strlen_zero(body), SIPTAG_PAYLOAD_STR(body)),
TAG_END());
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h Mon Apr 27 18:36:03 2009
@@ -107,6 +107,10 @@
#include <sofia-sip/tport_tag.h>
#include <sofia-sip/sip_extra.h>
#include "nua_stack.h"
+#include "sofia-sip/msg_parser.h"
+#include "sofia-sip/sip_parser.h"
+#include "sofia-sip/tport_tag.h"
+
typedef enum {
DTMF_2833,
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c Mon Apr 27 18:36:03 2009
@@ -35,9 +35,7 @@
*
*/
#include "mod_sofia.h"
-#include "sofia-sip/msg_parser.h"
-#include "sofia-sip/sip_extra.h"
-#include "sofia-sip/tport_tag.h"
+
extern su_log_t tport_log[];
extern su_log_t iptsec_log[];
@@ -4010,7 +4008,8 @@
if (switch_event_create(&event, SWITCH_EVENT_RECV_INFO) == SWITCH_STATUS_SUCCESS) {
-
+ sip_alert_info_t *alert_info = sip_alert_info(sip);
+
if (sip && sip->sip_content_type) {
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "SIP-Content-Type", sip->sip_content_type->c_type);
}
@@ -4046,6 +4045,16 @@
}
}
+
+ if (sip->sip_call_info) {
+ switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Call-Info", sip_header_as_string(nua_handle_home(nh), (void *) sip->sip_call_info));
+ }
+
+ if (alert_info) {
+ switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Alert-Info", sip_header_as_string(nua_handle_home(nh), (void *) alert_info));
+ }
+
+
if (sip->sip_payload && sip->sip_payload->pl_data) {
switch_event_add_body(event, "%s", sip->sip_payload->pl_data);
}
1
0
Author: mcollins
Date: Mon Apr 27 13:38:54 2009
New Revision: 13172
Log:
update changelog through april 26, 2009 (r13159)
Modified:
freeswitch/trunk/docs/ChangeLog
Modified: freeswitch/trunk/docs/ChangeLog
==============================================================================
--- freeswitch/trunk/docs/ChangeLog (original)
+++ freeswitch/trunk/docs/ChangeLog Mon Apr 27 13:38:54 2009
@@ -48,11 +48,13 @@
build: use different version file for moh version (r:13093)
build: de-couple version numbers and builds of sound files and moh files (FSBUILD-153/r:13096)
build: use sound_version.txt and moh_version.txt to determine sound file version on windows (FSBUILD-152/r:13097)
+ build: use in tree libtiff for msvc build and fix some header generation checks (r:13150)
config: default config, calling own extension no longer goes to voicemail (r:12596)
config: default config, 1000-1019 uses $${default_password} instead of hard-coded 1234 (FSCONFIG-5/r:12838)
config: tweak the configs to bind siptrace on and off to F10 and F11 (r:12938)
config: Update sample IVR to include ClueCon reg option :) (r:13043)
config: Add ext 9991 as ClueCon ext; use transfer instead of bridge on demo ivr opt #4 (r:13046)
+ config: remove invalid options from profiles (r:13153)
core: fix suncc visibility support in libteletone (r:12154-12157)
core: fix crash on FS shutdown with "..." (FSCORE-297/r:12173,12361,12402)
core: add separate mutex for state related methods (r:12191)
@@ -125,6 +127,7 @@
core: make state_handler macros not let you install the same one more than once (r:13111)
core: Do not use struct fd_set uninitialized (always FD_ZERO() them, before using FD_SET() on a new one, or reusing them after select()). Fixes a segfault on solaris (r:13125)
core: Fix missing UNPROTECT_INTERFACE in case pre_answer fails (r:13130)
+ core: add record_waste_resources channel variable to send blank audio during recording (r:13144)
docs: Fix filename references in phrase_en.xml (r:12976)
docs: Update phrase_en.xml to include v1.0.8 sound prompts (r:13041)
docs: Updates to phrase_es.xml (r:13067)
@@ -176,6 +179,7 @@
mod_commands: add show modules functionality (MODAPP-227/r:12806)
mod_commands: add echo api command (echo back exact input) and add expand api command (executes another api command with variable expansion) (r:13101,13102)
mod_commands: add "stun" fsapi command (r:13137)
+ mod_commands: mod_commands: if no bind ip specified for stun fsapi command, use the guess ip (r:13140)
mod_conference: fix read terminating on single digit when called from a meta-app inside a conference (MODAPP-226/r:12466)
mod_conference: recording members should be invisible to commands (MODAPP-233/r:12582)
mod_conference: add lock caller_control (r:12787)
@@ -228,6 +232,9 @@
mod_loopback: fix loopback channels that stay alive (FSCORE-349/r:12944,12953)
mod_loopback: flush queued frames on audio sync event (r:13018)
mod_loopback: autoflush these channels that use queues (r:13057)
+ mod_loopback: pass flush indications across to the b leg (r:13146)
+ mod_loopback: make mod_loopback render silence to prevent livelock (r:13147)
+ mod_loopback: drop excess frames on loopback channel (r:13156,13157,13158)
mod_memcache: add new module, mod_memcache; API for memcached (r:12871)
mod_memcache: make -ERR for API call less verbose (r:12949)
mod_memcache: add hook reloadxml event (r:12950)
@@ -305,6 +312,7 @@
mod_sofia: add calls count and failed calls count to sofia profile sorted by direction (r:13103)
mod_sofia: only pass 2833 while bridged and while bridged to another channel that uses our RTP stack (r:13131)
mod_sofia: send-message-query-on-register profile param, set it to false to disable default of true (r:13139)
+ mod_sofia: fix segfault in sofia xmlstatus profile command (MODENDP-214/r:13141)
mod_spy: add new module, mod_spy (MODAPP-260/r:13035,13036)
mod_syslog: Keep the indent string in memory (LOGGER-1/r:12852)
mod_t38gateway: Introduction of the skeleton of a media bug implementing a T.38 gateway, so the
@@ -318,6 +326,7 @@
mod_voicemail: add parameter "login-keys" to allow user to customize which key is used to log in (MODAPP-251/r:12916)
mod_voicemail: change len to seconds (r:13127)
mod_voicemail: message-query-exact-match global param in settings section of voicemail to assume profile names match domain names (r:13138)
+ mod_voicemail: allow unload and reload of mod_voicemail (MODAPP-177/r:13145)
mod_xml_curl: fix data fetch (MODXMLINT-48/r:12586)
sofia-sip: su.h - define su_family via struct sockaddr (r:12260)
sofia-sip: sip_parser.c - fixed sip_transport_d() (r:12261)
1
0
Author: mcollins
Date: Mon Apr 27 13:29:14 2009
New Revision: 13171
Log:
add changelog items since 1.0.3 through r13139 (part deux)
Modified:
freeswitch/trunk/docs/ChangeLog
Modified: freeswitch/trunk/docs/ChangeLog
==============================================================================
--- freeswitch/trunk/docs/ChangeLog (original)
+++ freeswitch/trunk/docs/ChangeLog Mon Apr 27 13:29:14 2009
@@ -1,5 +1,5 @@
freeswitch (1.0.4)
-
+
add: TextMate bundle for FreeSWITCH - thanks mrene (r:12559-12560)
all: numerous code cleanups, removal of unused variables
all: update numerous Doxygen comments
@@ -58,8 +58,272 @@
core: add separate mutex for state related methods (r:12191)
core: move media bug removal to hangup state (r:12225)
core: create indexes for ODBC (r:12235)
- core: add direction col to sql db, add direction param to session_c
-
+ core: add direction col to sql db, add direction param to session_create, log DTMF digits to digits_dialed variable for CDR (r:12244)
+ core: avoid operations on closed file handles in embedded languages (r:12255)
+ core: fix bridging issue from r:12244 (FSCORE-308/r:12257)
+ core: fix segfault after 2000 calls, 5 days uptime (FSCORE-309/r:12267-12270)
+ core: fix crash in switch_ivr_digit_stream_parser_feed (MODAPP-221/r:12262)
+ core: fix issue in monitor_early_media_fail (r:12271)
+ core: fix leak in switch_event.c (r:12291-12292)
+ core: clean up ivr_menu, prevent recursion (r:12295)
+ core: improve memory usage (r:12317)
+ core: fix leak in switch_ivr_async.c (r:12330)
+ core: fix leak in switch_channel.c (r:12332)
+ core: uuid_displace stopped working when limit arg used (MODAPP-225/r:12368)
+ core: fix att_xfer media bug problem (FSCORE-317/r:12390)
+ core: improve stability (FSCORE-297/FSCORE-305/FSCORE-315/r:12392,12403)
+ core: add new state for CDR and leg_delay_start originate var (r:12403-12404)
+ core: Make MESSAGE work with SIP PATH Exension (FSCORE-310/r:12426)
+ core: fix uninitialized mutex in switch_core_media_bug (FSCORE-320/r:12428)
+ core: fix segfault with eavesdrop (FSCORE-319/r:12429)
+ core: add generic config parser - thanks mrene (r:12432)
+ core: add sessions since start up to heartbeat event (r:12472)
+ core: increase buffer size for regex api (MODAPP-228/r:12480)
+ core: fix FreeSWITCH start failure - "Error: stacksize 240 is too large" (FSCORE-323/r:12509)
+ core: unloading endpoint module now removes from endpoint list (MODENDP-196/r:12535)
+ core: fix deadlock in fsctl hupall (r:12544)
+ core: add origination_pricavy var to originate api (r:12546)
+ core: increase stack limit for switch_system (FSCORE-328/r:12569)
+ core: fix uuid_originate param not assigning uuid properly (FSCORE-322/r:12591)
+ core: add check for a and b leg no answer on bridge (r:12595)
+ core: fix origination_privacy var (r:12603)
+ core: fix group_confirm regression from svn r12403 (r:12616)
+ core: fix caller ID values not being set in CHANNEL_OUTGOING (FSCORE-336/r:12643)
+ core: make -vg imply -waste so valgrind runs won't re-exec (r:12670)
+ core: add apr_pool_mutex_set() to our apr to fix thread-saftey issue (r:12672)
+ core: make port allocator more random (r:12673,12675)
+ core: make switch_channel_get_variable strdup so the pointer returned is safe and clean up the state locking (r:12674)
+ core: Empty audio files should not be created when RECORD_ANSWER_REQ is set to true and a call is not bridged (r:12682)
+ core: add transfer_after_bridge var (r:12691)
+ core: other_leg_unique_id incorrectly set when briding with using ',' (FSCORE-331/r:12704)
+ core: make gaussian noise less noisy (FSCORE-340/r:12720)
+ core: add import vars to FIFO (r:12722)
+ core: fix switch_core_file_write method not writing the entire buffer to the file (FSCORE-341/r:12728)
+ core: fix hanguphook order of operations vs destroy method issue in c++ code (r:12730)
+ core: rearrange hangup callflow to do more work in the session's own thread (r:12784)
+ core: Allow variables containing variables in set and export (MODAPP-241/r:12804)
+ core: add read_terminator_used var (r:12840)
+ core: change blocking rtp to psuedo-blocking to avoid endlessly blocking reads and refactor jitter buffer (r:12846)
+ core: add rtp-autoflush profile param and rtp_autoflush var (r:12854)
+ core: fix various small leaks (FSCORE-347/r:12873)
+ core: add a couple, two tree stats (r:12913)
+ core: fix play_and_get_digits to unset the var if the regex didn't match (r:12921)
+ core: drop divide by 2 from normalize func (r12935)
+ core: add missing begin/end, allow threads to read and play_and_get_digits methods (r:12958)
+ core: fix windows calling conventions for modules with sub-modules broken in svn r12919 (r:12960)
+ core: add flag to denote if a codec is init or not (FSCORE-349/r:12961)
+ core: add more specific checks to new macro just to be safe (r:12973)
+ core: change CS_DONE to CS_DESTROY and add state handler for destroy and tear down critical parts of the channel from this method which is not called until it's impossible for anything to be referencing the channel (after final write lock and before destroying the pool) (r:12986)
+ core: fix regression from earlier commit (FSCORE-352/r:12987)
+ core: expand channel variables for sound files in IVRs (MODAPP-257/r:13005)
+ core: clone frames in loopback so we can smooth it out better, now with more memory usage (tm) maybe this will curb pepople from using it like candy (r:13011)
+ core: run expand_vars if input contains a special escaped character not just when it contains a variable to eat up back slashes (r:13015)
+ core: change names to be more explicit (r:13028)
+ core: xml_config: Fix issue where default NULL strings were ignored on reload (r:13052)
+ core: autoflush on bridge and add bridge_hangup_cause variable to indicate the hangup cause of the last bridged channel (r:13065)
+ core: add record_ms, record_samples, playback_ms and playback_samples chanvars (r:13105)
+ core: make state_handler macros not let you install the same one more than once (r:13111)
+ core: Do not use struct fd_set uninitialized (always FD_ZERO() them, before using FD_SET() on a new one, or reusing them after select()). Fixes a segfault on solaris (r:13125)
+ core: Fix missing UNPROTECT_INTERFACE in case pre_answer fails (r:13130)
+ docs: Fix filename references in phrase_en.xml (r:12976)
+ docs: Update phrase_en.xml to include v1.0.8 sound prompts (r:13041)
+ docs: Updates to phrase_es.xml (r:13067)
+ docs: Latest revision of Spanish prompts file (r:13115)
+ formats: add mod_portaudio_stream to get audio from any dev (MODFORM-25/r:12178)
+ fs_cli: fix solaris build (r:12160)
+ ivr: make tts-engine and tts-voice valid attributes on the menu xml (r:12278)
+ libdingaling: hijack gcrypt init call to fix threadsafe race in dingaling and fix buffer overrun in iksemel (r:12575)
+ libdingaling: add ldl_handle_running (r:13085)
+ libdingaling: add a function to check for connected and authorized (r:13100)
+ libdingaling: fix auto-restart on disconnect (r:13134)
+ libesl: add api, bgapi methods (r:12179)
+ libesl: add ruby example (r:12180)
+ libesl: add python example (r:12184)
+ libesl: fix missing Event-Name param (MODEVENT-39/r:12311)
+ libesl: example of using esl to get events for ASR (r:12344)
+ libesl: improved filter handling (r:12488-12489)
+ libesl: fix ESL segfault when bgapi is called twice and BACKGROUD_JOB events are subscribed (ESL-5/r:12525)
+ libesl: fix illegal free when invalid bgapi originate args (ESL-8/r:12623)
+ libesl: add disconnect method; add ivrd (r:12724)
+ libesl: add command line args to single_command.py example (ESL-9/r:12729)
+ libesl: check in ESL::IVR perl mod (r:12760)
+ libesl: fix ruby linking on debian (ESL-7/r:12805)
+ libesl: fix esl coredumps in esl_event_serialize when using sendEvent from PHP (ESL-11/r:12884)
+ libesl: add event name when sending (r:12889)
+ libesl: add ESL::IVR::setVar from intralanman (r:12917)
+ libesl: fix ESL/IVR to include the regex (r:12921)
+ libesl: fix ctrl-D in fs_cli not to exit unless cmd line is empty (ESL-13/r:12952)
+ libesl: fix undef check (r:13012)
+ libesl: kill zombies (r:13013)
+ libesl: don't double encode events when sending them (r:13078)
+ libesl: adding sendevent example for esl perl (r:13079)
+ libiksemel: let return 0 be a failure on read in iks to avoid cpu race (r:13123,13124,13133)
+ libsndfile: add executable permissions to libs/libsndfile/src/create_symbols_file.py (FSBUILD-134/r:12535)
+ libsofiasip: Fix compile time out-of-bounds error in su_uniqueid.c (SFSIP-136/r:12914)
+ libsofiasip: make info work out of dialog (r:13087)
+ libspandsp: update to snapshot spandsp-20090421 (r:13086)
+ libspeex: Add visibility support for suncc on solaris (r:13117,13118)
+ libteletone: update api visibility macros for windows
+ libtiff: add libtiff, v3.8.2
+ libxmlrpc: add select to read socket in abyss so we can timeout (r:13107)
+ mod_cidlookup: add new module, mod_cidlookup (r:12990)
+ mod_cidlookup: switch to using CURL instead of mod_http (r:12992)
+ mod_cidlookup: add config file (r:12994)
+ mod_cidlookup: set initial value for status (r:13029)
+ mod_clue_choo: add new module, mod_clue_choo (r:13068,13069,13070)
+ mod_commands: Add show api [name] and show application [name] (r:12296)
+ mod_commands: fix header_string "key" from being set twice from SWITCH_STANDARD_API(user_data_function) (MODAPP-242/r:12786)
+ mod_commands: add show modules functionality (MODAPP-227/r:12806)
+ mod_commands: add echo api command (echo back exact input) and add expand api command (executes another api command with variable expansion) (r:13101,13102)
+ mod_commands: add "stun" fsapi command (r:13137)
+ mod_conference: fix read terminating on single digit when called from a meta-app inside a conference (MODAPP-226/r:12466)
+ mod_conference: recording members should be invisible to commands (MODAPP-233/r:12582)
+ mod_conference: add lock caller_control (r:12787)
+ mod_conference: only first call to a conf requires a profile; fix bgdial (MODAPP-245/r:12809)
+ mod_conference: add conference_enforce_security variable to bypass or require pin or locked flag (r:12863)
+ mod_conference: clean up pin prommpting and make local override stay local (r:12864)
+ mod_conference: keep new conference locked the whole time during transfer (r:12988)
+ mod_conference: allow setting the moh_sound from a variable (r:13042)
+ mod_conference: set perpetual_sound from channel var (r:13048)
+ mod_conference: increase sanity timer for conference auto-record to 120 seconds (r:13104)
+ mod_conference: serialize (r:13116)
+ mod_console: Fix mod_console (missing FD_ZERO before FD_SET) (r:13126)
+ mod_dahdi_codec: delay init of resources until the first time they are actually used to avoid unnecessary waste of resources in hardware codec (r:12962)
+ mod_dingaling: fix crash when unloading/reload mod_dingaling (LBDING-13/r:12612)
+ mod_dingaling: fix no sound if phone picked up after 5th dingaling on Gtalk client (MODENDP-198/r:12641)
+ mod_dingaling: fix core dump when calling Gtalk enabled FS using leg_timeout (MODENDP-199/r:12641)
+ mod_dingaling: dl_login command line Usage and parameter doesn't match (MODENDP-202/r:12680)
+ mod_dingaling: fix unload mod_dingaling core dump (MODENDP-204/r:12680)
+ mod_dptools: prevent system crash when "user" in originate dialstring (FSCORE-313/r:12395)
+ mod_dptools: added sched_heartbeat and enable_heartbeat dialplan apps (r:12491)
+ mod_dptools: fix b & c legs not bridging when attended transfer used (FSCORE-334/r:12649)
+ mod_dptools: Custom events fired from event application bypass filtering mechanism (MODAPP-249/r:12894)
+ mod_dptools: change inline limit from 4 to 128 apps (MODAPP-253/r:12957)
+ mod_enum: fix enum_auto_route (MODAPP220/r:12243)
+ mod_erlang_event: Bind to 0.0.0.0 instead of 127.0.0.1 by default; like most erlang nodes do. (r:12249)
+ mod_erlang_event: Reply appropriately to net_adm:ping() (r:13066)
+ mod_erlang_event: snprintf needs a format string too, and write has the warn_unused_result attribute set, so store the return value somewhere (r:13090)
+ mod_event_socket: disallow unloading mod_event_socket from event socket (r:12326,12334)
+ mod_event_socket: fix api_exec crash on OSX (MODEVENT-40,r:12349)
+ mod_event_socket: move connect command to always work on outbound socket not just the first time (r:12723)
+ mod_fifo: consumer callback waiting an option in fifo.conf.xml (r:12685)
+ mod_fifo: add fire events on bridge in fifo (r:12791)
+ mod_fifo: fix fifo re-parse crash (FSCORE-343/r:12855)
+ mod_fifo: fix uuid_transfer into mod_conference audio issue (MODAPP-259/r:13030)
+ mod_fifo: add fifo_orbit_dialplan and fifo_orbit_context vars (MODAPP-189/r:13038)
+ mod_fifo: don't do wrapup when agent is in nowait mode or call has ended (r:13094)
+ mod_flite: three new voices - rms, awb (male), slt (female) (r:12166)
+ mod_iax: make mod_iax async (r:13021)
+ mod_iax: autoflush these channels that use queues (r:13057)
+ mod_lcr: allow channel vars in custom_sql (r:12198)
+ mod_limit: Add events and a shutdown function (r:12497)
+ mod_limit: close odbc handle (r:12632)
+ mod_limit: Add more error checking to hash api/app (r:13007)
+ mod_limit: prevent multiple bindings of the same event_hooks to make code simpler in mod_limit (MODAPP-264/r:13113)
+ mod_lua: windows build changes to support externally built modules. (MODLANG-101/r:12237)
+ mod_lua: fix visibility support (FSCORE-302/r:12239-12240)
+ mod_lua: fix windows build (FSBUILD-149/r:12919)
+ mod_loopback: mod_lopback: other_loopback _leg_uuid variables are sometimes unset while executing the dialplan (MODENDP-210/r:12905)
+ mod_loopback: destroy codec (r:12936)
+ mod_loopback: fix loopback channels that stay alive (FSCORE-349/r:12944,12953)
+ mod_loopback: flush queued frames on audio sync event (r:13018)
+ mod_loopback: autoflush these channels that use queues (r:13057)
+ mod_memcache: add new module, mod_memcache; API for memcached (r:12871)
+ mod_memcache: make -ERR for API call less verbose (r:12949)
+ mod_memcache: add hook reloadxml event (r:12950)
+ mod_memcache: unbind the reloadxml event handler on shutdown (r:12954)
+ mod_memcache: Fix C99 error, move var declaration out of the "for()" statement (no -std=c99?) (r:12959)
+ mod_memcache: cleanup xml config handling (r:13050,13051)
+ mod_nibblebill: mod_nibblebill question: DB Error while updating cash (MODAPP-229/r:12907)
+ mod_nibblebill: Updated mod_nibblebill to work properly w/ postgres fields (r:13031)
+ mod_opal: Fixed transmission of Q.931 Calling-Party-Number, and DisplayName on H.323 Setup (r:12347)
+ mod_opal: allocate frame from session pool so it will not go out of scope (r:12811)
+ mod_opal: disable visibility support broken in newer gcc (MODENDP-190/r:12923)
+ mod_opal: add dtmf method to mod_opal (r:13002)
+ mod_opal: Applied patch to fix some race conditions on call termination (r:13014)
+ mod_opal: prevent endless loop (r:13034)
+ mod_opal: Fixed ability to send a string as user indications (DTMF) (r:13049)
+ mod_opal: try to flag CNG frames (MODOPAL-6/r:13098)
+ mod_perl: Libtool build fix for mod_perl: use LIBTOOL_LIB_EXTEN to make libtool-2.2 happy and CXXLINK since we are linking a C++ lib (r:13080)
+ mod_pocketsphinx: Revamp mod_pocketsphinx to use jsgf format (r:12224)
+ mod_portaudio: fix audio issue in portaudio (r:12669)
+ mod_python: fix core dump when using startup script (MODLANG-106/r:12648)
+ mod_python: fix python failing during loading startup modules (MODLANG-105/r:12658)
+ mod_python: fix EventConsumer::pop() can deadlock mod_python (MODLANG-109/r:12849)
+ mod_say_en: fix missing "at" in time readback, change from cardinal to ordinal numbers on dates, e.g. "January 20th" vs. "January 20" (MODAPP-263/r:13099)
+ mod_say_es: Add stub phrase_es.xml (r:13019)
+ mod_say_ru: add Russian language say module and config files (r:12966-12971)
+ mod_say_ru: change encoding on phrase_ru.xml from cp1251 to utf8 (r:12974)
+ mod_say_ru: add .wav and small fix (r:13000)
+ mod_say_ru: change char million,thousand to enum (r:13009)
+ mod_say_ru: rename currency (r:13024)
+ mod_say_ru: change dollars and cents to rubles and kopecks (r:13025)
+ mod_say_ru: add ru_ip (r:13026)
+ mod_say_ru: Update phrase_ru.xml to include v1.0.8 sound prompts (r:13044,13045)
+ mod_skel: add more example code and info (r:12459)
+ mod_skypiax: move to trunk (r:12167)
+ mod_skypiax: fix hang on invalid mod_skypiax.conf.xml (MODSKYPIAX-21/r:12320-12322,12343)
+ mod_skypiax: modified configs/startskype.sh to specify which unix user will start the Skype client instance (r:12937)
+ mod_skypiax: fixed assignment before declaration on Windows VC++ (r:12956)
+ mod_skypiax: great startup speedup in Windows (using only one Broadcast sendmessage for each interface hunting) (r:13083)
+ mod_spidermonkey: fix segfaults on dtmf callback (FSCORE-327/r:12577)
+ mod_spidermonkey: fix error loading mod_spidermonkey due to missing PR_* symbols (r:12934,12939)
+ mod_spidermonkey: add destroy method to js (r:13016)
+ mod_spidermonkey: Let session.destroy() take the cause as a string too (r:13020)
+ mod_sofia: allow you to set invite, to and from params independently (r:12287)
+ mod_sofia: allow add params to a contact that isn't a gateway (r:12289)
+ mod_sofia: add sip_route_uri var to set proxy route (r:12408)
+ mod_sofia: add sip_send_to Sofia dial param (MODEND-195/r:12409)
+ mod_sofia: add siptrace on/off to sofia command (r:12410,12412)
+ mod_sofia: add network_ip and network_port to registration ODBC table and registration event (MODENDP-194/r:12414)
+ mod_sofia: add configurable outgoing cid types (r:12427)
+ mod_sofia: send SIP INFO DTMF to the bridged leg in bypass media mode (FSCORE-263)
+ mod_sofia: add extension-in-contact param for rare cases when provider makes you say a certain contact user (r:12511)
+ mod_sofia: add contact-host param to gateways (r:12531)
+ mod_sofia: add sip_from_display var and fix backwards switch_strisr calls (r:12566)
+ mod_sofia: remove Redundant NTATAG_DEFAULT_PROXY (MODENDP-197/r:12583)
+ mod_sofia: reset rtp timer on unhold operation (r:12617)
+ mod_sofia: fix G.722 call with broken ptime triggers crash after transfer between contexts (FSCORE-337/r:12647)
+ mod_sofia: fix presence subscription not automatically refreshed due to wrong Contact in 202 (refer accepted) response. (MODENDP-201/r:12657)
+ mod_sofia: fix random segfaults (FSCORE-322/r:12676)
+ mod_sofia: fix registration issue (r:/12715)
+ mod_sofia: add username and realm to sip db (r:12785)
+ mod_sofia: fix subscriptions being checked even though it belongs to other host (MODAPP-207/r:12792)
+ mod_sofia: reduce exponential mwi notifies (r:12801)
+ mod_sofia: don't auto-disable, just warn on RFC2833 in transcoded call (r:12815)
+ mod_sofia: add 603 for now (r:12883)
+ mod_sofia: make nat options ping configurable and leave it off by default (r:12897)
+ mod_sofia: continue_on_fail broken on SVN12881 (MODENDP-209/r:12902)
+ mod_sofia: add rtp-autofix-timing (defauts to true even when not present) set to false to disable it (FSCORE-281/r:12903,12904)
+ mod_sofia: add set r_sdp_codec_string to list of codecs offered in inbound call dsp (MODENDP-206/r:12946)
+ mod_sofia: add sip_call_info variable (SFSIP-138/r:12977)
+ mod_sofia: move rtp stats up to where they will be more useful (r:13017)
+ mod_sofia: fix FreeSWITCH/SIPX transfer issue (SFSIP-86/r:13032)
+ mod_sofia: ndlb_sendrecv_in_session var NDLB-sendrecv-in-session profile option to reverse the effects of MODENDP-148 (r:13084)
+ mod_sofia: add sip info to event_socket gateway (r:13088)
+ mod_sofia: switch_add_event_header needs a format specifier, or >=gcc-4.3 will be very unhappy (r:13089)
+ mod_sofia: add calls count and failed calls count to sofia profile sorted by direction (r:13103)
+ mod_sofia: only pass 2833 while bridged and while bridged to another channel that uses our RTP stack (r:13131)
+ mod_sofia: send-message-query-on-register profile param, set it to false to disable default of true (r:13139)
+ mod_spy: add new module, mod_spy (MODAPP-260/r:13035,13036)
+ mod_syslog: Keep the indent string in memory (LOGGER-1/r:12852)
+ mod_t38gateway: Introduction of the skeleton of a media bug implementing a T.38 gateway, so the
+ related infrastructure work can take place around it (r:13082)
+ mod_voicemail: remove endless loop on leaving message (MODAPP-233,r:12315-12316)
+ mod_voicemail: add indexes to mod_voicemail (r:12341)
+ mod_voicemail: fix audio cutoffs in voicemail_leave_main (MODAPP-225/r:12367)
+ mod_voicemail: fix profile id mismatch when changing password via menu (MODAPP-236/r:12602)
+ mod_voicemail: fix incorrect (NULL) recipient stored for VM on dynamic binding of FS directory. (MODAPP-240/r:12850)
+ mod_voicemail: fix segfault on vm_boxcount when box has "sip:" prefix (MODAPP-250/r:12915)
+ mod_voicemail: add parameter "login-keys" to allow user to customize which key is used to log in (MODAPP-251/r:12916)
+ mod_voicemail: change len to seconds (r:13127)
+ mod_voicemail: message-query-exact-match global param in settings section of voicemail to assume profile names match domain names (r:13138)
+ mod_xml_curl: fix data fetch (MODXMLINT-48/r:12586)
+ sofia-sip: su.h - define su_family via struct sockaddr (r:12260)
+ sofia-sip: sip_parser.c - fixed sip_transport_d() (r:12261)
+ spandsp: update to snapshot 20090308 (r:12514)
+ support: Add print_list gdb macro (r:12687)
+
freeswitch (1.0.3)
1
0
Author: mcollins
Date: Mon Apr 27 13:24:07 2009
New Revision: 13170
Log:
add changelog items since 1.0.3 through r13139
Modified:
freeswitch/trunk/docs/ChangeLog
Modified: freeswitch/trunk/docs/ChangeLog
==============================================================================
--- freeswitch/trunk/docs/ChangeLog (original)
+++ freeswitch/trunk/docs/ChangeLog Mon Apr 27 13:24:07 2009
@@ -1,3 +1,66 @@
+freeswitch (1.0.4)
+
+ add: TextMate bundle for FreeSWITCH - thanks mrene (r:12559-12560)
+ all: numerous code cleanups, removal of unused variables
+ all: update numerous Doxygen comments
+ build: fix mod_flite (FSBUILD-126/r:12153)
+ build: fix getlib.sh curl/wget detection (12175)
+ build: add msvc 2005 project files (r:12197)
+ build: rename spandsp project files windows (r:12195)
+ build: fix spandsp windows build, msvc 2005 (r:12199-12202)
+ build: merge x64 build for msvc9 (r:12207)
+ build: add libtiff auto-download to msvc build (r:12212)
+ build: update to match spandsp api (FSBUILD-129/r:12214)
+ build: inital work on x64 windows build (FSBUILD-125/r:12215)
+ build: fix spandsp msvc build issues (r:12218-12220,12223)
+ build: fix msvc configuration manager for x64 targets in both 2008 sln files (r:12227)
+ build: use compiler intrinsics for windows x64 build (FSBUILD-131/r:12245)
+ build: fix version generator on windows (FSBUILD-115/FSBUILD-69/r:12247)
+ build: fix various msvc build issues (r:12272-12276)
+ build: silence nuisance sun cc warnings (r:12462)
+ build: updated windows projects for flite (FSBUILD-128/FSBUILD-133/r:12477)
+ build: download flite from right tarball location (FSBUILD-135/r:12482)
+ build: rework Windows build for pocketsphinx 5.1 (MODASRTTS-13/r:12483,12541)
+ build: fix automake 1.7 build (r:12487)
+ build: build path cleanups (FSBUILD-130/r:12490)
+ build: fix rebuild every time on msvc 2008 non team editions (FSBUILD-132/r:12492)
+ build: add skypiax to sln file and fix some warnings (r:12502)
+ build: fixed openzap.conf issue in deb package (r:12506)
+ build: fix rlim_t build on Mac (FSCORE-325/r:12533)
+ build: Solaris doesn't define RLIMIT_NPROC (FSCORE-326/r:12534)
+ build: removal of file reference for flite (FSBUILD-139/r:12540)
+ build: integrate mod_erlang_event into the buildsystem (FSBUILD-142/r:12587)
+ build: Fix FreeBSD build (r:12678)
+ build: fix libsoundtouch build dependencies after a configure failure (MODAPP-243/r:12783)
+ build: fix odbc detection to not try to use odbc when no headers are installed (r:12788)
+ build: add build of fs_ivrd (r:12843)
+ build: sphinx downloads for windows (FSBUILD-146/r:12853)
+ build: Build fails at bootstrap with libtool 2.2.6a (FSBUILD-82/r:12899)
+ build: add python build dependency to debian package build (FSBUILD-145/r:12920)
+ build: add libtool major version detection to configure in prep for supporting both libtool 2.x and 1.5.x at the same time (r:12922,12926-27)
+ build: fix older gcc build (FSBUILD-150/r:12924)
+ build: Add a fallback check in case libtool is not yet available in the builddir (get the version from build/config/ltmain.sh instead). print an error message and exit configure if that fails too (r:12933)
+ build: Add mod_memcache (commented) to modules.conf.in (r:12955)
+ build: make libtool version detection more robust (r:12979)
+ build: we need DYNAMIC_LIB_EXTEN for mod_perl and others (r:13023)
+ build: add mod_say_ru to modules.conf.in (r:13037)
+ build: bump sounds version (r:13040)
+ build: use different version file for moh version (r:13093)
+ build: de-couple version numbers and builds of sound files and moh files (FSBUILD-153/r:13096)
+ build: use sound_version.txt and moh_version.txt to determine sound file version on windows (FSBUILD-152/r:13097)
+ config: default config, calling own extension no longer goes to voicemail (r:12596)
+ config: default config, 1000-1019 uses $${default_password} instead of hard-coded 1234 (FSCONFIG-5/r:12838)
+ config: tweak the configs to bind siptrace on and off to F10 and F11 (r:12938)
+ config: Update sample IVR to include ClueCon reg option :) (r:13043)
+ config: Add ext 9991 as ClueCon ext; use transfer instead of bridge on demo ivr opt #4 (r:13046)
+ core: fix suncc visibility support in libteletone (r:12154-12157)
+ core: fix crash on FS shutdown with "..." (FSCORE-297/r:12173,12361,12402)
+ core: add separate mutex for state related methods (r:12191)
+ core: move media bug removal to hangup state (r:12225)
+ core: create indexes for ODBC (r:12235)
+ core: add direction col to sql db, add direction param to session_c
+
+
freeswitch (1.0.3)
build: add targets cd-sounds[-install] and cd-moh[-install] for 48k sounds (r:11151)
1
0
27 Apr '09
Author: brian
Date: Mon Apr 27 13:18:29 2009
New Revision: 13169
Log:
add contact lookup for lazy ppl
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Mon Apr 27 13:18:29 2009
@@ -2875,7 +2875,7 @@
switch_assert(id);
contact = sofia_glue_get_url_from_contact(buf, 0);
-
+
if ((p = strstr(contact, ";fs_"))) {
*p = '\0';
}
@@ -2906,32 +2906,60 @@
const char *profile_name = switch_event_get_header(event, "profile");
const char *ct = switch_event_get_header(event, "content-type");
const char *to_uri = switch_event_get_header(event, "to-uri");
+ const char *local_user_full = switch_event_get_header(event, "local-user");
const char *from_uri = switch_event_get_header(event, "from-uri");
const char *body = switch_event_get_body(event);
- sofia_profile_t *profile;
+ sofia_profile_t *profile = NULL;
nua_handle_t *nh;
+ char *local_dup = NULL;
+ char *local_user, *local_host;
+ char buf[1024] = "";
+ char *p;
+
if (!profile_name) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Missing Profile Name\n");
- return;
+ goto done;
}
- if (!to_uri) {
+ if (!to_uri && !local_user_full) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Missing To-URI header\n");
- return;
+ goto done;
}
if (!from_uri) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Missing From-URI header\n");
- return;
+ goto done;
}
if (!(profile = sofia_glue_find_profile(profile_name))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't find profile %s\n", profile_name);
- return;
+ goto done;
}
+
+ if (local_user_full) {
+ local_dup = strdup(local_user_full);
+ local_user = local_dup;
+ if ((local_host = strchr(local_user, '@'))) {
+ *local_host++ = '\0';
+ }
+
+ if (!local_user || !local_host || !sofia_reg_find_reg_url(profile, local_user, local_host, buf, sizeof(buf))) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't find local user\n");
+ goto done;
+ }
+
+ to_uri = sofia_glue_get_url_from_contact(buf, 0);
+
+ if ((p = strstr(to_uri, ";fs_"))) {
+ *p = '\0';
+ }
+
+ }
+
+
nh = nua_handle(profile->nua,
NULL,
NUTAG_URL(to_uri),
@@ -2948,8 +2976,14 @@
TAG_IF(!switch_strlen_zero(body), SIPTAG_PAYLOAD_STR(body)),
TAG_END());
-
- sofia_glue_release_profile(profile);
+
+ if (profile) {
+ sofia_glue_release_profile(profile);
+ }
+
+ done:
+
+ switch_safe_free(local_dup);
}
break;
1
0
Author: anthm
Date: Mon Apr 27 13:02:44 2009
New Revision: 13168
Log:
send content len with body in esl sendevent
Modified:
freeswitch/trunk/libs/esl/src/esl_event.c
Modified: freeswitch/trunk/libs/esl/src/esl_event.c
==============================================================================
--- freeswitch/trunk/libs/esl/src/esl_event.c (original)
+++ freeswitch/trunk/libs/esl/src/esl_event.c Mon Apr 27 13:02:44 2009
@@ -524,7 +524,7 @@
}
if (blen) {
- snprintf(buf + len, dlen - len, "\n%s", event->body);
+ snprintf(buf + len, dlen - len, "Content-Length: %d\n\n%s", (int)strlen(event->body), event->body);
} else {
snprintf(buf + len, dlen - len, "\n");
}
1
0