[commit] r7799 - in freeswitch/trunk: libs/sofia-sip libs/sofia-sip/libsofia-sip-ua/sdp src/mod/endpoints/mod_sofia
Author: mikej Date: Wed Mar 5 17:39:22 2008 New Revision: 7799 Modified: freeswitch/trunk/libs/sofia-sip/.update freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_print.c freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c Log: tweak sdp handling Modified: freeswitch/trunk/libs/sofia-sip/.update ============================================================================== --- freeswitch/trunk/libs/sofia-sip/.update (original) +++ freeswitch/trunk/libs/sofia-sip/.update Wed Mar 5 17:39:22 2008 @@ -1 +1 @@ -Fri Feb 15 10:57:26 EST 2008 +Wed Mar 5 17:21:10 EST 2008 Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_print.c ============================================================================== --- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_print.c (original) +++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_print.c Wed Mar 5 17:39:22 2008 @@ -565,7 +565,6 @@ { char const *media, *proto; sdp_rtpmap_t *rm; - int print_rejected = 0; sdp_mode_t session_mode = sdp_sendrecv; @@ -594,13 +593,11 @@ default: proto = m->m_proto_name; break; } - if (print_rejected || m->m_rtpmaps || m->m_format) { if (m->m_number_of_ports <= 1) sdp_printf(p, "m=%s %u %s", media, m->m_port, proto); else sdp_printf(p, "m=%s %u/%u %s", media, m->m_port, m->m_number_of_ports, proto); - } if (m->m_rtpmaps) { for (rm = m->m_rtpmaps; rm; rm = rm->rm_next) { @@ -615,13 +612,13 @@ for (; l; l = l->l_next) sdp_printf(p, " %s", l->l_text); } - else if (print_rejected) { + else { sdp_printf(p, " 19"); /* SDP syntax requires at least one format. 19 is used by nobody, right?. */ } - if (print_rejected || m->m_rtpmaps || m->m_format) sdp_printf(p, CRLF); + sdp_printf(p, CRLF); if (m->m_information) print_information(p, m->m_information); 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 Wed Mar 5 17:39:22 2008 @@ -394,6 +394,8 @@ NUTAG_SESSION_TIMER(session_timeout), SIPTAG_CONTACT_STR(tech_pvt->reply_contact), SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), + SOATAG_REUSE_REJECTED(1), + SOATAG_ORDERED_USER(1), SOATAG_AUDIO_AUX("cn telephone-event"), NUTAG_INCLUDE_EXTRA_SDP(1), TAG_END()); @@ -750,6 +752,8 @@ nua_respond(tech_pvt->nh, SIP_200_OK, SIPTAG_CONTACT_STR(tech_pvt->reply_contact), SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), + SOATAG_REUSE_REJECTED(1), + SOATAG_ORDERED_USER(1), SOATAG_AUDIO_AUX("cn telephone-event"), NUTAG_INCLUDE_EXTRA_SDP(1), TAG_END()); @@ -990,6 +994,8 @@ } nua_respond(tech_pvt->nh, code, reason, SIPTAG_CONTACT_STR(tech_pvt->reply_contact), SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), + SOATAG_REUSE_REJECTED(1), + SOATAG_ORDERED_USER(1), SOATAG_AUDIO_AUX("cn telephone-event"), NUTAG_INCLUDE_EXTRA_SDP(1), TAG_END()); @@ -1066,6 +1072,8 @@ SIP_183_SESSION_PROGRESS, NUTAG_AUTOANSWER(0), SIPTAG_CONTACT_STR(tech_pvt->reply_contact), + SOATAG_REUSE_REJECTED(1), + SOATAG_ORDERED_USER(1), SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), SOATAG_AUDIO_AUX("cn telephone-event"), TAG_END()); } } Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c ============================================================================== --- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (original) +++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c Wed Mar 5 17:39:22 2008 @@ -1735,6 +1735,8 @@ nua_respond(tech_pvt->nh, SIP_200_OK, SIPTAG_CONTACT_STR(tech_pvt->profile->url), SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), + SOATAG_REUSE_REJECTED(1), + SOATAG_ORDERED_USER(1), SOATAG_AUDIO_AUX("cn telephone-event"), NUTAG_INCLUDE_EXTRA_SDP(1), TAG_END()); @@ -1802,6 +1804,8 @@ nua_respond(tech_pvt->nh, SIP_200_OK, SIPTAG_CONTACT_STR(tech_pvt->reply_contact), SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), + SOATAG_REUSE_REJECTED(1), + SOATAG_ORDERED_USER(1), 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 Wed Mar 5 17:39:22 2008 @@ -1072,6 +1072,8 @@ TAG_IF(!switch_strlen_zero(extra_headers), SIPTAG_HEADER_STR(extra_headers)), TAG_IF(!switch_strlen_zero(max_forwards), SIPTAG_MAX_FORWARDS_STR(max_forwards)), SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), + SOATAG_REUSE_REJECTED(1), + SOATAG_ORDERED_USER(1), SOATAG_RTP_SORT(SOA_RTP_SORT_REMOTE), SOATAG_RTP_SELECT(SOA_RTP_SELECT_ALL), TAG_IF(rep, SIPTAG_REPLACES_STR(rep)), SOATAG_HOLD(holdstr), TAG_END()); @@ -1108,6 +1110,8 @@ nua_invite(tech_pvt->nh2, SIPTAG_CONTACT_STR(tech_pvt->profile->url), SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), + SOATAG_REUSE_REJECTED(1), + SOATAG_ORDERED_USER(1), SOATAG_RTP_SORT(SOA_RTP_SORT_REMOTE), SOATAG_RTP_SELECT(SOA_RTP_SELECT_ALL), TAG_IF(rep, SIPTAG_REPLACES_STR(rep)), TAG_END()); } else { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Memory Error!\n");
participants (1)
-
Freeswitch SVN