]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
hangup properly on malformed 3pcc calls being bastardized into a way to ping
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 29 May 2008 19:05:48 +0000 (19:05 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 29 May 2008 19:05:48 +0000 (19:05 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8722 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia.c

index ba7f840b8a9074b6780e5e91c3a2afc9abe1684d..8f1d4d4a501a7ca3558ee1aa295ed9b17214d20d 100644 (file)
@@ -2056,7 +2056,9 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                break;
        case nua_callstate_terminating:
                if (session) {
-                       if (!switch_test_flag(tech_pvt, TFLAG_BYE)) {
+                       if (status == 488 || switch_channel_get_state(channel) == CS_HIBERNATE) {
+                               tech_pvt->q850_cause = SWITCH_CAUSE_MANDATORY_IE_MISSING;
+                       } else if (!switch_test_flag(tech_pvt, TFLAG_BYE)) {
                                switch_set_flag_locked(tech_pvt, TFLAG_BYE);
                        }
                }