Merge branch 'v1.2.stable' of ssh://git.freeswitch.org:222/freeswitch into v1.2.stable

This commit is contained in:
Jeff Lenk 2014-03-03 21:11:23 -06:00
commit 2287c55ce3
4 changed files with 13 additions and 10 deletions

View File

@ -312,7 +312,7 @@ static iks *prompt_component_handle_input_error(struct rayo_actor *prompt, struc
iks_insert_attrib(iq, "from", RAYO_JID(RAYO_COMPONENT(prompt)->parent)); iks_insert_attrib(iq, "from", RAYO_JID(RAYO_COMPONENT(prompt)->parent));
iks_insert_attrib(iq, "to", RAYO_COMPONENT(prompt)->client_jid); iks_insert_attrib(iq, "to", RAYO_COMPONENT(prompt)->client_jid);
iks_insert_node(iq, iks_copy_within(error, iks_stack(iq))); iks_insert_node(iq, iks_copy_within(error, iks_stack(iq)));
PROMPT_COMPONENT(prompt)->complete = iq; PROMPT_COMPONENT(prompt)->complete = iks_copy(iq);
rayo_component_send_stop(prompt, PROMPT_COMPONENT(prompt)->output_jid); rayo_component_send_stop(prompt, PROMPT_COMPONENT(prompt)->output_jid);
break; break;

View File

@ -93,11 +93,8 @@ static switch_status_t silence_stream_file_read(switch_file_handle_t *handle, vo
sh->samples -= *len; sh->samples -= *len;
} }
if (sh->silence) { switch_generate_sln_silence((int16_t *) data, *len,
switch_generate_sln_silence((int16_t *) data, *len, sh->silence); sh->silence ? sh->silence : (uint32_t)-1);
} else {
memset(data, 0, *len * 2);
}
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
} }

View File

@ -166,9 +166,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_sleep(switch_core_session_t *session,
switch_goto_status(SWITCH_STATUS_SUCCESS, end); switch_goto_status(SWITCH_STATUS_SUCCESS, end);
} }
var = switch_channel_get_variable(channel, SWITCH_SEND_SILENCE_WHEN_IDLE_VARIABLE); if ((var = switch_channel_get_variable(channel, SWITCH_SEND_SILENCE_WHEN_IDLE_VARIABLE))
if (var) { && (sval = atoi(var))) {
sval = atoi(var);
SWITCH_IVR_VERIFY_SILENCE_DIVISOR(sval); SWITCH_IVR_VERIFY_SILENCE_DIVISOR(sval);
} }

View File

@ -1773,6 +1773,7 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_add_crypto_key(switch_rtp_t *rtp_sess
switch_core_session_t *session = switch_core_memory_pool_get_data(rtp_session->pool, "__session"); switch_core_session_t *session = switch_core_memory_pool_get_data(rtp_session->pool, "__session");
switch_channel_t *channel = switch_core_session_get_channel(session); switch_channel_t *channel = switch_core_session_get_channel(session);
switch_event_t *fsevent = NULL; switch_event_t *fsevent = NULL;
const char *var;
if (direction >= SWITCH_RTP_CRYPTO_MAX || keylen > SWITCH_RTP_MAX_CRYPTO_LEN) { if (direction >= SWITCH_RTP_CRYPTO_MAX || keylen > SWITCH_RTP_MAX_CRYPTO_LEN) {
return SWITCH_STATUS_FALSE; return SWITCH_STATUS_FALSE;
@ -1794,7 +1795,13 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_add_crypto_key(switch_rtp_t *rtp_sess
memset(policy, 0, sizeof(*policy)); memset(policy, 0, sizeof(*policy));
switch_channel_set_variable(channel, "send_silence_when_idle", "-1"); /* many devices can't handle gaps in SRTP streams */
if (!((var = switch_channel_get_variable(channel, "srtp_allow_idle_gaps"))
&& switch_true(var))
&& (!(var = switch_channel_get_variable(channel, "send_silence_when_idle"))
|| !(atoi(var)))) {
switch_channel_set_variable(channel, "send_silence_when_idle", "-1");
}
switch (crypto_key->type) { switch (crypto_key->type) {
case AES_CM_128_HMAC_SHA1_80: case AES_CM_128_HMAC_SHA1_80: