[Freeswitch-svn] [commit] r7722 - freeswitch/trunk/src/mod/endpoints/mod_sofia
Freeswitch SVN
anthm at freeswitch.org
Fri Feb 22 09:06:14 EST 2008
Author: anthm
Date: Fri Feb 22 09:06:13 2008
New Revision: 7722
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
Log:
update
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Fri Feb 22 09:06:13 2008
@@ -960,10 +960,14 @@
TAG_IF(!switch_strlen_zero(max_forwards), SIPTAG_MAX_FORWARDS_STR(max_forwards)), TAG_END());
} else {
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());
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c Fri Feb 22 09:06:13 2008
@@ -753,11 +753,18 @@
}
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 (sofia_glue_tech_choose_port(tech_pvt, 1) != SWITCH_STATUS_SUCCESS) {
- 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;
@@ -790,11 +797,8 @@
*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);
}
More information about the Freeswitch-svn
mailing list