update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7722 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
93a60fd3f8
commit
e48bfcaaa3
|
@ -962,8 +962,12 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
|||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Responding with %d %s\n", code, reason);
|
||||
|
||||
if (!switch_strlen_zero(((char *)msg->pointer_arg))) {
|
||||
tech_pvt->local_sdp_str = switch_core_session_strdup(tech_pvt->session, (char *)msg->pointer_arg);
|
||||
if (switch_channel_test_flag(channel, CF_PROXY_MEDIA)) {
|
||||
sofia_glue_tech_patch_sdp(tech_pvt);
|
||||
}
|
||||
nua_respond(tech_pvt->nh, code, reason, SIPTAG_CONTACT_STR(tech_pvt->reply_contact),
|
||||
SOATAG_USER_SDP_STR(msg->pointer_arg),
|
||||
SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str),
|
||||
SOATAG_AUDIO_AUX("cn telephone-event"),
|
||||
NUTAG_INCLUDE_EXTRA_SDP(1),
|
||||
TAG_END());
|
||||
|
|
|
@ -753,12 +753,19 @@ void sofia_glue_tech_patch_sdp(private_object_t *tech_pvt)
|
|||
}
|
||||
|
||||
if (!(ip_ptr && port_ptr)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "%s SDP Error! [%s]\n", switch_channel_get_name(tech_pvt->channel), tech_pvt->local_sdp_str);
|
||||
return;
|
||||
}
|
||||
|
||||
if (switch_strlen_zero(tech_pvt->adv_sdp_audio_ip) || !tech_pvt->adv_sdp_audio_port) {
|
||||
if (sofia_glue_tech_choose_port(tech_pvt, 1) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "%s I/O Error\n", switch_channel_get_name(tech_pvt->channel));
|
||||
return;
|
||||
}
|
||||
tech_pvt->iananame = switch_core_session_strdup(tech_pvt->session, "NO-NAME");
|
||||
tech_pvt->rm_rate = 8000;
|
||||
tech_pvt->codec_ms = 20;
|
||||
}
|
||||
|
||||
tech_pvt->orig_local_sdp_str = tech_pvt->local_sdp_str;
|
||||
tech_pvt->local_sdp_str = switch_core_session_alloc(tech_pvt->session, len);
|
||||
|
@ -790,11 +797,8 @@ void sofia_glue_tech_patch_sdp(private_object_t *tech_pvt)
|
|||
*q++ = *p++;
|
||||
}
|
||||
|
||||
tech_pvt->iananame = switch_core_session_strdup(tech_pvt->session, "NO-NAME");
|
||||
|
||||
tech_pvt->rm_rate = 8000;
|
||||
tech_pvt->codec_ms = 20;
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s Patched SDP\n%s\n%s\n",
|
||||
switch_channel_get_name(tech_pvt->channel), tech_pvt->orig_local_sdp_str, tech_pvt->local_sdp_str);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue