]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-8679: [mod_sofia] no missed call if call is anwered by someone else
authorRaphael Lechner <raphael.lechner@gmail.com>
Mon, 4 Jan 2016 20:33:24 +0000 (21:33 +0100)
committerRaphael Lechner <raphael.lechner@gmail.com>
Mon, 4 Jan 2016 20:33:24 +0000 (21:33 +0100)
sofia is sending Call completed elsewhere to the other involved phones if not disabled by the option ignore_completed_elsewhere

src/mod/endpoints/mod_sofia/mod_sofia.c

index 27b3375420779b58d591e5298cb07d4c4991b017..d5d72012ad1a06855286037e6515718e06c458b8 100644 (file)
@@ -463,7 +463,7 @@ switch_status_t sofia_on_hangup(switch_core_session_t *session)
                                switch_snprintf(reason, sizeof(reason), "%s", val);
                        } else {
                                if ((switch_channel_test_flag(channel, CF_INTERCEPT) || cause == SWITCH_CAUSE_PICKED_OFF || cause == SWITCH_CAUSE_LOSE_RACE)
-                                       && switch_false(switch_channel_get_variable(channel, "ignore_completed_elsewhere"))) {
+                                       && !switch_true(switch_channel_get_variable(channel, "ignore_completed_elsewhere"))) {
                                        switch_snprintf(reason, sizeof(reason), "SIP;cause=200;text=\"Call completed elsewhere\"");
                                } else if (cause > 0 && cause < 128) {
                                        switch_snprintf(reason, sizeof(reason), "Q.850;cause=%d;text=\"%s\"", cause, switch_channel_cause2str(cause));