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
January 2009
- 20 participants
- 514 discussions
[Freeswitch-svn] [commit] r11570 - in freeswitch/trunk/src: . include mod/languages/mod_java mod/languages/mod_lua mod/languages/mod_managed mod/languages/mod_perl mod/languages/mod_python
by FreeSWITCH SVN 30 Jan '09
by FreeSWITCH SVN 30 Jan '09
30 Jan '09
Author: anthm
Date: Fri Jan 30 17:19:38 2009
New Revision: 11570
Log:
FSCORE-282
Modified:
freeswitch/trunk/src/include/switch_cpp.h
freeswitch/trunk/src/mod/languages/mod_java/switch_swig_wrap.cpp
freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_wrap.cpp
freeswitch/trunk/src/mod/languages/mod_managed/freeswitch_wrap.cxx
freeswitch/trunk/src/mod/languages/mod_perl/mod_perl_wrap.cpp
freeswitch/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp
freeswitch/trunk/src/switch_cpp.cpp
Modified: freeswitch/trunk/src/include/switch_cpp.h
==============================================================================
--- freeswitch/trunk/src/include/switch_cpp.h (original)
+++ freeswitch/trunk/src/include/switch_cpp.h Fri Jan 30 17:19:38 2009
@@ -337,7 +337,7 @@
SWITCH_DECLARE(void) waitForAnswer(CoreSession *calling_session);
- SWITCH_DECLARE(void) execute(char *app, char *data = NULL);
+ SWITCH_DECLARE(void) execute(const char *app, const char *data = NULL);
SWITCH_DECLARE(void) sendEvent(Event * sendME);
Modified: freeswitch/trunk/src/mod/languages/mod_java/switch_swig_wrap.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_java/switch_swig_wrap.cpp (original)
+++ freeswitch/trunk/src/mod/languages/mod_java/switch_swig_wrap.cpp Fri Jan 30 17:19:38 2009
@@ -2906,7 +2906,7 @@
arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
if (!arg3) return ;
}
- (arg1)->execute(arg2,arg3);
+ (arg1)->execute((char const *)arg2,(char const *)arg3);
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
}
@@ -2925,7 +2925,7 @@
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
if (!arg2) return ;
}
- (arg1)->execute(arg2);
+ (arg1)->execute((char const *)arg2);
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
}
Modified: freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_wrap.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_wrap.cpp (original)
+++ freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_wrap.cpp Fri Jan 30 17:19:38 2009
@@ -6589,8 +6589,8 @@
SWIG_check_num_args("execute",3,3)
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("execute",1,"CoreSession *");
- if(!lua_isstring(L,2)) SWIG_fail_arg("execute",2,"char *");
- if(!lua_isstring(L,3)) SWIG_fail_arg("execute",3,"char *");
+ if(!lua_isstring(L,2)) SWIG_fail_arg("execute",2,"char const *");
+ if(!lua_isstring(L,3)) SWIG_fail_arg("execute",3,"char const *");
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
SWIG_fail_ptr("CoreSession_execute",1,SWIGTYPE_p_CoreSession);
@@ -6598,7 +6598,7 @@
arg2 = (char *)lua_tostring(L, 2);
arg3 = (char *)lua_tostring(L, 3);
- (arg1)->execute(arg2,arg3);
+ (arg1)->execute((char const *)arg2,(char const *)arg3);
SWIG_arg=0;
return SWIG_arg;
@@ -6618,14 +6618,14 @@
SWIG_check_num_args("execute",2,2)
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("execute",1,"CoreSession *");
- if(!lua_isstring(L,2)) SWIG_fail_arg("execute",2,"char *");
+ if(!lua_isstring(L,2)) SWIG_fail_arg("execute",2,"char const *");
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
SWIG_fail_ptr("CoreSession_execute",1,SWIGTYPE_p_CoreSession);
}
arg2 = (char *)lua_tostring(L, 2);
- (arg1)->execute(arg2);
+ (arg1)->execute((char const *)arg2);
SWIG_arg=0;
return SWIG_arg;
Modified: freeswitch/trunk/src/mod/languages/mod_managed/freeswitch_wrap.cxx
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_managed/freeswitch_wrap.cxx (original)
+++ freeswitch/trunk/src/mod/languages/mod_managed/freeswitch_wrap.cxx Fri Jan 30 17:19:38 2009
@@ -21517,7 +21517,7 @@
arg2 = (char *)jarg2;
arg3 = (char *)jarg3;
arg4 = (switch_media_flag_t)jarg4;
- result = (uint32_t)switch_ivr_schedule_broadcast(arg1,arg2,arg3,arg4);
+ result = (uint32_t)switch_ivr_schedule_broadcast(arg1,(char const *)arg2,(char const *)arg3,arg4);
jresult = (unsigned long)result;
return jresult;
}
@@ -27643,7 +27643,7 @@
arg1 = (CoreSession *)jarg1;
arg2 = (char *)jarg2;
arg3 = (char *)jarg3;
- (arg1)->execute(arg2,arg3);
+ (arg1)->execute((char const *)arg2,(char const *)arg3);
}
Modified: freeswitch/trunk/src/mod/languages/mod_perl/mod_perl_wrap.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_perl/mod_perl_wrap.cpp (original)
+++ freeswitch/trunk/src/mod/languages/mod_perl/mod_perl_wrap.cpp Fri Jan 30 17:19:38 2009
@@ -8937,15 +8937,15 @@
arg1 = reinterpret_cast< CoreSession * >(argp1);
res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char *""'");
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char const *""'");
}
arg2 = reinterpret_cast< char * >(buf2);
res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
if (!SWIG_IsOK(res3)) {
- SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_execute" "', argument " "3"" of type '" "char *""'");
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_execute" "', argument " "3"" of type '" "char const *""'");
}
arg3 = reinterpret_cast< char * >(buf3);
- (arg1)->execute(arg2,arg3);
+ (arg1)->execute((char const *)arg2,(char const *)arg3);
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
@@ -8982,10 +8982,10 @@
arg1 = reinterpret_cast< CoreSession * >(argp1);
res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char *""'");
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char const *""'");
}
arg2 = reinterpret_cast< char * >(buf2);
- (arg1)->execute(arg2);
+ (arg1)->execute((char const *)arg2);
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
@@ -11483,17 +11483,17 @@
SWIG_TypeClientData(SWIGTYPE_p_IVRMenu, (void*) "freeswitch::IVRMenu");
SWIG_TypeClientData(SWIGTYPE_p_API, (void*) "freeswitch::API");
SWIG_TypeClientData(SWIGTYPE_p_input_callback_state, (void*) "freeswitch::input_callback_state_t");
- /*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
+ /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
SV *sv = get_sv((char*) SWIG_prefix "S_HUP", TRUE | 0x2 | GV_ADDMULTI);
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_HUP)));
SvREADONLY_on(sv);
} while(0) /*@SWIG@*/;
- /*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
+ /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
SV *sv = get_sv((char*) SWIG_prefix "S_FREE", TRUE | 0x2 | GV_ADDMULTI);
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_FREE)));
SvREADONLY_on(sv);
} while(0) /*@SWIG@*/;
- /*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
+ /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
SV *sv = get_sv((char*) SWIG_prefix "S_RDLOCK", TRUE | 0x2 | GV_ADDMULTI);
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_RDLOCK)));
SvREADONLY_on(sv);
Modified: freeswitch/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp (original)
+++ freeswitch/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp Fri Jan 30 17:19:38 2009
@@ -8609,15 +8609,15 @@
arg1 = reinterpret_cast< CoreSession * >(argp1);
res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char *""'");
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char const *""'");
}
arg2 = reinterpret_cast< char * >(buf2);
res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
if (!SWIG_IsOK(res3)) {
- SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_execute" "', argument " "3"" of type '" "char *""'");
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_execute" "', argument " "3"" of type '" "char const *""'");
}
arg3 = reinterpret_cast< char * >(buf3);
- (arg1)->execute(arg2,arg3);
+ (arg1)->execute((char const *)arg2,(char const *)arg3);
resultobj = SWIG_Py_Void();
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
@@ -8649,10 +8649,10 @@
arg1 = reinterpret_cast< CoreSession * >(argp1);
res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char *""'");
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char const *""'");
}
arg2 = reinterpret_cast< char * >(buf2);
- (arg1)->execute(arg2);
+ (arg1)->execute((char const *)arg2);
resultobj = SWIG_Py_Void();
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
return resultobj;
@@ -8706,8 +8706,8 @@
fail:
SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CoreSession_execute'.\n"
" Possible C/C++ prototypes are:\n"
- " execute(CoreSession *,char *,char *)\n"
- " execute(CoreSession *,char *)\n");
+ " execute(CoreSession *,char const *,char const *)\n"
+ " execute(CoreSession *,char const *)\n");
return NULL;
}
Modified: freeswitch/trunk/src/switch_cpp.cpp
==============================================================================
--- freeswitch/trunk/src/switch_cpp.cpp (original)
+++ freeswitch/trunk/src/switch_cpp.cpp Fri Jan 30 17:19:38 2009
@@ -580,18 +580,15 @@
return switch_channel_get_variable(channel, var);
}
-SWITCH_DECLARE(void) CoreSession::execute(char *app, char *data)
+SWITCH_DECLARE(void) CoreSession::execute(const char *app, const char *data)
{
const switch_application_interface_t *application_interface;
this_check_void();
sanity_check_noreturn;
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "CoreSession::execute. app: %s data:%s\n", app, data);
- if ((application_interface = switch_loadable_module_get_application_interface(app))) {
- begin_allow_threads();
- switch_core_session_exec(session, application_interface, data);
- end_allow_threads();
- }
+ begin_allow_threads();
+ switch_core_session_execute_application(session, app, data);
+ end_allow_threads();
}
SWITCH_DECLARE(void) CoreSession::setDTMFCallback(void *cbfunc, char *funcargs) {
1
0
Author: anthm
Date: Fri Jan 30 17:08:55 2009
New Revision: 11569
Log:
move var expansion deeper into the core for executing app
Modified:
freeswitch/trunk/src/switch_core_session.c
Modified: freeswitch/trunk/src/switch_core_session.c
==============================================================================
--- freeswitch/trunk/src/switch_core_session.c (original)
+++ freeswitch/trunk/src/switch_core_session.c Fri Jan 30 17:08:55 2009
@@ -1225,7 +1225,6 @@
{
switch_application_interface_t *application_interface;
char *expanded = NULL;
- const char *var;
if ((application_interface = switch_loadable_module_get_application_interface(app)) == 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Application %s\n", app);
@@ -1253,6 +1252,27 @@
}
}
+ switch_core_session_exec(session, application_interface, expanded);
+
+ UNPROTECT_INTERFACE(application_interface);
+
+ return SWITCH_STATUS_SUCCESS;
+}
+
+SWITCH_DECLARE(switch_status_t) switch_core_session_exec(switch_core_session_t *session,
+ const switch_application_interface_t *application_interface, const char *arg)
+{
+ switch_app_log_t *log, *lp;
+ switch_event_t *event;
+ const char *var;
+ switch_channel_t *channel = switch_core_session_get_channel(session);
+ char *expanded = NULL;
+ const char *app;
+
+ switch_assert(application_interface);
+
+ app = application_interface->interface_name;
+
if (arg && (expanded = switch_channel_expand_variables(session->channel, arg)) != arg) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s Expanded String %s(%s)\n", switch_channel_get_name(session->channel), app, expanded);
}
@@ -1272,25 +1292,6 @@
}
}
- switch_core_session_exec(session, application_interface, expanded);
-
- if (expanded != arg) {
- switch_safe_free(expanded);
- }
-
- UNPROTECT_INTERFACE(application_interface);
-
- return SWITCH_STATUS_SUCCESS;
-}
-
-SWITCH_DECLARE(switch_status_t) switch_core_session_exec(switch_core_session_t *session,
- const switch_application_interface_t *application_interface, const char *arg)
-{
- switch_app_log_t *log, *lp;
- switch_event_t *event;
- const char *var;
- switch_channel_t *channel = switch_core_session_get_channel(session);
-
if (!arg) {
arg = "";
}
@@ -1327,7 +1328,7 @@
switch_channel_set_variable(session->channel, SWITCH_CURRENT_APPLICATION_VARIABLE, application_interface->interface_name);
- application_interface->application_function(session, arg);
+ application_interface->application_function(session, expanded);
if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_EXECUTE_COMPLETE) == SWITCH_STATUS_SUCCESS) {
const char *resp = switch_channel_get_variable(session->channel, SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE);
@@ -1338,6 +1339,10 @@
switch_event_fire(&event);
}
+ if (expanded != arg) {
+ switch_safe_free(expanded);
+ }
+
return SWITCH_STATUS_SUCCESS;
}
1
0
Author: mrene
Date: Fri Jan 30 16:48:44 2009
New Revision: 11568
Log:
Don't double-clear state handlers when uuid_bridging
Modified:
freeswitch/trunk/src/switch_ivr_bridge.c
Modified: freeswitch/trunk/src/switch_ivr_bridge.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_bridge.c (original)
+++ freeswitch/trunk/src/switch_ivr_bridge.c Fri Jan 30 16:48:44 2009
@@ -523,6 +523,22 @@
/*.on_consume_media */ audio_bridge_on_consume_media,
};
+static switch_status_t uuid_bridge_on_reset(switch_core_session_t *session);
+static switch_status_t uuid_bridge_on_hibernate(switch_core_session_t *session);
+static switch_status_t uuid_bridge_on_soft_execute(switch_core_session_t *session);
+
+static const switch_state_handler_table_t uuid_bridge_state_handlers = {
+ /*.on_init */ NULL,
+ /*.on_routing */ NULL,
+ /*.on_execute */ NULL,
+ /*.on_hangup */ NULL,
+ /*.on_exchange_media */ NULL,
+ /*.on_soft_execute */ uuid_bridge_on_soft_execute,
+ /*.on_consume_media */ uuid_bridge_on_hibernate,
+ /*.on_hibernate */ uuid_bridge_on_hibernate,
+ /*.on_reset */ uuid_bridge_on_reset
+};
+
static switch_status_t uuid_bridge_on_reset(switch_core_session_t *session)
{
switch_channel_t *channel = switch_core_session_get_channel(session);
@@ -551,7 +567,7 @@
const char *other_uuid = NULL;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s CUSTOM SOFT_EXECUTE\n", switch_channel_get_name(channel));
- switch_channel_clear_state_handler(channel, NULL);
+ switch_channel_clear_state_handler(channel, &uuid_bridge_state_handlers);
if (!switch_channel_test_flag(channel, CF_ORIGINATOR)) {
return SWITCH_STATUS_SUCCESS;
@@ -637,18 +653,6 @@
return SWITCH_STATUS_FALSE;
}
-static const switch_state_handler_table_t uuid_bridge_state_handlers = {
- /*.on_init */ NULL,
- /*.on_routing */ NULL,
- /*.on_execute */ NULL,
- /*.on_hangup */ NULL,
- /*.on_exchange_media */ NULL,
- /*.on_soft_execute */ uuid_bridge_on_soft_execute,
- /*.on_consume_media */ uuid_bridge_on_hibernate,
- /*.on_hibernate */ uuid_bridge_on_hibernate,
- /*.on_reset */ uuid_bridge_on_reset
-};
-
static switch_status_t signal_bridge_on_hibernate(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
1
0
[Freeswitch-svn] [commit] r11567 - in freeswitch/trunk: . libs libs/spandsp/src libs/spandsp/src/msvc libs/win32 src/mod/applications/mod_fax
by FreeSWITCH SVN 30 Jan '09
by FreeSWITCH SVN 30 Jan '09
30 Jan '09
Author: mikej
Date: Fri Jan 30 13:15:06 2009
New Revision: 11567
Log:
add mod_fax to the windows build
Added:
freeswitch/trunk/libs/spandsp/src/msvc/spandsp.h
freeswitch/trunk/libs/win32/Download TIFF.2008.vcproj
freeswitch/trunk/src/mod/applications/mod_fax/mod_fax.2008.vcproj
Modified:
freeswitch/trunk/Freeswitch.2008.express.sln
freeswitch/trunk/Freeswitch.2008.sln
freeswitch/trunk/libs/ (props changed)
freeswitch/trunk/libs/spandsp/src/ (props changed)
freeswitch/trunk/libs/spandsp/src/libspandsp.vcproj
freeswitch/trunk/libs/spandsp/src/libtiff.vcproj
freeswitch/trunk/libs/spandsp/src/msvc/inttypes.h
freeswitch/trunk/libs/spandsp/src/msvc/spandsp.def
freeswitch/trunk/src/mod/applications/mod_fax/ (props changed)
freeswitch/trunk/src/mod/applications/mod_fax/mod_fax.c
Modified: freeswitch/trunk/Freeswitch.2008.express.sln
==============================================================================
--- freeswitch/trunk/Freeswitch.2008.express.sln (original)
+++ freeswitch/trunk/Freeswitch.2008.express.sln Fri Jan 30 13:15:06 2009
@@ -575,6 +575,25 @@
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download TIFF", "libs\win32\Download TIFF.2008.vcproj", "{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libspandsp", "libs\spandsp\src\libspandsp.vcproj", "{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}"
+ ProjectSection(ProjectDependencies) = postProject
+ {401A40CD-5DB4-4E34-AC68-FA99E9FAC014} = {401A40CD-5DB4-4E34-AC68-FA99E9FAC014}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtiff", "libs\spandsp\src\libtiff.vcproj", "{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}"
+ ProjectSection(ProjectDependencies) = postProject
+ {2B8A45C9-FEB4-4734-AB37-8DB9DB899917} = {2B8A45C9-FEB4-4734-AB37-8DB9DB899917}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_fax", "src\mod\applications\mod_fax\mod_fax.2008.vcproj", "{7877EFC8-4807-484B-B573-D7B7FD058FAA}"
+ ProjectSection(ProjectDependencies) = postProject
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
+ {401A40CD-5DB4-4E34-AC68-FA99E9FAC014} = {401A40CD-5DB4-4E34-AC68-FA99E9FAC014}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -1290,6 +1309,30 @@
{1A3793D1-05D1-4B57-9B0F-5AF3E79DC439}.Release|Win32.ActiveCfg = Release|Win32
{1A3793D1-05D1-4B57-9B0F-5AF3E79DC439}.Release|Win32.Build.0 = Release|Win32
{1A3793D1-05D1-4B57-9B0F-5AF3E79DC439}.Release|x64.ActiveCfg = Release|Win32
+ {2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.Debug|Win32.Build.0 = Debug|Win32
+ {2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.Debug|x64.ActiveCfg = Debug|Win32
+ {2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.Release|Win32.ActiveCfg = Release|Win32
+ {2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.Release|Win32.Build.0 = Release|Win32
+ {2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.Release|x64.ActiveCfg = Release|Win32
+ {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Debug|Win32.ActiveCfg = Debug|Win32
+ {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Debug|Win32.Build.0 = Debug|Win32
+ {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Debug|x64.ActiveCfg = Debug|Win32
+ {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Release|Win32.ActiveCfg = Release|Win32
+ {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Release|Win32.Build.0 = Release|Win32
+ {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Release|x64.ActiveCfg = Release|Win32
+ {401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Debug|Win32.ActiveCfg = Debug|Win32
+ {401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Debug|Win32.Build.0 = Debug|Win32
+ {401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Debug|x64.ActiveCfg = Debug|Win32
+ {401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Release|Win32.ActiveCfg = Release|Win32
+ {401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Release|Win32.Build.0 = Release|Win32
+ {401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Release|x64.ActiveCfg = Release|Win32
+ {7877EFC8-4807-484B-B573-D7B7FD058FAA}.Debug|Win32.ActiveCfg = Debug|Win32
+ {7877EFC8-4807-484B-B573-D7B7FD058FAA}.Debug|Win32.Build.0 = Debug|Win32
+ {7877EFC8-4807-484B-B573-D7B7FD058FAA}.Debug|x64.ActiveCfg = Debug|Win32
+ {7877EFC8-4807-484B-B573-D7B7FD058FAA}.Release|Win32.ActiveCfg = Release|Win32
+ {7877EFC8-4807-484B-B573-D7B7FD058FAA}.Release|Win32.Build.0 = Release|Win32
+ {7877EFC8-4807-484B-B573-D7B7FD058FAA}.Release|x64.ActiveCfg = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Modified: freeswitch/trunk/Freeswitch.2008.sln
==============================================================================
--- freeswitch/trunk/Freeswitch.2008.sln (original)
+++ freeswitch/trunk/Freeswitch.2008.sln Fri Jan 30 13:15:06 2009
@@ -953,6 +953,25 @@
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download TIFF", "libs\win32\Download TIFF.2008.vcproj", "{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtiff", "libs\spandsp\src\libtiff.vcproj", "{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}"
+ ProjectSection(ProjectDependencies) = postProject
+ {2B8A45C9-FEB4-4734-AB37-8DB9DB899917} = {2B8A45C9-FEB4-4734-AB37-8DB9DB899917}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libspandsp", "libs\spandsp\src\libspandsp.vcproj", "{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}"
+ ProjectSection(ProjectDependencies) = postProject
+ {401A40CD-5DB4-4E34-AC68-FA99E9FAC014} = {401A40CD-5DB4-4E34-AC68-FA99E9FAC014}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_fax", "src\mod\applications\mod_fax\mod_fax.2008.vcproj", "{7877EFC8-4807-484B-B573-D7B7FD058FAA}"
+ ProjectSection(ProjectDependencies) = postProject
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
+ {401A40CD-5DB4-4E34-AC68-FA99E9FAC014} = {401A40CD-5DB4-4E34-AC68-FA99E9FAC014}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -1674,6 +1693,30 @@
{1A3793D1-05D1-4B57-9B0F-5AF3E79DC439}.Release|Win32.ActiveCfg = Release|Win32
{1A3793D1-05D1-4B57-9B0F-5AF3E79DC439}.Release|Win32.Build.0 = Release|Win32
{1A3793D1-05D1-4B57-9B0F-5AF3E79DC439}.Release|x64.ActiveCfg = Release|Win32
+ {2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.Debug|Win32.Build.0 = Debug|Win32
+ {2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.Debug|x64.ActiveCfg = Debug|Win32
+ {2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.Release|Win32.ActiveCfg = Release|Win32
+ {2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.Release|Win32.Build.0 = Release|Win32
+ {2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.Release|x64.ActiveCfg = Release|Win32
+ {401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Debug|Win32.ActiveCfg = Debug|Win32
+ {401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Debug|Win32.Build.0 = Debug|Win32
+ {401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Debug|x64.ActiveCfg = Debug|Win32
+ {401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Release|Win32.ActiveCfg = Release|Win32
+ {401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Release|Win32.Build.0 = Release|Win32
+ {401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Release|x64.ActiveCfg = Release|Win32
+ {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Debug|Win32.ActiveCfg = Debug|Win32
+ {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Debug|Win32.Build.0 = Debug|Win32
+ {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Debug|x64.ActiveCfg = Debug|Win32
+ {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Release|Win32.ActiveCfg = Release|Win32
+ {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Release|Win32.Build.0 = Release|Win32
+ {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Release|x64.ActiveCfg = Release|Win32
+ {7877EFC8-4807-484B-B573-D7B7FD058FAA}.Debug|Win32.ActiveCfg = Debug|Win32
+ {7877EFC8-4807-484B-B573-D7B7FD058FAA}.Debug|Win32.Build.0 = Debug|Win32
+ {7877EFC8-4807-484B-B573-D7B7FD058FAA}.Debug|x64.ActiveCfg = Debug|Win32
+ {7877EFC8-4807-484B-B573-D7B7FD058FAA}.Release|Win32.ActiveCfg = Release|Win32
+ {7877EFC8-4807-484B-B573-D7B7FD058FAA}.Release|Win32.Build.0 = Release|Win32
+ {7877EFC8-4807-484B-B573-D7B7FD058FAA}.Release|x64.ActiveCfg = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1707,6 +1750,7 @@
{14E4A972-9CFB-436D-B0A5-4943F3F80D47} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{329FD5B0-EF28-4606-86D0-F6EA21CF8E36} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{1A3793D1-05D1-4B57-9B0F-5AF3E79DC439} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
+ {7877EFC8-4807-484B-B573-D7B7FD058FAA} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{07113B25-D3AF-4E04-BA77-4CD1171F022C} = {C5F182F9-754A-4EC5-B50F-76ED02BE13F4}
{A27CCA23-1541-4337-81A4-F0A6413078A0} = {C5F182F9-754A-4EC5-B50F-76ED02BE13F4}
{E7BC026C-7CC5-45A3-BC7C-3B88EEF01F24} = {C5F182F9-754A-4EC5-B50F-76ED02BE13F4}
@@ -1773,6 +1817,8 @@
{419C8F80-D858-4B48-A25C-AF4007608137} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{1BC8A8EC-E03B-44DF-BCD9-088650F4D29C} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{CF405366-9558-4AE8-90EF-5E21B51CCB4E} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
+ {401A40CD-5DB4-4E34-AC68-FA99E9FAC014} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
+ {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{5927104D-C14C-4AC8-925C-4AB681762E75} = {C120A020-773F-4EA3-923F-B67AF28B750D}
{8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A} = {C120A020-773F-4EA3-923F-B67AF28B750D}
{4F92B672-DADB-4047-8D6A-4BB3796733FD} = {C120A020-773F-4EA3-923F-B67AF28B750D}
@@ -1786,6 +1832,7 @@
{D5D2BF72-29FE-4982-A9FA-82AB3086DB1B} = {C120A020-773F-4EA3-923F-B67AF28B750D}
{D5D2BF72-29FE-4982-A9FA-82AB1086DB1B} = {C120A020-773F-4EA3-923F-B67AF28B750D}
{E796E337-DE78-4303-8614-9A590862EE95} = {C120A020-773F-4EA3-923F-B67AF28B750D}
+ {2B8A45C9-FEB4-4734-AB37-8DB9DB899917} = {C120A020-773F-4EA3-923F-B67AF28B750D}
{988CACF7-3FCB-4992-BE69-77872AE67DC8} = {6CD61A1D-797C-470A-BE08-8C31B68BB336}
{5BC072DB-3826-48EA-AF34-FE32AA01E83B} = {6CD61A1D-797C-470A-BE08-8C31B68BB336}
{FA429E98-8B03-45E6-A096-A4BC5E821DE4} = {6CD61A1D-797C-470A-BE08-8C31B68BB336}
Modified: freeswitch/trunk/libs/spandsp/src/libspandsp.vcproj
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/libspandsp.vcproj (original)
+++ freeswitch/trunk/libs/spandsp/src/libspandsp.vcproj Fri Jan 30 13:15:06 2009
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="9.00"
Name="libspandsp"
- ProjectGUID="{CF70F278-3364-4395-A2E1-23501C9B8AD2}"
+ ProjectGUID="{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}"
RootNamespace="libspandsp"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
@@ -41,7 +41,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories=".;.\spandsp;.\msvc;..\..\tiff\libtiff;.\generated"
+ AdditionalIncludeDirectories=".;.\spandsp;.\msvc;..\..\tiff-3.8.2\libtiff;.\generated"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@@ -118,7 +118,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=".;.\spandsp;.\msvc;..\..\tiff\libtiff;.\generated"
+ AdditionalIncludeDirectories=".;.\spandsp;.\msvc;..\..\tiff-3.8.2\libtiff;.\generated"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
Modified: freeswitch/trunk/libs/spandsp/src/libtiff.vcproj
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/libtiff.vcproj (original)
+++ freeswitch/trunk/libs/spandsp/src/libtiff.vcproj Fri Jan 30 13:15:06 2009
@@ -25,7 +25,7 @@
>
<Tool
Name="VCPreBuildEventTool"
- CommandLine="if not exist "$(ProjectDir)../../tiff/libtiff/tif_config.h" copy "$(ProjectDir)..\..\tiff\libtiff\tiffconf.h.vc" "$(ProjectDir)..\..\tiff\libtiff\tiffconf.h" /Y
if not exist "$(ProjectDir)../../tiff/libtiff/tif_config.h" copy "$(ProjectDir)..\..\tiff\libtiff\tif_config.h.vc" "$(ProjectDir)..\..\tiff\libtiff\tif_config.h" /Y"
+ CommandLine="if not exist "$(ProjectDir)../../tiff-3.8.2/libtiff/tif_config.h" copy "$(ProjectDir)..\..\tiff-3.8.2\libtiff\tiffconf.h.vc" "$(ProjectDir)..\..\tiff-3.8.2\libtiff\tiffconf.h" /Y
if not exist "$(ProjectDir)../../tiff-3.8.2/libtiff/tif_config.h" copy "$(ProjectDir)..\..\tiff-3.8.2\libtiff\tif_config.h.vc" "$(ProjectDir)..\..\tiff-3.8.2\libtiff\tif_config.h" /Y"
/>
<Tool
Name="VCCustomBuildTool"
@@ -90,7 +90,7 @@
>
<Tool
Name="VCPreBuildEventTool"
- CommandLine="if not exist "$(ProjectDir)../../tiff/libtiff/tif_config.h" copy "$(ProjectDir)..\..\tiff\libtiff\tiffconf.h.vc" "$(ProjectDir)..\..\tiff\libtiff\tiffconf.h" /Y
if not exist "$(ProjectDir)../../tiff/libtiff/tif_config.h" copy "$(ProjectDir)..\..\tiff\libtiff\tif_config.h.vc" "$(ProjectDir)..\..\tiff\libtiff\tif_config.h" /Y"
+ CommandLine="if not exist "$(ProjectDir)../../tiff-3.8.2/libtiff/tif_config.h" copy "$(ProjectDir)..\..\tiff-3.8.2\libtiff\tiffconf.h.vc" "$(ProjectDir)..\..\tiff-3.8.2\libtiff\tiffconf.h" /Y
if not exist "$(ProjectDir)../../tiff-3.8.2/libtiff/tif_config.h" copy "$(ProjectDir)..\..\tiff-3.8.2\libtiff\tif_config.h.vc" "$(ProjectDir)..\..\tiff-3.8.2\libtiff\tif_config.h" /Y"
/>
<Tool
Name="VCCustomBuildTool"
@@ -151,11 +151,11 @@
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
- RelativePath="..\..\tiff\libtiff\tif_aux.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_aux.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_close.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_close.c"
>
<FileConfiguration
Name="Debug|Win32"
@@ -166,83 +166,83 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_codec.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_codec.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_color.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_color.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_compress.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_compress.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_dir.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_dir.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_dirinfo.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_dirinfo.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_dirread.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_dirread.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_dirwrite.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_dirwrite.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_dumpmode.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_dumpmode.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_error.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_error.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_extension.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_extension.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_fax3.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_fax3.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_fax3sm.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_fax3sm.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_flush.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_flush.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_getimage.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_getimage.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_jpeg.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_jpeg.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_luv.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_luv.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_lzw.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_lzw.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_next.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_next.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_ojpeg.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_ojpeg.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_open.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_open.c"
>
<FileConfiguration
Name="Debug|Win32"
@@ -253,55 +253,55 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_packbits.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_packbits.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_pixarlog.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_pixarlog.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_predict.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_predict.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_print.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_print.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_read.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_read.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_strip.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_strip.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_swab.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_swab.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_thunder.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_thunder.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_tile.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_tile.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_unix.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_unix.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_version.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_version.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_warning.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_warning.c"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_write.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_write.c"
>
<FileConfiguration
Name="Debug|Win32"
@@ -312,7 +312,7 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_zip.c"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_zip.c"
>
</File>
</Filter>
@@ -320,47 +320,47 @@
Name="Header Files"
>
<File
- RelativePath="..\..\tiff\libtiff\t4.h"
+ RelativePath="..\..\tiff-3.8.2\libtiff\t4.h"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_dir.h"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_dir.h"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_fax3.h"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_fax3.h"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tif_predict.h"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tif_predict.h"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tiff.h"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tiff.h"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tiffconf.h"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tiffconf.h"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tiffio.h"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tiffio.h"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tiffio.hxx"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tiffio.hxx"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tiffiop.h"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tiffiop.h"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\tiffvers.h"
+ RelativePath="..\..\tiff-3.8.2\libtiff\tiffvers.h"
>
</File>
<File
- RelativePath="..\..\tiff\libtiff\uvcode.h"
+ RelativePath="..\..\tiff-3.8.2\libtiff\uvcode.h"
>
</File>
</Filter>
Modified: freeswitch/trunk/libs/spandsp/src/msvc/inttypes.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/msvc/inttypes.h (original)
+++ freeswitch/trunk/libs/spandsp/src/msvc/inttypes.h Fri Jan 30 13:15:06 2009
@@ -55,9 +55,15 @@
#pragma comment(lib, "ws2_32.lib")
+#ifndef strncasecmp
#define strncasecmp _strnicmp
+#endif
+#ifndef strcasecmp
#define strcasecmp _stricmp
+#endif
+#ifndef snprintf
#define snprintf _snprintf
+#endif
#if !defined(INFINITY)
#define INFINITY 0x7fffffff
Modified: freeswitch/trunk/libs/spandsp/src/msvc/spandsp.def
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/msvc/spandsp.def (original)
+++ freeswitch/trunk/libs/spandsp/src/msvc/spandsp.def Fri Jan 30 13:15:06 2009
@@ -274,4 +274,23 @@
v8_tx
v8_rx
v8_log_supported_modulations
+t30_set_ecm_capability
+t30_set_supported_compressions
+t30_set_supported_modems
+t30_set_supported_resolutions
+t30_set_supported_image_sizes
+t30_set_tx_page_header_info
+t30_set_tx_ident
+span_log_set_level
+span_log_set_message_handler
+fax_set_transmit_on_idle
+fax_get_t30_state
+t30_get_rx_model
+t30_get_rx_vendor
+t30_get_rx_country
+t30_get_rx_ident
+t30_get_tx_ident
+t38_terminal_release
+t38_terminal_get_t30_state
+t30_terminate
Added: freeswitch/trunk/libs/spandsp/src/msvc/spandsp.h
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/src/msvc/spandsp.h Fri Jan 30 13:15:06 2009
@@ -0,0 +1,123 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * spandsp.h - The head guy amongst the headers
+ *
+ * Written by Steve Underwood <steveu(a)coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 2.1,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: spandsp.h.in,v 1.14 2009/01/07 13:31:53 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_SPANDSP_H_)
+#define _SPANDSP_H_
+
+#undef SPANDSP_USE_FIXED_POINT
+#undef SPANDSP_MISALIGNED_ACCESS_FAILS
+
+#include <stdlib.h>
+#include <inttypes.h>
+#include <string.h>
+#include <limits.h>
+#include <time.h>
+#include <math.h>
+#include <tiffio.h>
+
+#include <spandsp/telephony.h>
+#include <spandsp/logging.h>
+#include <spandsp/complex.h>
+#include <spandsp/bit_operations.h>
+#include <spandsp/bitstream.h>
+#include <spandsp/queue.h>
+#include <spandsp/schedule.h>
+#include <spandsp/g711.h>
+#include <spandsp/timing.h>
+#include <spandsp/vector_float.h>
+#include <spandsp/complex_vector_float.h>
+#include <spandsp/vector_int.h>
+#include <spandsp/complex_vector_int.h>
+#include <spandsp/arctan2.h>
+#include <spandsp/biquad.h>
+#include <spandsp/fir.h>
+#include <spandsp/awgn.h>
+#include <spandsp/bert.h>
+#include <spandsp/power_meter.h>
+#include <spandsp/complex_filters.h>
+#include <spandsp/dc_restore.h>
+#include <spandsp/dds.h>
+#include <spandsp/echo.h>
+#include <spandsp/modem_echo.h>
+#include <spandsp/crc.h>
+#include <spandsp/hdlc.h>
+#include <spandsp/async.h>
+#include <spandsp/noise.h>
+#include <spandsp/saturated.h>
+#include <spandsp/time_scale.h>
+#include <spandsp/tone_detect.h>
+#include <spandsp/tone_generate.h>
+#include <spandsp/super_tone_rx.h>
+#include <spandsp/super_tone_tx.h>
+#include <spandsp/dtmf.h>
+#include <spandsp/bell_r2_mf.h>
+#include <spandsp/sig_tone.h>
+#include <spandsp/fsk.h>
+#include <spandsp/modem_connect_tones.h>
+#include <spandsp/silence_gen.h>
+#include <spandsp/v29rx.h>
+#include <spandsp/v29tx.h>
+#include <spandsp/v17rx.h>
+#include <spandsp/v17tx.h>
+#include <spandsp/v22bis.h>
+#include <spandsp/v27ter_rx.h>
+#include <spandsp/v27ter_tx.h>
+#include <spandsp/v8.h>
+#include <spandsp/v42.h>
+#include <spandsp/v42bis.h>
+#include <spandsp/t4.h>
+#include <spandsp/t30.h>
+#include <spandsp/t30_api.h>
+#include <spandsp/t30_fcf.h>
+#include <spandsp/t30_logging.h>
+#include <spandsp/t35.h>
+#include <spandsp/at_interpreter.h>
+#include <spandsp/fax_modems.h>
+#include <spandsp/fax.h>
+#include <spandsp/t38_core.h>
+#include <spandsp/t38_non_ecm_buffer.h>
+#include <spandsp/t38_gateway.h>
+#include <spandsp/t38_terminal.h>
+#include <spandsp/t31.h>
+#include <spandsp/adsi.h>
+#include <spandsp/oki_adpcm.h>
+#include <spandsp/ima_adpcm.h>
+#include <spandsp/g722.h>
+#include <spandsp/g726.h>
+#include <spandsp/lpc10.h>
+#include <spandsp/gsm0610.h>
+#include <spandsp/plc.h>
+#include <spandsp/playout.h>
+
+#endif
+
+#if defined(SPANDSP_EXPOSE_INTERNAL_STRUCTURES)
+#include <spandsp/expose.h>
+#endif
+/*- End of file ------------------------------------------------------------*/
Added: freeswitch/trunk/libs/win32/Download TIFF.2008.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/win32/Download TIFF.2008.vcproj Fri Jan 30 13:15:06 2009
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="Download TIFF"
+ ProjectGUID="{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}"
+ RootNamespace="Download TIFF"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="10"
+ CharacterSet="2"
+ BuildLogFile="$(IntDir)\BuildLog $(ProjectName).htm"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine=""
+ Outputs=""
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="10"
+ CharacterSet="2"
+ BuildLogFile="$(IntDir)\BuildLog $(ProjectName).htm"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\tiff\cleancount"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Downloading Tiff."
+ CommandLine="if not exist "$(ProjectDir)..\tiff-3.8.2" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://svn.freeswitch.org/downloads/libs/tiff-3.8.2.tar.gz "$(ProjectDir).."
"
+ Outputs="$(ProjectDir)..\tiff-3.8.2"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Downloading Lame."
+ CommandLine="if not exist "$(ProjectDir)..\tiff-3.8.2" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://svn.freeswitch.org/downloads/libs/tiff-3.8.2.tar.gz "$(ProjectDir).."
"
+ Outputs="$(ProjectDir)..\tiff-3.8.2"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/src/mod/applications/mod_fax/mod_fax.2008.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/src/mod/applications/mod_fax/mod_fax.2008.vcproj Fri Jan 30 13:15:06 2009
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="mod_fax"
+ ProjectGUID="{7877EFC8-4807-484B-B573-D7B7FD058FAA}"
+ RootNamespace="mod_fax"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ ConfigurationType="2"
+ InheritedPropertySheets="..\..\..\..\w32\module_debug.vsprops"
+ CharacterSet="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""$(InputDir)..\..\..\..\libs\spandsp\src\msvc";"$(InputDir)..\..\..\..\libs\spandsp\src";"$(InputDir)..\..\..\..\libs\tiff-3.8.2\libtiff""
+ UsePrecompiledHeader="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ />
+ <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"
+ ConfigurationType="2"
+ InheritedPropertySheets="..\..\..\..\w32\module_release.vsprops"
+ CharacterSet="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""$(InputDir)..\..\..\..\libs\spandsp\src\msvc";"$(InputDir)..\..\..\..\libs\spandsp\src";"$(InputDir)..\..\..\..\libs\tiff-3.8.2\libtiff""
+ UsePrecompiledHeader="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ />
+ <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>
+ <File
+ RelativePath=".\mod_fax.c"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Modified: freeswitch/trunk/src/mod/applications/mod_fax/mod_fax.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_fax/mod_fax.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_fax/mod_fax.c Fri Jan 30 13:15:06 2009
@@ -34,6 +34,26 @@
#include <switch.h>
+#ifdef WIN32
+ __inline float rintf(float flt)
+ {
+ _asm
+ { fld flt
+ frndint
+ }
+ }
+
+ __inline double rint(double dbl)
+ {
+ __asm
+ {
+ fld dbl
+ frndint
+ }
+ }
+
+#endif
+
#define SPANDSP_EXPOSE_INTERNAL_STRUCTURES
#include <spandsp.h>
#include <spandsp/version.h>
1
0
Author: mikej
Date: Fri Jan 30 12:11:32 2009
New Revision: 11566
Log:
fix windows build
Modified:
freeswitch/trunk/src/switch.c
Modified: freeswitch/trunk/src/switch.c
==============================================================================
--- freeswitch/trunk/src/switch.c (original)
+++ freeswitch/trunk/src/switch.c Fri Jan 30 12:11:32 2009
@@ -660,6 +660,7 @@
char buf[1024] = "";
int i = 0;
+ switch_assert(argv[0]);
switch_sleep(1000000);
ret = (int)execv(argv[0], argv);
fprintf(stderr, "Restart Failed [%s] resorting to plan b\n", strerror(errno));
1
0
Author: mikej
Date: Fri Jan 30 12:11:10 2009
New Revision: 11565
Log:
svn:ignore
Modified:
freeswitch/trunk/libs/ (props changed)
1
0
[Freeswitch-svn] [commit] r11564 - freeswitch/trunk/src/mod/endpoints/mod_sofia
by FreeSWITCH SVN 30 Jan '09
by FreeSWITCH SVN 30 Jan '09
30 Jan '09
Author: mikej
Date: Fri Jan 30 12:10:33 2009
New Revision: 11564
Log:
add sofia_sla.c to windows build
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.2008.vcproj
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.vcproj
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.2008.vcproj
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.2008.vcproj (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.2008.vcproj Fri Jan 30 12:10:33 2009
@@ -176,6 +176,10 @@
RelativePath=".\sofia_reg.c"
>
</File>
+ <File
+ RelativePath=".\sofia_sla.c"
+ >
+ </File>
</Files>
<Globals>
</Globals>
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.vcproj
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.vcproj (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.vcproj Fri Jan 30 12:10:33 2009
@@ -178,6 +178,10 @@
RelativePath=".\sofia_reg.c"
>
</File>
+ <File
+ RelativePath=".\sofia_sla.c"
+ >
+ </File>
</Files>
<Globals>
</Globals>
1
0
[Freeswitch-svn] [commit] r11563 - in freeswitch/trunk/libs/spandsp: src src/msvc src/spandsp src/spandsp/private tests
by FreeSWITCH SVN 30 Jan '09
by FreeSWITCH SVN 30 Jan '09
30 Jan '09
Author: mikej
Date: Fri Jan 30 11:00:50 2009
New Revision: 11563
Log:
update to snapshot spandsp-20090130
Modified:
freeswitch/trunk/libs/spandsp/src/Makefile.am
freeswitch/trunk/libs/spandsp/src/bell_r2_mf.c
freeswitch/trunk/libs/spandsp/src/dtmf.c
freeswitch/trunk/libs/spandsp/src/fsk.c
freeswitch/trunk/libs/spandsp/src/g722.c
freeswitch/trunk/libs/spandsp/src/hdlc.c
freeswitch/trunk/libs/spandsp/src/libspandsp.dsp
freeswitch/trunk/libs/spandsp/src/modem_connect_tones.c
freeswitch/trunk/libs/spandsp/src/msvc/config.h
freeswitch/trunk/libs/spandsp/src/sig_tone.c
freeswitch/trunk/libs/spandsp/src/spandsp/fsk.h
freeswitch/trunk/libs/spandsp/src/spandsp/private/fsk.h
freeswitch/trunk/libs/spandsp/src/spandsp/private/g726.h
freeswitch/trunk/libs/spandsp/src/spandsp/private/modem_connect_tones.h
freeswitch/trunk/libs/spandsp/src/spandsp/private/sig_tone.h
freeswitch/trunk/libs/spandsp/src/spandsp/private/t30.h
freeswitch/trunk/libs/spandsp/src/spandsp/version.h
freeswitch/trunk/libs/spandsp/src/t30.c
freeswitch/trunk/libs/spandsp/src/t38_gateway.c
freeswitch/trunk/libs/spandsp/src/v17rx.c
freeswitch/trunk/libs/spandsp/src/v27ter_rx.c
freeswitch/trunk/libs/spandsp/src/v29rx.c
freeswitch/trunk/libs/spandsp/tests/Makefile.am
Modified: freeswitch/trunk/libs/spandsp/src/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/Makefile.am (original)
+++ freeswitch/trunk/libs/spandsp/src/Makefile.am Fri Jan 30 11:00:50 2009
@@ -16,7 +16,7 @@
## License 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.116 2008/12/12 13:18:21 steveu Exp $
+## $Id: Makefile.am,v 1.118 2009/01/30 05:35:18 steveu Exp $
AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
AM_LDFLAGS = $(COMP_VENDOR_LDFLAGS)
@@ -28,6 +28,7 @@
libspandsp.dsp \
libspandsp.sln \
libspandsp.vcproj \
+ msvc/config.h \
msvc/gettimeofday.c \
msvc/inttypes.h \
msvc/tgmath.h \
@@ -38,7 +39,6 @@
msvc/msvcproj.foot \
msvc/vc8proj.head \
msvc/vc8proj.foot \
- msvc/config.h \
spandsp/private/README
INCLUDES = -I$(top_builddir)
Modified: freeswitch/trunk/libs/spandsp/src/bell_r2_mf.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/bell_r2_mf.c (original)
+++ freeswitch/trunk/libs/spandsp/src/bell_r2_mf.c Fri Jan 30 11:00:50 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: bell_r2_mf.c,v 1.34 2009/01/29 01:41:05 steveu Exp $
+ * $Id: bell_r2_mf.c,v 1.35 2009/01/29 18:30:14 steveu Exp $
*/
/*! \file */
@@ -312,7 +312,7 @@
if ((len = strlen(digits)) == 0)
return 0;
}
- if ((space = queue_free_space(&s->queue.queue)) < len)
+ if ((space = queue_free_space(&s->queue.queue)) < (size_t) len)
return len - space;
if (queue_write(&s->queue.queue, (const uint8_t *) digits, len) >= 0)
return 0;
Modified: freeswitch/trunk/libs/spandsp/src/dtmf.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/dtmf.c (original)
+++ freeswitch/trunk/libs/spandsp/src/dtmf.c Fri Jan 30 11:00:50 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: dtmf.c,v 1.47 2009/01/28 03:41:26 steveu Exp $
+ * $Id: dtmf.c,v 1.48 2009/01/29 18:30:14 steveu Exp $
*/
/*! \file dtmf.h */
@@ -485,7 +485,7 @@
if ((len = strlen(digits)) == 0)
return 0;
}
- if ((space = queue_free_space(&s->queue.queue)) < len)
+ if ((space = queue_free_space(&s->queue.queue)) < (size_t) len)
return len - space;
if (queue_write(&s->queue.queue, (const uint8_t *) digits, len) >= 0)
return 0;
Modified: freeswitch/trunk/libs/spandsp/src/fsk.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/fsk.c (original)
+++ freeswitch/trunk/libs/spandsp/src/fsk.c Fri Jan 30 11:00:50 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: fsk.c,v 1.49 2009/01/28 03:41:26 steveu Exp $
+ * $Id: fsk.c,v 1.50 2009/01/29 18:30:14 steveu Exp $
*/
/*! \file */
@@ -149,7 +149,7 @@
}
/*- End of function --------------------------------------------------------*/
-int fsk_tx(fsk_tx_state_t *s, int16_t *amp, int len)
+int fsk_tx(fsk_tx_state_t *s, int16_t amp[], int len)
{
int sample;
int bit;
Modified: freeswitch/trunk/libs/spandsp/src/g722.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/g722.c (original)
+++ freeswitch/trunk/libs/spandsp/src/g722.c Fri Jan 30 11:00:50 2009
@@ -28,7 +28,7 @@
* Computer Science, Speech Group
* Chengxiang Lu and Alex Hauptmann
*
- * $Id: g722.c,v 1.5 2009/01/28 03:41:26 steveu Exp $
+ * $Id: g722.c,v 1.6 2009/01/29 18:30:14 steveu Exp $
*/
/*! \file */
@@ -204,9 +204,9 @@
wd32 = ((p ^ s->p[0]) & 0x8000) ? wd1 : -wd1;
if (wd32 > 32767)
wd32 = 32767;
- wd3 = (((p ^ s->p[1]) & 0x8000) ? -128 : 128)
- + (wd32 >> 7)
- + (((int32_t) s->a[1]*(int32_t) 32512) >> 15);
+ wd3 = (int16_t) ((((p ^ s->p[1]) & 0x8000) ? -128 : 128)
+ + (wd32 >> 7)
+ + (((int32_t) s->a[1]*(int32_t) 32512) >> 15));
if (abs(wd3) > 12288)
wd3 = (wd3 < 0) ? -12288 : 12288;
ap[1] = wd3;
@@ -351,7 +351,7 @@
/* Block 2L, INVQAL */
wd2 = qm4[wd1];
- dlow = ((int32_t) s->band[0].det*(int32_t) wd2) >> 15;
+ dlow = (int16_t) (((int32_t) s->band[0].det*(int32_t) wd2) >> 15);
/* Block 3L, LOGSCL */
wd2 = rl42[wd1];
@@ -361,13 +361,13 @@
wd1 = 0;
else if (wd1 > 18432)
wd1 = 18432;
- s->band[0].nb = wd1;
+ s->band[0].nb = (int16_t) wd1;
/* Block 3L, SCALEL */
wd1 = (s->band[0].nb >> 6) & 31;
wd2 = 8 - (s->band[0].nb >> 11);
wd3 = (wd2 < 0) ? (ilb[wd1] << -wd2) : (ilb[wd1] >> wd2);
- s->band[0].det = wd3 << 2;
+ s->band[0].det = (int16_t) (wd3 << 2);
block4(&s->band[0], dlow);
@@ -375,7 +375,7 @@
{
/* Block 2H, INVQAH */
wd2 = qm2[ihigh];
- dhigh = ((int32_t) s->band[1].det*(int32_t) wd2) >> 15;
+ dhigh = (int16_t) (((int32_t) s->band[1].det*(int32_t) wd2) >> 15);
/* Block 5H, RECONS */
/* Block 6H, LIMIT */
rhigh = saturate15(dhigh + s->band[1].s);
@@ -388,13 +388,13 @@
wd1 = 0;
else if (wd1 > 22528)
wd1 = 22528;
- s->band[1].nb = wd1;
+ s->band[1].nb = (int16_t) wd1;
/* Block 3H, SCALEH */
wd1 = (s->band[1].nb >> 6) & 31;
wd2 = 10 - (s->band[1].nb >> 11);
wd3 = (wd2 < 0) ? (ilb[wd1] << -wd2) : (ilb[wd1] >> wd2);
- s->band[1].det = wd3 << 2;
+ s->band[1].det = (int16_t) (wd3 << 2);
block4(&s->band[1], dhigh);
}
@@ -413,8 +413,8 @@
else
{
/* Apply the QMF to build the final signal */
- s->x[s->ptr] = rlow + rhigh;
- s->y[s->ptr] = rlow - rhigh;
+ s->x[s->ptr] = (int16_t) (rlow + rhigh);
+ 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);
@@ -509,8 +509,8 @@
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 = (sumeven + sumodd) >> 13;
- xhigh = (sumeven - sumodd) >> 13;
+ xlow = (int16_t) ((sumeven + sumodd) >> 13);
+ xhigh = (int16_t) ((sumeven - sumodd) >> 13);
}
}
/* Block 1L, SUBTRA */
@@ -530,12 +530,12 @@
/* Block 2L, INVQAL */
ril = ilow >> 2;
wd2 = qm4[ril];
- dlow = ((int32_t) s->band[0].det*(int32_t) wd2) >> 15;
+ dlow = (int16_t) (((int32_t) s->band[0].det*(int32_t) wd2) >> 15);
/* Block 3L, LOGSCL */
il4 = rl42[ril];
wd = ((int32_t) s->band[0].nb*(int32_t) 127) >> 7;
- s->band[0].nb = wd + wl[il4];
+ s->band[0].nb = (int16_t) (wd + wl[il4]);
if (s->band[0].nb < 0)
s->band[0].nb = 0;
else if (s->band[0].nb > 18432)
@@ -545,7 +545,7 @@
wd1 = (s->band[0].nb >> 6) & 31;
wd2 = 8 - (s->band[0].nb >> 11);
wd3 = (wd2 < 0) ? (ilb[wd1] << -wd2) : (ilb[wd1] >> wd2);
- s->band[0].det = wd3 << 2;
+ s->band[0].det = (int16_t) (wd3 << 2);
block4(&s->band[0], dlow);
@@ -567,12 +567,12 @@
/* Block 2H, INVQAH */
wd2 = qm2[ihigh];
- dhigh = ((int32_t) s->band[1].det*(int32_t) wd2) >> 15;
+ dhigh = (int16_t) (((int32_t) s->band[1].det*(int32_t) wd2) >> 15);
/* Block 3H, LOGSCH */
ih2 = rh2[ihigh];
wd = ((int32_t) s->band[1].nb*(int32_t) 127) >> 7;
- s->band[1].nb = wd + wh[ih2];
+ s->band[1].nb = (int16_t) (wd + wh[ih2]);
if (s->band[1].nb < 0)
s->band[1].nb = 0;
else if (s->band[1].nb > 22528)
@@ -582,7 +582,7 @@
wd1 = (s->band[1].nb >> 6) & 31;
wd2 = 10 - (s->band[1].nb >> 11);
wd3 = (wd2 < 0) ? (ilb[wd1] << -wd2) : (ilb[wd1] >> wd2);
- s->band[1].det = wd3 << 2;
+ s->band[1].det = (int16_t) (wd3 << 2);
block4(&s->band[1], dhigh);
code = ((ihigh << 6) | ilow) >> (8 - s->bits_per_sample);
Modified: freeswitch/trunk/libs/spandsp/src/hdlc.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/hdlc.c (original)
+++ freeswitch/trunk/libs/spandsp/src/hdlc.c Fri Jan 30 11:00:50 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: hdlc.c,v 1.64 2009/01/05 13:48:31 steveu Exp $
+ * $Id: hdlc.c,v 1.66 2009/01/30 07:19:25 steveu Exp $
*/
/*! \file */
@@ -527,16 +527,16 @@
int hdlc_tx_get(hdlc_tx_state_t *s, uint8_t buf[], size_t max_len)
{
- int i;
+ size_t i;
int x;
for (i = 0; i < max_len; i++)
{
if ((x = hdlc_tx_get_byte(s)) == SIG_STATUS_END_OF_DATA)
return i;
- buf[i] = x;
+ buf[i] = (uint8_t) x;
}
- return i;
+ return (int) i;
}
/*- End of function --------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/libspandsp.dsp
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/libspandsp.dsp (original)
+++ freeswitch/trunk/libs/spandsp/src/libspandsp.dsp Fri Jan 30 11:00:50 2009
@@ -397,7 +397,7 @@
# End Source File
# Begin Source File
-SOURCE=.\msvc/gettimeofday.c
+SOURCE=.\.\msvc\gettimeofday.c
# End Source File
# End Group
# Begin Group "Header Files"
Modified: freeswitch/trunk/libs/spandsp/src/modem_connect_tones.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/modem_connect_tones.c (original)
+++ freeswitch/trunk/libs/spandsp/src/modem_connect_tones.c Fri Jan 30 11:00:50 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: modem_connect_tones.c,v 1.31 2009/01/28 03:41:27 steveu Exp $
+ * $Id: modem_connect_tones.c,v 1.32 2009/01/29 18:30:14 steveu Exp $
*/
/*! \file */
@@ -90,7 +90,7 @@
int16_t amp[],
int len)
{
- int mod;
+ int16_t mod;
int i;
int xlen;
@@ -165,7 +165,7 @@
}
for ( ; i < len; i++)
{
- mod = s->level + dds_mod(&s->mod_phase, s->mod_phase_rate, s->mod_level, 0);
+ mod = (int16_t) (s->level + dds_mod(&s->mod_phase, s->mod_phase_rate, s->mod_level, 0));
amp[i] = dds_mod(&s->tone_phase, s->tone_phase_rate, mod, 0);
}
s->duration_timer -= len;
@@ -186,7 +186,7 @@
s->hop_timer = ms_to_samples(450);
s->tone_phase += 0x80000000;
}
- mod = s->level + dds_mod(&s->mod_phase, s->mod_phase_rate, s->mod_level, 0);
+ mod = (int16_t) (s->level + dds_mod(&s->mod_phase, s->mod_phase_rate, s->mod_level, 0));
amp[i] = dds_mod(&s->tone_phase, s->tone_phase_rate, mod, 0);
}
s->duration_timer -= len;
Modified: freeswitch/trunk/libs/spandsp/src/msvc/config.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/msvc/config.h (original)
+++ freeswitch/trunk/libs/spandsp/src/msvc/config.h Fri Jan 30 11:00:50 2009
@@ -10,10 +10,11 @@
*
* This file is released in the public domain.
*
+ * $Id: config.h,v 1.1 2009/01/29 18:30:14 steveu Exp $
*/
-#if !defined(_SPANDSP_CONFIG_H_)
-#define _SPANDSP_CONFIG_H_
+#if !defined(_MSVC_CONFIG_H_)
+#define _MSVC_CONFIG_H_
#define HAVE_SINF
#define HAVE_COSF
Modified: freeswitch/trunk/libs/spandsp/src/sig_tone.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/sig_tone.c (original)
+++ freeswitch/trunk/libs/spandsp/src/sig_tone.c Fri Jan 30 11:00:50 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: sig_tone.c,v 1.28 2009/01/28 03:41:27 steveu Exp $
+ * $Id: sig_tone.c,v 1.29 2009/01/30 07:19:25 steveu Exp $
*/
/*! \file */
@@ -457,7 +457,7 @@
this isn't used in low tone detect mode, but we must keep notch_zl
rolling along. */
s->tone[j].notch_zl = ((s->tone[j].notch_zl*s->desc->notch_slugi) >> 15)
- + ((abs(notched_signal)*s->desc->notch_slugp) >> 15);
+ + ((abs((int) notched_signal)*s->desc->notch_slugp) >> 15);
/* Mow the grass to weed out the noise! */
mown_notch[j] = s->tone[0].notch_zl & s->desc->notch_threshold;
}
@@ -505,7 +505,7 @@
#endif
/* Leaky integrate the bandpassed data */
s->broad_zl = ((s->broad_zl*s->desc->broad_slugi) >> 15)
- + ((abs(bandpass_signal)*s->desc->broad_slugp) >> 15);
+ + ((abs((int) bandpass_signal)*s->desc->broad_slugp) >> 15);
/* For the broad band receiver we use a simple linear threshold! */
if (s->tone_present)
@@ -557,7 +557,7 @@
/* Modulus and leaky integrate the data */
s->broad_zl = ((s->broad_zl*s->desc->unfiltered_slugi) >> 15)
- + ((abs(amp[i])*s->desc->unfiltered_slugp) >> 15);
+ + ((abs((int) amp[i])*s->desc->unfiltered_slugp) >> 15);
/* Mow the grass to weed out the noise! */
mown_bandpass = s->broad_zl & s->desc->unfiltered_threshold;
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/fsk.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/fsk.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/fsk.h Fri Jan 30 11:00:50 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: fsk.h,v 1.32 2008/10/13 13:14:00 steveu Exp $
+ * $Id: fsk.h,v 1.33 2009/01/29 18:30:14 steveu Exp $
*/
/*! \file */
@@ -170,7 +170,7 @@
\param len The number of samples to be generated.
\return The number of samples actually generated.
*/
-int fsk_tx(fsk_tx_state_t *s, int16_t *amp, int len);
+int fsk_tx(fsk_tx_state_t *s, int16_t amp[], int len);
/*! Get the current received signal power.
\param s The modem context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/private/fsk.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/private/fsk.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/private/fsk.h Fri Jan 30 11:00:50 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: fsk.h,v 1.1 2008/10/13 13:14:01 steveu Exp $
+ * $Id: fsk.h,v 1.2 2009/01/29 18:30:14 steveu Exp $
*/
#if !defined(_SPANDSP_PRIVATE_FSK_H_)
@@ -46,7 +46,7 @@
void *status_user_data;
int32_t phase_rates[2];
- int scaling;
+ int16_t scaling;
int32_t current_phase_rate;
uint32_t phase_acc;
int baud_frac;
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/private/g726.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/private/g726.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/private/g726.h Fri Jan 30 11:00:50 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: g726.h,v 1.2 2008/11/16 12:20:57 steveu Exp $
+ * $Id: g726.h,v 1.3 2009/01/29 18:30:14 steveu Exp $
*/
#if !defined(_SPANDSP_PRIVATE_G726_H_)
@@ -44,7 +44,7 @@
/*! The external coding, for tandem operation */
int ext_coding;
/*! The number of bits per sample */
- unsigned int bits_per_sample;
+ int bits_per_sample;
/*! One of the G.726_PACKING_xxx options */
int packing;
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/private/modem_connect_tones.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/private/modem_connect_tones.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/private/modem_connect_tones.h Fri Jan 30 11:00:50 2009
@@ -24,7 +24,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: modem_connect_tones.h,v 1.1 2008/10/13 13:14:01 steveu Exp $
+ * $Id: modem_connect_tones.h,v 1.2 2009/01/29 18:30:14 steveu Exp $
*/
/*! \file */
@@ -42,14 +42,14 @@
int32_t tone_phase_rate;
uint32_t tone_phase;
- int level;
+ int16_t level;
/*! \brief Countdown to the next phase hop */
int hop_timer;
/*! \brief Maximum duration timer */
int duration_timer;
uint32_t mod_phase;
int32_t mod_phase_rate;
- int mod_level;
+ int16_t mod_level;
};
/*!
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/private/sig_tone.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/private/sig_tone.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/private/sig_tone.h Fri Jan 30 11:00:50 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: sig_tone.h,v 1.1 2008/11/30 13:08:42 steveu Exp $
+ * $Id: sig_tone.h,v 1.2 2009/01/30 07:19:25 steveu Exp $
*/
#if !defined(_SPANDSP_PRIVATE_SIG_TONE_H_)
@@ -121,7 +121,7 @@
sig_tone_descriptor_t *desc;
/*! The scaling values for the high and low level tones */
- int32_t tone_scaling[2];
+ int16_t tone_scaling[2];
/*! The sample timer, used to switch between the high and low level tones. */
int high_low_timer;
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/private/t30.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/private/t30.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/private/t30.h Fri Jan 30 11:00:50 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.h,v 1.2 2009/01/03 13:02:31 steveu Exp $
+ * $Id: t30.h,v 1.3 2009/01/29 18:30:14 steveu Exp $
*/
/*! \file */
@@ -236,7 +236,8 @@
partial pages still to come. */
int ecm_at_page_end;
int next_tx_step;
- int next_rx_step;
+ /* The FCF for the next receive step */
+ uint8_t next_rx_step;
/*! \brief Image file name for image reception. */
char rx_file[256];
/*! \brief The last page we are prepared accept for a received image file. -1 means no restriction. */
@@ -264,7 +265,7 @@
int ecm_allowed;
/*! \brief the FCF2 field of the last PPS message we received. */
- int last_pps_fcf2;
+ uint8_t last_pps_fcf2;
/*! \brief The number of the first ECM frame which we do not currently received correctly. For
a partial page received correctly, this will be one greater than the number of frames it
contains. */
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 Fri Jan 30 11:00:50 2009
@@ -30,8 +30,8 @@
/* The date and time of the version are in UTC form. */
-#define SPANDSP_RELEASE_DATE 20090129
-#define SPANDSP_RELEASE_TIME 014346
+#define SPANDSP_RELEASE_DATE 20090130
+#define SPANDSP_RELEASE_TIME 102456
#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 Fri Jan 30 11:00:50 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.279 2009/01/29 01:41:06 steveu Exp $
+ * $Id: t30.c,v 1.280 2009/01/29 18:30:14 steveu Exp $
*/
/*! \file */
@@ -568,7 +568,7 @@
}
/*- End of function --------------------------------------------------------*/
-static int check_next_tx_step(t30_state_t *s)
+static uint8_t check_next_tx_step(t30_state_t *s)
{
int more;
@@ -3107,7 +3107,7 @@
static void process_state_f_doc_ecm(t30_state_t *s, const uint8_t *msg, int len)
{
- int fcf2;
+ uint8_t fcf2;
/* This actually handles 2 states - _DOC_ECM and _POST_DOC_ECM - as they are very similar */
switch (msg[2] & 0xFE)
Modified: freeswitch/trunk/libs/spandsp/src/t38_gateway.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t38_gateway.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t38_gateway.c Fri Jan 30 11:00:50 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: t38_gateway.c,v 1.151 2009/01/28 03:41:27 steveu Exp $
+ * $Id: t38_gateway.c,v 1.152 2009/01/29 18:30:14 steveu Exp $
*/
/*! \file */
@@ -1605,7 +1605,7 @@
if (s->bit_no)
{
/* There is a fractional octet in progress. We might as well send every last bit we can. */
- s->data[s->data_ptr++] = s->bit_stream << (8 - s->bit_no);
+ s->data[s->data_ptr++] = (uint8_t) (s->bit_stream << (8 - s->bit_no));
}
t38_core_send_data(&t->t38x.t38, t->t38x.current_tx_data_type, T38_FIELD_T4_NON_ECM_SIG_END, s->data, s->data_ptr, t->t38x.t38.data_end_tx_count);
s->out_octets += s->data_ptr;
Modified: freeswitch/trunk/libs/spandsp/src/v17rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v17rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v17rx.c Fri Jan 30 11:00:50 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: v17rx.c,v 1.130 2009/01/29 01:41:06 steveu Exp $
+ * $Id: v17rx.c,v 1.131 2009/01/30 10:22:23 steveu Exp $
*/
/*! \file */
@@ -960,7 +960,7 @@
int i;
int step;
int16_t x;
- int32_t diff;
+ int16_t diff;
complexf_t z;
complexf_t zz;
complexf_t sample;
@@ -984,7 +984,8 @@
We need to measure the power with the DC blocked, but not using
a slow to respond DC blocker. Use the most elementary HPF. */
x = amp[i] >> 1;
- diff = (int32_t) x - s->last_sample;
+ /* There could be oveflow here, but it isn't a problem in practice */
+ diff = x - s->last_sample;
power = power_meter_update(&(s->power), diff);
#if defined(IAXMODEM_STUFF)
/* Quick power drop fudge */
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 Fri Jan 30 11:00:50 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_rx.c,v 1.114 2009/01/29 01:41:06 steveu Exp $
+ * $Id: v27ter_rx.c,v 1.115 2009/01/30 10:22:23 steveu Exp $
*/
/*! \file */
@@ -746,7 +746,7 @@
int i;
int step;
int16_t x;
- int32_t diff;
+ int16_t diff;
#if defined(SPANDSP_USE_FIXED_POINT)
complexi16_t z;
complexi16_t zz;
@@ -772,7 +772,8 @@
We need to measure the power with the DC blocked, but not using
a slow to respond DC blocker. Use the most elementary HPF. */
x = amp[i] >> 1;
- diff = (int32_t) x - s->last_sample;
+ /* There could be oveflow here, but it isn't a problem in practice */
+ diff = x - s->last_sample;
power = power_meter_update(&(s->power), diff);
#if defined(IAXMODEM_STUFF)
/* Quick power drop fudge */
@@ -893,6 +894,7 @@
We need to measure the power with the DC blocked, but not using
a slow to respond DC blocker. Use the most elementary HPF. */
x = amp[i] >> 1;
+ /* There could be oveflow here, but it isn't a problem in practice */
diff = x - s->last_sample;
power = power_meter_update(&(s->power), diff);
#if defined(IAXMODEM_STUFF)
Modified: freeswitch/trunk/libs/spandsp/src/v29rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v29rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v29rx.c Fri Jan 30 11:00:50 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: v29rx.c,v 1.151 2009/01/29 01:41:06 steveu Exp $
+ * $Id: v29rx.c,v 1.152 2009/01/30 10:22:23 steveu Exp $
*/
/*! \file */
@@ -834,7 +834,7 @@
int i;
int step;
int16_t x;
- int32_t diff;
+ int16_t diff;
#if defined(SPANDSP_USE_FIXED_POINT)
complexi16_t z;
complexi16_t zz;
@@ -858,7 +858,8 @@
We need to measure the power with the DC blocked, but not using
a slow to respond DC blocker. Use the most elementary HPF. */
x = amp[i] >> 1;
- diff = (int32_t) x - s->last_sample;
+ /* There could be oveflow here, but it isn't a problem in practice */
+ diff = x - s->last_sample;
power = power_meter_update(&(s->power), diff);
#if defined(IAXMODEM_STUFF)
/* Quick power drop fudge */
Modified: freeswitch/trunk/libs/spandsp/tests/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/Makefile.am (original)
+++ freeswitch/trunk/libs/spandsp/tests/Makefile.am Fri Jan 30 11:00:50 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.108 2008/11/30 10:17:31 steveu Exp $
+## $Id: Makefile.am,v 1.109 2009/01/30 05:35:18 steveu Exp $
AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
AM_LDFLAGS = $(COMP_VENDOR_LDFLAGS)
@@ -64,9 +64,9 @@
line_model_tests \
logging_tests \
lpc10_tests \
+ make_g168_css \
modem_connect_tones_tests \
modem_echo_tests \
- make_g168_css \
noise_tests \
oki_adpcm_tests \
playout_tests \
1
0
[Freeswitch-svn] [commit] r11562 - in freeswitch/trunk: conf/sip_profiles src/mod/endpoints/mod_sofia
by FreeSWITCH SVN 30 Jan '09
by FreeSWITCH SVN 30 Jan '09
30 Jan '09
Author: brian
Date: Fri Jan 30 10:46:37 2009
New Revision: 11562
Log:
MODENDP-179 - Support for SLA, works with Polycom and Snom(Sylantro mode). Thank you Matthew Kaufman. Might still need more work.
Added:
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_sla.c
Modified:
freeswitch/trunk/conf/sip_profiles/internal.xml
freeswitch/trunk/src/mod/endpoints/mod_sofia/Makefile.am
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
Modified: freeswitch/trunk/conf/sip_profiles/internal.xml
==============================================================================
--- freeswitch/trunk/conf/sip_profiles/internal.xml (original)
+++ freeswitch/trunk/conf/sip_profiles/internal.xml Fri Jan 30 10:46:37 2009
@@ -62,7 +62,7 @@
<param name="record-template" value="$${base_dir}/recordings/${caller_id_number}.${target_domain}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
<!--enable to use presence -->
<param name="manage-presence" value="true"/>
-
+ <!--<param name="manage-shared-appearance" value="true"/>-->
<!-- used to share presence info across sofia profiles -->
<!-- Name of the db to use for this profile -->
<!--<param name="dbname" value="share_presence"/>-->
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/Makefile.am
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/Makefile.am (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/Makefile.am Fri Jan 30 10:46:37 2009
@@ -17,7 +17,7 @@
SOFIALA=$(SOFIAUA_DIR)/libsofia-sip-ua.la
mod_LTLIBRARIES = mod_sofia.la
-mod_sofia_la_SOURCES = mod_sofia.c sofia.c sofia_glue.c sofia_presence.c sofia_reg.c mod_sofia.h
+mod_sofia_la_SOURCES = mod_sofia.c sofia.c sofia_glue.c sofia_presence.c sofia_reg.c sofia_sla.c mod_sofia.h
mod_sofia_la_CFLAGS = $(AM_CFLAGS)
mod_sofia_la_CFLAGS += -I. -I$(SOFIAUA_DIR)/bnf -I$(SOFIAUA_DIR)/features
mod_sofia_la_CFLAGS += -I$(SOFIAUA_DIR)/http -I$(SOFIAUA_DIR)/ipt
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 Fri Jan 30 10:46:37 2009
@@ -375,6 +375,7 @@
char *tls_bindurl;
char *tcp_contact;
char *tls_contact;
+ char *sla_contact;
char *sipdomain;
char *timer_name;
char *hold_music;
@@ -439,6 +440,7 @@
sofia_media_options_t media_options;
uint32_t force_subscription_expires;
switch_rtp_bug_flag_t auto_rtp_bugs;
+ char manage_shared_appearance; /* pflags was all full up - MTK */
};
struct private_object {
@@ -474,7 +476,6 @@
char *from_address;
char *to_address;
char *callid;
- char *far_end_contact;
char *contact_url;
char *from_str;
char *rpid;
@@ -771,3 +772,14 @@
switch_status_t sofia_glue_tech_set_codec(private_object_t *tech_pvt, int force);
void sofia_wait_for_reply(struct private_object *tech_pvt, nua_event_t event, uint32_t timeout);
void sofia_glue_set_image_sdp(private_object_t *tech_pvt, switch_t38_options_t *t38_options);
+
+/*
+ * SLA (shared line appearance) entrypoints
+ */
+
+void sofia_sla_handle_register(nua_t *nua, sofia_profile_t *profile, sip_t const *sip);
+void sofia_sla_handle_sip_i_publish(nua_t *nua, sofia_profile_t *profile, nua_handle_t *nh, sip_t const *sip, tagi_t tags[]);
+void sofia_sla_handle_sip_i_subscribe(nua_t *nua, sofia_profile_t *profile, nua_handle_t *nh, sip_t const *sip, tagi_t tags[]);
+void sofia_sla_handle_sip_r_subscribe(nua_t *nua, sofia_profile_t *profile, nua_handle_t *nh, sip_t const *sip, tagi_t tags[]);
+void sofia_sla_handle_sip_i_notify(nua_t *nua, sofia_profile_t *profile, nua_handle_t *nh, sip_t const *sip, tagi_t tags[]);
+
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 Fri Jan 30 10:46:37 2009
@@ -94,8 +94,33 @@
goto error;
}
+ /* the following could be refactored back to the calling event handler here in sofia.c XXX MTK */
+ /* potentially interesting note: for Linksys shared appearance, we'll probably have to set up to get bare notifies
+ * and pass them inward to the sla handler. we'll have to set NUTAG_APPL_METHOD("NOTIFY") when creating
+ * nua, and also pick them off special elsewhere here in sofia.c - MTK
+ * *and* for Linksys, I believe they use "sa" as their magic appearance agent name for those blind notifies, so
+ * we'll probably have to change to match
+ */
+ if (profile->manage_shared_appearance) {
+
+ if (!strncmp(sip->sip_request->rq_url->url_user, "sla-agent", sizeof("sla-agent"))) {
+ int sub_state;
+ tl_gets(tags, NUTAG_SUBSTATE_REF(sub_state), TAG_END());
+
+ sofia_sla_handle_sip_i_notify(nua, profile, nh, sip, tags);
+
+ if (sub_state == nua_substate_terminated) {
+ nua_handle_bind(nh, NULL);
+ nua_handle_destroy(nh);
+ }
+
+ return;
+ }
+ }
+
/* Automatically return a 200 OK for Event: keep-alive */
if (!strcasecmp(sip->sip_event->o_type, "keep-alive")) {
+ /* XXX MTK - is this right? in this case isn't sofia is already sending a 200 itself also? */
nua_respond(nh, SIP_200_OK, NUTAG_WITH_THIS(nua), TAG_END());
return;
}
@@ -305,6 +330,7 @@
switch_channel_t *channel = NULL;
sofia_gateway_t *gateway = NULL;
int locked = 0;
+ int check_destroy = 1;
if (sofia_private && sofia_private != &mod_sofia_globals.destroy_private && sofia_private != &mod_sofia_globals.keep_private) {
if ((gateway = sofia_private->gateway)) {
@@ -476,8 +502,23 @@
switch (event) {
case nua_i_subscribe:
+ case nua_r_notify:
+ check_destroy = 0;
+ break;
+
+ case nua_i_notify:
+
+ if (sip->sip_event && !strcmp(sip->sip_event->o_type, "dialog") && sip->sip_event->o_params && !strcmp(sip->sip_event->o_params[0], "sla")) {
+ check_destroy = 0;
+ }
+
break;
default:
+ break;
+ }
+
+
+ if (check_destroy) {
if (nh && ((sofia_private && sofia_private->destroy_nh) || !nua_handle_magic(nh))) {
if (sofia_private) {
nua_handle_bind(nh, NULL);
@@ -485,9 +526,8 @@
nua_handle_destroy(nh);
nh = NULL;
}
- break;
}
-
+
if (sofia_private && sofia_private->destroy_me) {
if (nh) {
nua_handle_bind(nh, NULL);
@@ -719,9 +759,9 @@
TAG_IF(profile->pres_type, NUTAG_ALLOW("SUBSCRIBE")),
TAG_IF(profile->pres_type, NUTAG_ENABLEMESSAGE(1)),
TAG_IF(profile->pres_type, NUTAG_ALLOW_EVENTS("presence")),
- TAG_IF(profile->pres_type, NUTAG_ALLOW_EVENTS("dialog")),
+ TAG_IF((profile->pres_type || profile->manage_shared_appearance), NUTAG_ALLOW_EVENTS("dialog")),
TAG_IF(profile->pres_type, NUTAG_ALLOW_EVENTS("call-info")),
- TAG_IF(profile->pres_type, NUTAG_ALLOW_EVENTS("sla")),
+ TAG_IF((profile->pres_type || profile->manage_shared_appearance), NUTAG_ALLOW_EVENTS("sla")),
TAG_IF(profile->pres_type, NUTAG_ALLOW_EVENTS("include-session-description")),
TAG_IF(profile->pres_type, NUTAG_ALLOW_EVENTS("presence.winfo")),
TAG_IF(profile->pres_type, NUTAG_ALLOW_EVENTS("message-summary")),
@@ -738,7 +778,6 @@
nua_set_params(node->nua,
NUTAG_APPL_METHOD("OPTIONS"),
- NUTAG_EARLY_MEDIA(1),
NUTAG_AUTOANSWER(0),
NUTAG_AUTOALERT(0),
TAG_IF((profile->mflags & MFLAG_REGISTER), NUTAG_ALLOW("REGISTER")),
@@ -1954,6 +1993,11 @@
} else if (switch_true(val)) {
profile->pres_type = PRES_TYPE_FULL;
}
+ } else if (!strcasecmp(var, "manage-shared-appearance")) {
+ if (switch_true(val)) {
+ profile->manage_shared_appearance = 1;
+ profile->sla_contact = switch_core_sprintf(profile->pool, "sip:sla-agent@%s", profile->sipip);
+ }
} else if (!strcasecmp(var, "unregister-on-options-fail")) {
if (switch_true(val)) {
profile->pflags |= PFLAG_UNREG_OPTIONS_FAIL;
@@ -4282,7 +4326,78 @@
}
}
+ if (sip->sip_replaces) {
+ nua_handle_t *bnh;
+ if ((bnh = nua_handle_by_replaces(nua, sip->sip_replaces))) {
+ sofia_private_t *b_private = NULL;
+ if ((b_private = nua_handle_magic(bnh))) {
+ switch_core_session_t *b_session = NULL;
+ if ((b_session = switch_core_session_locate(b_private->uuid))) {
+ switch_channel_t *b_channel = switch_core_session_get_channel(b_session);
+ const char *uuid;
+ int one_leg = 1;
+ private_object_t *b_tech_pvt = NULL;
+ const char *app = switch_channel_get_variable(b_channel, SWITCH_CURRENT_APPLICATION_VARIABLE);
+ const char *data = switch_channel_get_variable(b_channel, SWITCH_CURRENT_APPLICATION_DATA_VARIABLE);
+
+ if (app && data && !strcasecmp(app, "conference")) {
+ destination_number = switch_core_session_sprintf(b_session, "answer,conference:%s", data);
+ dialplan = "inline";
+ } else {
+ if (switch_core_session_check_interface(b_session, sofia_endpoint_interface)) {
+ b_tech_pvt = switch_core_session_get_private(b_session);
+ }
+
+ if ((uuid = switch_channel_get_variable(b_channel, SWITCH_SIGNAL_BOND_VARIABLE))) {
+ one_leg = 0;
+ } else {
+ uuid = switch_core_session_get_uuid(b_session);
+ }
+
+ if (uuid) {
+ switch_core_session_t *c_session = NULL;
+ int do_conf = 0;
+
+ uuid = switch_core_session_strdup(b_session, uuid);
+
+ if ((c_session = switch_core_session_locate(uuid))) {
+ switch_channel_t *c_channel = switch_core_session_get_channel(c_session);
+ private_object_t *c_tech_pvt = NULL;
+
+ if (switch_core_session_check_interface(c_session, sofia_endpoint_interface)) {
+ c_tech_pvt = switch_core_session_get_private(c_session);
+ }
+
+ if (!one_leg &&
+ (!b_tech_pvt || !switch_test_flag(b_tech_pvt, TFLAG_SIP_HOLD)) &&
+ (!c_tech_pvt || !switch_test_flag(c_tech_pvt, TFLAG_SIP_HOLD))) {
+ char *ext = switch_core_session_sprintf(b_session, "conference:%s@sla+flags{mintwo}", uuid);
+
+ switch_channel_set_flag(c_channel, CF_REDIRECT);
+ switch_ivr_session_transfer(b_session, ext, "inline", NULL);
+ switch_ivr_session_transfer(c_session, ext, "inline", NULL);
+ switch_channel_clear_flag(c_channel, CF_REDIRECT);
+ do_conf = 1;
+ }
+ switch_core_session_rwunlock(c_session);
+ }
+
+ if (do_conf) {
+ destination_number = switch_core_session_sprintf(b_session, "answer,conference:%s@sla+flags{mintwo}", uuid);
+ } else {
+ destination_number = switch_core_session_sprintf(b_session, "answer,intercept:%s", uuid);
+ }
+
+ dialplan = "inline";
+ }
+ }
+ switch_core_session_rwunlock(b_session);
+ }
+ }
+ nua_handle_unref(bnh);
+ }
+ }
check_decode(displayname, session);
tech_pvt->caller_profile = switch_caller_profile_new(switch_core_session_get_pool(session),
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c Fri Jan 30 10:46:37 2009
@@ -3040,6 +3040,16 @@
" hostname VARCHAR(255)\n"
");\n";
+ /* should we move this glue to sofia_sla or keep it here where all db init happens? XXX MTK */
+ char shared_appearance_sql[] =
+ "CREATE TABLE sip_shared_appearance_subscriptions (\n"
+ " subscriber VARCHAR(255),\n"
+ " call_id VARCHAR(255),\n"
+ " aor VARCHAR(255),\n"
+ " profile_name VARCHAR(255),\n"
+ " hostname VARCHAR(255)\n"
+ ");\n";
+
if (profile->odbc_dsn) {
#ifdef SWITCH_HAVE_ODBC
if (!(profile->master_odbc = switch_odbc_handle_new(profile->odbc_dsn, profile->odbc_user, profile->odbc_pass))) {
@@ -3094,6 +3104,15 @@
}
free(test_sql);
+ if (profile->manage_shared_appearance) {
+ test_sql = switch_mprintf("delete from sip_shared_appearance_subscriptions where hostname='%q'", mod_sofia_globals.hostname);
+ if (switch_odbc_handle_exec(profile->master_odbc, test_sql, NULL) != SWITCH_ODBC_SUCCESS) {
+ switch_odbc_handle_exec(profile->master_odbc, "DROP TABLE sip_shared_appearance_subscriptions", NULL);
+ switch_odbc_handle_exec(profile->master_odbc, shared_appearance_sql, NULL);
+ }
+ free(test_sql);
+ }
+
#else
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ODBC IS NOT AVAILABLE!\n");
#endif
@@ -3125,6 +3144,16 @@
switch_core_db_test_reactive(profile->master_db, test_sql, "DROP TABLE sip_authentication", auth_sql);
free(test_sql);
+ if(profile->manage_shared_appearance) {
+ test_sql = switch_mprintf("delete from sip_shared_appearance_subscriptions where hostname='%q'", mod_sofia_globals.hostname);
+ switch_core_db_test_reactive(profile->master_db, test_sql, "DROP TABLE sip_shared_appearance_subscriptions", shared_appearance_sql);
+ free(test_sql);
+
+ switch_core_db_exec(profile->master_db, "create index if not exists ssa_hostname on sip_shared_appearance_subscriptions (hostname)", NULL, NULL, NULL);
+ /* XXX MTK create additional index for shared_appearance if necessary */
+ }
+
+
switch_core_db_exec(profile->master_db, "create index if not exists sr_call_id on sip_registrations (call_id)", NULL, NULL, NULL);
switch_core_db_exec(profile->master_db, "create index if not exists sr_sip_user on sip_registrations (sip_user)", NULL, NULL, NULL);
switch_core_db_exec(profile->master_db, "create index if not exists sr_sip_host on sip_registrations (sip_host)", NULL, NULL, NULL);
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c Fri Jan 30 10:46:37 2009
@@ -1423,6 +1423,17 @@
return;
}
+ /* the following could be refactored back to the calling event handler in sofia.c XXX MTK */
+ if (profile->manage_shared_appearance) {
+ if (!strncmp(sip->sip_request->rq_url->url_user, "sla-agent", sizeof("sla-agent"))) {
+ /* only fire this on <200 to try to avoid resubscribes. probably better ways to do this? */
+ if (status < 200) {
+ sofia_sla_handle_sip_i_subscribe(nua, profile, nh, sip, tags);
+ }
+ return;
+ }
+ }
+
get_addr(network_ip, sizeof(network_ip), my_addrinfo->ai_addr, my_addrinfo->ai_addrlen);
network_port = ntohs(((struct sockaddr_in *) msg_addrinfo(nua_current_request(nua))->ai_addr)->sin_port);
@@ -1767,6 +1778,14 @@
return;
}
+ /* the following could possibly be refactored back towards the calling event handler in sofia.c XXX MTK */
+ if (profile->manage_shared_appearance) {
+ if (!strcasecmp(o->o_type, "dialog") && msg_params_find(o->o_params, "sla")) {
+ sofia_sla_handle_sip_r_subscribe(nua, profile, nh, sip, tags);
+ return;
+ }
+ }
+
if (!sofia_private || !sofia_private->gateway) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Gateway information missing\n");
return;
@@ -1810,6 +1829,15 @@
sip_payload_t *payload = sip->sip_payload;
char *event_type;
+ /* the following could instead be refactored back to the calling event handler in sofia.c XXX MTK */
+ if (profile->manage_shared_appearance) {
+ /* also it probably is unsafe to dereference so many things in a row without testing XXX MTK */
+ if (!strncmp(sip->sip_request->rq_url->url_user, "sla-agent", sizeof("sla-agent"))) {
+ sofia_sla_handle_sip_i_publish(nua, profile, nh, sip, tags);
+ return;
+ }
+ }
+
if (from) {
from_user = (char *) from->a_url->url_user;
from_host = (char *) from->a_url->url_host;
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c Fri Jan 30 10:46:37 2009
@@ -1102,6 +1102,10 @@
switch_event_fire(&s_event);
}
+ if (profile->manage_shared_appearance) {
+ sofia_sla_handle_register(nua, profile, sip);
+ }
+
return 1;
}
Added: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_sla.c
==============================================================================
--- (empty file)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_sla.c Fri Jan 30 10:46:37 2009
@@ -0,0 +1,241 @@
+/*
+ * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
+ * Copyright (C) 2005/2006, Anthony Minessale II <anthmct(a)yahoo.com>
+ *
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
+ *
+ * The Initial Developer of the Original Code is
+ * Anthony Minessale II <anthmct(a)yahoo.com>
+ * Portions created by the Initial Developer are Copyright (C)
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Anthony Minessale II <anthmct(a)yahoo.com>
+ * Ken Rice, Asteria Solutions Group, Inc <ken(a)asteriasgi.com>
+ * Paul D. Tinsley <pdt at jackhammer.org>
+ * Bret McDanel <trixter AT 0xdecafbad.com>
+ *
+ *
+ * sofia_sla.c -- SOFIA SIP Endpoint (support for shared line appearance)
+ * This file (and calls into it) developed by Matthew T Kaufman <matthew(a)matthew.at>
+ *
+ */
+#include "mod_sofia.h"
+
+
+static int sofia_sla_sub_callback(void *pArg, int argc, char **argv, char **columnNames);
+
+
+void sofia_sla_handle_register(nua_t *nua, sofia_profile_t *profile, sip_t const *sip)
+{
+ nua_handle_t *nh;
+
+ /* TODO:
+ * check to see if it says in the group or extension xml that we are handling SLA for this AOR
+ * check to see if we're already subscribed and the call-id in the subscribe matches. if so,
+ * we can skip this, which would keep us from re-subscribing which would also keep us from
+ * leaking so horribly much memory like we do now
+ */
+
+ nh = nua_handle(nua, NULL, NUTAG_URL(sip->sip_contact->m_url), TAG_NULL());
+
+ /* we make up and bind a sofia_private so that the existing event handler destruction code won't be confused by us */
+ /* (though it isn't clear that this is sufficient... we still have break cases for nua_i_notify and nua_r_notify
+ * in sofia_event_callback's destruction end because if we don't, the handle gets destroyed. or maybe it is
+ * something else i'm doing wrong? MTK
+
+ mod_sofia_globals.keep_private is a magic static private things can share for this purpose: ACM
+ */
+
+ nua_handle_bind(nh, &mod_sofia_globals.keep_private);
+
+
+ nua_subscribe(nh,
+ SIPTAG_TO(sip->sip_to),
+ SIPTAG_FROM(sip->sip_to), // ?
+ SIPTAG_CONTACT_STR(profile->sla_contact),
+ SIPTAG_EXPIRES_STR("3500"), /* ok, this is totally fake here XXX MTK */
+ SIPTAG_EVENT_STR("dialog;sla"), /* some phones want ;include-session-description too? */
+ TAG_NULL());
+}
+
+void sofia_sla_handle_sip_i_publish(nua_t *nua, sofia_profile_t *profile, nua_handle_t *nh, sip_t const *sip, tagi_t tags[])
+{
+ /* at present there's no SLA versions that we deal with that do publish. to be safe, we say "OK" */
+ nua_respond(nh, SIP_200_OK, NUTAG_WITH_THIS(nua), TAG_END());
+}
+
+void sofia_sla_handle_sip_i_subscribe(nua_t *nua, sofia_profile_t *profile, nua_handle_t *nh, sip_t const *sip, tagi_t tags[])
+{
+ char *aor = NULL;
+ char *subscriber = NULL;
+ char *sql = NULL;
+
+ /*
+ * XXX MTK FIXME - we don't look at the tag to see if NUTAG_SUBSTATE(nua_substate_terminated) or
+ * a Subscription-State header with state "terminated" and/or expiration of 0. So we never forget
+ * about them here.
+ * likewise, we also don't have a hook against nua_r_notify events, so we can't see nua_substate_terminated there.
+ */
+
+ /*
+ * extracting AOR is weird...
+ * the From is the main extension, not the third-party one...
+ * and the contact has the phone's own network address, not the AOR address
+ * so we do what openser's pua_bla does and...
+ */
+
+ aor = switch_mprintf("sip:%s@%s",sip->sip_contact->m_url->url_user, sip->sip_from->a_url->url_host);
+
+ /*
+ * ok, and now that we HAVE the AOR, we REALLY should go check in the XML config and see if this particular
+ * extension is set up to have shared appearances managed. right now it is all-or-nothing on the profile,
+ * which won't be sufficient for real life. FIXME XXX MTK
+ */
+
+ /* then the subscriber is the user at their network location... this is arguably the wrong way, but works so far... */
+
+ subscriber = switch_mprintf("sip:%s@%s",sip->sip_from->a_url->url_user, sip->sip_contact->m_url->url_host);
+
+
+ if ((sql =
+ switch_mprintf("delete from sip_shared_appearance_subscriptions where subscriber='%q' and profile name='%q' and hostname='%q'",
+ subscriber, profile->name, mod_sofia_globals.hostname
+ ))) {
+ sofia_glue_execute_sql(profile, &sql, SWITCH_TRUE);
+ }
+
+ if ((sql =
+ switch_mprintf("insert into sip_shared_appearance_subscriptions (subscriber, call_id, aor, profile_name, hostname) "
+ "values ('%q','%q','%q','%q','%q')",
+ subscriber, sip->sip_call_id->i_id, aor, profile->name, mod_sofia_globals.hostname))) {
+ sofia_glue_execute_sql(profile, &sql, SWITCH_TRUE);
+ }
+
+
+
+ nua_respond(nh, SIP_202_ACCEPTED, SIPTAG_CONTACT_STR(profile->sla_contact), NUTAG_WITH_THIS(nua),
+ SIPTAG_SUBSCRIPTION_STATE_STR("active;expires=300"), /* you thought the OTHER time was fake... need delta here FIXME XXX MTK */
+ SIPTAG_EXPIRES_STR("300"), /* likewise, totally fake - FIXME XXX MTK */
+ /* sofia_presence says something about needing TAG_IF(sticky, NUTAG_PROXY(sticky)) for NAT stuff? */
+ TAG_END());
+
+ switch_safe_free(aor);
+ switch_safe_free(subscriber);
+ switch_safe_free(sql);
+}
+
+struct sla_notify_helper {
+ sofia_profile_t *profile;
+ char *payload;
+};
+
+void sofia_sla_handle_sip_r_subscribe(nua_t *nua, sofia_profile_t *profile, nua_handle_t *nh, sip_t const *sip, tagi_t tags[])
+{
+ /* apparently, we do nothing */
+}
+
+void sofia_sla_handle_sip_i_notify(nua_t *nua, sofia_profile_t *profile, nua_handle_t *nh, sip_t const *sip, tagi_t tags[])
+{
+ char *sql = NULL;
+ struct sla_notify_helper helper;
+ char *aor = NULL;
+ char *contact = NULL;
+
+ /*
+ * things we know we don't do:
+ * draft-anil-sipping-bla says we should look and see if the specific appearance is in use and if it is
+ * return an error for the i_notify, to handle the initial line-seize for dialing out case.
+ * to do that we would need to really track all the appearances *and* override sofia's autoresponder for i_notify
+ * because at this point, it already sent the 200 for us.
+ * and we simply don't track all the appearance status by decoding the XML payload out and recording that in
+ * an SQL line appearance database yet. we'll need to do that in order to do the above, and in order to make
+ * interoperation possible between devices that disagree on the dialog xml payload OR don't even do it that
+ * way and instead use things like call-info/line-seize events like the old Broadsoft spec.
+ * instead we cheat and just reflect the entire payload back to the subscribers (who, because we don't
+ * yet check each AOR as it comes in to see if it is to be managed, is more subscribers than we probably
+ * should have). for the current prototype stage, this works ok anyway.
+ * and because we don't parse the XML, we even reflect it right back to the notifier/sender (which is called
+ * "target" in the payload XML, of course).
+ * also because we don't track on a per-appearance basis, there IS NOT a hook back from sofia_glue to add
+ * an appearance index to the outbound invite for the "next free appearance". this can lead to race
+ * conditions where a call shows up on slightly different line key numbers at different phones, making
+ * "pick up on line X" meaningless if such a race occurs. again, it is a prototype. we can fix it later.
+ */
+
+
+ /* the dispatcher calls us just because it is aimed at us, so check to see if it is dialog;sla at the very least... */
+
+ if ( (!sip->sip_event)
+ || (strcasecmp(sip->sip_event->o_type, "dialog"))
+ || !msg_params_find(sip->sip_event->o_params, "sla") ) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING,"sent to sla-agent but not dialog;sla\n");
+ return;
+ }
+
+ /* calculate the AOR we're trying to tell people about. should probably double-check before derferencing XXX MTK */
+ aor = switch_mprintf("sip:%s@%s",sip->sip_to->a_url->url_user, sip->sip_to->a_url->url_host);
+
+ /* this isn't sufficient because on things like the polycom, the subscriber is the 'main' ext number, but the
+ * 'main' ext number isn't in ANY of the headers they send us in the notify. of course.
+ * as a side effect, the subscriber<>'%q' below isn't sufficient to prevent reflecting the event back
+ * at a phone that has the ext # != third-party#. see above, can only fix by parsing the XML for the 'target'
+ * so we don't reflect it back at anyone who is the "boss" config, but we do reflect it back at the "secretary"
+ * config. if that breaks the phone, just set them all up as the "boss" config where ext#==third-party#
+ */
+ contact = switch_mprintf("sip:%s@%s",sip->sip_contact->m_url->url_user, sip->sip_contact->m_url->url_host);
+
+ if(sip->sip_payload && sip->sip_payload->pl_data) {
+ sql = switch_mprintf("select subscriber,call_id,aor,profile_name,hostname from sip_shared_appearance_subscriptions where "
+ "aor='%q' and subscriber<>'%q' and profile_name='%q' and hostname='%q'",
+ aor, contact, profile->name, mod_sofia_globals.hostname);
+
+
+ helper.profile = profile;
+ helper.payload = sip->sip_payload->pl_data; /* could just send the WHOLE payload. you'd get the type that way. */
+
+ /* which mutex if any is correct to hold in this callback? XXX MTK FIXME */
+ sofia_glue_execute_sql_callback(profile, SWITCH_FALSE, profile->ireg_mutex, sql, sofia_sla_sub_callback, &helper);
+
+ switch_safe_free(sql);
+ switch_safe_free(aor);
+ switch_safe_free(contact);
+ }
+}
+
+static int sofia_sla_sub_callback(void *pArg, int argc, char **argv, char **columnNames)
+{
+ struct sla_notify_helper *helper = pArg;
+ /* char *subscriber = argv[0]; */
+ char *call_id = argv[1];
+ /* char *aor = argv[2]; */
+ /* char *profile_name = argv[3]; */
+ /* char *hostname = argv[4]; */
+ nua_handle_t *nh;
+
+ nh = nua_handle_by_call_id(helper->profile->nua, call_id); /* that's all you need to find the subscription's nh */
+
+ if(nh)
+ {
+ nua_notify(nh,
+ SIPTAG_SUBSCRIPTION_STATE_STR("active;expires=300"), /* XXX MTK FIXME - this is totally fake calculation */
+ SIPTAG_CONTENT_TYPE_STR("application/dialog-info+xml"), /* could've just kept the type from the payload */
+ SIPTAG_PAYLOAD_STR(helper->payload),
+ TAG_END());
+ }
+ return 0;
+}
+
1
0
[Freeswitch-svn] [commit] r11561 - freeswitch/trunk/src/mod/applications/mod_fifo
by FreeSWITCH SVN 30 Jan '09
by FreeSWITCH SVN 30 Jan '09
30 Jan '09
Author: anthm
Date: Fri Jan 30 07:44:07 2009
New Revision: 11561
Log:
MODAPP-207
Modified:
freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c
Modified: freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c Fri Jan 30 07:44:07 2009
@@ -515,8 +515,9 @@
sql = switch_mprintf("select uuid, fifo_name, originate_string, simo_count, use_count, timeout, lag, "
"next_avail, expires, static, outbound_call_count, outbound_fail_count, hostname "
- "from fifo_outbound where (use_count < simo_count) and (next_avail = 0 or next_avail <= %ld) order by outbound_call_count",
- (long) switch_epoch_time_now(NULL));
+ "from fifo_outbound where (fifo_name = '%s') and (use_count < simo_count) and (next_avail = 0 or next_avail <= %ld) "
+ "order by outbound_call_count", node->name, (long) switch_epoch_time_now(NULL));
+
switch_assert(sql);
fifo_execute_sql_callback(globals.sql_mutex, sql, place_call_callback, &need);
free(sql);
1
0