[Freeswitch-branches] [commit] r11389 - freeswitch/branches/1.0/src/mod/endpoints/mod_sofia

FreeSWITCH SVN mikej at freeswitch.org
Thu Jan 22 12:04:31 PST 2009


Author: mikej
Date: Thu Jan 22 14:04:30 2009
New Revision: 11389

Log:
mod_sofia: fix sip_auto_answer=true (r:11069)

Modified:
   freeswitch/branches/1.0/src/mod/endpoints/mod_sofia/mod_sofia.c

Modified: freeswitch/branches/1.0/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/branches/1.0/src/mod/endpoints/mod_sofia/mod_sofia.c	(original)
+++ freeswitch/branches/1.0/src/mod/endpoints/mod_sofia/mod_sofia.c	Thu Jan 22 14:04:30 2009
@@ -2528,7 +2528,13 @@
 
 	if (session) {
 		switch_channel_t *o_channel = switch_core_session_get_channel(session);
+		const char *vval = NULL;
 
+		if ((vval = switch_channel_get_variable(o_channel, "sip_auto_answer")) && switch_true(vval)) {
+			switch_channel_set_variable_printf(nchannel, "sip_h_Call-Info", "<sip:%s>;answer-after=0", profile->sipip);
+			switch_channel_set_variable(nchannel, "sip_invite_params", "intercom=true");
+		}
+		
 		switch_ivr_transfer_variable(session, nsession, SOFIA_REPLACES_HEADER);
 		switch_ivr_transfer_variable(session, nsession, "sip_auto_answer");
 		switch_ivr_transfer_variable(session, nsession, SOFIA_SIP_HEADER_PREFIX_T);



More information about the Freeswitch-branches mailing list