]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix answer thing in exosip
authorAnthony Minessale <anthony.minessale@gmail.com>
Fri, 10 Feb 2006 02:09:39 +0000 (02:09 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Fri, 10 Feb 2006 02:09:39 +0000 (02:09 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@581 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_exosip/mod_exosip.c

index 2d1584166bdce52ee30c2ef6c81356183899c2ab..57ac6a92062de118fbe74f0b1f01a90f60ca8608 100644 (file)
@@ -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);
        }