]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
send another presence event on calls that were cancelled from LOSE_RACE to fix winnab...
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 11 Mar 2011 04:02:45 +0000 (22:02 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 11 Mar 2011 04:02:45 +0000 (22:02 -0600)
src/mod/endpoints/mod_sofia/sofia_presence.c
src/switch_channel.c

index 91808a7f50db6dd51176534b539bbfe6ff5b0757..a9a762e00e5b060f3a6a32bae49ae75bdb4d6979 100644 (file)
@@ -2004,7 +2004,7 @@ static void sync_sla(sofia_profile_t *profile, const char *to_user, const char *
        switch_core_hash_init(&sh->hash, sh->pool);
 
        sql = switch_mprintf("select sip_from_user,sip_from_host,call_info,call_info_state,uuid from sip_dialogs "
-                                                "where hostname='%q' and ((sip_from_user='%q' and sip_from_host='%q') or presence_id='%q@%q')", 
+                                                "where call_info_state is not null and hostname='%q' and ((sip_from_user='%q' and sip_from_host='%q') or presence_id='%q@%q')", 
                                                 mod_sofia_globals.hostname, to_user, to_host, to_user, to_host);
 
 
index bc9b76e90bbd5b3e4279ed1f8eb1609b11124bd8..f737dc53c633c0573b43a804170561d9fe3a310c 100644 (file)
@@ -2539,6 +2539,7 @@ SWITCH_DECLARE(switch_channel_state_t) switch_channel_perform_hangup(switch_chan
 
 
                if (hangup_cause == SWITCH_CAUSE_LOSE_RACE) {
+                       switch_channel_presence(channel, "unknown", "cancelled", NULL);
                        switch_channel_set_variable(channel, "presence_call_info", NULL);
                }