From 59f6654e960656c95ca5ff01fc4871a36a9c3fba Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 10 Mar 2011 22:02:45 -0600 Subject: [PATCH 1/3] send another presence event on calls that were cancelled from LOSE_RACE to fix winnable race in Broadsoft SCA --- src/mod/endpoints/mod_sofia/sofia_presence.c | 2 +- src/switch_channel.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index 91808a7f50..a9a762e00e 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -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); diff --git a/src/switch_channel.c b/src/switch_channel.c index bc9b76e90b..f737dc53c6 100644 --- a/src/switch_channel.c +++ b/src/switch_channel.c @@ -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); } From 373972c0e6d528e4e5d2c1cd20dc4c4f110d7e2e Mon Sep 17 00:00:00 2001 From: Jeff Lenk Date: Fri, 11 Mar 2011 08:52:32 -0600 Subject: [PATCH 2/3] OPENZAP-147 2008 project also needs x64 additions --- .../ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.2008.vcproj | 2 +- .../ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.2010.vcxproj | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.2008.vcproj b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.2008.vcproj index 2e7fb82041..01395cb1db 100644 --- a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.2008.vcproj +++ b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.2008.vcproj @@ -118,7 +118,7 @@ - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDLL @@ -157,7 +157,7 @@ - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDLL From 51a531aaefe3c7c7f966da4a4fb035fec51a2875 Mon Sep 17 00:00:00 2001 From: Marc Olivier Chouinard Date: Fri, 11 Mar 2011 12:40:56 -0500 Subject: [PATCH 3/3] mod_callcenter: Fix a bug when an caller leave the queue from a BREAK Call (Transfer...), it doesn't think an agent answered. --- src/mod/applications/mod_callcenter/mod_callcenter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod/applications/mod_callcenter/mod_callcenter.c b/src/mod/applications/mod_callcenter/mod_callcenter.c index 12e1960841..99e790db50 100644 --- a/src/mod/applications/mod_callcenter/mod_callcenter.c +++ b/src/mod/applications/mod_callcenter/mod_callcenter.c @@ -2302,7 +2302,7 @@ SWITCH_STANDARD_APP(callcenter_function) } /* Hangup any agents been callback */ - if (!switch_channel_up(member_channel)) { /* If channel is still up, it mean that the member didn't hangup, so we should leave the agent alone */ + if (!switch_channel_up(member_channel) || !switch_channel_get_variable(member_channel, "cc_agent_uuid")) { /* If channel is still up, it mean that the member didn't hangup, so we should leave the agent alone */ switch_core_session_hupall_matching_var("cc_member_uuid", member_uuid, SWITCH_CAUSE_ORIGINATOR_CANCEL); sql = switch_mprintf("UPDATE members SET state = '%q', uuid = '', abandoned_epoch = '%ld' WHERE system = 'single_box' AND uuid = '%q'", cc_member_state2str(CC_MEMBER_STATE_ABANDONED), (long) switch_epoch_time_now(NULL), member_uuid);