提交 b83b567d authored 作者: Travis Cross's avatar Travis Cross

set sdp_zrtp_hash_string earlier when inbound-late-negotiation is enabled

Previously in this case it was only being set after the dialplan had
already executed.
上级 982cb1fe
...@@ -3892,13 +3892,25 @@ void sofia_glue_set_r_sdp_codec_string(switch_core_session_t *session, const cha ...@@ -3892,13 +3892,25 @@ void sofia_glue_set_r_sdp_codec_string(switch_core_session_t *session, const cha
if (zstr(attr->a_name)) { if (zstr(attr->a_name)) {
continue; continue;
} }
if (!strcasecmp(attr->a_name, "ptime")) { if (!strcasecmp(attr->a_name, "ptime")) {
dptime = atoi(attr->a_value); dptime = atoi(attr->a_value);
break; break;
} }
} }
switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(channel), SWITCH_LOG_DEBUG, "Looking for zrtp-hash to set sdp_zrtp_hash_string\n");
for (m = sdp->sdp_media; m; m = m->m_next) {
for (attr = m->m_attributes; attr; attr = attr->a_next) {
if (zstr(attr->a_name)) continue;
if (!strcasecmp(attr->a_name, "zrtp-hash") && attr->a_value) {
switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(channel), SWITCH_LOG_DEBUG, "Found zrtp-hash, setting sdp_zrtp_hash_string=%s\n", attr->a_value);
switch_channel_set_variable(channel, "sdp_zrtp_hash_string", attr->a_value);
switch_channel_set_flag(channel, CF_ZRTP_HASH);
break;
}
}
}
for (m = sdp->sdp_media; m; m = m->m_next) { for (m = sdp->sdp_media; m; m = m->m_next) {
ptime = dptime; ptime = dptime;
if (m->m_type == sdp_media_image && m->m_port) { if (m->m_type == sdp_media_image && m->m_port) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论