diff --git a/Makefile.am b/Makefile.am index 1786aff3af..858b66520f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -55,6 +55,7 @@ src/include/switch_utils.h \ src/include/switch_caller.h \ src/include/switch_buffer.h \ src/include/switch_event.h \ +src/include/switch_ivr.h\ src/switch_buffer.c \ src/switch_caller.c \ src/switch_channel.c \ @@ -65,7 +66,8 @@ src/switch_loadable_module.c \ src/switch_mutex.c \ src/switch_utils.c \ src/switch_event.c \ -src/switch_resample.c +src/switch_resample.c \ +src/switch_ivr.c @@ -86,7 +88,8 @@ library_include_HEADERS = src/include/switch.h \ src/include/switch_caller.h \ src/include/switch_buffer.h \ src/include/switch_event.h \ - src/include/switch_resample.h + src/include/switch_resample.h \ + src/include/switch_ivr.h lib_LTLIBRARIES = libfreeswitch.la diff --git a/Makefile.in b/Makefile.in index be68e364ec..e25f729bc9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -79,7 +79,8 @@ am_libfreeswitch_la_OBJECTS = libfreeswitch_la-switch_buffer.lo \ libfreeswitch_la-switch_mutex.lo \ libfreeswitch_la-switch_utils.lo \ libfreeswitch_la-switch_event.lo \ - libfreeswitch_la-switch_resample.lo + libfreeswitch_la-switch_resample.lo \ + libfreeswitch_la-switch_ivr.lo libfreeswitch_la_OBJECTS = $(am_libfreeswitch_la_OBJECTS) binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) @@ -263,6 +264,7 @@ src/include/switch_utils.h \ src/include/switch_caller.h \ src/include/switch_buffer.h \ src/include/switch_event.h \ +src/include/switch_ivr.h\ src/switch_buffer.c \ src/switch_caller.c \ src/switch_channel.c \ @@ -273,7 +275,8 @@ src/switch_loadable_module.c \ src/switch_mutex.c \ src/switch_utils.c \ src/switch_event.c \ -src/switch_resample.c +src/switch_resample.c \ +src/switch_ivr.c #bindir = $(PREFIX)/bin @@ -293,7 +296,8 @@ library_include_HEADERS = src/include/switch.h \ src/include/switch_caller.h \ src/include/switch_buffer.h \ src/include/switch_event.h \ - src/include/switch_resample.h + src/include/switch_resample.h \ + src/include/switch_ivr.h lib_LTLIBRARIES = libfreeswitch.la libfreeswitch_la_CFLAGS = $(AM_CFLAGS) -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g @@ -436,6 +440,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfreeswitch_la-switch_console.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfreeswitch_la-switch_core.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfreeswitch_la-switch_event.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfreeswitch_la-switch_ivr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfreeswitch_la-switch_loadable_module.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfreeswitch_la-switch_mutex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfreeswitch_la-switch_resample.Plo@am__quote@ @@ -539,6 +544,13 @@ libfreeswitch_la-switch_resample.lo: src/switch_resample.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_resample.lo `test -f 'src/switch_resample.c' || echo '$(srcdir)/'`src/switch_resample.c +libfreeswitch_la-switch_ivr.lo: src/switch_ivr.c +@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -MT libfreeswitch_la-switch_ivr.lo -MD -MP -MF "$(DEPDIR)/libfreeswitch_la-switch_ivr.Tpo" -c -o libfreeswitch_la-switch_ivr.lo `test -f 'src/switch_ivr.c' || echo '$(srcdir)/'`src/switch_ivr.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libfreeswitch_la-switch_ivr.Tpo" "$(DEPDIR)/libfreeswitch_la-switch_ivr.Plo"; else rm -f "$(DEPDIR)/libfreeswitch_la-switch_ivr.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/switch_ivr.c' object='libfreeswitch_la-switch_ivr.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfreeswitch_la_CFLAGS) $(CFLAGS) -c -o libfreeswitch_la-switch_ivr.lo `test -f 'src/switch_ivr.c' || echo '$(srcdir)/'`src/switch_ivr.c + freeswitch-switch.o: src/switch.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(freeswitch_CFLAGS) $(CFLAGS) -MT freeswitch-switch.o -MD -MP -MF "$(DEPDIR)/freeswitch-switch.Tpo" -c -o freeswitch-switch.o `test -f 'src/switch.c' || echo '$(srcdir)/'`src/switch.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/freeswitch-switch.Tpo" "$(DEPDIR)/freeswitch-switch.Po"; else rm -f "$(DEPDIR)/freeswitch-switch.Tpo"; exit 1; fi diff --git a/conf/extensions.conf b/conf/extensions.conf index cf7554688d..7decb11570 100644 --- a/conf/extensions.conf +++ b/conf/extensions.conf @@ -1,4 +1,9 @@ [extensions] 1000 => playback /tmp/siriusraw.raw -888 => bridge woomera/888@10.200.68.194 + +; to time from a timer instead of from the input stream use +; 1000 => playback /tmp/siriusraw.raw soft + +; call the freeswitch conference +888 => bridge iax/guest@10.200.68.194/888 diff --git a/src/include/switch_types.h b/src/include/switch_types.h index 3494ab245f..5607c76c49 100644 --- a/src/include/switch_types.h +++ b/src/include/switch_types.h @@ -45,6 +45,18 @@ extern "C" { #define SWITCH_MAX_CODECS 30 +/*! + \enum switch_ivr_option_t + \brief Possible options related to ivr functions +
+ SWITCH_IVR_OPTION_SYNC - synchronous (do everyting in the forground) + ++ */ +typedef enum { + SWITCH_IVR_OPTION_SYNC = (1 << 0) +} switch_ivr_option_t; + /*! \enum switch_core_session_message_t \brief Possible types of messages for inter-session communication @@ -354,6 +366,7 @@ typedef switch_status (*switch_waitfor_read_hook)(switch_core_session *, int, in typedef switch_status (*switch_waitfor_write_hook)(switch_core_session *, int, int); typedef switch_status (*switch_send_dtmf_hook)(switch_core_session *, char *); typedef switch_status (*switch_api_function)(char *in, char *out, size_t outlen); +typedef switch_status (*switch_dtmf_callback_function)(switch_core_session *session, char *dtmf); /* things we don't deserve to know about */ diff --git a/src/mod/applications/mod_playback/mod_playback.c b/src/mod/applications/mod_playback/mod_playback.c index 4bdefef3d4..b1aafcc4c4 100644 --- a/src/mod/applications/mod_playback/mod_playback.c +++ b/src/mod/applications/mod_playback/mod_playback.c @@ -30,151 +30,47 @@ * */ #include