From 464ba5a395651b140701141b3bfd0e1a3997d1d8 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 5 Oct 2007 18:05:51 +0000 Subject: [PATCH] update git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5821 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/sofia.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 9597b421f0..5b43c63487 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -55,11 +55,13 @@ void sofia_handle_sip_i_notify(switch_core_session_t *session, int status, if (session) { channel = switch_core_session_get_channel(session); assert(channel != NULL); - switch_channel_answer(channel); - switch_channel_set_variable(channel, "auto_answer_destination", switch_channel_get_variable(channel, "destination_number")); - switch_ivr_session_transfer(session, "auto_answer", NULL , NULL); - nua_respond(nh, SIP_200_OK, NUTAG_WITH_THIS(nua), TAG_END()); - return; + if (!switch_channel_test_flag(channel, CF_OUTBOUND)) { + switch_channel_answer(channel); + switch_channel_set_variable(channel, "auto_answer_destination", switch_channel_get_variable(channel, "destination_number")); + switch_ivr_session_transfer(session, "auto_answer", NULL , NULL); + nua_respond(nh, SIP_200_OK, NUTAG_WITH_THIS(nua), TAG_END()); + return; + } } } }