From cab241be042a53ade4e20a2a5abf78516fed6289 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Fri, 6 Sep 2013 09:36:48 +0200 Subject: prevent event loops --- misc/freeswitch/scripts/event/presence_update.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/misc/freeswitch/scripts/event/presence_update.lua b/misc/freeswitch/scripts/event/presence_update.lua index cf29ca9..24b19d5 100644 --- a/misc/freeswitch/scripts/event/presence_update.lua +++ b/misc/freeswitch/scripts/event/presence_update.lua @@ -128,7 +128,9 @@ function PresenceUpdate.presence_in(self, event) direction = false; end - if protocol == 'conf' then + if tostring(event:getHeader('event_origin')) == 'gemeinschaft' then + self.log:debug('[', uuid,'] PRESENCE_', call_direction:upper(),'_LOOP ignored - protocol: ', protocol, ', account: ', account, ', state: ', state); + elseif protocol == 'conf' then state = event:getHeader('answer-state'); local login = tostring(event:getHeader('proto')); self.log:info('[', uuid,'] PRESENCE_CONFERENCE_', call_direction:upper(), ' ', common.str.to_i(account), ' - identifier: ', account, ', state: ', state); -- cgit v1.2.3