[Freeswitch-svn] [commit] r7713 - freeswitch/trunk/src/mod/endpoints/mod_sofia

Freeswitch SVN mikej at freeswitch.org
Wed Feb 20 16:31:15 EST 2008


Author: mikej
Date: Wed Feb 20 16:31:15 2008
New Revision: 7713

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c

Log:
ken, try this.

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 Feb 20 16:31:15 2008
@@ -954,7 +954,16 @@
 							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);
-				nua_respond(tech_pvt->nh, code, reason, SIPTAG_CONTACT_STR(tech_pvt->reply_contact), TAG_END());
+
+				if (!switch_strlen_zero(((char *)msg->pointer_arg))) {
+					nua_respond(tech_pvt->nh, code, reason, SIPTAG_CONTACT_STR(tech_pvt->reply_contact),
+					SOATAG_USER_SDP_STR(msg->pointer_arg),
+					SOATAG_AUDIO_AUX("cn telephone-event"),
+					NUTAG_INCLUDE_EXTRA_SDP(1),
+					TAG_END());
+				} else {
+					nua_respond(tech_pvt->nh, code, reason, SIPTAG_CONTACT_STR(tech_pvt->reply_contact), 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 Feb 20 16:31:15 2008
@@ -1327,14 +1327,20 @@
 			switch_clear_flag_locked(tech_pvt, TFLAG_SENT_UPDATE);
 
 			if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE)) && (other_session = switch_core_session_locate(uuid))) {
+				const char *r_sdp = NULL;
 				switch_core_session_message_t msg = { 0 };
-				
+			
 				switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Passing %d %s to other leg\n", status, phrase);
 				
+				tl_gets(tags, SOATAG_REMOTE_SDP_STR_REF(r_sdp), TAG_END());
 				msg.message_id = SWITCH_MESSAGE_INDICATE_RESPOND;
 				msg.from = __FILE__;
 				msg.numeric_arg = status;
 				msg.string_arg = switch_core_session_strdup(other_session, phrase);
+				if (r_sdp) {
+					msg.pointer_arg = switch_core_session_strdup(other_session, r_sdp);
+					msg.pointer_arg_size = strlen(r_sdp);
+				}
 				switch_core_session_receive_message(other_session, &msg);
 				switch_core_session_rwunlock(other_session);
 			}



More information about the Freeswitch-svn mailing list