[Freeswitch-svn] [commit] r9309 - in freeswitch/trunk/src/mod: applications/mod_commands applications/mod_conference applications/mod_dptools applications/mod_fifo applications/mod_snom applications/mod_voicemail endpoints/mod_dingaling endpoints/mod_iax endpoints/mod_portaudio endpoints/mod_sofia event_handlers/mod_event_multicast event_handlers/mod_event_socket languages/mod_spidermonkey xml_int/mod_xml_rpc

Freeswitch SVN mikej at freeswitch.org
Fri Aug 15 22:19:44 EDT 2008


Author: mikej
Date: Fri Aug 15 22:19:43 2008
New Revision: 9309

Modified:
   freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c
   freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
   freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
   freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c
   freeswitch/trunk/src/mod/applications/mod_snom/mod_snom.c
   freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c
   freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
   freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c
   freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
   freeswitch/trunk/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c
   freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c
   freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
   freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c

Log:
switch some usages of switch_event_add_header to switch_event_add_header_string

Modified: freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c	Fri Aug 15 22:19:43 2008
@@ -1845,10 +1845,10 @@
 	}
 
 	if (switch_event_create(&event, SWITCH_EVENT_BACKGROUND_JOB) == SWITCH_STATUS_SUCCESS) {
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Job-UUID", "%s", job->uuid_str);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Job-Command", "%s", job->cmd);
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Job-UUID", job->uuid_str);
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Job-Command", job->cmd);
 		if (arg) {
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Job-Command-Arg", "%s", arg);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Job-Command-Arg", arg);
 		}
 
 		switch_event_add_body(event, "%s", reply);

Modified: freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c	Fri Aug 15 22:19:43 2008
@@ -388,9 +388,9 @@
 {
 	switch_status_t status = SWITCH_STATUS_SUCCESS;
 
-	switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Conference-Name", "%s", conference->name);
+	switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Conference-Name", conference->name);
 	switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Conference-Size", "%u", conference->count);
-	switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Conference-Profile-Name", "%s", conference->profile_name);
+	switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Conference-Profile-Name", conference->profile_name);
 
 	return status;
 }
@@ -580,17 +580,17 @@
 	if (!switch_test_flag(member, MFLAG_NOCHANNEL)) {
 		conference->count++;
 		if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) {
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", CONF_CHAT_PROTO);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", conference->name);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", CONF_CHAT_PROTO);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", conference->name);
 			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s@%s", conference->name, conference->domain);
 			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "status", "Active (%d caller%s)", conference->count, conference->count == 1 ? "" : "s");
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "alt_event_type", "dialog");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alt_event_type", "dialog");
 			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_count", "%d", EC++);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "unique-id", "%s", conference->name);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "channel-state", "%s", "CS_ROUTING");
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "answer-state", "%s", conference->count == 1 ? "early" : "confirmed");
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "call-direction", "%s", conference->count == 1 ? "outbound" : "inbound");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "unique-id", conference->name);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "channel-state", "CS_ROUTING");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "answer-state", conference->count == 1 ? "early" : "confirmed");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "call-direction", conference->count == 1 ? "outbound" : "inbound");
 			switch_event_fire(&event);
 		}
 
@@ -640,7 +640,7 @@
 		if (test_eflag(conference, EFLAG_ADD_MEMBER) &&
 			switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 			conference_add_event_member_data(member, event);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "add-member");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "add-member");
 			switch_event_fire(&event);
 		}
 
@@ -723,17 +723,17 @@
 	if (!switch_test_flag(member, MFLAG_NOCHANNEL)) {
 		conference->count--;
 		if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) {
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", CONF_CHAT_PROTO);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", conference->name);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", CONF_CHAT_PROTO);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", conference->name);
 			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s@%s", conference->name, conference->domain);
 			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "status", "Active (%d caller%s)", conference->count, conference->count == 1 ? "" : "s");
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "alt_event_type", "dialog");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alt_event_type", "dialog");
 			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_count", "%d", EC++);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "unique-id", "%s", conference->name);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "channel-state", "%s", "CS_ROUTING");
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "answer-state", "%s", conference->count == 1 ? "early" : "confirmed");
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "call-direction", "%s", conference->count == 1 ? "outbound" : "inbound");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "unique-id", conference->name);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "channel-state", "CS_ROUTING");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "answer-state", conference->count == 1 ? "early" : "confirmed");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "call-direction", conference->count == 1 ? "outbound" : "inbound");
 			switch_event_fire(&event);
 		}
 
@@ -757,7 +757,7 @@
 			switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 			conference_add_event_member_data(member, event);
 			conference_add_event_data(conference, event);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "del-member");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "del-member");
 			switch_event_fire(&event);
 		}
 	}
@@ -1127,18 +1127,18 @@
  end:
 
 	if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) {
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", CONF_CHAT_PROTO);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", conference->name);
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", CONF_CHAT_PROTO);
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", conference->name);
 		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s@%s", conference->name, conference->domain);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "status", "Inactive");
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "rpid", "idle");
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "alt_event_type", "dialog");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "status", "Inactive");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "rpid", "idle");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alt_event_type", "dialog");
 		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_count", "%d", EC++);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "unique-id", "%s", conference->name);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "channel-state", "%s", "CS_HANGUP");
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "answer-state", "%s", "terminated");
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "call-direction", "%s", "inbound");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "unique-id", conference->name);
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "channel-state", "CS_HANGUP");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "answer-state", "terminated");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "call-direction", "inbound");
 		switch_event_fire(&event);
 	}
 
@@ -1286,7 +1286,7 @@
 	if (test_eflag(member->conference, EFLAG_ENERGY_LEVEL) &&
 		switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 		conference_add_event_member_data(member, event);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "energy-level");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "energy-level");
 		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "New-Level", "%d", member->energy_level);
 		switch_event_fire(&event);
 	}
@@ -1310,7 +1310,7 @@
 	if (test_eflag(member->conference, EFLAG_ENERGY_LEVEL) &&
 		switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 		conference_add_event_member_data(member, event);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "energy-level");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "energy-level");
 		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "New-Level", "%d", member->energy_level);
 		switch_event_fire(&event);
 	}
@@ -1337,7 +1337,7 @@
 	if (test_eflag(member->conference, EFLAG_ENERGY_LEVEL) &&
 		switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 		conference_add_event_member_data(member, event);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "energy-level");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "energy-level");
 		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "New-Level", "%d", member->energy_level);
 		switch_event_fire(&event);
 	}
@@ -1362,7 +1362,7 @@
 	if (test_eflag(member->conference, EFLAG_VOLUME_LEVEL) &&
 		switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 		conference_add_event_member_data(member, event);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "volume-level");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "volume-level");
 		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "New-Level", "%d", member->volume_out_level);
 		switch_event_fire(&event);
 	}
@@ -1386,7 +1386,7 @@
 	if (test_eflag(member->conference, EFLAG_VOLUME_LEVEL) &&
 		switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 		conference_add_event_member_data(member, event);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "volume-level");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "volume-level");
 		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "New-Level", "%d", member->volume_out_level);
 		switch_event_fire(&event);
 	}
@@ -1411,7 +1411,7 @@
 	if (test_eflag(member->conference, EFLAG_VOLUME_LEVEL) &&
 		switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 		conference_add_event_member_data(member, event);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "volume-level");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "volume-level");
 		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "New-Level", "%d", member->volume_out_level);
 		switch_event_fire(&event);
 	}
@@ -1436,7 +1436,7 @@
 	if (test_eflag(member->conference, EFLAG_GAIN_LEVEL) &&
 		switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 		conference_add_event_member_data(member, event);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "gain-level");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "gain-level");
 		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "New-Level", "%d", member->volume_in_level);
 		switch_event_fire(&event);
 	}
@@ -1460,7 +1460,7 @@
 	if (test_eflag(member->conference, EFLAG_GAIN_LEVEL) &&
 		switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 		conference_add_event_member_data(member, event);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "gain-level");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "gain-level");
 		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "New-Level", "%d", member->volume_in_level);
 		switch_event_fire(&event);
 	}
@@ -1485,7 +1485,7 @@
 	if (test_eflag(member->conference, EFLAG_GAIN_LEVEL) &&
 		switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 		conference_add_event_member_data(member, event);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "gain-level");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "gain-level");
 		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "New-Level", "%d", member->volume_in_level);
 		switch_event_fire(&event);
 	}
@@ -1500,8 +1500,8 @@
 	switch_event_t *event;
 	if (test_eflag(member->conference, EFLAG_DTMF) && switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 		conference_add_event_member_data(member, event);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "dtmf");
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "DTMF-Key", "%s", action->binded_dtmf);
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "dtmf");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "DTMF-Key", action->binded_dtmf);
 		switch_event_fire(&event);
 	}
 }
@@ -1557,7 +1557,7 @@
 					if (test_eflag(member->conference, EFLAG_STOP_TALKING) &&
 						switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 						conference_add_event_member_data(member, event);
-						switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "stop-talking");
+						switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "stop-talking");
 						switch_event_fire(&event);
 					}
 				}
@@ -1609,7 +1609,7 @@
 							if (test_eflag(member->conference, EFLAG_FLOOR_CHANGE) &&
 								switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 								conference_add_event_member_data(member, event);
-								switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "floor-change");
+								switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "floor-change");
 								switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Old-ID", "%d",
 														member->conference->floor_holder ? member->conference->floor_holder->id : 0);
 								switch_event_add_header(event, SWITCH_STACK_BOTTOM, "New-ID", "%d", member->conference->floor_holder ? member->id : 0);
@@ -1622,7 +1622,7 @@
 						if (test_eflag(member->conference, EFLAG_START_TALKING) &&
 							switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 							conference_add_event_member_data(member, event);
-							switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "start-talking");
+							switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "start-talking");
 							switch_event_fire(&event);
 						}
 					}
@@ -1640,7 +1640,7 @@
 						if (test_eflag(member->conference, EFLAG_STOP_TALKING) &&
 							switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 							conference_add_event_member_data(member, event);
-							switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "stop-talking");
+							switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "stop-talking");
 							switch_event_fire(&event);
 						}
 					}
@@ -2737,7 +2737,7 @@
 	if (test_eflag(member->conference, EFLAG_MUTE_MEMBER) &&
 		switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 		conference_add_event_member_data(member, event);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "mute-member");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "mute-member");
 		switch_event_fire(&event);
 	}
 
@@ -2766,7 +2766,7 @@
 	if (test_eflag(member->conference, EFLAG_UNMUTE_MEMBER) &&
 		switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 		conference_add_event_member_data(member, event);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "unmute-member");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "unmute-member");
 		switch_event_fire(&event);
 	}
 
@@ -2786,7 +2786,7 @@
 	}
 	if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 		conference_add_event_member_data(member, event);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "deaf-member");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "deaf-member");
 		switch_event_fire(&event);
 	}
 
@@ -2806,7 +2806,7 @@
 	}
 	if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 		conference_add_event_member_data(member, event);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "undeaf-member");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "undeaf-member");
 		switch_event_fire(&event);
 	}
 
@@ -2831,7 +2831,7 @@
 	if (member->conference && test_eflag(member->conference, EFLAG_KICK_MEMBER)) {
 		if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 			conference_add_event_member_data(member, event);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "kick-member");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "kick-member");
 			switch_event_fire(&event);
 		}
 	}
@@ -2866,8 +2866,8 @@
 	if (test_eflag(member->conference, EFLAG_DTMF_MEMBER) &&
 		switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 		conference_add_event_member_data(member, event);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "dtmf-member");
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Digits", "%s", dtmf);
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "dtmf-member");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Digits", dtmf);
 		switch_event_fire(&event);
 	}
 
@@ -2892,7 +2892,7 @@
 	if (test_eflag(member->conference, EFLAG_ENERGY_LEVEL_MEMBER) &&
 		data && switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 		conference_add_event_member_data(member, event);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "energy-level-member");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "energy-level-member");
 		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Energy-Level", "%d", member->energy_level);
 		switch_event_fire(&event);
 	}
@@ -2919,7 +2919,7 @@
 	if (test_eflag(member->conference, EFLAG_VOLUME_IN_MEMBER) &&
 		data && switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 		conference_add_event_member_data(member, event);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "volume-in-member");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "volume-in-member");
 		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Volume-Level", "%u", member->volume_in_level);
 		switch_event_fire(&event);
 	}
@@ -2946,7 +2946,7 @@
 	if (test_eflag(member->conference, EFLAG_VOLUME_OUT_MEMBER) && data &&
 		switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 		conference_add_event_member_data(member, event);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "volume-out-member");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "volume-out-member");
 		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Volume-Level", "%u", member->volume_out_level);
 		switch_event_fire(&event);
 	}
@@ -3036,8 +3036,8 @@
 			if (test_eflag(conference, EFLAG_PLAY_FILE) &&
 				switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 				conference_add_event_data(conference, event);
-				switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "play-file");
-				switch_event_add_header(event, SWITCH_STACK_BOTTOM, "File", "%s", argv[2]);
+				switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "play-file");
+				switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "File", argv[2]);
 				switch_event_fire(&event);
 			}
 		} else {
@@ -3054,8 +3054,8 @@
 				if (test_eflag(conference, EFLAG_PLAY_FILE_MEMBER) &&
 					switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 					conference_add_event_member_data(member, event);
-					switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "play-file-member");
-					switch_event_add_header(event, SWITCH_STACK_BOTTOM, "File", "%s", argv[2]);
+					switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "play-file-member");
+					switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "File", argv[2]);
 					switch_event_fire(&event);
 				}
 			} else {
@@ -3087,8 +3087,8 @@
 	stream->write_function(stream, "(say) OK\n");
 	if (test_eflag(conference, EFLAG_SPEAK_TEXT) && switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 		conference_add_event_data(conference, event);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "speak-text");
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Text", "%s", text);
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "speak-text");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Text", text);
 		switch_event_fire(&event);
 	}
 	return SWITCH_STATUS_SUCCESS;
@@ -3146,8 +3146,8 @@
 	if (test_eflag(member->conference, EFLAG_SPEAK_TEXT_MEMBER) &&
 		switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 		conference_add_event_member_data(member, event);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "speak-text-member");
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Text", "%s", text);
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "speak-text-member");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Text", text);
 		switch_event_fire(&event);
 	}
 	ret_status = SWITCH_STATUS_SUCCESS;
@@ -3276,7 +3276,7 @@
 	stream->write_function(stream, "OK %s locked\n", argv[0]);
 	if (test_eflag(conference, EFLAG_LOCK) && switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 		conference_add_event_data(conference, event);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "lock");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "lock");
 		switch_event_fire(&event);
 	}
 
@@ -3298,7 +3298,7 @@
 	stream->write_function(stream, "OK %s unlocked\n", argv[0]);
 	if (test_eflag(conference, EFLAG_UNLOCK) && switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 		conference_add_event_data(conference, event);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "unlock");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "unlock");
 		switch_event_fire(&event);
 	}
 
@@ -3458,9 +3458,9 @@
 			if (test_eflag(conference, EFLAG_TRANSFER) &&
 				switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 				conference_add_event_member_data(member, event);
-				switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Old-Conference-Name", "%s", conference->name);
-				switch_event_add_header(event, SWITCH_STACK_BOTTOM, "New-Conference-Name", "%s", argv[3]);
-				switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "transfer");
+				switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Old-Conference-Name", conference->name);
+				switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "New-Conference-Name", argv[3]);
+				switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "transfer");
 				switch_event_fire(&event);
 			}
 		}
@@ -3930,8 +3930,8 @@
 		if (test_eflag(call->conference, EFLAG_BGDIAL_RESULT) &&
 			switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
 			conference_add_event_data(call->conference, event);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "bgdial-result");
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Result", "%s", switch_channel_cause2str(cause));
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "bgdial-result");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Result", switch_channel_cause2str(cause));
 			switch_event_fire(&event);
 		}
 		switch_safe_free(call->bridgeto);
@@ -5181,32 +5181,32 @@
 
 	if ((conference = (conference_obj_t *) switch_core_hash_find(globals.conference_hash, conf_name))) {
 		if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) {
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", CONF_CHAT_PROTO);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", conference->name);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", CONF_CHAT_PROTO);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", conference->name);
 			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s@%s", conference->name, conference->domain);
 			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "status", "Active (%d caller%s)", conference->count, conference->count == 1 ? "" : "s");
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "alt_event_type", "dialog");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alt_event_type", "dialog");
 			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_count", "%d", EC++);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "unique-id", "%s", conf_name);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "channel-state", "%s", "CS_ROUTING");
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "answer-state", "%s", conference->count == 1 ? "early" : "confirmed");
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "call-direction", "%s", conference->count == 1 ? "outbound" : "inbound");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "unique-id", conf_name);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "channel-state", "CS_ROUTING");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "answer-state", conference->count == 1 ? "early" : "confirmed");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "call-direction", conference->count == 1 ? "outbound" : "inbound");
 			switch_event_fire(&event);
 		}
 	} else if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) {
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", CONF_CHAT_PROTO);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", conf_name);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s", to);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "status", "Idle");
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "rpid", "idle");
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "alt_event_type", "dialog");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", CONF_CHAT_PROTO);
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", conf_name);
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "from", to);
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "status", "Idle");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "rpid", "idle");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alt_event_type", "dialog");
 		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_count", "%d", EC++);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "unique-id", "%s", conf_name);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "channel-state", "%s", "CS_HANGUP");
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "answer-state", "%s", "terminated");
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "call-direction", "%s", "inbound");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "unique-id", conf_name);
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "channel-state", "CS_HANGUP");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "answer-state", "terminated");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "call-direction", "inbound");
 		switch_event_fire(&event);
 	}
 
@@ -5236,12 +5236,12 @@
 			switch_event_t *event;
 
 			if (name && switch_event_create(&event, id) == SWITCH_STATUS_SUCCESS) {
-				switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", CONF_CHAT_PROTO);
-				switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", name);
-				switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s", name);
-				switch_event_add_header(event, SWITCH_STACK_BOTTOM, "status", "%s", status ? status : "Available");
-				switch_event_add_header(event, SWITCH_STACK_BOTTOM, "rpid", "idle");
-				switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
+				switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", CONF_CHAT_PROTO);
+				switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", name);
+				switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "from", name);
+				switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "status", status ? status : "Available");
+				switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "rpid", "idle");
+				switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
 				switch_event_fire(&event);
 			}
 		}

Modified: freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c	Fri Aug 15 22:19:43 2008
@@ -1024,14 +1024,14 @@
 		}
 
 		if (switch_event_create(&event, type) == SWITCH_STATUS_SUCCESS) {
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", "dp");
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", __FILE__);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s", argv[1]);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", "dp");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", __FILE__);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "from", argv[1]);
 			if (type == SWITCH_EVENT_PRESENCE_IN) {
-				switch_event_add_header(event, SWITCH_STACK_BOTTOM, "rpid", "%s", argv[2]);
-				switch_event_add_header(event, SWITCH_STACK_BOTTOM, "status", "%s", argv[3]);
+				switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "rpid", argv[2]);
+				switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "status", argv[3]);
 			}
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
 			switch_event_fire(&event);
 		}
 		stream->write_function(stream, "Event Sent");
@@ -2126,16 +2126,16 @@
 	switch_event_t *event;
 
 	if (switch_event_create(&event, SWITCH_EVENT_RECV_MESSAGE) == SWITCH_STATUS_SUCCESS) {
-		if (proto) switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Proto", "%s", proto);
-		if (from) switch_event_add_header(event, SWITCH_STACK_BOTTOM, "From", "%s", from);
-		if (subject) switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Subject", "%s", subject);
-		if (hint) switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Hint", "%s", hint);
+		if (proto) switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Proto", proto);
+		if (from) switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "From", from);
+		if (subject) switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Subject", subject);
+		if (hint) switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Hint", hint);
 		if (body) switch_event_add_body(event, "%s", body);
 		if (to) { 
 			const char *v;
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "To", "%s", to);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "To", to);
 			if ((v = switch_core_get_variable(to))) {
-				switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Command", "%s", v);
+				switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Command", v);
 			}
 		}
 

Modified: freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c	Fri Aug 15 22:19:43 2008
@@ -289,23 +289,23 @@
 	}
 
 	if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) {
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", "%s", "park");
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", node->name);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s", node->name);
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", "park");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", node->name);
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "from", node->name);
 		if ((wait_count = node_consumer_wait_count(node)) > 0) {
 			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "status", "Active (%d waiting)", wait_count);
 		} else {
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "status", "Idle");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "status", "Idle");
 		}
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "rpid", "%s", "unknown");
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "alt_event_type", "dialog");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "rpid", "unknown");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alt_event_type", "dialog");
 		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_count", "%d", 0);
 
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "channel-state", "%s", wait_count > 0 ? "CS_ROUTING" : "CS_HANGUP");
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "unique-id", "%s", node->name);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "answer-state", "%s", wait_count > 0 ? "early" : "terminated");
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "call-direction", "%s", "inbound");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "channel-state", wait_count > 0 ? "CS_ROUTING" : "CS_HANGUP");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "unique-id", node->name);
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "answer-state", wait_count > 0 ? "early" : "terminated");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "call-direction", "inbound");
 		switch_event_fire(&event);
 	}
 }
@@ -540,8 +540,8 @@
 
 		if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, FIFO_EVENT) == SWITCH_STATUS_SUCCESS) {
 			switch_channel_event_set_data(channel, event);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Name", "%s", argv[0]);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Action", "push");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Name", argv[0]);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Action", "push");
 			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Slot", "%d", p);
 			switch_event_fire(&event);
 		}
@@ -633,8 +633,8 @@
 
 			if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, FIFO_EVENT) == SWITCH_STATUS_SUCCESS) {
 				switch_channel_event_set_data(channel, event);
-				switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Name", "%s", argv[0]);
-				switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Action", cd.do_orbit ? "timeout" : "abort");
+				switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Name", argv[0]);
+				switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Action", cd.do_orbit ? "timeout" : "abort");
 				switch_event_fire(&event);
 			}
 			switch_mutex_lock(node->mutex);
@@ -716,8 +716,8 @@
 
 		if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, FIFO_EVENT) == SWITCH_STATUS_SUCCESS) {
 			switch_channel_event_set_data(channel, event);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Name", "%s", argv[0]);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Action", "consumer_start");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Name", argv[0]);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Action", "consumer_start");
 			switch_event_fire(&event);
 		}
 
@@ -847,15 +847,15 @@
 
 				if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, FIFO_EVENT) == SWITCH_STATUS_SUCCESS) {
 					switch_channel_event_set_data(other_channel, event);
-					switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Name", "%s", argv[0]);
-					switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Action", "caller_pop");
+					switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Name", argv[0]);
+					switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Action", "caller_pop");
 					switch_event_fire(&event);
 				}
 
 				if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, FIFO_EVENT) == SWITCH_STATUS_SUCCESS) {
 					switch_channel_event_set_data(channel, event);
-					switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Name", "%s", argv[0]);
-					switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Action", "consumer_pop");
+					switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Name", argv[0]);
+					switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Action", "consumer_pop");
 					switch_event_fire(&event);
 				}
 
@@ -979,8 +979,8 @@
 
 		if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, FIFO_EVENT) == SWITCH_STATUS_SUCCESS) {
 			switch_channel_event_set_data(channel, event);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Name", "%s", argv[0]);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Action", "consumer_stop");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Name", argv[0]);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Action", "consumer_stop");
 			switch_event_fire(&event);
 		}
 

Modified: freeswitch/trunk/src/mod/applications/mod_snom/mod_snom.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_snom/mod_snom.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_snom/mod_snom.c	Fri Aug 15 22:19:43 2008
@@ -47,10 +47,10 @@
 
 	if (user && host && profile) {
 		if (switch_event_create(&event, SWITCH_EVENT_SEND_MESSAGE) == SWITCH_STATUS_SUCCESS) {
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "user", "%s", user);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "host", "%s", host);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "profile", "%s", profile);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "content-type", "application/x-buttons");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "user", user);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "host", host);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "profile", profile);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "content-type", "application/x-buttons");
 			if (action && action_name) {
 				switch_event_add_body(event, "k=%s\nc=%s\nl=%s\nn=%s\na=%s\n", key, light, label, action, action_name);
 			} else {

Modified: freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c	Fri Aug 15 22:19:43 2008
@@ -1263,7 +1263,7 @@
 						/* this isnt done?  it was in the other place
 						 * switch_channel_event_set_data(channel, event);
 						 */
-						switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Message-Type", "forwarded-voicemail");
+						switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Message-Type", "forwarded-voicemail");
 						switch_event_fire(&event);
 					}
 
@@ -1462,8 +1462,8 @@
 					}
 					mwi_id = switch_mprintf("%s@%s", myid, domain_name);
 					switch_assert(mwi_id);
-					switch_event_add_header(event, SWITCH_STACK_BOTTOM, "MWI-Messages-Waiting", "%s", yn);
-					switch_event_add_header(event, SWITCH_STACK_BOTTOM, "MWI-Message-Account", mwi_id);
+					switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "MWI-Messages-Waiting", yn);
+					switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "MWI-Message-Account", mwi_id);
 					switch_event_add_header(event, SWITCH_STACK_BOTTOM, "MWI-Voice-Message", "%d/%d (%d/%d)",
 											total_new_messages, total_saved_messages, total_new_urgent_messages, total_saved_urgent_messages);
 					switch_event_fire(&event);
@@ -1868,8 +1868,8 @@
 				yn = "yes";
 			}
 			mwi_id = switch_mprintf("%s@%s", myid, domain_name);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "MWI-Messages-Waiting", "%s", yn);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "MWI-Message-Account", mwi_id);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "MWI-Messages-Waiting", yn);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "MWI-Message-Account", mwi_id);
 			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "MWI-Voice-Message", "%d/%d (%d/%d)",
 									total_new_messages, total_saved_messages, total_new_urgent_messages, total_saved_urgent_messages);
 			switch_event_fire(&event);
@@ -1965,7 +1965,7 @@
 			switch_event_dup(&event, params);
 
 			if (event) {
-				switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Message-Type", "voicemail");
+				switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Message-Type", "voicemail");
 				switch_event_fire(&event);
 			}
 
@@ -2014,7 +2014,7 @@
 			switch_event_dup(&event, params);
 
 			if (event) {
-				switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Message-Type", "voicemail-notify");
+				switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Message-Type", "voicemail-notify");
 				switch_event_fire(&event);
 			}
 
@@ -2622,8 +2622,8 @@
 						if (total_new_messages || total_new_urgent_messages) {
 							yn = "yes";
 						}
-						switch_event_add_header(new_event, SWITCH_STACK_BOTTOM, "MWI-Messages-Waiting", "%s", yn);
-						switch_event_add_header(new_event, SWITCH_STACK_BOTTOM, "MWI-Message-Account", account);
+						switch_event_add_header_string(new_event, SWITCH_STACK_BOTTOM, "MWI-Messages-Waiting", yn);
+						switch_event_add_header_string(new_event, SWITCH_STACK_BOTTOM, "MWI-Message-Account", account);
 						switch_event_add_header(new_event, SWITCH_STACK_BOTTOM, "MWI-Voice-Message", "%d/%d (%d/%d)",
 												total_new_messages, total_saved_messages, total_new_urgent_messages, total_saved_urgent_messages);
 						created++;
@@ -2638,8 +2638,8 @@
 
 	if (!created) {
 		if (switch_event_create(&new_event, SWITCH_EVENT_MESSAGE_WAITING) == SWITCH_STATUS_SUCCESS) {
-			switch_event_add_header(new_event, SWITCH_STACK_BOTTOM, "MWI-Messages-Waiting", "no");
-			switch_event_add_header(new_event, SWITCH_STACK_BOTTOM, "MWI-Message-Account", account);
+			switch_event_add_header_string(new_event, SWITCH_STACK_BOTTOM, "MWI-Messages-Waiting", "no");
+			switch_event_add_header_string(new_event, SWITCH_STACK_BOTTOM, "MWI-Message-Account", account);
 		}
 	}
 
@@ -2648,7 +2648,7 @@
 
 		for (hp = event->headers; hp; hp = hp->next) {
 			if (!strncasecmp(hp->name, "vm-", 3)) {
-				switch_event_add_header(new_event, SWITCH_STACK_BOTTOM, hp->name + 3, hp->value);
+				switch_event_add_header_string(new_event, SWITCH_STACK_BOTTOM, hp->name + 3, hp->value);
 			}
 		}
 

Modified: freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c	Fri Aug 15 22:19:43 2008
@@ -624,11 +624,11 @@
 
 	if (is_special(sub_to)) {
 		if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) {
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", MDL_CHAT_PROTO);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", profile->login);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s", sub_to);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "rpid", "available");
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "status", "Online");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", MDL_CHAT_PROTO);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", profile->login);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "from", sub_to);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "rpid", "available");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "status", "Online");
 			switch_event_fire(&event);
 		}
 	}
@@ -2367,11 +2367,11 @@
 #if 0
 					if (is_special(to)) {
 						if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) {
-							switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", MDL_CHAT_PROTO);
-							switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", profile->login);
-							switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s", to);
-							//switch_event_add_header(event, SWITCH_STACK_BOTTOM, "rpid", "unknown");
-							switch_event_add_header(event, SWITCH_STACK_BOTTOM, "status", "Click To Call");
+							switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", MDL_CHAT_PROTO);
+							switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", profile->login);
+							switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "from", to);
+							//switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "rpid", "unknown");
+							switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "status", "Click To Call");
 							switch_event_fire(&event);
 						}
 					}
@@ -2380,8 +2380,8 @@
 				break;
 			case LDL_SIGNAL_ROSTER:
 				if (switch_event_create(&event, SWITCH_EVENT_ROSTER) == SWITCH_STATUS_SUCCESS) {
-					switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", MDL_CHAT_PROTO);
-					switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s", from);
+					switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", MDL_CHAT_PROTO);
+					switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "from", from);
 					switch_event_fire(&event);
 				}
 				break;
@@ -2390,10 +2390,10 @@
 					ldl_handle_send_presence(profile->handle, to, from, NULL, NULL, "Click To Call", profile->avatar);
 				} else {
 					if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_PROBE) == SWITCH_STATUS_SUCCESS) {
-						switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", MDL_CHAT_PROTO);
-						switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", profile->login);
-						switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s", from);
-						switch_event_add_header(event, SWITCH_STACK_BOTTOM, "to", "%s", to);
+						switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", MDL_CHAT_PROTO);
+						switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", profile->login);
+						switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "from", from);
+						switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "to", to);
 						switch_event_fire(&event);
 					}
 				}
@@ -2407,11 +2407,11 @@
 				}
 
 				if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) {
-					switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", MDL_CHAT_PROTO);
-					switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", profile->login);
-					switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s", from);
-					switch_event_add_header(event, SWITCH_STACK_BOTTOM, "rpid", "%s", msg);
-					switch_event_add_header(event, SWITCH_STACK_BOTTOM, "status", "%s", subject);
+					switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", MDL_CHAT_PROTO);
+					switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", profile->login);
+					switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "from", from);
+					switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "rpid", msg);
+					switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "status", subject);
 					switch_event_fire(&event);
 				}
 
@@ -2422,11 +2422,11 @@
 #if 0
 				if (is_special(to)) {
 					if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) {
-						switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", MDL_CHAT_PROTO);
-						switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", profile->login);
-						switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s", to);
-						//switch_event_add_header(event, SWITCH_STACK_BOTTOM, "rpid", "unknown");
-						switch_event_add_header(event, SWITCH_STACK_BOTTOM, "status", "Click To Call");
+						switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", MDL_CHAT_PROTO);
+						switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", profile->login);
+						switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "from", to);
+						//switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "rpid", "unknown");
+						switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "status", "Click To Call");
 						switch_event_fire(&event);
 					}
 				}
@@ -2441,9 +2441,9 @@
 					switch_core_db_free(sql);
 				}
 				if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_OUT) == SWITCH_STATUS_SUCCESS) {
-					switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", MDL_CHAT_PROTO);
-					switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", profile->login);
-					switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s", from);
+					switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", MDL_CHAT_PROTO);
+					switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", profile->login);
+					switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "from", from);
 					switch_event_fire(&event);
 				}
 				break;
@@ -2496,7 +2496,7 @@
 			break;
 		case LDL_SIGNAL_LOGIN_SUCCESS:
 			if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, DL_EVENT_LOGIN_SUCCESS) == SWITCH_STATUS_SUCCESS) {
-				switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", ldl_handle_get_login(profile->handle));
+				switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", ldl_handle_get_login(profile->handle));
 				switch_event_fire(&event);
 			}
 			if (profile->user_flags & LDL_FLAG_COMPONENT) {
@@ -2506,13 +2506,13 @@
 			break;
 		case LDL_SIGNAL_LOGIN_FAILURE:
 			if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, DL_EVENT_LOGIN_FAILURE) == SWITCH_STATUS_SUCCESS) {
-				switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", ldl_handle_get_login(profile->handle));
+				switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", ldl_handle_get_login(profile->handle));
 				switch_event_fire(&event);
 			}
 			break;
 		case LDL_SIGNAL_CONNECTED:
 			if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, DL_EVENT_CONNECTED) == SWITCH_STATUS_SUCCESS) {
-				switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", ldl_handle_get_login(profile->handle));
+				switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", ldl_handle_get_login(profile->handle));
 				switch_event_fire(&event);
 			}
 			break;
@@ -2706,17 +2706,17 @@
 				from = freeme;
 			}
 
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", MDL_CHAT_PROTO);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", ldl_handle_get_login(profile->handle));
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "hint", "%s", hint);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s", from);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "to", "%s", to);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "subject", "%s", subject);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", MDL_CHAT_PROTO);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", ldl_handle_get_login(profile->handle));
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "hint", hint);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "from", from);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "to", to);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "subject", subject);
 			if (msg) {
 				switch_event_add_body(event, "%s", msg);
 			}
 			if (switch_core_session_queue_event(tech_pvt->session, &event) != SWITCH_STATUS_SUCCESS) {
-				switch_event_add_header(event, SWITCH_STACK_BOTTOM, "delivery-failure", "true");
+				switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "delivery-failure", "true");
 				switch_event_fire(&event);
 			}
 

Modified: freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c	Fri Aug 15 22:19:43 2008
@@ -908,7 +908,7 @@
 	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "IAX Ready Port %d\n", globals.port);
 
 	if (switch_event_create(&s_event, SWITCH_EVENT_PUBLISH) == SWITCH_STATUS_SUCCESS) {
-		switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "service", "_iax2._udp");
+		switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "service", "_iax2._udp");
 		switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "port", "%d", globals.port);
 		switch_event_fire(&s_event);
 	}

Modified: freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c	Fri Aug 15 22:19:43 2008
@@ -244,8 +244,8 @@
 				switch_snprintf(buf, sizeof(buf), "BRRRRING! BRRRRING! call %s\n", tech_pvt->call_id);
 
 				if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, MY_EVENT_RINGING) == SWITCH_STATUS_SUCCESS) {
-					switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_info", "%s", buf);
-					switch_event_add_header(event, SWITCH_STACK_BOTTOM, "call_id", "%s", tech_pvt->call_id);
+					switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "event_info", buf);
+					switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "call_id", tech_pvt->call_id);
 					switch_channel_event_set_data(channel, event);
 					switch_event_fire(&event);
 				}

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	Fri Aug 15 22:19:43 2008
@@ -613,13 +613,13 @@
 								(sofia_test_pflag(profile, PFLAG_TLS)) ? ",_sips._tcp" : "");
 
 		switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "port", "%d", profile->sip_port);
-		switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "module_name", "%s", "mod_sofia");
-		switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "profile_name", "%s", profile->name);
-		switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "profile_uri", "%s", profile->url);
+		switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "module_name", "mod_sofia");
+		switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "profile_name", profile->name);
+		switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "profile_uri", profile->url);
 
 		if (sofia_test_pflag(profile, PFLAG_TLS)) {
 			switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "tls_port", "%d", profile->tls_sip_port);
-			switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "profile_tls_uri", "%s", profile->tls_url);
+			switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "profile_tls_uri", profile->tls_url);
 		}
 		switch_event_fire(&s_event);
 	}
@@ -673,13 +673,13 @@
 								(sofia_test_pflag(profile, PFLAG_TLS)) ? ",_sips._tcp" : "");
 
 		switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "port", "%d", profile->sip_port);
-		switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "module_name", "%s", "mod_sofia");
-		switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "profile_name", "%s", profile->name);
-		switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "profile_uri", "%s", profile->url);
+		switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "module_name", "mod_sofia");
+		switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "profile_name", profile->name);
+		switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "profile_uri", profile->url);
 
 		if (sofia_test_pflag(profile, PFLAG_TLS)) {
 			switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "tls_port", "%d", profile->tls_sip_port);
-			switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "profile_tls_uri", "%s", profile->tls_url);
+			switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "profile_tls_uri", profile->tls_url);
 		}
 		switch_event_fire(&s_event);
 	}

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c	Fri Aug 15 22:19:43 2008
@@ -653,7 +653,7 @@
 	if (!strcasecmp(event_name, "message-summary")) {
 		if (switch_event_create(&event, SWITCH_EVENT_MESSAGE_QUERY) == SWITCH_STATUS_SUCCESS) {
 			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Message-Account", "sip:%s@%s", user, host);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "VM-Sofia-Profile", "%s", profile->name);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "VM-Sofia-Profile", profile->name);
 			switch_event_fire(&event);
 		}
 		return 0;
@@ -663,13 +663,13 @@
 		status = "Available";
 	}
 	if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_PROBE) == SWITCH_STATUS_SUCCESS) {
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", SOFIA_CHAT_PROTO);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", profile->url);
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", SOFIA_CHAT_PROTO);
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", profile->url);
 		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s@%s", user, host);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "status", "%s", status);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_subtype", "probe");
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto-specific-event-name", "%s", event_name);
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "status", status);
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "event_subtype", "probe");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto-specific-event-name", event_name);
 		switch_event_fire(&event);
 	}
 
@@ -707,29 +707,29 @@
 	}
 
 	if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) {
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", "%s", proto ? proto : SOFIA_CHAT_PROTO);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", profile->url);
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", proto ? proto : SOFIA_CHAT_PROTO);
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", profile->url);
 		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s@%s", user, host);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "status", "%s", status);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "rpid", "%s", rpid);
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
-		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "alt_event_type", "dialog");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "status", status);
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "rpid", rpid);
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
+		switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alt_event_type", "dialog");
 		switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_count", "%d", 0);
 
 		if (!switch_strlen_zero(to_user)) {
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "to-user", "%s", to_user);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "to-user", to_user);
 		}
 
 		if (switch_strlen_zero(state)) {
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "unique-id", "%s", SOFIA_CHAT_PROTO);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "channel-state", "%s", "CS_HANGUP");
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "answer-state", "%s", "resubscribe");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "unique-id", SOFIA_CHAT_PROTO);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "channel-state", "CS_HANGUP");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "answer-state", "resubscribe");
 		} else {
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "channel-state", "%s", "CS_ROUTING");
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "unique-id", "%s", uuid);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "answer-state", "%s", state);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "astate", "%s", state);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "call-direction", "%s", direction);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "channel-state", "CS_ROUTING");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "unique-id", uuid);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "answer-state", state);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "astate", state);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "call-direction", direction);
 		}
 
 		switch_event_fire(&event);
@@ -1334,21 +1334,21 @@
 			}
 
 			if (switch_event_create(&sevent, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) {
-				switch_event_add_header(sevent, SWITCH_STACK_BOTTOM, "proto", protocol);
-				switch_event_add_header(sevent, SWITCH_STACK_BOTTOM, "login", "%s", profile->name);
+				switch_event_add_header_string(sevent, SWITCH_STACK_BOTTOM, "proto", protocol);
+				switch_event_add_header_string(sevent, SWITCH_STACK_BOTTOM, "login", profile->name);
 				switch_event_add_header(sevent, SWITCH_STACK_BOTTOM, "from", "%s@%s", to_user, to_host);
-				switch_event_add_header(sevent, SWITCH_STACK_BOTTOM, "rpid", "active");
-				switch_event_add_header(sevent, SWITCH_STACK_BOTTOM, "status", "Click To Call");
+				switch_event_add_header_string(sevent, SWITCH_STACK_BOTTOM, "rpid", "active");
+				switch_event_add_header_string(sevent, SWITCH_STACK_BOTTOM, "status", "Click To Call");
 				switch_event_fire(&sevent);
 			}
 
 		} else {
 			if (switch_event_create(&sevent, SWITCH_EVENT_PRESENCE_PROBE) == SWITCH_STATUS_SUCCESS) {
-				switch_event_add_header(sevent, SWITCH_STACK_BOTTOM, "proto", SOFIA_CHAT_PROTO);
-				switch_event_add_header(sevent, SWITCH_STACK_BOTTOM, "login", "%s", profile->name);
+				switch_event_add_header_string(sevent, SWITCH_STACK_BOTTOM, "proto", SOFIA_CHAT_PROTO);
+				switch_event_add_header_string(sevent, SWITCH_STACK_BOTTOM, "login", profile->name);
 				switch_event_add_header(sevent, SWITCH_STACK_BOTTOM, "from", "%s@%s", from_user, from_host);
 				switch_event_add_header(sevent, SWITCH_STACK_BOTTOM, "to", "%s@%s", to_user, to_host);
-				switch_event_add_header(sevent, SWITCH_STACK_BOTTOM, "proto-specific-event-name", "%s", event);
+				switch_event_add_header_string(sevent, SWITCH_STACK_BOTTOM, "proto-specific-event-name", event);
 				switch_event_fire(&sevent);
 			}
 		}
@@ -1553,23 +1553,23 @@
 
 				if (in) {
 					if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) {
-						switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", SOFIA_CHAT_PROTO);
-						switch_event_add_header(event, SWITCH_STACK_BOTTOM, "rpid", "%s", rpid);
-						switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", profile->url);
+						switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", SOFIA_CHAT_PROTO);
+						switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "rpid", rpid);
+						switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", profile->url);
 						switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s@%s", from_user, from_host);
 
-						switch_event_add_header(event, SWITCH_STACK_BOTTOM, "status", "%s", note_txt);
-						switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_type", "%s", event_type);
+						switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "status", note_txt);
+						switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "event_type", event_type);
 						switch_event_fire(&event);
 					}
 				} else {
 					if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_OUT) == SWITCH_STATUS_SUCCESS) {
-						switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", SOFIA_CHAT_PROTO);
-						switch_event_add_header(event, SWITCH_STACK_BOTTOM, "rpid", "%s", rpid);
-						switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", profile->url);
+						switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", SOFIA_CHAT_PROTO);
+						switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "rpid", rpid);
+						switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", profile->url);
 						switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s@%s", from_user, from_host);
 
-						switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_type", "%s", event_type);
+						switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "event_type", event_type);
 						switch_event_fire(&event);
 					}
 				}
@@ -1670,18 +1670,18 @@
 			if ((tech_pvt = (private_object_t *) switch_core_hash_find(profile->chat_hash, hash_key))) {
 				channel = switch_core_session_get_channel(tech_pvt->session);
 				if (switch_event_create(&event, SWITCH_EVENT_MESSAGE) == SWITCH_STATUS_SUCCESS) {
-					switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", SOFIA_CHAT_PROTO);
-					switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", profile->url);
-					switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s", from_addr);
-					switch_event_add_header(event, SWITCH_STACK_BOTTOM, "hint", "%s", full_from);
-					switch_event_add_header(event, SWITCH_STACK_BOTTOM, "to", "%s", to_addr);
-					switch_event_add_header(event, SWITCH_STACK_BOTTOM, "subject", "SIMPLE MESSAGE");
+					switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", SOFIA_CHAT_PROTO);
+					switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", profile->url);
+					switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "from", from_addr);
+					switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "hint", full_from);
+					switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "to", to_addr);
+					switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "subject", "SIMPLE MESSAGE");
 					if (msg) {
 						switch_event_add_body(event, "%s", msg);
 					}
 					
 					if (switch_core_session_queue_event(tech_pvt->session, &event) != SWITCH_STATUS_SUCCESS) {
-						switch_event_add_header(event, SWITCH_STACK_BOTTOM, "delivery-failure", "true");
+						switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "delivery-failure", "true");
 						switch_event_fire(&event);
 					}
 				}

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c	Fri Aug 15 22:19:43 2008
@@ -292,13 +292,13 @@
 
 	if (argc >= 3) {
 		if (switch_event_create_subclass(&s_event, SWITCH_EVENT_CUSTOM, MY_EVENT_EXPIRE) == SWITCH_STATUS_SUCCESS) {
-			switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "profile-name", "%s", argv[8]);
-			switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "call-id", "%s", argv[0]);
-			switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "user", "%s", argv[1]);
-			switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "host", "%s", argv[2]);
-			switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "contact", "%s", argv[3]);
-			switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "expires", "%s", argv[6]);
-			switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "user-agent", "%s", argv[7]);
+			switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "profile-name", argv[8]);
+			switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "call-id", argv[0]);
+			switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "user", argv[1]);
+			switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "host", argv[2]);
+			switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "contact", argv[3]);
+			switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "expires", argv[6]);
+			switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "user-agent", argv[7]);
 			switch_event_fire(&s_event);
 		}
 	}
@@ -763,15 +763,15 @@
 		switch_mutex_unlock(profile->ireg_mutex);
 
 		if (switch_event_create_subclass(&s_event, SWITCH_EVENT_CUSTOM, MY_EVENT_REGISTER) == SWITCH_STATUS_SUCCESS) {
-			switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "profile-name", "%s", profile->name);
-			switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "from-user", "%s", to_user);
-			switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "from-host", "%s", to_host);
-			switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "contact", "%s", contact_str);
-			switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "call-id", "%s", call_id);
-			switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "rpid", "%s", rpid);
+			switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "profile-name", profile->name);
+			switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "from-user", to_user);
+			switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "from-host", to_host);
+			switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "contact", contact_str);
+			switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "call-id", call_id);
+			switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "rpid", rpid);
 			switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "expires", "%ld", (long) exptime);
-			switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "to-user", "%s", from_user);
-			switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "to-host", "%s", from_host);
+			switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "to-user", from_user);
+			switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "to-host", from_host);
 			switch_event_fire(&s_event);
 		}
 
@@ -783,14 +783,14 @@
 		}
 
 		if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_PROBE) == SWITCH_STATUS_SUCCESS) {
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", "sip");
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", profile->url);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "rpid", "%s", rpid);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", "sip");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", profile->url);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "rpid", rpid);
 			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s@%s", to_user, to_host);
 			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "to", "%s@%s", to_user, to_host);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "status", "Registered");
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_subtype", "probe");
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "status", "Registered");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "event_subtype", "probe");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
 			switch_event_fire(&event);
 		}
 	} else {
@@ -821,13 +821,13 @@
 			}
 		}
 		if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_OUT) == SWITCH_STATUS_SUCCESS) {
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", "sip");
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", profile->url);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", "sip");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", profile->url);
 			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s+%s@%s", SOFIA_CHAT_PROTO, to_user, to_host);
 
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "status", "unavailable");
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "rpid", "%s", rpid);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "status", "unavailable");
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "rpid", rpid);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
 			switch_event_fire(&event);
 		}
 	}
@@ -843,16 +843,16 @@
 
 			if (switch_event_create(&s_event, SWITCH_EVENT_MESSAGE_QUERY) == SWITCH_STATUS_SUCCESS) {
 				switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "Message-Account", "sip:%s@%s", to_user, to_host);
-				switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "VM-Sofia-Profile", "%s", profile->name);
+				switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "VM-Sofia-Profile", profile->name);
 			}
 		} else {
 			if (switch_event_create_subclass(&s_event, SWITCH_EVENT_CUSTOM, MY_EVENT_UNREGISTER) == SWITCH_STATUS_SUCCESS) {
-				switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "profile-name", "%s", profile->name);
-				switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "from-user", "%s", to_user);
-				switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "from-host", "%s", to_host);
-				switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "contact", "%s", contact_str);
-				switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "call-id", "%s", call_id);
-				switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "rpid", "%s", rpid);
+				switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "profile-name", profile->name);
+				switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "from-user", to_user);
+				switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "from-host", to_host);
+				switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "contact", contact_str);
+				switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "call-id", call_id);
+				switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "rpid", rpid);
 				switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "expires", "%ld", (long) exptime);
 			}
 		}
@@ -1391,12 +1391,12 @@
 			switch_xml_t xparams[2];
 			int i = 0;
 
-			switch_event_add_header(*v_event, SWITCH_STACK_BOTTOM, "sip_mailbox", "%s", mailbox);
-			switch_event_add_header(*v_event, SWITCH_STACK_BOTTOM, "sip_auth_username", "%s", username);
-			switch_event_add_header(*v_event, SWITCH_STACK_BOTTOM, "sip_auth_realm", "%s", realm);
-			switch_event_add_header(*v_event, SWITCH_STACK_BOTTOM, "mailbox", "%s", mailbox);
-			switch_event_add_header(*v_event, SWITCH_STACK_BOTTOM, "user_name", "%s", username);
-			switch_event_add_header(*v_event, SWITCH_STACK_BOTTOM, "domain_name", "%s", realm);
+			switch_event_add_header_string(*v_event, SWITCH_STACK_BOTTOM, "sip_mailbox", mailbox);
+			switch_event_add_header_string(*v_event, SWITCH_STACK_BOTTOM, "sip_auth_username", username);
+			switch_event_add_header_string(*v_event, SWITCH_STACK_BOTTOM, "sip_auth_realm", realm);
+			switch_event_add_header_string(*v_event, SWITCH_STACK_BOTTOM, "mailbox", mailbox);
+			switch_event_add_header_string(*v_event, SWITCH_STACK_BOTTOM, "user_name", username);
+			switch_event_add_header_string(*v_event, SWITCH_STACK_BOTTOM, "domain_name", realm);
 
 			if ((dparams = switch_xml_child(domain, "variables"))) {
 				xparams[i++] = dparams;
@@ -1416,7 +1416,7 @@
 						sofia_gateway_t *gateway_ptr = NULL;
 
 						if (!switch_strlen_zero(var) && !switch_strlen_zero(val)) {
-							switch_event_add_header(*v_event, SWITCH_STACK_BOTTOM, var, "%s", val);
+							switch_event_add_header_string(*v_event, SWITCH_STACK_BOTTOM, var, val);
 
 							if (!strcasecmp(var, "register-gateway")) {
 								if (!strcasecmp(val, "all")) {

Modified: freeswitch/trunk/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c	(original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c	Fri Aug 15 22:19:43 2008
@@ -168,7 +168,7 @@
 		case SWITCH_EVENT_LOG:
 			return;
 		default:
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Multicast-Sender", "%s", globals.hostname);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Multicast-Sender", globals.hostname);
 			if (switch_event_serialize(event, &packet, SWITCH_TRUE) == SWITCH_STATUS_SUCCESS) {
 				size_t len = strlen(packet) + sizeof(globals.host_hash);
 				char *buf = malloc(len + 1);
@@ -309,7 +309,7 @@
 		//switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\nEVENT %d\n--------------------------------\n%s\n", (int) len, packet);
 		if (switch_event_create_subclass(&local_event, SWITCH_EVENT_CUSTOM, MULTICAST_EVENT) == SWITCH_STATUS_SUCCESS) {
 			char *var, *val, *term = NULL, tmpname[128];
-			switch_event_add_header(local_event, SWITCH_STACK_BOTTOM, "Multicast", "yes");
+			switch_event_add_header_string(local_event, SWITCH_STACK_BOTTOM, "Multicast", "yes");
 			var = packet;
 			while (*var) {
 				if ((val = strchr(var, ':')) != 0) {
@@ -324,7 +324,7 @@
 						}
 					}
 					switch_snprintf(tmpname, sizeof(tmpname), "Orig-%s", var);
-					switch_event_add_header(local_event, SWITCH_STACK_BOTTOM, tmpname, "%s", val);
+					switch_event_add_header_string(local_event, SWITCH_STACK_BOTTOM, tmpname, val);
 					var = term + 1;
 				} else {
 					break;

Modified: freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c	(original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c	Fri Aug 15 22:19:43 2008
@@ -481,7 +481,7 @@
 								}
 							}
 							if (var && val) {
-								switch_event_add_header(*event, SWITCH_STACK_BOTTOM, var, "%s", val);
+								switch_event_add_header_string(*event, SWITCH_STACK_BOTTOM, var, val);
 								if (!strcasecmp(var, "content-length")) {
 									clen = atoi(val);
 									
@@ -655,10 +655,10 @@
 		switch_event_t *event;
 
 		if (switch_event_create(&event, SWITCH_EVENT_BACKGROUND_JOB) == SWITCH_STATUS_SUCCESS) {
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Job-UUID", "%s", acs->uuid_str);
-			switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Job-Command", "%s", acs->api_cmd);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Job-UUID", acs->uuid_str);
+			switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Job-Command", acs->api_cmd);
 			if (acs->arg) {
-				switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Job-Command-Arg", "%s", acs->arg);
+				switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Job-Command-Arg", acs->arg);
 			}
 			switch_event_add_body(event, "%s", reply);
 			switch_event_fire(&event);
@@ -1186,10 +1186,10 @@
 
 		switch_caller_profile_event_set_data(switch_channel_get_caller_profile(channel), "Channel", call_event);
 		switch_channel_event_set_data(channel, call_event);
-		switch_event_add_header(call_event, SWITCH_STACK_BOTTOM, "Content-Type", "command/reply");
-		switch_event_add_header(call_event, SWITCH_STACK_BOTTOM, "Reply-Text", "+OK\n");
-		switch_event_add_header(call_event, SWITCH_STACK_BOTTOM, "Socket-Mode", switch_test_flag(listener, LFLAG_ASYNC) ? "async" : "static");
-		switch_event_add_header(call_event, SWITCH_STACK_BOTTOM, "Control", switch_test_flag(listener, LFLAG_FULL) ? "full" : "single-channel");
+		switch_event_add_header_string(call_event, SWITCH_STACK_BOTTOM, "Content-Type", "command/reply");
+		switch_event_add_header_string(call_event, SWITCH_STACK_BOTTOM, "Reply-Text", "+OK\n");
+		switch_event_add_header_string(call_event, SWITCH_STACK_BOTTOM, "Socket-Mode", switch_test_flag(listener, LFLAG_ASYNC) ? "async" : "static");
+		switch_event_add_header_string(call_event, SWITCH_STACK_BOTTOM, "Control", switch_test_flag(listener, LFLAG_FULL) ? "full" : "single-channel");
 
 		switch_event_serialize(call_event, &event_str, SWITCH_TRUE);
 		if (!event_str) {

Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c	(original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c	Fri Aug 15 22:19:43 2008
@@ -195,7 +195,7 @@
 	if (argc > 1) {
 		char *hname = JS_GetStringBytes(JS_ValueToString(cx, argv[0]));
 		char *hval = JS_GetStringBytes(JS_ValueToString(cx, argv[1]));
-		switch_event_add_header(ro->stream->param_event, SWITCH_STACK_BOTTOM, hname, "%s", hval);
+		switch_event_add_header_string(ro->stream->param_event, SWITCH_STACK_BOTTOM, hname, hval);
 		*rval = BOOLEAN_TO_JSVAL(JS_TRUE);
 		return JS_TRUE;
 	}
@@ -547,7 +547,7 @@
 	if (argc > 1) {
 		char *hname = JS_GetStringBytes(JS_ValueToString(cx, argv[0]));
 		char *hval = JS_GetStringBytes(JS_ValueToString(cx, argv[1]));
-		switch_event_add_header(eo->event, SWITCH_STACK_BOTTOM, hname, "%s", hval);
+		switch_event_add_header_string(eo->event, SWITCH_STACK_BOTTOM, hname, hval);
 		*rval = BOOLEAN_TO_JSVAL(JS_TRUE);
 		return JS_TRUE;
 	}

Modified: freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
==============================================================================
--- freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c	(original)
+++ freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c	Fri Aug 15 22:19:43 2008
@@ -521,30 +521,30 @@
 		const char *const content_length = RequestHeaderValue(r, "content-length");
 		
 		if (html)
-			switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, "Content-type", "%s", "text/html");
+			switch_event_add_header_string(stream.param_event, SWITCH_STACK_BOTTOM, "Content-type", "text/html");
 		else if (text)
-			switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, "Content-type", "%s", "text/plain");
+			switch_event_add_header_string(stream.param_event, SWITCH_STACK_BOTTOM, "Content-type", "text/plain");
 		if (fs_user)
-			switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, "FreeSWITCH-User", "%s", fs_user);
+			switch_event_add_header_string(stream.param_event, SWITCH_STACK_BOTTOM, "FreeSWITCH-User", fs_user);
 		if (fs_domain)
-			switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, "FreeSWITCH-Domain", "%s", fs_domain);
+			switch_event_add_header_string(stream.param_event, SWITCH_STACK_BOTTOM, "FreeSWITCH-Domain", fs_domain);
 		if (path_info)
-			switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-Path-Info", "%s", path_info);
-		switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-URI", "%s", r->requestInfo.uri);
+			switch_event_add_header_string(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-Path-Info", path_info);
+		switch_event_add_header_string(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-URI", r->requestInfo.uri);
 		if (r->requestInfo.query)
-			switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-QUERY", "%s", r->requestInfo.query);
+			switch_event_add_header_string(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-QUERY", r->requestInfo.query);
 		if (r->requestInfo.host)
-			switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-HOST", "%s", r->requestInfo.host);
+			switch_event_add_header_string(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-HOST", r->requestInfo.host);
 		if (r->requestInfo.from)
-			switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-FROM", "%s", r->requestInfo.from);
+			switch_event_add_header_string(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-FROM", r->requestInfo.from);
 		if (r->requestInfo.useragent)
-			switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-USER-AGENT", "%s", r->requestInfo.useragent);
+			switch_event_add_header_string(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-USER-AGENT", r->requestInfo.useragent);
 		if (r->requestInfo.referer)
-			switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-REFERER", "%s", r->requestInfo.referer);
+			switch_event_add_header_string(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-REFERER", r->requestInfo.referer);
 		if (r->requestInfo.requestline)
-			switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-REQUESTLINE", "%s", r->requestInfo.requestline);
+			switch_event_add_header_string(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-REQUESTLINE", r->requestInfo.requestline);
 		if (r->requestInfo.user)
-			switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-USER", "%s", r->requestInfo.user);
+			switch_event_add_header_string(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-USER", r->requestInfo.user);
 		if (r->requestInfo.port)
 			switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-PORT", "%u", r->requestInfo.port);
 		if (r->requestInfo.query || content_length) {
@@ -586,7 +586,7 @@
 				}
 			}
 			if (query) {
-				switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-QUERY", "%s", query);
+				switch_event_add_header_string(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-QUERY", query);
 
 				qd = strdup(query);
 				switch_assert(qd != NULL);
@@ -612,7 +612,7 @@
 					name = q;
 					if ((val = strchr(name, '='))) {
 						*val++ = '\0';
-						switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, name, "%s", val);
+						switch_event_add_header_string(stream.param_event, SWITCH_STACK_BOTTOM, name, val);
 					}
 					q = next;
 				} while (q != NULL);



More information about the Freeswitch-svn mailing list