diff --git a/src/include/switch_types.h b/src/include/switch_types.h index a99fb7b90f..0b3bfbb485 100644 --- a/src/include/switch_types.h +++ b/src/include/switch_types.h @@ -1303,6 +1303,8 @@ typedef enum { CF_MEDIA_TRANS, CF_HOLD_ON_BRIDGE, CF_NOVIDEO, + CF_VIDEO_ECHO, + CF_SLA_INTERCEPT, /* WARNING: DO NOT ADD ANY FLAGS BELOW THIS LINE */ /* IF YOU ADD NEW ONES CHECK IF THEY SHOULD PERSIST OR ZERO THEM IN switch_core_session.c switch_core_session_request_xml() */ CF_FLAG_MAX diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 87a2d6ae4e..1dab5915a4 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -8704,9 +8704,8 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia sofia_glue_execute_sql_now(profile, &sql, SWITCH_TRUE); switch_channel_presence(b_channel, "unknown", "idle", NULL); - } - + switch_channel_set_flag(tech_pvt->channel, CF_SLA_INTERCEPT); tech_pvt->caller_profile->destination_number = switch_core_sprintf(tech_pvt->caller_profile->pool, "%sanswer,intercept:%s", codec_str, bridge_uuid); } else { diff --git a/src/switch_channel.c b/src/switch_channel.c index 75c0a8ea25..fc52c74884 100644 --- a/src/switch_channel.c +++ b/src/switch_channel.c @@ -740,7 +740,11 @@ SWITCH_DECLARE(void) switch_channel_perform_presence(switch_channel_t *channel, if (channel->direction == SWITCH_CALL_DIRECTION_OUTBOUND) { call_info_state = "progressing"; } else { - call_info_state = "alerting"; + if (switch_channel_test_flag(channel, CF_SLA_INTERCEPT)) { + call_info_state = "idle"; + } else { + call_info_state = "alerting"; + } } }