From f09f8b1cd170257947753ef2b14774e2ceaad642 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 10 Feb 2006 02:09:39 +0000 Subject: [PATCH] fix answer thing in exosip git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@581 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_exosip/mod_exosip.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mod/endpoints/mod_exosip/mod_exosip.c b/src/mod/endpoints/mod_exosip/mod_exosip.c index 2d1584166b..57ac6a9206 100644 --- a/src/mod/endpoints/mod_exosip/mod_exosip.c +++ b/src/mod/endpoints/mod_exosip/mod_exosip.c @@ -62,7 +62,8 @@ typedef enum { TFLAG_WRITING = (1 << 5), TFLAG_USING_CODEC = (1 << 6), TFLAG_RTP = (1 << 7), - TFLAG_BYE = (1 << 8) + TFLAG_BYE = (1 << 8), + TFLAG_ANS = (1 << 9) } TFLAGS; @@ -513,11 +514,10 @@ static switch_status exosip_answer_channel(switch_core_session *session) tech_pvt = switch_core_session_get_private(session); assert(tech_pvt != NULL); - if (!switch_channel_test_flag(channel, CF_OUTBOUND)) { + if (!switch_test_flag(tech_pvt, TFLAG_ANS) && !switch_channel_test_flag(channel, CF_OUTBOUND)) { char *buf = NULL; osip_message_t *answer = NULL; - /* Transmit 200 OK with SDP */ eXosip_lock(); eXosip_call_build_answer(tech_pvt->tid, 200, &answer); @@ -527,6 +527,7 @@ static switch_status exosip_answer_channel(switch_core_session *session) free(buf); eXosip_call_send_answer(tech_pvt->tid, 200, answer); eXosip_unlock(); + switch_set_flag(tech_pvt, TFLAG_ANS); }