[Freeswitch-svn] [commit] r7342 - in freeswitch/trunk/src/mod: applications/mod_dptools applications/mod_voicemail endpoints/mod_sofia

Freeswitch SVN mikej at freeswitch.org
Thu Jan 24 06:56:57 EST 2008


Author: mikej
Date: Thu Jan 24 06:56:57 2008
New Revision: 7342

Modified:
   freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
   freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c

Log:
use switch_event_add_header_string

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	Thu Jan 24 06:56:57 2008
@@ -1432,7 +1432,7 @@
 
 	switch_event_create(&params, SWITCH_EVENT_MESSAGE);
 	switch_assert(params);
-	switch_event_add_header(params, SWITCH_STACK_BOTTOM, "as_channel", "true");
+	switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "as_channel", "true");
 	
 
 	if (switch_xml_locate_user("id", user, domain, NULL, &xml, &x_domain, &x_user, params) != SWITCH_STATUS_SUCCESS) {

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	Thu Jan 24 06:56:57 2008
@@ -1568,9 +1568,9 @@
 
             switch_event_create(&params, SWITCH_EVENT_MESSAGE);
             switch_assert(params);
-            switch_event_add_header(params, SWITCH_STACK_BOTTOM, "mailbox", myid);
-            switch_event_add_header(params, SWITCH_STACK_BOTTOM, "destination_number", caller_profile->destination_number);
-            switch_event_add_header(params, SWITCH_STACK_BOTTOM, "caller_id_number", caller_profile->caller_id_number);
+            switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "mailbox", myid);
+            switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "destination_number", caller_profile->destination_number);
+            switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "caller_id_number", caller_profile->caller_id_number);
             
             
 			if (switch_xml_locate_user("id", myid, domain_name, switch_channel_get_variable(channel, "network_addr"), 
@@ -1752,7 +1752,7 @@
         
         switch_event_create(&params, SWITCH_EVENT_MESSAGE);
         switch_assert(params);
-        switch_event_add_header(params, SWITCH_STACK_BOTTOM, "mailbox", id);
+        switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "mailbox", id);
         
 		x_user = x_domain = x_domain_root = NULL;
 		if (switch_xml_locate_user("id", id, domain_name, switch_channel_get_variable(channel, "network_addr"), 

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	Thu Jan 24 06:56:57 2008
@@ -856,9 +856,9 @@
 	
 	switch_event_create(&params, SWITCH_EVENT_MESSAGE);
 	switch_assert(params);
-	switch_event_add_header(params, SWITCH_STACK_BOTTOM, "action", "sip_auth");
-	switch_event_add_header(params, SWITCH_STACK_BOTTOM, "profile", profile->name);
-	switch_event_add_header(params, SWITCH_STACK_BOTTOM, "user_agent", (sip && sip->sip_user_agent) ? sip->sip_user_agent->g_string : "unknown");
+	switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "action", "sip_auth");
+	switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "profile", profile->name);
+	switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "user_agent", (sip && sip->sip_user_agent) ? sip->sip_user_agent->g_string : "unknown");
 	
 	
 	if (!switch_strlen_zero(profile->reg_domain)) {



More information about the Freeswitch-svn mailing list