Merge pull request #663 in FS/freeswitch from ~RA/fs-ra-new:FS-8679-call-completed-elsewhere-2 to master

* commit '507bc265bd9bc1aec2fe77fe34d4ca1050c84243':
  FS-8679: [mod_sofia] no missed call if call is anwered by someone else
This commit is contained in:
Mike Jerris 2016-01-04 15:13:25 -06:00
commit a70f6672e8
1 changed files with 1 additions and 1 deletions

View File

@ -463,7 +463,7 @@ switch_status_t sofia_on_hangup(switch_core_session_t *session)
switch_snprintf(reason, sizeof(reason), "%s", val); switch_snprintf(reason, sizeof(reason), "%s", val);
} else { } else {
if ((switch_channel_test_flag(channel, CF_INTERCEPT) || cause == SWITCH_CAUSE_PICKED_OFF || cause == SWITCH_CAUSE_LOSE_RACE) 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\""); switch_snprintf(reason, sizeof(reason), "SIP;cause=200;text=\"Call completed elsewhere\"");
} else if (cause > 0 && cause < 128) { } else if (cause > 0 && cause < 128) {
switch_snprintf(reason, sizeof(reason), "Q.850;cause=%d;text=\"%s\"", cause, switch_channel_cause2str(cause)); switch_snprintf(reason, sizeof(reason), "Q.850;cause=%d;text=\"%s\"", cause, switch_channel_cause2str(cause));