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
July 2006
- 15 participants
- 496 discussions
12 Jul '06
Author: anthm
Date: Wed Jul 12 17:23:22 2006
New Revision: 1852
Modified:
freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
Log:
chage js to allow log levels in console_log()
Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c (original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c Wed Jul 12 17:23:22 2006
@@ -1785,12 +1785,24 @@
/*********************************************************************************/
static JSBool js_log(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
- char *msg;
+ char *level_str, *msg;
+ switch_log_level_t level = SWITCH_LOG_DEBUG;
+
+ if (argc > 1) {
+ if ((level_str = JS_GetStringBytes(JS_ValueToString(cx, argv[0])))) {
+ level = switch_log_str2level(level_str);
+ }
- if ((msg = JS_GetStringBytes(JS_ValueToString(cx, argv[0])))) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "JS_LOG: %s", msg);
- return JS_TRUE;
- }
+ if ((msg = JS_GetStringBytes(JS_ValueToString(cx, argv[1])))) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, level, "JS_LOG: %s", msg);
+ return JS_TRUE;
+ }
+ } else if (argc > 0) {
+ if ((msg = JS_GetStringBytes(JS_ValueToString(cx, argv[0])))) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, level, "JS_LOG: %s", msg);
+ return JS_TRUE;
+ }
+ }
return JS_FALSE;
}
1
0
12 Jul '06
Author: anthm
Date: Wed Jul 12 16:33:10 2006
New Revision: 1851
Modified:
freeswitch/trunk/src/mod/languages/mod_perl/switch_swig_wrap.c
Log:
tweak pt 2
Modified: freeswitch/trunk/src/mod/languages/mod_perl/switch_swig_wrap.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_perl/switch_swig_wrap.c (original)
+++ freeswitch/trunk/src/mod/languages/mod_perl/switch_swig_wrap.c Wed Jul 12 16:33:10 2006
@@ -992,7 +992,7 @@
/* -------- TYPES TABLE (BEGIN) -------- */
#define SWIGTYPE_p_switch_core_session_t swig_types[0]
-#define SWIGTYPE_p_switch_dtmf_callback_function_t swig_types[1]
+#define SWIGTYPE_p_switch_input_callback_function_t swig_types[1]
static swig_type_info *swig_types[3];
static swig_module_info swig_module = {swig_types, 2, 0, 0, 0, 0};
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
@@ -1408,7 +1408,7 @@
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) 0 ;
- switch_dtmf_callback_function_t arg4 ;
+ switch_input_callback_function_t arg4 ;
void *arg5 = (void *) 0 ;
unsigned int arg6 ;
int result;
@@ -1428,9 +1428,9 @@
if (!SvOK((SV*) ST(2))) arg3 = 0;
else arg3 = (char *) SvPV(ST(2), PL_na);
{
- switch_dtmf_callback_function_t * argp;
- if (SWIG_ConvertPtr(ST(3),(void **) &argp, SWIGTYPE_p_switch_dtmf_callback_function_t,0) < 0) {
- SWIG_croak("Type error in argument 4 of fs_ivr_play_file. Expected _p_switch_dtmf_callback_function_t");
+ switch_input_callback_function_t * argp;
+ if (SWIG_ConvertPtr(ST(3),(void **) &argp, SWIGTYPE_p_switch_input_callback_function_t,0) < 0) {
+ SWIG_croak("Type error in argument 4 of fs_ivr_play_file. Expected _p_switch_input_callback_function_t");
}
arg4 = *argp;
}
@@ -1456,19 +1456,19 @@
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
static swig_type_info _swigt__p_switch_core_session_t = {"_p_switch_core_session_t", "switch_core_session_t *", 0, 0, 0};
-static swig_type_info _swigt__p_switch_dtmf_callback_function_t = {"_p_switch_dtmf_callback_function_t", "switch_dtmf_callback_function_t *", 0, 0, 0};
+static swig_type_info _swigt__p_switch_input_callback_function_t = {"_p_switch_input_callback_function_t", "switch_input_callback_function_t *", 0, 0, 0};
static swig_type_info *swig_type_initial[] = {
&_swigt__p_switch_core_session_t,
- &_swigt__p_switch_dtmf_callback_function_t,
+ &_swigt__p_switch_input_callback_function_t,
};
static swig_cast_info _swigc__p_switch_core_session_t[] = { {&_swigt__p_switch_core_session_t, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_switch_dtmf_callback_function_t[] = { {&_swigt__p_switch_dtmf_callback_function_t, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_switch_input_callback_function_t[] = { {&_swigt__p_switch_input_callback_function_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info *swig_cast_initial[] = {
_swigc__p_switch_core_session_t,
- _swigc__p_switch_dtmf_callback_function_t,
+ _swigc__p_switch_input_callback_function_t,
};
1
0
12 Jul '06
Author: anthm
Date: Wed Jul 12 16:31:16 2006
New Revision: 1850
Modified:
freeswitch/trunk/src/mod/languages/mod_perl/switch_swig.c
Log:
tweak
Modified: freeswitch/trunk/src/mod/languages/mod_perl/switch_swig.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_perl/switch_swig.c (original)
+++ freeswitch/trunk/src/mod/languages/mod_perl/switch_swig.c Wed Jul 12 16:31:16 2006
@@ -113,7 +113,7 @@
int fs_ivr_play_file(switch_core_session_t *session,
char *file,
char *timer_name,
- switch_dtmf_callback_function_t dtmf_callback,
+ switch_input_callback_function_t dtmf_callback,
void *buf,
unsigned int buflen)
{
1
0
Author: sphere
Date: Wed Jul 12 16:02:45 2006
New Revision: 1849
Added:
freeswitch/branches/gcober/
Log:
Creating empty folder for gcober
1
0
[commit] r1848 - in freeswitch/branches/cypromis/trunk: . build build/config libs libs/libspeakup libs/libteletone libs/srtp libs/srtp/build src src/include
by Freeswitch SVN 12 Jul '06
by Freeswitch SVN 12 Jul '06
12 Jul '06
Author: cypromis
Date: Wed Jul 12 15:08:58 2006
New Revision: 1848
Added:
freeswitch/branches/cypromis/trunk/build/config/compiler.m4
freeswitch/branches/cypromis/trunk/build/config/packages.m4
freeswitch/branches/cypromis/trunk/configure.ac
freeswitch/branches/cypromis/trunk/libs/srtp/acsite.m4
freeswitch/branches/cypromis/trunk/libs/srtp/build/
freeswitch/branches/cypromis/trunk/libs/srtp/build/compiler.m4
Modified:
freeswitch/branches/cypromis/trunk/ (props changed)
freeswitch/branches/cypromis/trunk/Makefile.in
freeswitch/branches/cypromis/trunk/build/buildlib.sh
freeswitch/branches/cypromis/trunk/build/config/ltmain.sh
freeswitch/branches/cypromis/trunk/libs/libspeakup/Makefile.am
freeswitch/branches/cypromis/trunk/libs/libspeakup/Makefile.in
freeswitch/branches/cypromis/trunk/libs/libspeakup/aclocal.m4
freeswitch/branches/cypromis/trunk/libs/libspeakup/configure
freeswitch/branches/cypromis/trunk/libs/libspeakup/configure.in
freeswitch/branches/cypromis/trunk/libs/libteletone/INSTALL
freeswitch/branches/cypromis/trunk/libs/libteletone/Makefile.am
freeswitch/branches/cypromis/trunk/libs/libteletone/Makefile.in
freeswitch/branches/cypromis/trunk/libs/libteletone/aclocal.m4
freeswitch/branches/cypromis/trunk/libs/libteletone/config.guess
freeswitch/branches/cypromis/trunk/libs/libteletone/config.sub
freeswitch/branches/cypromis/trunk/libs/libteletone/configure
freeswitch/branches/cypromis/trunk/libs/libteletone/configure.in
freeswitch/branches/cypromis/trunk/libs/libteletone/depcomp
freeswitch/branches/cypromis/trunk/libs/libteletone/install-sh
freeswitch/branches/cypromis/trunk/libs/libteletone/ltmain.sh
freeswitch/branches/cypromis/trunk/libs/libteletone/missing
freeswitch/branches/cypromis/trunk/libs/libteletone/mkinstalldirs
freeswitch/branches/cypromis/trunk/libs/srtp.build.sh
freeswitch/branches/cypromis/trunk/libs/srtp/configure.in
freeswitch/branches/cypromis/trunk/src/include/switch_am_config.h.in
freeswitch/branches/cypromis/trunk/src/include/switch_platform.h
freeswitch/branches/cypromis/trunk/src/switch_rtp.c
Log:
changes to buildsystem
merge in chnges from trunk
r11518@free (orig r1119): michal | 2006-07-12 10:35:37 +0200
Initial merge of cypromis branch
r8902@free (orig r399): sphere | 2006-01-18 01:35:32 +0100
Creating branch for cypromis
r9395@free (orig r892): mikej | 2006-03-22 16:35:12 +0100
Copied remotely
r9396@free (orig r893): mikej | 2006-03-22 16:36:06 +0100
Removed file/folder
r9412@free (orig r909): cypromis | 2006-03-24 15:39:42 +0100
don't save file in windows format .. it screws up stuff :)
r9413@free (orig r910): cypromis | 2006-03-24 15:40:49 +0100
fixes to un gccify libgsm and also get rid of DOS endings in files :))
r9415@free (orig r912): cypromis | 2006-03-24 17:07:16 +0100
solaris solaris solaris
:)
r9419@free (orig r916): cypromis | 2006-03-24 22:43:41 +0100
updatge to latest trunk plus more ANSI and Solaris cleanups
r9420@free (orig r917): cypromis | 2006-03-24 23:38:05 +0100
more cross platform fixes
r9421@free (orig r918): cypromis | 2006-03-25 00:51:00 +0100
more compatibility changes
now all builds on solaris, besides the mozilla stuff and mod_opal
r9423@free (orig r920): cypromis | 2006-03-25 01:25:29 +0100
small typo
r9438@free (orig r935): cypromis | 2006-03-27 12:43:37 +0200
some more fixes plus libtoolisation with
a solaris ready libtool. Seems the one used by the project has a bug that does not
add ,so to solaris shared libs
r9445@free (orig r942): cypromis | 2006-03-27 20:40:24 +0200
lets use solaris freeware versions of libtool, automake and autoconf, they know what they are doing (at least I hope so ...)
r9448@free (orig r945): cypromis | 2006-03-27 23:01:32 +0200
still segfaults but now in all new revision ;)
r9449@free (orig r946): cypromis | 2006-03-28 00:13:09 +0200
ok, my bad wrong c options I though would be just used for libs & modules where used for the program.
Now need to add -R ... to module building
r9450@free (orig r947): cypromis | 2006-03-28 00:27:30 +0200
It works it works it works. just some small annoyances I have to fix ;)
r9454@free (orig r951): cypromis | 2006-03-28 16:25:19 +0200
some more fixes for portability
r9455@free (orig r952): cypromis | 2006-03-28 16:26:20 +0200
dos2unix dos2unix dos2unix and again dos2unix ....
r9461@free (orig r958): cypromis | 2006-03-29 02:36:58 +0200
portability fixes to jrtp buildsystem
r9462@free (orig r959): cypromis | 2006-03-29 17:41:34 +0200
final touch of deleting all fPIC's and replacing them with AM_CFLAGS
r9468@free (orig r965): cypromis | 2006-03-30 01:52:29 +0200
update to trunk
r9472@free (orig r969): mikej | 2006-03-30 03:50:38 +0200
re-merged changes from trunk. you may need to re-run autotools in jrtp.
r9483@free (orig r980): mikej | 2006-03-30 20:03:37 +0200
updated to trunk.
r9484@free (orig r981): cypromis | 2006-03-30 20:25:03 +0200
Some macros I willl use in automake
r9486@free (orig r983): cypromis | 2006-03-31 01:05:03 +0200
moving things to full automake ....
lets see what it does
r9488@free (orig r985): cypromis | 2006-03-31 01:07:56 +0200
small fix
r9489@free (orig r986): cypromis | 2006-03-31 01:16:05 +0200
forgot that one
r9492@free (orig r989): mikej | 2006-03-31 01:39:42 +0200
merged to trunk.
r9493@free (orig r990): cypromis | 2006-03-31 02:01:23 +0200
last stuff for tonight
r9497@free (orig r994): cypromis | 2006-03-31 20:18:36 +0200
more cleanups but beware, we are not checking for gmake now and I need to
get all the shellscripts clean :)
r9508@free (orig r1005): cypromis | 2006-04-01 23:02:22 +0200
more fixes but still some problems with my strict typechecking :)
r9512@free (orig r1009): cypromis | 2006-04-03 15:28:02 +0200
OK, that is the right path ....
r9513@free (orig r1010): mikej | 2006-04-03 16:30:46 +0200
merge, cleanup of switch_platform.h
r9523@free (orig r1020): cypromis | 2006-04-04 01:34:35 +0200
some small fixes
added x86 stuff to configure.in
now adding some speed to developmet ;)
r9525@free (orig r1022): cypromis | 2006-04-04 01:42:13 +0200
changing back. need to do the header stuff from configure
r9535@free (orig r1032): mikej | 2006-04-04 07:29:14 +0200
update to svn trunk
r9542@free (orig r1039): mikej | 2006-04-04 19:01:25 +0200
update to trunk
r9551@free (orig r1048): mikej | 2006-04-05 02:57:18 +0200
update to trunk
r9559@free (orig r1056): mikej | 2006-04-06 00:53:16 +0200
update to trunk, fix suncc issue with stun stuct's.
r9599@free (orig r1096): mikej | 2006-04-09 02:20:05 +0200
update to trunk including srtp checkin so we can fix it on sun
r9642@free (orig r1139): cypromis | 2006-04-13 16:39:27 +0200
fixes to srtp to be makeable on solaris
getting libresample in to fix its build process.
r9654@free (orig r1151): cypromis | 2006-04-14 10:25:32 +0200
step by step to ansi and proper automake :))
r9757@free (orig r1252): mikej | 2006-04-25 22:57:11 +0200
updated to trunk
r9781@free (orig r1276): mikej | 2006-04-27 15:19:44 +0200
uodate to trunk
r9895@free (orig r1391): mikej | 2006-05-08 05:43:30 +0200
update to trunk
r9937@free (orig r1431): mikej | 2006-05-11 14:19:31 +0200
update to trunk
r11500@free (orig r1832): cypromis | 2006-07-11 22:52:05 +0200
lets archive old stuff and try again fresh
r11503@free (orig r1835): cypromis | 2006-07-12 01:46:37 +0200
import fresh trunk
r11520@free (orig r1120): michal | 2006-07-12 10:43:27 +0200
Grouping application search into one m4 file
r11522@free (orig r1121): michal | 2006-07-12 13:31:23 +0200
Starting to upgrade the build system
r11528@free (orig r1122): michal | 2006-07-12 18:17:39 +0200
fixes to buildsystem. Maximum optimisation, automatic environment and compiler dependecies.
Needs some more finetuning but basically is there ;)
r11529@free (orig r1123): michal | 2006-07-12 18:25:47 +0200
update gcc flags
r11530@free (orig r1124): michal | 2006-07-12 18:26:13 +0200
hmmm why is that in here
r11531@free (orig r1125): michal | 2006-07-12 18:29:20 +0200
here go the includes
r11532@free (orig r1126): michal | 2006-07-12 18:47:50 +0200
heya heya we are getting closer to a real build system
r11538@free (orig r1128): michal | 2006-07-12 18:59:03 +0200
r8574@free (orig r52): mikej | 2005-11-19 21:11:40 +0100
Renamed remotely
r11539@free (orig r1129): michal | 2006-07-12 19:01:03 +0200
r8575@free (orig r53): mikej | 2005-11-19 21:12:09 +0100
Created folder remotely
r11540@free (orig r1130): michal | 2006-07-12 19:01:04 +0200
r8576@free (orig r54): mikej | 2005-11-19 21:12:30 +0100
Renamed remotely
r11541@free (orig r1131): michal | 2006-07-12 19:01:15 +0200
r8577@free (orig r55): mikej | 2005-11-19 21:13:06 +0100
Copied remotely
r11542@free (orig r1132): michal | 2006-07-12 19:01:17 +0200
r8578@free (orig r56): mikej | 2005-11-19 23:18:34 +0100
freeswitch win32 reorg and cleanup part 1. Everything works but mod_exosip
r11543@free (orig r1133): michal | 2006-07-12 19:01:18 +0200
r8579@free (orig r57): mikej | 2005-11-20 01:45:09 +0100
More win32 build cleanups
r11544@free (orig r1134): michal | 2006-07-12 19:01:19 +0200
r8580@free (orig r58): mikej | 2005-11-20 01:58:16 +0100
eventually this will be correct.
r11545@free (orig r1135): michal | 2006-07-12 19:01:19 +0200
r8581@free (orig r59): mikej | 2005-11-20 02:50:04 +0100
Fix build of some deps in MSVC, added copying of conf dir and libapr-1.dll into the output directory and setting the working directory to allow for launching in debug mode from the gui out of the box, disabled acutal building in GetLibs.bat for now, it is only downloading and setting up the lib src as necessary. Still need to add jrtp4c into the core configure\makefile so it builds from there automatically and we can get rid of the other configure script for that lib individually.
r11546@free (orig r1136): michal | 2006-07-12 19:01:20 +0200
r8582@free (orig r60): mikej | 2005-11-20 03:19:24 +0100
Put sample conf files where they belong so they are there when you try to run in debug mode.
r11547@free (orig r1137): michal | 2006-07-12 19:01:20 +0200
r8583@free (orig r61): mikej | 2005-11-20 03:57:06 +0100
Update configure for jrtp4c to not have it's own configure stuff.
r11548@free (orig r1138): michal | 2006-07-12 19:01:21 +0200
r8584@free (orig r62): mikej | 2005-11-20 17:49:14 +0100
Suppress MSVC 8 warnings about crt functions.
r11549@free (orig r1139): michal | 2006-07-12 19:01:21 +0200
r8585@free (orig r63): mikej | 2005-11-20 19:17:35 +0100
fixed the last of the warning messages in MSVC in mod_exosip.c. There are now no warning messages at all in all of the freeswitch code. The dependency libs are still another story.
r11550@free (orig r1140): michal | 2006-07-12 19:01:21 +0200
r8586@free (orig r64): mikej | 2005-11-20 19:22:49 +0100
I think this FINALLY corrects the issue with the working directory settings not showing up properly on fresh checkout.
r11551@free (orig r1141): michal | 2006-07-12 19:01:22 +0200
r8587@free (orig r65): mikej | 2005-11-20 19:27:20 +0100
Fix default project on fresh checkout to be FreeSwitchConsole instead of the core lib. This makes debugging by hitting the run button a little cleaner.
r11552@free (orig r1142): michal | 2006-07-12 19:01:22 +0200
r8588@free (orig r66): mikej | 2005-11-20 19:30:31 +0100
update svn.ignore property.
r11553@free (orig r1143): michal | 2006-07-12 19:01:22 +0200
r8589@free (orig r67): mikej | 2005-11-20 21:06:05 +0100
Cleanup default MSVC project configurations.
r11554@free (orig r1144): michal | 2006-07-12 19:01:23 +0200
r8590@free (orig r68): mikej | 2005-11-20 21:40:31 +0100
GetLibs.bat cleanups. No longer re-runs upgrades and such on multiple runs of the file if it doesn't need to. Added backup download locations to the bat file.
r11555@free (orig r1145): michal | 2006-07-12 19:01:23 +0200
r8591@free (orig r69): mikej | 2005-11-21 01:12:18 +0100
upgrade.vbs fix to upgrade to correct version typo.
r11556@free (orig r1146): michal | 2006-07-12 19:01:24 +0200
r8592@free (orig r70): mikej | 2005-11-21 01:17:49 +0100
Put modules back in their folders.
r11557@free (orig r1147): michal | 2006-07-12 19:01:24 +0200
r8593@free (orig r71): mikej | 2005-11-21 08:45:31 +0100
Adding GetLibs.vbs. This file is a full replacement for GetLibs.bat and replaces everything in the tools directory except for the osipparser replacement project file. It still uses the tools directory for temporary storage of some files.
r11558@free (orig r1148): michal | 2006-07-12 19:01:31 +0200
r8594@free (orig r72): mikej | 2005-11-22 02:33:38 +0100
Fix GetLibs.vbs registration of the tar and gzip components.
r11559@free (orig r1149): michal | 2006-07-12 19:01:31 +0200
r8595@free (orig r73): mikej | 2005-11-22 21:28:21 +0100
update to fix download and extract from getlibs.vbs
r11560@free (orig r1150): michal | 2006-07-12 19:01:32 +0200
r8596@free (orig r74): mikej | 2005-11-24 21:06:54 +0100
Add sqlite to the downloaded libs in GetLibs.vbs and cleanup some of the old GetLibs.bat stuff and it's dependencies.
r11561@free (orig r1151): michal | 2006-07-12 19:01:34 +0200
r8597@free (orig r75): mikej | 2005-11-25 23:31:29 +0100
GetLibs.vbs update that now supports compiling the libs and selecting core or Mod_exosip libs. Default behavior is still the same, still to do is removing all the libs from the solution file and adding in pre-build events to auto download and build the appropriate libs.
r11562@free (orig r1152): michal | 2006-07-12 19:01:34 +0200
r8598@free (orig r76): mikej | 2005-11-26 01:59:12 +0100
Update to remove libs from solution file and automatically download libs and compile when needed.
r11563@free (orig r1153): michal | 2006-07-12 19:01:35 +0200
r8599@free (orig r77): mikej | 2005-11-26 04:14:12 +0100
Update GetLibs.vbs to properly return output when running builds of the dependency libs.
r11564@free (orig r1154): michal | 2006-07-12 19:01:35 +0200
r8600@free (orig r78): mikej | 2005-11-26 17:50:25 +0100
Update to use exosip and osip 2.2.2. Modified GetLibs.vbs to rebuild jrtp when any of the libs are not there.
r11565@free (orig r1155): michal | 2006-07-12 19:01:36 +0200
r8601@free (orig r79): mikej | 2005-11-28 16:50:54 +0100
Add sqlite to libs for freeswitchCore linking
r11566@free (orig r1156): michal | 2006-07-12 19:01:36 +0200
r8602@free (orig r80): anthm | 2005-11-30 23:27:10 +0100
commmit
r11567@free (orig r1157): michal | 2006-07-12 19:02:02 +0200
r8603@free (orig r81): anthm | 2005-11-30 23:27:33 +0100
commmit
r11568@free (orig r1158): michal | 2006-07-12 19:02:02 +0200
r8604@free (orig r82): mikej | 2005-12-05 09:15:10 +0100
add libapr.vcproj so we don't have to upgrade it, because you can't upgrade dsp files with VS2005 express edition.
r11569@free (orig r1159): michal | 2006-07-12 19:02:02 +0200
r8605@free (orig r83): mikej | 2005-12-05 09:36:10 +0100
Update sqlite.vcproj to suppress casting warning messages.
r11570@free (orig r1160): michal | 2006-07-12 19:02:03 +0200
r8606@free (orig r84): mikej | 2005-12-05 10:11:53 +0100
eliminate deprecation warnings on VS 2005
r11571@free (orig r1161): michal | 2006-07-12 19:02:03 +0200
r8607@free (orig r85): mikej | 2005-12-05 10:56:44 +0100
Fix all warnings on MSVC 8 (.net 2005), add support for VS Express edition 2005, changed build to use vcbuild instead of devenv, reduced the number of out of tree project files we are managing in tree by patching the files as necessary in scripts. Now only sqlite (which does not come with a project file) and apr (which does not come with a vcproj, only dsp file) are managed in tree. We still need to come up with a way to convert dsp to vcproj files in vbscript.
r11572@free (orig r1162): michal | 2006-07-12 19:02:04 +0200
r8608@free (orig r86): anthm | 2005-12-06 18:18:56 +0100
iax and empty core for opal
r11573@free (orig r1163): michal | 2006-07-12 19:02:04 +0200
r8609@free (orig r87): anthm | 2005-12-06 18:19:44 +0100
iax and empty core for opal
r11574@free (orig r1164): michal | 2006-07-12 19:02:05 +0200
r8610@free (orig r88): anthm | 2005-12-06 19:19:43 +0100
update
r11575@free (orig r1165): michal | 2006-07-12 19:02:05 +0200
r8611@free (orig r89): mikej | 2005-12-06 22:25:10 +0100
first part of iaxchan windows build
r11576@free (orig r1166): michal | 2006-07-12 19:02:06 +0200
r8612@free (orig r90): anthm | 2005-12-06 22:25:56 +0100
merge
r11577@free (orig r1167): michal | 2006-07-12 19:02:06 +0200
r8613@free (orig r91): anthm | 2005-12-07 04:49:31 +0100
iax
r11578@free (orig r1168): michal | 2006-07-12 19:02:07 +0200
r8614@free (orig r92): anthm | 2005-12-07 17:32:47 +0100
update
r11579@free (orig r1169): michal | 2006-07-12 19:02:08 +0200
r8615@free (orig r93): anthm | 2005-12-07 20:28:27 +0100
r11580@free (orig r1170): michal | 2006-07-12 19:02:08 +0200
r8616@free (orig r94): anthm | 2005-12-08 19:31:49 +0100
let modules see the filename they were called as
r11581@free (orig r1171): michal | 2006-07-12 19:02:09 +0200
r8617@free (orig r95): anthm | 2005-12-09 00:10:59 +0100
Add portaudio files
r11582@free (orig r1172): michal | 2006-07-12 19:02:10 +0200
r8618@free (orig r96): anthm | 2005-12-09 00:15:08 +0100
doh
r11583@free (orig r1173): michal | 2006-07-12 19:02:10 +0200
r8619@free (orig r97): mikej | 2005-12-09 00:39:27 +0100
Update GetLibs.vbs for PortAudio
r11584@free (orig r1174): michal | 2006-07-12 19:02:10 +0200
r8620@free (orig r98): mikej | 2005-12-09 01:43:06 +0100
PortAudio lib autobuild.
r11585@free (orig r1175): michal | 2006-07-12 19:02:11 +0200
r8621@free (orig r99): anthm | 2005-12-09 03:02:05 +0100
portaudio stuff
r11586@free (orig r1176): michal | 2006-07-12 19:02:11 +0200
r8622@free (orig r100): anthm | 2005-12-09 20:23:04 +0100
adding some shit
r11587@free (orig r1177): michal | 2006-07-12 19:02:12 +0200
r8623@free (orig r101): anthm | 2005-12-09 20:33:21 +0100
update
r11588@free (orig r1178): michal | 2006-07-12 19:02:12 +0200
r8624@free (orig r102): anthm | 2005-12-09 23:19:08 +0100
OMG this rocks
r11589@free (orig r1179): michal | 2006-07-12 19:02:13 +0200
r8625@free (orig r103): anthm | 2005-12-10 00:14:09 +0100
r11590@free (orig r1180): michal | 2006-07-12 19:02:13 +0200
r8626@free (orig r104): anthm | 2005-12-10 02:14:49 +0100
r11591@free (orig r1181): michal | 2006-07-12 19:02:14 +0200
r8627@free (orig r105): anthm | 2005-12-10 02:59:43 +0100
r11592@free (orig r1182): michal | 2006-07-12 19:02:14 +0200
r8628@free (orig r106): mikej | 2005-12-10 03:12:03 +0100
g729 codec add (this needs to leave somwhere else)
r11593@free (orig r1183): michal | 2006-07-12 19:02:14 +0200
r8629@free (orig r107): anthm | 2005-12-10 04:10:23 +0100
r11594@free (orig r1184): michal | 2006-07-12 19:02:15 +0200
r8630@free (orig r108): anthm | 2005-12-10 05:18:48 +0100
r11595@free (orig r1185): michal | 2006-07-12 19:02:15 +0200
r8631@free (orig r109): mikej | 2005-12-10 05:42:08 +0100
Added speex codec to solution including autodownload of speex from speex.org. Added scripted build of g729 build.
r11596@free (orig r1186): michal | 2006-07-12 19:02:20 +0200
r8632@free (orig r110): mikej | 2005-12-10 18:55:46 +0100
small fixes for g729 lib compiling and speex loading.
r11597@free (orig r1187): michal | 2006-07-12 19:02:20 +0200
r8633@free (orig r111): mikej | 2005-12-10 19:19:54 +0100
fix a little warning.
r11598@free (orig r1188): michal | 2006-07-12 19:02:21 +0200
r8634@free (orig r112): anthm | 2005-12-10 20:34:35 +0100
r11599@free (orig r1189): michal | 2006-07-12 19:02:21 +0200
r8635@free (orig r113): anthm | 2005-12-10 23:37:21 +0100
fix codec
r11600@free (orig r1190): michal | 2006-07-12 19:02:21 +0200
r8636@free (orig r114): anthm | 2005-12-12 18:50:07 +0100
codec improvement
r11601@free (orig r1191): michal | 2006-07-12 19:02:22 +0200
r8637@free (orig r115): anthm | 2005-12-12 22:01:17 +0100
let mod_portaudio get inbound calls
r11602@free (orig r1192): michal | 2006-07-12 19:02:23 +0200
r8638@free (orig r116): anthm | 2005-12-12 22:30:03 +0100
update
r11603@free (orig r1193): michal | 2006-07-12 19:02:23 +0200
r8639@free (orig r119): anthm | 2005-12-13 17:46:02 +0100
update
r11604@free (orig r1194): michal | 2006-07-12 19:02:24 +0200
r8640@free (orig r120): anthm | 2005-12-13 19:06:28 +0100
iax
Modified: freeswitch/branches/cypromis/trunk/Makefile.in
==============================================================================
--- freeswitch/branches/cypromis/trunk/Makefile.in (original)
+++ freeswitch/branches/cypromis/trunk/Makefile.in Wed Jul 12 15:08:58 2006
@@ -39,7 +39,7 @@
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-@ISLINUX_TRUE@am__append_1 = -Wl,-E
+@CRASHPROT_TRUE@am__append_1 = -DCRASH_PROT
@CRASHPROT_TRUE@am__append_2 = -DCRASH_PROT
@IS64BITLINUX_TRUE@am__append_3 = -m64 -march=k8 -fPIC -D_64BIT_MACHINE_
@IS64BITLINUX_TRUE@am__append_4 = --enable-64bit
@@ -138,6 +138,20 @@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
+AM_CFLAGS = @AM_CFLAGS@ -I$(PREFIX)/include $(shell $(APR_CONFIG) \
+ --cflags --cppflags --includes) -I${prefix}/include/srtp \
+ -xc99=all $(shell $(APU_CONFIG) --includes) $(am__append_1) \
+ -I$(PWD)/src/sqlite -I$(PWD) -I$(PWD)/src/include \
+ -I$(PREFIX)/include -DSWITCH_MOD_DIR=\"$(PREFIX)/mod\" \
+ -DSWITCH_PREFIX_DIR=\"$(PREFIX)\" \
+ -DSWITCH_CONF_DIR=\"$(PREFIX)/conf\" \
+ -DSWITCH_DB_DIR=\"$(PREFIX)/db\" \
+ -DSWITCH_LOG_DIR=\"$(PREFIX)/log\" \
+ -DSWITCH_SCRIPT_DIR=\"$(PREFIX)/scripts\" \
+ -DSWITCH_HTDOCS_DIR=\"$(PREFIX)/htdocs\"
+AM_LDFLAGS = @AM_LDFLAGS@ -L$(PREFIX)/lib $(shell $(APR_CONFIG) \
+ --link-ld --libs ) $(shell $(APU_CONFIG) --link-ld --libs ) \
+ -lm -L/usr/local/lib/db42 -L/usr/local/lib
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -157,6 +171,7 @@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DYNAMIC_LIB_EXTEN = @DYNAMIC_LIB_EXTEN@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
@@ -193,6 +208,7 @@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
+SOLINK = @SOLINK@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
@@ -218,6 +234,7 @@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
+gtar = @gtar@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -238,6 +255,7 @@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+wget = @wget@
EXTRA_DIST =
SUBDIRS =
AUTOMAKE_OPTS = gnu foreign
Modified: freeswitch/branches/cypromis/trunk/build/buildlib.sh
==============================================================================
Added: freeswitch/branches/cypromis/trunk/build/config/compiler.m4
==============================================================================
--- (empty file)
+++ freeswitch/branches/cypromis/trunk/build/config/compiler.m4 Wed Jul 12 15:08:58 2006
@@ -0,0 +1,411 @@
+#### Find the compiler vendor ####
+AC_DEFUN([AX_COMPILER_VENDOR],
+[
+AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
+ [ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=unknown
+ # note: don't check for gcc first since some other compilers define __GNUC__
+ for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do
+ vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
+#if !($vencpp)
+ thisisanerror;
+#endif
+])], [ax_cv_]_AC_LANG_ABBREV[_compiler_vendor=`echo $ventest | cut -d: -f1`; break])
+ done
+ ])
+])
+
+
+#### Find the maximum optimisation for a centrain compiler ####
+AC_DEFUN([AX_CC_MAXOPT],
+[
+AC_REQUIRE([AC_PROG_CC])
+AC_REQUIRE([AX_COMPILER_VENDOR])
+
+AC_ARG_ENABLE(portable-binary, [AC_HELP_STRING([--enable-portable-binary], [disable compiler optimizations that would produce unportable binaries])],
+ acx_maxopt_portable=$withval, acx_maxopt_portable=no)
+
+# Try to determine "good" native compiler flags if none specified via CFLAGS
+if test "$ac_test_CFLAGS" != "set"; then
+ CFLAGS=""
+ case $ax_cv_c_compiler_vendor in
+ dec) CFLAGS="-newc -w0 -O5 -ansi_alias -ansi_args -fp_reorder -tune host"
+ if test "x$acx_maxopt_portable" = xno; then
+ CFLAGS="$CFLAGS -arch host"
+ fi;;
+
+ sun) CFLAGS="-native -fast -xO5 -dalign -xc99=all"
+ if test "x$acx_maxopt_portable" = xyes; then
+ CFLAGS="$CFLAGS -xarch=generic"
+ fi;;
+
+ hp) CFLAGS="+Oall +Optrs_ansi +DSnative"
+ if test "x$acx_maxopt_portable" = xyes; then
+ CFLAGS="$CFLAGS +DAportable"
+ fi;;
+
+ intel) CFLAGS="-O3 -ansi_alias"
+ if test "x$acx_maxopt_portable" = xno; then
+ icc_archflag=unknown
+ icc_flags=""
+ case $host_cpu in
+ i686*|x86_64*)
+ # icc accepts gcc assembly syntax, so these should work:
+ AX_GCC_X86_CPUID(0)
+ AX_GCC_X86_CPUID(1)
+ case $ax_cv_gcc_x86_cpuid_0 in # see AX_GCC_ARCHFLAG
+ *:756e6547:*:*) # Intel
+ case $ax_cv_gcc_x86_cpuid_1 in
+ *6a?:*[[234]]:*:*|*6[[789b]]?:*:*:*) icc_flags="-xK";;
+ *f3[[347]]:*:*:*|*f4[1347]:*:*:*) icc_flags="-xP -xN -xW -xK";;
+ *f??:*:*:*) icc_flags="-xN -xW -xK";;
+ esac ;;
+ esac ;;
+ esac
+ if test "x$icc_flags" != x; then
+ for flag in $icc_flags; do
+ AX_CHECK_COMPILER_FLAGS($flag, [icc_archflag=$flag; break])
+ done
+ fi
+ AC_MSG_CHECKING([for icc architecture flag])
+ AC_MSG_RESULT($icc_archflag)
+ if test "x$icc_archflag" != xunknown; then
+ CFLAGS="$CFLAGS $icc_archflag"
+ fi
+ fi
+ ;;
+
+ gnu)
+ # default optimization flags for gcc on all systems
+ CFLAGS="-O3 -fomit-frame-pointer"
+
+ # -malign-double for x86 systems
+ AX_CHECK_COMPILER_FLAGS(-malign-double, CFLAGS="$CFLAGS -malign-double")
+
+ # -fstrict-aliasing for gcc-2.95+
+ AX_CHECK_COMPILER_FLAGS(-fstrict-aliasing,
+ CFLAGS="$CFLAGS -fstrict-aliasing")
+
+ # note that we enable "unsafe" fp optimization with other compilers, too
+ AX_CHECK_COMPILER_FLAGS(-ffast-math, CFLAGS="$CFLAGS -ffast-math")
+
+ AX_GCC_ARCHFLAG($acx_maxopt_portable)
+ ;;
+ esac
+
+ if test -z "$CFLAGS"; then
+ echo ""
+ echo "********************************************************"
+ echo "* WARNING: Don't know the best CFLAGS for this system *"
+ echo "* Use ./configure CFLAGS=... to specify your own flags *"
+ echo "* (otherwise, a default of CFLAGS=-O3 will be used) *"
+ echo "********************************************************"
+ echo ""
+ CFLAGS="-O3"
+ fi
+
+ AX_CHECK_COMPILER_FLAGS($CFLAGS, [], [
+ echo ""
+ echo "********************************************************"
+ echo "* WARNING: The guessed CFLAGS don't seem to work with *"
+ echo "* your compiler. *"
+ echo "* Use ./configure CFLAGS=... to specify your own flags *"
+ echo "********************************************************"
+ echo ""
+ CFLAGS=""
+ ])
+
+fi
+])
+
+#### Find the max compiler warning options for ANSI C ####
+AC_DEFUN([AX_CFLAGS_WARN_ALL_ANSI],[dnl
+AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
+AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_warn_all_ansi])dnl
+AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum ansi warnings],
+VAR,[VAR="no, unknown"
+ AC_LANG_SAVE
+ AC_LANG_C
+ ac_save_[]FLAGS="$[]FLAGS"
+# IRIX C compiler:
+# -use_readonly_const is the default for IRIX C,
+# puts them into .rodata, but they are copied later.
+# need to be "-G0 -rdatashared" for strictmode but
+# I am not sure what effect that has really. - guidod
+for ac_arg dnl
+in "-pedantic % -Wall -std=c99 -pedantic" dnl GCC
+ "-xstrconst % -v -Xc -xc99=all" dnl Solaris C
+ "-std1 % -verbose -w0 -warnprotos -std1" dnl Digital Unix
+ " % -qlanglvl=ansi -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
+ " % -ansi -ansiE -fullwarn" dnl IRIX
+ "+ESlit % +w1 -Aa" dnl HP-UX C
+ "-Xc % -pvctl[,]fullmsg -Xc" dnl NEC SX-5 (Super-UX 10)
+ "-h conform % -h msglevel 2 -h conform" dnl Cray C (Unicos)
+ #
+do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
+ AC_TRY_COMPILE([],[return 0;],
+ [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
+done
+ FLAGS="$ac_save_[]FLAGS"
+ AC_LANG_RESTORE
+])
+case ".$VAR" in
+ .ok|.ok,*) m4_ifvaln($3,$3) ;;
+ .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
+ AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
+ *) m4_ifvaln($3,$3,[
+ if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
+ then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
+ else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
+ fi ]) ;;
+esac
+AS_VAR_POPDEF([VAR])dnl
+AS_VAR_POPDEF([FLAGS])dnl
+])
+
+dnl the only difference - the LANG selection... and the default FLAGS
+
+AC_DEFUN([AX_CXXFLAGS_WARN_ALL_ANSI],[dnl
+AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
+AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_warn_all_ansi])dnl
+AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum ansi warnings],
+VAR,[VAR="no, unknown"
+ AC_LANG_SAVE
+ AC_LANG_CXX
+ ac_save_[]FLAGS="$[]FLAGS"
+# IRIX C compiler:
+# -use_readonly_const is the default for IRIX C,
+# puts them into .rodata, but they are copied later.
+# need to be "-G0 -rdatashared" for strictmode but
+# I am not sure what effect that has really. - guidod
+for ac_arg dnl
+in "-pedantic % -Wall -ansi -pedantic" dnl GCC
+ "-xstrconst % -v -Xc" dnl Solaris C
+ "-std1 % -verbose -w0 -warnprotos -std1" dnl Digital Unix
+ " % -qlanglvl=ansi -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
+ " % -ansi -ansiE -fullwarn" dnl IRIX
+ "+ESlit % +w1 -Aa" dnl HP-UX C
+ "-Xc % -pvctl[,]fullmsg -Xc" dnl NEC SX-5 (Super-UX 10)
+ "-h conform % -h msglevel 2 -h conform" dnl Cray C (Unicos)
+ #
+do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
+ AC_TRY_COMPILE([],[return 0;],
+ [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
+done
+ FLAGS="$ac_save_[]FLAGS"
+ AC_LANG_RESTORE
+])
+case ".$VAR" in
+ .ok|.ok,*) m4_ifvaln($3,$3) ;;
+ .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
+ AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
+ *) m4_ifvaln($3,$3,[
+ if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
+ then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
+ else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
+ fi ]) ;;
+esac
+AS_VAR_POPDEF([VAR])dnl
+AS_VAR_POPDEF([FLAGS])dnl
+])
+
+
+AC_DEFUN([AX_GCC_X86_CPUID],
+[AC_REQUIRE([AC_PROG_CC])
+AC_LANG_PUSH([C])
+AC_CACHE_CHECK(for x86 cpuid $1 output, ax_cv_gcc_x86_cpuid_$1,
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [
+ int op = $1, eax, ebx, ecx, edx;
+ FILE *f;
+ __asm__("cpuid"
+ : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
+ : "a" (op));
+ f = fopen("conftest_cpuid", "w"); if (!f) return 1;
+ fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx);
+ fclose(f);
+ return 0;
+])],
+ [ax_cv_gcc_x86_cpuid_$1=`cat conftest_cpuid`; rm -f conftest_cpuid],
+ [ax_cv_gcc_x86_cpuid_$1=unknown; rm -f conftest_cpuid],
+ [ax_cv_gcc_x86_cpuid_$1=unknown])])
+AC_LANG_POP([C])
+])
+
+AC_DEFUN([AX_GCC_ARCHFLAG],
+[AC_REQUIRE([AC_PROG_CC])
+
+AC_ARG_WITH(gcc-arch, [AC_HELP_STRING([--with-gcc-arch=<arch>], [use architecture <arch> for gcc -march/-mtune, instead of guessing])],
+ ax_gcc_arch=$withval, ax_gcc_arch=yes)
+
+AC_MSG_CHECKING([for gcc architecture flag])
+AC_MSG_RESULT([])
+AC_CACHE_VAL(ax_cv_gcc_archflag,
+[
+ax_cv_gcc_archflag="unknown"
+
+if test "$GCC" = yes; then
+
+if test "x$ax_gcc_arch" = xyes; then
+ax_gcc_arch=""
+if test "$cross_compiling" = no; then
+case $host_cpu in
+ i[[3456]]86*|x86_64*) # use cpuid codes, in part from x86info-1.7 by D. Jones
+ AX_GCC_X86_CPUID(0)
+ AX_GCC_X86_CPUID(1)
+ case $ax_cv_gcc_x86_cpuid_0 in
+ *:756e6547:*:*) # Intel
+ case $ax_cv_gcc_x86_cpuid_1 in
+ *5[[48]]?:*:*:*) ax_gcc_arch="pentium-mmx pentium" ;;
+ *5??:*:*:*) ax_gcc_arch=pentium ;;
+ *6[[3456]]?:*:*:*) ax_gcc_arch="pentium2 pentiumpro" ;;
+ *6a?:*[[01]]:*:*) ax_gcc_arch="pentium2 pentiumpro" ;;
+ *6a?:*[[234]]:*:*) ax_gcc_arch="pentium3 pentiumpro" ;;
+ *6[[9d]]?:*:*:*) ax_gcc_arch="pentium-m pentium3 pentiumpro" ;;
+ *6[[78b]]?:*:*:*) ax_gcc_arch="pentium3 pentiumpro" ;;
+ *6??:*:*:*) ax_gcc_arch=pentiumpro ;;
+ *f3[[347]]:*:*:*|*f4[1347]:*:*:*)
+ case $host_cpu in
+ x86_64*) ax_gcc_arch="nocona pentium4 pentiumpro" ;;
+ *) ax_gcc_arch="prescott pentium4 pentiumpro" ;;
+ esac ;;
+ *f??:*:*:*) ax_gcc_arch="pentium4 pentiumpro";;
+ esac ;;
+ *:68747541:*:*) # AMD
+ case $ax_cv_gcc_x86_cpuid_1 in
+ *5[[67]]?:*:*:*) ax_gcc_arch=k6 ;;
+ *5[[8d]]?:*:*:*) ax_gcc_arch="k6-2 k6" ;;
+ *5[[9]]?:*:*:*) ax_gcc_arch="k6-3 k6" ;;
+ *60?:*:*:*) ax_gcc_arch=k7 ;;
+ *6[[12]]?:*:*:*) ax_gcc_arch="athlon k7" ;;
+ *6[[34]]?:*:*:*) ax_gcc_arch="athlon-tbird k7" ;;
+ *67?:*:*:*) ax_gcc_arch="athlon-4 athlon k7" ;;
+ *6[[68a]]?:*:*:*)
+ AX_GCC_X86_CPUID(0x80000006) # L2 cache size
+ case $ax_cv_gcc_x86_cpuid_0x80000006 in
+ *:*:*[[1-9a-f]]??????:*) # (L2 = ecx >> 16) >= 256
+ ax_gcc_arch="athlon-xp athlon-4 athlon k7" ;;
+ *) ax_gcc_arch="athlon-4 athlon k7" ;;
+ esac ;;
+ *f[[4cef8b]]?:*:*:*) ax_gcc_arch="athlon64 k8" ;;
+ *f5?:*:*:*) ax_gcc_arch="opteron k8" ;;
+ *f7?:*:*:*) ax_gcc_arch="athlon-fx opteron k8" ;;
+ *f??:*:*:*) ax_gcc_arch="k8" ;;
+ esac ;;
+ *:746e6543:*:*) # IDT
+ case $ax_cv_gcc_x86_cpuid_1 in
+ *54?:*:*:*) ax_gcc_arch=winchip-c6 ;;
+ *58?:*:*:*) ax_gcc_arch=winchip2 ;;
+ *6[[78]]?:*:*:*) ax_gcc_arch=c3 ;;
+ *69?:*:*:*) ax_gcc_arch="c3-2 c3" ;;
+ esac ;;
+ esac
+ if test x"$ax_gcc_arch" = x; then # fallback
+ case $host_cpu in
+ i586*) ax_gcc_arch=pentium ;;
+ i686*) ax_gcc_arch=pentiumpro ;;
+ esac
+ fi
+ ;;
+
+ sparc*)
+ AC_PATH_PROG([PRTDIAG], [prtdiag], [prtdiag], [$PATH:/usr/platform/`uname -i`/sbin/:/usr/platform/`uname -m`/sbin/])
+ cputype=`(((grep cpu /proc/cpuinfo | cut -d: -f2) ; ($PRTDIAG -v |grep -i sparc) ; grep -i cpu /var/run/dmesg.boot ) | head -n 1) 2> /dev/null`
+ cputype=`echo "$cputype" | tr -d ' -' |tr $as_cr_LETTERS $as_cr_letters`
+ case $cputype in
+ *ultrasparciv*) ax_gcc_arch="ultrasparc4 ultrasparc3 ultrasparc v9" ;;
+ *ultrasparciii*) ax_gcc_arch="ultrasparc3 ultrasparc v9" ;;
+ *ultrasparc*) ax_gcc_arch="ultrasparc v9" ;;
+ *supersparc*|*tms390z5[[05]]*) ax_gcc_arch="supersparc v8" ;;
+ *hypersparc*|*rt62[[056]]*) ax_gcc_arch="hypersparc v8" ;;
+ *cypress*) ax_gcc_arch=cypress ;;
+ esac ;;
+
+ alphaev5) ax_gcc_arch=ev5 ;;
+ alphaev56) ax_gcc_arch=ev56 ;;
+ alphapca56) ax_gcc_arch="pca56 ev56" ;;
+ alphapca57) ax_gcc_arch="pca57 pca56 ev56" ;;
+ alphaev6) ax_gcc_arch=ev6 ;;
+ alphaev67) ax_gcc_arch=ev67 ;;
+ alphaev68) ax_gcc_arch="ev68 ev67" ;;
+ alphaev69) ax_gcc_arch="ev69 ev68 ev67" ;;
+ alphaev7) ax_gcc_arch="ev7 ev69 ev68 ev67" ;;
+ alphaev79) ax_gcc_arch="ev79 ev7 ev69 ev68 ev67" ;;
+
+ powerpc*)
+ cputype=`((grep cpu /proc/cpuinfo | head -n 1 | cut -d: -f2 | cut -d, -f1 | sed 's/ //g') ; /usr/bin/machine ; /bin/machine; grep CPU /var/run/dmesg.boot | head -n 1 | cut -d" " -f2) 2> /dev/null`
+ cputype=`echo $cputype | sed -e 's/ppc//g;s/ *//g'`
+ case $cputype in
+ *750*) ax_gcc_arch="750 G3" ;;
+ *740[[0-9]]*) ax_gcc_arch="$cputype 7400 G4" ;;
+ *74[[4-5]][[0-9]]*) ax_gcc_arch="$cputype 7450 G4" ;;
+ *74[[0-9]][[0-9]]*) ax_gcc_arch="$cputype G4" ;;
+ *970*) ax_gcc_arch="970 G5 power4";;
+ *POWER4*|*power4*|*gq*) ax_gcc_arch="power4 970";;
+ *POWER5*|*power5*|*gr*|*gs*) ax_gcc_arch="power5 power4 970";;
+ 603ev|8240) ax_gcc_arch="$cputype 603e 603";;
+ *) ax_gcc_arch=$cputype ;;
+ esac
+ ax_gcc_arch="$ax_gcc_arch powerpc"
+ ;;
+esac
+fi # not cross-compiling
+fi # guess arch
+
+if test "x$ax_gcc_arch" != x -a "x$ax_gcc_arch" != xno; then
+for arch in $ax_gcc_arch; do
+ if test "x[]m4_default([$1],yes)" = xyes; then # if we require portable code
+ flags="-mtune=$arch"
+ # -mcpu=$arch and m$arch generate nonportable code on every arch except
+ # x86. And some other arches (e.g. Alpha) don't accept -mtune. Grrr.
+ case $host_cpu in i*86|x86_64*) flags="$flags -mcpu=$arch -m$arch";; esac
+ else
+ flags="-march=$arch -mcpu=$arch -m$arch"
+ fi
+ for flag in $flags; do
+ AX_CHECK_COMPILER_FLAGS($flag, [ax_cv_gcc_archflag=$flag; break])
+ done
+ test "x$ax_cv_gcc_archflag" = xunknown || break
+done
+fi
+
+fi # $GCC=yes
+])
+AC_MSG_CHECKING([for gcc architecture flag])
+AC_MSG_RESULT($ax_cv_gcc_archflag)
+if test "x$ax_cv_gcc_archflag" = xunknown; then
+ m4_default([$3],:)
+else
+ m4_default([$2], [CFLAGS="$CFLAGS $ax_cv_gcc_archflag"])
+fi
+])
+
+AC_DEFUN([AX_CHECK_COMPILER_FLAGS],
+[AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
+AC_MSG_CHECKING([whether _AC_LANG compiler accepts $1])
+dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
+AS_LITERAL_IF([$1],
+ [AC_CACHE_VAL(AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1), [
+ ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
+ _AC_LANG_PREFIX[]FLAGS="$1"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
+ AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=yes,
+ AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=no)
+ _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])],
+ [ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
+ _AC_LANG_PREFIX[]FLAGS="$1"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
+ eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=yes,
+ eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=no)
+ _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])
+eval ax_check_compiler_flags=$AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)
+AC_MSG_RESULT($ax_check_compiler_flags)
+if test "x$ax_check_compiler_flags" = xyes; then
+ m4_default([$2], :)
+else
+ m4_default([$3], :)
+fi
+])dnl AX_CHECK_COMPILER_FLAG
Modified: freeswitch/branches/cypromis/trunk/build/config/ltmain.sh
==============================================================================
Added: freeswitch/branches/cypromis/trunk/build/config/packages.m4
==============================================================================
--- (empty file)
+++ freeswitch/branches/cypromis/trunk/build/config/packages.m4 Wed Jul 12 15:08:58 2006
@@ -0,0 +1,32 @@
+#### Look for wget ####
+AC_DEFUN([AC_PROG_WGET],[
+AC_CHECK_PROGS(wget,[wget],no)
+export wget;
+if test $wget = "no" ;
+then
+ AC_MSG_ERROR([Unable to find the wget application]);
+fi
+AC_SUBST(wget)
+])
+
+#### Look for gzip ####
+AC_DEFUN([AC_PROG_GZIP],[
+AC_CHECK_PROGS(gzip,[gzip],no)
+export gzip;
+if test $gzip = "no" ;
+then
+ AC_MSG_ERROR([Unable to find the gzip application]);
+fi
+AC_SUBST(gzip)
+])
+
+#### Look for gtar or tar ####
+AC_DEFUN([AC_PROG_GTAR],[
+AC_CHECK_PROGS(gtar,[gtar tar],no)
+export gtar;
+if test $gtar = "no" ;
+then
+ AC_MSG_ERROR([Unable to find a suitable tar application]);
+fi
+AC_SUBST(gtar)
+])
Added: freeswitch/branches/cypromis/trunk/configure.ac
==============================================================================
--- (empty file)
+++ freeswitch/branches/cypromis/trunk/configure.ac Wed Jul 12 15:08:58 2006
@@ -0,0 +1,115 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.59)
+AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
+AC_CONFIG_AUX_DIR(build/config)
+AM_INIT_AUTOMAKE(libfreeswitch,0.1)
+AC_CONFIG_SRCDIR([src/switch.c])
+AC_CONFIG_HEADER([src/include/switch_am_config.h])
+
+AC_PREFIX_DEFAULT(/usr/local/freeswitch)
+#Set default language
+AC_LANG_C
+# Checks for programs.
+AC_PROG_CC
+AC_PROG_AWK
+AC_PROG_GTAR
+AC_PROG_WGET
+AC_PROG_MAKE_SET
+AC_PROG_INSTALL
+AC_PROG_LIBTOOL
+
+#Check for compiler vendor
+AX_COMPILER_VENDOR
+
+# Checks for header files.
+AC_HEADER_DIRENT
+AC_HEADER_STDC
+AC_CHECK_HEADERS([sys/types.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_C_INLINE
+AC_TYPE_SIZE_T
+AC_HEADER_TIME
+AC_STRUCT_TM
+
+# Checks for library functions.
+AC_PROG_GCC_TRADITIONAL
+AC_FUNC_MALLOC
+AC_TYPE_SIGNAL
+AC_FUNC_STRFTIME
+AC_CHECK_FUNCS([gethostname vasprintf mmap mlock mlockall])
+
+AC_C_BIGENDIAN(AC_DEFINE([__BYTE_ORDER],__BIG_ENDIAN,[Big Endian]),AC_DEFINE([__BYTE_ORDER],__LITTLE_ENDIAN,[Little Endian]))
+AC_DEFINE([__LITTLE_ENDIAN],1234,[for the places where it is not defined])
+AC_DEFINE([__BIG_ENDIAN],4321,[for the places where it is not defined])
+
+AC_ARG_ENABLE(crash-protection, [ --enable-crash-protection Compile with CRASH Protection],,[enable_crash_prot="no"])
+
+AM_CONDITIONAL([CRASHPROT],[test "x$enable_crash_prot" != "xno"])
+case "$host" in
+ *-solaris2*)
+ if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
+ SOLINK="-Bdynamic -dy -G"
+ AM_CFLAGS="${CFLAGS} -KPIC -DPIC"
+ AM_LDFLAGS="-L${prefix}/lib -R${prefix}/lib"
+ FUNC_DEF=__func__
+ IN_LINE=""
+ elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then
+ SOLINK="-Bdynamic -dy -G"
+ AM_CFLAGS="${CFLAGS} -fPIC"
+ AM_LDFLAGS=""
+ IN_LINE=inline
+ fi
+ DYNAMIC_LIB_EXTEN="so"
+ ;;
+ *-darwin*)
+ if test "x${ax_cv_c_compiler_vendor}"="xgnu" ; then
+ SOLINK="-dynamic -bundle -undefined-surpress -force-flat-namespace"
+ AM_CFLAGS="${CFLAGS} -DMACOSX"
+ AM_LDFLAGS=""
+ fi
+ DYNAMIC_LIB_EXTEN="dylib"
+ ;;
+ x86_64-*-linux-gnu)
+ if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
+ SOLINK="-Bdynamic -dy -G"
+ AM_CFLAGS="${CFLAGS} -KPIC -DPIC"
+ AM_LDFLAGS="-L${prefix}/lib -R${prefix}/lib"
+ FUNC_DEF=__func__
+ elif test "x${ax_cv_c_compiler_vendor}"="xgnu" ; then
+ SOLINK="-shared -Xlinker -x"
+ AM_CFLAGS="${CFLAGS} -fPIC"
+ AM_LDFLAGS=""
+ fi
+ DYNAMIC_LIB_EXTEN="so"
+ ;;
+ i*6-*-linux-gnu)
+ if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
+ SOLINK="-Bdynamic -dy -G"
+ AM_CFLAGS="${CFLAGS} -KPIC -DPIC"
+ AM_LDFLAGS="-L${prefix}/lib -R${prefix}/lib"
+ FUNC_DEF=__func__
+ elif test "x${ax_cv_c_compiler_vendor}"="xgnu" ; then
+ SOLINK="-shared -Xlinker -x"
+ AM_CFLAGS="${CFLAGS} -fpic"
+ AM_LDFLAGS=""
+ fi
+ DYNAMIC_LIB_EXTEN="so"
+ ;;
+esac
+AC_SUBST(AM_CFLAGS)
+AC_SUBST(AM_LDFLAGS)
+AC_SUBST(SOLINK)
+AC_SUBST(DYNAMIC_LIB_EXTEN)
+AC_DEFINE_UNQUOTED([__FUNCTION__],[$FUNC_DEF],[define it the right way ;)])
+AC_DEFINE_UNQUOTED([inline],[$IN_LINE],[sunpro is bad at inline])
+AC_CONFIG_FILES([Makefile])
+
+AM_CONDITIONAL(ISLINUX, [test `uname -s` = Linux])
+AM_CONDITIONAL(ISMAC, [test `uname -s` = Darwin])
+AM_CONDITIONAL(IS64BITLINUX, [test `uname -m` = x86_64])
+
+AC_OUTPUT([src/include/switch_version.h])
Modified: freeswitch/branches/cypromis/trunk/libs/libspeakup/Makefile.am
==============================================================================
Modified: freeswitch/branches/cypromis/trunk/libs/libspeakup/Makefile.in
==============================================================================
Modified: freeswitch/branches/cypromis/trunk/libs/libspeakup/aclocal.m4
==============================================================================
Modified: freeswitch/branches/cypromis/trunk/libs/libspeakup/configure
==============================================================================
Modified: freeswitch/branches/cypromis/trunk/libs/libspeakup/configure.in
==============================================================================
Modified: freeswitch/branches/cypromis/trunk/libs/libteletone/INSTALL
==============================================================================
Modified: freeswitch/branches/cypromis/trunk/libs/libteletone/Makefile.am
==============================================================================
Modified: freeswitch/branches/cypromis/trunk/libs/libteletone/Makefile.in
==============================================================================
Modified: freeswitch/branches/cypromis/trunk/libs/libteletone/aclocal.m4
==============================================================================
Modified: freeswitch/branches/cypromis/trunk/libs/libteletone/config.guess
==============================================================================
Modified: freeswitch/branches/cypromis/trunk/libs/libteletone/config.sub
==============================================================================
Modified: freeswitch/branches/cypromis/trunk/libs/libteletone/configure
==============================================================================
Modified: freeswitch/branches/cypromis/trunk/libs/libteletone/configure.in
==============================================================================
Modified: freeswitch/branches/cypromis/trunk/libs/libteletone/depcomp
==============================================================================
Modified: freeswitch/branches/cypromis/trunk/libs/libteletone/install-sh
==============================================================================
Modified: freeswitch/branches/cypromis/trunk/libs/libteletone/ltmain.sh
==============================================================================
Modified: freeswitch/branches/cypromis/trunk/libs/libteletone/missing
==============================================================================
Modified: freeswitch/branches/cypromis/trunk/libs/libteletone/mkinstalldirs
==============================================================================
Modified: freeswitch/branches/cypromis/trunk/libs/srtp.build.sh
==============================================================================
Added: freeswitch/branches/cypromis/trunk/libs/srtp/acsite.m4
==============================================================================
--- (empty file)
+++ freeswitch/branches/cypromis/trunk/libs/srtp/acsite.m4 Wed Jul 12 15:08:58 2006
@@ -0,0 +1 @@
+m4_include([build/compiler.m4])
Added: freeswitch/branches/cypromis/trunk/libs/srtp/build/compiler.m4
==============================================================================
--- (empty file)
+++ freeswitch/branches/cypromis/trunk/libs/srtp/build/compiler.m4 Wed Jul 12 15:08:58 2006
@@ -0,0 +1,411 @@
+#### Find the compiler vendor ####
+AC_DEFUN([AX_COMPILER_VENDOR],
+[
+AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
+ [ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=unknown
+ # note: don't check for gcc first since some other compilers define __GNUC__
+ for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do
+ vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
+#if !($vencpp)
+ thisisanerror;
+#endif
+])], [ax_cv_]_AC_LANG_ABBREV[_compiler_vendor=`echo $ventest | cut -d: -f1`; break])
+ done
+ ])
+])
+
+
+#### Find the maximum optimisation for a centrain compiler ####
+AC_DEFUN([AX_CC_MAXOPT],
+[
+AC_REQUIRE([AC_PROG_CC])
+AC_REQUIRE([AX_COMPILER_VENDOR])
+
+AC_ARG_ENABLE(portable-binary, [AC_HELP_STRING([--enable-portable-binary], [disable compiler optimizations that would produce unportable binaries])],
+ acx_maxopt_portable=$withval, acx_maxopt_portable=no)
+
+# Try to determine "good" native compiler flags if none specified via CFLAGS
+if test "$ac_test_CFLAGS" != "set"; then
+ CFLAGS=""
+ case $ax_cv_c_compiler_vendor in
+ dec) CFLAGS="-newc -w0 -O5 -ansi_alias -ansi_args -fp_reorder -tune host"
+ if test "x$acx_maxopt_portable" = xno; then
+ CFLAGS="$CFLAGS -arch host"
+ fi;;
+
+ sun) CFLAGS="-native -fast -xO5 -dalign -xc99=all"
+ if test "x$acx_maxopt_portable" = xyes; then
+ CFLAGS="$CFLAGS -xarch=generic"
+ fi;;
+
+ hp) CFLAGS="+Oall +Optrs_ansi +DSnative"
+ if test "x$acx_maxopt_portable" = xyes; then
+ CFLAGS="$CFLAGS +DAportable"
+ fi;;
+
+ intel) CFLAGS="-O3 -ansi_alias"
+ if test "x$acx_maxopt_portable" = xno; then
+ icc_archflag=unknown
+ icc_flags=""
+ case $host_cpu in
+ i686*|x86_64*)
+ # icc accepts gcc assembly syntax, so these should work:
+ AX_GCC_X86_CPUID(0)
+ AX_GCC_X86_CPUID(1)
+ case $ax_cv_gcc_x86_cpuid_0 in # see AX_GCC_ARCHFLAG
+ *:756e6547:*:*) # Intel
+ case $ax_cv_gcc_x86_cpuid_1 in
+ *6a?:*[[234]]:*:*|*6[[789b]]?:*:*:*) icc_flags="-xK";;
+ *f3[[347]]:*:*:*|*f4[1347]:*:*:*) icc_flags="-xP -xN -xW -xK";;
+ *f??:*:*:*) icc_flags="-xN -xW -xK";;
+ esac ;;
+ esac ;;
+ esac
+ if test "x$icc_flags" != x; then
+ for flag in $icc_flags; do
+ AX_CHECK_COMPILER_FLAGS($flag, [icc_archflag=$flag; break])
+ done
+ fi
+ AC_MSG_CHECKING([for icc architecture flag])
+ AC_MSG_RESULT($icc_archflag)
+ if test "x$icc_archflag" != xunknown; then
+ CFLAGS="$CFLAGS $icc_archflag"
+ fi
+ fi
+ ;;
+
+ gnu)
+ # default optimization flags for gcc on all systems
+ CFLAGS="-O3 -fomit-frame-pointer"
+
+ # -malign-double for x86 systems
+ AX_CHECK_COMPILER_FLAGS(-malign-double, CFLAGS="$CFLAGS -malign-double")
+
+ # -fstrict-aliasing for gcc-2.95+
+ AX_CHECK_COMPILER_FLAGS(-fstrict-aliasing,
+ CFLAGS="$CFLAGS -fstrict-aliasing")
+
+ # note that we enable "unsafe" fp optimization with other compilers, too
+ AX_CHECK_COMPILER_FLAGS(-ffast-math, CFLAGS="$CFLAGS -ffast-math")
+
+ AX_GCC_ARCHFLAG($acx_maxopt_portable)
+ ;;
+ esac
+
+ if test -z "$CFLAGS"; then
+ echo ""
+ echo "********************************************************"
+ echo "* WARNING: Don't know the best CFLAGS for this system *"
+ echo "* Use ./configure CFLAGS=... to specify your own flags *"
+ echo "* (otherwise, a default of CFLAGS=-O3 will be used) *"
+ echo "********************************************************"
+ echo ""
+ CFLAGS="-O3"
+ fi
+
+ AX_CHECK_COMPILER_FLAGS($CFLAGS, [], [
+ echo ""
+ echo "********************************************************"
+ echo "* WARNING: The guessed CFLAGS don't seem to work with *"
+ echo "* your compiler. *"
+ echo "* Use ./configure CFLAGS=... to specify your own flags *"
+ echo "********************************************************"
+ echo ""
+ CFLAGS=""
+ ])
+
+fi
+])
+
+#### Find the max compiler warning options for ANSI C ####
+AC_DEFUN([AX_CFLAGS_WARN_ALL_ANSI],[dnl
+AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
+AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_warn_all_ansi])dnl
+AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum ansi warnings],
+VAR,[VAR="no, unknown"
+ AC_LANG_SAVE
+ AC_LANG_C
+ ac_save_[]FLAGS="$[]FLAGS"
+# IRIX C compiler:
+# -use_readonly_const is the default for IRIX C,
+# puts them into .rodata, but they are copied later.
+# need to be "-G0 -rdatashared" for strictmode but
+# I am not sure what effect that has really. - guidod
+for ac_arg dnl
+in "-pedantic % -Wall -std=c99 -pedantic" dnl GCC
+ "-xstrconst % -v -Xc -xc99=all" dnl Solaris C
+ "-std1 % -verbose -w0 -warnprotos -std1" dnl Digital Unix
+ " % -qlanglvl=ansi -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
+ " % -ansi -ansiE -fullwarn" dnl IRIX
+ "+ESlit % +w1 -Aa" dnl HP-UX C
+ "-Xc % -pvctl[,]fullmsg -Xc" dnl NEC SX-5 (Super-UX 10)
+ "-h conform % -h msglevel 2 -h conform" dnl Cray C (Unicos)
+ #
+do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
+ AC_TRY_COMPILE([],[return 0;],
+ [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
+done
+ FLAGS="$ac_save_[]FLAGS"
+ AC_LANG_RESTORE
+])
+case ".$VAR" in
+ .ok|.ok,*) m4_ifvaln($3,$3) ;;
+ .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
+ AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
+ *) m4_ifvaln($3,$3,[
+ if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
+ then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
+ else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
+ fi ]) ;;
+esac
+AS_VAR_POPDEF([VAR])dnl
+AS_VAR_POPDEF([FLAGS])dnl
+])
+
+dnl the only difference - the LANG selection... and the default FLAGS
+
+AC_DEFUN([AX_CXXFLAGS_WARN_ALL_ANSI],[dnl
+AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
+AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_warn_all_ansi])dnl
+AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum ansi warnings],
+VAR,[VAR="no, unknown"
+ AC_LANG_SAVE
+ AC_LANG_CXX
+ ac_save_[]FLAGS="$[]FLAGS"
+# IRIX C compiler:
+# -use_readonly_const is the default for IRIX C,
+# puts them into .rodata, but they are copied later.
+# need to be "-G0 -rdatashared" for strictmode but
+# I am not sure what effect that has really. - guidod
+for ac_arg dnl
+in "-pedantic % -Wall -ansi -pedantic" dnl GCC
+ "-xstrconst % -v -Xc" dnl Solaris C
+ "-std1 % -verbose -w0 -warnprotos -std1" dnl Digital Unix
+ " % -qlanglvl=ansi -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
+ " % -ansi -ansiE -fullwarn" dnl IRIX
+ "+ESlit % +w1 -Aa" dnl HP-UX C
+ "-Xc % -pvctl[,]fullmsg -Xc" dnl NEC SX-5 (Super-UX 10)
+ "-h conform % -h msglevel 2 -h conform" dnl Cray C (Unicos)
+ #
+do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
+ AC_TRY_COMPILE([],[return 0;],
+ [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
+done
+ FLAGS="$ac_save_[]FLAGS"
+ AC_LANG_RESTORE
+])
+case ".$VAR" in
+ .ok|.ok,*) m4_ifvaln($3,$3) ;;
+ .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
+ AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
+ *) m4_ifvaln($3,$3,[
+ if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
+ then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
+ else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
+ fi ]) ;;
+esac
+AS_VAR_POPDEF([VAR])dnl
+AS_VAR_POPDEF([FLAGS])dnl
+])
+
+
+AC_DEFUN([AX_GCC_X86_CPUID],
+[AC_REQUIRE([AC_PROG_CC])
+AC_LANG_PUSH([C])
+AC_CACHE_CHECK(for x86 cpuid $1 output, ax_cv_gcc_x86_cpuid_$1,
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [
+ int op = $1, eax, ebx, ecx, edx;
+ FILE *f;
+ __asm__("cpuid"
+ : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
+ : "a" (op));
+ f = fopen("conftest_cpuid", "w"); if (!f) return 1;
+ fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx);
+ fclose(f);
+ return 0;
+])],
+ [ax_cv_gcc_x86_cpuid_$1=`cat conftest_cpuid`; rm -f conftest_cpuid],
+ [ax_cv_gcc_x86_cpuid_$1=unknown; rm -f conftest_cpuid],
+ [ax_cv_gcc_x86_cpuid_$1=unknown])])
+AC_LANG_POP([C])
+])
+
+AC_DEFUN([AX_GCC_ARCHFLAG],
+[AC_REQUIRE([AC_PROG_CC])
+
+AC_ARG_WITH(gcc-arch, [AC_HELP_STRING([--with-gcc-arch=<arch>], [use architecture <arch> for gcc -march/-mtune, instead of guessing])],
+ ax_gcc_arch=$withval, ax_gcc_arch=yes)
+
+AC_MSG_CHECKING([for gcc architecture flag])
+AC_MSG_RESULT([])
+AC_CACHE_VAL(ax_cv_gcc_archflag,
+[
+ax_cv_gcc_archflag="unknown"
+
+if test "$GCC" = yes; then
+
+if test "x$ax_gcc_arch" = xyes; then
+ax_gcc_arch=""
+if test "$cross_compiling" = no; then
+case $host_cpu in
+ i[[3456]]86*|x86_64*) # use cpuid codes, in part from x86info-1.7 by D. Jones
+ AX_GCC_X86_CPUID(0)
+ AX_GCC_X86_CPUID(1)
+ case $ax_cv_gcc_x86_cpuid_0 in
+ *:756e6547:*:*) # Intel
+ case $ax_cv_gcc_x86_cpuid_1 in
+ *5[[48]]?:*:*:*) ax_gcc_arch="pentium-mmx pentium" ;;
+ *5??:*:*:*) ax_gcc_arch=pentium ;;
+ *6[[3456]]?:*:*:*) ax_gcc_arch="pentium2 pentiumpro" ;;
+ *6a?:*[[01]]:*:*) ax_gcc_arch="pentium2 pentiumpro" ;;
+ *6a?:*[[234]]:*:*) ax_gcc_arch="pentium3 pentiumpro" ;;
+ *6[[9d]]?:*:*:*) ax_gcc_arch="pentium-m pentium3 pentiumpro" ;;
+ *6[[78b]]?:*:*:*) ax_gcc_arch="pentium3 pentiumpro" ;;
+ *6??:*:*:*) ax_gcc_arch=pentiumpro ;;
+ *f3[[347]]:*:*:*|*f4[1347]:*:*:*)
+ case $host_cpu in
+ x86_64*) ax_gcc_arch="nocona pentium4 pentiumpro" ;;
+ *) ax_gcc_arch="prescott pentium4 pentiumpro" ;;
+ esac ;;
+ *f??:*:*:*) ax_gcc_arch="pentium4 pentiumpro";;
+ esac ;;
+ *:68747541:*:*) # AMD
+ case $ax_cv_gcc_x86_cpuid_1 in
+ *5[[67]]?:*:*:*) ax_gcc_arch=k6 ;;
+ *5[[8d]]?:*:*:*) ax_gcc_arch="k6-2 k6" ;;
+ *5[[9]]?:*:*:*) ax_gcc_arch="k6-3 k6" ;;
+ *60?:*:*:*) ax_gcc_arch=k7 ;;
+ *6[[12]]?:*:*:*) ax_gcc_arch="athlon k7" ;;
+ *6[[34]]?:*:*:*) ax_gcc_arch="athlon-tbird k7" ;;
+ *67?:*:*:*) ax_gcc_arch="athlon-4 athlon k7" ;;
+ *6[[68a]]?:*:*:*)
+ AX_GCC_X86_CPUID(0x80000006) # L2 cache size
+ case $ax_cv_gcc_x86_cpuid_0x80000006 in
+ *:*:*[[1-9a-f]]??????:*) # (L2 = ecx >> 16) >= 256
+ ax_gcc_arch="athlon-xp athlon-4 athlon k7" ;;
+ *) ax_gcc_arch="athlon-4 athlon k7" ;;
+ esac ;;
+ *f[[4cef8b]]?:*:*:*) ax_gcc_arch="athlon64 k8" ;;
+ *f5?:*:*:*) ax_gcc_arch="opteron k8" ;;
+ *f7?:*:*:*) ax_gcc_arch="athlon-fx opteron k8" ;;
+ *f??:*:*:*) ax_gcc_arch="k8" ;;
+ esac ;;
+ *:746e6543:*:*) # IDT
+ case $ax_cv_gcc_x86_cpuid_1 in
+ *54?:*:*:*) ax_gcc_arch=winchip-c6 ;;
+ *58?:*:*:*) ax_gcc_arch=winchip2 ;;
+ *6[[78]]?:*:*:*) ax_gcc_arch=c3 ;;
+ *69?:*:*:*) ax_gcc_arch="c3-2 c3" ;;
+ esac ;;
+ esac
+ if test x"$ax_gcc_arch" = x; then # fallback
+ case $host_cpu in
+ i586*) ax_gcc_arch=pentium ;;
+ i686*) ax_gcc_arch=pentiumpro ;;
+ esac
+ fi
+ ;;
+
+ sparc*)
+ AC_PATH_PROG([PRTDIAG], [prtdiag], [prtdiag], [$PATH:/usr/platform/`uname -i`/sbin/:/usr/platform/`uname -m`/sbin/])
+ cputype=`(((grep cpu /proc/cpuinfo | cut -d: -f2) ; ($PRTDIAG -v |grep -i sparc) ; grep -i cpu /var/run/dmesg.boot ) | head -n 1) 2> /dev/null`
+ cputype=`echo "$cputype" | tr -d ' -' |tr $as_cr_LETTERS $as_cr_letters`
+ case $cputype in
+ *ultrasparciv*) ax_gcc_arch="ultrasparc4 ultrasparc3 ultrasparc v9" ;;
+ *ultrasparciii*) ax_gcc_arch="ultrasparc3 ultrasparc v9" ;;
+ *ultrasparc*) ax_gcc_arch="ultrasparc v9" ;;
+ *supersparc*|*tms390z5[[05]]*) ax_gcc_arch="supersparc v8" ;;
+ *hypersparc*|*rt62[[056]]*) ax_gcc_arch="hypersparc v8" ;;
+ *cypress*) ax_gcc_arch=cypress ;;
+ esac ;;
+
+ alphaev5) ax_gcc_arch=ev5 ;;
+ alphaev56) ax_gcc_arch=ev56 ;;
+ alphapca56) ax_gcc_arch="pca56 ev56" ;;
+ alphapca57) ax_gcc_arch="pca57 pca56 ev56" ;;
+ alphaev6) ax_gcc_arch=ev6 ;;
+ alphaev67) ax_gcc_arch=ev67 ;;
+ alphaev68) ax_gcc_arch="ev68 ev67" ;;
+ alphaev69) ax_gcc_arch="ev69 ev68 ev67" ;;
+ alphaev7) ax_gcc_arch="ev7 ev69 ev68 ev67" ;;
+ alphaev79) ax_gcc_arch="ev79 ev7 ev69 ev68 ev67" ;;
+
+ powerpc*)
+ cputype=`((grep cpu /proc/cpuinfo | head -n 1 | cut -d: -f2 | cut -d, -f1 | sed 's/ //g') ; /usr/bin/machine ; /bin/machine; grep CPU /var/run/dmesg.boot | head -n 1 | cut -d" " -f2) 2> /dev/null`
+ cputype=`echo $cputype | sed -e 's/ppc//g;s/ *//g'`
+ case $cputype in
+ *750*) ax_gcc_arch="750 G3" ;;
+ *740[[0-9]]*) ax_gcc_arch="$cputype 7400 G4" ;;
+ *74[[4-5]][[0-9]]*) ax_gcc_arch="$cputype 7450 G4" ;;
+ *74[[0-9]][[0-9]]*) ax_gcc_arch="$cputype G4" ;;
+ *970*) ax_gcc_arch="970 G5 power4";;
+ *POWER4*|*power4*|*gq*) ax_gcc_arch="power4 970";;
+ *POWER5*|*power5*|*gr*|*gs*) ax_gcc_arch="power5 power4 970";;
+ 603ev|8240) ax_gcc_arch="$cputype 603e 603";;
+ *) ax_gcc_arch=$cputype ;;
+ esac
+ ax_gcc_arch="$ax_gcc_arch powerpc"
+ ;;
+esac
+fi # not cross-compiling
+fi # guess arch
+
+if test "x$ax_gcc_arch" != x -a "x$ax_gcc_arch" != xno; then
+for arch in $ax_gcc_arch; do
+ if test "x[]m4_default([$1],yes)" = xyes; then # if we require portable code
+ flags="-mtune=$arch"
+ # -mcpu=$arch and m$arch generate nonportable code on every arch except
+ # x86. And some other arches (e.g. Alpha) don't accept -mtune. Grrr.
+ case $host_cpu in i*86|x86_64*) flags="$flags -mcpu=$arch -m$arch";; esac
+ else
+ flags="-march=$arch -mcpu=$arch -m$arch"
+ fi
+ for flag in $flags; do
+ AX_CHECK_COMPILER_FLAGS($flag, [ax_cv_gcc_archflag=$flag; break])
+ done
+ test "x$ax_cv_gcc_archflag" = xunknown || break
+done
+fi
+
+fi # $GCC=yes
+])
+AC_MSG_CHECKING([for gcc architecture flag])
+AC_MSG_RESULT($ax_cv_gcc_archflag)
+if test "x$ax_cv_gcc_archflag" = xunknown; then
+ m4_default([$3],:)
+else
+ m4_default([$2], [CFLAGS="$CFLAGS $ax_cv_gcc_archflag"])
+fi
+])
+
+AC_DEFUN([AX_CHECK_COMPILER_FLAGS],
+[AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
+AC_MSG_CHECKING([whether _AC_LANG compiler accepts $1])
+dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
+AS_LITERAL_IF([$1],
+ [AC_CACHE_VAL(AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1), [
+ ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
+ _AC_LANG_PREFIX[]FLAGS="$1"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
+ AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=yes,
+ AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=no)
+ _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])],
+ [ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
+ _AC_LANG_PREFIX[]FLAGS="$1"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
+ eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=yes,
+ eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=no)
+ _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])
+eval ax_check_compiler_flags=$AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)
+AC_MSG_RESULT($ax_check_compiler_flags)
+if test "x$ax_check_compiler_flags" = xyes; then
+ m4_default([$2], :)
+else
+ m4_default([$3], :)
+fi
+])dnl AX_CHECK_COMPILER_FLAG
Modified: freeswitch/branches/cypromis/trunk/libs/srtp/configure.in
==============================================================================
Modified: freeswitch/branches/cypromis/trunk/src/include/switch_am_config.h.in
==============================================================================
Modified: freeswitch/branches/cypromis/trunk/src/include/switch_platform.h
==============================================================================
Modified: freeswitch/branches/cypromis/trunk/src/switch_rtp.c
==============================================================================
1
0
Author: sphere
Date: Wed Jul 12 15:03:46 2006
New Revision: 1847
Added:
freeswitch/branches/pierdav/
Log:
Creating empty folder for pierdav
1
0
[commit] r1846 - in freeswitch/trunk/src: . include mod/applications/mod_ivrtest mod/applications/mod_playback mod/applications/mod_rss mod/endpoints/mod_dingaling mod/event_handlers/mod_xmpp_event mod/languages/mod_spidermonkey
by Freeswitch SVN 12 Jul '06
by Freeswitch SVN 12 Jul '06
12 Jul '06
Author: anthm
Date: Wed Jul 12 14:39:19 2006
New Revision: 1846
Modified:
freeswitch/trunk/src/include/switch_core.h
freeswitch/trunk/src/include/switch_ivr.h
freeswitch/trunk/src/include/switch_module_interfaces.h
freeswitch/trunk/src/include/switch_types.h
freeswitch/trunk/src/mod/applications/mod_ivrtest/mod_ivrtest.c
freeswitch/trunk/src/mod/applications/mod_playback/mod_playback.c
freeswitch/trunk/src/mod/applications/mod_rss/mod_rss.c
freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
freeswitch/trunk/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c
freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
freeswitch/trunk/src/switch_core.c
freeswitch/trunk/src/switch_ivr.c
Log:
rearrange the furnature
Modified: freeswitch/trunk/src/include/switch_core.h
==============================================================================
--- freeswitch/trunk/src/include/switch_core.h (original)
+++ freeswitch/trunk/src/include/switch_core.h Wed Jul 12 14:39:19 2006
@@ -335,9 +335,17 @@
\param event the event to send
\return the status returned by the message handler
*/
-SWITCH_DECLARE(switch_status_t) switch_core_session_event_send(char *uuid_str, switch_event_t *event);
+SWITCH_DECLARE(switch_status_t) switch_core_session_event_send(char *uuid_str, switch_event_t **event);
/*!
+ \brief Send an event to a session translating it to it's native message format
+ \param session the session to receive the event
+ \param event the event to receive
+ \return the status returned by the handler
+*/
+SWITCH_DECLARE(switch_status_t) switch_core_session_receive_event(switch_core_session_t *session, switch_event_t **event);
+
+/*!
\brief Retrieve private user data from a session
\param session the session to retrieve from
\return a pointer to the private data
@@ -433,7 +441,16 @@
\param event the event to queue
\return the status returned by the message handler
*/
-SWITCH_DECLARE(switch_status_t) switch_core_session_queue_event(switch_core_session_t *session, switch_event_t *event);
+SWITCH_DECLARE(switch_status_t) switch_core_session_queue_event(switch_core_session_t *session, switch_event_t **event);
+
+/*!
+ \brief DE-Queue an event on a given session
+ \param session the session to de-queue the message on
+ \param event the de-queued event
+ \return the SWITCH_STATUS_SUCCESS if the event was de-queued
+*/
+SWITCH_DECLARE(switch_status_t) switch_core_session_dequeue_event(switch_core_session_t *session, switch_event_t **event);
+
/*!
\brief Read a frame from a session
Modified: freeswitch/trunk/src/include/switch_ivr.h
==============================================================================
--- freeswitch/trunk/src/include/switch_ivr.h (original)
+++ freeswitch/trunk/src/include/switch_ivr.h Wed Jul 12 14:39:19 2006
@@ -59,7 +59,7 @@
\return SWITCH_STATUS_SUCCESS to keep the collection moving.
*/
SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_callback(switch_core_session_t *session,
- switch_dtmf_callback_function_t dtmf_callback,
+ switch_input_callback_function_t dtmf_callback,
void *buf,
unsigned int buflen);
@@ -98,7 +98,7 @@
switch_file_handle_t *fh,
char *file,
char *timer_name,
- switch_dtmf_callback_function_t dtmf_callback,
+ switch_input_callback_function_t dtmf_callback,
void *buf,
unsigned int buflen);
@@ -118,7 +118,7 @@
SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *session,
switch_file_handle_t *fh,
char *file,
- switch_dtmf_callback_function_t dtmf_callback,
+ switch_input_callback_function_t dtmf_callback,
void *buf,
unsigned int buflen);
@@ -127,7 +127,7 @@
switch_speech_handle_t *sh,
switch_codec_t *codec,
switch_timer_t *timer,
- switch_dtmf_callback_function_t dtmf_callback,
+ switch_input_callback_function_t dtmf_callback,
char *text,
void *buf,
unsigned int buflen);
@@ -150,7 +150,7 @@
char *voice_name,
char *timer_name,
uint32_t rate,
- switch_dtmf_callback_function_t dtmf_callback,
+ switch_input_callback_function_t dtmf_callback,
char *text,
void *buf,
unsigned int buflen);
@@ -169,7 +169,7 @@
SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_session_t *session,
switch_core_session_t *peer_session,
unsigned int timelimit,
- switch_dtmf_callback_function_t dtmf_callback,
+ switch_input_callback_function_t dtmf_callback,
void *session_data,
void *peer_session_data);
Modified: freeswitch/trunk/src/include/switch_module_interfaces.h
==============================================================================
--- freeswitch/trunk/src/include/switch_module_interfaces.h (original)
+++ freeswitch/trunk/src/include/switch_module_interfaces.h Wed Jul 12 14:39:19 2006
@@ -93,10 +93,10 @@
};
/*! \brief Node in which to store custom receive message callback hooks */
-struct switch_io_event_hook_queue_event {
+struct switch_io_event_hook_receive_event {
/*! the answer channel callback hook*/
- switch_queue_event_hook_t queue_event;
- struct switch_io_event_hook_queue_event *next;
+ switch_receive_event_hook_t receive_event;
+ struct switch_io_event_hook_receive_event *next;
};
/*! \brief Node in which to store custom read frame channel callback hooks */
@@ -150,7 +150,7 @@
/*! a list of receive message hooks */
switch_io_event_hook_receive_message_t *receive_message;
/*! a list of queue message hooks */
- switch_io_event_hook_queue_event_t *queue_event;
+ switch_io_event_hook_receive_event_t *receive_event;
/*! a list of read frame hooks */
switch_io_event_hook_read_frame_t *read_frame;
/*! a list of write frame hooks */
@@ -186,7 +186,7 @@
/*! receive a message from another session*/
switch_status_t (*receive_message)(switch_core_session_t *, switch_core_session_message_t *);
/*! queue a message for another session*/
- switch_status_t (*queue_event)(switch_core_session_t *, switch_event_t *);
+ switch_status_t (*receive_event)(switch_core_session_t *, switch_event_t *);
};
/*! \brief Abstraction of an module endpoint interface
Modified: freeswitch/trunk/src/include/switch_types.h
==============================================================================
--- freeswitch/trunk/src/include/switch_types.h (original)
+++ freeswitch/trunk/src/include/switch_types.h Wed Jul 12 14:39:19 2006
@@ -573,6 +573,10 @@
SWITCH_EVENT_ALL
} switch_event_types_t;
+typedef enum {
+ SWITCH_INPUT_TYPE_DTMF,
+ SWITCH_INPUT_TYPE_EVENT
+} switch_input_type_t;
typedef enum {
SWITCH_CAUSE_UNALLOCATED = 1,
@@ -651,7 +655,7 @@
typedef struct switch_io_event_hook_outgoing_channel switch_io_event_hook_outgoing_channel_t;
typedef struct switch_io_event_hook_answer_channel switch_io_event_hook_answer_channel_t;
typedef struct switch_io_event_hook_receive_message switch_io_event_hook_receive_message_t;
-typedef struct switch_io_event_hook_queue_event switch_io_event_hook_queue_event_t;
+typedef struct switch_io_event_hook_receive_event switch_io_event_hook_receive_event_t;
typedef struct switch_io_event_hook_read_frame switch_io_event_hook_read_frame_t;
typedef struct switch_io_event_hook_write_frame switch_io_event_hook_write_frame_t;
typedef struct switch_io_event_hook_kill_channel switch_io_event_hook_kill_channel_t;
@@ -682,7 +686,7 @@
typedef switch_status_t (*switch_outgoing_channel_hook_t)(switch_core_session_t *, switch_caller_profile_t *, switch_core_session_t *);
typedef switch_status_t (*switch_answer_channel_hook_t)(switch_core_session_t *);
typedef switch_status_t (*switch_receive_message_hook_t)(switch_core_session_t *, switch_core_session_message_t *);
-typedef switch_status_t (*switch_queue_event_hook_t)(switch_core_session_t *, switch_event_t *);
+typedef switch_status_t (*switch_receive_event_hook_t)(switch_core_session_t *, switch_event_t *);
typedef switch_status_t (*switch_read_frame_hook_t)(switch_core_session_t *, switch_frame_t **, int, switch_io_flag_t, int);
typedef switch_status_t (*switch_write_frame_hook_t)(switch_core_session_t *, switch_frame_t *, int, switch_io_flag_t, int);
typedef switch_status_t (*switch_kill_channel_hook_t)(switch_core_session_t *, int);
@@ -692,7 +696,11 @@
typedef struct switch_stream_handle switch_stream_handle_t;
typedef switch_status_t (*switch_stream_handle_write_function_t)(switch_stream_handle_t *handle, char *fmt, ...);
typedef switch_status_t (*switch_api_function_t)(char *in, switch_stream_handle_t *stream);
-typedef switch_status_t (*switch_dtmf_callback_function_t)(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen);
+typedef switch_status_t (*switch_input_callback_function_t)(switch_core_session_t *session,
+ void *input,
+ switch_input_type_t input_type,
+ void *buf,
+ unsigned int buflen);
typedef int (*switch_core_db_callback_func_t)(void *pArg, int argc, char **argv, char **columnNames);
typedef switch_status_t (*switch_module_load_t) (switch_loadable_module_interface_t **, char *);
typedef switch_status_t (*switch_module_reload_t) (void);
Modified: freeswitch/trunk/src/mod/applications/mod_ivrtest/mod_ivrtest.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_ivrtest/mod_ivrtest.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_ivrtest/mod_ivrtest.c Wed Jul 12 14:39:19 2006
@@ -39,16 +39,23 @@
dtmf handler function you can hook up to be executed when a digit is dialed during playback
if you return anything but SWITCH_STATUS_SUCCESS the playback will stop.
*/
-static switch_status_t on_dtmf(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
+static switch_status_t on_dtmf(switch_core_session_t *session, void *input, switch_input_type_t itype, void *buf, unsigned int buflen)
{
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Digits %s\n", dtmf);
+ switch (itype) {
+ case SWITCH_INPUT_TYPE_DTMF: {
+ char *dtmf = (char *) input;
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Digits %s\n", dtmf);
- switch_copy_string((char *)buf, dtmf, buflen);
- return SWITCH_STATUS_BREAK;
-
+ switch_copy_string((char *)buf, dtmf, buflen);
+ return SWITCH_STATUS_BREAK;
+ }
+ break;
+ default:
+ break;
+ }
+ return SWITCH_STATUS_SUCCESS;
}
-
static void disast_function(switch_core_session_t *session, char *data)
{
void *x = NULL;
@@ -107,13 +114,22 @@
}
-static switch_status_t show_dtmf(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
+static switch_status_t show_dtmf(switch_core_session_t *session, void *input, switch_input_type_t itype, void *buf, unsigned int buflen)
{
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Digits %s\n", dtmf);
-
- switch_copy_string((char *)buf, dtmf, buflen);
- return SWITCH_STATUS_SUCCESS;
+ switch (itype) {
+ case SWITCH_INPUT_TYPE_DTMF: {
+ char *dtmf = (char *) input;
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Digits %s\n", dtmf);
+
+ switch_copy_string((char *)buf, dtmf, buflen);
+ }
+ break;
+ default:
+ break;
+ }
+
+ return SWITCH_STATUS_SUCCESS;
}
static void tts_function(switch_core_session_t *session, char *data)
Modified: freeswitch/trunk/src/mod/applications/mod_playback/mod_playback.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_playback/mod_playback.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_playback/mod_playback.c Wed Jul 12 14:39:19 2006
@@ -37,12 +37,22 @@
dtmf handler function you can hook up to be executed when a digit is dialed during playback
if you return anything but SWITCH_STATUS_SUCCESS the playback will stop.
*/
-static switch_status_t on_dtmf(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
+static switch_status_t on_dtmf(switch_core_session_t *session, void *input, switch_input_type_t itype, void *buf, unsigned int buflen)
{
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Digits %s\n", dtmf);
- if (*dtmf == '*') {
- return SWITCH_STATUS_FALSE;
+
+ switch (itype) {
+ case SWITCH_INPUT_TYPE_DTMF: {
+ char *dtmf = (char *) input;
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Digits %s\n", dtmf);
+
+ if (*dtmf == '*') {
+ return SWITCH_STATUS_FALSE;
+ }
+ }
+ break;
+ default:
+ break;
}
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/mod/applications/mod_rss/mod_rss.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_rss/mod_rss.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_rss/mod_rss.c Wed Jul 12 14:39:19 2006
@@ -85,68 +85,74 @@
dtmf handler function you can hook up to be executed when a digit is dialed during playback
if you return anything but SWITCH_STATUS_SUCCESS the playback will stop.
*/
-static switch_status_t on_dtmf(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
-{
+static switch_status_t on_dtmf(switch_core_session_t *session, void *input, switch_input_type_t itype, void *buf, unsigned int buflen)
- struct dtmf_buffer *dtb;
- dtb = (struct dtmf_buffer *) buf;
+{
+ switch (itype) {
+ case SWITCH_INPUT_TYPE_DTMF: {
+ char *dtmf = (char *) input;
+ struct dtmf_buffer *dtb;
+ dtb = (struct dtmf_buffer *) buf;
- switch(*dtmf) {
- case '#':
- switch_set_flag(dtb, SFLAG_MAIN);
- return SWITCH_STATUS_BREAK;
- case '6':
- dtb->index++;
- return SWITCH_STATUS_BREAK;
- case '4':
- dtb->index--;
- return SWITCH_STATUS_BREAK;
- case '*':
- if (switch_test_flag(dtb->sh, SWITCH_SPEECH_FLAG_PAUSE)) {
- switch_clear_flag(dtb->sh, SWITCH_SPEECH_FLAG_PAUSE);
- } else {
- switch_set_flag(dtb->sh, SWITCH_SPEECH_FLAG_PAUSE);
- }
- break;
- case '5':
- switch_core_speech_text_param_tts(dtb->sh, "voice", "next");
- switch_set_flag(dtb, SFLAG_INFO);
- return SWITCH_STATUS_BREAK;
- break;
- case '9':
- switch_core_speech_text_param_tts(dtb->sh, "voice", dtb->voice);
- switch_set_flag(dtb, SFLAG_INFO);
- return SWITCH_STATUS_BREAK;
- break;
- case '2':
- if (dtb->speed < 260) {
- dtb->speed += 30;
- switch_core_speech_numeric_param_tts(dtb->sh, "speech/rate", dtb->speed);
+ switch(*dtmf) {
+ case '#':
+ switch_set_flag(dtb, SFLAG_MAIN);
+ return SWITCH_STATUS_BREAK;
+ case '6':
+ dtb->index++;
+ return SWITCH_STATUS_BREAK;
+ case '4':
+ dtb->index--;
+ return SWITCH_STATUS_BREAK;
+ case '*':
+ if (switch_test_flag(dtb->sh, SWITCH_SPEECH_FLAG_PAUSE)) {
+ switch_clear_flag(dtb->sh, SWITCH_SPEECH_FLAG_PAUSE);
+ } else {
+ switch_set_flag(dtb->sh, SWITCH_SPEECH_FLAG_PAUSE);
+ }
+ break;
+ case '5':
+ switch_core_speech_text_param_tts(dtb->sh, "voice", "next");
switch_set_flag(dtb, SFLAG_INFO);
return SWITCH_STATUS_BREAK;
- }
- break;
- case '7':
- dtb->speed = TTS_MEAN_SPEED;
- switch_core_speech_numeric_param_tts(dtb->sh, "speech/rate", dtb->speed);
- switch_set_flag(dtb, SFLAG_INFO);
- return SWITCH_STATUS_BREAK;
- case '8':
- if (dtb->speed > 80) {
- dtb->speed -= 30;
+ break;
+ case '9':
+ switch_core_speech_text_param_tts(dtb->sh, "voice", dtb->voice);
+ switch_set_flag(dtb, SFLAG_INFO);
+ return SWITCH_STATUS_BREAK;
+ break;
+ case '2':
+ if (dtb->speed < 260) {
+ dtb->speed += 30;
+ switch_core_speech_numeric_param_tts(dtb->sh, "speech/rate", dtb->speed);
+ switch_set_flag(dtb, SFLAG_INFO);
+ return SWITCH_STATUS_BREAK;
+ }
+ break;
+ case '7':
+ dtb->speed = TTS_MEAN_SPEED;
switch_core_speech_numeric_param_tts(dtb->sh, "speech/rate", dtb->speed);
switch_set_flag(dtb, SFLAG_INFO);
return SWITCH_STATUS_BREAK;
+ case '8':
+ if (dtb->speed > 80) {
+ dtb->speed -= 30;
+ switch_core_speech_numeric_param_tts(dtb->sh, "speech/rate", dtb->speed);
+ switch_set_flag(dtb, SFLAG_INFO);
+ return SWITCH_STATUS_BREAK;
+ }
+ break;
+ case '0':
+ switch_set_flag(dtb, SFLAG_INSTRUCT);
+ return SWITCH_STATUS_BREAK;
}
+ }
break;
- case '0':
- switch_set_flag(dtb, SFLAG_INSTRUCT);
- return SWITCH_STATUS_BREAK;
+ default:
+ break;
}
-
return SWITCH_STATUS_SUCCESS;
}
-
static void rss_function(switch_core_session_t *session, char *data)
{
Modified: freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c Wed Jul 12 14:39:19 2006
@@ -1509,7 +1509,9 @@
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", from);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "subject", subject);
switch_event_add_body(event, msg);
- switch_event_fire(&event);
+ if (switch_core_session_queue_event(tech_pvt->session, &event) != SWITCH_STATUS_SUCCESS) {
+ switch_event_fire(&event);
+ }
}
break;
Modified: freeswitch/trunk/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c Wed Jul 12 14:39:19 2006
@@ -239,6 +239,7 @@
stream.data = retbuf;
stream.end = stream.data;
stream.data_size = sizeof(retbuf);
+ stream.write_function = switch_console_stream_write;
switch_api_execute(cmd, arg, &stream);
return 0;
Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c (original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c Wed Jul 12 14:39:19 2006
@@ -175,218 +175,247 @@
return SWITCH_STATUS_SUCCESS;
}
-static switch_status_t js_stream_dtmf_callback(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
+static switch_status_t js_stream_dtmf_callback(switch_core_session_t *session, void *input, switch_input_type_t itype, void *buf, unsigned int buflen)
{
- char code[2048];
- struct dtmf_callback_state *cb_state = buf;
- struct js_session *jss = cb_state->session_state;
- switch_file_handle_t *fh = cb_state->extra;
- jsval rval;
- char *ret;
+ switch (itype) {
+ case SWITCH_INPUT_TYPE_DTMF: {
+ char *dtmf = (char *) input;
+ char code[2048];
+ struct dtmf_callback_state *cb_state = buf;
+ struct js_session *jss = cb_state->session_state;
+ switch_file_handle_t *fh = cb_state->extra;
+ jsval rval;
+ char *ret;
- if (!jss) {
- return SWITCH_STATUS_FALSE;
- }
-
- if (cb_state->digit_count || (cb_state->code_buffer[0] > 47 && cb_state->code_buffer[0] < 58)) {
- char *d;
- if (!cb_state->digit_count) {
- cb_state->digit_count = atoi(cb_state->code_buffer);
+ if (!jss) {
+ return SWITCH_STATUS_FALSE;
}
+
+ if (cb_state->digit_count || (cb_state->code_buffer[0] > 47 && cb_state->code_buffer[0] < 58)) {
+ char *d;
+ if (!cb_state->digit_count) {
+ cb_state->digit_count = atoi(cb_state->code_buffer);
+ }
- for(d = dtmf; *d; d++) {
- cb_state->ret_buffer[cb_state->ret_buffer_len++] = *d;
- if ((cb_state->ret_buffer_len > cb_state->digit_count)||
- (cb_state->ret_buffer_len > sizeof(cb_state->ret_buffer))||
- (cb_state->ret_buffer_len >= cb_state->digit_count)
- ) {
- return SWITCH_STATUS_FALSE;
+ for(d = dtmf; *d; d++) {
+ cb_state->ret_buffer[cb_state->ret_buffer_len++] = *d;
+ if ((cb_state->ret_buffer_len > cb_state->digit_count)||
+ (cb_state->ret_buffer_len > sizeof(cb_state->ret_buffer))||
+ (cb_state->ret_buffer_len >= cb_state->digit_count)
+ ) {
+ return SWITCH_STATUS_FALSE;
+ }
}
- }
- return SWITCH_STATUS_SUCCESS;
- } else {
- snprintf(code, sizeof(code), "~%s(\"%s\")", cb_state->code_buffer, dtmf);
- eval_some_js(code, jss->cx, jss->obj, &rval);
- ret = JS_GetStringBytes(JS_ValueToString(jss->cx, rval));
+ return SWITCH_STATUS_SUCCESS;
+ } else {
+ snprintf(code, sizeof(code), "~%s(\"%s\")", cb_state->code_buffer, dtmf);
+ eval_some_js(code, jss->cx, jss->obj, &rval);
+ ret = JS_GetStringBytes(JS_ValueToString(jss->cx, rval));
- if (!strncasecmp(ret, "speed", 4)) {
- char *p;
+ if (!strncasecmp(ret, "speed", 4)) {
+ char *p;
- if ((p = strchr(ret, ':'))) {
- p++;
- if (*p == '+' || *p == '-') {
- int step;
- if (!(step = atoi(p))) {
- step = 1;
+ if ((p = strchr(ret, ':'))) {
+ p++;
+ if (*p == '+' || *p == '-') {
+ int step;
+ if (!(step = atoi(p))) {
+ step = 1;
+ }
+ fh->speed += step;
+ } else {
+ int speed = atoi(p);
+ fh->speed = speed;
}
- fh->speed += step;
+ return SWITCH_STATUS_SUCCESS;
+ }
+
+ return SWITCH_STATUS_FALSE;
+ } else if (!strcasecmp(ret, "pause")) {
+ if (switch_test_flag(fh, SWITCH_FILE_PAUSE)) {
+ switch_clear_flag(fh, SWITCH_FILE_PAUSE);
} else {
- int speed = atoi(p);
- fh->speed = speed;
+ switch_set_flag(fh, SWITCH_FILE_PAUSE);
}
return SWITCH_STATUS_SUCCESS;
- }
-
- return SWITCH_STATUS_FALSE;
- } else if (!strcasecmp(ret, "pause")) {
- if (switch_test_flag(fh, SWITCH_FILE_PAUSE)) {
- switch_clear_flag(fh, SWITCH_FILE_PAUSE);
- } else {
- switch_set_flag(fh, SWITCH_FILE_PAUSE);
- }
- return SWITCH_STATUS_SUCCESS;
- } else if (!strcasecmp(ret, "restart")) {
- unsigned int pos = 0;
- fh->speed = 0;
- switch_core_file_seek(fh, &pos, 0, SEEK_SET);
- return SWITCH_STATUS_SUCCESS;
- } else if (!strncasecmp(ret, "seek", 4)) {
- switch_codec_t *codec;
- unsigned int samps = 0;
- unsigned int pos = 0;
- char *p;
- codec = switch_core_session_get_read_codec(jss->session);
+ } else if (!strcasecmp(ret, "restart")) {
+ unsigned int pos = 0;
+ fh->speed = 0;
+ switch_core_file_seek(fh, &pos, 0, SEEK_SET);
+ return SWITCH_STATUS_SUCCESS;
+ } else if (!strncasecmp(ret, "seek", 4)) {
+ switch_codec_t *codec;
+ unsigned int samps = 0;
+ unsigned int pos = 0;
+ char *p;
+ codec = switch_core_session_get_read_codec(jss->session);
- if ((p = strchr(ret, ':'))) {
- p++;
- if (*p == '+' || *p == '-') {
- int step;
- if (!(step = atoi(p))) {
- step = 1000;
- }
- if (step > 0) {
- samps = step * (codec->implementation->samples_per_second / 1000);
- switch_core_file_seek(fh, &pos, samps, SEEK_CUR);
+ if ((p = strchr(ret, ':'))) {
+ p++;
+ if (*p == '+' || *p == '-') {
+ int step;
+ if (!(step = atoi(p))) {
+ step = 1000;
+ }
+ if (step > 0) {
+ samps = step * (codec->implementation->samples_per_second / 1000);
+ switch_core_file_seek(fh, &pos, samps, SEEK_CUR);
+ } else {
+ samps = step * (codec->implementation->samples_per_second / 1000);
+ switch_core_file_seek(fh, &pos, fh->pos - samps, SEEK_SET);
+ }
} else {
- samps = step * (codec->implementation->samples_per_second / 1000);
- switch_core_file_seek(fh, &pos, fh->pos - samps, SEEK_SET);
+ samps = atoi(p) * (codec->implementation->samples_per_second / 1000);
+ switch_core_file_seek(fh, &pos, samps, SEEK_SET);
}
- } else {
- samps = atoi(p) * (codec->implementation->samples_per_second / 1000);
- switch_core_file_seek(fh, &pos, samps, SEEK_SET);
}
+
+ return SWITCH_STATUS_SUCCESS;
}
- return SWITCH_STATUS_SUCCESS;
- }
-
- if (!strcmp(ret, "true") || !strcmp(ret, "undefined")) {
- return SWITCH_STATUS_SUCCESS;
- }
+ if (!strcmp(ret, "true") || !strcmp(ret, "undefined")) {
+ return SWITCH_STATUS_SUCCESS;
+ }
- if (ret) {
- switch_copy_string(cb_state->ret_buffer, ret, sizeof(cb_state->ret_buffer));
+ if (ret) {
+ switch_copy_string(cb_state->ret_buffer, ret, sizeof(cb_state->ret_buffer));
+ }
}
+
+ return SWITCH_STATUS_FALSE;
}
+ break;
+ default:
+ break;
+ }
+ return SWITCH_STATUS_SUCCESS;
- return SWITCH_STATUS_FALSE;
}
-
-static switch_status_t js_record_dtmf_callback(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
+static switch_status_t js_record_dtmf_callback(switch_core_session_t *session, void *input, switch_input_type_t itype, void *buf, unsigned int buflen)
{
- char code[2048];
- struct dtmf_callback_state *cb_state = buf;
- struct js_session *jss = cb_state->session_state;
- switch_file_handle_t *fh = cb_state->extra;
- jsval rval;
- char *ret;
+ switch (itype) {
+ case SWITCH_INPUT_TYPE_DTMF: {
+ char *dtmf = (char *) input;
+ char code[2048];
+ struct dtmf_callback_state *cb_state = buf;
+ struct js_session *jss = cb_state->session_state;
+ switch_file_handle_t *fh = cb_state->extra;
+ jsval rval;
+ char *ret;
- if (!jss) {
- return SWITCH_STATUS_FALSE;
- }
-
- if (cb_state->digit_count || (cb_state->code_buffer[0] > 47 && cb_state->code_buffer[0] < 58)) {
- char *d;
- if (!cb_state->digit_count) {
- cb_state->digit_count = atoi(cb_state->code_buffer);
+ if (!jss) {
+ return SWITCH_STATUS_FALSE;
}
-
- for(d = dtmf; *d; d++) {
- cb_state->ret_buffer[cb_state->ret_buffer_len++] = *d;
- if ((cb_state->ret_buffer_len > cb_state->digit_count)||
- (cb_state->ret_buffer_len > sizeof(cb_state->ret_buffer))||
- (cb_state->ret_buffer_len >= cb_state->digit_count)
- ) {
- return SWITCH_STATUS_FALSE;
+
+ if (cb_state->digit_count || (cb_state->code_buffer[0] > 47 && cb_state->code_buffer[0] < 58)) {
+ char *d;
+ if (!cb_state->digit_count) {
+ cb_state->digit_count = atoi(cb_state->code_buffer);
}
- }
- return SWITCH_STATUS_SUCCESS;
- } else {
- snprintf(code, sizeof(code), "~%s(\"%s\")", cb_state->code_buffer, dtmf);
- eval_some_js(code, jss->cx, jss->obj, &rval);
- ret = JS_GetStringBytes(JS_ValueToString(jss->cx, rval));
- if (!strcasecmp(ret, "pause")) {
- if (switch_test_flag(fh, SWITCH_FILE_PAUSE)) {
- switch_clear_flag(fh, SWITCH_FILE_PAUSE);
- } else {
- switch_set_flag(fh, SWITCH_FILE_PAUSE);
+ for(d = dtmf; *d; d++) {
+ cb_state->ret_buffer[cb_state->ret_buffer_len++] = *d;
+ if ((cb_state->ret_buffer_len > cb_state->digit_count)||
+ (cb_state->ret_buffer_len > sizeof(cb_state->ret_buffer))||
+ (cb_state->ret_buffer_len >= cb_state->digit_count)
+ ) {
+ return SWITCH_STATUS_FALSE;
+ }
}
return SWITCH_STATUS_SUCCESS;
- } else if (!strcasecmp(ret, "restart")) {
- unsigned int pos = 0;
- fh->speed = 0;
- switch_core_file_seek(fh, &pos, 0, SEEK_SET);
- return SWITCH_STATUS_SUCCESS;
- }
+ } else {
+ snprintf(code, sizeof(code), "~%s(\"%s\")", cb_state->code_buffer, dtmf);
+ eval_some_js(code, jss->cx, jss->obj, &rval);
+ ret = JS_GetStringBytes(JS_ValueToString(jss->cx, rval));
- if (!strcmp(ret, "true") || !strcmp(ret, "undefined")) {
- return SWITCH_STATUS_SUCCESS;
- }
+ if (!strcasecmp(ret, "pause")) {
+ if (switch_test_flag(fh, SWITCH_FILE_PAUSE)) {
+ switch_clear_flag(fh, SWITCH_FILE_PAUSE);
+ } else {
+ switch_set_flag(fh, SWITCH_FILE_PAUSE);
+ }
+ return SWITCH_STATUS_SUCCESS;
+ } else if (!strcasecmp(ret, "restart")) {
+ unsigned int pos = 0;
+ fh->speed = 0;
+ switch_core_file_seek(fh, &pos, 0, SEEK_SET);
+ return SWITCH_STATUS_SUCCESS;
+ }
+
+ if (!strcmp(ret, "true") || !strcmp(ret, "undefined")) {
+ return SWITCH_STATUS_SUCCESS;
+ }
- if (ret) {
- switch_copy_string(cb_state->ret_buffer, ret, sizeof(cb_state->ret_buffer));
+ if (ret) {
+ switch_copy_string(cb_state->ret_buffer, ret, sizeof(cb_state->ret_buffer));
+ }
}
+ return SWITCH_STATUS_FALSE;
}
+ break;
+ default:
+ break;
+ }
- return SWITCH_STATUS_FALSE;
+ return SWITCH_STATUS_SUCCESS;
}
-static switch_status_t js_speak_dtmf_callback(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
+static switch_status_t js_speak_dtmf_callback(switch_core_session_t *session, void *input, switch_input_type_t itype, void *buf, unsigned int buflen)
{
- char code[2048];
- struct dtmf_callback_state *cb_state = buf;
- struct js_session *jss = cb_state->session_state;
- jsval rval;
- char *ret;
+ switch (itype) {
+ case SWITCH_INPUT_TYPE_DTMF: {
+ char *dtmf = (char *) input;
+ char code[2048];
+ struct dtmf_callback_state *cb_state = buf;
+ struct js_session *jss = cb_state->session_state;
+ jsval rval;
+ char *ret;
- if (!jss) {
- return SWITCH_STATUS_FALSE;
- }
-
- if (cb_state->digit_count || (cb_state->code_buffer[0] > 47 && cb_state->code_buffer[0] < 58)) {
- char *d;
- if (!cb_state->digit_count) {
- cb_state->digit_count = atoi(cb_state->code_buffer);
+ if (!jss) {
+ return SWITCH_STATUS_FALSE;
}
-
- for(d = dtmf; *d; d++) {
- cb_state->ret_buffer[cb_state->ret_buffer_len++] = *d;
- if ((cb_state->ret_buffer_len > cb_state->digit_count)||
- (cb_state->ret_buffer_len > sizeof(cb_state->ret_buffer))||
- (cb_state->ret_buffer_len >= cb_state->digit_count)
- ) {
- return SWITCH_STATUS_FALSE;
+
+ if (cb_state->digit_count || (cb_state->code_buffer[0] > 47 && cb_state->code_buffer[0] < 58)) {
+ char *d;
+ if (!cb_state->digit_count) {
+ cb_state->digit_count = atoi(cb_state->code_buffer);
}
- }
- return SWITCH_STATUS_SUCCESS;
- } else {
- snprintf(code, sizeof(code), "~%s(\"%s\")", cb_state->code_buffer, dtmf);
- eval_some_js(code, jss->cx, jss->obj, &rval);
- ret = JS_GetStringBytes(JS_ValueToString(jss->cx, rval));
- if (!strcmp(ret, "true") || !strcmp(ret, "undefined")) {
+ for(d = dtmf; *d; d++) {
+ cb_state->ret_buffer[cb_state->ret_buffer_len++] = *d;
+ if ((cb_state->ret_buffer_len > cb_state->digit_count)||
+ (cb_state->ret_buffer_len > sizeof(cb_state->ret_buffer))||
+ (cb_state->ret_buffer_len >= cb_state->digit_count)
+ ) {
+ return SWITCH_STATUS_FALSE;
+ }
+ }
return SWITCH_STATUS_SUCCESS;
- }
+ } else {
+ snprintf(code, sizeof(code), "~%s(\"%s\")", cb_state->code_buffer, dtmf);
+ eval_some_js(code, jss->cx, jss->obj, &rval);
+ ret = JS_GetStringBytes(JS_ValueToString(jss->cx, rval));
+
+ if (!strcmp(ret, "true") || !strcmp(ret, "undefined")) {
+ return SWITCH_STATUS_SUCCESS;
+ }
- if (ret) {
- switch_copy_string(cb_state->ret_buffer, ret, sizeof(cb_state->ret_buffer));
+ if (ret) {
+ switch_copy_string(cb_state->ret_buffer, ret, sizeof(cb_state->ret_buffer));
+ }
}
+
+ return SWITCH_STATUS_FALSE;
}
+ break;
+ default:
+ break;
+ }
- return SWITCH_STATUS_FALSE;
+ return SWITCH_STATUS_SUCCESS;
+
}
static JSBool session_recordfile(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
@@ -397,7 +426,7 @@
char *dtmf_callback = NULL;
void *bp = NULL;
int len = 0;
- switch_dtmf_callback_function_t dtmf_func = NULL;
+ switch_input_callback_function_t dtmf_func = NULL;
struct dtmf_callback_state cb_state = {0};
switch_file_handle_t fh;
@@ -443,7 +472,7 @@
char *dtmf_callback = NULL;
void *bp = NULL;
int len = 0;
- switch_dtmf_callback_function_t dtmf_func = NULL;
+ switch_input_callback_function_t dtmf_func = NULL;
struct dtmf_callback_state cb_state = {0};
switch_file_handle_t fh;
@@ -499,7 +528,7 @@
void *bp = NULL;
int len = 0;
struct dtmf_callback_state cb_state = {0};
- switch_dtmf_callback_function_t dtmf_func = NULL;
+ switch_input_callback_function_t dtmf_func = NULL;
channel = switch_core_session_get_channel(jss->session);
assert(channel != NULL);
@@ -1804,6 +1833,8 @@
stream.end = stream.data;
stream.data_size = sizeof(retbuf);
switch_api_execute(cmd, arg, &stream);
+ stream.write_function = switch_console_stream_write;
+
*rval = STRING_TO_JSVAL (JS_NewStringCopyZ(cx, retbuf));
} else {
*rval = STRING_TO_JSVAL (JS_NewStringCopyZ(cx, ""));
Modified: freeswitch/trunk/src/switch_core.c
==============================================================================
--- freeswitch/trunk/src/switch_core.c (original)
+++ freeswitch/trunk/src/switch_core.c Wed Jul 12 14:39:19 2006
@@ -307,7 +307,7 @@
return status;
}
-SWITCH_DECLARE(switch_status_t) switch_core_session_event_send(char *uuid_str, switch_event_t *event)
+SWITCH_DECLARE(switch_status_t) switch_core_session_event_send(char *uuid_str, switch_event_t **event)
{
switch_core_session_t *session = NULL;
switch_status_t status = SWITCH_STATUS_FALSE;
@@ -1057,29 +1057,73 @@
return status;
}
-SWITCH_DECLARE(switch_status_t) switch_core_session_queue_event(switch_core_session_t *session, switch_event_t *event)
+
+SWITCH_DECLARE(switch_status_t) switch_core_session_receive_event(switch_core_session_t *session, switch_event_t **event)
{
- switch_io_event_hook_queue_event_t *ptr;
- switch_status_t status = SWITCH_STATUS_FALSE, istatus = SWITCH_STATUS_FALSE;;
+ switch_io_event_hook_receive_event_t *ptr;
+ switch_status_t status = SWITCH_STATUS_FALSE;
assert(session != NULL);
- if (session->endpoint_interface->io_routines->queue_event) {
- status = session->endpoint_interface->io_routines->queue_event(session, event);
- if (status != SWITCH_STATUS_SUCCESS && status != SWITCH_STATUS_BREAK) {
- for (ptr = session->event_hooks.queue_event; ptr; ptr = ptr->next) {
- if ((istatus = ptr->queue_event(session, event)) != SWITCH_STATUS_SUCCESS) {
- break;
+ /* Acquire a read lock on the session or forget it the channel is dead */
+ if (switch_thread_rwlock_tryrdlock(session->rwlock) == SWITCH_STATUS_SUCCESS) {
+ if (switch_channel_get_state(session->channel) < CS_HANGUP) {
+ if (session->endpoint_interface->io_routines->receive_event) {
+ status = session->endpoint_interface->io_routines->receive_event(session, *event);
+ }
+
+ if (status == SWITCH_STATUS_SUCCESS) {
+ for (ptr = session->event_hooks.receive_event; ptr; ptr = ptr->next) {
+ if ((status = ptr->receive_event(session, *event)) != SWITCH_STATUS_SUCCESS) {
+ break;
+ }
}
}
- }
-
- if (status == SWITCH_STATUS_SUCCESS || status == SWITCH_STATUS_BREAK) {
- if (!session->event_queue) {
- switch_queue_create(&session->event_queue, SWITCH_EVENT_QUEUE_LEN, session->pool);
+
+ if (status == SWITCH_STATUS_BREAK) {
+ status = SWITCH_STATUS_SUCCESS;
}
- switch_queue_push(session->event_queue, event);
+
+ if (status == SWITCH_STATUS_SUCCESS) {
+ switch_event_destroy(event);
+ }
+ }
+ switch_thread_rwlock_unlock(session->rwlock);
+ }
+
+ return status;
+}
+
+SWITCH_DECLARE(switch_status_t) switch_core_session_queue_event(switch_core_session_t *session, switch_event_t **event)
+
+{
+ switch_status_t status = SWITCH_STATUS_SUCCESS;
+
+ assert(session != NULL);
+
+ if (!session->event_queue) {
+ switch_queue_create(&session->event_queue, SWITCH_EVENT_QUEUE_LEN, session->pool);
+ }
+
+ if ((status = (switch_status_t) switch_queue_push(session->event_queue, *event) == SWITCH_STATUS_SUCCESS)) {
+ *event = NULL;
+ }
+
+ return status;
+}
+
+SWITCH_DECLARE(switch_status_t) switch_core_session_dequeue_event(switch_core_session_t *session, switch_event_t **event)
+
+{
+ switch_status_t status = SWITCH_STATUS_FALSE;
+ void *pop;
+
+ assert(session != NULL);
+
+ if (session->event_queue) {
+ if ((status = (switch_status_t) switch_queue_trypop(session->event_queue, &pop)) == SWITCH_STATUS_SUCCESS) {
+ *event = (switch_event_t *) pop;
}
}
Modified: freeswitch/trunk/src/switch_ivr.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr.c (original)
+++ freeswitch/trunk/src/switch_ivr.c Wed Jul 12 14:39:19 2006
@@ -36,7 +36,7 @@
SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_callback(switch_core_session_t *session,
- switch_dtmf_callback_function_t dtmf_callback,
+ switch_input_callback_function_t input_callback,
void *buf,
unsigned int buflen)
{
@@ -46,19 +46,26 @@
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
- if (!dtmf_callback) {
+ if (!input_callback) {
return SWITCH_STATUS_GENERR;
}
while(switch_channel_ready(channel)) {
switch_frame_t *read_frame;
+ switch_event_t *event;
+
char dtmf[128];
if (switch_channel_has_dtmf(channel)) {
switch_channel_dequeue_dtmf(channel, dtmf, sizeof(dtmf));
- status = dtmf_callback(session, dtmf, buf, buflen);
+ status = input_callback(session, dtmf, SWITCH_INPUT_TYPE_DTMF, buf, buflen);
}
+ if (switch_core_session_dequeue_event(session, &event) == SWITCH_STATUS_SUCCESS) {
+ status = input_callback(session, event, SWITCH_INPUT_TYPE_EVENT, buf, buflen);
+ switch_event_destroy(&event);
+ }
+
if (status != SWITCH_STATUS_SUCCESS) {
break;
}
@@ -156,7 +163,7 @@
SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *session,
switch_file_handle_t *fh,
char *file,
- switch_dtmf_callback_function_t dtmf_callback,
+ switch_input_callback_function_t input_callback,
void *buf,
unsigned int buflen)
{
@@ -216,22 +223,31 @@
while(switch_channel_ready(channel)) {
switch_size_t len;
+ switch_event_t *event;
- if (dtmf_callback || buf) {
+ if (input_callback || buf) {
/*
dtmf handler function you can hook up to be executed when a digit is dialed during playback
if you return anything but SWITCH_STATUS_SUCCESS the playback will stop.
*/
if (switch_channel_has_dtmf(channel)) {
switch_channel_dequeue_dtmf(channel, dtmf, sizeof(dtmf));
- if (dtmf_callback) {
- status = dtmf_callback(session, dtmf, buf, buflen);
+ if (input_callback) {
+ status = input_callback(session, dtmf, SWITCH_INPUT_TYPE_DTMF, buf, buflen);
} else {
switch_copy_string((char *)buf, dtmf, buflen);
status = SWITCH_STATUS_BREAK;
}
}
+ if (input_callback) {
+ if (switch_core_session_dequeue_event(session, &event) == SWITCH_STATUS_SUCCESS) {
+ status = input_callback(session, event, SWITCH_INPUT_TYPE_EVENT, buf, buflen);
+ switch_event_destroy(&event);
+ }
+ }
+
+
if (status != SWITCH_STATUS_SUCCESS) {
break;
}
@@ -257,7 +273,7 @@
switch_file_handle_t *fh,
char *file,
char *timer_name,
- switch_dtmf_callback_function_t dtmf_callback,
+ switch_input_callback_function_t input_callback,
void *buf,
unsigned int buflen)
{
@@ -352,21 +368,29 @@
int done = 0;
int do_speed = 1;
int last_speed = -1;
+ switch_event_t *event;
- if (dtmf_callback || buf) {
+ if (input_callback || buf) {
/*
dtmf handler function you can hook up to be executed when a digit is dialed during playback
if you return anything but SWITCH_STATUS_SUCCESS the playback will stop.
*/
if (switch_channel_has_dtmf(channel)) {
switch_channel_dequeue_dtmf(channel, dtmf, sizeof(dtmf));
- if (dtmf_callback) {
- status = dtmf_callback(session, dtmf, buf, buflen);
+ if (input_callback) {
+ status = input_callback(session, dtmf, SWITCH_INPUT_TYPE_DTMF, buf, buflen);
} else {
switch_copy_string((char *)buf, dtmf, buflen);
status = SWITCH_STATUS_BREAK;
}
}
+
+ if (input_callback) {
+ if (switch_core_session_dequeue_event(session, &event) == SWITCH_STATUS_SUCCESS) {
+ status = input_callback(session, event, SWITCH_INPUT_TYPE_EVENT, buf, buflen);
+ switch_event_destroy(&event);
+ }
+ }
if (status != SWITCH_STATUS_SUCCESS) {
done = 1;
@@ -501,7 +525,7 @@
switch_speech_handle_t *sh,
switch_codec_t *codec,
switch_timer_t *timer,
- switch_dtmf_callback_function_t dtmf_callback,
+ switch_input_callback_function_t input_callback,
char *text,
void *buf,
unsigned int buflen)
@@ -559,8 +583,9 @@
ilen = len;
while(switch_channel_ready(channel)) {
+ switch_event_t *event;
- if (dtmf_callback || buf) {
+ if (input_callback || buf) {
/*
dtmf handler function you can hook up to be executed when a digit is dialed during playback
if you return anything but SWITCH_STATUS_SUCCESS the playback will stop.
@@ -570,15 +595,22 @@
status = SWITCH_STATUS_BREAK;
} else {
switch_channel_dequeue_dtmf(channel, dtmf, sizeof(dtmf));
- if (dtmf_callback) {
- status = dtmf_callback(session, dtmf, buf, buflen);
+ if (input_callback) {
+ status = input_callback(session, dtmf, SWITCH_INPUT_TYPE_DTMF, buf, buflen);
} else {
switch_copy_string((char *)buf, dtmf, buflen);
status = SWITCH_STATUS_BREAK;
}
}
}
-
+
+ if (input_callback) {
+ if (switch_core_session_dequeue_event(session, &event) == SWITCH_STATUS_SUCCESS) {
+ status = input_callback(session, event, SWITCH_INPUT_TYPE_EVENT, buf, buflen);
+ switch_event_destroy(&event);
+ }
+ }
+
if (status != SWITCH_STATUS_SUCCESS) {
done = 1;
break;
@@ -679,7 +711,7 @@
char *voice_name,
char *timer_name,
uint32_t rate,
- switch_dtmf_callback_function_t dtmf_callback,
+ switch_input_callback_function_t input_callback,
char *text,
void *buf,
unsigned int buflen)
@@ -761,7 +793,7 @@
}
}
- switch_ivr_speak_text_handle(session, &sh, &codec, timer_name ? &timer : NULL, dtmf_callback, text, buf, buflen);
+ switch_ivr_speak_text_handle(session, &sh, &codec, timer_name ? &timer : NULL, input_callback, text, buf, buflen);
flags = 0;
switch_core_speech_close(&sh, &flags);
switch_core_codec_destroy(&codec);
@@ -790,7 +822,7 @@
switch_core_thread_session_t *his_thread, *data = obj;
int *stream_id_p;
int stream_id = 0, ans_a = 0, ans_b = 0;
- switch_dtmf_callback_function_t dtmf_callback;
+ switch_input_callback_function_t input_callback;
switch_core_session_message_t msg = {0};
void *user_data;
@@ -804,7 +836,7 @@
session_b = data->objs[1];
stream_id_p = data->objs[2];
- dtmf_callback = (switch_dtmf_callback_function_t) data->objs[3];
+ input_callback = (switch_input_callback_function_t) data->objs[3];
user_data = data->objs[4];
his_thread = data->objs[5];
@@ -824,6 +856,7 @@
while (data->running > 0 && his_thread->running > 0) {
switch_channel_state_t b_state = switch_channel_get_state(chan_b);
switch_status_t status;
+ switch_event_t *event;
switch (b_state) {
case CS_HANGUP:
@@ -862,14 +895,26 @@
switch_channel_dequeue_dtmf(chan_a, dtmf, sizeof(dtmf));
switch_core_session_send_dtmf(session_b, dtmf);
- if (dtmf_callback) {
- if (dtmf_callback(session_a, dtmf, user_data, 0) != SWITCH_STATUS_SUCCESS) {
+ if (input_callback) {
+ if (input_callback(session_a, dtmf, SWITCH_INPUT_TYPE_DTMF, user_data, 0) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s ended call via DTMF\n", switch_channel_get_name(chan_a));
data->running = -1;
break;
}
}
- }
+ }
+
+ if (switch_core_session_dequeue_event(session_a, &event) == SWITCH_STATUS_SUCCESS) {
+ if (input_callback) {
+ status = input_callback(session_a, event, SWITCH_INPUT_TYPE_EVENT, user_data, 0);
+ }
+
+ if (switch_core_session_receive_event(session_b, &event) != SWITCH_STATUS_SUCCESS) {
+ switch_event_destroy(&event);
+ }
+
+ }
+
}
/* read audio from 1 channel and write it to the other */
@@ -973,7 +1018,7 @@
SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_session_t *session,
switch_core_session_t *peer_session,
unsigned int timelimit,
- switch_dtmf_callback_function_t dtmf_callback,
+ switch_input_callback_function_t input_callback,
void *session_data,
void *peer_session_data)
@@ -1002,7 +1047,7 @@
other_audio_thread->objs[0] = session;
other_audio_thread->objs[1] = peer_session;
other_audio_thread->objs[2] = &stream_id;
- other_audio_thread->objs[3] = (void *) dtmf_callback;
+ other_audio_thread->objs[3] = (void *) input_callback;
other_audio_thread->objs[4] = session_data;
other_audio_thread->objs[5] = this_audio_thread;
other_audio_thread->running = 5;
@@ -1010,7 +1055,7 @@
this_audio_thread->objs[0] = peer_session;
this_audio_thread->objs[1] = session;
this_audio_thread->objs[2] = &stream_id;
- this_audio_thread->objs[3] = (void *) dtmf_callback;
+ this_audio_thread->objs[3] = (void *) input_callback;
this_audio_thread->objs[4] = peer_session_data;
this_audio_thread->objs[5] = other_audio_thread;
this_audio_thread->running = 2;
1
0
Author: sphere
Date: Wed Jul 12 14:01:47 2006
New Revision: 1845
Added:
freeswitch/branches/paulour/
Log:
Creating empty folder for paulour
1
0
Author: sphere
Date: Wed Jul 12 13:01:41 2006
New Revision: 1844
Added:
freeswitch/branches/kimba07/
Log:
Creating empty folder for kimba07
1
0
Author: sphere
Date: Wed Jul 12 12:46:48 2006
New Revision: 1843
Added:
freeswitch/branches/najla_sbai/
Log:
Creating empty folder for najla_sbai
1
0