]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-5772 improve odds a little more but the phone is broken here
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 10 Sep 2013 21:55:31 +0000 (02:55 +0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 10 Sep 2013 21:55:31 +0000 (02:55 +0500)
src/include/switch_types.h
src/mod/endpoints/mod_sofia/sofia.c
src/switch_channel.c

index f90f1e190e22a3dd5f676060f1c86b3b9dbdb369..1b28b5cd84cb786fac56d90b8c98e538d5e32e2e 100644 (file)
@@ -1335,6 +1335,7 @@ typedef enum {
        CF_VIDEO_PASSIVE,
        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
index be0cfdde238451c44683a4b61ceba5f2d849faf9..ca9ba7ddec8f1132dbf401462465fc06dc67b351 100644 (file)
@@ -8790,9 +8790,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 {
index 771fd750424bea766e61f9c3af80fdf806271e0b..950fb28257b71b7c3405d85d1757b2de8150c046 100644 (file)
@@ -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";
+                               }
                        }
                }