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

Freeswitch SVN mikej at freeswitch.org
Thu Oct 19 12:10:25 EDT 2006


Author: mikej
Date: Thu Oct 19 12:10:24 2006
New Revision: 3104

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

Log:
add Alert-Info:  Thanks Ken.

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	Thu Oct 19 12:10:24 2006
@@ -892,7 +892,9 @@
 
 static void do_invite(switch_core_session_t *session)
 {
-	char rpid[1024];
+	char rpid[1024] = { 0 };
+	char alert_info[1024] = { 0 };
+	char *alertbuf;
 	private_object_t *tech_pvt;
     switch_channel_t *channel = NULL;
 	switch_caller_profile_t *caller_profile;
@@ -921,7 +923,10 @@
 													 ))) {
 
 		char *rep = switch_channel_get_variable(channel, SOFIA_REPLACES_HEADER);
-		
+
+		if ((alertbuf = switch_channel_get_variable(channel, "alert_info"))) {
+			snprintf(alert_info, sizeof(alert_info) - 1, "Alert-Info: %s", alertbuf);
+		}
 
 		tech_choose_port(tech_pvt);
 		set_local_sdp(tech_pvt);
@@ -976,6 +981,7 @@
 
 		nua_invite(tech_pvt->nh,
 				   TAG_IF(rpid, SIPTAG_HEADER_STR(rpid)),
+					TAG_IF(alert_info, SIPTAG_HEADER_STR(alert_info)),
 				   SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str),
 				   SOATAG_RTP_SORT(SOA_RTP_SORT_REMOTE),
 				   SOATAG_RTP_SELECT(SOA_RTP_SELECT_ALL),



More information about the Freeswitch-svn mailing list