From: Brian West Date: Mon, 5 Jan 2009 16:22:09 +0000 (+0000) Subject: auto_answer isn't set on a bridge X-Git-Tag: v1.0.3~819 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b58f8dbf50a6d4a9ed3934f44b226cb8ea6dc79;p=thirdparty%2Ffreeswitch.git auto_answer isn't set on a bridge git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11069 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index f1d4332530..6f0a2727ad 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -2528,7 +2528,13 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session 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", ";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);