From 5f7e111f79dd1a965aa956da7495485f52b0a1cc Mon Sep 17 00:00:00 2001 From: Nimrod Astrahan Date: Tue, 27 Jan 2015 18:13:04 +0200 Subject: [PATCH 01/24] Fix source fraction always 0 in RTCP events Without the value for source fraction, applications relying on RTCP events for making changes to FS behaviour or even for logging get false information. With this change the value for source fraction is passed along in RTCP events correctly. To my current understanding, as the value for fraction in the RTCP packet is represented by 8 bits according to the spec, calling `ntohl` on it will always zero it out. Fixed by removing the call. FS-7203 #resolve --- src/switch_rtp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/switch_rtp.c b/src/switch_rtp.c index 4ad259cce3..d5dc6b0f79 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -6207,7 +6207,7 @@ SWITCH_DECLARE(switch_status_t) switch_rtcp_zerocopy_read_frame(switch_rtp_t *rt for (i = 0; i < (int)rtp_session->rtcp_recv_msg_p->header.count && i < MAX_REPORT_BLOCKS ; i++) { struct switch_rtcp_report_block* report = (struct switch_rtcp_report_block*) (rtp_session->rtcp_recv_msg_p->body + (sizeof(struct switch_rtcp_sr_head) + (i * sizeof(struct switch_rtcp_report_block)))); frame->reports[i].ssrc = ntohl(report->ssrc); - frame->reports[i].fraction = (uint8_t)ntohl(report->fraction); + frame->reports[i].fraction = report->fraction; frame->reports[i].lost = ntohl(report->lost); frame->reports[i].highest_sequence_number_received = ntohl(report->highest_sequence_number_received); frame->reports[i].jitter = ntohl(report->jitter); From 849e90ba733bfe0a2a380fdf26dbff263b3e67b2 Mon Sep 17 00:00:00 2001 From: Jyotshna Cherukuri Date: Wed, 11 Feb 2015 15:20:32 -0500 Subject: [PATCH 02/24] destroy erlang session elements when the outbound erlang processis stopped/terminated --- src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c b/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c index b1743eb716..0220964607 100644 --- a/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c +++ b/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c @@ -1508,6 +1508,9 @@ session_elem_t *attach_call_to_spawned_process(listener_t *listener, char *modul switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Timed out when waiting for outbound pid %s %s\n", hash, session_element->uuid_str); switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER); + /* Destroy erlang session elements when the outbound erlang process gets killed for some unknown reason */ + remove_session_elem_from_listener(listener, session_element); + destroy_session_elem(session_element); return NULL; } From 921f77668f39ee9a768c0515dba054f99cf0bd75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Artur=20Zaprza=C5=82a?= Date: Mon, 23 Feb 2015 11:18:57 +0100 Subject: [PATCH 03/24] FS-7306: fs_encode is sleeping to much - cleanup --- src/mod/applications/mod_spandsp/mod_spandsp_fax.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/mod/applications/mod_spandsp/mod_spandsp_fax.c b/src/mod/applications/mod_spandsp/mod_spandsp_fax.c index c2fc659187..4b5f94c4ac 100644 --- a/src/mod/applications/mod_spandsp/mod_spandsp_fax.c +++ b/src/mod/applications/mod_spandsp/mod_spandsp_fax.c @@ -138,7 +138,7 @@ static int add_pvt(pvt_t *pvt) { int r = 0; - if (t38_state_list.thread_running > 0) { + if (t38_state_list.thread_running == 1) { switch_mutex_lock(t38_state_list.mutex); pvt->next = t38_state_list.head; t38_state_list.head = pvt; @@ -190,18 +190,14 @@ static void *SWITCH_THREAD_FUNC timer_thread_run(switch_thread_t *thread, void * pvt_t *pvt; int samples = 160; int ms = 20; - int r = 0; if (switch_core_timer_init(&timer, "soft", ms, samples, NULL) != SWITCH_STATUS_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "timer init failed.\n"); - r = -1; + t38_state_list.thread_running = -1; goto end; } - switch_mutex_lock(t38_state_list.mutex); t38_state_list.thread_running = 1; - switch_mutex_unlock(t38_state_list.mutex); - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "FAX timer thread started.\n"); switch_mutex_lock(spandsp_globals.cond_mutex); @@ -231,13 +227,8 @@ static void *SWITCH_THREAD_FUNC timer_thread_run(switch_thread_t *thread, void * switch_mutex_unlock(spandsp_globals.cond_mutex); end: - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "FAX timer thread ended.\n"); - switch_mutex_lock(t38_state_list.mutex); - t38_state_list.thread_running = r; - switch_mutex_unlock(t38_state_list.mutex); - if (timer.timer_interface) { switch_core_timer_destroy(&timer); } From 3cd481820e0fc099cf2d39e1318017696ea43465 Mon Sep 17 00:00:00 2001 From: Chris Rienzo Date: Wed, 25 Feb 2015 09:43:38 -0500 Subject: [PATCH 04/24] FS-7323 #resolve #comment [mod_http_cache] added http_remove_cache API call to manually expire a cached URL. Added {refresh=true} parameter that can be prefixed to URL to force refresh when using http:// https:// file formats or the http_get API. Examples: http_remove_cache http://phono.com/audio/troporocks.mp3 http_get {refresh=true}http://phono.com/audio/troporocks.mp3 --- .../mod_http_cache/mod_http_cache.c | 67 ++++++++++++++++--- 1 file changed, 56 insertions(+), 11 deletions(-) diff --git a/src/mod/applications/mod_http_cache/mod_http_cache.c b/src/mod/applications/mod_http_cache/mod_http_cache.c index 8a7718ea49..7f65d7704e 100644 --- a/src/mod/applications/mod_http_cache/mod_http_cache.c +++ b/src/mod/applications/mod_http_cache/mod_http_cache.c @@ -1,6 +1,6 @@ /* * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * Copyright (C) 2005-2014, Anthony Minessale II + * Copyright (C) 2005-2015, Anthony Minessale II * * Version: MPL 1.1 * @@ -47,6 +47,7 @@ SWITCH_STANDARD_API(http_cache_get); SWITCH_STANDARD_API(http_cache_put); SWITCH_STANDARD_API(http_cache_tryget); SWITCH_STANDARD_API(http_cache_clear); +SWITCH_STANDARD_API(http_cache_remove); SWITCH_STANDARD_API(http_cache_prefetch); #define DOWNLOAD_NEEDED "download" @@ -192,7 +193,7 @@ struct url_cache { }; static url_cache_t gcache; -static char *url_cache_get(url_cache_t *cache, http_profile_t *profile, switch_core_session_t *session, const char *url, int download, switch_memory_pool_t *pool); +static char *url_cache_get(url_cache_t *cache, http_profile_t *profile, switch_core_session_t *session, const char *url, int download, int refresh, switch_memory_pool_t *pool); static switch_status_t url_cache_add(url_cache_t *cache, switch_core_session_t *session, cached_url_t *url); static void url_cache_remove(url_cache_t *cache, switch_core_session_t *session, cached_url_t *url); static void url_cache_remove_soft(url_cache_t *cache, switch_core_session_t *session, cached_url_t *url); @@ -574,10 +575,11 @@ static void url_cache_clear(url_cache_t *cache, switch_core_session_t *session) * @param session the (optional) session requesting the URL * @param url The URL * @param download If true, the file will be downloaded if it does not exist in the cache. + * @param refresh If true, existing cache entry is invalidated * @param pool The pool to use for allocating the filename * @return The filename or NULL if there is an error */ -static char *url_cache_get(url_cache_t *cache, http_profile_t *profile, switch_core_session_t *session, const char *url, int download, switch_memory_pool_t *pool) +static char *url_cache_get(url_cache_t *cache, http_profile_t *profile, switch_core_session_t *session, const char *url, int download, int refresh, switch_memory_pool_t *pool) { char *filename = NULL; cached_url_t *u = NULL; @@ -597,6 +599,10 @@ static char *url_cache_get(url_cache_t *cache, http_profile_t *profile, switch_c switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Cached URL file is missing.\n"); url_cache_remove_soft(cache, session, u); /* will get permanently deleted upon replacement */ u = NULL; + } else if (refresh) { + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Cached URL manually expired.\n"); + url_cache_remove_soft(cache, session, u); /* will get permanently deleted upon replacement */ + u = NULL; } } @@ -1122,7 +1128,7 @@ SWITCH_STANDARD_API(http_cache_get) profile = url_cache_http_profile_find(&gcache, switch_event_get_header(params, "profile")); } - filename = url_cache_get(&gcache, profile, session, url, 1, pool); + filename = url_cache_get(&gcache, profile, session, url, 1, params ? switch_true(switch_event_get_header(params, "refresh")) : SWITCH_FALSE, pool); if (filename) { stream->write_function(stream, "%s", filename); @@ -1151,7 +1157,6 @@ SWITCH_STANDARD_API(http_cache_tryget) switch_status_t status = SWITCH_STATUS_SUCCESS; switch_memory_pool_t *lpool = NULL; switch_memory_pool_t *pool = NULL; - http_profile_t *profile = NULL; char *filename; switch_event_t *params = NULL; char *url; @@ -1168,16 +1173,13 @@ SWITCH_STANDARD_API(http_cache_tryget) pool = lpool; } - /* parse params and get profile */ + /* parse params */ url = switch_core_strdup(pool, cmd); if (*url == '{') { switch_event_create_brackets(url, '{', '}', ',', ¶ms, &url, SWITCH_FALSE); } - if (params) { - profile = url_cache_http_profile_find(&gcache, switch_event_get_header(params, "profile")); - } - filename = url_cache_get(&gcache, profile, session, url, 0, pool); + filename = url_cache_get(&gcache, NULL, session, url, 0, params ? switch_true(switch_event_get_header(params, "refresh")) : SWITCH_FALSE, pool); if (filename) { if (!strcmp(DOWNLOAD_NEEDED, filename)) { stream->write_function(stream, "-ERR %s\n", DOWNLOAD_NEEDED); @@ -1282,6 +1284,48 @@ SWITCH_STANDARD_API(http_cache_clear) return SWITCH_STATUS_SUCCESS; } +#define HTTP_CACHE_REMOVE_SYNTAX "" +/** + * Invalidate a cached URL + */ +SWITCH_STANDARD_API(http_cache_remove) +{ + switch_memory_pool_t *lpool = NULL; + switch_memory_pool_t *pool = NULL; + switch_event_t *params = NULL; + char *url; + + if (zstr(cmd)) { + stream->write_function(stream, "USAGE: %s\n", HTTP_CACHE_REMOVE_SYNTAX); + return SWITCH_STATUS_SUCCESS; + } + + if (session) { + pool = switch_core_session_get_pool(session); + } else { + switch_core_new_memory_pool(&lpool); + pool = lpool; + } + + /* parse params */ + url = switch_core_strdup(pool, cmd); + if (*url == '{') { + switch_event_create_brackets(url, '{', '}', ',', ¶ms, &url, SWITCH_FALSE); + } + + url_cache_get(&gcache, NULL, session, url, 0, 1, pool); + stream->write_function(stream, "+OK\n"); + + if (lpool) { + switch_core_destroy_memory_pool(&lpool); + } + + if (params) { + switch_event_destroy(¶ms); + } + + return SWITCH_STATUS_SUCCESS; +} /** * Thread to prefetch URLs @@ -1524,7 +1568,7 @@ static switch_status_t http_cache_file_open(switch_file_handle_t *handle, const } else { /* READ = HTTP GET */ file_flags |= SWITCH_FILE_FLAG_READ; - context->local_path = url_cache_get(&gcache, context->profile, NULL, path, 1, handle->memory_pool); + context->local_path = url_cache_get(&gcache, context->profile, NULL, path, 1, handle->params ? switch_true(switch_event_get_header(handle->params, "refresh")) : 0, handle->memory_pool); if (!context->local_path) { return SWITCH_STATUS_FALSE; } @@ -1647,6 +1691,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_http_cache_load) SWITCH_ADD_API(api, "http_tryget", "HTTP GET from cache only", http_cache_tryget, HTTP_GET_SYNTAX); SWITCH_ADD_API(api, "http_put", "HTTP PUT", http_cache_put, HTTP_PUT_SYNTAX); SWITCH_ADD_API(api, "http_clear_cache", "Clear the cache", http_cache_clear, HTTP_CACHE_CLEAR_SYNTAX); + SWITCH_ADD_API(api, "http_remove_cache", "Remove URL from cache", http_cache_remove, HTTP_CACHE_REMOVE_SYNTAX); SWITCH_ADD_API(api, "http_prefetch", "Prefetch document in a background thread. Use http_get to get the prefetched document", http_cache_prefetch, HTTP_PREFETCH_SYNTAX); memset(&gcache, 0, sizeof(url_cache_t)); From 95937964205ea2ca873b443ea9ea99f507244830 Mon Sep 17 00:00:00 2001 From: Ryan Lantzer Date: Thu, 26 Feb 2015 08:21:26 -0600 Subject: [PATCH 05/24] FS-6758 and other related behavior, also change to answer behavior to mimic what users tend to expect from cisco phones. Updatd SKINNY on-hook action to hang up all calls on a device, except those in a short list of call states (or perform a blind transfer). Added a hook after completing the hangup operation to start ringing if there is an inbound call active on the device. Reorder received calls on skinny --- src/mod/endpoints/mod_skinny/mod_skinny.c | 83 ++++++++++++- src/mod/endpoints/mod_skinny/skinny_server.c | 116 ++++++++++++++----- 2 files changed, 171 insertions(+), 28 deletions(-) diff --git a/src/mod/endpoints/mod_skinny/mod_skinny.c b/src/mod/endpoints/mod_skinny/mod_skinny.c index 5925abebe4..5223a1409f 100644 --- a/src/mod/endpoints/mod_skinny/mod_skinny.c +++ b/src/mod/endpoints/mod_skinny/mod_skinny.c @@ -303,11 +303,16 @@ char * skinny_profile_find_session_uuid(skinny_profile_t *profile, listener_t *l call_id_condition = switch_mprintf("1=1"); } switch_assert(call_id_condition); + + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, + "Attempting to find active call with criteria (%s and %s and %s)\n", + device_condition, line_instance_condition, call_id_condition); + if((sql = switch_mprintf( "SELECT channel_uuid, line_instance " "FROM skinny_active_lines " "WHERE %s AND %s AND %s " - "ORDER BY call_state, channel_uuid", /* off hook first */ + "ORDER BY call_state, line_instance, channel_uuid", /* off hook first */ device_condition, line_instance_condition, call_id_condition ))) { skinny_execute_sql_callback(profile, profile->sql_mutex, sql, @@ -917,6 +922,79 @@ switch_status_t channel_on_destroy(switch_core_session_t *session) return SWITCH_STATUS_SUCCESS; } +struct skinny_ring_active_calls_helper { + private_t *tech_pvt; + listener_t *listener; +}; + +int skinny_ring_active_calls_callback(void *pArg, int argc, char **argv, char **columnNames) +{ + struct skinny_ring_active_calls_helper *helper = pArg; + switch_core_session_t *session; + + /* char *device_name = argv[0]; */ + /* uint32_t device_instance = atoi(argv[1]); */ + /* uint32_t position = atoi(argv[2]); */ + uint32_t line_instance = atoi(argv[3]); + /* char *label = argv[4]; */ + /* char *value = argv[5]; */ + /* char *caller_name = argv[6]; */ + uint32_t ring_on_idle = atoi(argv[7]); + /* uint32_t ring_on_active = atoi(argv[8]); */ + /* uint32_t busy_trigger = atoi(argv[9]); */ + /* char *forward_all = argv[10]; */ + /* char *forward_busy = argv[11]; */ + /* char *forward_noanswer = argv[12]; */ + /* uint32_t noanswer_duration = atoi(argv[13]); */ + /* char *channel_uuid = argv[14]; */ + uint32_t call_id = atoi(argv[15]); + /* uint32_t call_state = atoi(argv[16]); */ + + session = skinny_profile_find_session(helper->listener->profile, helper->listener, &line_instance, call_id); + + if(session) { + /* After going on-hook, start ringing if there is an active call in the SKINNY_RING_IN state */ + skinny_log_l(helper->listener, SWITCH_LOG_DEBUG, "Start Ringer for active Call ID (%d), Line Instance (%d), Line State (%d).\n", call_id, line_instance, skinny_line_get_state(helper->listener,line_instance, call_id)); + + send_set_lamp(helper->listener, SKINNY_BUTTON_LINE, line_instance, SKINNY_LAMP_BLINK); + + if ( ring_on_idle ) { + send_set_ringer(helper->listener, SKINNY_RING_INSIDE, SKINNY_RING_FOREVER, line_instance, call_id); + } else { + send_set_ringer(helper->listener, SKINNY_RING_FLASHONLY, SKINNY_RING_FOREVER, line_instance, call_id); + } + + switch_core_session_rwunlock(session); + } + + return 0; +} + +switch_status_t skinny_ring_active_calls(listener_t *listener) +/* Look for all SKINNY active calls in the SKINNY_RING_IN state and tell them to start ringing */ +{ + struct skinny_ring_active_calls_helper helper = {0}; + char *sql; + + helper.listener = listener; + + if ((sql = switch_mprintf( + "SELECT skinny_lines.*, channel_uuid, call_id, call_state " + "FROM skinny_active_lines " + "INNER JOIN skinny_lines " + "ON skinny_active_lines.device_name = skinny_lines.device_name " + "AND skinny_active_lines.device_instance = skinny_lines.device_instance " + "AND skinny_active_lines.line_instance = skinny_lines.line_instance " + "WHERE skinny_lines.device_name='%s' AND skinny_lines.device_instance=%d " + "AND (call_state=%d)", + listener->device_name, listener->device_instance, SKINNY_RING_IN))) { + skinny_execute_sql_callback(listener->profile, listener->profile->sql_mutex, sql, skinny_ring_active_calls_callback, &helper); + switch_safe_free(sql); + } + + return SWITCH_STATUS_SUCCESS; +} + struct channel_on_hangup_helper { private_t *tech_pvt; switch_call_cause_t cause; @@ -1002,6 +1080,9 @@ int channel_on_hangup_callback(void *pArg, int argc, char **argv, char **columnN send_set_speaker_mode(listener, SKINNY_SPEAKER_OFF); } send_set_ringer(listener, SKINNY_RING_OFF, SKINNY_RING_FOREVER, line_instance, call_id); + + /* After hanging up this call, activate the ringer for any other active incoming calls */ + skinny_ring_active_calls(listener); } return 0; } diff --git a/src/mod/endpoints/mod_skinny/skinny_server.c b/src/mod/endpoints/mod_skinny/skinny_server.c index 5a581de463..84d70d554a 100644 --- a/src/mod/endpoints/mod_skinny/skinny_server.c +++ b/src/mod/endpoints/mod_skinny/skinny_server.c @@ -112,6 +112,8 @@ switch_status_t skinny_create_incoming_session(listener_t *listener, uint32_t *l skinny_line_get(listener, *line_instance_p, &button); + skinny_log_l(listener, SWITCH_LOG_INFO, "Attempting to create incoming session on Line %d\n", *line_instance_p); + if (!button || !button->shortname[0]) { skinny_log_l(listener, SWITCH_LOG_CRIT, "Line %d not found on device\n", *line_instance_p); goto error; @@ -1075,6 +1077,58 @@ switch_status_t skinny_hold_active_calls(listener_t *listener) return SWITCH_STATUS_SUCCESS; } +struct skinny_hangup_active_calls_helper { + listener_t *listener; +}; + +int skinny_hangup_active_calls_callback(void *pArg, int argc, char **argv, char **columnNames) +{ + struct skinny_hangup_active_calls_helper *helper = pArg; + switch_core_session_t *session; + + /* char *device_name = argv[0]; */ + /* uint32_t device_instance = atoi(argv[1]); */ + /* uint32_t position = atoi(argv[2]); */ + uint32_t line_instance = atoi(argv[3]); + /* char *label = argv[4]; */ + /* char *value = argv[5]; */ + /* char *caller_name = argv[6]; */ + /* uint32_t ring_on_idle = atoi(argv[7]); */ + /* uint32_t ring_on_active = atoi(argv[8]); */ + /* uint32_t busy_trigger = atoi(argv[9]); */ + /* char *forward_all = argv[10]; */ + /* char *forward_busy = argv[11]; */ + /* char *forward_noanswer = argv[12]; */ + /* uint32_t noanswer_duration = atoi(argv[13]); */ + /* char *channel_uuid = argv[14]; */ + uint32_t call_id = atoi(argv[15]); + uint32_t call_state = atoi(argv[16]); + + session = skinny_profile_find_session(helper->listener->profile, helper->listener, &line_instance, call_id); + + if(session) { + switch_channel_t *channel = NULL; + private_t *tech_pvt = NULL; + + channel = switch_core_session_get_channel(session); + tech_pvt = switch_core_session_get_private(session); + + if (tech_pvt->transfer_from_call_id) { /* Perform a blind transfer, instead of hanging up */ + skinny_session_transfer(session, helper->listener, line_instance); + } else { + /* Hangup on an active call that is not in one of the states listed */ + if ((call_state != SKINNY_ON_HOOK)&&(call_state != SKINNY_HOLD)&&(call_state != SKINNY_CALL_WAITING)&&(call_state != SKINNY_CALL_PARK)&&(call_state != SKINNY_IN_USE_REMOTELY)&&(call_state != SKINNY_RING_IN)) { + skinny_log_l(helper->listener, SWITCH_LOG_DEBUG, "Hangup Line Instance (%d), Call ID (%d), Line State (%d)\n", line_instance, tech_pvt->call_id, skinny_line_get_state(helper->listener,line_instance, call_id)); + switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING); + } + } + + switch_core_session_rwunlock(session); + } + + return 0; +} + /*****************************************************************************/ /* SKINNY MESSAGE HANDLERS */ /*****************************************************************************/ @@ -1537,18 +1591,13 @@ switch_status_t skinny_handle_stimulus_message(listener_t *listener, skinny_mess switch_status_t skinny_handle_off_hook_message(listener_t *listener, skinny_message_t *request) { - uint32_t line_instance = 1; + uint32_t line_instance = 0; uint32_t call_id = 0; switch_core_session_t *session = NULL; private_t *tech_pvt = NULL; uint32_t line_state; - if(skinny_check_data_length_soft(request, sizeof(request->data.off_hook))) { - if (request->data.off_hook.line_instance > 0) { - line_instance = request->data.off_hook.line_instance; - } - call_id = request->data.off_hook.call_id; - } + skinny_log_l(listener, SWITCH_LOG_INFO, "Attempting to handle off hook message for call_id %d and line_instance %d.\n", call_id, line_instance); session = skinny_profile_find_session(listener->profile, listener, &line_instance, call_id); @@ -1557,6 +1606,18 @@ switch_status_t skinny_handle_off_hook_message(listener_t *listener, skinny_mess if(session && line_state == SKINNY_RING_IN ) { /*answering a call */ skinny_session_answer(session, listener, line_instance); } else { /* start a new call */ + + /* If we went off hook to make a call, establish the call with the appropriate line instance + I'm not sure this actually makes any sense - plain off-hook with speaker or handset would + always use the first line on device */ + + if(skinny_check_data_length_soft(request, sizeof(request->data.off_hook))) { + if (request->data.off_hook.line_instance > 0) { + line_instance = request->data.off_hook.line_instance; + } + call_id = request->data.off_hook.call_id; + } + skinny_create_incoming_session(listener, &line_instance, &session); if ( ! session ) { skinny_log_l_msg(listener, SWITCH_LOG_CRIT, "Unable to handle off hook message, could not create session.\n"); @@ -1580,34 +1641,31 @@ switch_status_t skinny_handle_on_hook_message(listener_t *listener, skinny_messa switch_status_t status = SWITCH_STATUS_SUCCESS; uint32_t line_instance = 0; uint32_t call_id = 0; - switch_core_session_t *session = NULL; + struct skinny_hangup_active_calls_helper helper = {0}; + char *sql; if(skinny_check_data_length_soft(request, sizeof(request->data.on_hook))) { line_instance = request->data.on_hook.line_instance; call_id = request->data.on_hook.call_id; } + skinny_log_l(listener, SWITCH_LOG_INFO, "Attempting to handle on hook message for Call ID (%d), Line Instance (%d).\n", call_id, line_instance); - session = skinny_profile_find_session(listener->profile, listener, &line_instance, call_id); + /* Walk through all active calls for this device. The callback should hangup any active calls that should be terminated when the device goes on-hook */ - if(session) { - switch_channel_t *channel = NULL; - private_t *tech_pvt = NULL; + helper.listener = listener; - channel = switch_core_session_get_channel(session); - tech_pvt = switch_core_session_get_private(session); - - if (tech_pvt->transfer_from_call_id) { /* blind transfer */ - status = skinny_session_transfer(session, listener, line_instance); - } else { - if (skinny_line_get_state(listener, line_instance, call_id) != SKINNY_IN_USE_REMOTELY) { - switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING); - } - } - } - - if(session) { - switch_core_session_rwunlock(session); - } + if ((sql = switch_mprintf( + "SELECT skinny_lines.*, channel_uuid, call_id, call_state " + "FROM skinny_active_lines " + "INNER JOIN skinny_lines " + "ON skinny_active_lines.device_name = skinny_lines.device_name " + "AND skinny_active_lines.device_instance = skinny_lines.device_instance " + "AND skinny_active_lines.line_instance = skinny_lines.line_instance " + "WHERE skinny_lines.device_name='%s' AND skinny_lines.device_instance=%d", + listener->device_name, listener->device_instance))) { + skinny_execute_sql_callback(listener->profile, listener->profile->sql_mutex, sql, skinny_hangup_active_calls_callback, &helper); + switch_safe_free(sql); + } return status; } @@ -2137,6 +2195,10 @@ switch_status_t skinny_handle_soft_key_event_message(listener_t *listener, skinn } break; case SOFTKEY_ANSWER: + /* find first ringing line - ccm behavior */ + line_instance = 0; + call_id = 0; + session = skinny_profile_find_session(listener->profile, listener, &line_instance, call_id); if(session) { status = skinny_session_answer(session, listener, line_instance); From 66486713b0eca7df5879ddf4250a3e21e3e21810 Mon Sep 17 00:00:00 2001 From: Chris Rienzo Date: Thu, 12 Feb 2015 15:48:59 -0500 Subject: [PATCH 06/24] FS-7273 Add support for build server to optionally specify revision when packaging RPM. common.sh optionally accepts revision number and sets version in freeswitch-config-rayo.spec config-rayo.sh updated to be consistent with rpmbuilder.sh rpmbuilder.sh optionally accepts revision number src_tarball.sh will now produce freeswitch.spec and freeswitch-config-rayo.spec as artifacts. --- freeswitch-config-rayo.spec | 6 +++--- scripts/ci/common.sh | 26 +++++++++++++++++++++++++- scripts/ci/config-rayo.sh | 36 ++++++++++++++++++++++++++++-------- scripts/ci/rpmbuilder.sh | 19 +++++++++++++++---- scripts/ci/src_tarball.sh | 11 ++++++++--- 5 files changed, 79 insertions(+), 19 deletions(-) diff --git a/freeswitch-config-rayo.spec b/freeswitch-config-rayo.spec index ee56e44893..c9abfaf634 100644 --- a/freeswitch-config-rayo.spec +++ b/freeswitch-config-rayo.spec @@ -1,7 +1,7 @@ ###################################################################################################################### # # freeswitch-config-rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application -# Copyright (C) 2013-2014, Grasshopper +# Copyright (C) 2013-2015, Grasshopper # # Version: MPL 1.1 # @@ -28,8 +28,8 @@ # ###################################################################################################################### -%define version %{VERSION_NUMBER} -%define release %{BUILD_NUMBER} +%define version 1.5.16 +%define release 1 %define fsname freeswitch diff --git a/scripts/ci/common.sh b/scripts/ci/common.sh index 535044ca18..6158356a1c 100755 --- a/scripts/ci/common.sh +++ b/scripts/ci/common.sh @@ -116,14 +116,38 @@ set_fs_ver () { mv configure.ac.$$ configure.ac fi - sed -e "s|\(%define version \).*|\1$major.$minor.$micro|" \ + local rpm_version + if [ -n "$rev" ]; then + rpm_version="$major.$minor.$micro.$rev" + else + rpm_version="$major.$minor.$micro" + fi + + sed -e "s|\(%define version \).*|\1$rpm_version|" \ freeswitch.spec > freeswitch.spec.$$ mv freeswitch.spec.$$ freeswitch.spec + sed -e "s|\(%define version \).*|\1$rpm_version|" \ + freeswitch-config-rayo.spec > freeswitch-config-rayo.spec.$$ + mv freeswitch-config-rayo.spec.$$ freeswitch-config-rayo.spec + #%define version 1.5.16 } +set_fs_release () { + local release="$1" + if [ -n "$release" ]; then + sed -e "s|\(%define release \).*|\1$release|" \ + freeswitch.spec > freeswitch.spec.$$ + mv freeswitch.spec.$$ freeswitch.spec + + sed -e "s|\(%define release \).*|\1$release|" \ + freeswitch-config-rayo.spec > freeswitch-config-rayo.spec.$$ + mv freeswitch-config-rayo.spec.$$ freeswitch-config-rayo.spec + fi +} + gnuize () { ./bootstrap.sh mv bootstrap.sh rebootstrap.sh diff --git a/scripts/ci/config-rayo.sh b/scripts/ci/config-rayo.sh index 119e01ea96..54b77f81ca 100755 --- a/scripts/ci/config-rayo.sh +++ b/scripts/ci/config-rayo.sh @@ -1,19 +1,39 @@ #!/bin/sh ##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*- -src_repo="$(pwd)" +sdir="." +[ -n "${0%/*}" ] && sdir="${0%/*}" +. $sdir/common.sh -if [ ! -d .git ]; then - echo "error: must be run from within the top level of a FreeSWITCH git tree." 1>&2 - exit 1; +check_pwd +check_input_ver_build $@ +eval $(parse_version "$1") + +if [ -n "$rev" ]; then + dst_name="freeswitch-$cmajor.$cminor.$cmicro.$rev" +else + dst_name="freeswitch-$cmajor.$cminor.$cmicro" +fi +dst_parent="/tmp/" +dst_dir="/tmp/$dst_name" +release="1" +if [ $# -gt 1 ]; then + release="$2" fi -rpmbuild --define "VERSION_NUMBER $1" \ - --define "BUILD_NUMBER $2" \ - --define "_topdir %(pwd)/rpmbuild" \ +(mkdir -p rpmbuild && cd rpmbuild && mkdir -p SOURCES BUILD BUILDROOT i386 x86_64 SPECS) + +cd $src_repo +cp -a src_dist/*.spec rpmbuild/SPECS/ || true +cp -a src_dist/* rpmbuild/SOURCES/ || true +cd rpmbuild/SPECS +set_fs_release "$release" +cd ../../ + +rpmbuild --define "_topdir %(pwd)/rpmbuild" \ --define "_rpmdir %{_topdir}" \ --define "_srcrpmdir %{_topdir}" \ - -ba freeswitch-config-rayo.spec + -ba rpmbuild/SPECS/freeswitch-config-rayo.spec mkdir -p $src_repo/RPMS mv $src_repo/rpmbuild/*/freeswitch-config-rayo*.rpm $src_repo/RPMS/. diff --git a/scripts/ci/rpmbuilder.sh b/scripts/ci/rpmbuilder.sh index 894d28e162..28c00931cf 100755 --- a/scripts/ci/rpmbuilder.sh +++ b/scripts/ci/rpmbuilder.sh @@ -8,23 +8,34 @@ sdir="." check_pwd check_input_ver_build $@ eval $(parse_version "$1") -build="$2" -dst_name="freeswitch-$cmajor.$cminor.$cmicro" +if [ -n "$rev" ]; then + dst_name="freeswitch-$cmajor.$cminor.$cmicro.$rev" +else + dst_name="freeswitch-$cmajor.$cminor.$cmicro" +fi dst_parent="/tmp/" dst_dir="/tmp/$dst_name" +release="1" +if [ $# -gt 1 ]; then + release="$2" +fi (mkdir -p rpmbuild && cd rpmbuild && mkdir -p SOURCES BUILD BUILDROOT i386 x86_64 SPECS) cd $src_repo +cp -a src_dist/*.spec rpmbuild/SPECS/ || true cp -a src_dist/* rpmbuild/SOURCES/ || true +cd rpmbuild/SPECS +set_fs_release "$release" +cd ../../ rpmbuild --define "_topdir %(pwd)/rpmbuild" \ --define "_rpmdir %{_topdir}" \ --define "_srcrpmdir %{_topdir}" \ - -ba freeswitch.spec + -ba rpmbuild/SPECS/freeswitch.spec -mkdir $src_repo/RPMS +mkdir -p $src_repo/RPMS mv $src_repo/rpmbuild/*/*.rpm $src_repo/RPMS/. cat 1>&2 < Date: Tue, 3 Mar 2015 12:19:41 -0600 Subject: [PATCH 07/24] FS-7149 #resolved #comment add windows support for 2.0 --- libs/win32/Download FLITE.2010.vcxproj | 12 +- libs/win32/Download FLITE.2012.vcxproj | 12 +- libs/win32/flite/flite.2010.vcxproj | 446 +++++++++---------- libs/win32/flite/flite.2010.vcxproj.filters | 428 +++++++++---------- libs/win32/flite/flite.2012.vcxproj | 448 ++++++++++---------- libs/win32/flite/flite.2012.vcxproj.filters | 428 +++++++++---------- 6 files changed, 887 insertions(+), 887 deletions(-) diff --git a/libs/win32/Download FLITE.2010.vcxproj b/libs/win32/Download FLITE.2010.vcxproj index d7690645b0..b8deca0e06 100644 --- a/libs/win32/Download FLITE.2010.vcxproj +++ b/libs/win32/Download FLITE.2010.vcxproj @@ -67,15 +67,15 @@ Document Downloading Flite. - if not exist "$(ProjectDir)..\flite-1.5.4" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/flite-1.5.4-current.tar.bz2 "$(ProjectDir).." -if exist "$(ProjectDir)..\flite-1.5.4-current" move "$(ProjectDir)..\flite-1.5.4-current" "$(ProjectDir)..\flite-1.5.4" + if not exist "$(ProjectDir)..\flite-2.0.0" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/flite-2.0.0-release.tar.bz2 "$(ProjectDir).." +if exist "$(ProjectDir)..\flite-2.0.0-release" move "$(ProjectDir)..\flite-2.0.0-release" "$(ProjectDir)..\flite-2.0.0" - $(ProjectDir)..\flite-1.5.4;%(Outputs) + $(ProjectDir)..\flite-2.0.0;%(Outputs) Downloading Flite. - if not exist "$(ProjectDir)..\flite-1.5.4" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/flite-1.5.4-current.tar.bz2 "$(ProjectDir).." -if exist "$(ProjectDir)..\flite-1.5.4-current" move "$(ProjectDir)..\flite-1.5.4-current" "$(ProjectDir)..\flite-1.5.4" + if not exist "$(ProjectDir)..\flite-2.0.0" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/flite-2.0.0-release.tar.bz2 "$(ProjectDir).." +if exist "$(ProjectDir)..\flite-2.0.0-release" move "$(ProjectDir)..\flite-2.0.0-release" "$(ProjectDir)..\flite-2.0.0" - $(ProjectDir)..\flite-1.5.4;%(Outputs) + $(ProjectDir)..\flite-2.0.0;%(Outputs) diff --git a/libs/win32/Download FLITE.2012.vcxproj b/libs/win32/Download FLITE.2012.vcxproj index eea3006edf..bcb056f5dc 100644 --- a/libs/win32/Download FLITE.2012.vcxproj +++ b/libs/win32/Download FLITE.2012.vcxproj @@ -69,15 +69,15 @@ Document Downloading Flite. - if not exist "$(ProjectDir)..\flite-1.5.4" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/flite-1.5.4-current.tar.bz2 "$(ProjectDir).." -if exist "$(ProjectDir)..\flite-1.5.4-current" move "$(ProjectDir)..\flite-1.5.4-current" "$(ProjectDir)..\flite-1.5.4" + if not exist "$(ProjectDir)..\flite-2.0.0" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/flite-2.0.0-release.tar.bz2 "$(ProjectDir).." +if exist "$(ProjectDir)..\flite-2.0.0-release" move "$(ProjectDir)..\flite-2.0.0-release" "$(ProjectDir)..\flite-2.0.0" - $(ProjectDir)..\flite-1.5.4;%(Outputs) + $(ProjectDir)..\flite-2.0.0;%(Outputs) Downloading Flite. - if not exist "$(ProjectDir)..\flite-1.5.4" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/flite-1.5.4-current.tar.bz2 "$(ProjectDir).." -if exist "$(ProjectDir)..\flite-1.5.4-current" move "$(ProjectDir)..\flite-1.5.4-current" "$(ProjectDir)..\flite-1.5.4" + if not exist "$(ProjectDir)..\flite-2.0.0" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/flite-2.0.0-release.tar.bz2 "$(ProjectDir).." +if exist "$(ProjectDir)..\flite-2.0.0-release" move "$(ProjectDir)..\flite-2.0.0-release" "$(ProjectDir)..\flite-2.0.0" - $(ProjectDir)..\flite-1.5.4;%(Outputs) + $(ProjectDir)..\flite-2.0.0;%(Outputs) diff --git a/libs/win32/flite/flite.2010.vcxproj b/libs/win32/flite/flite.2010.vcxproj index aff892f095..05df1b7165 100644 --- a/libs/win32/flite/flite.2010.vcxproj +++ b/libs/win32/flite/flite.2010.vcxproj @@ -21,7 +21,7 @@ flite {0AD1177E-1FD8-4643-9391-431467A11084} - flite-1.5.4 + flite-2.0.0 @@ -68,8 +68,8 @@ Disabled - ..\..\flite-1.5.4\include;..\..\flite-1.5.4\lang\usenglish;..\..\flite-1.5.4\lang\cmulex;%(AdditionalIncludeDirectories) - CST_AUDIO_NONE=1;NO_UNION_INITIALIZATION=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\flite-2.0.0\include;..\..\flite-2.0.0\lang\usenglish;..\..\flite-2.0.0\lang\cmulex;%(AdditionalIncludeDirectories) + CST_AUDIO_NONE=1;NO_UNION_INITIALIZATION=1;_CRT_SECURE_NO_WARNINGS;inline=__inline;snprintf=_snprintf;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -83,8 +83,8 @@ Disabled - ..\..\flite-1.5.4\include;..\..\flite-1.5.4\lang\usenglish;..\..\flite-1.5.4\lang\cmulex;%(AdditionalIncludeDirectories) - CST_AUDIO_NONE=1;NO_UNION_INITIALIZATION=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\flite-2.0.0\include;..\..\flite-2.0.0\lang\usenglish;..\..\flite-2.0.0\lang\cmulex;%(AdditionalIncludeDirectories) + CST_AUDIO_NONE=1;NO_UNION_INITIALIZATION=1;_CRT_SECURE_NO_WARNINGS;inline=__inline;snprintf=_snprintf;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -96,8 +96,8 @@ MaxSpeed true - ..\..\flite-1.5.4\include;..\..\flite-1.5.4\lang\usenglish;..\..\flite-1.5.4\lang\cmulex;%(AdditionalIncludeDirectories) - CST_AUDIO_NONE=1;NO_UNION_INITIALIZATION=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\flite-2.0.0\include;..\..\flite-2.0.0\lang\usenglish;..\..\flite-2.0.0\lang\cmulex;%(AdditionalIncludeDirectories) + CST_AUDIO_NONE=1;NO_UNION_INITIALIZATION=1;_CRT_SECURE_NO_WARNINGS;inline=__inline;snprintf=_snprintf;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -112,8 +112,8 @@ MaxSpeed true - ..\..\flite-1.5.4\include;..\..\flite-1.5.4\lang\usenglish;..\..\flite-1.5.4\lang\cmulex;%(AdditionalIncludeDirectories) - CST_AUDIO_NONE=1;NO_UNION_INITIALIZATION=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\flite-2.0.0\include;..\..\flite-2.0.0\lang\usenglish;..\..\flite-2.0.0\lang\cmulex;%(AdditionalIncludeDirectories) + CST_AUDIO_NONE=1;NO_UNION_INITIALIZATION=1;_CRT_SECURE_NO_WARNINGS;inline=__inline;snprintf=_snprintf;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -122,222 +122,222 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/win32/flite/flite.2010.vcxproj.filters b/libs/win32/flite/flite.2010.vcxproj.filters index 979f772242..566f7a7158 100644 --- a/libs/win32/flite/flite.2010.vcxproj.filters +++ b/libs/win32/flite/flite.2010.vcxproj.filters @@ -29,648 +29,648 @@ - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + voices\slt - + voices\slt - + voices\slt - + voices\slt - + voices\slt - + voices\slt - + voices\slt - + voices\rms - + voices\rms - + voices\rms - + voices\rms - + voices\rms - + voices\rms - + voices\rms - + voices\rms - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + voices\awb - + voices\awb - + voices\awb - + voices\awb - + voices\awb - + voices\awb - + voices\awb - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + voices\awb - + voices\awb - + voices\awb - + voices\rms - + voices\rms - + voices\rms - + voices\slt - + voices\slt - + voices\slt - + voices\kal - + voices\kal - + voices\kal - + voices\kal - + voices\kal - + voices\kal - + voices\kal16 - + voices\kal16 - + voices\kal16 - + voices\kal16 - + voices\kal16 - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Header Files - + Header Files - + Header Files - + voices\slt - + voices\slt - + voices\slt - + voices\slt - + voices\rms - + voices\rms - + voices\rms - + voices\rms - + voices\rms - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + voices\awb - + voices\awb - + voices\awb - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + voices\awb - + voices\awb - + voices\awb - + voices\rms - + voices\rms - + voices\slt - + voices\slt - + voices\kal - + voices\kal16 - + Header Files - + Header Files diff --git a/libs/win32/flite/flite.2012.vcxproj b/libs/win32/flite/flite.2012.vcxproj index d69896fd68..de1fd32959 100644 --- a/libs/win32/flite/flite.2012.vcxproj +++ b/libs/win32/flite/flite.2012.vcxproj @@ -21,7 +21,7 @@ flite {0AD1177E-1FD8-4643-9391-431467A11084} - flite-1.5.4 + flite-2.0.0 @@ -72,8 +72,8 @@ Disabled - ..\..\flite-1.5.4\include;..\..\flite-1.5.4\lang\usenglish;..\..\flite-1.5.4\lang\cmulex;%(AdditionalIncludeDirectories) - CST_AUDIO_NONE=1;NO_UNION_INITIALIZATION=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\flite-2.0.0\include;..\..\flite-2.0.0\lang\usenglish;..\..\flite-2.0.0\lang\cmulex;%(AdditionalIncludeDirectories) + CST_AUDIO_NONE=1;NO_UNION_INITIALIZATION=1;_CRT_SECURE_NO_WARNINGS;inline=__inline;snprintf=_snprintf;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -87,8 +87,8 @@ Disabled - ..\..\flite-1.5.4\include;..\..\flite-1.5.4\lang\usenglish;..\..\flite-1.5.4\lang\cmulex;%(AdditionalIncludeDirectories) - CST_AUDIO_NONE=1;NO_UNION_INITIALIZATION=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\flite-2.0.0\include;..\..\flite-2.0.0\lang\usenglish;..\..\flite-2.0.0\lang\cmulex;%(AdditionalIncludeDirectories) + CST_AUDIO_NONE=1;NO_UNION_INITIALIZATION=1;_CRT_SECURE_NO_WARNINGS;inline=__inline;snprintf=_snprintf;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -100,8 +100,8 @@ MaxSpeed true - ..\..\flite-1.5.4\include;..\..\flite-1.5.4\lang\usenglish;..\..\flite-1.5.4\lang\cmulex;%(AdditionalIncludeDirectories) - CST_AUDIO_NONE=1;NO_UNION_INITIALIZATION=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\flite-2.0.0\include;..\..\flite-2.0.0\lang\usenglish;..\..\flite-2.0.0\lang\cmulex;%(AdditionalIncludeDirectories) + CST_AUDIO_NONE=1;NO_UNION_INITIALIZATION=1;_CRT_SECURE_NO_WARNINGS;inline=__inline;snprintf=_snprintf;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -116,8 +116,8 @@ MaxSpeed true - ..\..\flite-1.5.4\include;..\..\flite-1.5.4\lang\usenglish;..\..\flite-1.5.4\lang\cmulex;%(AdditionalIncludeDirectories) - CST_AUDIO_NONE=1;NO_UNION_INITIALIZATION=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\flite-2.0.0\include;..\..\flite-2.0.0\lang\usenglish;..\..\flite-2.0.0\lang\cmulex;%(AdditionalIncludeDirectories) + CST_AUDIO_NONE=1;NO_UNION_INITIALIZATION=1;_CRT_SECURE_NO_WARNINGS;inline=__inline;snprintf=_snprintf;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -126,222 +126,222 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -352,4 +352,4 @@ - + \ No newline at end of file diff --git a/libs/win32/flite/flite.2012.vcxproj.filters b/libs/win32/flite/flite.2012.vcxproj.filters index 979f772242..566f7a7158 100644 --- a/libs/win32/flite/flite.2012.vcxproj.filters +++ b/libs/win32/flite/flite.2012.vcxproj.filters @@ -29,648 +29,648 @@ - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + voices\slt - + voices\slt - + voices\slt - + voices\slt - + voices\slt - + voices\slt - + voices\slt - + voices\rms - + voices\rms - + voices\rms - + voices\rms - + voices\rms - + voices\rms - + voices\rms - + voices\rms - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + voices\awb - + voices\awb - + voices\awb - + voices\awb - + voices\awb - + voices\awb - + voices\awb - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + voices\awb - + voices\awb - + voices\awb - + voices\rms - + voices\rms - + voices\rms - + voices\slt - + voices\slt - + voices\slt - + voices\kal - + voices\kal - + voices\kal - + voices\kal - + voices\kal - + voices\kal - + voices\kal16 - + voices\kal16 - + voices\kal16 - + voices\kal16 - + voices\kal16 - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Header Files - + Header Files - + Header Files - + voices\slt - + voices\slt - + voices\slt - + voices\slt - + voices\rms - + voices\rms - + voices\rms - + voices\rms - + voices\rms - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + voices\awb - + voices\awb - + voices\awb - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + voices\awb - + voices\awb - + voices\awb - + voices\rms - + voices\rms - + voices\slt - + voices\slt - + voices\kal - + voices\kal16 - + Header Files - + Header Files From 38a35c26d861a824a07447a76a04cd9a57a303cf Mon Sep 17 00:00:00 2001 From: Emets Vladimir Date: Tue, 3 Mar 2015 23:45:15 +0500 Subject: [PATCH 08/24] FS-7339: create views basic_calls and detailed_calls after create table calls --- src/switch_core_sqldb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/switch_core_sqldb.c b/src/switch_core_sqldb.c index 2a73aeb95a..06566d7c4e 100644 --- a/src/switch_core_sqldb.c +++ b/src/switch_core_sqldb.c @@ -3429,9 +3429,9 @@ switch_status_t switch_core_sqldb_start(switch_memory_pool_t *pool, switch_bool_ int result = 0; switch_cache_db_test_reactive(sql_manager.dbh, "select call_uuid, read_bit_rate, sent_callee_name, initial_cid_name, initial_cid_num, initial_ip_addr, initial_dest, initial_dialplan, initial_context from channels", "DROP TABLE channels", create_channels_sql); - switch_cache_db_test_reactive(sql_manager.dbh, "select * from detailed_calls where sent_callee_name=''", "DROP VIEW detailed_calls", detailed_calls_sql); - switch_cache_db_test_reactive(sql_manager.dbh, "select * from basic_calls where sent_callee_name=''", "DROP VIEW basic_calls", basic_calls_sql); switch_cache_db_test_reactive(sql_manager.dbh, "select call_uuid from calls", "DROP TABLE calls", create_calls_sql); + switch_cache_db_test_reactive(sql_manager.dbh, "select * from basic_calls where sent_callee_name=''", "DROP VIEW basic_calls", basic_calls_sql); + switch_cache_db_test_reactive(sql_manager.dbh, "select * from detailed_calls where sent_callee_name=''", "DROP VIEW detailed_calls", detailed_calls_sql); if (runtime.odbc_dbtype == DBTYPE_DEFAULT) { switch_cache_db_test_reactive(sql_manager.dbh, "delete from registrations where reg_user=''", "DROP TABLE registrations", create_registrations_sql); From e338b8865b86537d9997074dc44165ee201915d5 Mon Sep 17 00:00:00 2001 From: Chris Rienzo Date: Wed, 4 Mar 2015 09:06:10 -0500 Subject: [PATCH 09/24] FS-7346 #resolve #comment update mod_mongo driver to 1.1.0 --- conf/vanilla/autoload_configs/mongo.conf.xml | 10 ++-------- freeswitch.spec | 2 +- src/mod/applications/mod_mongo/Makefile.am | 2 +- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/conf/vanilla/autoload_configs/mongo.conf.xml b/conf/vanilla/autoload_configs/mongo.conf.xml index 72fffafbb7..5adf148e7d 100644 --- a/conf/vanilla/autoload_configs/mongo.conf.xml +++ b/conf/vanilla/autoload_configs/mongo.conf.xml @@ -1,15 +1,9 @@ - - - - + + + + + + diff --git a/conf/minimal/autoload_configs/cdr_csv.conf.xml b/conf/minimal/autoload_configs/cdr_csv.conf.xml new file mode 100644 index 0000000000..a4dd837275 --- /dev/null +++ b/conf/minimal/autoload_configs/cdr_csv.conf.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/conf/minimal/autoload_configs/conference.conf.xml b/conf/minimal/autoload_configs/conference.conf.xml new file mode 100644 index 0000000000..3a55f7f436 --- /dev/null +++ b/conf/minimal/autoload_configs/conference.conf.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/conf/minimal/autoload_configs/console.conf.xml b/conf/minimal/autoload_configs/console.conf.xml new file mode 100644 index 0000000000..0c3345d950 --- /dev/null +++ b/conf/minimal/autoload_configs/console.conf.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/conf/minimal/autoload_configs/db.conf.xml b/conf/minimal/autoload_configs/db.conf.xml new file mode 100644 index 0000000000..712fdcce35 --- /dev/null +++ b/conf/minimal/autoload_configs/db.conf.xml @@ -0,0 +1,3 @@ + + + diff --git a/conf/minimal/autoload_configs/event_socket.conf.xml b/conf/minimal/autoload_configs/event_socket.conf.xml new file mode 100644 index 0000000000..112124c11d --- /dev/null +++ b/conf/minimal/autoload_configs/event_socket.conf.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/conf/minimal/autoload_configs/logfile.conf.xml b/conf/minimal/autoload_configs/logfile.conf.xml new file mode 100644 index 0000000000..55e010cc87 --- /dev/null +++ b/conf/minimal/autoload_configs/logfile.conf.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + diff --git a/conf/minimal/autoload_configs/modules.conf.xml b/conf/minimal/autoload_configs/modules.conf.xml new file mode 100644 index 0000000000..37ece9d202 --- /dev/null +++ b/conf/minimal/autoload_configs/modules.conf.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/conf/minimal/autoload_configs/sofia.conf.xml b/conf/minimal/autoload_configs/sofia.conf.xml new file mode 100644 index 0000000000..496df7c8a1 --- /dev/null +++ b/conf/minimal/autoload_configs/sofia.conf.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/conf/minimal/autoload_configs/switch.conf.xml b/conf/minimal/autoload_configs/switch.conf.xml new file mode 100644 index 0000000000..3020e9b56d --- /dev/null +++ b/conf/minimal/autoload_configs/switch.conf.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/conf/minimal/autoload_configs/timezones.conf.xml b/conf/minimal/autoload_configs/timezones.conf.xml new file mode 100644 index 0000000000..757d16c19d --- /dev/null +++ b/conf/minimal/autoload_configs/timezones.conf.xml @@ -0,0 +1,1850 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/conf/minimal/autoload_configs/xml_rpc.conf.xml b/conf/minimal/autoload_configs/xml_rpc.conf.xml new file mode 100644 index 0000000000..97c4ec5e95 --- /dev/null +++ b/conf/minimal/autoload_configs/xml_rpc.conf.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/conf/minimal/dialplan/default.xml b/conf/minimal/dialplan/default.xml new file mode 100644 index 0000000000..07c3ce89cb --- /dev/null +++ b/conf/minimal/dialplan/default.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/conf/minimal/dialplan/public.xml b/conf/minimal/dialplan/public.xml new file mode 100644 index 0000000000..71e092e960 --- /dev/null +++ b/conf/minimal/dialplan/public.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/conf/minimal/dialplan/public/00_stub.xml b/conf/minimal/dialplan/public/00_stub.xml new file mode 100644 index 0000000000..1be7a82d61 --- /dev/null +++ b/conf/minimal/dialplan/public/00_stub.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/conf/minimal/freeswitch.xml b/conf/minimal/freeswitch.xml new file mode 100644 index 0000000000..7661b438b3 --- /dev/null +++ b/conf/minimal/freeswitch.xml @@ -0,0 +1,12 @@ + + + + +
+ +
+ +
+ +
+
diff --git a/conf/minimal/modules.conf b/conf/minimal/modules.conf new file mode 100644 index 0000000000..c49f4e96ba --- /dev/null +++ b/conf/minimal/modules.conf @@ -0,0 +1,17 @@ +applications/mod_commands +applications/mod_conference +applications/mod_db +applications/mod_dptools +applications/mod_esf +applications/mod_expr +applications/mod_hash +dialplans/mod_dialplan_xml +endpoints/mod_loopback +endpoints/mod_sofia +event_handlers/mod_cdr_csv +event_handlers/mod_event_socket +formats/mod_native_file +formats/mod_sndfile +loggers/mod_console +loggers/mod_logfile +xml_int/mod_xml_rpc diff --git a/conf/minimal/sip_profiles/external.xml b/conf/minimal/sip_profiles/external.xml new file mode 100644 index 0000000000..f1417c2383 --- /dev/null +++ b/conf/minimal/sip_profiles/external.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/conf/minimal/sip_profiles/external/stub.xml b/conf/minimal/sip_profiles/external/stub.xml new file mode 100644 index 0000000000..d27458ec1e --- /dev/null +++ b/conf/minimal/sip_profiles/external/stub.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/conf/minimal/sip_profiles/internal.xml b/conf/minimal/sip_profiles/internal.xml new file mode 100644 index 0000000000..f9d1f56338 --- /dev/null +++ b/conf/minimal/sip_profiles/internal.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/conf/minimal/vars.xml b/conf/minimal/vars.xml new file mode 100644 index 0000000000..d2cdb3ffa2 --- /dev/null +++ b/conf/minimal/vars.xml @@ -0,0 +1,9 @@ + + + + + + + + + From 698f03eac23f2a1d52ea3035ed4c18b83581e321 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 11 Mar 2015 15:26:10 -0500 Subject: [PATCH 21/24] fix typo --- html5/verto/js/src/jquery.verto.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/html5/verto/js/src/jquery.verto.js b/html5/verto/js/src/jquery.verto.js index 9bb5e02ceb..750b05a8e5 100644 --- a/html5/verto/js/src/jquery.verto.js +++ b/html5/verto/js/src/jquery.verto.js @@ -1745,7 +1745,7 @@ $.verto.dialog.prototype.transfer = function(dest, params) { var dialog = this; if (dest) { - cur_call.sendMethod("verto.modify", { + dialog.sendMethod("verto.modify", { action: "transfer", destination: dest, params: params @@ -1756,7 +1756,7 @@ $.verto.dialog.prototype.hold = function(params) { var dialog = this; - cur_call.sendMethod("verto.modify", { + dialog.sendMethod("verto.modify", { action: "hold", params: params }); @@ -1765,7 +1765,7 @@ $.verto.dialog.prototype.unhold = function(params) { var dialog = this; - cur_call.sendMethod("verto.modify", { + dialog.sendMethod("verto.modify", { action: "unhold", params: params }); @@ -1774,7 +1774,7 @@ $.verto.dialog.prototype.toggleHold = function(params) { var dialog = this; - cur_call.sendMethod("verto.modify", { + dialog.sendMethod("verto.modify", { action: "toggleHold", params: params }); From 406bfb8dec9f05fc2c0940cd337d28daad08c19d Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 11 Mar 2015 21:27:32 -0500 Subject: [PATCH 22/24] sync --- html5/verto/demo/js/verto-min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html5/verto/demo/js/verto-min.js b/html5/verto/demo/js/verto-min.js index f8acd1549e..dd539a92f5 100644 --- a/html5/verto/demo/js/verto-min.js +++ b/html5/verto/demo/js/verto-min.js @@ -197,7 +197,7 @@ if(success){} break;default:break;}};$.verto.dialog.prototype.hangup=function(params){var dialog=this;if(params){if(params.causeCode){dialog.causeCode=params.causeCode;} if(params.cause){dialog.cause=params.cause;}} if(dialog.state.val>$.verto.enum.state.new.val&&dialog.state.val<$.verto.enum.state.hangup.val){dialog.setState($.verto.enum.state.hangup);}else if(dialog.state.val<$.verto.enum.state.destroy){dialog.setState($.verto.enum.state.destroy);}};$.verto.dialog.prototype.stopRinging=function(){var dialog=this;if(dialog.verto.ringer){dialog.verto.ringer.stop();}};$.verto.dialog.prototype.indicateRing=function(){var dialog=this;if(dialog.verto.ringer){dialog.verto.ringer.attr("src",dialog.verto.options.ringFile)[0].play();setTimeout(function(){dialog.stopRinging();if(dialog.state==$.verto.enum.state.ringing){dialog.indicateRing();}},dialog.verto.options.ringSleep);}};$.verto.dialog.prototype.ring=function(){var dialog=this;dialog.setState($.verto.enum.state.ringing);dialog.indicateRing();};$.verto.dialog.prototype.useVideo=function(on){var dialog=this;dialog.params.useVideo=on;if(on){dialog.videoStream=dialog.audioStream;}else{dialog.videoStream=null;} -dialog.rtc.useVideo(dialog.videoStream);};$.verto.dialog.prototype.useStereo=function(on){var dialog=this;dialog.params.useStereo=on;dialog.rtc.useStereo(on);};$.verto.dialog.prototype.dtmf=function(digits){var dialog=this;if(digits){dialog.sendMethod("verto.info",{dtmf:digits});}};$.verto.dialog.prototype.transfer=function(dest,params){var dialog=this;if(dest){cur_call.sendMethod("verto.modify",{action:"transfer",destination:dest,params:params});}};$.verto.dialog.prototype.hold=function(params){var dialog=this;cur_call.sendMethod("verto.modify",{action:"hold",params:params});};$.verto.dialog.prototype.unhold=function(params){var dialog=this;cur_call.sendMethod("verto.modify",{action:"unhold",params:params});};$.verto.dialog.prototype.toggleHold=function(params){var dialog=this;cur_call.sendMethod("verto.modify",{action:"toggleHold",params:params});};$.verto.dialog.prototype.message=function(msg){var dialog=this;var err=0;msg.from=dialog.params.login;if(!msg.to){console.error("Missing To");err++;} +dialog.rtc.useVideo(dialog.videoStream);};$.verto.dialog.prototype.useStereo=function(on){var dialog=this;dialog.params.useStereo=on;dialog.rtc.useStereo(on);};$.verto.dialog.prototype.dtmf=function(digits){var dialog=this;if(digits){dialog.sendMethod("verto.info",{dtmf:digits});}};$.verto.dialog.prototype.transfer=function(dest,params){var dialog=this;if(dest){dialog.sendMethod("verto.modify",{action:"transfer",destination:dest,params:params});}};$.verto.dialog.prototype.hold=function(params){var dialog=this;dialog.sendMethod("verto.modify",{action:"hold",params:params});};$.verto.dialog.prototype.unhold=function(params){var dialog=this;dialog.sendMethod("verto.modify",{action:"unhold",params:params});};$.verto.dialog.prototype.toggleHold=function(params){var dialog=this;dialog.sendMethod("verto.modify",{action:"toggleHold",params:params});};$.verto.dialog.prototype.message=function(msg){var dialog=this;var err=0;msg.from=dialog.params.login;if(!msg.to){console.error("Missing To");err++;} if(!msg.body){console.error("Missing Body");err++;} if(err){return false;} dialog.sendMethod("verto.info",{msg:msg});return true;};$.verto.dialog.prototype.answer=function(params){var dialog=this;if(!dialog.answered){if(params){if(params.useVideo){dialog.useVideo(true);} From f2c993e5eee13ebf3bac984c0bfedb3d85fb98ac Mon Sep 17 00:00:00 2001 From: Chris Rienzo Date: Wed, 11 Mar 2015 23:46:08 -0400 Subject: [PATCH 23/24] FS-7300 #resolve #comment [mod_rayo] handle all MRCP completion causes in SPEECH-COMPLETE event and validate / load input grammar URLs --- .../mod_rayo/rayo_input_component.c | 69 ++++++++++++++----- 1 file changed, 53 insertions(+), 16 deletions(-) diff --git a/src/mod/event_handlers/mod_rayo/rayo_input_component.c b/src/mod/event_handlers/mod_rayo/rayo_input_component.c index a32cdf8602..53dcbf3540 100644 --- a/src/mod/event_handlers/mod_rayo/rayo_input_component.c +++ b/src/mod/event_handlers/mod_rayo/rayo_input_component.c @@ -526,6 +526,7 @@ static char *setup_grammars_unimrcp(struct input_component *component, switch_co } switch_core_asr_text_param(ah, "start-recognize", "false"); + switch_core_asr_text_param(ah, "define-grammar", "true"); for (grammar_tag = iks_find(input, "grammar"); grammar_tag; grammar_tag = iks_next_tag(grammar_tag)) { const char *grammar_name; iks *grammar_cdata; @@ -544,29 +545,42 @@ static char *setup_grammars_unimrcp(struct input_component *component, switch_co switch_safe_free(grammar_uri_list.data); return NULL; } - - /* load the grammar */ grammar = switch_core_sprintf(RAYO_POOL(component), "inline:%s", iks_cdata(grammar_cdata)); - grammar_name = switch_core_sprintf(RAYO_POOL(component), "grammar-%d", rayo_actor_seq_next(RAYO_ACTOR(component))); - /* unlock handler mutex, otherwise deadlock will happen if switch_ivr_detect_speech_load_grammar removes the media bug */ - switch_mutex_unlock(component->handler->mutex); - if (switch_ivr_detect_speech_load_grammar(session, grammar, grammar_name) != SWITCH_STATUS_SUCCESS) { - switch_mutex_lock(component->handler->mutex); - *stanza_error = STANZA_ERROR_INTERNAL_SERVER_ERROR; - *error_detail = "Failed to load grammar"; + } else { + /* Grammar is at a URL */ + grammar = iks_find_attrib_soft(grammar_tag, "url"); + if (zstr(grammar)) { + *stanza_error = STANZA_ERROR_BAD_REQUEST; + *error_detail = "Missing grammar"; + switch_safe_free(grammar_uri_list.data); + return NULL; + } + if (strncasecmp(grammar, "http", 4) && strncasecmp(grammar, "file", 4)) { + *stanza_error = STANZA_ERROR_BAD_REQUEST; + *error_detail = "Bad URL"; switch_safe_free(grammar_uri_list.data); return NULL; } - switch_mutex_lock(component->handler->mutex); - - /* add grammar to uri-list */ - grammar_uri_list.write_function(&grammar_uri_list, "session:%s\r\n", grammar_name); - } else { - /* add URI to uri-list */ - grammar_uri_list.write_function(&grammar_uri_list, "%s\r\n", iks_find_attrib_soft(grammar_tag, "url")); } + grammar_name = switch_core_sprintf(RAYO_POOL(component), "grammar-%d", rayo_actor_seq_next(RAYO_ACTOR(component))); + + /* DEFINE-GRAMMAR */ + /* unlock handler mutex, otherwise deadlock will happen if switch_ivr_detect_speech_load_grammar removes the media bug */ + switch_mutex_unlock(component->handler->mutex); + if (switch_ivr_detect_speech_load_grammar(session, grammar, grammar_name) != SWITCH_STATUS_SUCCESS) { + switch_mutex_lock(component->handler->mutex); + *stanza_error = STANZA_ERROR_INTERNAL_SERVER_ERROR; + *error_detail = "Failed to load grammar"; + switch_safe_free(grammar_uri_list.data); + return NULL; + } + switch_mutex_lock(component->handler->mutex); + + /* add grammar to uri-list */ + grammar_uri_list.write_function(&grammar_uri_list, "session:%s\r\n", grammar_name); } switch_core_asr_text_param(ah, "start-recognize", "true"); + switch_core_asr_text_param(ah, "define-grammar", "false"); return (char *)grammar_uri_list.data; } @@ -880,9 +894,11 @@ static void on_detected_speech_event(switch_event_t *event) switch_safe_free(component_id); if (component) { const char *result = switch_event_get_body(event); + switch_mutex_lock(INPUT_COMPONENT(component)->handler->mutex); INPUT_COMPONENT(component)->handler->voice_component = NULL; switch_mutex_unlock(INPUT_COMPONENT(component)->handler->mutex); + if (zstr(result)) { rayo_component_send_complete(component, INPUT_NOMATCH); } else { @@ -914,8 +930,29 @@ static void on_detected_speech_event(switch_event_t *event) } else if (strstr(result, "002")) { /* Completion-Cause: 002 no-input-timeout */ rayo_component_send_complete(component, INPUT_NOINPUT); + } else if (strstr(result, "004") || strstr(result, "005") || strstr(result, "006") || strstr(result, "009") || strstr(result, "010")) { + /* Completion-Cause: 004 gram-load-failure */ + /* Completion-Cause: 005 gram-comp-failure */ + /* Completion-Cause: 006 error */ + /* Completion-Cause: 009 uri-failure */ + /* Completion-Cause: 010 language-unsupported */ + iks *response = rayo_component_create_complete_event(component, COMPONENT_COMPLETE_ERROR); + const char *error_reason = switch_event_get_header(event, "ASR-Completion-Reason"); + if (!zstr(error_reason)) { + iks *error; + if ((error = iks_find(response, "complete"))) { + if ((error = iks_find(error, "error"))) { + iks_insert_cdata(error, error_reason, strlen(error_reason)); + } + } + } + rayo_component_send_complete_event(component, response); } else { /* assume no match */ + /* Completion-Cause: 001 no-match */ + /* Completion-Cause: 003 recognition-timeout */ + /* Completion-Cause: 007 speech-too-early */ + /* Completion-Cause: 008 too-much-speech-timeout */ rayo_component_send_complete(component, INPUT_NOMATCH); } } From 64c10e04c1f69c70f6ad6ca09cdae222d98e1710 Mon Sep 17 00:00:00 2001 From: Brian West Date: Thu, 12 Mar 2015 11:43:07 -0500 Subject: [PATCH 24/24] Fix URL --- docs/how_to_make_your_own_ca_correctly.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/how_to_make_your_own_ca_correctly.txt b/docs/how_to_make_your_own_ca_correctly.txt index ff616867bc..2d0211661d 100644 --- a/docs/how_to_make_your_own_ca_correctly.txt +++ b/docs/how_to_make_your_own_ca_correctly.txt @@ -2,7 +2,7 @@ Someone should probably turn this into a nice how-to: Here is how I did it. -wget http://www.openssl.org/contrib/ssl.ca-0.1.tar.gz +wget http://files.freeswitch.org/downloads/ssl.ca-0.1.tar.gz tar zxfv ssl.ca-0.1.tar.gz cd ssl.ca-0.1/ perl -i -pe 's/md5/sha2/g' *.sh