mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-28 22:24:16 +00:00
Merge branch 'master' of ssh://git.freeswitch.org:222/freeswitch
This commit is contained in:
commit
5fbe6bd182
546 files changed
+7451
-37187
No files matched your search
@@ -76,3 +76,6 @@
|
||||
/timers/mod_posix_timer/Makefile
|
||||
/timers/mod_timerfd/Makefile
|
||||
/endpoints/mod_unicall/Makefile
|
||||
*/*/Makefile.in
|
||||
*/*/Makefile
|
||||
*/*/mod_*.log
|
||||
@@ -0,0 +1,3 @@
|
||||
*/Makefile.in
|
||||
*/Makefile
|
||||
*/mod_*.log
|
||||
@@ -1,2 +0,0 @@
|
||||
BASE=../../../..
|
||||
include $(BASE)/build/modmake.rules
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_abstraction
|
||||
|
||||
mod_LTLIBRARIES = mod_abstraction.la
|
||||
mod_abstraction_la_SOURCES = mod_abstraction.c
|
||||
mod_abstraction_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_abstraction_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_abstraction_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -1,15 +0,0 @@
|
||||
BASE=../../../..
|
||||
MOD_CFLAGS= -O2
|
||||
#MOD_CFLAGS= -march=core2 -g -O2 -malign-double -mtune=core2 -mmmx -msse -msse2 -msse3 -mssse3 -mfpmath=sse -ffast-math -funroll-loops -fprefetch-loop-arrays -funit-at-a-time -ftracer --save-temps
|
||||
#MOD_LDFLAGS= --save-temps
|
||||
LOCAL_SOURCES=amplitude.c buffer.c desa2.c goertzel.c fast_acosf.c
|
||||
LOCAL_OBJS=amplitude.o buffer.o desa2.o goertzel.o fast_acosf.o
|
||||
include $(BASE)/build/modmake.rules
|
||||
|
||||
#compute_table: compute_table.o
|
||||
# gcc -o compute_table compute_table.o -lm
|
||||
#
|
||||
#compute_table.o: compute_table.c
|
||||
# gcc -c compute_table.c
|
||||
#
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_avmd
|
||||
|
||||
mod_LTLIBRARIES = mod_avmd.la
|
||||
mod_avmd_la_SOURCES = mod_avmd.c amplitude.c buffer.c desa2.c goertzel.c fast_acosf.c
|
||||
mod_avmd_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_avmd_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_avmd_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_blacklist
|
||||
|
||||
mod_LTLIBRARIES = mod_blacklist.la
|
||||
mod_blacklist_la_SOURCES = mod_blacklist.c
|
||||
mod_blacklist_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_blacklist_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_blacklist_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -63,7 +63,7 @@ blacklist_t *blacklist_create(const char *name)
|
||||
switch_assert(bl);
|
||||
bl->pool = pool;
|
||||
|
||||
switch_core_hash_init(&bl->list, pool);
|
||||
switch_core_hash_init(&bl->list);
|
||||
switch_mutex_init(&bl->list_mutex, SWITCH_MUTEX_NESTED, pool);
|
||||
|
||||
return bl;
|
||||
@@ -126,10 +126,10 @@ static switch_status_t do_config(switch_bool_t reload)
|
||||
switch_mutex_lock(globals.lists_mutex);
|
||||
|
||||
/* Destroy any active lists */
|
||||
while ((hi = switch_hash_first(NULL, globals.lists))) {
|
||||
while ((hi = switch_core_hash_first( globals.lists))) {
|
||||
const void *key;
|
||||
void *val;
|
||||
switch_hash_this(hi, &key, NULL, &val);
|
||||
switch_core_hash_this(hi, &key, NULL, &val);
|
||||
blacklist_free((blacklist_t*)val);
|
||||
switch_core_hash_delete(globals.lists, (const char*)key);
|
||||
}
|
||||
@@ -282,8 +282,8 @@ SWITCH_STANDARD_API(blacklist_api_function)
|
||||
switch_mutex_lock(globals.lists_mutex);
|
||||
if (switch_file_open(&fd, filename, SWITCH_FOPEN_WRITE | SWITCH_FOPEN_TRUNCATE | SWITCH_FOPEN_CREATE, SWITCH_FPROT_OS_DEFAULT, globals.pool)
|
||||
== SWITCH_STATUS_SUCCESS) {
|
||||
for (hi = switch_hash_first(NULL, bl->list); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &var, NULL, &val);
|
||||
for (hi = switch_core_hash_first( bl->list); hi; hi = switch_core_hash_next(hi)) {
|
||||
switch_core_hash_this(hi, &var, NULL, &val);
|
||||
switch_file_printf(fd, "%s\n", (char *)var);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "adding %s to the dump file\n", (char *)var);
|
||||
}
|
||||
@@ -317,10 +317,10 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_blacklist_load)
|
||||
memset(&globals, 0, sizeof(globals));
|
||||
globals.pool = pool;
|
||||
|
||||
switch_core_hash_init(&globals.files, globals.pool);
|
||||
switch_core_hash_init(&globals.files);
|
||||
switch_mutex_init(&globals.files_mutex, SWITCH_MUTEX_NESTED, globals.pool);
|
||||
|
||||
switch_core_hash_init(&globals.lists, globals.pool);
|
||||
switch_core_hash_init(&globals.lists);
|
||||
switch_mutex_init(&globals.lists_mutex, SWITCH_MUTEX_NESTED, globals.pool);
|
||||
|
||||
do_config(SWITCH_FALSE);
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
BASE=../../../..
|
||||
include $(BASE)/build/modmake.rules
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_callcenter
|
||||
|
||||
mod_LTLIBRARIES = mod_callcenter.la
|
||||
mod_callcenter_la_SOURCES = mod_callcenter.c
|
||||
mod_callcenter_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_callcenter_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_callcenter_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -3198,12 +3198,12 @@ SWITCH_STANDARD_API(cc_config_api_function)
|
||||
switch_hash_index_t *hi;
|
||||
stream->write_function(stream, "%s", "name|strategy|moh_sound|time_base_score|tier_rules_apply|tier_rule_wait_second|tier_rule_wait_multiply_level|tier_rule_no_agent_no_wait|discard_abandoned_after|abandoned_resume_allowed|max_wait_time|max_wait_time_with_no_agent|max_wait_time_with_no_agent_time_reached|record_template\n");
|
||||
switch_mutex_lock(globals.mutex);
|
||||
for (hi = switch_hash_first(NULL, globals.queue_hash); hi; hi = switch_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first( globals.queue_hash); hi; hi = switch_core_hash_next(hi)) {
|
||||
void *val = NULL;
|
||||
const void *key;
|
||||
switch_ssize_t keylen;
|
||||
cc_queue_t *queue;
|
||||
switch_hash_this(hi, &key, &keylen, &val);
|
||||
switch_core_hash_this(hi, &key, &keylen, &val);
|
||||
queue = (cc_queue_t *) val;
|
||||
stream->write_function(stream, "%s|%s|%s|%s|%s|%d|%s|%s|%d|%s|%d|%d|%d|%s\n", queue->name, queue->strategy, queue->moh, queue->time_base_score, (queue->tier_rules_apply?"true":"false"), queue->tier_rule_wait_second, (queue->tier_rule_wait_multiply_level?"true":"false"), (queue->tier_rule_no_agent_no_wait?"true":"false"), queue->discard_abandoned_after, (queue->abandoned_resume_allowed?"true":"false"), queue->max_wait_time, queue->max_wait_time_with_no_agent, queue->max_wait_time_with_no_agent_time_reached, queue->record_template);
|
||||
queue = NULL;
|
||||
@@ -3251,7 +3251,7 @@ SWITCH_STANDARD_API(cc_config_api_function)
|
||||
switch_hash_index_t *hi;
|
||||
int queue_count = 0;
|
||||
switch_mutex_lock(globals.mutex);
|
||||
for (hi = switch_hash_first(NULL, globals.queue_hash); hi; hi = switch_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first( globals.queue_hash); hi; hi = switch_core_hash_next(hi)) {
|
||||
queue_count++;
|
||||
}
|
||||
switch_mutex_unlock(globals.mutex);
|
||||
@@ -3309,7 +3309,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_callcenter_load)
|
||||
memset(&globals, 0, sizeof(globals));
|
||||
globals.pool = pool;
|
||||
|
||||
switch_core_hash_init(&globals.queue_hash, globals.pool);
|
||||
switch_core_hash_init(&globals.queue_hash);
|
||||
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, globals.pool);
|
||||
|
||||
if ((status = load_config()) != SWITCH_STATUS_SUCCESS) {
|
||||
@@ -3394,8 +3394,8 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_callcenter_shutdown)
|
||||
}
|
||||
|
||||
switch_mutex_lock(globals.mutex);
|
||||
while ((hi = switch_hash_first(NULL, globals.queue_hash))) {
|
||||
switch_hash_this(hi, &key, &keylen, &val);
|
||||
while ((hi = switch_core_hash_first( globals.queue_hash))) {
|
||||
switch_core_hash_this(hi, &key, &keylen, &val);
|
||||
queue = (cc_queue_t *) val;
|
||||
|
||||
switch_core_hash_delete(globals.queue_hash, queue->name);
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
BASE=../../../..
|
||||
include $(BASE)/build/modmake.rules
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_cidlookup
|
||||
|
||||
mod_LTLIBRARIES = mod_cidlookup.la
|
||||
mod_cidlookup_la_SOURCES = mod_cidlookup.c
|
||||
mod_cidlookup_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_cidlookup_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_cidlookup_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -1,3 +0,0 @@
|
||||
LOCAL_LDFLAGS=-lncurses
|
||||
BASE=../../../..
|
||||
include $(BASE)/build/modmake.rules
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_cluechoo
|
||||
|
||||
mod_LTLIBRARIES = mod_cluechoo.la
|
||||
mod_cluechoo_la_SOURCES = mod_cluechoo.c
|
||||
mod_cluechoo_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_cluechoo_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_cluechoo_la_LDFLAGS = -avoid-version -module -no-undefined -shared -lncurses
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_commands
|
||||
|
||||
mod_LTLIBRARIES = mod_commands.la
|
||||
mod_commands_la_SOURCES = mod_commands.c
|
||||
mod_commands_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_commands_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_commands_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_conference
|
||||
|
||||
mod_LTLIBRARIES = mod_conference.la
|
||||
mod_conference_la_SOURCES = mod_conference.c
|
||||
mod_conference_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_conference_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_conference_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -485,6 +485,7 @@ struct conference_member {
|
||||
switch_thread_t *input_thread;
|
||||
cJSON *json;
|
||||
cJSON *status_field;
|
||||
uint8_t loop_loop;
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
@@ -3659,7 +3660,7 @@ static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, v
|
||||
switch_frame_t *read_frame = NULL;
|
||||
uint32_t hangover = 40, hangunder = 5, hangover_hits = 0, hangunder_hits = 0, diff_level = 400;
|
||||
switch_core_session_t *session = member->session;
|
||||
uint32_t flush_len;
|
||||
uint32_t flush_len, loops = 0;
|
||||
|
||||
if (switch_core_session_read_lock(session) != SWITCH_STATUS_SUCCESS) {
|
||||
goto end;
|
||||
@@ -3922,6 +3923,21 @@ static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, v
|
||||
member->last_score = member->score;
|
||||
}
|
||||
|
||||
loops++;
|
||||
|
||||
if (switch_channel_test_flag(member->channel, CF_CONFERENCE_RESET_MEDIA)) {
|
||||
switch_channel_clear_flag(member->channel, CF_CONFERENCE_RESET_MEDIA);
|
||||
|
||||
if (loops > 500) {
|
||||
member->loop_loop = 1;
|
||||
|
||||
if (setup_media(member, member->conference)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* skip frames that are not actual media or when we are muted or silent */
|
||||
if ((switch_test_flag(member, MFLAG_TALKING) || member->energy_level == 0 || switch_test_flag(member->conference, CFLAG_AUDIO_ALWAYS))
|
||||
&& switch_test_flag(member, MFLAG_CAN_SPEAK) && !switch_test_flag(member->conference, CFLAG_WAIT_MOD)
|
||||
@@ -4072,7 +4088,7 @@ static void launch_conference_loop_input(conference_member_t *member, switch_mem
|
||||
{
|
||||
switch_threadattr_t *thd_attr = NULL;
|
||||
|
||||
if (member == NULL)
|
||||
if (member == NULL || member->input_thread)
|
||||
return;
|
||||
|
||||
switch_threadattr_create(&thd_attr, pool);
|
||||
@@ -4116,7 +4132,7 @@ static void conference_loop_output(conference_member_t *member)
|
||||
call_list = NULL;
|
||||
cp = NULL;
|
||||
|
||||
|
||||
member->loop_loop = 0;
|
||||
|
||||
switch_assert(member->conference != NULL);
|
||||
|
||||
@@ -4229,7 +4245,7 @@ static void conference_loop_output(conference_member_t *member)
|
||||
|
||||
/* Fair WARNING, If you expect the caller to hear anything or for digit handling to be processed, */
|
||||
/* you better not block this thread loop for more than the duration of member->conference->timer_name! */
|
||||
while (switch_test_flag(member, MFLAG_RUNNING) && switch_test_flag(member, MFLAG_ITHREAD)
|
||||
while (!member->loop_loop && switch_test_flag(member, MFLAG_RUNNING) && switch_test_flag(member, MFLAG_ITHREAD)
|
||||
&& switch_channel_ready(channel)) {
|
||||
switch_event_t *event;
|
||||
int use_timer = 0;
|
||||
@@ -4429,15 +4445,21 @@ static void conference_loop_output(conference_member_t *member)
|
||||
|
||||
end:
|
||||
|
||||
switch_clear_flag_locked(member, MFLAG_RUNNING);
|
||||
if (!member->loop_loop) {
|
||||
switch_clear_flag_locked(member, MFLAG_RUNNING);
|
||||
|
||||
/* Wait for the input thread to end */
|
||||
if (member->input_thread) {
|
||||
switch_thread_join(&st, member->input_thread);
|
||||
/* Wait for the input thread to end */
|
||||
if (member->input_thread) {
|
||||
switch_thread_join(&st, member->input_thread);
|
||||
}
|
||||
}
|
||||
|
||||
switch_core_timer_destroy(&timer);
|
||||
|
||||
if (member->loop_loop) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(channel), SWITCH_LOG_DEBUG, "Channel leaving conference, cause: %s\n",
|
||||
switch_channel_cause2str(switch_channel_get_cause(channel)));
|
||||
|
||||
@@ -5256,8 +5278,8 @@ static switch_status_t list_conferences(const char *line, const char *cursor, sw
|
||||
const void *vvar;
|
||||
|
||||
switch_mutex_lock(globals.hash_mutex);
|
||||
for (hi = switch_hash_first(NULL, globals.conference_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &vvar, NULL, &val);
|
||||
for (hi = switch_core_hash_first( globals.conference_hash); hi; hi = switch_core_hash_next(hi)) {
|
||||
switch_core_hash_this(hi, &vvar, NULL, &val);
|
||||
switch_console_push_match(&my_matches, (const char *) vvar);
|
||||
}
|
||||
switch_mutex_unlock(globals.hash_mutex);
|
||||
@@ -5748,9 +5770,9 @@ static switch_status_t conf_api_sub_list(conference_obj_t *conference, switch_st
|
||||
|
||||
if (conference == NULL) {
|
||||
switch_mutex_lock(globals.hash_mutex);
|
||||
for (hi = switch_hash_first(NULL, globals.conference_hash); hi; hi = switch_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first( globals.conference_hash); hi; hi = switch_core_hash_next(hi)) {
|
||||
int fcount = 0;
|
||||
switch_hash_this(hi, NULL, NULL, &val);
|
||||
switch_core_hash_this(hi, NULL, NULL, &val);
|
||||
conference = (conference_obj_t *) val;
|
||||
|
||||
stream->write_function(stream, "Conference %s (%u member%s rate: %u%s flags: ",
|
||||
@@ -6227,8 +6249,8 @@ static switch_status_t conf_api_sub_xml_list(conference_obj_t *conference, switc
|
||||
|
||||
if (conference == NULL) {
|
||||
switch_mutex_lock(globals.hash_mutex);
|
||||
for (hi = switch_hash_first(NULL, globals.conference_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, NULL, NULL, &val);
|
||||
for (hi = switch_core_hash_first( globals.conference_hash); hi; hi = switch_core_hash_next(hi)) {
|
||||
switch_core_hash_this(hi, NULL, NULL, &val);
|
||||
conference = (conference_obj_t *) val;
|
||||
|
||||
x_conference = switch_xml_add_child_d(x_conferences, "conference", off++);
|
||||
@@ -7037,8 +7059,6 @@ static switch_status_t conf_api_sub_file_vol(conference_obj_t *conference, switc
|
||||
}
|
||||
}
|
||||
|
||||
printf("WTF %p %p\n", (void *) conference, (void *) fnode);
|
||||
|
||||
if (fnode && fnode->type == NODE_TYPE_FILE) {
|
||||
fnode->fh.vol = vol;
|
||||
ok = 1;
|
||||
@@ -8006,10 +8026,14 @@ static int setup_media(conference_member_t *member, conference_obj_t *conference
|
||||
switch_codec_implementation_t read_impl = { 0 };
|
||||
switch_core_session_get_read_impl(member->session, &read_impl);
|
||||
|
||||
switch_core_session_reset(member->session, SWITCH_TRUE, SWITCH_FALSE);
|
||||
|
||||
if (switch_core_codec_ready(&member->read_codec)) {
|
||||
switch_core_codec_destroy(&member->read_codec);
|
||||
memset(&member->read_codec, 0, sizeof(member->read_codec));
|
||||
}
|
||||
|
||||
if (switch_core_codec_ready(&member->write_codec)) {
|
||||
switch_core_codec_destroy(&member->write_codec);
|
||||
memset(&member->write_codec, 0, sizeof(member->write_codec));
|
||||
}
|
||||
|
||||
if (member->read_resampler) {
|
||||
@@ -8640,7 +8664,10 @@ SWITCH_STANDARD_APP(conference_function)
|
||||
switch_core_session_receive_message(session, &msg);
|
||||
|
||||
/* Run the conference loop */
|
||||
conference_loop_output(&member);
|
||||
do {
|
||||
conference_loop_output(&member);
|
||||
} while (member.loop_loop);
|
||||
|
||||
switch_channel_set_private(channel, "_conference_autocall_list_", NULL);
|
||||
|
||||
/* Tell the channel we are no longer going to be in a bridge */
|
||||
@@ -10023,7 +10050,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_conference_load)
|
||||
globals.conference_pool = pool;
|
||||
|
||||
/* Setup a hash to store conferences by name */
|
||||
switch_core_hash_init(&globals.conference_hash, globals.conference_pool);
|
||||
switch_core_hash_init(&globals.conference_hash);
|
||||
switch_mutex_init(&globals.conference_mutex, SWITCH_MUTEX_NESTED, globals.conference_pool);
|
||||
switch_mutex_init(&globals.id_mutex, SWITCH_MUTEX_NESTED, globals.conference_pool);
|
||||
switch_mutex_init(&globals.hash_mutex, SWITCH_MUTEX_NESTED, globals.conference_pool);
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
json-c=json-c-0.9
|
||||
BASE=../../../..
|
||||
|
||||
JSON_DIR=$(switch_srcdir)/libs/$(json-c)
|
||||
JSON_BUILDDIR=$(switch_builddir)/libs/$(json-c)
|
||||
|
||||
JSONLA=$(JSON_BUILDDIR)/libjson.la
|
||||
|
||||
LOCAL_CFLAGS=-I$(JSON_DIR)
|
||||
LOCAL_LIBADD=$(JSONLA)
|
||||
|
||||
include $(BASE)/build/modmake.rules
|
||||
|
||||
$(JSON_DIR):
|
||||
$(GETLIB) $(json-c).tar.gz
|
||||
|
||||
$(JSON_BUILDDIR)/Makefile: $(JSON_DIR)
|
||||
mkdir -p $(JSON_BUILDDIR)
|
||||
cd $(JSON_BUILDDIR) && $(DEFAULT_VARS) $(JSON_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(JSON_DIR) CPPFLAGS= LDFLAGS=
|
||||
$(TOUCH_TARGET)
|
||||
|
||||
$(JSONLA): $(JSON_BUILDDIR)/Makefile
|
||||
cd $(JSON_BUILDDIR) && $(MAKE)
|
||||
$(TOUCH_TARGET)
|
||||
@@ -0,0 +1,32 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
|
||||
AUTOMAKE_OPTIONS += foreign
|
||||
MODNAME=mod_curl
|
||||
|
||||
JSON_C=json-c-0.9
|
||||
JSON_DIR=$(switch_srcdir)/libs/$(JSON_C)
|
||||
JSON_BUILDDIR=$(switch_builddir)/libs/$(JSON_C)
|
||||
JSONLA=$(JSON_BUILDDIR)/libjson.la
|
||||
|
||||
mod_LTLIBRARIES = mod_curl.la
|
||||
mod_curl_la_SOURCES = mod_curl.c
|
||||
mod_curl_la_CFLAGS = $(AM_CFLAGS) -I$(JSON_DIR)
|
||||
mod_curl_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(JSONLA)
|
||||
mod_curl_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
|
||||
BUILT_SOURCES=$(JSONLA)
|
||||
|
||||
$(JSON_DIR):
|
||||
$(GETLIB) $(JSON_C).tar.gz
|
||||
|
||||
$(JSON_BUILDDIR)/Makefile: $(JSON_DIR)
|
||||
mkdir -p $(JSON_BUILDDIR)
|
||||
cd $(JSON_BUILDDIR) && $(DEFAULT_VARS) $(JSON_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(JSON_DIR) CPPFLAGS= LDFLAGS=
|
||||
$(TOUCH_TARGET)
|
||||
|
||||
$(JSONLA): $(JSON_BUILDDIR)/Makefile
|
||||
cd $(JSON_BUILDDIR) && $(MAKE)
|
||||
$(TOUCH_TARGET)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_db
|
||||
|
||||
mod_LTLIBRARIES = mod_db.la
|
||||
mod_db_la_SOURCES = mod_db.c
|
||||
mod_db_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_db_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_db_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -652,7 +652,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_db_load)
|
||||
|
||||
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, globals.pool);
|
||||
switch_mutex_init(&globals.db_hash_mutex, SWITCH_MUTEX_NESTED, globals.pool);
|
||||
switch_core_hash_init(&globals.db_hash, pool);
|
||||
switch_core_hash_init(&globals.db_hash);
|
||||
|
||||
status = switch_event_reserve_subclass(LIMIT_EVENT_USAGE);
|
||||
if (status != SWITCH_STATUS_SUCCESS && status != SWITCH_STATUS_INUSE) {
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
BASE=../../../..
|
||||
include $(BASE)/build/modmake.rules
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_directory
|
||||
|
||||
mod_LTLIBRARIES = mod_directory.la
|
||||
mod_directory_la_SOURCES = mod_directory.c
|
||||
mod_directory_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_directory_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_directory_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -1038,7 +1038,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_directory_load)
|
||||
memset(&globals, 0, sizeof(globals));
|
||||
globals.pool = pool;
|
||||
|
||||
switch_core_hash_init(&globals.profile_hash, globals.pool);
|
||||
switch_core_hash_init(&globals.profile_hash);
|
||||
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, globals.pool);
|
||||
|
||||
if ((status = load_config(SWITCH_FALSE)) != SWITCH_STATUS_SUCCESS) {
|
||||
@@ -1070,8 +1070,8 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_directory_shutdown)
|
||||
|
||||
switch_mutex_lock(globals.mutex);
|
||||
|
||||
while ((hi = switch_hash_first(NULL, globals.profile_hash))) {
|
||||
switch_hash_this(hi, &key, &keylen, &val);
|
||||
while ((hi = switch_core_hash_first( globals.profile_hash))) {
|
||||
switch_core_hash_this(hi, &key, &keylen, &val);
|
||||
profile = (dir_profile_t *) val;
|
||||
|
||||
switch_core_hash_delete(globals.profile_hash, profile->name);
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_distributor
|
||||
|
||||
mod_LTLIBRARIES = mod_distributor.la
|
||||
mod_distributor_la_SOURCES = mod_distributor.c
|
||||
mod_distributor_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_distributor_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_distributor_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_dptools
|
||||
|
||||
mod_LTLIBRARIES = mod_dptools.la
|
||||
mod_dptools_la_SOURCES = mod_dptools.c
|
||||
mod_dptools_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_dptools_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_dptools_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
Executable → Regular
+2
-2
@@ -5591,9 +5591,9 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_dptools_load)
|
||||
switch_file_interface_t *file_interface;
|
||||
|
||||
globals.pool = pool;
|
||||
switch_core_hash_init(&globals.pickup_hash, globals.pool);
|
||||
switch_core_hash_init(&globals.pickup_hash);
|
||||
switch_mutex_init(&globals.pickup_mutex, SWITCH_MUTEX_NESTED, globals.pool);
|
||||
switch_core_hash_init(&globals.mutex_hash, globals.pool);
|
||||
switch_core_hash_init(&globals.mutex_hash);
|
||||
switch_mutex_init(&globals.mutex_mutex, SWITCH_MUTEX_NESTED, globals.pool);
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_easyroute
|
||||
|
||||
mod_LTLIBRARIES = mod_easyroute.la
|
||||
mod_easyroute_la_SOURCES = mod_easyroute.c
|
||||
mod_easyroute_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_easyroute_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_easyroute_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -1,21 +0,0 @@
|
||||
BASE=../../../..
|
||||
|
||||
LDNS=ldns
|
||||
|
||||
LDNS_DIR=$(switch_srcdir)/libs/$(LDNS)
|
||||
LDNS_BUILDDIR=$(switch_builddir)/libs/$(LDNS)
|
||||
LOCAL_CFLAGS=-I$(LDNS_DIR) -I$(LDNS_DIR)/include
|
||||
LDNS_LA=$(LDNS_BUILDDIR)/libldns.la
|
||||
LOCAL_LIBADD=$(LDNS_LA)
|
||||
include $(BASE)/build/modmake.rules
|
||||
|
||||
$(LDNS_BUILDDIR)/Makefile: $(LDNS_DIR)/Makefile.in
|
||||
mkdir -p $(LDNS_BUILDDIR)
|
||||
cd $(LDNS_BUILDDIR) && $(DEFAULT_VARS) $(LDNS_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(LDNS_DIR) --disable-gost --without-ssl --disable-sha2
|
||||
$(TOUCH_TARGET)
|
||||
|
||||
$(LDNS_LA): $(LDNS_BUILDDIR)/Makefile
|
||||
cd $(LDNS_BUILDDIR) && $(MAKE)
|
||||
$(TOUCH_TARGET)
|
||||
|
||||
$(MODNAME).lo: $(LDNS_LA)
|
||||
@@ -0,0 +1,24 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_enum
|
||||
|
||||
LDNS=ldns
|
||||
LDNS_DIR=$(switch_srcdir)/libs/$(LDNS)
|
||||
LDNS_BUILDDIR=$(switch_builddir)/libs/$(LDNS)
|
||||
LDNS_LA=$(LDNS_BUILDDIR)/libldns.la
|
||||
|
||||
mod_LTLIBRARIES = mod_enum.la
|
||||
mod_enum_la_SOURCES = mod_enum.c
|
||||
mod_enum_la_CFLAGS = $(AM_CFLAGS) -I$(LDNS_DIR) -I$(LDNS_DIR)/include
|
||||
mod_enum_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(LDNS_LA)
|
||||
mod_enum_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
|
||||
BUILT_SOURCES=$(LDNS_BUILDDIR)/ldns/util.h
|
||||
|
||||
$(LDNS_BUILDDIR)/ldns/util.h $(LDNS_BUILDDIR)/Makefile: $(LDNS_DIR)/Makefile.in
|
||||
mkdir -p $(LDNS_BUILDDIR)
|
||||
cd $(LDNS_BUILDDIR) && $(DEFAULT_VARS) $(LDNS_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(LDNS_DIR) --disable-gost --without-ssl --disable-sha2 --disable-shared --with-pic
|
||||
$(TOUCH_TARGET)
|
||||
|
||||
$(LDNS_LA): $(LDNS_BUILDDIR)/Makefile
|
||||
cd $(LDNS_BUILDDIR) && $(MAKE)
|
||||
$(TOUCH_TARGET)
|
||||
@@ -1,2 +0,0 @@
|
||||
BASE=../../../..
|
||||
include $(BASE)/build/modmake.rules
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_esf
|
||||
|
||||
mod_LTLIBRARIES = mod_esf.la
|
||||
mod_esf_la_SOURCES = mod_esf.c
|
||||
mod_esf_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_esf_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_esf_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -1,11 +0,0 @@
|
||||
BASE=../../../..
|
||||
|
||||
ESL_DIR = $(switch_srcdir)/libs/esl
|
||||
|
||||
LOCAL_OBJS=$(ESL_DIR)/libesl.a
|
||||
LOCAL_CFLAGS=-I$(ESL_DIR)/src/include
|
||||
|
||||
include $(BASE)/build/modmake.rules
|
||||
|
||||
$(ESL_DIR)/libesl.a: $(ESL_DIR)/Makefile
|
||||
cd $(ESL_DIR) && $(MAKE) -j1
|
||||
@@ -0,0 +1,13 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
|
||||
MODNAME=mod_esl
|
||||
ESL_DIR = $(switch_srcdir)/libs/esl
|
||||
|
||||
mod_LTLIBRARIES = mod_esl.la
|
||||
mod_esl_la_SOURCES = mod_esl.c
|
||||
mod_esl_la_CFLAGS = $(AM_CFLAGS) -I$(ESL_DIR)/src/include
|
||||
mod_esl_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(ESL_DIR)/libesl.a
|
||||
mod_esl_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
|
||||
$(ESL_DIR)/libesl.a: $(ESL_DIR)/Makefile
|
||||
cd $(ESL_DIR) && $(MAKE) -j1
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_fifo
|
||||
|
||||
mod_LTLIBRARIES = mod_fifo.la
|
||||
mod_fifo_la_SOURCES = mod_fifo.c
|
||||
mod_fifo_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_fifo_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_fifo_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -660,7 +660,7 @@ static void fifo_init_use_count(void)
|
||||
if (globals.use_hash) {
|
||||
switch_core_hash_destroy(&globals.use_hash);
|
||||
}
|
||||
switch_core_hash_init(&globals.use_hash, globals.pool);
|
||||
switch_core_hash_init(&globals.use_hash);
|
||||
switch_mutex_unlock(globals.use_mutex);
|
||||
}
|
||||
|
||||
@@ -935,7 +935,7 @@ static fifo_node_t *create_node(const char *name, uint32_t importance, switch_mu
|
||||
switch_assert(node->fifo_list[x]);
|
||||
}
|
||||
|
||||
switch_core_hash_init(&node->consumer_hash, node->pool);
|
||||
switch_core_hash_init(&node->consumer_hash);
|
||||
switch_thread_rwlock_create(&node->rwlock, node->pool);
|
||||
switch_mutex_init(&node->mutex, SWITCH_MUTEX_NESTED, node->pool);
|
||||
switch_mutex_init(&node->update_mutex, SWITCH_MUTEX_NESTED, node->pool);
|
||||
@@ -975,8 +975,8 @@ static int node_idle_consumers(fifo_node_t *node)
|
||||
int total = 0;
|
||||
|
||||
switch_mutex_lock(node->mutex);
|
||||
for (hi = switch_hash_first(NULL, node->consumer_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &var, NULL, &val);
|
||||
for (hi = switch_core_hash_first( node->consumer_hash); hi; hi = switch_core_hash_next(hi)) {
|
||||
switch_core_hash_this(hi, &var, NULL, &val);
|
||||
session = (switch_core_session_t *) val;
|
||||
channel = switch_core_session_get_channel(session);
|
||||
if (!switch_channel_test_flag(channel, CF_BRIDGED)) {
|
||||
@@ -3802,14 +3802,14 @@ static int xml_hash(switch_xml_t xml, switch_hash_t *hash, char *container, char
|
||||
x_tmp = switch_xml_add_child_d(xml, container, cc_off++);
|
||||
switch_assert(x_tmp);
|
||||
|
||||
for (hi = switch_hash_first(NULL, hash); hi; hi = switch_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first( hash); hi; hi = switch_core_hash_next(hi)) {
|
||||
int c_off = 0, d_off = 0;
|
||||
const char *status;
|
||||
const char *ts;
|
||||
char url_buf[512] = "";
|
||||
char *encoded;
|
||||
|
||||
switch_hash_this(hi, &var, NULL, &val);
|
||||
switch_core_hash_this(hi, &var, NULL, &val);
|
||||
session = (switch_core_session_t *) val;
|
||||
channel = switch_core_session_get_channel(session);
|
||||
x_caller = switch_xml_add_child_d(x_tmp, tag, c_off++);
|
||||
@@ -3987,8 +3987,8 @@ void dump_hash(switch_hash_t *hash, switch_stream_handle_t *stream)
|
||||
const void *var;
|
||||
|
||||
switch_mutex_lock(globals.mutex);
|
||||
for (hi = switch_hash_first(NULL, hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &var, NULL, &val);
|
||||
for (hi = switch_core_hash_first( hash); hi; hi = switch_core_hash_next(hi)) {
|
||||
switch_core_hash_this(hi, &var, NULL, &val);
|
||||
stream->write_function(stream, " %s\n", (char *)var);
|
||||
}
|
||||
switch_mutex_unlock(globals.mutex);
|
||||
@@ -4002,8 +4002,8 @@ void node_dump(switch_stream_handle_t *stream)
|
||||
fifo_node_t *node;
|
||||
void *val;
|
||||
switch_mutex_lock(globals.mutex);
|
||||
for (hi = switch_hash_first(NULL, globals.fifo_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, NULL, NULL, &val);
|
||||
for (hi = switch_core_hash_first( globals.fifo_hash); hi; hi = switch_core_hash_next(hi)) {
|
||||
switch_core_hash_this(hi, NULL, NULL, &val);
|
||||
if ((node = (fifo_node_t *) val)) {
|
||||
stream->write_function(stream, "node: %s\n"
|
||||
" outbound_name: %s\n"
|
||||
@@ -4100,8 +4100,8 @@ SWITCH_STANDARD_API(fifo_api_function)
|
||||
switch_assert(x_report);
|
||||
|
||||
if (argc < 2) {
|
||||
for (hi = switch_hash_first(NULL, globals.fifo_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &var, NULL, &val);
|
||||
for (hi = switch_core_hash_first( globals.fifo_hash); hi; hi = switch_core_hash_next(hi)) {
|
||||
switch_core_hash_this(hi, &var, NULL, &val);
|
||||
node = (fifo_node_t *) val;
|
||||
|
||||
switch_mutex_lock(node->mutex);
|
||||
@@ -4137,8 +4137,8 @@ SWITCH_STANDARD_API(fifo_api_function)
|
||||
}
|
||||
} else if (!strcasecmp(argv[0], "count")) {
|
||||
if (argc < 2) {
|
||||
for (hi = switch_hash_first(NULL, globals.fifo_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &var, NULL, &val);
|
||||
for (hi = switch_core_hash_first( globals.fifo_hash); hi; hi = switch_core_hash_next(hi)) {
|
||||
switch_core_hash_this(hi, &var, NULL, &val);
|
||||
node = (fifo_node_t *) val;
|
||||
switch_mutex_lock(node->update_mutex);
|
||||
stream->write_function(stream, "%s:%d:%d:%d:%d:%d\n", (char *) var, node->consumer_count, node_caller_count(node), node->member_count, node->ring_consumer_count, node_idle_consumers(node));
|
||||
@@ -4158,8 +4158,8 @@ SWITCH_STANDARD_API(fifo_api_function)
|
||||
}
|
||||
} else if (!strcasecmp(argv[0], "has_outbound")) {
|
||||
if (argc < 2) {
|
||||
for (hi = switch_hash_first(NULL, globals.fifo_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &var, NULL, &val);
|
||||
for (hi = switch_core_hash_first( globals.fifo_hash); hi; hi = switch_core_hash_next(hi)) {
|
||||
switch_core_hash_this(hi, &var, NULL, &val);
|
||||
node = (fifo_node_t *) val;
|
||||
switch_mutex_lock(node->update_mutex);
|
||||
stream->write_function(stream, "%s:%d\n", (char *) var, node->has_outbound);
|
||||
@@ -4359,8 +4359,8 @@ static switch_status_t load_config(int reload, int del_all)
|
||||
fifo_node_t *node;
|
||||
void *val;
|
||||
switch_mutex_lock(globals.mutex);
|
||||
for (hi = switch_hash_first(NULL, globals.fifo_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, NULL, NULL, &val);
|
||||
for (hi = switch_core_hash_first( globals.fifo_hash); hi; hi = switch_core_hash_next(hi)) {
|
||||
switch_core_hash_this(hi, NULL, NULL, &val);
|
||||
if ((node = (fifo_node_t *) val) && node->is_static && node->ready == 1) {
|
||||
node->ready = -1;
|
||||
}
|
||||
@@ -4775,12 +4775,12 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_fifo_load)
|
||||
}
|
||||
|
||||
globals.pool = pool;
|
||||
switch_core_hash_init(&globals.fifo_hash, globals.pool);
|
||||
switch_core_hash_init(&globals.fifo_hash);
|
||||
|
||||
switch_core_hash_init(&globals.caller_orig_hash, globals.pool);
|
||||
switch_core_hash_init(&globals.consumer_orig_hash, globals.pool);
|
||||
switch_core_hash_init(&globals.bridge_hash, globals.pool);
|
||||
switch_core_hash_init(&globals.use_hash, globals.pool);
|
||||
switch_core_hash_init(&globals.caller_orig_hash);
|
||||
switch_core_hash_init(&globals.consumer_orig_hash);
|
||||
switch_core_hash_init(&globals.bridge_hash);
|
||||
switch_core_hash_init(&globals.use_hash);
|
||||
switch_mutex_init(&globals.caller_orig_mutex, SWITCH_MUTEX_NESTED, globals.pool);
|
||||
switch_mutex_init(&globals.consumer_orig_mutex, SWITCH_MUTEX_NESTED, globals.pool);
|
||||
switch_mutex_init(&globals.bridge_mutex, SWITCH_MUTEX_NESTED, globals.pool);
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
BASE=../../../..
|
||||
|
||||
LOCAL_SOURCES=fsk.c uart.c fsk_callerid.c
|
||||
LOCAL_OBJS=fsk.o uart.o fsk_callerid.o
|
||||
include $(BASE)/build/modmake.rules
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_fsk
|
||||
|
||||
mod_LTLIBRARIES = mod_fsk.la
|
||||
mod_fsk_la_SOURCES = mod_fsk.c fsk.c uart.c fsk_callerid.c
|
||||
mod_fsk_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_fsk_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_fsk_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_fsv
|
||||
|
||||
mod_LTLIBRARIES = mod_fsv.la
|
||||
mod_fsv_la_SOURCES = mod_fsv.c
|
||||
mod_fsv_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_fsv_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_fsv_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -161,7 +161,7 @@ SWITCH_LIMIT_INCR(limit_incr_hash)
|
||||
/* This is the first limit check on this channel, create a hashtable, set our prviate data */
|
||||
pvt = (limit_hash_private_t *) switch_core_session_alloc(session, sizeof(limit_hash_private_t));
|
||||
memset(pvt, 0, sizeof(limit_hash_private_t));
|
||||
switch_core_hash_init(&pvt->hash, switch_core_session_get_pool(session));
|
||||
switch_core_hash_init(&pvt->hash);
|
||||
switch_channel_set_private(channel, "limit_hash", pvt);
|
||||
}
|
||||
|
||||
@@ -291,13 +291,13 @@ SWITCH_LIMIT_RELEASE(limit_release_hash)
|
||||
/* clear for uuid */
|
||||
if (realm == NULL && resource == NULL) {
|
||||
/* Loop through the channel's hashtable which contains mapping to all the limit_hash_item_t referenced by that channel */
|
||||
while ((hi = switch_hash_first(NULL, pvt->hash))) {
|
||||
while ((hi = switch_core_hash_first( pvt->hash))) {
|
||||
void *val = NULL;
|
||||
const void *key;
|
||||
switch_ssize_t keylen;
|
||||
limit_hash_item_t *item = NULL;
|
||||
|
||||
switch_hash_this(hi, &key, &keylen, &val);
|
||||
switch_core_hash_this(hi, &key, &keylen, &val);
|
||||
|
||||
item = (limit_hash_item_t *) val;
|
||||
item->total_usage--;
|
||||
@@ -391,7 +391,7 @@ SWITCH_LIMIT_STATUS(limit_status_hash)
|
||||
|
||||
switch_thread_rwlock_rdlock(globals.limit_hash_rwlock);
|
||||
|
||||
for (hi = switch_hash_first(NULL, globals.limit_hash); hi; switch_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first( globals.limit_hash); hi; switch_core_hash_next(hi)) {
|
||||
count++;
|
||||
}
|
||||
|
||||
@@ -623,12 +623,12 @@ SWITCH_STANDARD_API(hash_dump_function)
|
||||
|
||||
if (mode & 1) {
|
||||
switch_thread_rwlock_rdlock(globals.limit_hash_rwlock);
|
||||
for (hi = switch_hash_first(NULL, globals.limit_hash); hi; hi = switch_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first( globals.limit_hash); hi; hi = switch_core_hash_next(hi)) {
|
||||
void *val = NULL;
|
||||
const void *key;
|
||||
switch_ssize_t keylen;
|
||||
limit_hash_item_t *item;
|
||||
switch_hash_this(hi, &key, &keylen, &val);
|
||||
switch_core_hash_this(hi, &key, &keylen, &val);
|
||||
|
||||
item = (limit_hash_item_t *)val;
|
||||
|
||||
@@ -639,11 +639,11 @@ SWITCH_STANDARD_API(hash_dump_function)
|
||||
|
||||
if (mode & 2) {
|
||||
switch_thread_rwlock_rdlock(globals.db_hash_rwlock);
|
||||
for (hi = switch_hash_first(NULL, globals.db_hash); hi; hi = switch_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first( globals.db_hash); hi; hi = switch_core_hash_next(hi)) {
|
||||
void *val = NULL;
|
||||
const void *key;
|
||||
switch_ssize_t keylen;
|
||||
switch_hash_this(hi, &key, &keylen, &val);
|
||||
switch_core_hash_this(hi, &key, &keylen, &val);
|
||||
if (realm) {
|
||||
if (strstr(key, realmvalue)) {
|
||||
stream->write_function(stream, "D/%s/%s\n", key, (char*)val);
|
||||
@@ -679,12 +679,12 @@ SWITCH_STANDARD_API(hash_remote_function)
|
||||
stream->write_function(stream, "Remote connections:\nName\t\t\tState\n");
|
||||
|
||||
switch_thread_rwlock_rdlock(globals.remote_hash_rwlock);
|
||||
for (hi = switch_hash_first(NULL, globals.remote_hash); hi; hi = switch_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first( globals.remote_hash); hi; hi = switch_core_hash_next(hi)) {
|
||||
void *val;
|
||||
const void *key;
|
||||
switch_ssize_t keylen;
|
||||
limit_remote_t *item;
|
||||
switch_hash_this(hi, &key, &keylen, &val);
|
||||
switch_core_hash_this(hi, &key, &keylen, &val);
|
||||
|
||||
item = (limit_remote_t *)val;
|
||||
stream->write_function(stream, "%s\t\t\t%s\n", item->name, state_str(item->state));
|
||||
@@ -756,7 +756,7 @@ limit_remote_t *limit_remote_create(const char *name, const char *host, uint16_t
|
||||
r->interval = interval;
|
||||
|
||||
switch_thread_rwlock_create(&r->rwlock, pool);
|
||||
switch_core_hash_init(&r->index, pool);
|
||||
switch_core_hash_init(&r->index);
|
||||
|
||||
switch_thread_rwlock_rdlock(globals.remote_hash_rwlock);
|
||||
switch_core_hash_insert(globals.remote_hash, name, r);
|
||||
@@ -780,11 +780,11 @@ void limit_remote_destroy(limit_remote_t **r)
|
||||
switch_thread_rwlock_wrlock((*r)->rwlock);
|
||||
|
||||
/* Free hashtable data */
|
||||
for (hi = switch_hash_first(NULL, (*r)->index); hi; hi = switch_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first( (*r)->index); hi; hi = switch_core_hash_next(hi)) {
|
||||
void *val;
|
||||
const void *key;
|
||||
switch_ssize_t keylen;
|
||||
switch_hash_this(hi, &key, &keylen, &val);
|
||||
switch_core_hash_this(hi, &key, &keylen, &val);
|
||||
|
||||
free(val);
|
||||
}
|
||||
@@ -803,13 +803,13 @@ static limit_hash_item_t get_remote_usage(const char *key) {
|
||||
switch_hash_index_t *hi;
|
||||
|
||||
switch_thread_rwlock_rdlock(globals.remote_hash_rwlock);
|
||||
for (hi = switch_hash_first(NULL, globals.remote_hash); hi; hi = switch_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first( globals.remote_hash); hi; hi = switch_core_hash_next(hi)) {
|
||||
void *val;
|
||||
const void *hashkey;
|
||||
switch_ssize_t keylen;
|
||||
limit_remote_t *remote;
|
||||
limit_hash_item_t *item;
|
||||
switch_hash_this(hi, &hashkey, &keylen, &val);
|
||||
switch_core_hash_this(hi, &hashkey, &keylen, &val);
|
||||
|
||||
remote = (limit_remote_t *)val;
|
||||
if (remote->state != REMOTE_UP) {
|
||||
@@ -983,9 +983,9 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_hash_load)
|
||||
switch_thread_rwlock_create(&globals.limit_hash_rwlock, globals.pool);
|
||||
switch_thread_rwlock_create(&globals.db_hash_rwlock, globals.pool);
|
||||
switch_thread_rwlock_create(&globals.remote_hash_rwlock, globals.pool);
|
||||
switch_core_hash_init(&globals.limit_hash, pool);
|
||||
switch_core_hash_init(&globals.db_hash, pool);
|
||||
switch_core_hash_init(&globals.remote_hash, globals.pool);
|
||||
switch_core_hash_init(&globals.limit_hash);
|
||||
switch_core_hash_init(&globals.db_hash);
|
||||
switch_core_hash_init(&globals.remote_hash);
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
|
||||
@@ -1031,8 +1031,8 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_hash_shutdown)
|
||||
limit_remote_t *item = NULL;
|
||||
|
||||
switch_thread_rwlock_rdlock(globals.remote_hash_rwlock);
|
||||
if ((hi = switch_hash_first(NULL, globals.remote_hash))) {
|
||||
switch_hash_this(hi, &key, &keylen, &val);
|
||||
if ((hi = switch_core_hash_first( globals.remote_hash))) {
|
||||
switch_core_hash_this(hi, &key, &keylen, &val);
|
||||
item = (limit_remote_t *)val;
|
||||
}
|
||||
switch_thread_rwlock_unlock(globals.remote_hash_rwlock);
|
||||
@@ -1050,20 +1050,20 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_hash_shutdown)
|
||||
switch_thread_rwlock_wrlock(globals.limit_hash_rwlock);
|
||||
switch_thread_rwlock_wrlock(globals.db_hash_rwlock);
|
||||
|
||||
while ((hi = switch_hash_first(NULL, globals.limit_hash))) {
|
||||
while ((hi = switch_core_hash_first( globals.limit_hash))) {
|
||||
void *val = NULL;
|
||||
const void *key;
|
||||
switch_ssize_t keylen;
|
||||
switch_hash_this(hi, &key, &keylen, &val);
|
||||
switch_core_hash_this(hi, &key, &keylen, &val);
|
||||
free(val);
|
||||
switch_core_hash_delete(globals.limit_hash, key);
|
||||
}
|
||||
|
||||
while ((hi = switch_hash_first(NULL, globals.db_hash))) {
|
||||
while ((hi = switch_core_hash_first( globals.db_hash))) {
|
||||
void *val = NULL;
|
||||
const void *key;
|
||||
switch_ssize_t keylen;
|
||||
switch_hash_this(hi, &key, &keylen, &val);
|
||||
switch_core_hash_this(hi, &key, &keylen, &val);
|
||||
free(val);
|
||||
switch_core_hash_delete(globals.db_hash, key);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_httapi
|
||||
|
||||
mod_LTLIBRARIES = mod_httapi.la
|
||||
mod_httapi_la_SOURCES = mod_httapi.c
|
||||
mod_httapi_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_httapi_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_httapi_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -1822,7 +1822,7 @@ static switch_status_t do_config(void)
|
||||
cookie_file = val;
|
||||
} else if (!strcasecmp(var, "enable-post-var")) {
|
||||
if (!vars_map && need_vars_map == 0) {
|
||||
if (switch_core_hash_init(&vars_map, globals.pool) != SWITCH_STATUS_SUCCESS) {
|
||||
if (switch_core_hash_init(&vars_map) != SWITCH_STATUS_SUCCESS) {
|
||||
need_vars_map = -1;
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Can't init params hash!\n");
|
||||
continue;
|
||||
@@ -2317,9 +2317,23 @@ SWITCH_STANDARD_APP(httapi_function)
|
||||
|
||||
/* HTTP FILE INTERFACE */
|
||||
|
||||
static const char *find_ext(const char *in)
|
||||
{
|
||||
const char *p = in + (strlen(in) - 1);
|
||||
|
||||
while(p >= in && *p) {
|
||||
if (*p == '/') return NULL;
|
||||
if (*p == '.') return (p+1);
|
||||
p--;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static char *load_cache_data(http_file_context_t *context, const char *url)
|
||||
{
|
||||
char *ext = NULL, *dext = NULL, *p;
|
||||
const char *ext = NULL;
|
||||
char *dext = NULL, *p;
|
||||
char digest[SWITCH_MD5_DIGEST_STRING_SIZE] = { 0 };
|
||||
char meta_buffer[1024] = "";
|
||||
int fd;
|
||||
@@ -2332,11 +2346,7 @@ static char *load_cache_data(http_file_context_t *context, const char *url)
|
||||
}
|
||||
|
||||
if (zstr(ext)) {
|
||||
if ((ext = strrchr(url, '.'))) {
|
||||
ext++;
|
||||
} else {
|
||||
ext = "wav";
|
||||
}
|
||||
ext = find_ext(url);
|
||||
}
|
||||
|
||||
if (ext && (p = strchr(ext, '?'))) {
|
||||
@@ -2348,9 +2358,8 @@ static char *load_cache_data(http_file_context_t *context, const char *url)
|
||||
}
|
||||
|
||||
context->cache_file_base = switch_core_sprintf(context->pool, "%s%s%s", globals.cache_path, SWITCH_PATH_SEPARATOR, digest);
|
||||
context->cache_file = switch_core_sprintf(context->pool, "%s%s%s.%s", globals.cache_path, SWITCH_PATH_SEPARATOR, digest, ext);
|
||||
context->meta_file = switch_core_sprintf(context->pool, "%s.meta", context->cache_file);
|
||||
context->lock_file = switch_core_sprintf(context->pool, "%s.lock", context->cache_file);
|
||||
context->meta_file = switch_core_sprintf(context->pool, "%s%s%s.meta", globals.cache_path, SWITCH_PATH_SEPARATOR, digest);
|
||||
context->lock_file = switch_core_sprintf(context->pool, "%s%s%s.lock", globals.cache_path, SWITCH_PATH_SEPARATOR, digest);
|
||||
|
||||
if (switch_file_exists(context->meta_file, context->pool) == SWITCH_STATUS_SUCCESS && ((fd = open(context->meta_file, O_RDONLY, 0)) > -1)) {
|
||||
if ((bytes = read(fd, meta_buffer, sizeof(meta_buffer))) > 0) {
|
||||
@@ -2363,10 +2372,20 @@ static char *load_cache_data(http_file_context_t *context, const char *url)
|
||||
}
|
||||
context->metadata = switch_core_strdup(context->pool, p);
|
||||
}
|
||||
|
||||
if ((p = strrchr(context->metadata, ':'))) {
|
||||
p++;
|
||||
if (!zstr(p)) {
|
||||
ext = p;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
close(fd);
|
||||
}
|
||||
|
||||
context->cache_file = switch_core_sprintf(context->pool, "%s%s%s%s%s", globals.cache_path, SWITCH_PATH_SEPARATOR, digest, ext ? "." : "", ext ? ext : "");
|
||||
|
||||
switch_safe_free(dext);
|
||||
|
||||
return context->cache_file;
|
||||
@@ -2626,6 +2645,7 @@ static switch_status_t locate_url_file(http_file_context_t *context, const char
|
||||
switch_status_t status = SWITCH_STATUS_FALSE;
|
||||
time_t now = switch_epoch_time_now(NULL);
|
||||
char *metadata;
|
||||
const char *ext = NULL;
|
||||
|
||||
load_cache_data(context, url);
|
||||
|
||||
@@ -2635,6 +2655,10 @@ static switch_status_t locate_url_file(http_file_context_t *context, const char
|
||||
|
||||
lock_file(context, SWITCH_TRUE);
|
||||
|
||||
if (context->url_params) {
|
||||
ext = switch_event_get_header(context->url_params, "ext");
|
||||
}
|
||||
|
||||
if (!context->url_params || !switch_true(switch_event_get_header(context->url_params, "nohead"))) {
|
||||
const char *ct = NULL;
|
||||
const char *newext = NULL;
|
||||
@@ -2650,8 +2674,7 @@ static switch_status_t locate_url_file(http_file_context_t *context, const char
|
||||
}
|
||||
}
|
||||
|
||||
if ((!context->url_params || !switch_event_get_header(context->url_params, "ext"))
|
||||
&& headers && (ct = switch_event_get_header(headers, "content-type"))) {
|
||||
if (zstr(ext) && headers && (ct = switch_event_get_header(headers, "content-type"))) {
|
||||
if (switch_strcasecmp_any(ct, "audio/mpeg", "audio/x-mpeg", "audio/mp3", "audio/x-mp3", "audio/mpeg3",
|
||||
"audio/x-mpeg3", "audio/mpg", "audio/x-mpg", "audio/x-mpegaudio", NULL)) {
|
||||
newext = "mp3";
|
||||
@@ -2660,14 +2683,14 @@ static switch_status_t locate_url_file(http_file_context_t *context, const char
|
||||
}
|
||||
}
|
||||
|
||||
if (newext) {
|
||||
ext = newext;
|
||||
} else if (zstr(ext)) {
|
||||
ext = find_ext(context->cache_file);
|
||||
}
|
||||
|
||||
|
||||
if (newext) {
|
||||
char *p;
|
||||
|
||||
if ((p = strrchr(context->cache_file, '.'))) {
|
||||
*p = '\0';
|
||||
}
|
||||
|
||||
context->cache_file = switch_core_sprintf(context->pool, "%s.%s", context->cache_file, newext);
|
||||
}
|
||||
|
||||
@@ -2678,11 +2701,12 @@ static switch_status_t locate_url_file(http_file_context_t *context, const char
|
||||
}
|
||||
|
||||
if (!unreachable && !zstr(context->metadata)) {
|
||||
metadata = switch_core_sprintf(context->pool, "%s:%s:%s:%s",
|
||||
metadata = switch_core_sprintf(context->pool, "%s:%s:%s:%s:%s",
|
||||
url,
|
||||
switch_event_get_header_nil(headers, "last-modified"),
|
||||
switch_event_get_header_nil(headers, "etag"),
|
||||
switch_event_get_header_nil(headers, "content-length")
|
||||
switch_event_get_header_nil(headers, "content-length"),
|
||||
ext
|
||||
);
|
||||
|
||||
if (!strcmp(metadata, context->metadata)) {
|
||||
@@ -2701,11 +2725,12 @@ static switch_status_t locate_url_file(http_file_context_t *context, const char
|
||||
}
|
||||
|
||||
|
||||
metadata = switch_core_sprintf(context->pool, "%s:%s:%s:%s",
|
||||
metadata = switch_core_sprintf(context->pool, "%s:%s:%s:%s:%s",
|
||||
url,
|
||||
switch_event_get_header_nil(headers, "last-modified"),
|
||||
switch_event_get_header_nil(headers, "etag"),
|
||||
switch_event_get_header_nil(headers, "content-length")
|
||||
switch_event_get_header_nil(headers, "content-length"),
|
||||
ext
|
||||
);
|
||||
|
||||
write_meta_file(context, metadata, headers);
|
||||
@@ -3011,8 +3036,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_httapi_load)
|
||||
switch_dir_make_recursive(globals.cache_path, SWITCH_DEFAULT_DIR_PERMS, pool);
|
||||
|
||||
|
||||
switch_core_hash_init(&globals.profile_hash, globals.pool);
|
||||
switch_core_hash_init_case(&globals.parse_hash, globals.pool, SWITCH_FALSE);
|
||||
switch_core_hash_init(&globals.profile_hash);
|
||||
switch_core_hash_init_case(&globals.parse_hash, SWITCH_FALSE);
|
||||
|
||||
bind_parser("execute", parse_execute);
|
||||
bind_parser("sms", parse_sms);
|
||||
@@ -3063,8 +3088,8 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_httapi_shutdown)
|
||||
void *val;
|
||||
const void *vvar;
|
||||
|
||||
for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &vvar, NULL, &val);
|
||||
for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
|
||||
switch_core_hash_this(hi, &vvar, NULL, &val);
|
||||
profile = (client_profile_t *) val;
|
||||
switch_event_destroy(&profile->dial_params.app_list);
|
||||
switch_event_destroy(&profile->var_params.expand_var_list);
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
BASE=../../../..
|
||||
|
||||
LOCAL_OBJS= \
|
||||
aws.o
|
||||
LOCAL_SOURCES= \
|
||||
aws.c
|
||||
|
||||
include $(BASE)/build/modmake.rules
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_http_cache
|
||||
|
||||
mod_LTLIBRARIES = mod_http_cache.la
|
||||
mod_http_cache_la_SOURCES = mod_http_cache.c aws.c
|
||||
mod_http_cache_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_http_cache_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_http_cache_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -1631,9 +1631,9 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_http_cache_load)
|
||||
|
||||
memset(&gcache, 0, sizeof(url_cache_t));
|
||||
gcache.pool = pool;
|
||||
switch_core_hash_init(&gcache.map, gcache.pool);
|
||||
switch_core_hash_init(&gcache.profiles, gcache.pool);
|
||||
switch_core_hash_init_nocase(&gcache.fqdn_profiles, gcache.pool);
|
||||
switch_core_hash_init(&gcache.map);
|
||||
switch_core_hash_init(&gcache.profiles);
|
||||
switch_core_hash_init_nocase(&gcache.fqdn_profiles);
|
||||
switch_mutex_init(&gcache.mutex, SWITCH_MUTEX_UNNESTED, gcache.pool);
|
||||
switch_thread_rwlock_create(&gcache.shutdown_lock, gcache.pool);
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
BASE=../../../..
|
||||
|
||||
LOCAL_OBJS += load.o
|
||||
include $(BASE)/build/modmake.rules
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_ladspa
|
||||
|
||||
mod_LTLIBRARIES = mod_ladspa.la
|
||||
mod_ladspa_la_SOURCES = mod_ladspa.c load.c
|
||||
mod_ladspa_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_ladspa_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_ladspa_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#include "switch.h"
|
||||
#include <dlfcn.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -15,7 +16,6 @@
|
||||
#include "ladspa.h"
|
||||
#include "utils.h"
|
||||
#include "inttypes.h"
|
||||
#include "switch.h"
|
||||
/*****************************************************************************/
|
||||
|
||||
/* This function provides a wrapping of dlopen(). When the filename is
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_lcr
|
||||
|
||||
mod_LTLIBRARIES = mod_lcr.la
|
||||
mod_lcr_la_SOURCES = mod_lcr.c
|
||||
mod_lcr_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_lcr_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_lcr_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -900,7 +900,7 @@ static switch_status_t lcr_do_lookup(callback_t *cb_struct)
|
||||
}
|
||||
|
||||
/* allocate the dedup hash */
|
||||
if (switch_core_hash_init(&cb_struct->dedup_hash, cb_struct->pool) != SWITCH_STATUS_SUCCESS) {
|
||||
if (switch_core_hash_init(&cb_struct->dedup_hash) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(cb_struct->session), SWITCH_LOG_ERROR, "Error initializing the dedup hash\n");
|
||||
return SWITCH_STATUS_GENERR;
|
||||
}
|
||||
@@ -1067,7 +1067,7 @@ static switch_status_t lcr_load_config()
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to determine database RANDOM function\n");
|
||||
};
|
||||
|
||||
switch_core_hash_init(&globals.profile_hash, globals.pool);
|
||||
switch_core_hash_init(&globals.profile_hash);
|
||||
if ((x_profiles = switch_xml_child(cfg, "profiles"))) {
|
||||
for (x_profile = switch_xml_child(x_profiles, "profile"); x_profile; x_profile = x_profile->next) {
|
||||
char *name = (char *) switch_xml_attr_soft(x_profile, "name");
|
||||
@@ -2038,8 +2038,8 @@ SWITCH_STANDARD_API(dialplan_lcr_admin_function)
|
||||
}
|
||||
switch_assert(argv[0]);
|
||||
if (!strcasecmp(argv[0], "show") && !strcasecmp(argv[1], "profiles")) {
|
||||
for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, NULL, NULL, &val);
|
||||
for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
|
||||
switch_core_hash_this(hi, NULL, NULL, &val);
|
||||
profile = (profile_t *) val;
|
||||
|
||||
stream->write_function(stream, "Name:\t\t%s\n", profile->name);
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_limit
|
||||
|
||||
mod_LTLIBRARIES = mod_limit.la
|
||||
mod_limit_la_SOURCES = mod_limit.c
|
||||
mod_limit_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_limit_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_limit_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
+9
-12
@@ -1,18 +1,18 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_memcache
|
||||
MEMCACHED=libmemcached-0.32
|
||||
BASE=../../../..
|
||||
|
||||
MEMCACHED_DIR=$(switch_srcdir)/libs/$(MEMCACHED)
|
||||
MEMCACHED_BUILDDIR=$(switch_builddir)/libs/$(MEMCACHED)
|
||||
|
||||
MEMCACHEDLA=$(MEMCACHED_BUILDDIR)/libmemcached/libmemcached.la
|
||||
|
||||
LOCAL_CFLAGS=-I$(MEMCACHED_DIR) -I$(MEMCACHED_BUILDDIR)
|
||||
LOCAL_LIBADD=$(MEMCACHEDLA)
|
||||
mod_LTLIBRARIES = mod_memcache.la
|
||||
mod_memcache_la_SOURCES = mod_memcache.c
|
||||
mod_memcache_la_CFLAGS = $(AM_CFLAGS) -I$(MEMCACHED_DIR) -I$(MEMCACHED_BUILDDIR)
|
||||
mod_memcache_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(MEMCACHEDLA)
|
||||
mod_memcache_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
|
||||
include $(BASE)/build/modmake.rules
|
||||
|
||||
MY_DEFAULT_ARGS:= --build=$(build) --host=$(host) --target=$(target) \
|
||||
--disable-shared --with-pic
|
||||
MY_DEFAULT_ARGS=--build=$(build) --host=$(host) --target=$(target) --disable-shared --with-pic
|
||||
|
||||
$(MEMCACHED_DIR):
|
||||
$(GETLIB) $(MEMCACHED).tar.gz
|
||||
@@ -20,12 +20,9 @@ $(MEMCACHED_DIR):
|
||||
$(MEMCACHED_BUILDDIR)/Makefile: $(MEMCACHED_DIR)
|
||||
mkdir -p $(MEMCACHED_BUILDDIR)
|
||||
echo $(MY_DEFAULT_ARGS)
|
||||
cd $(MEMCACHED_BUILDDIR) && $(DEFAULT_VARS) $(MEMCACHED_DIR)/configure $(MY_DEFAULT_ARGS) --with-memcached=no --srcdir=$(MEMCACHED_DIR) CPPFLAGS= LDFLAGS=
|
||||
cd $(MEMCACHED_BUILDDIR) && $(DEFAULT_VARS) $(MEMCACHED_DIR)/configure $(MY_DEFAULT_ARGS) --with-memcached=no --srcdir=$(MEMCACHED_DIR) CPPFLAGS= LDFLAGS=
|
||||
$(TOUCH_TARGET)
|
||||
|
||||
$(MEMCACHEDLA): $(MEMCACHED_BUILDDIR)/Makefile
|
||||
cd $(MEMCACHED_BUILDDIR) && $(MAKE)
|
||||
$(TOUCH_TARGET)
|
||||
|
||||
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
BASE=../../../..
|
||||
|
||||
MONGO_CXX_DRIVER_VERSION=v2.4
|
||||
MONGO_CXX_DRIVER_URL=http://downloads.mongodb.org/cxx-driver
|
||||
MONGO_CXX_DRIVER_TARBALL=mongodb-linux-x86_64-$(MONGO_CXX_DRIVER_VERSION)-latest.tgz
|
||||
MONGO_CXX_DRIVER_SRC=$(BASE)/libs/mongo-cxx-driver-$(MONGO_CXX_DRIVER_VERSION)
|
||||
LIBMONGOCLIENT_A =$(MONGO_CXX_DRIVER_SRC)/libmongoclient.a
|
||||
|
||||
LOCAL_SOURCES=
|
||||
LOCAL_OBJS=
|
||||
|
||||
LOCAL_CFLAGS=-I$(MONGO_CXX_DRIVER_SRC)/src
|
||||
LOCAL_LIBADD=$(LIBMONGOCLIENT_A)
|
||||
LOCAL_LDFLAGS=-lboost_thread -lboost_filesystem-mt -lboost_system-mt
|
||||
#LOCAL_LDFLAGS=-lboost_thread-mt -lboost_filesystem-mt -lboost_system-mt
|
||||
MODDIR=$(shell pwd)
|
||||
|
||||
|
||||
include $(BASE)/build/modmake.rules
|
||||
|
||||
$(MONGO_CXX_DRIVER_SRC):
|
||||
$(GETLIB) $(MONGO_CXX_DRIVER_URL) $(MONGO_CXX_DRIVER_TARBALL)
|
||||
cd $(MONGO_CXX_DRIVER_SRC) && patch -p0 -i $(MODDIR)/fpic_hack.diff
|
||||
$(TOUCH_TARGET)
|
||||
|
||||
|
||||
$(LIBMONGOCLIENT_A): $(MONGO_CXX_DRIVER_SRC)
|
||||
(cd $(MONGO_CXX_DRIVER_SRC) && \
|
||||
sed -i SConstruct -e "s|Environment()|Environment(ENV = {'PATH' : os.environ.get('PATH','/bin:/usr/bin'),'CFLAGS' : os.environ.get('CFLAGS',''),'CXXFLAGS' : os.environ.get('CXXFLAGS','')})|" && \
|
||||
echo "env.Append(PATH=os.environ.get('PATH','/bin:/usr/bin'))" >> SConstruct && \
|
||||
scons)
|
||||
$(TOUCH_TARGET)
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_mongo
|
||||
|
||||
MONGO_CXX_DRIVER_VERSION=v2.4
|
||||
MONGO_CXX_DRIVER_URL=http://downloads.mongodb.org/cxx-driver
|
||||
MONGO_CXX_DRIVER_TARBALL=mongodb-linux-x86_64-$(MONGO_CXX_DRIVER_VERSION)-latest.tgz
|
||||
MONGO_CXX_DRIVER_SRC=$(switch_builddir)/libs/mongo-cxx-driver-$(MONGO_CXX_DRIVER_VERSION)
|
||||
LIBMONGOCLIENT_A =$(MONGO_CXX_DRIVER_SRC)/libmongoclient.a
|
||||
|
||||
mod_LTLIBRARIES = mod_mongo.la
|
||||
mod_mongo_la_SOURCES = mod_mongo.cpp
|
||||
mod_mongo_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_mongo_la_CPPFLAGS = -I$(MONGO_CXX_DRIVER_SRC)/src -I$(switch_srcdir)/libs/stfu/ -I$(switch_srcdir)/libs/libteletone/src/
|
||||
mod_mongo_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(LIBMONGOCLIENT_A)
|
||||
mod_mongo_la_LDFLAGS = -avoid-version -module -no-undefined -shared -lboost_thread -lboost_filesystem-mt -lboost_system-mt
|
||||
|
||||
BUILT_SOURCES=$(LIBMONGOCLIENT_A)
|
||||
|
||||
$(MONGO_CXX_DRIVER_SRC):
|
||||
$(GETLIB) $(MONGO_CXX_DRIVER_URL) $(MONGO_CXX_DRIVER_TARBALL)
|
||||
cd $(MONGO_CXX_DRIVER_SRC) && patch -p0 -i $(switch_srcdir)/src/mod/applications/mod_mongo/fpic_hack.diff
|
||||
$(TOUCH_TARGET)
|
||||
|
||||
|
||||
$(LIBMONGOCLIENT_A): $(MONGO_CXX_DRIVER_SRC)
|
||||
(cd $(MONGO_CXX_DRIVER_SRC) && \
|
||||
sed -i'' SConstruct -e "s|Environment()|Environment(ENV = {'PATH' : os.environ.get('PATH','/bin:/usr/bin'),'CFLAGS' : os.environ.get('CFLAGS',''),'CXXFLAGS' : os.environ.get('CXXFLAGS','')})|" && \
|
||||
echo "env.Append(PATH=os.environ.get('PATH','/bin:/usr/bin'))" >> SConstruct && \
|
||||
scons)
|
||||
$(TOUCH_TARGET)
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
# LOCAL_CFLAGS=-I./mp4v2-2.0.0/include
|
||||
LOCAL_LDFLAGS=-lmp4v2
|
||||
LOCAL_SOURCES=mp4_helper.cpp
|
||||
LOCAL_OBJS=mp4_helper.o
|
||||
|
||||
BASE=../../../..
|
||||
include $(BASE)/build/modmake.rules
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_mp4
|
||||
|
||||
mod_LTLIBRARIES = mod_mp4.la
|
||||
mod_mp4_la_SOURCES = mod_mp4.cpp mp4_helper.cpp
|
||||
mod_mp4_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_mp4_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_mp4_la_LDFLAGS = -avoid-version -module -no-undefined -shared -lmp4v2
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_nibblebill
|
||||
|
||||
mod_LTLIBRARIES = mod_nibblebill.la
|
||||
mod_nibblebill_la_SOURCES = mod_nibblebill.c
|
||||
mod_nibblebill_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_nibblebill_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_nibblebill_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -1,2 +0,0 @@
|
||||
BASE=../../../..
|
||||
include $(BASE)/build/modmake.rules
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_oreka
|
||||
|
||||
mod_LTLIBRARIES = mod_oreka.la
|
||||
mod_oreka_la_SOURCES = mod_oreka.c
|
||||
mod_oreka_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_oreka_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_oreka_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
+9
-6
@@ -1,3 +1,6 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_rad_auth
|
||||
|
||||
RADCLIENT_VERSION=1.1.6
|
||||
RADCLIENT=freeradius-client-$(RADCLIENT_VERSION)
|
||||
RADCLIENT_DIR=$(switch_srcdir)/libs/$(RADCLIENT)
|
||||
@@ -5,11 +8,13 @@ RADCLIENT_BUILDDIR=$(switch_builddir)/libs/$(RADCLIENT)
|
||||
RADCLIENT_LIBDIR=$(RADCLIENT_BUILDDIR)/lib
|
||||
RADCLIENT_LA=${RADCLIENT_LIBDIR}/libfreeradius-client.la
|
||||
|
||||
LOCAL_CFLAGS=-I$(RADCLIENT_DIR)/include
|
||||
LOCAL_LIBADD=$(RADCLIENT_LA)
|
||||
mod_LTLIBRARIES = mod_rad_auth.la
|
||||
mod_rad_auth_la_SOURCES = mod_rad_auth.c
|
||||
mod_rad_auth_la_CFLAGS = $(AM_CFLAGS) -I$(RADCLIENT_DIR)/include
|
||||
mod_rad_auth_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(RADCLIENT_LA)
|
||||
mod_rad_auth_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
|
||||
BASE=../../../..
|
||||
include $(BASE)/build/modmake.rules
|
||||
BUILT_SOURCES=$(RADCLIENT_LA)
|
||||
|
||||
$(RADCLIENT_DIR):
|
||||
$(GETLIB) $(RADCLIENT).tar.gz
|
||||
@@ -22,5 +27,3 @@ $(RADCLIENT_BUILDDIR)/Makefile: $(RADCLIENT_DIR)
|
||||
$(RADCLIENT_LA): $(RADCLIENT_BUILDDIR)/Makefile
|
||||
cd $(RADCLIENT_BUILDDIR) && CFLAGS="$(CFLAGS)" $(MAKE)
|
||||
$(TOUCH_TARGET)
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_random
|
||||
|
||||
mod_LTLIBRARIES = mod_random.la
|
||||
mod_random_la_SOURCES = mod_random.c
|
||||
mod_random_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_random_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_random_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -1,3 +0,0 @@
|
||||
BASE=../../../..
|
||||
LOCAL_OBJS=credis.o
|
||||
include $(BASE)/build/modmake.rules
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_redis
|
||||
|
||||
mod_LTLIBRARIES = mod_redis.la
|
||||
mod_redis_la_SOURCES = mod_redis.c credis.c
|
||||
mod_redis_la_CFLAGS = $(AM_CFLAGS) -D_GNU_SOURCE
|
||||
mod_redis_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_redis_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
Executable → Regular
+3
-3
@@ -97,7 +97,7 @@ SWITCH_LIMIT_INCR(limit_incr_redis)
|
||||
} else {
|
||||
/* This is the first limit check on this channel, create a hashtable, set our prviate data and add a state handler */
|
||||
pvt = (limit_redis_private_t *) switch_core_session_alloc(session, sizeof(limit_redis_private_t));
|
||||
switch_core_hash_init(&pvt->hash, switch_core_session_get_pool(session));
|
||||
switch_core_hash_init(&pvt->hash);
|
||||
switch_mutex_init(&pvt->mutex, SWITCH_MUTEX_NESTED, switch_core_session_get_pool(session));
|
||||
switch_channel_set_private(channel, "limit_redis", pvt);
|
||||
}
|
||||
@@ -172,13 +172,13 @@ SWITCH_LIMIT_RELEASE(limit_release_redis)
|
||||
/* clear for uuid */
|
||||
if (realm == NULL && resource == NULL) {
|
||||
/* Loop through the channel's hashtable which contains mapping to all the limit_redis_item_t referenced by that channel */
|
||||
while ((hi = switch_hash_first(NULL, pvt->hash))) {
|
||||
while ((hi = switch_core_hash_first( pvt->hash))) {
|
||||
void *p_val = NULL;
|
||||
const void *p_key;
|
||||
char *p_uuid_key = NULL;
|
||||
switch_ssize_t keylen;
|
||||
|
||||
switch_hash_this(hi, &p_key, &keylen, &p_val);
|
||||
switch_core_hash_this(hi, &p_key, &keylen, &p_val);
|
||||
|
||||
if (credis_decr(redis, (const char*)p_key, &val) != 0) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Couldn't decrement value corresponding to %s\n", (char *)p_key);
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_rss
|
||||
|
||||
mod_LTLIBRARIES = mod_rss.la
|
||||
mod_rss_la_SOURCES = mod_rss.c
|
||||
mod_rss_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_rss_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_rss_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -1,2 +0,0 @@
|
||||
BASE=../../../..
|
||||
include $(BASE)/build/modmake.rules
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_skel
|
||||
|
||||
mod_LTLIBRARIES = mod_skel.la
|
||||
mod_skel_la_SOURCES = mod_skel.c
|
||||
mod_skel_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_skel_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_skel_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_sms
|
||||
|
||||
mod_LTLIBRARIES = mod_sms.la
|
||||
mod_sms_la_SOURCES = mod_sms.c
|
||||
mod_sms_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_sms_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_sms_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_snapshot
|
||||
|
||||
mod_LTLIBRARIES = mod_snapshot.la
|
||||
mod_snapshot_la_SOURCES = mod_snapshot.c
|
||||
mod_snapshot_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_snapshot_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_snapshot_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_snipe_hunt
|
||||
|
||||
mod_LTLIBRARIES = mod_snipe_hunt.la
|
||||
mod_snipe_hunt_la_SOURCES = mod_snipe_hunt.c
|
||||
mod_snipe_hunt_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_snipe_hunt_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_snipe_hunt_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -1,2 +0,0 @@
|
||||
BASE=../../../..
|
||||
include $(BASE)/build/modmake.rules
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_snom
|
||||
|
||||
mod_LTLIBRARIES = mod_snom.la
|
||||
mod_snom_la_SOURCES = mod_snom.c
|
||||
mod_snom_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_snom_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_snom_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -1,2 +0,0 @@
|
||||
BASE=../../../..
|
||||
include $(BASE)/build/modmake.rules
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_sonar
|
||||
|
||||
mod_LTLIBRARIES = mod_sonar.la
|
||||
mod_sonar_la_SOURCES = mod_sonar.c
|
||||
mod_sonar_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_sonar_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_sonar_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
+10
-6
@@ -1,13 +1,18 @@
|
||||
BASE=../../../..
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_soundtouch
|
||||
VERSION=soundtouch-1.7.1
|
||||
SNDT_SRC=$(switch_srcdir)/libs/soundtouch
|
||||
SNDT_BUILD=$(switch_builddir)/libs/soundtouch
|
||||
LA=$(SNDT_BUILD)/source/SoundTouch/.libs/libSoundTouch.a
|
||||
LA=$(SNDT_BUILD)/source/SoundTouch/libSoundTouch.la
|
||||
|
||||
LOCAL_CFLAGS += -I$(SNDT_SRC)/include -DINTEGER_SAMPLES -I$(SNDT_BUILD)/include
|
||||
LOCAL_LIBADD=$(LA)
|
||||
mod_LTLIBRARIES = mod_soundtouch.la
|
||||
mod_soundtouch_la_SOURCES = mod_soundtouch.cpp
|
||||
mod_soundtouch_la_CFLAGS = $(AM_CFLAGS) -I$(SNDT_SRC)/include -DINTEGER_SAMPLES -I$(SNDT_BUILD)/include
|
||||
mod_soundtouch_la_CXXFLAGS = -I$(SNDT_SRC)/include -DINTEGER_SAMPLES -I$(SNDT_BUILD)/include
|
||||
mod_soundtouch_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(LA)
|
||||
mod_soundtouch_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
|
||||
include $(BASE)/build/modmake.rules
|
||||
BUILT_SOURCES=$(LA)
|
||||
|
||||
$(SNDT_SRC):
|
||||
$(GETLIB) $(VERSION).tar.gz
|
||||
@@ -21,7 +26,6 @@ $(SNDT_BUILD)/Makefile: $(SNDT_SRC)
|
||||
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}
|
||||
|
||||
|
||||
$(LA): $(SNDT_BUILD)/Makefile
|
||||
cd $(SNDT_BUILD) && ${MAKE}
|
||||
@@ -493,7 +493,7 @@ switch_status_t load_configuration(switch_bool_t reload)
|
||||
}
|
||||
|
||||
switch_core_new_memory_pool(&spandsp_globals.config_pool);
|
||||
switch_core_hash_init(&spandsp_globals.tones, spandsp_globals.config_pool);
|
||||
switch_core_hash_init(&spandsp_globals.tones);
|
||||
|
||||
spandsp_globals.modem_dialplan = "XML";
|
||||
spandsp_globals.modem_context = "default";
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
BASE=../../../..
|
||||
include $(BASE)/build/modmake.rules
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_spy
|
||||
|
||||
mod_LTLIBRARIES = mod_spy.la
|
||||
mod_spy_la_SOURCES = mod_spy.c
|
||||
mod_spy_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_spy_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_spy_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -139,8 +139,8 @@ SWITCH_STANDARD_API(dump_hash)
|
||||
|
||||
switch_thread_rwlock_rdlock(globals.spy_hash_lock);
|
||||
|
||||
for (hi = switch_hash_first(NULL, globals.spy_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &key, NULL, &val);
|
||||
for (hi = switch_core_hash_first( globals.spy_hash); hi; hi = switch_core_hash_next(hi)) {
|
||||
switch_core_hash_this(hi, &key, NULL, &val);
|
||||
spy = (spy_t *) val;
|
||||
|
||||
stream->write_function(stream, "%s :");
|
||||
@@ -319,7 +319,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_spy_load)
|
||||
|
||||
globals.pool = pool;
|
||||
|
||||
switch_core_hash_init(&globals.spy_hash, pool);
|
||||
switch_core_hash_init(&globals.spy_hash);
|
||||
switch_thread_rwlock_create(&globals.spy_hash_lock, pool);
|
||||
globals.spy_count = 0;
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_translate
|
||||
|
||||
mod_LTLIBRARIES = mod_translate.la
|
||||
mod_translate_la_SOURCES = mod_translate.c
|
||||
mod_translate_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_translate_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_translate_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -170,13 +170,13 @@ static void do_unload(void) {
|
||||
|
||||
switch_mutex_lock(MUTEX);
|
||||
|
||||
while ((hi = switch_hash_first(NULL, globals.translate_profiles))) {
|
||||
while ((hi = switch_core_hash_first( globals.translate_profiles))) {
|
||||
void *val = NULL;
|
||||
const void *key;
|
||||
switch_ssize_t keylen;
|
||||
translate_rule_t *rl, *nrl;
|
||||
|
||||
switch_hash_this(hi, &key, &keylen, &val);
|
||||
switch_core_hash_this(hi, &key, &keylen, &val);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "deleting translate profile [%s]\n", (char *) key);
|
||||
|
||||
for (nrl = val; rl;) {
|
||||
@@ -201,7 +201,7 @@ static void do_load(void)
|
||||
{
|
||||
switch_mutex_lock(MUTEX);
|
||||
|
||||
switch_core_hash_init(&globals.translate_profiles, globals.pool);
|
||||
switch_core_hash_init(&globals.translate_profiles);
|
||||
switch_thread_rwlock_create(&globals.profile_hash_rwlock, globals.pool);
|
||||
load_config();
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_valet_parking
|
||||
|
||||
mod_LTLIBRARIES = mod_valet_parking.la
|
||||
mod_valet_parking_la_SOURCES = mod_valet_parking.c
|
||||
mod_valet_parking_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_valet_parking_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_valet_parking_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -71,7 +71,7 @@ static valet_lot_t *valet_find_lot(const char *name, switch_bool_t create)
|
||||
switch_zmalloc(lot, sizeof(*lot));
|
||||
lot->name = strdup(name);
|
||||
switch_mutex_init(&lot->mutex, SWITCH_MUTEX_NESTED, globals.pool);
|
||||
switch_core_hash_init(&lot->hash, NULL);
|
||||
switch_core_hash_init(&lot->hash);
|
||||
switch_core_hash_insert(globals.hash, name, lot);
|
||||
}
|
||||
switch_mutex_unlock(globals.mutex);
|
||||
@@ -120,8 +120,8 @@ static void check_timeouts(void)
|
||||
}
|
||||
|
||||
globals.last_timeout_check = now;
|
||||
for (hi = switch_hash_first(NULL, globals.hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &var, NULL, &val);
|
||||
for (hi = switch_core_hash_first( globals.hash); hi; hi = switch_core_hash_next(hi)) {
|
||||
switch_core_hash_this(hi, &var, NULL, &val);
|
||||
switch_console_push_match(&matches, (const char *) var);
|
||||
}
|
||||
switch_mutex_unlock(globals.mutex);
|
||||
@@ -135,8 +135,8 @@ static void check_timeouts(void)
|
||||
|
||||
top:
|
||||
|
||||
for (i_hi = switch_hash_first(NULL, lot->hash); i_hi; i_hi = switch_hash_next(i_hi)) {
|
||||
switch_hash_this(i_hi, &i_var, NULL, &i_val);
|
||||
for (i_hi = switch_core_hash_first( lot->hash); i_hi; i_hi = switch_core_hash_next(i_hi)) {
|
||||
switch_core_hash_this(i_hi, &i_var, NULL, &i_val);
|
||||
i_ext = (char *) i_var;
|
||||
token = (valet_token_t *) i_val;
|
||||
|
||||
@@ -167,9 +167,9 @@ static int find_longest(valet_lot_t *lot, int min, int max)
|
||||
time_t now = switch_epoch_time_now(NULL);
|
||||
|
||||
switch_mutex_lock(lot->mutex);
|
||||
for (i_hi = switch_hash_first(NULL, lot->hash); i_hi; i_hi = switch_hash_next(i_hi)) {
|
||||
for (i_hi = switch_core_hash_first( lot->hash); i_hi; i_hi = switch_core_hash_next(i_hi)) {
|
||||
int i;
|
||||
switch_hash_this(i_hi, &i_var, NULL, &i_val);
|
||||
switch_core_hash_this(i_hi, &i_var, NULL, &i_val);
|
||||
token = (valet_token_t *) i_val;
|
||||
cur = (now - token->start_time);
|
||||
i = atoi(token->ext);
|
||||
@@ -257,8 +257,8 @@ static int valet_lot_count(valet_lot_t *lot)
|
||||
now = switch_epoch_time_now(NULL);
|
||||
|
||||
switch_mutex_lock(lot->mutex);
|
||||
for (i_hi = switch_hash_first(NULL, lot->hash); i_hi; i_hi = switch_hash_next(i_hi)) {
|
||||
switch_hash_this(i_hi, &i_var, NULL, &i_val);
|
||||
for (i_hi = switch_core_hash_first( lot->hash); i_hi; i_hi = switch_core_hash_next(i_hi)) {
|
||||
switch_core_hash_this(i_hi, &i_var, NULL, &i_val);
|
||||
token = (valet_token_t *) i_val;
|
||||
if (token->timeout > 0 && (token->timeout < now || token->timeout == 1)) {
|
||||
continue;
|
||||
@@ -738,13 +738,13 @@ SWITCH_STANDARD_API(valet_info_function)
|
||||
stream->write_function(stream, "<lots>\n");
|
||||
|
||||
switch_mutex_lock(globals.mutex);
|
||||
for (hi = switch_hash_first(NULL, globals.hash); hi; hi = switch_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first( globals.hash); hi; hi = switch_core_hash_next(hi)) {
|
||||
switch_hash_index_t *i_hi;
|
||||
const void *i_var;
|
||||
void *i_val;
|
||||
char *i_ext;
|
||||
|
||||
switch_hash_this(hi, &var, NULL, &val);
|
||||
switch_core_hash_this(hi, &var, NULL, &val);
|
||||
name = (char *) var;
|
||||
lot = (valet_lot_t *) val;
|
||||
|
||||
@@ -754,10 +754,10 @@ SWITCH_STANDARD_API(valet_info_function)
|
||||
stream->write_function(stream, " <lot name=\"%s\">\n", name);
|
||||
|
||||
switch_mutex_lock(lot->mutex);
|
||||
for (i_hi = switch_hash_first(NULL, lot->hash); i_hi; i_hi = switch_hash_next(i_hi)) {
|
||||
for (i_hi = switch_core_hash_first( lot->hash); i_hi; i_hi = switch_core_hash_next(i_hi)) {
|
||||
valet_token_t *token;
|
||||
|
||||
switch_hash_this(i_hi, &i_var, NULL, &i_val);
|
||||
switch_core_hash_this(i_hi, &i_var, NULL, &i_val);
|
||||
i_ext = (char *) i_var;
|
||||
token = (valet_token_t *) i_val;
|
||||
|
||||
@@ -848,8 +848,8 @@ static void pres_event_handler(switch_event_t *event)
|
||||
const char *nvar;
|
||||
|
||||
switch_mutex_lock(globals.mutex);
|
||||
for (hi = switch_hash_first(NULL, globals.hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &var, NULL, &val);
|
||||
for (hi = switch_core_hash_first( globals.hash); hi; hi = switch_core_hash_next(hi)) {
|
||||
switch_core_hash_this(hi, &var, NULL, &val);
|
||||
nvar = (const char *) var;
|
||||
|
||||
if (!strchr(nvar, '@') || switch_stristr(domain_name, nvar)) {
|
||||
@@ -930,7 +930,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_valet_parking_load)
|
||||
memset(&globals, 0, sizeof(globals));
|
||||
|
||||
globals.pool = pool;
|
||||
switch_core_hash_init(&globals.hash, NULL);
|
||||
switch_core_hash_init(&globals.hash);
|
||||
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, globals.pool);
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_vmd
|
||||
|
||||
mod_LTLIBRARIES = mod_vmd.la
|
||||
mod_vmd_la_SOURCES = mod_vmd.c
|
||||
mod_vmd_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_vmd_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_vmd_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_voicemail
|
||||
|
||||
mod_LTLIBRARIES = mod_voicemail.la
|
||||
mod_voicemail_la_SOURCES = mod_voicemail.c
|
||||
mod_voicemail_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_voicemail_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_voicemail_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -3866,9 +3866,9 @@ SWITCH_STANDARD_API(boxcount_api_function)
|
||||
/* Kept for backwards-compatibility */
|
||||
switch_hash_index_t *hi;
|
||||
switch_mutex_lock(globals.mutex);
|
||||
if ((hi = switch_hash_first(NULL, globals.profile_hash))) {
|
||||
if ((hi = switch_core_hash_first( globals.profile_hash))) {
|
||||
void *val;
|
||||
switch_hash_this(hi, NULL, NULL, &val);
|
||||
switch_core_hash_this(hi, NULL, NULL, &val);
|
||||
profile = (vm_profile_t *) val;
|
||||
total_new_messages = total_saved_messages = 0;
|
||||
message_count(profile, id, domain, "inbox", &total_new_messages, &total_saved_messages,
|
||||
@@ -4020,8 +4020,8 @@ static void actual_message_query_handler(switch_event_t *event)
|
||||
"Cound not find a profile for domain: [%s] Returning 0 messages\nWhen message-query-exact-match is enabled you must have a dedicated vm profile per distinct domain name you wish to use.\n", domain);
|
||||
}
|
||||
} else {
|
||||
for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, NULL, NULL, &val);
|
||||
for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
|
||||
switch_core_hash_this(hi, NULL, NULL, &val);
|
||||
profile = (vm_profile_t *) val;
|
||||
parse_profile();
|
||||
|
||||
@@ -4923,8 +4923,8 @@ SWITCH_STANDARD_API(voicemail_api_function)
|
||||
} else if (!strcasecmp(argv[0], "status")) {
|
||||
stream->write_function(stream, "============================\n");
|
||||
switch_mutex_lock(globals.mutex);
|
||||
for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, NULL, NULL, &val);
|
||||
for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
|
||||
switch_core_hash_this(hi, NULL, NULL, &val);
|
||||
profile = (vm_profile_t *) val;
|
||||
stream->write_function(stream, "Profile: %s\n", profile->name);
|
||||
}
|
||||
@@ -4958,8 +4958,8 @@ SWITCH_STANDARD_API(voicemail_api_function)
|
||||
void *value;
|
||||
|
||||
switch_mutex_lock(globals.mutex);
|
||||
for (index = switch_hash_first(NULL, globals.profile_hash); index; index = switch_hash_next(index)) {
|
||||
switch_hash_this(index, NULL, NULL, &value);
|
||||
for (index = switch_core_hash_first( globals.profile_hash); index; index = switch_core_hash_next(index)) {
|
||||
switch_core_hash_this(index, NULL, NULL, &value);
|
||||
profile = (vm_profile_t *) value;
|
||||
if (profile) {
|
||||
switch_thread_rwlock_rdlock(profile->rwlock);
|
||||
@@ -6179,7 +6179,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_voicemail_load)
|
||||
memset(&globals, 0, sizeof(globals));
|
||||
globals.pool = pool;
|
||||
|
||||
switch_core_hash_init(&globals.profile_hash, globals.pool);
|
||||
switch_core_hash_init(&globals.profile_hash);
|
||||
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, globals.pool);
|
||||
|
||||
switch_mutex_lock(globals.mutex);
|
||||
@@ -6261,8 +6261,8 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_voicemail_shutdown)
|
||||
}
|
||||
|
||||
switch_mutex_lock(globals.mutex);
|
||||
while ((hi = switch_hash_first(NULL, globals.profile_hash))) {
|
||||
switch_hash_this(hi, &key, &keylen, &val);
|
||||
while ((hi = switch_core_hash_first( globals.profile_hash))) {
|
||||
switch_core_hash_this(hi, &key, &keylen, &val);
|
||||
profile = (vm_profile_t *) val;
|
||||
|
||||
switch_core_hash_delete(globals.profile_hash, profile->name);
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
BASE=../../../..
|
||||
LOCAL_OBJS=ivr.o utils.o config.o menu.o
|
||||
include $(BASE)/build/modmake.rules
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_voicemail_ivr
|
||||
|
||||
mod_LTLIBRARIES = mod_voicemail_ivr.la
|
||||
mod_voicemail_ivr_la_SOURCES = mod_voicemail_ivr.c ivr.c utils.c config.c menu.c
|
||||
mod_voicemail_ivr_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_voicemail_ivr_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_voicemail_ivr_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -1,6 +0,0 @@
|
||||
LOCAL_INSERT_LDFLAGS=if test $$osarch = "Darwin" ; then echo "-framework swift" ; else echo "-L$(SWIFT_HOME)/lib -L/opt/swift/lib -lswift -lm" ; fi ;
|
||||
|
||||
LOCAL_INSERT_CFLAGS=if test $$osarch = "Darwin" ; then echo "-I/Library/Frameworks/swift.framework/Versions/5/Headers/" ; else echo "-I$(SWIFT_HOME)/include -I/opt/swift/include"; fi ;
|
||||
LOCAL_CFLAGS=-w
|
||||
include ../../../../build/modmake.rules
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_cepstral
|
||||
|
||||
mod_LTLIBRARIES = mod_cepstral.la
|
||||
mod_cepstral_la_SOURCES = mod_cepstral.c
|
||||
mod_cepstral_la_CFLAGS = $(AM_CFLAGS) -w
|
||||
mod_cepstral_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_cepstral_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
|
||||
if ISMAC
|
||||
mod_cepstral_la_LDFLAGS += -framework swift
|
||||
mod_cepstral_la_CFLAGS += -I/Library/Frameworks/swift.framework/Versions/5/Headers/
|
||||
else
|
||||
mod_cepstral_la_LDFLAGS += -L$(SWIFT_HOME)/lib -L/opt/swift/lib -lswift -lm
|
||||
mod_cepstral_la_CFLAGS += -I$(SWIFT_HOME)/include -I/opt/swift/include
|
||||
endif
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_flite
|
||||
|
||||
FLITE=flite-1.5.4
|
||||
|
||||
FLITE_DIR=$(switch_srcdir)/libs/$(FLITE)-current
|
||||
@@ -11,13 +14,14 @@ FLITE_A=$(FLITE_LIBDIR)/libflite_cmu_us_awb.a \
|
||||
$(FLITE_LIBDIR)/libflite_cmu_us_slt.a \
|
||||
$(FLITE_LIBDIR)/libflite_cmulex.a $(FLITE_LIBDIR)/libflite_usenglish.a $(FLITE_LIBDIR)/libflite.a -lm
|
||||
|
||||
LOCAL_CFLAGS=-I$(FLITE_DIR)/include -I$(FLITE_BUILDDIR)/include
|
||||
LOCAL_LIBADD=$(FLITE_A)
|
||||
mod_LTLIBRARIES = mod_flite.la
|
||||
mod_flite_la_SOURCES = mod_flite.c
|
||||
mod_flite_la_CFLAGS = $(AM_CFLAGS) -I$(FLITE_DIR)/include -I$(FLITE_BUILDDIR)/include
|
||||
mod_flite_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(FLITE_A)
|
||||
mod_flite_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
|
||||
BASE=../../../..
|
||||
include $(BASE)/build/modmake.rules
|
||||
BUILT_SOURCES= $(FLITE_A)
|
||||
|
||||
$(MODNAME).lo: $(FLITE_A)
|
||||
$(FLITE_DIR):
|
||||
$(GETLIB) $(FLITE)-current.tar.bz2
|
||||
|
||||
+10
-6
@@ -1,3 +1,6 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_pocketsphinx
|
||||
|
||||
SPHINXBASE=sphinxbase-0.7
|
||||
SPHINXBASE_DIR=$(switch_srcdir)/libs/$(SPHINXBASE)
|
||||
SPHINXBASE_BUILDDIR=$(switch_builddir)/libs/$(SPHINXBASE)
|
||||
@@ -11,12 +14,13 @@ POCKETSPHINX_LA=$(POCKETSPHINX_BUILDDIR)/src/libpocketsphinx/libpocketsphinx.la
|
||||
|
||||
SPHINXMODEL=communicator_semi_6000_20080321
|
||||
|
||||
LOCAL_CFLAGS=-I$(SPHINXBASE_DIR)/include -I$(POCKETSPHINX_DIR)/include
|
||||
LOCAL_LIBADD=$(POCKETSPHINX_LA) $(SPHINXBASE_LA) $(SPHINXBASE_LA2)
|
||||
BASE=../../../..
|
||||
include $(BASE)/build/modmake.rules
|
||||
mod_LTLIBRARIES = mod_pocketsphinx.la
|
||||
mod_pocketsphinx_la_SOURCES = mod_pocketsphinx.c
|
||||
mod_pocketsphinx_la_CFLAGS = $(AM_CFLAGS) -I$(SPHINXBASE_DIR)/include -I$(POCKETSPHINX_DIR)/include
|
||||
mod_pocketsphinx_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(POCKETSPHINX_LA) $(SPHINXBASE_LA) $(SPHINXBASE_LA2)
|
||||
mod_pocketsphinx_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
|
||||
mod_pocketsphinx.lo: $(POCKETSPHINX_LA) $(SPHINXBASE_LA) $(SPHINXBASE_LA2)
|
||||
BUILT_SOURCES=$(POCKETSPHINX_LA) $(SPHINXBASE_LA) $(SPHINXBASE_LA2)
|
||||
|
||||
$(SPHINXBASE_DIR):
|
||||
$(GETLIB) $(SPHINXBASE).tar.gz
|
||||
@@ -62,5 +66,5 @@ $(DESTDIR)$(grammardir)/model/communicator:
|
||||
dictionary:
|
||||
@install -m0644 $(POCKETSPHINX_DIR)/model/lm/en_US/cmu07a.dic $(DESTDIR)$(grammardir)/default.dic
|
||||
|
||||
local_install: $(DESTDIR)$(grammardir)/model $(DESTDIR)$(grammardir)/model/communicator dictionary
|
||||
install: $(DESTDIR)$(grammardir)/model $(DESTDIR)$(grammardir)/model/communicator dictionary
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_tts_commandline
|
||||
|
||||
mod_LTLIBRARIES = mod_tts_commandline.la
|
||||
mod_tts_commandline_la_SOURCES = mod_tts_commandline.c
|
||||
mod_tts_commandline_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_tts_commandline_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_tts_commandline_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
@@ -29,8 +29,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
#include <switch.h>
|
||||
#include <unistd.h>
|
||||
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_tts_commandline_load);
|
||||
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_tts_commandline_shutdown);
|
||||
|
||||
@@ -538,8 +538,8 @@ static switch_status_t profile_create(profile_t ** profile, const char *name, sw
|
||||
lprofile->gsl_mime_type = "application/x-nuance-gsl";
|
||||
lprofile->jsgf_mime_type = "application/x-jsgf";
|
||||
lprofile->ssml_mime_type = "application/ssml+xml";
|
||||
switch_core_hash_init(&lprofile->default_synth_params, pool);
|
||||
switch_core_hash_init(&lprofile->default_recog_params, pool);
|
||||
switch_core_hash_init(&lprofile->default_synth_params);
|
||||
switch_core_hash_init(&lprofile->default_recog_params);
|
||||
*profile = lprofile;
|
||||
|
||||
if (globals.enable_profile_events && switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, MY_EVENT_PROFILE_CREATE) == SWITCH_STATUS_SUCCESS) {
|
||||
@@ -873,7 +873,7 @@ static switch_status_t speech_channel_create(speech_channel_t ** schannel, const
|
||||
status = SWITCH_STATUS_FALSE;
|
||||
goto done;
|
||||
}
|
||||
switch_core_hash_init(&schan->params, pool);
|
||||
switch_core_hash_init(&schan->params);
|
||||
schan->data = NULL;
|
||||
if (zstr(name)) {
|
||||
schan->name = "";
|
||||
@@ -1155,11 +1155,11 @@ static switch_status_t synth_channel_set_params(speech_channel_t *schannel, mrcp
|
||||
{
|
||||
/* loop through each param and add to synth header or vendor-specific-params */
|
||||
switch_hash_index_t *hi = NULL;
|
||||
for (hi = switch_hash_first(NULL, schannel->params); hi; hi = switch_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first( schannel->params); hi; hi = switch_core_hash_next(hi)) {
|
||||
char *param_name = NULL, *param_val = NULL;
|
||||
const void *key;
|
||||
void *val;
|
||||
switch_hash_this(hi, &key, NULL, &val);
|
||||
switch_core_hash_this(hi, &key, NULL, &val);
|
||||
param_name = (char *) key;
|
||||
param_val = (char *) val;
|
||||
if (!zstr(param_name) && !zstr(param_val)) {
|
||||
@@ -1630,11 +1630,11 @@ static switch_status_t synth_speech_open(switch_speech_handle_t *sh, const char
|
||||
}
|
||||
|
||||
/* Set default TTS params */
|
||||
for (hi = switch_hash_first(NULL, profile->default_synth_params); hi; hi = switch_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first( profile->default_synth_params); hi; hi = switch_core_hash_next(hi)) {
|
||||
char *param_name = NULL, *param_val = NULL;
|
||||
const void *key;
|
||||
void *val;
|
||||
switch_hash_this(hi, &key, NULL, &val);
|
||||
switch_core_hash_this(hi, &key, NULL, &val);
|
||||
param_name = (char *) key;
|
||||
param_val = (char *) val;
|
||||
speech_channel_set_param(schannel, param_name, param_val);
|
||||
@@ -2047,11 +2047,11 @@ static switch_status_t synth_load(switch_loadable_module_interface_t *module_int
|
||||
mrcp_client_application_register(globals.mrcp_client, globals.synth.app, "synth");
|
||||
|
||||
/* map FreeSWITCH params to MRCP param */
|
||||
switch_core_hash_init_nocase(&globals.synth.fs_param_map, pool);
|
||||
switch_core_hash_init_nocase(&globals.synth.fs_param_map);
|
||||
switch_core_hash_insert(globals.synth.fs_param_map, "voice", "voice-name");
|
||||
|
||||
/* map MRCP params to UniMRCP ID */
|
||||
switch_core_hash_init_nocase(&globals.synth.param_id_map, pool);
|
||||
switch_core_hash_init_nocase(&globals.synth.param_id_map);
|
||||
switch_core_hash_insert(globals.synth.param_id_map, "jump-size", unimrcp_param_id_create(SYNTHESIZER_HEADER_JUMP_SIZE, pool));
|
||||
switch_core_hash_insert(globals.synth.param_id_map, "kill-on-barge-in", unimrcp_param_id_create(SYNTHESIZER_HEADER_KILL_ON_BARGE_IN, pool));
|
||||
switch_core_hash_insert(globals.synth.param_id_map, "speaker-profile", unimrcp_param_id_create(SYNTHESIZER_HEADER_SPEAKER_PROFILE, pool));
|
||||
@@ -2192,12 +2192,12 @@ static switch_status_t recog_channel_start(speech_channel_t *schannel)
|
||||
r->timers_started = zstr(start_input_timers) || strcasecmp(start_input_timers, "false");
|
||||
|
||||
/* count enabled grammars */
|
||||
for (egk = switch_hash_first(NULL, r->enabled_grammars); egk; egk = switch_hash_next(egk)) {
|
||||
for (egk = switch_core_hash_first( r->enabled_grammars); egk; egk = switch_core_hash_next(egk)) {
|
||||
// NOTE: This postponed type check is necessary to allow a non-URI-list grammar to execute alone
|
||||
if (grammar_uri_count == 1 && grammar->type != GRAMMAR_TYPE_URI)
|
||||
goto no_grammar_alone;
|
||||
++grammar_uri_count;
|
||||
switch_hash_this(egk, (void *) &key, NULL, (void *) &grammar);
|
||||
switch_core_hash_this(egk, (void *) &key, NULL, (void *) &grammar);
|
||||
if (grammar->type != GRAMMAR_TYPE_URI && grammar_uri_count != 1) {
|
||||
no_grammar_alone:
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) Grammar '%s' can only be used alone (not a URI list)\n", schannel->name, key);
|
||||
@@ -2224,8 +2224,8 @@ static switch_status_t recog_channel_start(speech_channel_t *schannel)
|
||||
/* get the enabled grammars list */
|
||||
grammar_uri_list = switch_core_alloc(schannel->memory_pool, grammar_uri_list_len + 1);
|
||||
grammar_uri_list_len = 0;
|
||||
for (egk = switch_hash_first(NULL, r->enabled_grammars); egk; egk = switch_hash_next(egk)) {
|
||||
switch_hash_this(egk, (void *) &key, NULL, (void *) &grammar);
|
||||
for (egk = switch_core_hash_first( r->enabled_grammars); egk; egk = switch_core_hash_next(egk)) {
|
||||
switch_core_hash_this(egk, (void *) &key, NULL, (void *) &grammar);
|
||||
len = strlen(grammar->data);
|
||||
if (!len)
|
||||
continue;
|
||||
@@ -2497,7 +2497,7 @@ static switch_status_t recog_channel_disable_all_grammars(speech_channel_t *scha
|
||||
recognizer_data_t *r = (recognizer_data_t *) schannel->data;
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) Disabling all grammars\n", schannel->name);
|
||||
switch_core_hash_destroy(&r->enabled_grammars);
|
||||
switch_core_hash_init(&r->enabled_grammars, schannel->memory_pool);
|
||||
switch_core_hash_init(&r->enabled_grammars);
|
||||
|
||||
return status;
|
||||
}
|
||||
@@ -2807,11 +2807,11 @@ static switch_status_t recog_channel_set_params(speech_channel_t *schannel, mrcp
|
||||
{
|
||||
/* loop through each param and add to recog header or vendor-specific-params */
|
||||
switch_hash_index_t *hi = NULL;
|
||||
for (hi = switch_hash_first(NULL, schannel->params); hi; hi = switch_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first( schannel->params); hi; hi = switch_core_hash_next(hi)) {
|
||||
char *param_name = NULL, *param_val = NULL;
|
||||
const void *key;
|
||||
void *val;
|
||||
switch_hash_this(hi, &key, NULL, &val);
|
||||
switch_core_hash_this(hi, &key, NULL, &val);
|
||||
param_name = (char *) key;
|
||||
param_val = (char *) val;
|
||||
if (!zstr(param_name) && !zstr(param_val)) {
|
||||
@@ -3111,8 +3111,8 @@ static switch_status_t recog_asr_open(switch_asr_handle_t *ah, const char *codec
|
||||
r = (recognizer_data_t *) switch_core_alloc(ah->memory_pool, sizeof(recognizer_data_t));
|
||||
schannel->data = r;
|
||||
memset(r, 0, sizeof(recognizer_data_t));
|
||||
switch_core_hash_init(&r->grammars, ah->memory_pool);
|
||||
switch_core_hash_init(&r->enabled_grammars, ah->memory_pool);
|
||||
switch_core_hash_init(&r->grammars);
|
||||
switch_core_hash_init(&r->enabled_grammars);
|
||||
|
||||
/* Open the channel */
|
||||
if (zstr(profile_name)) {
|
||||
@@ -3129,11 +3129,11 @@ static switch_status_t recog_asr_open(switch_asr_handle_t *ah, const char *codec
|
||||
}
|
||||
|
||||
/* Set default ASR params */
|
||||
for (hi = switch_hash_first(NULL, profile->default_recog_params); hi; hi = switch_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first( profile->default_recog_params); hi; hi = switch_core_hash_next(hi)) {
|
||||
char *param_name = NULL, *param_val = NULL;
|
||||
const void *key;
|
||||
void *val;
|
||||
switch_hash_this(hi, &key, NULL, &val);
|
||||
switch_core_hash_this(hi, &key, NULL, &val);
|
||||
param_name = (char *) key;
|
||||
param_val = (char *) val;
|
||||
speech_channel_set_param(schannel, param_name, param_val);
|
||||
@@ -3794,12 +3794,12 @@ static switch_status_t recog_load(switch_loadable_module_interface_t *module_int
|
||||
mrcp_client_application_register(globals.mrcp_client, globals.recog.app, "recog");
|
||||
|
||||
/* map FreeSWITCH params or old params to MRCPv2 param */
|
||||
switch_core_hash_init_nocase(&globals.recog.fs_param_map, pool);
|
||||
switch_core_hash_init_nocase(&globals.recog.fs_param_map);
|
||||
/* MRCPv1 param */
|
||||
switch_core_hash_insert(globals.recog.fs_param_map, "recognizer-start-timers", "start-input-timers");
|
||||
|
||||
/* map MRCP params to UniMRCP ID */
|
||||
switch_core_hash_init_nocase(&globals.recog.param_id_map, pool);
|
||||
switch_core_hash_init_nocase(&globals.recog.param_id_map);
|
||||
switch_core_hash_insert(globals.recog.param_id_map, "Confidence-Threshold", unimrcp_param_id_create(RECOGNIZER_HEADER_CONFIDENCE_THRESHOLD, pool));
|
||||
switch_core_hash_insert(globals.recog.param_id_map, "Sensitivity-Level", unimrcp_param_id_create(RECOGNIZER_HEADER_SENSITIVITY_LEVEL, pool));
|
||||
switch_core_hash_insert(globals.recog.param_id_map, "Speed-Vs-Accuracy", unimrcp_param_id_create(RECOGNIZER_HEADER_SPEED_VS_ACCURACY, pool));
|
||||
@@ -4332,7 +4332,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_unimrcp_load)
|
||||
memset(&globals, 0, sizeof(globals));
|
||||
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_UNNESTED, pool);
|
||||
globals.speech_channel_number = 0;
|
||||
switch_core_hash_init_nocase(&globals.profiles, pool);
|
||||
switch_core_hash_init_nocase(&globals.profiles);
|
||||
|
||||
/* get MRCP module configuration */
|
||||
mod_unimrcp_do_config();
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
BASE=../../../..
|
||||
|
||||
AMR_DIR=$(switch_srcdir)/libs/amr
|
||||
AMR_BUILDDIR=$(switch_builddir)/libs/amr
|
||||
AMR_A=$(AMR_BUILDDIR)/libamr.a
|
||||
|
||||
LOCAL_INSERT_CFLAGS=if test -d $(AMR_DIR); then echo "-I$(AMR_DIR)" ; else echo "-DAMR_PASSTHROUGH" ; fi ;
|
||||
LOCAL_INSERT_LDFLAGS=test ! -d $(AMR_DIR) || echo "$(AMR_A)";
|
||||
|
||||
|
||||
include $(BASE)/build/modmake.rules
|
||||
@@ -0,0 +1,21 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_amr
|
||||
|
||||
AMR_DIR=$(switch_srcdir)/libs/amr
|
||||
AMR_BUILDDIR=$(switch_builddir)/libs/amr
|
||||
AMR_A=$(AMR_BUILDDIR)/libamr.a
|
||||
|
||||
mod_LTLIBRARIES = mod_amr.la
|
||||
mod_amr_la_SOURCES = mod_amr.c
|
||||
mod_amr_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_amr_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_amr_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
|
||||
if HAVE_AMR
|
||||
BUILT_SOURCES= $(AMR_A)
|
||||
mod_amr_la_CFLAGS += -I$(AMR_DIR)
|
||||
mod_amr_la_LIBADD += $(AMR_A)
|
||||
else
|
||||
mod_amr_la_CFLAGS += -DAMR_PASSTHROUGH
|
||||
endif
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
BASE=../../../..
|
||||
|
||||
AMR_DIR=$(switch_srcdir)/libs/amrwb
|
||||
AMR_BUILDDIR=$(switch_builddir)/libs/amrwb
|
||||
AMR_A=$(AMR_BUILDDIR)/libamrwb.a
|
||||
|
||||
LOCAL_INSERT_CFLAGS=if test -d $(AMR_DIR); then echo "-I$(AMR_DIR)" ; else echo "-DAMRWB_PASSTHROUGH" ; fi ;
|
||||
LOCAL_INSERT_LDFLAGS=test ! -d $(AMR_DIR) || echo "$(AMR_A)";
|
||||
|
||||
|
||||
include $(BASE)/build/modmake.rules
|
||||
@@ -0,0 +1,21 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_amrwb
|
||||
|
||||
AMRWB_DIR=$(switch_srcdir)/libs/amrwb
|
||||
AMRWB_BUILDDIR=$(switch_builddir)/libs/amrwb
|
||||
AMRWB_A=$(AMRWB_BUILDDIR)/libamrwb.a
|
||||
|
||||
mod_LTLIBRARIES = mod_amrwb.la
|
||||
mod_amrwb_la_SOURCES = mod_amrwb.c
|
||||
mod_amrwb_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_amrwb_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_amrwb_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
|
||||
if HAVE_AMRWB
|
||||
BUILT_SOURCES= $(AMRWB_A)
|
||||
mod_amrwb_la_CFLAGS += -I$(AMRWB_DIR)
|
||||
mod_amrwb_la_LIBADD += $(AMRWB_A)
|
||||
else
|
||||
mod_amrwb_la_CFLAGS += -DAMRWB_PASSTHROUGH
|
||||
endif
|
||||
|
||||
Loaded 100 of 546 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user