From a1433bd053fd8e7f74bf78fb957b8c6d1cd53c40 Mon Sep 17 00:00:00 2001 From: Michal Bielicki - cypromis Date: Tue, 12 Jul 2011 16:15:37 +0200 Subject: [PATCH 1/5] Isn't it fun to have to fix upstreams autoheadache incompatibilities ?? --- src/mod/applications/mod_soundtouch/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod/applications/mod_soundtouch/Makefile b/src/mod/applications/mod_soundtouch/Makefile index 44c38329b6..ba3daf434e 100644 --- a/src/mod/applications/mod_soundtouch/Makefile +++ b/src/mod/applications/mod_soundtouch/Makefile @@ -15,7 +15,7 @@ $(SNDT_SRC): $(SNDT_BUILD)/Makefile: $(SNDT_SRC) mkdir -p $(SNDT_BUILD) cd $(SNDT_SRC) %% libtoolize -fisv - cd $(SNDT_SRC) && AUTOMAKE="automake --add-missing --foreign --copy" autoreconf -fisv && rm -f `find . -name "*~"` && rm -f ChangeLog + cd $(SNDT_SRC) && AUTOCONF="autoconf --add-missing --foreign --copy" AUTOMAKE="automake --add-missing --foreign --copy" autoreconf -fisv cd ${SNDT_BUILD} && $(DEFAULT_VARS) $(SNDT_SRC)/configure $(DEFAULT_ARGS) --enable-integer-samples --srcdir=$(SNDT_SRC) ${TOUCH_TARGET} From 1a315f34ec73a8aa0942bdfd7c0d79226affd46f Mon Sep 17 00:00:00 2001 From: Michal Bielicki - cypromis Date: Tue, 12 Jul 2011 16:42:44 +0200 Subject: [PATCH 2/5] what works on centos6 does not have to work on centos5 --- src/mod/applications/mod_soundtouch/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mod/applications/mod_soundtouch/Makefile b/src/mod/applications/mod_soundtouch/Makefile index ba3daf434e..e52ef673fa 100644 --- a/src/mod/applications/mod_soundtouch/Makefile +++ b/src/mod/applications/mod_soundtouch/Makefile @@ -14,6 +14,8 @@ $(SNDT_SRC): $(SNDT_BUILD)/Makefile: $(SNDT_SRC) mkdir -p $(SNDT_BUILD) + rm -rf $(SNDT_BUILD)/config/m4 + rm -rf $(SNDT_SRC)/config/m4 cd $(SNDT_SRC) %% libtoolize -fisv cd $(SNDT_SRC) && AUTOCONF="autoconf --add-missing --foreign --copy" AUTOMAKE="automake --add-missing --foreign --copy" autoreconf -fisv cd ${SNDT_BUILD} && $(DEFAULT_VARS) $(SNDT_SRC)/configure $(DEFAULT_ARGS) --enable-integer-samples --srcdir=$(SNDT_SRC) From 0de51f982914612ca0772ed994cc5007557aaeda Mon Sep 17 00:00:00 2001 From: Michal Bielicki - cypromis Date: Tue, 12 Jul 2011 16:58:06 +0200 Subject: [PATCH 3/5] lets see what this soundtouch makefile will do 2 --- src/mod/applications/mod_soundtouch/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mod/applications/mod_soundtouch/Makefile b/src/mod/applications/mod_soundtouch/Makefile index e52ef673fa..c334525408 100644 --- a/src/mod/applications/mod_soundtouch/Makefile +++ b/src/mod/applications/mod_soundtouch/Makefile @@ -14,8 +14,8 @@ $(SNDT_SRC): $(SNDT_BUILD)/Makefile: $(SNDT_SRC) mkdir -p $(SNDT_BUILD) - rm -rf $(SNDT_BUILD)/config/m4 - rm -rf $(SNDT_SRC)/config/m4 + rm -rf $(SNDT_BUILD)/config/m4/* + rm -rf $(SNDT_SRC)/config/m4/* cd $(SNDT_SRC) %% libtoolize -fisv cd $(SNDT_SRC) && AUTOCONF="autoconf --add-missing --foreign --copy" AUTOMAKE="automake --add-missing --foreign --copy" autoreconf -fisv cd ${SNDT_BUILD} && $(DEFAULT_VARS) $(SNDT_SRC)/configure $(DEFAULT_ARGS) --enable-integer-samples --srcdir=$(SNDT_SRC) From a56aa89cc5e02b90299bdaa1c06b291cc2cb1497 Mon Sep 17 00:00:00 2001 From: Michal Bielicki - cypromis Date: Tue, 12 Jul 2011 17:14:36 +0200 Subject: [PATCH 4/5] what works on centos6 does not have to work on centos5 again .. --- src/mod/applications/mod_soundtouch/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod/applications/mod_soundtouch/Makefile b/src/mod/applications/mod_soundtouch/Makefile index c334525408..fa393fb0ea 100644 --- a/src/mod/applications/mod_soundtouch/Makefile +++ b/src/mod/applications/mod_soundtouch/Makefile @@ -17,7 +17,7 @@ $(SNDT_BUILD)/Makefile: $(SNDT_SRC) rm -rf $(SNDT_BUILD)/config/m4/* rm -rf $(SNDT_SRC)/config/m4/* cd $(SNDT_SRC) %% libtoolize -fisv - cd $(SNDT_SRC) && AUTOCONF="autoconf --add-missing --foreign --copy" AUTOMAKE="automake --add-missing --foreign --copy" autoreconf -fisv + cd $(SNDT_SRC) && AUTOMAKE="automake --add-missing --foreign --copy" autoreconf -fisv cd ${SNDT_BUILD} && $(DEFAULT_VARS) $(SNDT_SRC)/configure $(DEFAULT_ARGS) --enable-integer-samples --srcdir=$(SNDT_SRC) ${TOUCH_TARGET} From 3cbae3fbd83581955f0db25ff0a544f2db96d637 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 12 Jul 2011 09:40:44 -0500 Subject: [PATCH 5/5] FS-3413 --resolve --- src/include/switch_channel.h | 5 +++-- src/switch_channel.c | 15 ++++++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/include/switch_channel.h b/src/include/switch_channel.h index 1f3bd8fd2f..176b841147 100644 --- a/src/include/switch_channel.h +++ b/src/include/switch_channel.h @@ -72,6 +72,7 @@ typedef struct switch_channel_timetable switch_channel_timetable_t; */ SWITCH_DECLARE(switch_channel_state_t) switch_channel_get_state(switch_channel_t *channel); SWITCH_DECLARE(switch_channel_state_t) switch_channel_get_running_state(switch_channel_t *channel); +SWITCH_DECLARE(int) switch_channel_check_signal(switch_channel_t *channel, switch_bool_t in_thread_only); /*! \brief Determine if a channel is ready for io @@ -84,8 +85,8 @@ SWITCH_DECLARE(int) switch_channel_test_ready(switch_channel_t *channel, switch_ #define switch_channel_media_ready(_channel) switch_channel_test_ready(_channel, SWITCH_TRUE, SWITCH_TRUE) #define switch_channel_media_up(_channel) (switch_channel_test_flag(_channel, CF_ANSWERED) || switch_channel_test_flag(_channel, CF_EARLY_MEDIA)) -#define switch_channel_up(_channel) (switch_channel_get_state(_channel) < CS_HANGUP) -#define switch_channel_down(_channel) (switch_channel_get_state(_channel) >= CS_HANGUP) +#define switch_channel_up(_channel) (switch_channel_check_signal(_channel, SWITCH_TRUE) || switch_channel_get_state(_channel) < CS_HANGUP) +#define switch_channel_down(_channel) (switch_channel_check_signal(_channel, SWITCH_TRUE) || switch_channel_get_state(_channel) >= CS_HANGUP) #define switch_channel_media_ack(_channel) (!switch_channel_test_cap(_channel, CC_MEDIA_ACK) || switch_channel_test_flag(_channel, CF_MEDIA_ACK)) SWITCH_DECLARE(void) switch_channel_wait_for_state(switch_channel_t *channel, switch_channel_t *other_channel, switch_channel_state_t want_state); diff --git a/src/switch_channel.c b/src/switch_channel.c index f763fa2f02..b1abb86cd8 100644 --- a/src/switch_channel.c +++ b/src/switch_channel.c @@ -1701,12 +1701,23 @@ SWITCH_DECLARE(int) switch_channel_state_change_pending(switch_channel_t *channe return channel->running_state != channel->state; } +SWITCH_DECLARE(int) switch_channel_check_signal(switch_channel_t *channel, switch_bool_t in_thread_only) +{ + if (!in_thread_only || switch_core_session_in_thread(channel->session)) { + switch_ivr_parse_all_signal_data(channel->session); + } + + return 0; +} + SWITCH_DECLARE(int) switch_channel_test_ready(switch_channel_t *channel, switch_bool_t check_ready, switch_bool_t check_media) { int ret = 0; switch_assert(channel != NULL); + switch_channel_check_signal(channel, SWITCH_TRUE); + if (check_media) { ret = ((switch_channel_test_flag(channel, CF_ANSWERED) || switch_channel_test_flag(channel, CF_EARLY_MEDIA)) && !switch_channel_test_flag(channel, CF_PROXY_MODE) && @@ -1728,9 +1739,7 @@ SWITCH_DECLARE(int) switch_channel_test_ready(switch_channel_t *channel, switch_ ret++; } - if (ret && switch_core_session_in_thread(channel->session)) { - switch_ivr_parse_all_signal_data(channel->session); - } + return ret; }